Commit c3217367 authored by hongguangwu's avatar hongguangwu

MVP1.7.16-社保预减员

parent f1f354d3
...@@ -178,4 +178,20 @@ public class TSocialDeadlineInfo extends BaseEntity { ...@@ -178,4 +178,20 @@ public class TSocialDeadlineInfo extends BaseEntity {
@Schema(description = "医疗减员截止日期") @Schema(description = "医疗减员截止日期")
private Date medicalEndDateReduce; private Date medicalEndDateReduce;
/**
* 社保预减员起始日期
*/
@ExcelAttribute(name = "社保预减员起始日期", isDate = true)
@ExcelProperty("社保预减员起始日期")
@Schema(description = "社保预减员起始日期")
private Date socialPreReduceStartDate;
/**
* 社保预减员截止日期
*/
@ExcelAttribute(name = "社保预减员截止日期", isDate = true)
@ExcelProperty("社保预减员截止日期")
@Schema(description = "社保预减员截止日期")
private Date socialPreReduceEndDate;
} }
...@@ -324,6 +324,15 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI ...@@ -324,6 +324,15 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI
//处理社保减少截止时间和医保减少截止时间 //处理社保减少截止时间和医保减少截止时间
initMedicalEndDateReduce(holidayMap, save); initMedicalEndDateReduce(holidayMap, save);
} }
// 预减员时间
if (Common.isNotNull(save.getSocialPreReduceStartDate())){
save.setSocialPreReduceStartDate(this.getNewDateByOldDate(save.getSocialPreReduceStartDate()));
}
if (Common.isNotNull(save.getSocialPreReduceEndDate())){
save.setSocialPreReduceEndDate(this.getNewDateByOldDate(save.getSocialPreReduceEndDate()));
//处理社保减少截止时间和医保减少截止时间
initPreEndDateReduce(holidayMap, save);
}
initSocialEndDate(holidayMap, save); initSocialEndDate(holidayMap, save);
initMedicalEndDate(holidayMap, save); initMedicalEndDate(holidayMap, save);
...@@ -498,6 +507,18 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI ...@@ -498,6 +507,18 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI
initMedicalEndDateReduce(holidayMap,save); initMedicalEndDateReduce(holidayMap,save);
} }
// 处理预减员日期
private void initPreEndDateReduce(Map<String, String> holidayMap, TSocialDeadlineInfo save) {
// type 0 休假 1 补班
String day= holidayMap.get(DateUtil.getDay(save.getSocialPreReduceEndDate()));
if (Common.isNotNull(day)){
save.setSocialPreReduceEndDate(DateUtil.addDayByDate(save.getSocialPreReduceEndDate(),CommonConstants.ONE_INT_NEGATE));
}else {
return;
}
initPreEndDateReduce(holidayMap,save);
}
/** /**
* @Description: 获取 当月启用 的配置 * @Description: 获取 当月启用 的配置
* @Author: hgw * @Author: hgw
......
...@@ -252,9 +252,9 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -252,9 +252,9 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
continue; continue;
} }
} }
// 0:未到时间不动; 1:推送; 2:转人工 // 0:未到时间不动; 1:推送; 2:转人工;3预减员
canPushType = this.getCanPushType(socialSetMap, vo); canPushType = this.getCanPushType(socialSetMap, vo);
if (1 == canPushType) { if (1 == canPushType || 3 == canPushType) {
try { try {
socialInfo = new TSocialInfo(); socialInfo = new TSocialInfo();
...@@ -688,7 +688,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -688,7 +688,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
* @return: int * @return: int
**/ **/
private int getCanPushType(Map<String, TSocialDeadlineInfo> socialSetMap, SociaFriendYgsAddVo vo) { private int getCanPushType(Map<String, TSocialDeadlineInfo> socialSetMap, SociaFriendYgsAddVo vo) {
// 0:未到时间不动; 1:推送; 2:转人工 // 0:未到时间不动; 1:推送; 2:转人工;3预减员
int canPushType = 0; int canPushType = 0;
if (socialSetMap != null) { if (socialSetMap != null) {
TSocialDeadlineInfo socialSet; TSocialDeadlineInfo socialSet;
...@@ -720,7 +720,14 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -720,7 +720,14 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
if (nowTime.before(start)) { if (nowTime.before(start)) {
canPushType = 0; canPushType = 0;
} else if (nowTime.after(end)) { } else if (nowTime.after(end)) {
canPushType = 2; start = socialSet.getSocialPreReduceStartDate();
end = socialSet.getSocialPreReduceEndDate();
// 预减员
if (start != null && end != null && start.before(nowTime) && nowTime.before(end)) {
canPushType = 3;
} else {
canPushType = 2;
}
} else { } else {
canPushType = 1; canPushType = 1;
} }
......
...@@ -45,6 +45,8 @@ ...@@ -45,6 +45,8 @@
<result property="medicalStartDateReduce" column="MEDICAL_START_DATE_REDUCE"/> <result property="medicalStartDateReduce" column="MEDICAL_START_DATE_REDUCE"/>
<result property="socialEndDateReduce" column="SOCIAL_END_DATE_REDUCE"/> <result property="socialEndDateReduce" column="SOCIAL_END_DATE_REDUCE"/>
<result property="medicalEndDateReduce" column="MEDICAL_END_DATE_REDUCE"/> <result property="medicalEndDateReduce" column="MEDICAL_END_DATE_REDUCE"/>
<result property="SOCIAL_PRE_REDUCE_START_DATE" column="SOCIAL_PRE_REDUCE_START_DATE"/>
<result property="SOCIAL_PRE_REDUCE_END_DATE" column="SOCIAL_PRE_REDUCE_END_DATE"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -65,7 +67,9 @@ ...@@ -65,7 +67,9 @@
a.SOCIAL_START_DATE_REDUCE, a.SOCIAL_START_DATE_REDUCE,
a.MEDICAL_START_DATE_REDUCE, a.MEDICAL_START_DATE_REDUCE,
a.SOCIAL_END_DATE_REDUCE, a.SOCIAL_END_DATE_REDUCE,
a.MEDICAL_END_DATE_REDUCE a.MEDICAL_END_DATE_REDUCE,
a.SOCIAL_PRE_REDUCE_START_DATE,
a.SOCIAL_PRE_REDUCE_END_DATE
</sql> </sql>
<sql id="tSocialDeadlineInfo_where"> <sql id="tSocialDeadlineInfo_where">
<if test="tSocialDeadlineInfo != null"> <if test="tSocialDeadlineInfo != null">
......
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