Commit 316f1f1a authored by hongguangwu's avatar hongguangwu

MVP1.7.9-日志优化

parent ec3929eb
......@@ -132,6 +132,13 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
WriteNullStringAsEmpty, WriteDateUseDateFormat
};
private static final List<String> IGNORE_FIELD = new ArrayList<>();
static {
IGNORE_FIELD.add("joinLeaveDate");
IGNORE_FIELD.add("createTime");
IGNORE_FIELD.add("modelType");
}
@Override
public void saveModifyAndUpdateInsurance(String empPreId, EmployeeRegistrationPre oldInfo
, EmployeeRegistrationPre newInfo, YifuUser user, Map<String, TEmployeeInsurancePre> oldMap) {
......@@ -168,9 +175,6 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
TEmployeeInsurancePre oldInsurance;
String differenceInsuranceKey;
TEmployeePreLogDetail detailInsuranceLog;
List<String> ignoreField = new ArrayList<>();
ignoreField.add("joinLeaveDate");
ignoreField.add("createTime");
for (TEmployeeInsurancePre newInsurance : newList) {
differenceInsuranceKey = null;
if (Common.isNotNull(newInsurance.getModelType())) {
......@@ -190,8 +194,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
if (Common.isNotNull(newInsurance.getId())) {
oldInsurance = oldMap.get(newInsurance.getId());
if (oldInsurance != null) {
initDateHour(oldInsurance);
differenceInsuranceKey = HrEquator.comparisonValueIgnoreField(oldInsurance, newInsurance, ignoreField);
differenceInsuranceKey = HrEquator.comparisonValueIgnoreField(oldInsurance, newInsurance, IGNORE_FIELD);
}
if (Common.isNotNull(differenceInsuranceKey) || oldInsurance == null) {
detailInsuranceLog = new TEmployeePreLogDetail();
......@@ -265,29 +268,6 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
}
}
/**
* @Description: 设置日期为08点
* @Author: hgw
* @Date: 2025/4/14 18:52
* @return: void
**/
public void initDateHour(TEmployeeInsurancePre oldInsurance) {
if (oldInsurance != null) {
oldInsurance.setModelType(CommonConstants.TWO_STRING);
if (Common.isNotNull(oldInsurance.getPolicyStart())) {
oldInsurance.setPolicyStart(DateUtil.setHourByDate(oldInsurance.getPolicyStart()));
}
if (Common.isNotNull(oldInsurance.getPolicyEnd())) {
oldInsurance.setPolicyEnd(DateUtil.setHourByDate(oldInsurance.getPolicyEnd()));
}
if (Common.isNotNull(oldInsurance.getPolicyEffect())) {
oldInsurance.setPolicyEffect(DateUtil.setHourByDate(oldInsurance.getPolicyEffect()));
}
if (Common.isNotNull(oldInsurance.getJoinLeaveDate())) {
oldInsurance.setJoinLeaveDate(DateUtil.setHourByDate(oldInsurance.getJoinLeaveDate()));
}
}
}
@Override
public void saveUpdateInsurance(String empPreId, EmployeeRegistrationPre oldInfo
, EmployeeRegistrationPre newInfo, String userId, String nickName, Map<String, TEmployeeInsurancePre> oldMap) {
......
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