Commit 4fdf842d authored by huyuchen's avatar huyuchen

huych-入职登记商险待办提交

parent 095651f3
...@@ -886,6 +886,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -886,6 +886,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
@Override @Override
public R batchSendMessage(List<SendMessageUpdateVo> voList,String type) { public R batchSendMessage(List<SendMessageUpdateVo> voList,String type) {
if (Common.isNotNull(voList) && voList.size() >200) {
return R.failed("短信批量发送单次最多两百条");
}
//获取短信待发放和信息待填写的数据 //获取短信待发放和信息待填写的数据
List<String> errorList = new ArrayList<>(); List<String> errorList = new ArrayList<>();
if (CommonConstants.ONE_STRING.equals(type)) { if (CommonConstants.ONE_STRING.equals(type)) {
......
...@@ -34,7 +34,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeePreLogSearchVo; ...@@ -34,7 +34,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeePreLogSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.equator.HrEquator; import com.yifu.cloud.plus.v1.yifu.common.core.util.equator.HrEquator;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprInsurancesProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprInsurancesProperties;
...@@ -154,6 +153,16 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -154,6 +153,16 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
IGNORE_FIELD.add("isAddress"); IGNORE_FIELD.add("isAddress");
} }
private static final List<String> PRE_IGNORE_FIELD = new ArrayList<>();
static {
IGNORE_FIELD.add("createTime");
IGNORE_FIELD.add("deptId");
IGNORE_FIELD.add("dataSource");
IGNORE_FIELD.add("createBy");
IGNORE_FIELD.add("createName");
IGNORE_FIELD.add("updateBy");
}
@Override @Override
public void saveModifyAndUpdateInsurance(String empPreId, EmployeeRegistrationPre oldInfo public void saveModifyAndUpdateInsurance(String empPreId, EmployeeRegistrationPre oldInfo
, EmployeeRegistrationPre newInfo, YifuUser user, Map<String, TEmployeeInsurancePre> oldMap) { , EmployeeRegistrationPre newInfo, YifuUser user, Map<String, TEmployeeInsurancePre> oldMap) {
...@@ -319,7 +328,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -319,7 +328,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
if (Common.isNotNull(newInsurance.getId())) { if (Common.isNotNull(newInsurance.getId())) {
oldInsurance = oldMap.get(newInsurance.getId()); oldInsurance = oldMap.get(newInsurance.getId());
if (oldInsurance != null) { if (oldInsurance != null) {
differenceInsuranceKey = HrEquator.comparisonValue(oldInsurance, newInsurance); differenceInsuranceKey = HrEquator.comparisonValueIgnoreField(oldInsurance, newInsurance,PRE_IGNORE_FIELD);
} }
if (Common.isNotNull(differenceInsuranceKey) || oldInsurance == null) { if (Common.isNotNull(differenceInsuranceKey) || oldInsurance == null) {
detailInsuranceLog = new TEmployeePreLogDetail(); detailInsuranceLog = new TEmployeePreLogDetail();
......
...@@ -203,7 +203,7 @@ public class TEmployeeProjectBelongDeptServiceImpl extends ServiceImpl<TEmployee ...@@ -203,7 +203,7 @@ public class TEmployeeProjectBelongDeptServiceImpl extends ServiceImpl<TEmployee
dept.setId(vo.getProjectId()); dept.setId(vo.getProjectId());
dept.setEmpDeptid(vo.getDepartId().toString()); dept.setEmpDeptid(vo.getDepartId().toString());
dept.setEmpDeptname(vo.getDepartName()); dept.setEmpDeptname(vo.getDepartName());
this.save(dept); this.saveOrUpdate(dept);
} else { } else {
this.removeById(vo.getProjectId()); this.removeById(vo.getProjectId());
} }
......
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
inner join t_employee_info b on a.EMP_ID = b.id inner join t_employee_info b on a.EMP_ID = b.id
inner join t_settle_domain c on a.DEPT_NO = c.DEPART_NO inner join t_settle_domain c on a.DEPT_NO = c.DEPART_NO
<where> <where>
a.delete_flag = '0' and a.IS_COMPLETE = '1' a.delete_flag = '0' and a.IS_COMPLETE = '1' and a.project_status = 0
<include refid="employeeRegistrationPre_where"/> <include refid="employeeRegistrationPre_where"/>
</where> </where>
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
......
...@@ -580,6 +580,11 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -580,6 +580,11 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
insurancePreVo.setProcessStatus(CommonConstants.ZERO_STRING); insurancePreVo.setProcessStatus(CommonConstants.ZERO_STRING);
} }
} }
//特殊场景如果针对新增,如果入职日期大于等于预计生效时间 那预计生效和保单开始时间就取入职日期
if (insurancePreVo.getBuyType() == 1 && DateUtil.dateToString(registration.getJoinLeaveDate()).compareTo(DateUtil.dateToString(insurancePreVo.getExpectedCollectionTime()))>0) {
insurancePreVo.setPolicyStart(registration.getJoinLeaveDate());
insurancePreVo.setExpectedCollectionTime(registration.getJoinLeaveDate());
}
} }
if (!errorList.isEmpty()) { if (!errorList.isEmpty()) {
return R.other(CommonConstants.TWO_INT,null,errorList); return R.other(CommonConstants.TWO_INT,null,errorList);
...@@ -680,6 +685,11 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -680,6 +685,11 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
insurancePreVo.setPolicyEffect(registration.getJoinLeaveDate()); insurancePreVo.setPolicyEffect(registration.getJoinLeaveDate());
insurancePreVo.setPolicyStart(registration.getJoinLeaveDate()); insurancePreVo.setPolicyStart(registration.getJoinLeaveDate());
} }
//特殊场景如果针对新增,如果入职日期大于等于预计生效时间 那预计生效和保单开始时间就取入职日期
if (insurancePreVo.getBuyType() == 1 && DateUtil.dateToString(registration.getJoinLeaveDate()).compareTo(DateUtil.dateToString(insurancePreVo.getExpectedCollectionTime()))>0) {
insurancePreVo.setPolicyStart(registration.getJoinLeaveDate());
insurancePreVo.setExpectedCollectionTime(registration.getJoinLeaveDate());
}
//入职日期需要小于保单截止日期 //入职日期需要小于保单截止日期
if ((DateUtil.dateToString(registration.getJoinLeaveDate(),DateUtil.ISO_EXPANDED_DATE_FORMAT). if ((DateUtil.dateToString(registration.getJoinLeaveDate(),DateUtil.ISO_EXPANDED_DATE_FORMAT).
compareTo(DateUtil.dateToString(insurancePreVo.getPolicyEnd(),DateUtil.ISO_EXPANDED_DATE_FORMAT)) > 0) compareTo(DateUtil.dateToString(insurancePreVo.getPolicyEnd(),DateUtil.ISO_EXPANDED_DATE_FORMAT)) > 0)
......
...@@ -309,6 +309,9 @@ public class THolidayInfoServiceImpl extends ServiceImpl<THolidayInfoMapper, THo ...@@ -309,6 +309,9 @@ public class THolidayInfoServiceImpl extends ServiceImpl<THolidayInfoMapper, THo
for (THolidayInfo h:holidayInfos){ for (THolidayInfo h:holidayInfos){
holidayMap.put(h.getDate(),h.getDay()); holidayMap.put(h.getDate(),h.getDay());
} }
} else {
vo.setPriDisDate(vo.getPriDisDate());
return vo;
} }
//查找入职日期的前一个工作日 //查找入职日期的前一个工作日
TEmployeeInsuranceWorkDayVo newVo = new TEmployeeInsuranceWorkDayVo(); TEmployeeInsuranceWorkDayVo newVo = new TEmployeeInsuranceWorkDayVo();
...@@ -326,7 +329,7 @@ public class THolidayInfoServiceImpl extends ServiceImpl<THolidayInfoMapper, THo ...@@ -326,7 +329,7 @@ public class THolidayInfoServiceImpl extends ServiceImpl<THolidayInfoMapper, THo
if (givenLocalDate.isBefore(today) || givenLocalDate.isEqual(today)) { if (givenLocalDate.isBefore(today) || givenLocalDate.isEqual(today)) {
// 如果日期前一个工作日日期小于等于今天 // 如果日期前一个工作日日期小于等于今天
if (currentTime.isBefore(LocalTime.of(15, 20)) || currentTime.equals(LocalTime.of(15, 20))) { if (currentTime.isBefore(LocalTime.of(15, 30)) || currentTime.equals(LocalTime.of(15, 30))) {
// 如果当前时间在15:20之前 // 如果当前时间在15:20之前
vo.setPriDisDate(LocalDateTimeUtils.convertLDToDate(today)); vo.setPriDisDate(LocalDateTimeUtils.convertLDToDate(today));
vo.setRegistDate(DateUtil.addDayByDate(vo.getPriDisDate(), CommonConstants.ONE_INT)); vo.setRegistDate(DateUtil.addDayByDate(vo.getPriDisDate(), CommonConstants.ONE_INT));
......
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