Commit 259d0d35 authored by huyuchen's avatar huyuchen

合同同步档案信息

parent f0a19ca5
...@@ -49,6 +49,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; ...@@ -49,6 +49,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateUtil;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
...@@ -739,8 +740,26 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -739,8 +740,26 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT) .eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT)
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL) .eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
// 渲染字典值
Map<String,String> dicObj = (Map<String, String>) RedisUtil.redis.opsForValue().get(
CacheConstants.DICT_DETAILS + CommonConstants.COLON_STRING + "personnel_type");
String tempStr = null;
for (Map.Entry<String,String> entry:dicObj.entrySet()){
if (Common.isNotNull(entry.getValue()) && entry.getValue().equals(contractInfo.getContractName())){
tempStr = entry.getKey();
break;
}
}
if (tEmployeeProject != null) { if (tEmployeeProject != null) {
tEmployeeProject.setContractStatus(CommonConstants.ONE_INT); tEmployeeProject.setContractStatus(CommonConstants.ONE_INT);
//签订类型正常签订的时候更新项目档案信息
if (EmployeeConstants.SITUATION_ONE.equals(contractInfo.getSituation())) {
tEmployeeProject.setContractType(null == tempStr? "":tempStr);
tEmployeeProject.setWorkingHours(contractInfo.getWorkingHours());
tEmployeeProject.setPost(contractInfo.getPost());
tEmployeeProject.setEnjoinDate(LocalDateUtil.parseLocalDate(contractInfo.getContractStart().toString()));
tEmployeeProject.setTryPeriod(contractInfo.getTryPeriod());
}
tEmployeeProjectService.updateById(tEmployeeProject); tEmployeeProjectService.updateById(tEmployeeProject);
} }
// 更新档案、项目合同状态为(1在用) // 更新档案、项目合同状态为(1在用)
...@@ -760,16 +779,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -760,16 +779,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
TPreEmployeeProject preEmployeeProject = preEmployeeProjectMapper.selectOne(Wrappers.<TPreEmployeeProject>query() TPreEmployeeProject preEmployeeProject = preEmployeeProjectMapper.selectOne(Wrappers.<TPreEmployeeProject>query()
.lambda().eq(TPreEmployeeProject::getPreMainId, empMain.getId())); .lambda().eq(TPreEmployeeProject::getPreMainId, empMain.getId()));
if (Optional.ofNullable(preEmployeeProject).isPresent()) { if (Optional.ofNullable(preEmployeeProject).isPresent()) {
// 渲染字典值
Map<String,String> dicObj = (Map<String, String>) RedisUtil.redis.opsForValue().get(
CacheConstants.DICT_DETAILS + CommonConstants.COLON_STRING + "personnel_type");
String tempStr = null;
for (Map.Entry<String,String> entry:dicObj.entrySet()){
if (Common.isNotNull(entry.getValue()) && entry.getValue().equals(contractInfo.getContractName())){
tempStr = entry.getKey();
break;
}
}
preEmployeeProject.setContractType(null == tempStr? "":tempStr); preEmployeeProject.setContractType(null == tempStr? "":tempStr);
preEmployeeProject.setWorkingHours(contractInfo.getWorkingHours()); preEmployeeProject.setWorkingHours(contractInfo.getWorkingHours());
preEmployeeProject.setPost(contractInfo.getPost()); preEmployeeProject.setPost(contractInfo.getPost());
...@@ -1636,6 +1645,13 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -1636,6 +1645,13 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeContractInfo.setAuditTimeLast(LocalDateTime.now()); tEmployeeContractInfo.setAuditTimeLast(LocalDateTime.now());
tEmployeeContractInfo.setInUse(CommonConstants.ZERO_STRING); tEmployeeContractInfo.setInUse(CommonConstants.ZERO_STRING);
// 更新档案、项目合同状态为(1可用) // 更新档案、项目合同状态为(1可用)
String tempStr = null;
for (Map.Entry<String,String> entry:dicObj.entrySet()){
if (Common.isNotNull(entry.getValue()) && entry.getValue().equals(contract.getContractName())){
tempStr = entry.getKey();
break;
}
}
tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query() tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query()
.lambda().eq(TEmployeeProject::getEmpId, contract.getEmpId()) .lambda().eq(TEmployeeProject::getEmpId, contract.getEmpId())
.eq(TEmployeeProject::getDeptId, contract.getSettleDomain()) .eq(TEmployeeProject::getDeptId, contract.getSettleDomain())
...@@ -1644,6 +1660,14 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -1644,6 +1660,14 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
if (tEmployeeProject != null) { if (tEmployeeProject != null) {
tEmployeeProject.setContractStatus(CommonConstants.ONE_INT); tEmployeeProject.setContractStatus(CommonConstants.ONE_INT);
//签订类型正常签订的时候更新项目档案信息
if (EmployeeConstants.SITUATION_ONE.equals(contract.getSituation())) {
tEmployeeProject.setContractType(null == tempStr? "":tempStr);
tEmployeeProject.setWorkingHours(contract.getWorkingHours());
tEmployeeProject.setPost(contract.getPost());
tEmployeeProject.setEnjoinDate(LocalDateUtil.parseLocalDate(contract.getContractStart().toString()));
tEmployeeProject.setTryPeriod(contract.getTryPeriod());
}
tEmployeeProjectService.updateById(tEmployeeProject); tEmployeeProjectService.updateById(tEmployeeProject);
} }
// 更新档案、项目合同状态为(1在用) // 更新档案、项目合同状态为(1在用)
...@@ -1663,13 +1687,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -1663,13 +1687,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
TPreEmployeeProject preEmployeeProject = preEmployeeProjectMapper.selectOne(Wrappers.<TPreEmployeeProject>query() TPreEmployeeProject preEmployeeProject = preEmployeeProjectMapper.selectOne(Wrappers.<TPreEmployeeProject>query()
.lambda().eq(TPreEmployeeProject::getPreMainId, empMain.getId())); .lambda().eq(TPreEmployeeProject::getPreMainId, empMain.getId()));
if (Optional.ofNullable(preEmployeeProject).isPresent()) { if (Optional.ofNullable(preEmployeeProject).isPresent()) {
String tempStr = null;
for (Map.Entry<String,String> entry:dicObj.entrySet()){
if (Common.isNotNull(entry.getValue()) && entry.getValue().equals(contract.getContractName())){
tempStr = entry.getKey();
break;
}
}
preEmployeeProject.setContractType(null == tempStr? "":tempStr); preEmployeeProject.setContractType(null == tempStr? "":tempStr);
preEmployeeProject.setWorkingHours(contract.getWorkingHours()); preEmployeeProject.setWorkingHours(contract.getWorkingHours());
preEmployeeProject.setPost(contract.getPost()); preEmployeeProject.setPost(contract.getPost());
......
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