Commit 2ef11abf authored by hongguangwu's avatar hongguangwu

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

parents 00ae7d63 c478f476
......@@ -33,9 +33,6 @@ public class TEmployeeContractPrePushFascVo {
@ExcelAttribute(name = "紧急联系人地址")
private String contactAddress;
@ExcelAttribute(name = "手机号码")
private String empPhone;
@ExcelProperty("微信号")
private String weChatId;
......
......@@ -103,6 +103,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
private final TEmployeeContractPreMapper contractPreMapper;
private final TEmployeeContractPreNewMapper contractPreNewMapper;
private final TGzOfferInfoMapper gzOfferInfoMapper;
@Autowired
......@@ -1146,6 +1148,17 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
}
try {
baseMapper.updateById(employeeRegistrationPre);
// 如果手机号发生变化,同步更新合同待签订(TEmployeeContractPre)的手机号码
if (Common.isNotNull(employeeRegistrationPre.getEmpPhone()) &&
!employeeRegistrationPre.getEmpPhone().equals(comparePre.getEmpPhone())) {
// 同步更新合同待签订的手机号码(通过registerId关联)
LambdaUpdateWrapper<TEmployeeContractPre> contractPreUpdateWrapper = new LambdaUpdateWrapper<>();
contractPreUpdateWrapper.eq(TEmployeeContractPre::getRegisterId, employeeRegistrationPre.getId())
.set(TEmployeeContractPre::getEmpPhone, employeeRegistrationPre.getEmpPhone());
contractPreMapper.update(null, contractPreUpdateWrapper);
}
// 如果预计收集时间改变且新的时间不为空,添加新的定时任务
if (expectedCollectionTimeChanged && employeeRegistrationPre.getExpectedCollectionTime() != null) {
log.info("员工预入职 ID: {} 按新预计收集时间:{} 添加定时任务",
......
......@@ -342,7 +342,6 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
contract.setHuArea(empInfo.getHuArea());
contract.setContactArea(empInfo.getContactArea());
contract.setEmpEmail(empInfo.getEmpEmail());
contract.setEmpPhone(empInfo.getEmpPhone());
contract.setWeChatId(empInfo.getWeChatId());
}
......@@ -402,12 +401,10 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
contract.setContactTel(empContactInfo.getContactTel());
contract.setContactAddress(empContactInfo.getContactAddress());
}
// 如果员工档案信息有,默认用档案的手机号
if (empInfo != null) {
contract.setHuArea(empInfo.getHuArea());
contract.setContactArea(empInfo.getContactArea());
contract.setEmpEmail(empInfo.getEmpEmail());
contract.setEmpPhone(empInfo.getEmpPhone());
contract.setWeChatId(empInfo.getWeChatId());
}
......
......@@ -28,6 +28,7 @@ import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.lock.annotation.Lock4j;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
......@@ -146,6 +147,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
private final TEmployeeContractPreMapper contractPreMapper;
private final TEmployeeContractPreNewMapper contractPreNewMapper;
@Autowired
private OSSUtil ossUtil;
......@@ -4763,10 +4766,17 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
} else {
return R.failed(EmployeeConstants.CHECK_ERROR);
}
// 可以更新
// 可以更新:
emp.setEmpPhone(empPhoneNew);
baseMapper.updateById(emp);
return R.ok("更新成功!");
// 同步更新合同待续签(TEmployeeContractPreNew)的手机号码
LambdaUpdateWrapper<TEmployeeContractPreNew> contractPreNewUpdateWrapper = new LambdaUpdateWrapper<>();
contractPreNewUpdateWrapper.eq(TEmployeeContractPreNew::getEmpIdcard, emp.getEmpIdcard())
.set(TEmployeeContractPreNew::getEmpPhone, empPhoneNew);
contractPreNewMapper.update(null, contractPreNewUpdateWrapper);
return R.ok("更新成功!");
} else {
return R.failed("无该人员信息,不可修改手机号!");
}
......
......@@ -710,6 +710,8 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
//修改
} else if (newInfo.getServerItem().contains("社保")&& null != newInfo.getSocialUpdateFlag()
&& newInfo.getSocialUpdateFlag() && dispatchInfoPreOldVo != null && dispatchInfoPreVo != null) {
//为了加状态日志
dispatchInfoPreVo.setProcessStatus(CommonConstants.ZERO_STRING);
differenceSocialKey = HrEquator.comparisonValueIgnoreField(dispatchInfoPreOldVo
, dispatchInfoPreVo, SOCIAL_IGNORE_FIELD_TWO);
if (differenceSocialKey.length() > 0) {
......@@ -811,6 +813,8 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
&& newInfo.getFundUpdateFlag() && dispatchInfoFundPreOldVo != null
&& dispatchInfoFundPreVo != null) {
//initFundTime(dispatchInfoFundPreVo);
//为了加状态日志
dispatchInfoFundPreVo.setProcessStatus(CommonConstants.ZERO_STRING);
differenceFundKey = HrEquator.comparisonValueIgnoreField(dispatchInfoFundPreOldVo
, dispatchInfoFundPreVo, SOCIAL_IGNORE_FIELD_TWO);
if (differenceFundKey.length() > 0) {
......
......@@ -136,8 +136,7 @@
,ifnull(sc2.AREA_NAME,'')
,ifnull(st2.AREA_NAME,'')
,ifnull(a.CONTACT_ADDRESS,'')
) contactArea,a.EMP_EMAIL empEmail,
a.EMP_PHONE empPhone,a.WE_CHAT_ID weChatId
) contactArea,a.EMP_EMAIL empEmail,a.WE_CHAT_ID weChatId
from t_employee_info a
left join sys_area sp on sp.id = a.ID_PROVINCE
left join sys_area sc on sc.id = a.ID_CITY
......
......@@ -2005,10 +2005,10 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
initFundPreInfo(registrationNow, preVo.getDispatchInfoFundPreVo(), user, domainR.getData(),fundLimitVo);
}
socialDaprUtils.saveFundPreInfo(preVo);
//保存确认接收日志(合同、商险、社保、公积金新增日志)
if (Common.isNotNull(domainR) && Common.isNotNull(domainR.getData())) {
saveConfirmReceiveLog(domainR.getData(), preVo, user);
}
}
//保存确认接收日志(合同、商险、社保、公积金新增日志)
if (Common.isNotNull(domainR) && Common.isNotNull(domainR.getData())) {
saveConfirmReceiveLog(domainR.getData(), preVo, user);
}
}
}catch (Exception e) {
......@@ -3324,32 +3324,40 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
if (Common.isNotNull(preVo.getEmployeeContractPreVos())){
// 是否已参保
if (Common.isNotNull(preVo.getEmployeeContractPreVos().getContractFlag())) {
TEmployeePreLogDetail contractDetail = new TEmployeePreLogDetail();
contractDetail.setModelType(CommonConstants.ONE_STRING);
contractDetail.setType(CommonConstants.THREE_STRING); // 3合同
contractDetail.setPreId(empPreId);
contractDetail.setPreLogId(logId);
contractDetail.setOldInfo(null);
Map<String, Object> newInfo = new HashMap<>();
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);
Map<String, Object> newInfo = new HashMap<>();
if (preVo.getEmployeeContractPreVos().getContractFlag() != null){
newInfo.put("contractIsBuy", preVo.getEmployeeContractPreVos().getContractFlag());
}else{
//默认否
newInfo.put("contractIsBuy", CommonConstants.ONE_STRING);
}
contractDetail.setNewInfo(JSON.toJSONString(newInfo));
contractDetail.setDifferenceInfo("contractIsBuy");
contractDetail.setCreateBy(user.getId());
contractDetail.setCreateName(user.getNickname());
detailList.add(contractDetail);
//批量都是否,单个如果 是 是 不生成记录
if (CommonConstants.ONE_STRING.equals(preVo.getEmployeeContractPreVos().getContractFlag()) ||
null == preVo.getEmployeeContractPreVos().getContractFlag()
){
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);
}
}
}
......
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