Commit b6bfdf6d authored by hongguangwu's avatar hongguangwu

MVP1.6.4-过期变为终止

parent 5a68737c
......@@ -1048,5 +1048,11 @@ public class TSocialInfo extends BaseEntity {
// 派单id,社保士兵使用
@TableField(exist = false)
private String dispatchId;
// 过期Flag,0未过期,1过期,社保士兵使用(过期的自动变为中止办理)
@TableField(exist = false)
private String ygsOverDueFlag;
// 过期Flag,0未过期,1过期,社保士兵使用(过期的自动变为中止办理)
@TableField(exist = false)
private String ysdOverDueFlag;
}
......@@ -435,8 +435,11 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} else {
updateSocial.setYgsRemark(excel.getMsg());
updateSocial.setYgsRemarkOld(excel.getMsg());
// 如果找到了失败原因配置:
if (Common.isNotNull(excel.getMsg())) {
// 过期自动变为终止
if (CommonConstants.ONE_STRING.equals(socialInfo.getYgsOverDueFlag())) {
ygsHandleStatus = CommonConstants.FOUR_STRING;
} else if (Common.isNotNull(excel.getMsg())) {
// 如果找到了失败原因配置:
failConfig = getConfig(excel.getMsg(),errorMap);
if (failConfig != null) {
updateSocial.setYgsRemark(failConfig.getSimpleReason());
......@@ -473,8 +476,11 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} else {
updateSocial.setYsdRemark(excel.getMsg());
updateSocial.setYsdRemarkOld(excel.getMsg());
// 如果找到了失败原因配置:
if (Common.isNotNull(excel.getMsg())) {
// 过期自动变为终止
if (CommonConstants.ONE_STRING.equals(socialInfo.getYsdOverDueFlag())) {
ygsHandleStatus = CommonConstants.FOUR_STRING;
} else if (Common.isNotNull(excel.getMsg())) {
// 如果找到了失败原因配置:
failConfig = getConfig(excel.getMsg(),errorMap);
if (failConfig != null) {
updateSocial.setYsdRemark(failConfig.getSimpleReason());
......
......@@ -147,6 +147,8 @@
<result property="ygsAddId" column="YGS_ADD_ID"/>
<result property="ysdAddId" column="YSD_ADD_ID"/>
<result property="dispatchId" column="DISPATCH_ID"/>
<result property="ygsOverDueFlag" column="YGS_OVER_DUE_FLAG"/>
<result property="ysdOverDueFlag" column="YSD_OVER_DUE_FLAG"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -590,10 +592,14 @@
a.YGS_ADD_ID,
a.HANDLE_STATUS,
a.YGS_HANDLE_STATUS,
d.id as DISPATCH_ID
d.id as DISPATCH_ID,
if((sd.id is not null and NOW() <![CDATA[ <= ]]> sd.SOCIAL_END_DATE) or ( sd.id is null and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')),0 ,1) YGS_OVER_DUE_FLAG
FROM t_social_info a
left join t_dispatch_info d on d.SOCIAL_ID = a.id
where a.YGS_ADD_ID is not null and d.AUTO_FLAG='0' and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')
left join t_social_deadline_info sd on sd.MONTH = DATE_FORMAT(d.AUDIT_TIME,'%Y%m') and sd.STATUS = '0'
and sd.PROVINCE=a.SOCIAL_PROVINCE and sd.CITY=a.SOCIAL_CITY and ( (a.SOCIAL_TOWN is null and sd.TOWN is null) or (sd.TOWN=a.SOCIAL_TOWN))
where a.YGS_ADD_ID is not null and d.AUTO_FLAG='0'
and (DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m') or DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m'))
and a.YGS_HANDLE_STATUS in ('1','2','3')
group by a.id
</select>
......@@ -606,10 +612,14 @@
a.YSD_ADD_ID,
a.HANDLE_STATUS,
a.YSD_HANDLE_STATUS,
d.id as DISPATCH_ID
d.id as DISPATCH_ID,
if((sd.id is not null and NOW() <![CDATA[ <= ]]> sd.MEDICAL_END_DATE) or ( sd.id is null and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')),0 ,1) YSD_OVER_DUE_FLAG
FROM t_social_info a
left join t_dispatch_info d on d.SOCIAL_ID = a.id
where a.YSD_ADD_ID is not null and d.AUTO_FLAG='0' and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')
left join t_social_deadline_info sd on sd.MONTH = DATE_FORMAT(d.AUDIT_TIME,'%Y%m') and sd.STATUS = '0'
and sd.PROVINCE=a.SOCIAL_PROVINCE and sd.CITY=a.SOCIAL_CITY and ( (a.SOCIAL_TOWN is null and sd.TOWN is null) or (sd.TOWN=a.SOCIAL_TOWN))
where a.YSD_ADD_ID is not null and d.AUTO_FLAG='0' and
and (DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m') or DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m'))
and a.YSD_HANDLE_STATUS in ('1','2','3')
group by a.id
</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