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