Commit 32224a77 authored by chenyuxi's avatar chenyuxi

feat: 批量更新档案代码调整

parent 64950969
......@@ -158,7 +158,7 @@ public class PreUploadEmpImportTwoVo implements Serializable {
@ExcelAttribute(name = "是否有职业资格证书", isDataId = true, readConverterExp = "0=是,1=否")
private String haveQualification;
// 1.9.7: 职业资格信息
@ExcelAttribute(name = "申报年度", isDate = true, dateFormat = "yyyy", maxLength = 32)
@ExcelAttribute(name = "申报年度", isDate = true, dateFormat = "yyyy", maxLength = 6)
private String declareYear;
@ExcelAttribute(name = "职业资格名称", isDataId = true, dataType = ExcelAttributeConstants.QUALIFICATION_TYPE, maxLength = 32)
private String qualificationType;
......@@ -246,25 +246,23 @@ public class PreUploadEmpImportTwoVo implements Serializable {
@ExcelAttribute(name = "结束工作日期-值")
private LocalDateTime endDateValue;
@ExcelAttribute(name = "与本人关系")
@ExcelAttribute(name = "与本人关系-值")
private String relationshipSelfValue;
@ExcelAttribute(name = "申报年度")
private String declareYearValue;
@ExcelAttribute(name = "职业资格名称")
@ExcelAttribute(name = "职业资格名称-值")
private String qualificationTypeValue;
@ExcelAttribute(name = "是否曾被认定为工伤")
@ExcelAttribute(name = "是否曾被认定为工伤-值")
private String injuryIdentificationValue;
@ExcelAttribute(name = "是否有职业病")
@ExcelAttribute(name = "是否有职业病-值")
private String occupationalDiseaseFlagValue;
@ExcelAttribute(name = "是否有传染性疾病")
@ExcelAttribute(name = "是否有传染性疾病-值")
private String infectiousDiseaseFlagValue;
@ExcelAttribute(name = "是否被劳动能力鉴定委员会鉴定为具有伤残等级")
@ExcelAttribute(name = "是否被劳动能力鉴定委员会鉴定为具有伤残等级-值")
private String disabilityFlagValue;
@ExcelAttribute(name = "伤残等级")
@ExcelAttribute(name = "伤残等级-值")
private String disabilityLevelValue;
@ExcelAttribute(name = "是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种")
@ExcelAttribute(name = "是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种-值")
private String otherFlagValue;
// 字典值结束
......
......@@ -3450,6 +3450,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if ("bankName".equals(shuName) && bankMap.get(shuValue) == null) {
errorFormat.append(attr.name()).append("_不符合财务要求,请查薪资配置;");
}
// 1.9.7 : 校验年份不可为未来年份
if ("declareYear".equals(shuName) && Common.isNotNull(shuValue)){
shuValue = shuValue.replaceAll("\\..*", "");
if(shuValue.length() == 4 && (Integer.parseInt(shuValue) > DateUtil.getYearOfInt(new Date()))){
errorFormat.append(attr.name()).append("_不可为未来年份;");
}
}
fieldType = field.getType();
if (Common.isNotNull(fieldType)) {
DiyExcelImportUtil.setFields(field, shuValue, fieldType, detail);
......@@ -3524,6 +3532,11 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if (Common.isNotNull(detail.getTel())) {
mobileList.add(detail.getTel());
}
// 1.9.7 手机号真实性校验加 :手机号码(家庭成员)
if (Common.isNotNull(detail.getContractTel())) {
mobileList.add(detail.getContractTel());
}
// 1.9.7 新增必填校验
// 1.9.7 工作经历必填校验
if ("否".equals(detail.getIsFirstWork())) {
......@@ -3540,7 +3553,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
// 1.9.7 职业资格信息必填校验
if ("是".equals(detail.getHaveQualification())) {
if(Common.isEmpty(detail.getDeclareYear())|| Common.isEmpty(detail.getQualificationType())){
if(Common.isEmpty(detail.getDeclareYear()) || Common.isEmpty(detail.getQualificationType())){
errorMust.append("是否有职业资格证书为【是】时,申报年度、职业资格名称同时必填!");
}
}
......@@ -3678,6 +3691,17 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
errorCheck.append("手机号码(紧急联系人)").append("未校验;");
}
}
// 1.9.7: 手机号码(家庭成员)校验
if (Common.isNotNull(info.getContractTel())) {
resultB = phoneMap.get(info.getContractTel());
if (resultB != null) {
if (Boolean.FALSE.equals(resultB)) {
errorCheck.append("手机号码(家庭成员)").append("校验不通过;");
}
} else {
errorCheck.append("手机号码(家庭成员)").append("未校验;");
}
}
if (errorCheck.length() > 0) {
info.setErrorInfo(info.getErrorInfo() + "校验未通过:" + errorCheck);
allTrue = false;
......@@ -3954,6 +3978,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
workRecord.setCreateName(user.getNickname());
workRecord.setCreateTime(LocalDateTime.now());
workRecord.setWorkingStatus(CommonConstants.ONE_STRING);
workRecord.setDeleteFlag(CommonConstants.NOT_DELETE_FLAG);
workRecordList.add(workRecord);
}
......@@ -3982,9 +4007,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
qualificationRecord.setEmpId(saveEmp.getId());
qualificationRecord.setEmpCode(saveEmp.getEmpCode());
qualificationRecord.setEmpIdcard(saveEmp.getEmpIdcard());
qualificationRecord.setDeclareYear(excel.getDeclareYearValue());
qualificationRecord.setDeclareYear(excel.getDeclareYear());
qualificationRecord.setQualificationType(excel.getQualificationTypeValue());
qualificationRecord.setDeleteFlag(CommonConstants.NOT_DELETE_FLAG);
qualificationRecord.setCreateBy(user.getId());
qualificationRecord.setCreateName(user.getNickname());
qualificationRecord.setCreateTime(LocalDateTime.now());
......@@ -4021,6 +4046,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
disabilityRecord.setCreateBy(user.getId());
disabilityRecord.setCreateName(user.getNickname());
disabilityRecord.setCreateTime(LocalDateTime.now());
disabilityRecord.setDeleteFlag(CommonConstants.NOT_DELETE_FLAG);
disabilityRecordList.add(disabilityRecord);
}
......
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