Commit 94bc0d5c authored by fangxinjiang's avatar fangxinjiang

派单分项目派单状态处理

parent 43310f3a
......@@ -264,13 +264,28 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//对比对象
TEmployeeProject compareProject = this.getById(id);
if (tEmployeeProject.getInsuranceStatus() != CommonConstants.dingleDigitIntArray[0] ||
if (tEmployeeProject.getContractStatus() == CommonConstants.dingleDigitIntArray[1] ||
tEmployeeProject.getInsuranceStatus() != CommonConstants.dingleDigitIntArray[0] ||
tEmployeeProject.getSocialStatus() != CommonConstants.dingleDigitIntArray[0] ||
tEmployeeProject.getFundStatus() != CommonConstants.dingleDigitIntArray[0]) {
return R.failed("人员在该项目下存在进行中/未完结的服务,禁止删除");
}
// 未作废,在用 或 审核中
long contractCount = contractInfoMapper.selectCount(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard,tEmployeeProject.getEmpIdcard())
.eq(TEmployeeContractInfo::getIsObsolete,CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getDeptNo,tEmployeeProject.getDeptNo())
.and(obj->obj.eq(TEmployeeContractInfo::getInUse,CommonConstants.ZERO_STRING)
.or()
.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.ZERO_INT)
.or()
.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.ONE_INT))
);
if (contractCount > CommonConstants.ZERO_INT){
return R.failed("人员在该项目下存在合同可用或在途,禁止删除");
}
//逻辑删除项目档案
tEmployeeProject.setDeleteFlag(CommonConstants.ONE_STRING);
baseMapper.updateById(tEmployeeProject);
......@@ -416,9 +431,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.eq(TEmployeeContractInfo::getDeptNo,tEmployeeProject.getDeptNo())
.and(obj->obj.eq(TEmployeeContractInfo::getInUse,CommonConstants.ZERO_STRING)
.or()
.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.ZERO_INT)
.or()
.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.ONE_STRING))
.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.ONE_INT))
);
if (contractCount > CommonConstants.ZERO_INT){
errorTemp.append("合同可用或在途、");
......@@ -612,9 +627,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.eq(TEmployeeContractInfo::getDeptNo,tEmployeeProject.getDeptNo())
.and(obj->obj.eq(TEmployeeContractInfo::getInUse,CommonConstants.ZERO_STRING)
.or()
.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.ZERO_INT)
.or()
.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.ONE_STRING))
.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.ONE_INT))
);
if (contractCount > CommonConstants.ZERO_INT){
errorTemp.append("合同可用或在途、");
......
......@@ -42,6 +42,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -95,6 +96,8 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
for(String userId : userIdList){
redisUtil.remove(CacheConstants.WXHR_SETTLE_DOMAIN_VOS_BY_USERID +"_"+userId);
redisUtil.remove(CacheConstants.WXHR_SETTLE_DOMAIN_NOS_BY_USERID +"_"+userId);
redisUtil.remove(CacheConstants.DATA_AUTH_DETAILS +"_0");
redisUtil.remove(CacheConstants.DATA_AUTH_DETAILS +"_1");
// 清空userinfo
Objects.requireNonNull(cacheManager.getCache(CacheConstants.USER_DETAILS)).clear();
redisUtil.remove(CacheConstants.USER_DETAILS +"::"+ user.getUsername());
......
......@@ -24,6 +24,7 @@ import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.lock.annotation.Lock4j;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
......@@ -1132,6 +1133,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Date: 2022-08-01 15:01
* @return: java.lang.String
**/
@Lock4j(keys = "getDispatchApplyCode", expire = 60000, acquireTimeout = 1000)
private synchronized String getApplyCode() {
String nowDay = DateUtil.getThisDay();
Cache cache = cacheManager.getCache(CacheConstants.EVERYDAY_DISPATCH_CODE);
......@@ -2844,6 +2846,16 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch.setContractName(empVo.getContractName());
dispatch.setContractSubName(empVo.getContractSubName());
}
// 社保公积金派减派单兼容 划转逻辑
if ( Common.isNotNull(dispatch.getSocialId())){
dispatch.setSettleDomain(socialFund.getSettleDomain());
dispatch.setSettleDomainCode(socialFund.getSettleDomainCode());
dispatch.setSettleDomainName(socialFund.getSettleDomainName());
}else if (Common.isNotNull(dispatch.getFundId()) && Common.isEmpty(dispatch.getSocialId())){
dispatch.setSettleDomain(socialFund.getSettleDomainFund());
dispatch.setSettleDomainCode(socialFund.getSettleDomainCodeFund());
dispatch.setSettleDomainName(socialFund.getSettleDomainNameFund());
}
return dispatch;
}
......@@ -3800,7 +3812,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
UpProjectSocialFundVo vo = new UpProjectSocialFundVo();
// 社保状态 社保状态(字典): 0 无社保 1 处理中 2.部分购买 3.正常 4.已派减
initSocialFundStatus(socialInfo, providentFund, vo,sf);
if (Common.isNotNull(vo.getSocialStatus())){
if (Common.isNotNull(vo.getSocialStatus()) || Common.isNotNull(vo.getFundStatus())){
vo.setEmpIdCard(dis.getEmpIdcard());
vo.setDepartNo(dis.getSettleDomainCode());
R<Boolean> resUp = archivesDaprUtil.updateProjectSocialFund(vo);
......
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