Commit a0f5cf38 authored by fangxinjiang's avatar fangxinjiang

区域调整

parent ac5ee37d
......@@ -73,9 +73,12 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf
@Override
public void importTmpDisability(List<EmpDisabilityExcelVO> excelVOList, List<ErrorMessage> errorMessageList) {
// 个性化校验逻辑
List<TEmpDisabilityInfo> list = this.list(Wrappers.<TEmpDisabilityInfo>query().lambda()
.in(TEmpDisabilityInfo::getEmpIdcard,excelVOList.stream().map(EmpDisabilityExcelVO::getEmpIdcard).collect(Collectors.toList()))
.eq(TEmpDisabilityInfo::getDeleteFlag,CommonConstants.ZERO_STRING));
List<TEmpDisabilityInfo> list = null;
if (Common.isNotNull(excelVOList)){
this.list(Wrappers.<TEmpDisabilityInfo>query().lambda()
.in(TEmpDisabilityInfo::getEmpIdcard,excelVOList.stream().map(EmpDisabilityExcelVO::getEmpIdcard).collect(Collectors.toList()))
.eq(TEmpDisabilityInfo::getDeleteFlag,CommonConstants.ZERO_STRING));
}
TEmployeeInfo emp;
TEmpDisabilityInfo exist;
ErrorMessage errorMsg;
......@@ -114,12 +117,14 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf
if (CommonConstants.ONE_STRING.equals(Integer.toString(emp.getFileStatus()))){
return new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_REDUCED));
}
// 检查添加是否已经存在
boolean match = list.stream().anyMatch(info -> excel.getDisabilityName().equals(info.getDisabilityName())
&& excel.getEmpIdcard().equals(info.getEmpIdcard()));
if (Common.isNotNull(list)){
// 检查添加是否已经存在
boolean match = list.stream().anyMatch(info -> excel.getDisabilityName().equals(info.getDisabilityName())
&& excel.getEmpIdcard().equals(info.getEmpIdcard()));
if (match) {
return new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_DISABILITY_NAME_EXISTING));
if (match) {
return new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_DISABILITY_NAME_EXISTING));
}
}
return null;
}
......
......@@ -76,9 +76,12 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
@Override
public void importEmpEducation(List<EmpEducationExcelVO> excelVOList, List<ErrorMessage> errorMessageList) {
/// 个性化校验逻辑
List<TEmpEducation> list = this.list(Wrappers.<TEmpEducation>query().lambda()
.in(TEmpEducation::getEmpIdcard,excelVOList.stream().map(EmpEducationExcelVO::getEmpIdcard).collect(Collectors.toList()))
.eq(TEmpEducation::getDeleteFlag,CommonConstants.ZERO_STRING));
List<TEmpEducation> list = null;
if (Common.isNotNull(excelVOList)){
this.list(Wrappers.<TEmpEducation>query().lambda()
.in(TEmpEducation::getEmpIdcard,excelVOList.stream().map(EmpEducationExcelVO::getEmpIdcard).collect(Collectors.toList()))
.eq(TEmpEducation::getDeleteFlag,CommonConstants.ZERO_STRING));
}
TEmployeeInfo emp;
TEmpEducation exist;
ErrorMessage errorMsg;
......@@ -218,12 +221,14 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
&& CommonConstants.ONE_STRING.equals(Integer.toString(emp.getFileStatus()))){
return new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_REDUCED));
}
// 检查添加是否已经存在
boolean match = list.stream().anyMatch(info -> excel.getEducationName().equals(info.getEducationName())
&& excel.getEmpIdcard().equals(info.getEmpIdcard()));
if (Common.isNotNull(list)){
// 检查添加是否已经存在
boolean match = list.stream().anyMatch(info -> excel.getEducationName().equals(info.getEducationName())
&& excel.getEmpIdcard().equals(info.getEmpIdcard()));
if (match) {
return new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_EDUCATION_EXISTING));
if (match) {
return new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_EDUCATION_EXISTING));
}
}
return null;
}
......
......@@ -75,9 +75,12 @@ public class TEmpFamilyServiceImpl extends ServiceImpl<TEmpFamilyMapper, TEmpFam
@Override
public void importEmpFamily(List<EmpFamilyExcelVO> excelVOList,List<ErrorMessage> errorMessageList) {
// 个性化校验逻辑
List<TEmpFamily> list = this.list(Wrappers.<TEmpFamily>query().lambda()
.in(TEmpFamily::getEmpIdcard,excelVOList.stream().map(EmpFamilyExcelVO::getEmpIdcard).collect(Collectors.toList()))
.eq(TEmpFamily::getDeleteFlag,CommonConstants.ZERO_STRING));
List<TEmpFamily> list = null;
if (Common.isNotNull(excelVOList)){
this.list(Wrappers.<TEmpFamily>query().lambda()
.in(TEmpFamily::getEmpIdcard,excelVOList.stream().map(EmpFamilyExcelVO::getEmpIdcard).collect(Collectors.toList()))
.eq(TEmpFamily::getDeleteFlag,CommonConstants.ZERO_STRING));
}
TEmployeeInfo emp;
TEmpFamily exist;
ErrorMessage errorMsg;
......@@ -118,12 +121,14 @@ public class TEmpFamilyServiceImpl extends ServiceImpl<TEmpFamilyMapper, TEmpFam
return new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_REDUCED));
}
// 检查添加是否已经存在
boolean match = list.stream().anyMatch(info -> excel.getFamilyName().equals(info.getFamilyName())
&& excel.getEmpIdcard().equals(info.getEmpIdcard()));
if (Common.isNotNull(list)){
// 检查添加是否已经存在
boolean match = list.stream().anyMatch(info -> excel.getFamilyName().equals(info.getFamilyName())
&& excel.getEmpIdcard().equals(info.getEmpIdcard()));
if (match) {
return new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_FAMILY_NAME_EXISTING));
if (match) {
return new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_FAMILY_NAME_EXISTING));
}
}
return null;
}
......
......@@ -94,9 +94,12 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
@Override
public void importEmpCertificate(List<EmpCertificateExcelVO> excelVOList, List<ErrorMessage> errorMessageList) {
List<TEmpProfessionalQualification> list = this.list(Wrappers.<TEmpProfessionalQualification>query().lambda()
.in(TEmpProfessionalQualification::getEmpIdcard,excelVOList.stream().map(EmpCertificateExcelVO::getEmpIdcard).collect(Collectors.toList()))
.eq(TEmpProfessionalQualification::getDeleteFlag,CommonConstants.ZERO_STRING));
List<TEmpProfessionalQualification> list = null;
if (Common.isNotNull(excelVOList)){
list = this.list(Wrappers.<TEmpProfessionalQualification>query().lambda()
.in(TEmpProfessionalQualification::getEmpIdcard,excelVOList.stream().map(EmpCertificateExcelVO::getEmpIdcard).collect(Collectors.toList()))
.eq(TEmpProfessionalQualification::getDeleteFlag,CommonConstants.ZERO_STRING));
}
TEmployeeInfo emp;
TEmpProfessionalQualification exist;
ErrorMessage errorMsg;
......@@ -119,6 +122,7 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
continue;
}
excel.setEmpName(emp.getEmpName());
excel.setEmpIdcard(emp.getEmpIdcard());
exist = baseMapper.selectOne(Wrappers.<TEmpProfessionalQualification>query().lambda()
.eq(TEmpProfessionalQualification::getEmpIdcard,excel.getEmpIdcard())
.eq(TEmpProfessionalQualification::getQualificationLevel,excel.getQualificationLevel())
......@@ -152,14 +156,16 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
if (CommonConstants.ONE_STRING.equals(Integer.toString(emp.getFileStatus()))){
return new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_REDUCED));
}
// 检查添加是否已经存在
boolean match = list.stream().anyMatch(info -> excel.getQualificationLevel()
.equals(info.getQualificationLevel())
&& excel.getEmpIdcard().equals(info.getEmpIdcard())
&& excel.getQualificationType().equals(info.getQualificationType()));
if (Common.isNotNull(list)){
// 检查添加是否已经存在
boolean match = list.stream().anyMatch(info -> excel.getQualificationLevel()
.equals(info.getQualificationLevel())
&& excel.getEmpIdcard().equals(info.getEmpIdcard())
&& excel.getQualificationType().equals(info.getQualificationType()));
if (match) {
return new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_CERTIFICATE_NAME_EXISTING));
if (match) {
return new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_CERTIFICATE_NAME_EXISTING));
}
}
return null;
}
......
......@@ -68,9 +68,12 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
@Override
public void importEmpWorkRecord(List<EmpWorkRecordExcelVO> excelVOList, List<ErrorMessage> errorMessageList) {
// 个性化校验逻辑
List<TEmpWorkRecording> list = this.list(Wrappers.<TEmpWorkRecording>query().lambda()
.in(TEmpWorkRecording::getEmpIdcard,excelVOList.stream().map(EmpWorkRecordExcelVO::getEmpIdcard).collect(Collectors.toList()))
.eq(TEmpWorkRecording::getDeleteFlag,CommonConstants.ZERO_STRING));
List<TEmpWorkRecording> list =null;
if (Common.isNotNull(excelVOList)){
this.list(Wrappers.<TEmpWorkRecording>query().lambda()
.in(TEmpWorkRecording::getEmpIdcard,excelVOList.stream().map(EmpWorkRecordExcelVO::getEmpIdcard).collect(Collectors.toList()))
.eq(TEmpWorkRecording::getDeleteFlag,CommonConstants.ZERO_STRING));
}
TEmployeeInfo emp;
TEmpWorkRecording exist;
ErrorMessage errorMsg;
......@@ -155,13 +158,15 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
if (CommonConstants.ONE_STRING.equals(Integer.toString(emp.getFileStatus()))){
return new com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_REDUCED));
}
// 检查添加是否已经存在
boolean match = list.stream().anyMatch(info -> excel.getWorkDepart().equals(info.getWorkDepart())
&& excel.getWorkUnit().equals(info.getWorkUnit())
&& excel.getEmpIdcard().equals(info.getEmpIdcard()));
if (Common.isNotNull(list)){
// 检查添加是否已经存在
boolean match = list.stream().anyMatch(info -> excel.getWorkDepart().equals(info.getWorkDepart())
&& excel.getWorkUnit().equals(info.getWorkUnit())
&& excel.getEmpIdcard().equals(info.getEmpIdcard()));
if (match) {
return new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_WORK_RECORD_EXISTING));
if (match) {
return new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_WORK_RECORD_EXISTING));
}
}
return null;
}
......
......@@ -53,7 +53,7 @@ public class GlobalExceptionHandler {
* @ExceptionHandler:当这个Controller中任何一个方法发生异常,一定会被这个方法拦截到
*/
@ExceptionHandler(Exception.class)
//@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
@ResponseBody
public R exception(Exception e) {
errorLog( e );
......
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