Commit 8add7a43 authored by fangxinjiang's avatar fangxinjiang

代码优化-fxj

parent c47480cb
...@@ -913,9 +913,6 @@ ...@@ -913,9 +913,6 @@
<if test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''"> <if test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
AND a.SOCIAL_HOUSEHOLD = #{tPaymentInfo.socialHousehold} AND a.SOCIAL_HOUSEHOLD = #{tPaymentInfo.socialHousehold}
</if> </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() != ''"> <if test="tPaymentInfo.socialPayMonth != null and tPaymentInfo.socialPayMonth.trim() != ''">
AND a.SOCIAL_PAY_MONTH = #{tPaymentInfo.socialPayMonth} AND a.SOCIAL_PAY_MONTH = #{tPaymentInfo.socialPayMonth}
</if> </if>
...@@ -1112,9 +1109,6 @@ ...@@ -1112,9 +1109,6 @@
<if test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != ''"> <if test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != ''">
AND a.PROVIDENT_HOUSEHOLD = #{tPaymentInfo.providentHousehold} AND a.PROVIDENT_HOUSEHOLD = #{tPaymentInfo.providentHousehold}
</if> </if>
<if test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
AND a.SOCIAL_HOUSEHOLD = #{tPaymentInfo.socialHousehold}
</if>
<!-- 区域 默认精准查询 0 包含下级查询 1 开始 2023-03-02 fxj --> <!-- 区域 默认精准查询 0 包含下级查询 1 开始 2023-03-02 fxj -->
<if test='tPaymentInfo.areaFlag == null || tPaymentInfo.areaFlag == "1"'> <if test='tPaymentInfo.areaFlag == null || tPaymentInfo.areaFlag == "1"'>
<if test="tPaymentInfo.socialTown == null"> <if test="tPaymentInfo.socialTown == null">
...@@ -1743,7 +1737,7 @@ ...@@ -1743,7 +1737,7 @@
w.PERSONAL_PROVIDENT_PERCENT w.PERSONAL_PROVIDENT_PERCENT
FROM ( FROM (
(SELECT (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_NAME,
a.EMP_IDCARD, a.EMP_IDCARD,
a.UNIT_NAME, a.UNIT_NAME,
...@@ -1803,11 +1797,11 @@ ...@@ -1803,11 +1797,11 @@
IFNULL(a.SOCIAL_ID,'1') != '1' IFNULL(a.SOCIAL_ID,'1') != '1'
<include refid="tPaymentInfo_export_social_where"/> <include refid="tPaymentInfo_export_social_where"/>
</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 union all
(SELECT (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_NAME,
a.EMP_IDCARD, a.EMP_IDCARD,
a.UNIT_NAME, a.UNIT_NAME,
...@@ -1867,7 +1861,7 @@ ...@@ -1867,7 +1861,7 @@
IFNULL(a.FUND_ID,'1') != '1' IFNULL(a.FUND_ID,'1') != '1'
<include refid="tPaymentInfo_export_fund_where"/> <include refid="tPaymentInfo_export_fund_where"/>
</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 ) w
GROUP BY w.keyGroup) k 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