Commit a4b30006 authored by huyuchen's avatar huyuchen

优化修改

parent 1675d947
...@@ -786,35 +786,27 @@ ...@@ -786,35 +786,27 @@
<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">
<if test="tPaymentInfo.socialCity != null"> <if test="tPaymentInfo.socialCity != null">
AND (a.SOCIAL_CITY = '${tPaymentInfo.socialCity}' or a.FUND_CITY = '${tPaymentInfo.socialCity}') AND a.SOCIAL_CITY = '${tPaymentInfo.socialCity}'
</if> </if>
<if test="tPaymentInfo.socialCity == null"> <if test="tPaymentInfo.socialCity == null">
<if test="tPaymentInfo.socialProvince != null"> <if test="tPaymentInfo.socialProvince != null">
AND (a.SOCIAL_PROVINCE = '${tPaymentInfo.socialProvince}' or a.FUND_PROVINCE = '${tPaymentInfo.socialProvince}') AND a.SOCIAL_PROVINCE = '${tPaymentInfo.socialProvince}'
</if> </if>
</if> </if>
</if> </if>
<if test="tPaymentInfo.socialTown != null and tPaymentInfo.socialTown.trim() != ''"> <if test="tPaymentInfo.socialTown != null and tPaymentInfo.socialTown.trim() != ''">
AND (a.SOCIAL_TOWN = '${tPaymentInfo.socialTown}' or a.FUND_TOWN = '${tPaymentInfo.socialTown}') AND a.SOCIAL_TOWN = '${tPaymentInfo.socialTown}'
</if> </if>
</if> </if>
<if test='tPaymentInfo.areaFlag == "0"'> <if test='tPaymentInfo.areaFlag == "0"'>
<if test="tPaymentInfo.socialProvince != null and tPaymentInfo.socialProvince.trim() != '' and tPaymentInfo.socialCity == null"> <if test="tPaymentInfo.socialProvince != null and tPaymentInfo.socialProvince.trim() != '' and tPaymentInfo.socialCity == null">
AND ( AND a.SOCIAL_PROVINCE = '${tPaymentInfo.socialProvince}' and (a.SOCIAL_CITY is null or a.SOCIAL_CITY ='')
(a.SOCIAL_PROVINCE = '${tPaymentInfo.socialProvince}' and (a.SOCIAL_CITY is null or a.SOCIAL_CITY =''))
or
(a.FUND_PROVINCE = '${tPaymentInfo.socialProvince}' and (a.FUND_CITY is null or a.FUND_CITY =''))
)
</if> </if>
<if test="tPaymentInfo.socialCity != null and tPaymentInfo.socialCity.trim() != '' and tPaymentInfo.socialTown == null"> <if test="tPaymentInfo.socialCity != null and tPaymentInfo.socialCity.trim() != '' and tPaymentInfo.socialTown == null">
AND ( AND a.SOCIAL_CITY = '${tPaymentInfo.socialCity}' and (a.SOCIAL_TOWN is null or a.SOCIAL_TOWN ='')
(a.SOCIAL_CITY = '${tPaymentInfo.socialCity}' and (a.SOCIAL_TOWN is null or a.SOCIAL_TOWN =''))
or
(a.FUND_CITY = '${tPaymentInfo.socialCity}' and (a.FUND_TOWN is null or a.FUND_TOWN =''))
)
</if> </if>
<if test="tPaymentInfo.socialTown != null and tPaymentInfo.socialTown.trim() != ''"> <if test="tPaymentInfo.socialTown != null and tPaymentInfo.socialTown.trim() != ''">
AND (a.SOCIAL_TOWN = '${tPaymentInfo.socialTown}' or a.FUND_TOWN = '${tPaymentInfo.socialTown}') AND a.SOCIAL_TOWN = '${tPaymentInfo.socialTown}'
</if> </if>
</if> </if>
<!-- 区域 默认精准查询 0 包含下级查询 1 结束 2023-03-02 fxj --> <!-- 区域 默认精准查询 0 包含下级查询 1 结束 2023-03-02 fxj -->
...@@ -822,6 +814,19 @@ ...@@ -822,6 +814,19 @@
</if> </if>
</sql> </sql>
<sql id="tPaymentInfo_export_socialFund_where">
<if test="tPaymentInfo != null">
<if test="tPaymentInfo.idList == null">
<if test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
AND w.SOCIAL_HOUSEHOLD = #{tPaymentInfo.socialHousehold}
</if>
<if test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != ''">
AND w.PROVIDENT_HOUSEHOLD = #{tPaymentInfo.providentHousehold}
</if>
</if>
</if>
</sql>
<sql id="tPaymentInfo_export_fund_where"> <sql id="tPaymentInfo_export_fund_where">
<if test="tPaymentInfo != null"> <if test="tPaymentInfo != null">
<if test="tPaymentInfo.idList == null"> <if test="tPaymentInfo.idList == null">
...@@ -850,35 +855,27 @@ ...@@ -850,35 +855,27 @@
<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">
<if test="tPaymentInfo.socialCity != null"> <if test="tPaymentInfo.socialCity != null">
AND (a.SOCIAL_CITY = '${tPaymentInfo.socialCity}' or a.FUND_CITY = '${tPaymentInfo.socialCity}') AND a.FUND_CITY = '${tPaymentInfo.socialCity}'
</if> </if>
<if test="tPaymentInfo.socialCity == null"> <if test="tPaymentInfo.socialCity == null">
<if test="tPaymentInfo.socialProvince != null"> <if test="tPaymentInfo.socialProvince != null">
AND (a.SOCIAL_PROVINCE = '${tPaymentInfo.socialProvince}' or a.FUND_PROVINCE = '${tPaymentInfo.socialProvince}') AND a.FUND_PROVINCE = '${tPaymentInfo.socialProvince}'
</if> </if>
</if> </if>
</if> </if>
<if test="tPaymentInfo.socialTown != null and tPaymentInfo.socialTown.trim() != ''"> <if test="tPaymentInfo.socialTown != null and tPaymentInfo.socialTown.trim() != ''">
AND (a.SOCIAL_TOWN = '${tPaymentInfo.socialTown}' or a.FUND_TOWN = '${tPaymentInfo.socialTown}') AND a.FUND_TOWN = '${tPaymentInfo.socialTown}'
</if> </if>
</if> </if>
<if test='tPaymentInfo.areaFlag == "0"'> <if test='tPaymentInfo.areaFlag == "0"'>
<if test="tPaymentInfo.socialProvince != null and tPaymentInfo.socialProvince.trim() != '' and tPaymentInfo.socialCity == null"> <if test="tPaymentInfo.socialProvince != null and tPaymentInfo.socialProvince.trim() != '' and tPaymentInfo.socialCity == null">
AND ( AND a.FUND_PROVINCE = '${tPaymentInfo.socialProvince}' and (a.FUND_CITY is null or a.FUND_CITY ='')
(a.SOCIAL_PROVINCE = '${tPaymentInfo.socialProvince}' and (a.SOCIAL_CITY is null or a.SOCIAL_CITY =''))
or
(a.FUND_PROVINCE = '${tPaymentInfo.socialProvince}' and (a.FUND_CITY is null or a.FUND_CITY =''))
)
</if> </if>
<if test="tPaymentInfo.socialCity != null and tPaymentInfo.socialCity.trim() != '' and tPaymentInfo.socialTown == null"> <if test="tPaymentInfo.socialCity != null and tPaymentInfo.socialCity.trim() != '' and tPaymentInfo.socialTown == null">
AND ( AND a.FUND_CITY = '${tPaymentInfo.socialCity}' and (a.FUND_TOWN is null or a.FUND_TOWN ='')
(a.SOCIAL_CITY = '${tPaymentInfo.socialCity}' and (a.SOCIAL_TOWN is null or a.SOCIAL_TOWN =''))
or
(a.FUND_CITY = '${tPaymentInfo.socialCity}' and (a.FUND_TOWN is null or a.FUND_TOWN =''))
)
</if> </if>
<if test="tPaymentInfo.socialTown != null and tPaymentInfo.socialTown.trim() != ''"> <if test="tPaymentInfo.socialTown != null and tPaymentInfo.socialTown.trim() != ''">
AND (a.SOCIAL_TOWN = '${tPaymentInfo.socialTown}' or a.FUND_TOWN = '${tPaymentInfo.socialTown}') AND a.FUND_TOWN = '${tPaymentInfo.socialTown}'
</if> </if>
</if> </if>
<!-- 区域 默认精准查询 0 包含下级查询 1 结束 2023-03-02 fxj --> <!-- 区域 默认精准查询 0 包含下级查询 1 结束 2023-03-02 fxj -->
...@@ -1169,6 +1166,10 @@ ...@@ -1169,6 +1166,10 @@
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH,a.SETTLE_DOMAIN_CODE GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
) )
) w ) w
<where>
1 = 1
<include refid="tPaymentInfo_export_socialFund_where"/>
</where>
GROUP BY w.keyGroup GROUP BY w.keyGroup
</select> </select>
......
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