Commit 1a7834e8 authored by fangxinjiang's avatar fangxinjiang

基础档案新增字段及必填调整

parent 5ec33286
...@@ -51,7 +51,7 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable { ...@@ -51,7 +51,7 @@ public class EmpCertificateExcelVO extends RowIndex implements Serializable {
/** /**
* 资格等级 * 资格等级
*/ */
@ExcelAttribute(name = "资格等级",isNotEmpty = true,errorInfo = "资格等级不可为空",isDataId = true, dataType = ExcelAttributeConstants.QUALIFICATION_LEVEL) @ExcelAttribute(name = "资格等级",isNotEmpty = false,errorInfo = "资格等级不可为空",isDataId = true, dataType = ExcelAttributeConstants.QUALIFICATION_LEVEL)
@NotNull(message = "资格等级不可为空") @NotNull(message = "资格等级不可为空")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="资格等级") @ExcelProperty(value ="资格等级")
......
...@@ -102,6 +102,9 @@ public class TEmpDisabilityInfoController { ...@@ -102,6 +102,9 @@ public class TEmpDisabilityInfoController {
public R<Boolean> save(@RequestBody TEmpDisabilityInfo tEmpDisabilityInfo) { public R<Boolean> save(@RequestBody TEmpDisabilityInfo tEmpDisabilityInfo) {
R<Boolean> failed = getCheckRes(tEmpDisabilityInfo); R<Boolean> failed = getCheckRes(tEmpDisabilityInfo);
if (failed != null) return failed; if (failed != null) return failed;
if (CommonConstants.ZERO_STRING.equals(tEmpDisabilityInfo.getOtherFlag())){
tEmpDisabilityInfo.setRemark("曾经或正在追究与承担过刑事责任");
}
return tEmpDisabilityInfoService.saveDiy(tEmpDisabilityInfo); return tEmpDisabilityInfoService.saveDiy(tEmpDisabilityInfo);
} }
...@@ -122,6 +125,9 @@ public class TEmpDisabilityInfoController { ...@@ -122,6 +125,9 @@ public class TEmpDisabilityInfoController {
return R.failed("伤残等级不可为空!"); return R.failed("伤残等级不可为空!");
} }
} }
if (Common.isEmpty(tEmpDisabilityInfo.getOtherFlag())){
return R.failed("是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种 不可为空!");
}
return null; return null;
} }
...@@ -137,6 +143,9 @@ public class TEmpDisabilityInfoController { ...@@ -137,6 +143,9 @@ public class TEmpDisabilityInfoController {
public R<Boolean> updateById(@RequestBody TEmpDisabilityInfo tEmpDisabilityInfo) { public R<Boolean> updateById(@RequestBody TEmpDisabilityInfo tEmpDisabilityInfo) {
R<Boolean> failed = getCheckRes(tEmpDisabilityInfo); R<Boolean> failed = getCheckRes(tEmpDisabilityInfo);
if (failed != null) return failed; if (failed != null) return failed;
if (CommonConstants.ZERO_STRING.equals(tEmpDisabilityInfo.getOtherFlag())){
tEmpDisabilityInfo.setRemark("曾经或正在追究与承担过刑事责任");
}
return tEmpDisabilityInfoService.updateByIdDiy(tEmpDisabilityInfo); return tEmpDisabilityInfoService.updateByIdDiy(tEmpDisabilityInfo);
} }
......
...@@ -126,6 +126,13 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf ...@@ -126,6 +126,13 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf
continue; continue;
} }
} }
if (Common.isEmpty(excel.getOtherFlag())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),"是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种 不可为空!"));
continue;
}
if (CommonConstants.ZERO_STRING.equals(excel.getOtherFlag())){
excel.setRemark("曾经或正在追究与承担过刑事责任");
}
// 数据合法情况 // 数据合法情况
insertExcel(excel,emp); insertExcel(excel,emp);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS));
......
...@@ -159,8 +159,10 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr ...@@ -159,8 +159,10 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
} }
if (Common.isNotNull(list)){ if (Common.isNotNull(list)){
// 检查添加是否已经存在 // 检查添加是否已经存在
boolean match = list.stream().anyMatch(info -> excel.getQualificationLevel() boolean match = list.stream().anyMatch(info ->
.equals(info.getQualificationLevel()) ((Common.isEmpty(excel.getQualificationLevel()) && Common.isNotNull(info.getQualificationLevel()))
|| (Common.isNotNull(excel.getQualificationLevel())
&& excel.getQualificationLevel().equals(info.getQualificationLevel())))
&& excel.getEmpIdcard().equals(info.getEmpIdcard()) && excel.getEmpIdcard().equals(info.getEmpIdcard())
&& excel.getQualificationType().equals(info.getQualificationType())); && excel.getQualificationType().equals(info.getQualificationType()));
......
...@@ -101,6 +101,10 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM ...@@ -101,6 +101,10 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_WORK_RECORD_EXISTING))); errorMessageList.add(new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_WORK_RECORD_EXISTING)));
continue; continue;
} }
if (Common.isEmpty(excel.getEndDate())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.EMP_WORKING_RECODE_END_DATE_NOT_EMPTY)));
continue;
}
// 数据合法情况 // 数据合法情况
insertExcel(excel,emp); insertExcel(excel,emp);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS));
...@@ -119,6 +123,9 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM ...@@ -119,6 +123,9 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
@Override @Override
public R<Boolean> saveDiy(TEmpWorkRecording recording) { public R<Boolean> saveDiy(TEmpWorkRecording recording) {
if (CommonConstants.ONE_STRING.equals(recording.getFirstWorkFlag()) && Common.isEmpty(recording.getEndDate())){
return R.failed("结束日期必填");
}
recording.setDeleteFlag(CommonConstants.ZERO_STRING); recording.setDeleteFlag(CommonConstants.ZERO_STRING);
String res = checkRepeat(recording); String res = checkRepeat(recording);
if (Common.isEmpty(res)){ if (Common.isEmpty(res)){
......
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