Commit 6f9e646b authored by hongguangwu's avatar hongguangwu

MVP1.6.4-优化社保士兵

parent b804d992
......@@ -384,7 +384,8 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
if (typeFlag &&
(CommonConstants.ONE_STRING.equals(socialInfo.getYgsHandleStatus())
|| CommonConstants.TWO_STRING.equals(socialInfo.getYgsHandleStatus())
|| CommonConstants.THREE_STRING.equals(socialInfo.getYgsHandleStatus()))) {
|| CommonConstants.THREE_STRING.equals(socialInfo.getYgsHandleStatus())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getYgsHandleStatus()))) {
updateSocial = socialMap.get(socialInfo.getId());
if (updateSocial == null) {
updateSocial = new TSocialInfo();
......@@ -472,7 +473,8 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} else if (!typeFlag &&
(CommonConstants.ONE_STRING.equals(socialInfo.getYsdHandleStatus())
|| CommonConstants.TWO_STRING.equals(socialInfo.getYsdHandleStatus())
|| CommonConstants.THREE_STRING.equals(socialInfo.getYsdHandleStatus()))) {
|| CommonConstants.THREE_STRING.equals(socialInfo.getYsdHandleStatus())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getYsdHandleStatus()))) {
updateSocial = socialMap.get(socialInfo.getId());
if (updateSocial == null) {
updateSocial = new TSocialInfo();
......
......@@ -1226,11 +1226,11 @@
<select id="getSocialSoldierList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierExportVo">
SELECT
if(a.TYPE='0','派增','派减') TYPE,
case a.SOCIAL_HANDLE_STATUS when '0' then '未办理' when '1' then '全部办理成功' when '2' then '全部办理失败' when '3' then '部分办理成功' when '4' then '办理中' else '-' end socialHandleStatus,
case SUBSTRING_INDEX(GROUP_CONCAT(a.SOCIAL_HANDLE_STATUS ORDER BY a.CREATE_TIME desc),',',1) when '0' then '未办理' when '1' then '全部办理成功' when '2' then '全部办理失败' when '3' then '部分办理成功' when '4' then '办理中' else '-' end socialHandleStatus,
case s.ygs_Handle_Status when '0' then '无' when '1' then '待办理' when '2' then '自动办理中' when '3' then '继续办理' when '4' then '中止办理' when '5' then '人工处理' when '6' then '成功' else '-' end ygsHandleStatus,
case s.ysd_Handle_Status when '0' then '无' when '1' then '待办理' when '2' then '自动办理中' when '3' then '继续办理' when '4' then '中止办理' when '5' then '人工处理' when '6' then '成功' else '-' end ysdHandleStatus,
s.YGS_REMARK ygsRemark,s.YSD_REMARK ysdRemark,
a.APPLY_NO dispatchCode,
SUBSTRING_INDEX(GROUP_CONCAT(a.APPLY_NO ORDER BY a.CREATE_TIME desc),',',1) dispatchCode,
a.EMP_NAME empName,
a.EMP_IDCARD empIdcard,
emp_natrue.label empType,
......@@ -1259,6 +1259,7 @@
left join sys_area st2 on st2.id = s.SOCIAL_TOWN
left join view_sys_dict_item emp_natrue on emp_natrue.value=a.EMP_TYPE and emp_natrue.type='emp_natrue'
<include refid="where_getSocialSoldier"/>
group by s.id
order by a.AUDIT_TIME desc
</select>
......@@ -1288,10 +1289,15 @@
<select id="getSocialSoldierCount" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id
left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID
<include refid="where_getSocialSoldier"/>
from (
SELECT
1
FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id
left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID
<include refid="where_getSocialSoldier"/>
group by s.id
) a
</select>
<resultMap id="socialSoldierPageMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TSocialSoldierPageVo" extends="tDispatchInfoMap">
......@@ -1307,13 +1313,91 @@
<!-- hgw 2024-5-10 10:42:33 社保士兵列表查询 -->
<select id="getTSocialSoldierHandlePage" resultMap="socialSoldierPageMap">
SELECT
<include refid="Base_Column_List"/>
a.ID,
a.EMP_ID,
a.EMP_NAME,
a.EMP_NO,
a.EMP_IDCARD,
a.EMP_TYPE,
a.EMP_MOBILE,
a.EMP_NATIONAL,
a.STATUS,
a.TYPE,
a.SOCIAL_ID,
a.FUND_ID,
a.TYPE_SUB,
a.PROCESS_INST_ID,
a.SETTLE_DOMAIN,
a.DELETE_FLAG,
a.SOCIAL_REDUCE_DATE,
a.FUND_REDUCE_DATE,
a.LEAVE_DATE,
a.REDUCE_REASON,
a.REDUCE_REMARK,
a.BELONG_UNIT,
a.CURRENT_OPERATOR,
a.DISPATCH_ID_BAK,
a.CONTRACT_START,
a.CONTRACT_END,
a.CONTRACT_TERM,
a.EMP_REGIS_TYPE,
a.ENJOIN_DATE,
a.FILE_ADDR,
a.POST,
a.TRUST_REMARK,
a.FILE_PROVINCE,
a.FILE_CITY,
a.FILE_TOWN,
a.CONTRACT_TYPE,
SUBSTRING_INDEX(GROUP_CONCAT(a.SOCIAL_HANDLE_STATUS ORDER BY a.CREATE_TIME desc),',',1) SOCIAL_HANDLE_STATUS,
a.FUND_HANDLE_STATUS,
a.HANDLE_REMARK,
a.AUDIT_REMARK,
a.FUND_HANDLE_REMARK,
a.SOCIAL_HANDLE_REMARK,
a.SOCIAL_PROVINCE,
a.SOCIAL_CITY,
a.SOCIAL_TOWN,
a.FUND_PROVINCE,
a.FUND_CITY,
a.FUND_TOWN,
a.AUDIT_USER,
a.AUDIT_USER_NAME,
a.AUDIT_TIME,
a.WORKING_HOURS,
a.CREATE_BY,
a.UPDATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_TIME,
a.ORGAN_NAME,
a.DISPATCH_ITEM,
a.SETTLE_DOMAIN_NAME,
a.BELONG_UNIT_NAME,
a.DISPATCH_CODE,
a.AGAIN_DISPATCH_CODE,
a.SETTLE_DOMAIN_CODE,
a.CONTRACT_SUB_NAME,
a.CONTRACT_ID,
a.EDUCATION_NAME,
a.TRY_PERIOD,
a.ID_CARD_PROVINCE,
a.ID_CARD_CITY,
a.ID_CARD_TOWN,
a.ID_CARD_ADDRESS,
SUBSTRING_INDEX(GROUP_CONCAT(a.APPLY_NO ORDER BY a.CREATE_TIME desc),',',1) APPLY_NO,
a.ORDER_ID,
a.SCHOOL_NAME,
a.MAJOR,
a.FIRST_PAY_TIME,
a.GRADUATION_TIME,a.AUTO_FLAG
,a.SOCIAL_HOUSEHOLD_NAME,s.YGS_HANDLE_STATUS,s.YSD_HANDLE_STATUS
,s.YGS_REMARK,s.YSD_REMARK,s.YGS_REMARK_OLD,s.YSD_REMARK_OLD
,s.YGS_REMARK,s.YSD_REMARK,s.YGS_REMARK_OLD,s.YSD_REMARK_OLD
FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id
left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID
<include refid="where_getSocialSoldier"/>
group by s.id
order by a.AUDIT_TIME desc
</select>
......
......@@ -109,7 +109,7 @@
if(ifnull(h.id,0) != '0',h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) = '0'
)
and (sd.id is null or NOW() <![CDATA[ <= ]]> sd.SOCIAL_END_DATE)
group by a.id
group by s.id
</select>
<sql id="where_getSocialSoldier_base_handler">
......@@ -154,7 +154,7 @@
if(ifnull(h.id,0) != '0',h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) = '0'
)
and (sd.id is null or NOW() <![CDATA[ <= ]]> sd.MEDICAL_END_DATE)
group by a.id
group by s.id
</select>
<!-- 社保士兵医生大减少模板-->
......@@ -167,7 +167,7 @@
if(ifnull(h.id,0) != '0',h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) = '5'
)
and (sd.id is null or NOW() <![CDATA[ <= ]]> sd.MEDICAL_END_DATE)
group by a.id
group by s.id
</select>
</mapper>
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