Commit f7bcb5c0 authored by fangxinjiang's avatar fangxinjiang

代码优化-fxj

parent 3b078386
......@@ -913,9 +913,6 @@
<if test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
AND a.SOCIAL_HOUSEHOLD = #{tPaymentInfo.socialHousehold}
</if>
<if test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != ''">
AND a.PROVIDENT_HOUSEHOLD = #{tPaymentInfo.providentHousehold}
</if>
<if test="tPaymentInfo.socialPayMonth != null and tPaymentInfo.socialPayMonth.trim() != ''">
AND a.SOCIAL_PAY_MONTH = #{tPaymentInfo.socialPayMonth}
</if>
......@@ -1112,9 +1109,6 @@
<if test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != ''">
AND a.PROVIDENT_HOUSEHOLD = #{tPaymentInfo.providentHousehold}
</if>
<if test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
AND a.SOCIAL_HOUSEHOLD = #{tPaymentInfo.socialHousehold}
</if>
<!-- 区域 默认精准查询 0 包含下级查询 1 开始 2023-03-02 fxj -->
<if test='tPaymentInfo.areaFlag == null || tPaymentInfo.areaFlag == "1"'>
<if test="tPaymentInfo.socialTown == null">
......@@ -1743,7 +1737,7 @@
w.PERSONAL_PROVIDENT_PERCENT
FROM (
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH) AS keyGroup,
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE )) AS keyGroup,
a.EMP_NAME,
a.EMP_IDCARD,
a.UNIT_NAME,
......@@ -1803,11 +1797,11 @@
IFNULL(a.SOCIAL_ID,'1') != '1'
<include refid="tPaymentInfo_export_social_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
)
union all
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH) AS keyGroup,
CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE )) AS keyGroup,
a.EMP_NAME,
a.EMP_IDCARD,
a.UNIT_NAME,
......@@ -1867,7 +1861,7 @@
IFNULL(a.FUND_ID,'1') != '1'
<include refid="tPaymentInfo_export_fund_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
)
) w
GROUP BY w.keyGroup) k
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment