Commit 07e1b0b6 authored by hongguangwu's avatar hongguangwu

MVP1.5.4-派单委托备注(合同起缴日期等)

parent ba8fa7bd
...@@ -2249,9 +2249,29 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2249,9 +2249,29 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return true; return true;
} }
// 档案无合同 合同起日期、合同类型必填 // 档案无合同 合同起日期、合同类型必填
if (Common.isEmpty(empVo.getContractName()) && validContractInfo(errorMessageList,excel)){ if (Common.isEmpty(empVo.getContractName()) && validContractInfo(errorMessageList,excel)) {
return true; return true;
} }
if (Common.isNotNull(empVo.getContractStart())) {
// 系统已存在的合同起缴日期
String conYearMonthDay = DateUtil.formatDatePatten(empVo.getContractStart(),DateUtil.ISO_EXPANDED_DATE_FORMAT);
String excelConYearMonthDay = DateUtil.formatDatePatten(excel.getContractStart(),DateUtil.ISO_EXPANDED_DATE_FORMAT);
if (!conYearMonthDay.equals(excelConYearMonthDay)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "系统内[合同]起缴日期年月日【"
+ conYearMonthDay + "】与派单[合同]日期的年月日【" + excelConYearMonthDay + "】不一致!禁止派单!"));
return true;
}
String conYearMonth = DateUtil.formatDatePatten(empVo.getContractStart(),DateUtil.DATETIME_YYYYMM);
if (Common.isEmpty(excel.getTrustRemark())) {
if (judgeConStartAndSocialFund(errorMessageList, excel, conYearMonth, excel.getPensionStart(), "养老")) { return true;}
if (judgeConStartAndSocialFund(errorMessageList, excel, conYearMonth, excel.getMedicalStart(), "医疗")) { return true;}
if (judgeConStartAndSocialFund(errorMessageList, excel, conYearMonth, excel.getUnemployStart(), "失业")) { return true;}
if (judgeConStartAndSocialFund(errorMessageList, excel, conYearMonth, excel.getWorkInjuryStart(), "工伤")) { return true;}
if (judgeConStartAndSocialFund(errorMessageList, excel, conYearMonth, excel.getBirthStart(), "生育")) { return true;}
if (judgeConStartAndSocialFund(errorMessageList, excel, conYearMonth, excel.getBigailmentStart(), "大病")) { return true;}
if (judgeConStartAndSocialFund(errorMessageList, excel, conYearMonth, excel.getProvidentStart(), "公积金")) { return true;}
}
}
if (Common.isNotNull(empVo.getEmpNatrue())){ if (Common.isNotNull(empVo.getEmpNatrue())){
excel.setEmpType(empVo.getEmpNatrue()); excel.setEmpType(empVo.getEmpNatrue());
} }
...@@ -2422,6 +2442,29 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2422,6 +2442,29 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return false; return false;
} }
/**
* @param errorMessageList
* @param excel
* @param conYearMonth
* @param startDate
* @Description: 判断合同日期与社保公积金日期是否一致
* @Author: hgw
* @Date: 2023/5/22 17:06
* @return: boolean
**/
private boolean judgeConStartAndSocialFund(List<ErrorMessage> errorMessageList, TDispatchImportVo excel
, String conYearMonth, Date startDate, String message) {
if (Common.isNotNull(startDate)) {
String startD = DateUtil.formatDatePatten(startDate, DateUtil.DATETIME_YYYYMM);
if (!conYearMonth.equals(startD) ) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "系统内[合同]起缴日期年月【"
+ conYearMonth + "】与派单[" + message + "]日期的年月【" + startD + "】不一致!委托备注必填!"));
return true;
}
}
return false;
}
private boolean checkMobileAndIdcard(List<ErrorMessage> errorMessageList, TDispatchImportVo excel) { private boolean checkMobileAndIdcard(List<ErrorMessage> errorMessageList, TDispatchImportVo excel) {
// 如果没有人员档案和项目档案的时候校验身份证和手机号码 // 如果没有人员档案和项目档案的时候校验身份证和手机号码
R<Boolean> checkRes = checkDaprUtil.checkIdCardAndMobile(null,null, excel.getEmpMobile()); R<Boolean> checkRes = checkDaprUtil.checkIdCardAndMobile(null,null, excel.getEmpMobile());
......
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