Commit d980b0dd authored by fangxinjiang's avatar fangxinjiang

入职确认接收日志优化-fxj

parent 5aedee18
......@@ -645,7 +645,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
if (Common.isEmpty(isSocailBuyOld) || (Common.isNotNull(isSocailBuyOld) && !isSocailBuyOld.equals(isSocailBuyNew))) {
differenceSocialKey = "socialIsBuy";
TEmployeePreLogDetail detailSocialLog = new TEmployeePreLogDetail();
detailSocialLog.setModelType(CommonConstants.ONE_STRING);
detailSocialLog.setModelType(CommonConstants.TWO_STRING);
detailSocialLog.setType(CommonConstants.FOUR_STRING);
Map<String,Object> old = new HashMap<>();
old.put("socialIsBuy", isSocailBuyOld);
......@@ -683,7 +683,9 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
this.setLogBaseInfo(empPreId, old, simNew, user, differenceSocialKey, logId, detailSocialLog);
detailList.add(detailSocialLog);
if (Common.isNotNull(diffTitle)) {
if (!diffTitle.contains("社保信息")){
diffTitle += "、社保信息";
}
} else {
diffTitle = "社保信息";
}
......@@ -702,12 +704,14 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
, logId, detailEmpLog);
detailList.add(detailEmpLog);
if (Common.isNotNull(diffTitle)) {
if (!diffTitle.contains("社保信息")){
diffTitle += "、社保信息";
}
} else {
diffTitle = "社保信息";
}
}
//修改
//修改--是否已购买为否到否的修改
} else if (newInfo.getServerItem().contains("社保")&& null != newInfo.getSocialUpdateFlag()
&& newInfo.getSocialUpdateFlag() && dispatchInfoPreOldVo != null && dispatchInfoPreVo != null) {
//为了加状态日志
......@@ -716,7 +720,9 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
, dispatchInfoPreVo, SOCIAL_IGNORE_FIELD_TWO);
if (differenceSocialKey.length() > 0) {
if (Common.isNotNull(diffTitle)) {
if (!diffTitle.contains("社保信息")){
diffTitle += "、社保信息";
}
} else {
diffTitle = "社保信息";
}
......@@ -727,6 +733,23 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
differenceSocialKey, logId, detailEmpLog);
detailList.add(detailEmpLog);
}
//修改--是否已购买为是转否的修改
} else if (oldInfo.getServerItem().contains("社保")
&& newInfo.getServerItem().contains("社保")
&& null != newInfo.getSocialUpdateFlag()
&& newInfo.getSocialUpdateFlag() && dispatchInfoPreOldVo == null && dispatchInfoPreVo != null) {
if (Common.isNotNull(diffTitle)) {
if (!diffTitle.contains("社保信息")){
diffTitle += "、社保信息";
}
} else {
diffTitle = "社保信息";
}
detailEmpLog = new TEmployeePreLogDetail();
detailEmpLog.setModelType(CommonConstants.ONE_STRING);
detailEmpLog.setType(CommonConstants.FOUR_STRING);
this.setLogBaseInfo(empPreId, null, dispatchInfoPreVo, user, null, logId, detailEmpLog);
detailList.add(detailEmpLog);
}
// 公积金处理逻辑
......@@ -746,7 +769,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
if (Common.isEmpty(isFundBuyOld) || (Common.isNotNull(isFundBuyOld) && !isFundBuyOld.equals(isFundBuyNew))) {
differenceFundKey = "fundIsBuy";
TEmployeePreLogDetail detailFundLog = new TEmployeePreLogDetail();
detailFundLog.setModelType(CommonConstants.ONE_STRING);
detailFundLog.setModelType(CommonConstants.TWO_STRING);
detailFundLog.setType(CommonConstants.FIVE_STRING);
Map<String,Object> old = new HashMap<>();
old.put("fundIsBuy", isFundBuyOld);
......@@ -784,7 +807,9 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
this.setLogBaseInfo(empPreId, old, simNew, user, differenceFundKey, logId, detailFundLog);
detailList.add(detailFundLog);
if (Common.isNotNull(diffTitle)) {
if (!diffTitle.contains("公积金信息")){
diffTitle += "、公积金信息";
}
} else {
diffTitle = "公积金信息";
}
......@@ -803,7 +828,9 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
, logId, detailEmpLog);
detailList.add(detailEmpLog);
if (Common.isNotNull(diffTitle)) {
if (!diffTitle.contains("公积金信息")){
diffTitle += "、公积金信息";
}
} else {
diffTitle = "公积金信息";
}
......@@ -819,7 +846,9 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
, dispatchInfoFundPreVo, SOCIAL_IGNORE_FIELD_TWO);
if (differenceFundKey.length() > 0) {
if (Common.isNotNull(diffTitle)) {
if (!diffTitle.contains("公积金信息")){
diffTitle += "、公积金信息";
}
} else {
diffTitle = "公积金信息";
}
......@@ -830,6 +859,24 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
differenceFundKey, logId, detailEmpLog);
detailList.add(detailEmpLog);
}
//修改:是否已购买由是变为否
} else if (oldInfo.getServerItem().contains("公积金")
&& newInfo.getServerItem().contains("公积金")
&& null != newInfo.getFundUpdateFlag()
&& newInfo.getFundUpdateFlag() && dispatchInfoFundPreOldVo == null
&& dispatchInfoFundPreVo != null) {
if (Common.isNotNull(diffTitle)) {
if (!diffTitle.contains("公积金信息")){
diffTitle += "、公积金信息";
}
} else {
diffTitle = "公积金信息";
}
detailEmpLog = new TEmployeePreLogDetail();
detailEmpLog.setModelType(CommonConstants.ONE_STRING);
detailEmpLog.setType(CommonConstants.FIVE_STRING);
this.setLogBaseInfo(empPreId, null, dispatchInfoFundPreVo, user, null, logId, detailEmpLog);
detailList.add(detailEmpLog);
}
// 有修改,则加日志
......
......@@ -76,6 +76,7 @@ import java.time.ZoneId;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import static java.util.regex.Pattern.compile;
......@@ -2956,7 +2957,11 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR, e);
return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR);
}
return R.ok(errorMessageList);
// 方式1:使用 stream sorted
List<ErrorMessage> sortedErrorList = errorMessageList.stream()
.sorted(Comparator.comparing(ErrorMessage::getLineNum))
.collect(Collectors.toList());
return R.ok(sortedErrorList);
}
private void importEmployeeRegistrationNew(List<EmployeeRegistrationNewVo> excelVOList,
......
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