Commit a49a7259 authored by huyuchen's avatar huyuchen

停止合作相关内容修改

parent 5fdb92e7
......@@ -213,9 +213,9 @@ public class TSettleDomain extends BaseEntity {
private Integer town;
/**
* 服务状态:0正常 1停止服务
* 服务状态:0正常 1停止服务 2冻结
*/
@Schema(description = "服务状态:0正常 1停止服务")
@Schema(description = "服务状态:0正常 1停止服务 2冻结")
private String stopFlag;
/**
......
......@@ -85,9 +85,9 @@ public class ProjectSetInfoVo implements Serializable {
private String businessThirdType;
/**
* 服务状态:0正常 1停止服务
* 服务状态:0正常 1停止服务 2冻结
*/
@Schema(description = "服务状态:0正常 1停止服务")
@Schema(description = "服务状态:0正常 1停止服务 2冻结")
private String stopFlag;
/**
......
......@@ -192,9 +192,9 @@ public class TSettleDomainEkpVo implements Serializable {
private Integer town;
/**
* 服务状态:0正常 1停止服务
* 服务状态:0正常 1停止服务 2冻结
*/
@Schema(description = "服务状态:0正常 1停止服务")
@Schema(description = "服务状态:0正常 1停止服务 2冻结")
private String stopFlag;
/**
......
......@@ -53,7 +53,10 @@ public class EmployeeConstants {
public static final String CONTRACT_REDUCE_INFO_NOT_EMPTY = "签订类型为终止时,离职日期和终止原因必填";
public static final String CONTRACT_REDUCE_REASON_NOT_EMPTY = "终止原因为其他时,原因说明必填";
/**
* 对应项目编码已停止合作
*/
public static final String EMP_DISPATCH_SETTLEDOMAIN_STOP = "对应项目编码不存在或者已停止合作";
/**
* 无数据可更新
**/
......
......@@ -154,7 +154,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
List<ErrorMessage> errorMessageList = (List<ErrorMessage>) bindingResult.getTarget();
Map<Long,ErrorMessage> errorMsgMap = new HashMap<>();
if (Common.isNotNull(errorMessageList)){
errorMessageList.stream().forEach(errorMessage -> errorMsgMap.put(errorMessage.getLineNum(),errorMessage));
errorMessageList.forEach(errorMessage -> errorMsgMap.put(errorMessage.getLineNum(),errorMessage));
}
List<TEmployeeProject> updateList = new ArrayList<>();
......@@ -162,7 +162,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
// 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) {
// 已有验证报错直接下一个
if (Common.isNotNull(errorMsgMap.get(i+2))){
if (Common.isNotNull(errorMsgMap.get((long)i+2))){
continue;
}
errorMsg = new HashSet<>();
......@@ -177,10 +177,9 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
if (excel.getUnsettleDeal().equals(CommonConstants.IS_CHANGE)) {
if (Common.isEmpty(excel.getChangeStartMonth())) {
errorMsg.add("划转起始月不能为空");
} else if (PATTERN.matcher(excel.getChangeStartMonth()).matches()) {
if (Integer.parseInt(excel.getChangeStartMonth()) > Integer.parseInt(DateUtil.getThisMonth())) {
} else if (PATTERN.matcher(excel.getChangeStartMonth()).matches() &&
Integer.parseInt(excel.getChangeStartMonth()) > Integer.parseInt(DateUtil.getThisMonth())) {
errorMsg.add("划转起始月要小于等于当前月");
}
}
}
......
......@@ -151,6 +151,13 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if (null == tEmployeeInfo || tEmployeeProject == null) {
return R.failed(EMPINFO_IS_NOT_EXITS_BYID);
}
TSettleDomain settleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, tEmployeeContractInfo.getDeptNo())
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING)
.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING));
if (Common.isEmpty(settleDomain)) {
return R.failed(EmployeeConstants.EMP_DISPATCH_SETTLEDOMAIN_STOP);
}
YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) {
return R.failed(CommonConstants.PLEASE_LOG_IN);
......
......@@ -308,7 +308,7 @@ public interface ErrorCodes {
*/
String QT_PROJECT_CHANGE_NOT_EXIST = "qt.project.change.not.exist";
/**
* 未找到对应的项目,请核实
* 未找到对应的项目或者项目已停止合作,请核实
*/
String PROJECT_SEARCH_NOT_EXIST = "project.search.not.exist";
/**
......
......@@ -108,7 +108,10 @@ public class InsurancesConstants {
* 项目编码不存在
*/
public static final String DEPT_NO_IS_NOT_EXIST = "项目编码不存在";
/**
* 对应项目编码已停止合作
*/
public static final String EMP_DISPATCH_SETTLEDOMAIN_STOP = "对应项目编码已停止合作";
/**
* 替换员工项目不存在
*/
......
......@@ -2168,6 +2168,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}else {
//对应的项目编码已停止合作
if (CommonConstants.ONE_STRING.equals(projectSetInfoVo.getStopFlag()) ||
CommonConstants.TWO_STRING.equals(projectSetInfoVo.getStopFlag())){
param.setErrorMessage(InsurancesConstants.EMP_DISPATCH_SETTLEDOMAIN_STOP);
listResult.add(param);
continue;
}
//结算类型,根据项目编码获取,并冗余到明细记录中
String settleType = projectSetInfoVo.getInsuranceSettleType();
if (StringUtils.isEmpty(settleType)){
......@@ -2488,6 +2495,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}else {
//对应的项目编码已停止合作
if (CommonConstants.ONE_STRING.equals(projectSetInfoVo.getStopFlag()) ||
CommonConstants.TWO_STRING.equals(projectSetInfoVo.getStopFlag())){
param.setErrorMessage(InsurancesConstants.EMP_DISPATCH_SETTLEDOMAIN_STOP);
listResult.add(param);
continue;
}
//结算类型,根据项目编码获取,并冗余到明细记录中
String settleType = projectSetInfoVo.getInsuranceSettleType();
if (StringUtils.isEmpty(settleType)){
......@@ -2875,6 +2889,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}else {
//对应的项目编码已停止合作
if (CommonConstants.ONE_STRING.equals(projectSetInfoVo.getStopFlag()) ||
CommonConstants.TWO_STRING.equals(projectSetInfoVo.getStopFlag())){
param.setErrorMessage(InsurancesConstants.EMP_DISPATCH_SETTLEDOMAIN_STOP);
listResult.add(param);
continue;
}
//结算类型,根据项目编码获取,并冗余到明细记录中
String settleType = projectSetInfoVo.getInsuranceSettleType();
if (StringUtils.isEmpty(settleType)){
......
......@@ -2141,7 +2141,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_PROJECT_NOT_FOUND)));
return true;
}
if (CommonConstants.ONE_STRING.equals(setInfoVo.getStopFlag())){
//对应的项目编码已停止合作
if (CommonConstants.ONE_STRING.equals(setInfoVo.getStopFlag()) || CommonConstants.TWO_STRING.equals(setInfoVo.getStopFlag())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SETTLEDOMAIN_STOP)));
return true;
}
......
......@@ -3464,7 +3464,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
R<TSettleDomainListVo> settleDomainR = archivesDaprUtil.selectAllSettleDomainSelectVos();
Map<String,TSettleDomainSelectVo> mapSelectVo = null;
if (Common.isNotNull(settleDomainR) && Common.isNotNull(settleDomainR.getData())){
mapSelectVo = settleDomainR.getData().getMapSlectVo();
mapSelectVo = settleDomainR.getData().getMapSelectVo();
}
if (Common.isEmpty(mapSelectVo)){
ServiceUtil.runTimeExceptionDiy(CommonConstants.SETTLE_DOMAIN_GET_ERROR);
......
......@@ -27,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.*;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
......@@ -646,6 +647,10 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
return errList;
}
TSettleDomainSelectVo selectVo = domainR.getData();
if (CommonConstants.ONE_STRING.equals(selectVo.getStopFlag()) || CommonConstants.TWO_STRING.equals(selectVo.getStopFlag())){
errList.add(new ErrorMessage(-1, MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SETTLEDOMAIN_STOP)));
return errList;
}
// 获取基数配置信息
HashMap<String, List<SysBaseSetInfo>> baseSocialSetMap = new HashMap<>();
HashMap<String, List<SysBaseSetInfo>> baseFundSetMap = new HashMap<>();
......
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