Commit 5625cdaa authored by 查济's avatar 查济

Merge branch 'feature-zhaji' into 'develop'

"feature-zhaJi:优化变更项目减员中提示语句,去除购买标准删除校验,优化推送作废信息和推送预估保费的推送状态"

See merge request fangxinjiang/yifu!119
parents deb7d7d0 09b6be88
...@@ -525,7 +525,7 @@ public class InsurancesConstants { ...@@ -525,7 +525,7 @@ public class InsurancesConstants {
/** /**
* 商险已减员,无法变更项目 * 商险已减员,无法变更项目
*/ */
public static final String DEPT_NO_CHANGE_REFUND_STATUS_ONE_ERROR = "商险减员中,无法变更项目"; public static final String DEPT_NO_CHANGE_REFUND_STATUS_ONE_ERROR = "减员流程中,无法变更项目";
/** /**
* 商险结算中,无法变更项目 * 商险结算中,无法变更项目
......
...@@ -38,6 +38,18 @@ public class DeptChangeCheckParam implements Serializable { ...@@ -38,6 +38,18 @@ public class DeptChangeCheckParam implements Serializable {
@Schema(description = "原项目编码") @Schema(description = "原项目编码")
private String oldDeptNo; private String oldDeptNo;
/**
* 新项目名称
*/
@Schema(description = "新项目名称")
private String newDeptName;
/**
* 原项目名称
*/
@Schema(description = "原项目名称")
private String oldDeptName;
/** /**
* 新项目编码 * 新项目编码
*/ */
......
...@@ -2825,10 +2825,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2825,10 +2825,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
cancel.setSettleId(defaultSettleId); cancel.setSettleId(defaultSettleId);
cancel.setCreateUesr(user.getId()); cancel.setCreateUesr(user.getId());
cancel.setCreateTime(LocalDateTime.now()); cancel.setCreateTime(LocalDateTime.now());
cancel.setDeptName(success.getOldDeptName());
cancel.setIsCancelPush(CommonConstants.ZERO_INT);
tInsuranceSettleCancelService.save(cancel); tInsuranceSettleCancelService.save(cancel);
//查询旧的结算信息 //查询旧的结算信息
TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId); TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId);
//推送EKP // TODO: 2022/8/2 //推送EKP // TODO: 2022/8/2
cancel.setIsCancelPush(CommonConstants.ONE_INT);
tInsuranceSettleCancelService.updateById(cancel);
//新增新的结算信息 //新增新的结算信息
TInsuranceSettle newInsuranceSettle = new TInsuranceSettle(); TInsuranceSettle newInsuranceSettle = new TInsuranceSettle();
newInsuranceSettle.setInsDetailId(insuranceDetailId); newInsuranceSettle.setInsDetailId(insuranceDetailId);
...@@ -2868,10 +2872,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2868,10 +2872,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceSettle.setCreateTime(LocalDateTime.now()); tInsuranceSettle.setCreateTime(LocalDateTime.now());
tInsuranceSettleService.save(tInsuranceSettle); tInsuranceSettleService.save(tInsuranceSettle);
//将结算id赋值给保单信息,并新增预估费用 //将结算id赋值给保单信息,并新增预估费用
updateWrapper.set(TInsuranceDetail ::getEstimatePremium,success.getEstimatePremium()); updateWrapper.set(TInsuranceDetail ::getEstimatePremium,success.getEstimatePremium())
updateWrapper.set(TInsuranceDetail :: getDefaultSettleId,tInsuranceSettle.getId()); .set(TInsuranceDetail :: getDefaultSettleId,tInsuranceSettle.getId());
update(updateWrapper); update(updateWrapper);
//推送结算信息至EKP // TODO: 2022/8/2 //推送结算信息至EKP // TODO: 2022/8/2
tInsuranceSettle.setIsEstimatePush(CommonConstants.ONE_INT);
tInsuranceSettle.setEstimatePushTime(LocalDateTime.now());
tInsuranceSettleService.updateById(tInsuranceSettle);
} }
} }
...@@ -2889,9 +2896,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2889,9 +2896,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
cancel.setSettleId(defaultSettleId); cancel.setSettleId(defaultSettleId);
cancel.setCreateUesr(user.getId()); cancel.setCreateUesr(user.getId());
cancel.setCreateTime(LocalDateTime.now()); cancel.setCreateTime(LocalDateTime.now());
cancel.setDeptName(success.getOldDeptName());
cancel.setIsCancelPush(CommonConstants.ZERO_INT);
tInsuranceSettleCancelService.save(cancel); tInsuranceSettleCancelService.save(cancel);
TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId); TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId);
//旧的结算信息推送作废至EKP //旧的结算信息推送作废至EKP,更新推送标识
cancel.setIsCancelPush(CommonConstants.ONE_INT);
tInsuranceSettleCancelService.updateById(cancel);
//新增新的结算信息 //新增新的结算信息
TInsuranceSettle newInsuranceSettle = new TInsuranceSettle(); TInsuranceSettle newInsuranceSettle = new TInsuranceSettle();
newInsuranceSettle.setInsDetailId(insuranceDetailId); newInsuranceSettle.setInsDetailId(insuranceDetailId);
...@@ -2917,8 +2928,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2917,8 +2928,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
cancel.setSettleId(defaultSettleId); cancel.setSettleId(defaultSettleId);
cancel.setCreateUesr(user.getId()); cancel.setCreateUesr(user.getId());
cancel.setCreateTime(LocalDateTime.now()); cancel.setCreateTime(LocalDateTime.now());
cancel.setDeptName(success.getOldDeptName());
cancel.setIsCancelPush(CommonConstants.ZERO_INT);
tInsuranceSettleCancelService.save(cancel); tInsuranceSettleCancelService.save(cancel);
TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId); TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId);
//推送EKP,更新推送标识
cancel.setIsCancelPush(CommonConstants.ONE_INT);
tInsuranceSettleCancelService.updateById(cancel);
//新增新的结算信息 //新增新的结算信息
TInsuranceSettle newInsuranceSettle = new TInsuranceSettle(); TInsuranceSettle newInsuranceSettle = new TInsuranceSettle();
newInsuranceSettle.setInsDetailId(insuranceDetailId); newInsuranceSettle.setInsDetailId(insuranceDetailId);
...@@ -2948,8 +2964,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2948,8 +2964,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
cancel.setSettleId(defaultSettleId); cancel.setSettleId(defaultSettleId);
cancel.setCreateUesr(user.getId()); cancel.setCreateUesr(user.getId());
cancel.setCreateTime(LocalDateTime.now()); cancel.setCreateTime(LocalDateTime.now());
cancel.setDeptName(success.getOldDeptName());
cancel.setIsCancelPush(CommonConstants.ZERO_INT);
tInsuranceSettleCancelService.save(cancel); tInsuranceSettleCancelService.save(cancel);
//推送至EKP // TODO: 2022/8/2 //推送至EKP // TODO: 2022/8/2
cancel.setIsCancelPush(CommonConstants.ONE_INT);
tInsuranceSettleCancelService.updateById(cancel);
//删除预估费用和结算id //删除预估费用和结算id
updateWrapper.set(TInsuranceDetail ::getEstimatePremium,new BigDecimal("0.00")); updateWrapper.set(TInsuranceDetail ::getEstimatePremium,new BigDecimal("0.00"));
updateWrapper.set(TInsuranceDetail :: getDefaultSettleId,null); updateWrapper.set(TInsuranceDetail :: getDefaultSettleId,null);
...@@ -2964,9 +2984,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2964,9 +2984,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
cancel.setSettleId(defaultSettleId); cancel.setSettleId(defaultSettleId);
cancel.setCreateUesr(user.getId()); cancel.setCreateUesr(user.getId());
cancel.setCreateTime(LocalDateTime.now()); cancel.setCreateTime(LocalDateTime.now());
cancel.setDeptName(success.getOldDeptName());
cancel.setIsCancelPush(CommonConstants.ZERO_INT);
tInsuranceSettleCancelService.save(cancel); tInsuranceSettleCancelService.save(cancel);
TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId); TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId);
//推送至EKP作废 // TODO: 2022/8/2 //推送至EKP作废 // TODO: 2022/8/2
cancel.setIsCancelPush(CommonConstants.ONE_INT);
tInsuranceSettleCancelService.updateById(cancel);
//新增新的结算信息 //新增新的结算信息
TInsuranceSettle newInsuranceSettle = new TInsuranceSettle(); TInsuranceSettle newInsuranceSettle = new TInsuranceSettle();
newInsuranceSettle.setInsDetailId(insuranceDetailId); newInsuranceSettle.setInsDetailId(insuranceDetailId);
...@@ -3684,7 +3708,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3684,7 +3708,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue; continue;
} }
//根据项目编码查询项目是否存在 //根据项目编码查询项目是否存在
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(Arrays.asList(newDeptNo)); R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(Arrays.asList(newDeptNo,oldDeptNo));
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS) { if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap(); Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
if (MapUtils.isEmpty(data)){ if (MapUtils.isEmpty(data)){
...@@ -3694,6 +3718,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3694,6 +3718,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}else { }else {
//结算类型,根据项目编码获取,并冗余到明细记录中 //结算类型,根据项目编码获取,并冗余到明细记录中
ProjectSetInfoVo jsonObject = data.get(newDeptNo); ProjectSetInfoVo jsonObject = data.get(newDeptNo);
ProjectSetInfoVo oldJsonObject = data.get(oldDeptNo);
param.setOldDeptName(oldJsonObject.getDepartName());
param.setNewDeptName(jsonObject.getDepartName());
String settleType = jsonObject.getInsuranceSettleType(); String settleType = jsonObject.getInsuranceSettleType();
if (StringUtils.isEmpty(settleType)){ if (StringUtils.isEmpty(settleType)){
param.setErrorMessage(InsurancesConstants.PROJECT_NOT_FIND_SETTLE_TYPE); param.setErrorMessage(InsurancesConstants.PROJECT_NOT_FIND_SETTLE_TYPE);
......
...@@ -84,14 +84,6 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp ...@@ -84,14 +84,6 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
if (Common.isEmpty(byId) || CommonConstants.ONE_INT == byId.getDeleteFlag()){ if (Common.isEmpty(byId) || CommonConstants.ONE_INT == byId.getDeleteFlag()){
return R.failed("购买标准信息不存在或已被删除"); return R.failed("购买标准信息不存在或已被删除");
} }
LambdaQueryWrapper<TInsuranceDetail> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TInsuranceDetail::getInsuranceTypeId,byId.getInsuranceTypeId())
.eq(TInsuranceDetail::getBuyStandard,byId.getBuyStandard())
.eq(TInsuranceDetail::getDeleteFlag,CommonConstants.ZERO_INT);
List<TInsuranceDetail> list = tInsuranceDetailService.list(queryWrapper);
if (Common.isNotEmpty(list)){
return R.failed("当前险种的购买标准已存在对应的商险信息,不能删除");
}
LambdaUpdateWrapper<TInsuranceTypeStandard> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<TInsuranceTypeStandard> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TInsuranceTypeStandard::getId,id) updateWrapper.eq(TInsuranceTypeStandard::getId,id)
.set(TInsuranceTypeStandard::getDeleteFlag, CommonConstants.ONE_INT) .set(TInsuranceTypeStandard::getDeleteFlag, CommonConstants.ONE_INT)
......
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