Commit 8a53f881 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.7.22' into MVP1.7.22

parents 9f66f033 935ce133
...@@ -114,6 +114,9 @@ public class EmployeeRegistrationPre extends BaseEntity { ...@@ -114,6 +114,9 @@ public class EmployeeRegistrationPre extends BaseEntity {
@Schema(description = "公积金是否已参保 0 是 1 否") @Schema(description = "公积金是否已参保 0 是 1 否")
private String fundIsBuy; private String fundIsBuy;
@Schema(description = "是否已签署合同 0 是 1 否")
private String contractIsBuy;
@Schema(description = "档案所在地-县编号") @Schema(description = "档案所在地-县编号")
@TableField(updateStrategy = FieldStrategy.IGNORED) @TableField(updateStrategy = FieldStrategy.IGNORED)
private String townCode; private String townCode;
......
...@@ -134,6 +134,9 @@ public class EmployeeRegistrationPreVo implements Serializable { ...@@ -134,6 +134,9 @@ public class EmployeeRegistrationPreVo implements Serializable {
@Schema(description = "公积金是否已参保 0 是 1 否") @Schema(description = "公积金是否已参保 0 是 1 否")
private String fundIsBuy; private String fundIsBuy;
@Schema(description = "是否已签署合同 0 是 1 否")
private String contractIsBuy;
@Schema(description = "身份证合集") @Schema(description = "身份证合集")
private List<String> idcardList; private List<String> idcardList;
......
...@@ -720,7 +720,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -720,7 +720,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
StringBuilder errorTemp = new StringBuilder(); StringBuilder errorTemp = new StringBuilder();
// 服务事项取消勾选商险时要查询 身份证+项目的在途或在保商险数据并给出提示:"存在办理中/已办理的数据,服务事项必须勾选" // 服务事项取消勾选商险时要查询 身份证+项目的在途或在保商险数据并给出提示:"存在办理中/已办理的数据,服务事项必须勾选"
// 触发条件:原数据含商险,新数据不含商险 // 触发条件:原数据含商险,新数据不含商险
if (Common.isNotNull(comparePre.getServerItem()) && comparePre.getServerItem().contains("商险") /*if (Common.isNotNull(comparePre.getServerItem()) && comparePre.getServerItem().contains("商险")
&& (Common.isEmpty(employeeRegistrationPre.getServerItem()) || !employeeRegistrationPre.getServerItem().contains("商险"))) { && (Common.isEmpty(employeeRegistrationPre.getServerItem()) || !employeeRegistrationPre.getServerItem().contains("商险"))) {
// 查询该身份证+项目是否存在在途或在保的商险数据 // 查询该身份证+项目是否存在在途或在保的商险数据
BaseSearchVO paramVo = new BaseSearchVO(); BaseSearchVO paramVo = new BaseSearchVO();
...@@ -733,7 +733,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -733,7 +733,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
// 存在在途或在保的商险数据,不允许取消勾选 // 存在在途或在保的商险数据,不允许取消勾选
errorTemp.append("存在办理中/已办理的数据,服务事项必须勾选;"); errorTemp.append("存在办理中/已办理的数据,服务事项必须勾选;");
} }
} }*/
// 1:存在商险,判断合规性+日期+五个不同等: // 1:存在商险,判断合规性+日期+五个不同等:
if (Common.isNotNull(employeeRegistrationPre.getServerItem()) && employeeRegistrationPre.getServerItem().contains("商险")) { if (Common.isNotNull(employeeRegistrationPre.getServerItem()) && employeeRegistrationPre.getServerItem().contains("商险")) {
//商险是否购买为是时增加校验 //商险是否购买为是时增加校验
......
...@@ -195,6 +195,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -195,6 +195,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
PRE_IGNORE_FIELD.add("isLeave"); PRE_IGNORE_FIELD.add("isLeave");
PRE_IGNORE_FIELD.add("isRefuse"); PRE_IGNORE_FIELD.add("isRefuse");
PRE_IGNORE_FIELD.add("configId"); PRE_IGNORE_FIELD.add("configId");
PRE_IGNORE_FIELD.add("contractIsBuy");
} }
...@@ -334,6 +335,12 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -334,6 +335,12 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
oldInfo.setExitFundInfoList(newInfo.getExitFundInfoList()); oldInfo.setExitFundInfoList(newInfo.getExitFundInfoList());
oldInfo.setFundIsBuy(newInfo.getFundIsBuy()); oldInfo.setFundIsBuy(newInfo.getFundIsBuy());
//记录合同是否已签署日志
String isContractBuyOld = oldInfo.getContractIsBuy();
String isContractBuyNew = newInfo.getContractIsBuy();
//合同是否已签署list不做比较
oldInfo.setExitContractInfoList(newInfo.getExitContractInfoList());
//比较差异 //比较差异
String differenceKey = HrEquator.comparisonValueIgnoreField(oldInfo, newInfo, PRE_IGNORE_FIELD); String differenceKey = HrEquator.comparisonValueIgnoreField(oldInfo, newInfo, PRE_IGNORE_FIELD);
//如果有差异保存差异 //如果有差异保存差异
...@@ -477,6 +484,27 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -477,6 +484,27 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
String differenceContractKey = null; String differenceContractKey = null;
TEmployeeContractPre employeeContractPre = newInfo.getEmployeeContractPre(); TEmployeeContractPre employeeContractPre = newInfo.getEmployeeContractPre();
// 单独记录合同是否已签署的变更记录
if ((isContractBuyOld == null && isContractBuyNew != null) ||
(isContractBuyOld != null && !isContractBuyOld.equals(isContractBuyNew))) {
differenceContractKey = "contractIsBuy";
TEmployeePreLogDetail detailContractLog = new TEmployeePreLogDetail();
detailContractLog.setModelType(CommonConstants.TWO_STRING);
detailContractLog.setType(CommonConstants.THREE_STRING);
Map<String,Object> old = new HashMap<>();
old.put("contractIsBuy", isContractBuyOld);
Map<String,Object> simNew = new HashMap<>();
simNew.put("contractIsBuy", isContractBuyNew);
this.setLogBaseInfo(empPreId, old, simNew, user, differenceContractKey, logId, detailContractLog);
detailList.add(detailContractLog);
if (Common.isNotNull(diffTitle)) {
diffTitle += "、合同信息";
} else {
diffTitle = "合同信息";
}
}
differenceContractKey ="";
// 新增:如果之前不包含合同,现在包含合同,记录新增日志 // 新增:如果之前不包含合同,现在包含合同,记录新增日志
if (!oldInfo.getServerItem().contains("合同") && newInfo.getServerItem().contains("合同") if (!oldInfo.getServerItem().contains("合同") && newInfo.getServerItem().contains("合同")
&& Common.isNotNull(employeeContractPre) && Common.isNotNull(employeeContractPre)
...@@ -489,7 +517,9 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -489,7 +517,9 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
this.setLogBaseInfo(empPreId, null, employeeContractPre, user, differenceContractKey, logId, detailEmpLog); this.setLogBaseInfo(empPreId, null, employeeContractPre, user, differenceContractKey, logId, detailEmpLog);
detailList.add(detailEmpLog); detailList.add(detailEmpLog);
if (Common.isNotNull(diffTitle)) { if (Common.isNotNull(diffTitle)) {
diffTitle += "、合同信息"; if (!diffTitle.contains("合同信息")){
diffTitle += "、合同信息";
}
} else { } else {
diffTitle = "合同信息"; diffTitle = "合同信息";
} }
...@@ -503,7 +533,9 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -503,7 +533,9 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
this.setLogBaseInfo(empPreId, contractOld, null, user, differenceContractKey, logId, detailEmpLog); this.setLogBaseInfo(empPreId, contractOld, null, user, differenceContractKey, logId, detailEmpLog);
detailList.add(detailEmpLog); detailList.add(detailEmpLog);
if (Common.isNotNull(diffTitle)) { if (Common.isNotNull(diffTitle)) {
diffTitle += "、合同信息"; if (!diffTitle.contains("合同信息")){
diffTitle += "、合同信息";
}
} else { } else {
diffTitle = "合同信息"; diffTitle = "合同信息";
} }
...@@ -519,7 +551,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -519,7 +551,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
.in(TEmployeeContractPre::getProcessStatus, Arrays.asList("0","1","3","5","7","10","11")) .in(TEmployeeContractPre::getProcessStatus, Arrays.asList("0","1","3","5","7","10","11"))
.eq(TEmployeeContractPre::getId,contractOld.getId())); .eq(TEmployeeContractPre::getId,contractOld.getId()));
} }
//是的场景删除合同待购买数据 //否变是的场景删除合同待购买数据
if (newInfo.getServerItem().contains("合同") && Common.isNotNull(contractOld) if (newInfo.getServerItem().contains("合同") && Common.isNotNull(contractOld)
&& Common.isEmpty(employeeContractPre) && null != newInfo.getContractUpdateFlag() && Common.isEmpty(employeeContractPre) && null != newInfo.getContractUpdateFlag()
&& newInfo.getContractUpdateFlag()) { && newInfo.getContractUpdateFlag()) {
...@@ -531,7 +563,9 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -531,7 +563,9 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
this.setLogBaseInfo(empPreId, contractOld, null, user, differenceContractKey, logId, detailEmpLog); this.setLogBaseInfo(empPreId, contractOld, null, user, differenceContractKey, logId, detailEmpLog);
detailList.add(detailEmpLog); detailList.add(detailEmpLog);
if (Common.isNotNull(diffTitle)) { if (Common.isNotNull(diffTitle)) {
diffTitle += "、合同信息"; if (!diffTitle.contains("合同信息")){
diffTitle += "、合同信息";
}
} else { } else {
diffTitle = "合同信息"; diffTitle = "合同信息";
} }
...@@ -560,7 +594,9 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -560,7 +594,9 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
differenceContractKey = HrEquator.comparisonValueIgnoreField(contractOld, employeeContractPre, CONTRACT_IGNORE_FIELD); differenceContractKey = HrEquator.comparisonValueIgnoreField(contractOld, employeeContractPre, CONTRACT_IGNORE_FIELD);
if (differenceContractKey.length() > 0) { if (differenceContractKey.length() > 0) {
if (Common.isNotNull(diffTitle)) { if (Common.isNotNull(diffTitle)) {
diffTitle += "、合同信息"; if (!diffTitle.contains("合同信息")){
diffTitle += "、合同信息";
}
} else { } else {
diffTitle = "合同信息"; diffTitle = "合同信息";
} }
...@@ -571,7 +607,28 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -571,7 +607,28 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
detailList.add(detailEmpLog); detailList.add(detailEmpLog);
} }
} }
//由是切换成否新增 (含合同,但是是否已签署为是,所以contractOld=null)
if ( oldInfo.getServerItem().contains("合同")
&& contractOld == null
&& newInfo.getServerItem().contains("合同")
&& Common.isNotNull(employeeContractPre)
&& null != newInfo.getContractUpdateFlag() && newInfo.getContractUpdateFlag()) {
//1.9.11 huych 附件类型不比较差异
employeeContractPre.setAttaList(null);
detailEmpLog = new TEmployeePreLogDetail();
detailEmpLog.setModelType(CommonConstants.ONE_STRING);
detailEmpLog.setType(CommonConstants.THREE_STRING);
this.setLogBaseInfo(empPreId, null, employeeContractPre, user, differenceContractKey, logId, detailEmpLog);
detailList.add(detailEmpLog);
if (Common.isNotNull(diffTitle)) {
if (!diffTitle.contains("合同信息")){
diffTitle += "、合同信息";
}
} else {
diffTitle = "合同信息";
}
//删除旧合同
}
String differenceSocialKey; String differenceSocialKey;
// 查询老的社保明细 // 查询老的社保明细
R<EmployeePreSocialListVo> socialSdr = socialDaprUtils.getSocialPreInfoList(empPreId); R<EmployeePreSocialListVo> socialSdr = socialDaprUtils.getSocialPreInfoList(empPreId);
...@@ -582,7 +639,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -582,7 +639,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
TDispatchInfoPreVo dispatchInfoPreVo = newInfo.getDispatchInfoPreVo(); TDispatchInfoPreVo dispatchInfoPreVo = newInfo.getDispatchInfoPreVo();
// 新增:如果之前不包含社保,现在包含社保,记录新增日志 // 新增:如果之前不包含社保,现在包含社保,记录新增日志
if (!oldInfo.getServerItem().contains("社保") && newInfo.getServerItem().contains("社保") if (!oldInfo.getServerItem().contains("社保") && newInfo.getServerItem().contains("社保")
&& null != newInfo.getSocialUpdateFlag() && newInfo.getSocialUpdateFlag()) { && null != newInfo.getSocialUpdateFlag() && newInfo.getSocialUpdateFlag()) {
// 单独记录是否已购买社保的变更记录 // 单独记录是否已购买社保的变更记录
if (Common.isEmpty(isSocailBuyOld) || (Common.isNotNull(isSocailBuyOld) && !isSocailBuyOld.equals(isSocailBuyNew))) { if (Common.isEmpty(isSocailBuyOld) || (Common.isNotNull(isSocailBuyOld) && !isSocailBuyOld.equals(isSocailBuyNew))) {
...@@ -669,7 +726,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -669,7 +726,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
detailList.add(detailEmpLog); detailList.add(detailEmpLog);
} }
} }
// 公积金处理逻辑 // 公积金处理逻辑
String differenceFundKey; String differenceFundKey;
// 查询老的公积金明细 // 查询老的公积金明细
...@@ -885,7 +942,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -885,7 +942,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
} }
public Date addYearsMonths(TEmployeeContractDateVo vo) { public Date addYearsMonths(TEmployeeContractDateVo vo) {
if (vo == null || vo.getRegistDate() == null) return null; if (vo == null || vo.getRegistDate() == null) return null;
// 转换为 LocalDate(自动处理时区) // 转换为 LocalDate(自动处理时区)
LocalDate localDate = vo.getRegistDate().toInstant() LocalDate localDate = vo.getRegistDate().toInstant()
.atZone(ZoneId.systemDefault()) .atZone(ZoneId.systemDefault())
...@@ -907,7 +964,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -907,7 +964,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
.toInstant()); .toInstant());
} }
} }
/** /**
* @Description: 添加年数和月数,如果结果为月份 1 号则不减 1 天 * @Description: 添加年数和月数,如果结果为月份 1 号则不减 1 天
* @Author: system * @Author: system
...@@ -917,7 +974,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -917,7 +974,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
**/ **/
public Date addYearsMonthsKeepFirstDay(TEmployeeContractDateVo vo) { public Date addYearsMonthsKeepFirstDay(TEmployeeContractDateVo vo) {
if (vo == null || vo.getRegistDate() == null) return null; if (vo == null || vo.getRegistDate() == null) return null;
// 转换为 LocalDate(自动处理时区) // 转换为 LocalDate(自动处理时区)
LocalDate localDate = vo.getRegistDate().toInstant() LocalDate localDate = vo.getRegistDate().toInstant()
.atZone(ZoneId.systemDefault()) .atZone(ZoneId.systemDefault())
...@@ -933,12 +990,12 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -933,12 +990,12 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
localDate = localDate localDate = localDate
.plusYears(vo.getYearAfter()) .plusYears(vo.getYearAfter())
.plusMonths(vo.getMonthAfter()); .plusMonths(vo.getMonthAfter());
// 如果计算后的日期不是月份 1 号,则减 1 天;如果是 1 号则保持不变 // 如果计算后的日期不是月份 1 号,则减 1 天;如果是 1 号则保持不变
if (localDate.getDayOfMonth() != 1) { if (localDate.getDayOfMonth() != 1) {
localDate = localDate.minusDays(1); localDate = localDate.minusDays(1);
} }
// 转回 Date 类型 // 转回 Date 类型
return Date.from(localDate.atStartOfDay() return Date.from(localDate.atStartOfDay()
.atZone(ZoneId.systemDefault()) .atZone(ZoneId.systemDefault())
......
...@@ -9,6 +9,9 @@ import com.alibaba.excel.read.metadata.holder.ReadRowHolder; ...@@ -9,6 +9,9 @@ import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils; import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import static com.alibaba.fastjson.serializer.SerializerFeature.*;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
...@@ -122,6 +125,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -122,6 +125,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
@Autowired @Autowired
private ContractTermCalculator calculator = new ContractTermCalculator(); private ContractTermCalculator calculator = new ContractTermCalculator();
// JSON序列化特性配置(日期格式化为 yyyy-MM-dd HH:mm:ss)
private static final SerializerFeature[] JSON_FEATURES = new SerializerFeature[]{
WriteMapNullValue, WriteNullNumberAsZero, WriteNullListAsEmpty,
WriteNullStringAsEmpty, WriteDateUseDateFormat
};
// 社保/公积金派单信息比较时忽略的字段 // 社保/公积金派单信息比较时忽略的字段
private static final List<String> SOCIAL_IGNORE_FIELD = new ArrayList<>(); private static final List<String> SOCIAL_IGNORE_FIELD = new ArrayList<>();
static { static {
...@@ -746,6 +755,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -746,6 +755,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
R<Boolean> flag = archivesDaprUtil.selectExitEmpCopntract(cardVo); R<Boolean> flag = archivesDaprUtil.selectExitEmpCopntract(cardVo);
if (preVo.getServerItem().contains("合同") && null != preVo.getEmployeeContractPreVos()) { if (preVo.getServerItem().contains("合同") && null != preVo.getEmployeeContractPreVos()) {
TEmployeeContractPreVo employeeContractPreVo = preVo.getEmployeeContractPreVos(); TEmployeeContractPreVo employeeContractPreVo = preVo.getEmployeeContractPreVos();
preVo.setContractIsBuy(employeeContractPreVo.getContractFlag());
//根据身份证号码和项目编号查询合同 //根据身份证号码和项目编号查询合同
//是否已签署为是需要判断合同是否在用或者流程中 //是否已签署为是需要判断合同是否在用或者流程中
if (CommonConstants.ZERO_STRING.equals(employeeContractPreVo.getContractFlag()) && if (CommonConstants.ZERO_STRING.equals(employeeContractPreVo.getContractFlag()) &&
...@@ -1656,6 +1666,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1656,6 +1666,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} }
TEmployeeContractPreVo employeeContractPreVo = new TEmployeeContractPreVo(); TEmployeeContractPreVo employeeContractPreVo = new TEmployeeContractPreVo();
if (preVo.getServerItem().contains("合同") && Common.isNotNull(preVo.getEmployeeContractPreVos())) { if (preVo.getServerItem().contains("合同") && Common.isNotNull(preVo.getEmployeeContractPreVos())) {
preVo.setContractIsBuy(employeeContractPreVo.getContractFlag());
BeanUtils.copyProperties(preVo.getEmployeeContractPreVos(),employeeContractPreVo); BeanUtils.copyProperties(preVo.getEmployeeContractPreVos(),employeeContractPreVo);
//生成合同待购买数据 //生成合同待购买数据
String errorStr = null; String errorStr = null;
...@@ -1994,6 +2005,10 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1994,6 +2005,10 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
initFundPreInfo(registrationNow, preVo.getDispatchInfoFundPreVo(), user, domainR.getData(),fundLimitVo); initFundPreInfo(registrationNow, preVo.getDispatchInfoFundPreVo(), user, domainR.getData(),fundLimitVo);
} }
socialDaprUtils.saveFundPreInfo(preVo); socialDaprUtils.saveFundPreInfo(preVo);
//保存确认接收日志(合同、商险、社保、公积金新增日志)
if (Common.isNotNull(domainR) && Common.isNotNull(domainR.getData())) {
saveConfirmReceiveLog(domainR.getData(), preVo, user);
}
} }
} }
}catch (Exception e) { }catch (Exception e) {
...@@ -3249,7 +3264,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -3249,7 +3264,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
archiveDetail.setPreId(empPreId); archiveDetail.setPreId(empPreId);
archiveDetail.setPreLogId(logId); archiveDetail.setPreLogId(logId);
archiveDetail.setOldInfo(null); // old对象为空 archiveDetail.setOldInfo(null); // old对象为空
archiveDetail.setNewInfo(JSON.toJSONString(preVo)); archiveDetail.setNewInfo(JSON.toJSONString(preVo,JSON_FEATURES));
archiveDetail.setDifferenceInfo(null); archiveDetail.setDifferenceInfo(null);
archiveDetail.setCreateBy(user.getId()); archiveDetail.setCreateBy(user.getId());
archiveDetail.setCreateName(user.getNickname()); archiveDetail.setCreateName(user.getNickname());
...@@ -3289,7 +3304,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -3289,7 +3304,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
insuranceDetail.setPreId(empPreId); insuranceDetail.setPreId(empPreId);
insuranceDetail.setPreLogId(logId); insuranceDetail.setPreLogId(logId);
insuranceDetail.setOldInfo(null); insuranceDetail.setOldInfo(null);
insuranceDetail.setNewInfo(JSON.toJSONString(insurancePre)); insuranceDetail.setNewInfo(JSON.toJSONString(insurancePre,JSON_FEATURES));
// 使用 HrEquator 比较差异字段(新增时 old 为空,传入空对象) // 使用 HrEquator 比较差异字段(新增时 old 为空,传入空对象)
insuranceDetail.setDifferenceInfo(null); insuranceDetail.setDifferenceInfo(null);
insuranceDetail.setCreateBy(user.getId()); insuranceDetail.setCreateBy(user.getId());
...@@ -3307,17 +3322,35 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -3307,17 +3322,35 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} }
diffTitleBuilder.append("合同信息"); diffTitleBuilder.append("合同信息");
TEmployeePreLogDetail contractDetail = new TEmployeePreLogDetail(); if (Common.isNotNull(preVo.getEmployeeContractPreVos())){
contractDetail.setModelType(CommonConstants.ONE_STRING); // 是否已参保
contractDetail.setType(CommonConstants.THREE_STRING); // 3合同 if (Common.isNotNull(preVo.getEmployeeContractPreVos().getContractFlag())) {
contractDetail.setPreId(empPreId); TEmployeePreLogDetail contractDetail = new TEmployeePreLogDetail();
contractDetail.setPreLogId(logId); contractDetail.setModelType(CommonConstants.ONE_STRING);
contractDetail.setOldInfo(null); contractDetail.setType(CommonConstants.THREE_STRING); // 3合同
contractDetail.setNewInfo(JSON.toJSONString(preVo.getEmployeeContractPreVos())); contractDetail.setPreId(empPreId);
contractDetail.setDifferenceInfo(null); contractDetail.setPreLogId(logId);
contractDetail.setCreateBy(user.getId()); contractDetail.setOldInfo(null);
contractDetail.setCreateName(user.getNickname()); Map<String, Object> newInfo = new HashMap<>();
detailList.add(contractDetail); newInfo.put("contractIsBuy", preVo.getEmployeeContractPreVos().getContractFlag());
contractDetail.setNewInfo(JSON.toJSONString(newInfo));
contractDetail.setDifferenceInfo("contractIsBuy");
contractDetail.setCreateBy(user.getId());
contractDetail.setCreateName(user.getNickname());
detailList.add(contractDetail);
}
TEmployeePreLogDetail contractDetail = new TEmployeePreLogDetail();
contractDetail.setModelType(CommonConstants.ONE_STRING);
contractDetail.setType(CommonConstants.THREE_STRING); // 3合同
contractDetail.setPreId(empPreId);
contractDetail.setPreLogId(logId);
contractDetail.setOldInfo(null);
contractDetail.setNewInfo(JSON.toJSONString(preVo.getEmployeeContractPreVos(),JSON_FEATURES));
contractDetail.setDifferenceInfo(null);
contractDetail.setCreateBy(user.getId());
contractDetail.setCreateName(user.getNickname());
detailList.add(contractDetail);
}
} }
// 4. 社保信息日志(type=4) // 4. 社保信息日志(type=4)
...@@ -3352,7 +3385,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -3352,7 +3385,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
socialDetail.setPreId(empPreId); socialDetail.setPreId(empPreId);
socialDetail.setPreLogId(logId); socialDetail.setPreLogId(logId);
socialDetail.setOldInfo(null); socialDetail.setOldInfo(null);
socialDetail.setNewInfo(JSON.toJSONString(preVo.getDispatchInfoPreVo())); socialDetail.setNewInfo(JSON.toJSONString(preVo.getDispatchInfoPreVo(),JSON_FEATURES));
socialDetail.setDifferenceInfo(null); socialDetail.setDifferenceInfo(null);
socialDetail.setCreateBy(user.getId()); socialDetail.setCreateBy(user.getId());
socialDetail.setCreateName(user.getNickname()); socialDetail.setCreateName(user.getNickname());
...@@ -3392,7 +3425,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -3392,7 +3425,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
fundDetail.setPreId(empPreId); fundDetail.setPreId(empPreId);
fundDetail.setPreLogId(logId); fundDetail.setPreLogId(logId);
fundDetail.setOldInfo(null); fundDetail.setOldInfo(null);
fundDetail.setNewInfo(JSON.toJSONString(preVo.getDispatchInfoFundPreVo())); fundDetail.setNewInfo(JSON.toJSONString(preVo.getDispatchInfoFundPreVo(),JSON_FEATURES));
fundDetail.setDifferenceInfo(null); fundDetail.setDifferenceInfo(null);
fundDetail.setCreateBy(user.getId()); fundDetail.setCreateBy(user.getId());
fundDetail.setCreateName(user.getNickname()); fundDetail.setCreateName(user.getNickname());
...@@ -3405,7 +3438,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -3405,7 +3438,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
TEmployeePreLog empPreLog = new TEmployeePreLog(); TEmployeePreLog empPreLog = new TEmployeePreLog();
empPreLog.setId(logId); empPreLog.setId(logId);
empPreLog.setPreId(empPreId); empPreLog.setPreId(empPreId);
empPreLog.setDiffTitle(diffTitleBuilder.toString()); empPreLog.setDiffTitle("入职确认接收:" + diffTitleBuilder.toString());
if (Common.isNotNull(user)) { if (Common.isNotNull(user)) {
empPreLog.setCreateBy(user.getId()); empPreLog.setCreateBy(user.getId());
empPreLog.setCreateName(user.getNickname()); empPreLog.setCreateName(user.getNickname());
......
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