Commit ab778b93 authored by 查济's avatar 查济

Merge branch 'feature-zhaji' into 'develop'

Feature zhaji

See merge request fangxinjiang/yifu!55
parents 9192d9b9 d6c4b1a4
...@@ -80,9 +80,15 @@ public class DeptChangeCheckParam implements Serializable { ...@@ -80,9 +80,15 @@ public class DeptChangeCheckParam implements Serializable {
private String errorMessage; private String errorMessage;
/** /**
* 结算方式 * 新项目结算方式
*/ */
@Schema(description = "结算方式") @Schema(description = "结算方式")
private Integer settleType; private Integer newSettleType;
/**
* 旧项目结算方式
*/
@Schema(description = "结算方式")
private Integer oldSettleType;
} }
...@@ -2338,12 +2338,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2338,12 +2338,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map<String, List<DeptChangeCheckParam>> stringListMap = deptChangeCheck(deptChangeCheckList); Map<String, List<DeptChangeCheckParam>> stringListMap = deptChangeCheck(deptChangeCheckList);
//todo 生成EKP通知,通知ekp变更结算所属项目 //todo 生成EKP通知,通知ekp变更结算所属项目
List<DeptChangeCheckParam> successList = stringListMap.get("successList"); List<DeptChangeCheckParam> successList = stringListMap.get("successList");
if(CollectionUtils.isNotEmpty(successList)){ if(CollectionUtils.isNotEmpty(successList)){
for (DeptChangeCheckParam success : successList) { for (DeptChangeCheckParam success : successList) {
Integer newSettleType = success.getNewSettleType();
Integer oldSettleType = success.getOldSettleType();
LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TInsuranceDetail ::getId,success.getId()) updateWrapper.eq(TInsuranceDetail ::getId,success.getId())
.set(TInsuranceDetail :: getDeptNo,success.getNewDeptNo()) .set(TInsuranceDetail :: getDeptNo,success.getNewDeptNo())
.set(TInsuranceDetail :: getSettleType,success.getSettleType()) .set(TInsuranceDetail :: getSettleType,success.getNewSettleType())
.set(TInsuranceDetail :: getUpdateBy,user.getId()) .set(TInsuranceDetail :: getUpdateBy,user.getId())
.set(TInsuranceDetail :: getUpdateTime,LocalDateTime.now()); .set(TInsuranceDetail :: getUpdateTime,LocalDateTime.now());
update(updateWrapper); update(updateWrapper);
...@@ -2804,25 +2807,29 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2804,25 +2807,29 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList.add(param); errorList.add(param);
continue; continue;
} }
//查询结算状态 String defaultSettleId = insuranceDetail.getDefaultSettleId();
LambdaQueryWrapper<TInsuranceSettle> insuranceSettleQuery = new LambdaQueryWrapper<>(); if(StringUtils.isNotEmpty(defaultSettleId)){
insuranceSettleQuery.eq(TInsuranceSettle :: getInsDetailId,insuranceDetail.getId()); //查询结算状态
TInsuranceSettle insuranceSettle = tInsuranceSettleService.getOne(insuranceSettleQuery); LambdaQueryWrapper<TInsuranceSettle> insuranceSettleQuery = new LambdaQueryWrapper<>();
//当前结算状态为结算中时,不能变更结算月 insuranceSettleQuery.eq(TInsuranceSettle :: getInsDetailId,insuranceDetail.getId());
if (CommonConstants.TWO_STRING.equals(insuranceSettle.getSettleHandleStatus())){ TInsuranceSettle insuranceSettle = tInsuranceSettleService.getOne(insuranceSettleQuery);
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_SETTLE_STATUS_TWO_ERROR); if (!Common.isEmpty(insuranceSettle)){
errorList.add(param); //当前结算状态为结算中时,不能变更结算月
continue; if (CommonConstants.TWO_STRING.equals(insuranceSettle.getSettleHandleStatus())){
} param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_SETTLE_STATUS_TWO_ERROR);
//当前结算状态为已结算时,不能变更结算月 errorList.add(param);
if (CommonConstants.THREE_STRING.equals(insuranceSettle.getSettleHandleStatus())){ continue;
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_SETTLE_STATUS_THREE_ERROR); }
errorList.add(param); //当前结算状态为已结算时,不能变更结算月
continue; if (CommonConstants.THREE_STRING.equals(insuranceSettle.getSettleHandleStatus())){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_SETTLE_STATUS_THREE_ERROR);
errorList.add(param);
continue;
}
}
} }
Integer reduceHandleStatus = insuranceDetail.getReduceHandleStatus();
//当前保单信息的为已减员时不能不能变更结算月 //当前保单信息的为已减员时不能不能变更结算月
if( CommonConstants.FOUR_INT == reduceHandleStatus ){ if( CommonConstants.FIVE_INT == insuranceDetail.getBuyHandleStatus() ){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_REFUND_STATUS_FOUR_ERROR); param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_REFUND_STATUS_FOUR_ERROR);
errorList.add(param); errorList.add(param);
continue; continue;
...@@ -2949,7 +2956,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2949,7 +2956,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList.add(param); errorList.add(param);
continue; continue;
}else { }else {
param.setSettleType(Integer.parseInt(settleType)); param.setNewSettleType(Integer.parseInt(settleType));
} }
} }
} }
...@@ -2986,28 +2993,30 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2986,28 +2993,30 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList.add(param); errorList.add(param);
continue; continue;
} }
Integer reduceHandleStatus = insuranceDetail.getReduceHandleStatus();
//当前保单信息的为已减员时,不能变更结算项目 //当前保单信息的为已减员时,不能变更结算项目
if( CommonConstants.FOUR_INT == reduceHandleStatus ){ if( CommonConstants.FIVE_INT == insuranceDetail.getBuyHandleStatus() ){
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_REFUND_STATUS_FOUR_ERROR); param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_REFUND_STATUS_FOUR_ERROR);
errorList.add(param); errorList.add(param);
continue; continue;
} }
//查询结算状态 String defaultSettleId = insuranceDetail.getDefaultSettleId();
LambdaQueryWrapper<TInsuranceSettle> insuranceSettleQuery = new LambdaQueryWrapper<>(); if (StringUtils.isNotBlank(defaultSettleId)){
insuranceSettleQuery.eq(TInsuranceSettle :: getInsDetailId,insuranceDetail.getId()); //查询结算状态
TInsuranceSettle insuranceSettle = tInsuranceSettleService.getOne(insuranceSettleQuery); LambdaQueryWrapper<TInsuranceSettle> insuranceSettleQuery = new LambdaQueryWrapper<>();
//当前结算状态为结算中时,不能变更结算项目 insuranceSettleQuery.eq(TInsuranceSettle :: getInsDetailId,insuranceDetail.getId());
if (CommonConstants.TWO_STRING.equals(insuranceSettle.getSettleHandleStatus())){ TInsuranceSettle insuranceSettle = tInsuranceSettleService.getOne(insuranceSettleQuery);
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_SETTLE_STATUS_TWO_ERROR); //当前结算状态为结算中时,不能变更结算项目
errorList.add(param); if (CommonConstants.TWO_STRING.equals(insuranceSettle.getSettleHandleStatus())){
continue; param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_SETTLE_STATUS_TWO_ERROR);
} errorList.add(param);
//当前结算状态为已结算时,不能变更结算项目 continue;
if (CommonConstants.THREE_STRING.equals(insuranceSettle.getSettleHandleStatus())){ }
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_SETTLE_STATUS_THREE_ERROR); //当前结算状态为已结算时,不能变更结算项目
errorList.add(param); if (CommonConstants.THREE_STRING.equals(insuranceSettle.getSettleHandleStatus())){
continue; param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_SETTLE_STATUS_THREE_ERROR);
errorList.add(param);
continue;
}
} }
//判断当前数据中是否存在重复数据 //判断当前数据中是否存在重复数据
param.setId(insuranceDetail.getId()); param.setId(insuranceDetail.getId());
......
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