|
|
@@ -94,28 +94,30 @@
|
|
|
|
|
|
|
|
|
<select id="selectFinAccBillsPage" resultMap="finAccBillsResultMap">
|
|
|
- select * from los_fin_acc_bills where is_deleted = 0
|
|
|
+ select *
|
|
|
+ from los_fin_acc_bills
|
|
|
+ where is_deleted = 0
|
|
|
</select>
|
|
|
<select id="listFeeCountByCorp" resultType="java.util.Map">
|
|
|
SELECT
|
|
|
- corp_cn_name as corpCnName,
|
|
|
- mblno as mblno,
|
|
|
- SUM( amount_dr ) as amountDr,
|
|
|
- SUM( amount_cr ) as amountCr,
|
|
|
- SUM( amount_dr_usd ) as amountDrUsd,
|
|
|
- SUM( amount_cr_usd ) as amountCrUsd,
|
|
|
- SUM( amount_dr_loc ) as amountDrLoc,
|
|
|
- SUM( amount_cr_loc ) as amountCrLoc,
|
|
|
- SUM( stl_amount_dr ) as stlAmountDr,
|
|
|
- SUM( stl_amount_cr ) as stlAmountCr,
|
|
|
- SUM( stl_amount_dr_usd ) as stlAmountDrUsd,
|
|
|
- SUM( stl_amount_cr_usd ) as stlAmountCrUsd,
|
|
|
- SUM( stl_amount_cr_loc ) as stlAmountCrLoc,
|
|
|
- SUM( stl_amount_dr_loc ) as stlAmountDrLoc
|
|
|
+ corp_cn_name as corpCnName,
|
|
|
+ mblno as mblno,
|
|
|
+ SUM( amount_dr ) as amountDr,
|
|
|
+ SUM( amount_cr ) as amountCr,
|
|
|
+ SUM( amount_dr_usd ) as amountDrUsd,
|
|
|
+ SUM( amount_cr_usd ) as amountCrUsd,
|
|
|
+ SUM( amount_dr_loc ) as amountDrLoc,
|
|
|
+ SUM( amount_cr_loc ) as amountCrLoc,
|
|
|
+ SUM( stl_amount_dr ) as stlAmountDr,
|
|
|
+ SUM( stl_amount_cr ) as stlAmountCr,
|
|
|
+ SUM( stl_amount_dr_usd ) as stlAmountDrUsd,
|
|
|
+ SUM( stl_amount_cr_usd ) as stlAmountCrUsd,
|
|
|
+ SUM( stl_amount_cr_loc ) as stlAmountCrLoc,
|
|
|
+ SUM( stl_amount_dr_loc ) as stlAmountDrLoc
|
|
|
FROM
|
|
|
- `los_fin_acc_bills`
|
|
|
+ `los_fin_acc_bills`
|
|
|
WHERE
|
|
|
- is_deleted = '0'
|
|
|
+ is_deleted = '0'
|
|
|
<if test='tenantId != null and tenantId != ""'>
|
|
|
and tenant_id = #{tenantId}
|
|
|
</if>
|
|
|
@@ -125,14 +127,14 @@
|
|
|
<if test='deptPid != null'>
|
|
|
and branch_id = #{deptPid}
|
|
|
</if>
|
|
|
- <if test='postId != null and postId != ""'>
|
|
|
+ <if test='postId != null and postId != ""'>
|
|
|
and team_id = #{postId}
|
|
|
</if>
|
|
|
- <if test='corpId != null'>
|
|
|
+ <if test='corpId != null'>
|
|
|
and corp_id = #{corpId}
|
|
|
</if>
|
|
|
GROUP BY
|
|
|
- mblno
|
|
|
+ mblno
|
|
|
</select>
|
|
|
<select id="listFeeCountByCorpExport" resultType="org.springblade.los.excel.FeeCountByCorpExcel">
|
|
|
SELECT
|
|
|
@@ -172,5 +174,315 @@
|
|
|
GROUP BY
|
|
|
mblno
|
|
|
</select>
|
|
|
+ <select id="feeSummary" resultType="org.springblade.los.statisticAnalysis.FeeSummaryRD">
|
|
|
+ SELECT
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "1"'>
|
|
|
+ acc.corp_cn_name corpName,
|
|
|
+ </if>
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "2"'>
|
|
|
+ acc.bill_corp_cn_name corpName,
|
|
|
+ </if>
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "3"'>
|
|
|
+ acc.src_cn_name corpName,
|
|
|
+ </if>
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN acc.amount_dr WHEN 'C' THEN acc.amount_cr ELSE 0 END ) ) AS amount,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN acc.amount_dr_usd WHEN 'C' THEN acc.amount_cr_usd ELSE 0 END ) ) AS amountUsd,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN acc.stl_amount_dr_usd WHEN 'C' THEN acc.stl_amount_cr_usd ELSE 0 END ) ) AS amountUsdAlready,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN acc.stl_amount_dr WHEN 'C' THEN acc.stl_amount_cr ELSE 0 END ) ) AS amountAlready,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN (acc.amount_dr_usd-stl_amount_dr_usd) WHEN 'C' THEN (acc.amount_cr_usd-stl_amount_cr_usd) ELSE 0 END ) ) AS amountUsdNot,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN (acc.amount_dr-acc.stl_amount_dr) WHEN 'C' THEN (acc.amount_cr-acc.stl_amount_cr) ELSE 0 END ) ) AS amountNot
|
|
|
+ FROM
|
|
|
+ los_fin_acc_bills acc
|
|
|
+ WHERE
|
|
|
+ acc.is_deleted = '0'
|
|
|
+ <if test='fee.tenantId != null and fee.tenantId != ""'>
|
|
|
+ and acc.tenant_id = #{fee.tenantId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.branchId != null and fee.branchId != ""'>
|
|
|
+ and acc.branch_id = #{fee.branchId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.teamId != null and fee.teamId != ""'>
|
|
|
+ and acc.team_id = #{fee.teamId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.dc != null and fee.dc != ""'>
|
|
|
+ and acc.account_dc = #{fee.dc}
|
|
|
+ </if>
|
|
|
+ <if test='fee.businessType != null and fee.businessType != ""'>
|
|
|
+ and acc.business_type = #{fee.businessType}
|
|
|
+ </if>
|
|
|
+ <if test='fee.clientId != null'>
|
|
|
+ and acc.bill_corp_id = #{fee.clientId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.corpId != null'>
|
|
|
+ and acc.corp_id = #{fee.corpId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.srcType != null and fee.srcType != ""'>
|
|
|
+ and acc.src_type = #{fee.srcType}
|
|
|
+ </if>
|
|
|
+ <if test='fee.srcId != null'>
|
|
|
+ and acc.src_id = #{fee.srcId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.isBusinessDate != null and fee.isBusinessDate != "" and fee.isBusinessDate == "1"'>
|
|
|
+ <if test='fee.etdStart != null and fee.etdStart != ""'>
|
|
|
+ and acc.bill_date >= #{fee.etdStart}
|
|
|
+ </if>
|
|
|
+ <if test='fee.etdEnd != null and fee.etdEnd != ""'>
|
|
|
+ and acc.bill_date <= #{fee.etdEnd}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test='fee.isToExamineDate != null and fee.isToExamineDate != "" and fee.isToExamineDate == "1"'>
|
|
|
+ <if test='fee.etdStart != null and fee.etdStart != ""'>
|
|
|
+ and acc.approved_date >= #{fee.etdStart}
|
|
|
+ </if>
|
|
|
+ <if test='fee.etdEnd != null and fee.etdEnd != ""'>
|
|
|
+ and acc.approved_date <= #{fee.etdEnd}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "1"'>
|
|
|
+ GROUP BY acc.corp_id
|
|
|
+ </if>
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "2"'>
|
|
|
+ GROUP BY acc.bill_corp_id
|
|
|
+ </if>
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "3"'>
|
|
|
+ GROUP BY acc.src_id
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="feeSummaryExport" resultType="org.springblade.los.statisticAnalysis.FeeSummaryRD">
|
|
|
+ SELECT
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "1"'>
|
|
|
+ acc.corp_cn_name corpName,
|
|
|
+ </if>
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "2"'>
|
|
|
+ acc.bill_corp_cn_name corpName,
|
|
|
+ </if>
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "3"'>
|
|
|
+ acc.src_cn_name corpName,
|
|
|
+ </if>
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN acc.amount_dr WHEN 'C' THEN acc.amount_cr ELSE 0 END ) ) AS amount,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN acc.amount_dr_usd WHEN 'C' THEN acc.amount_cr_usd ELSE 0 END ) ) AS amountUsd,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN acc.stl_amount_dr_usd WHEN 'C' THEN acc.stl_amount_cr_usd ELSE 0 END ) ) AS amountUsdAlready,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN acc.stl_amount_dr WHEN 'C' THEN acc.stl_amount_cr ELSE 0 END ) ) AS amountAlready,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN (acc.amount_dr_usd-stl_amount_dr_usd) WHEN 'C' THEN (acc.amount_cr_usd-stl_amount_cr_usd) ELSE 0 END ) ) AS amountUsdNot,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN (acc.amount_dr-acc.stl_amount_dr) WHEN 'C' THEN (acc.amount_cr-acc.stl_amount_cr) ELSE 0 END ) ) AS amountNot
|
|
|
+ FROM
|
|
|
+ los_fin_acc_bills acc
|
|
|
+ WHERE
|
|
|
+ acc.is_deleted = '0'
|
|
|
+ <if test='fee.tenantId != null and fee.tenantId != ""'>
|
|
|
+ and acc.tenant_id = #{fee.tenantId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.branchId != null and fee.branchId != ""'>
|
|
|
+ and acc.branch_id = #{fee.branchId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.teamId != null and fee.teamId != ""'>
|
|
|
+ and acc.team_id = #{fee.teamId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.dc != null and fee.dc != ""'>
|
|
|
+ and acc.account_dc = #{fee.dc}
|
|
|
+ </if>
|
|
|
+ <if test='fee.businessType != null and fee.businessType != ""'>
|
|
|
+ and acc.business_type = #{fee.businessType}
|
|
|
+ </if>
|
|
|
+ <if test='fee.clientId != null'>
|
|
|
+ and acc.bill_corp_id = #{fee.clientId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.corpId != null'>
|
|
|
+ and acc.corp_id = #{fee.corpId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.srcType != null and fee.srcType != ""'>
|
|
|
+ and acc.src_type = #{fee.srcType}
|
|
|
+ </if>
|
|
|
+ <if test='fee.srcId != null'>
|
|
|
+ and acc.src_id = #{fee.srcId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.isBusinessDate != null and fee.isBusinessDate != "" and fee.isBusinessDate == "1"'>
|
|
|
+ <if test='fee.etdStart != null and fee.etdStart != ""'>
|
|
|
+ and acc.bill_date >= #{fee.etdStart}
|
|
|
+ </if>
|
|
|
+ <if test='fee.etdEnd != null and fee.etdEnd != ""'>
|
|
|
+ and acc.bill_date <= #{fee.etdEnd}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test='fee.isToExamineDate != null and fee.isToExamineDate != "" and fee.isToExamineDate == "1"'>
|
|
|
+ <if test='fee.etdStart != null and fee.etdStart != ""'>
|
|
|
+ and acc.approved_date >= #{fee.etdStart}
|
|
|
+ </if>
|
|
|
+ <if test='fee.etdEnd != null and fee.etdEnd != ""'>
|
|
|
+ and acc.approved_date <= #{fee.etdEnd}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "1"'>
|
|
|
+ GROUP BY acc.corp_id
|
|
|
+ </if>
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "2"'>
|
|
|
+ GROUP BY acc.bill_corp_id
|
|
|
+ </if>
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "3"'>
|
|
|
+ GROUP BY acc.src_id
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="feeSummaryDetail" resultType="org.springblade.los.statisticAnalysis.FeeSummaryDetailRD">
|
|
|
+ SELECT
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "1"'>
|
|
|
+ acc.corp_cn_name corpName,
|
|
|
+ </if>
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "2"'>
|
|
|
+ acc.bill_corp_cn_name corpName,
|
|
|
+ </if>
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "3"'>
|
|
|
+ acc.src_cn_name corpName,
|
|
|
+ </if>
|
|
|
+ acc.bill_no billNo,
|
|
|
+ acc.mblno mblNo,
|
|
|
+ acc.etd etdDate,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN acc.amount_dr WHEN 'C' THEN acc.amount_cr ELSE 0 END ) ) AS amount,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN acc.amount_dr_usd WHEN 'C' THEN acc.amount_cr_usd ELSE 0 END ) ) AS amountUsd,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN acc.stl_amount_dr_usd WHEN 'C' THEN acc.stl_amount_cr_usd ELSE 0 END ) ) AS amountUsdAlready,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN acc.stl_amount_dr WHEN 'C' THEN acc.stl_amount_cr ELSE 0 END ) ) AS amountAlready,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN (acc.amount_dr_usd-stl_amount_dr_usd) WHEN 'C' THEN (acc.amount_cr_usd-stl_amount_cr_usd) ELSE 0 END ) ) AS amountUsdNot,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN (acc.amount_dr-acc.stl_amount_dr) WHEN 'C' THEN (acc.amount_cr-acc.stl_amount_cr) ELSE 0 END ) ) AS amountNot,
|
|
|
+ SUM(IF(uninvoiced_amount,uninvoiced_amount,0)) AS amountInvoicing,
|
|
|
+ SUM(IF(uninvoiced_amount_usd,uninvoiced_amount_usd,0)) AS amountInvoicingUsd,
|
|
|
+ SUM(acc.amount_dr-IF(uninvoiced_amount,uninvoiced_amount,0)) AS amountInvoicingNot,
|
|
|
+ SUM(acc.amount_dr_usd-IF(uninvoiced_amount_usd,uninvoiced_amount_usd,0)) AS amountInvoicingUsdNot
|
|
|
+ FROM
|
|
|
+ los_fin_acc_bills acc
|
|
|
+ WHERE
|
|
|
+ acc.is_deleted = '0'
|
|
|
+ <if test='fee.tenantId != null and fee.tenantId != ""'>
|
|
|
+ and acc.tenant_id = #{fee.tenantId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.branchId != null and fee.branchId != ""'>
|
|
|
+ and acc.branch_id = #{fee.branchId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.teamId != null and fee.teamId != ""'>
|
|
|
+ and acc.team_id = #{fee.teamId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.dc != null and fee.dc != ""'>
|
|
|
+ and acc.account_dc = #{fee.dc}
|
|
|
+ </if>
|
|
|
+ <if test='fee.businessType != null and fee.businessType != ""'>
|
|
|
+ and acc.business_type = #{fee.businessType}
|
|
|
+ </if>
|
|
|
+ <if test='fee.clientId != null'>
|
|
|
+ and acc.bill_corp_id = #{fee.clientId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.corpId != null'>
|
|
|
+ and acc.corp_id = #{fee.corpId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.srcType != null and fee.srcType != ""'>
|
|
|
+ and acc.src_type = #{fee.srcType}
|
|
|
+ </if>
|
|
|
+ <if test='fee.srcId != null'>
|
|
|
+ and acc.src_id = #{fee.srcId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.isBusinessDate != null and fee.isBusinessDate != "" and fee.isBusinessDate == "1"'>
|
|
|
+ <if test='fee.etdStart != null and fee.etdStart != ""'>
|
|
|
+ and acc.bill_date >= #{fee.etdStart}
|
|
|
+ </if>
|
|
|
+ <if test='fee.etdEnd != null and fee.etdEnd != ""'>
|
|
|
+ and acc.bill_date <= #{fee.etdEnd}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test='fee.isToExamineDate != null and fee.isToExamineDate != "" and fee.isToExamineDate == "1"'>
|
|
|
+ <if test='fee.etdStart != null and fee.etdStart != ""'>
|
|
|
+ and acc.approved_date >= #{fee.etdStart}
|
|
|
+ </if>
|
|
|
+ <if test='fee.etdEnd != null and fee.etdEnd != ""'>
|
|
|
+ and acc.approved_date <= #{fee.etdEnd}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "1"'>
|
|
|
+ GROUP BY acc.corp_id
|
|
|
+ </if>
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "2"'>
|
|
|
+ GROUP BY acc.bill_corp_id
|
|
|
+ </if>
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "3"'>
|
|
|
+ GROUP BY acc.src_id
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="feeSummaryDetailExport" resultType="org.springblade.los.statisticAnalysis.FeeSummaryDetailRD">
|
|
|
+ SELECT
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "1"'>
|
|
|
+ acc.corp_cn_name corpName,
|
|
|
+ </if>
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "2"'>
|
|
|
+ acc.bill_corp_cn_name corpName,
|
|
|
+ </if>
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "3"'>
|
|
|
+ acc.src_cn_name corpName,
|
|
|
+ </if>
|
|
|
+ acc.bill_no billNo,
|
|
|
+ acc.mblno mblNo,
|
|
|
+ acc.etd etdDate,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN acc.amount_dr WHEN 'C' THEN acc.amount_cr ELSE 0 END ) ) AS amount,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN acc.amount_dr_usd WHEN 'C' THEN acc.amount_cr_usd ELSE 0 END ) ) AS amountUsd,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN acc.stl_amount_dr_usd WHEN 'C' THEN acc.stl_amount_cr_usd ELSE 0 END ) ) AS amountUsdAlready,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN acc.stl_amount_dr WHEN 'C' THEN acc.stl_amount_cr ELSE 0 END ) ) AS amountAlready,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN (acc.amount_dr_usd-stl_amount_dr_usd) WHEN 'C' THEN (acc.amount_cr_usd-stl_amount_cr_usd) ELSE 0 END ) ) AS amountUsdNot,
|
|
|
+ SUM(( CASE acc.account_dc WHEN 'D' THEN (acc.amount_dr-acc.stl_amount_dr) WHEN 'C' THEN (acc.amount_cr-acc.stl_amount_cr) ELSE 0 END ) ) AS amountNot,
|
|
|
+ SUM(IF(uninvoiced_amount,uninvoiced_amount,0)) AS amountInvoicing,
|
|
|
+ SUM(IF(uninvoiced_amount_usd,uninvoiced_amount_usd,0)) AS amountInvoicingUsd,
|
|
|
+ SUM(acc.amount_dr-IF(uninvoiced_amount,uninvoiced_amount,0)) AS amountInvoicingNot,
|
|
|
+ SUM(acc.amount_dr_usd-IF(uninvoiced_amount_usd,uninvoiced_amount_usd,0)) AS amountInvoicingUsdNot
|
|
|
+ FROM
|
|
|
+ los_fin_acc_bills acc
|
|
|
+ WHERE
|
|
|
+ acc.is_deleted = '0'
|
|
|
+ <if test='fee.tenantId != null and fee.tenantId != ""'>
|
|
|
+ and acc.tenant_id = #{fee.tenantId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.branchId != null and fee.branchId != ""'>
|
|
|
+ and acc.branch_id = #{fee.branchId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.teamId != null and fee.teamId != ""'>
|
|
|
+ and acc.team_id = #{fee.teamId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.dc != null and fee.dc != ""'>
|
|
|
+ and acc.account_dc = #{fee.dc}
|
|
|
+ </if>
|
|
|
+ <if test='fee.businessType != null and fee.businessType != ""'>
|
|
|
+ and acc.business_type = #{fee.businessType}
|
|
|
+ </if>
|
|
|
+ <if test='fee.clientId != null'>
|
|
|
+ and acc.bill_corp_id = #{fee.clientId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.corpId != null'>
|
|
|
+ and acc.corp_id = #{fee.corpId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.srcType != null and fee.srcType != ""'>
|
|
|
+ and acc.src_type = #{fee.srcType}
|
|
|
+ </if>
|
|
|
+ <if test='fee.srcId != null'>
|
|
|
+ and acc.src_id = #{fee.srcId}
|
|
|
+ </if>
|
|
|
+ <if test='fee.isBusinessDate != null and fee.isBusinessDate != "" and fee.isBusinessDate == "1"'>
|
|
|
+ <if test='fee.etdStart != null and fee.etdStart != ""'>
|
|
|
+ and acc.bill_date >= #{fee.etdStart}
|
|
|
+ </if>
|
|
|
+ <if test='fee.etdEnd != null and fee.etdEnd != ""'>
|
|
|
+ and acc.bill_date <= #{fee.etdEnd}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test='fee.isToExamineDate != null and fee.isToExamineDate != "" and fee.isToExamineDate == "1"'>
|
|
|
+ <if test='fee.etdStart != null and fee.etdStart != ""'>
|
|
|
+ and acc.approved_date >= #{fee.etdStart}
|
|
|
+ </if>
|
|
|
+ <if test='fee.etdEnd != null and fee.etdEnd != ""'>
|
|
|
+ and acc.approved_date <= #{fee.etdEnd}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "1"'>
|
|
|
+ GROUP BY acc.corp_id
|
|
|
+ </if>
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "2"'>
|
|
|
+ GROUP BY acc.bill_corp_id
|
|
|
+ </if>
|
|
|
+ <if test='fee.type != null and fee.type != "" and fee.type == "3"'>
|
|
|
+ GROUP BY acc.src_id
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|