Commit 45584e7e authored by huyuchen's avatar huyuchen

huych-实缴配置修改

parent 0d14bde7
...@@ -5479,7 +5479,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -5479,7 +5479,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (!BigDecimalUtils.isNullOrZero(actualPremium)){ if (!BigDecimalUtils.isNullOrZero(actualPremium)){
//如果预估和实缴都推送了 //如果预估和实缴都推送了
if(byId.getIsActualPush() == CommonConstants.ONE_INT && if(byId.getIsActualPush() == CommonConstants.ONE_INT &&
byId.getIsEstimatePush() == CommonConstants.ONE_INT && (ygFlag || sjFlag)){ byId.getIsEstimatePush() == CommonConstants.ONE_INT && ygFlag && sjFlag){
//新增新的结算信息 //新增新的结算信息
newInsuranceSettle.setInsDetailId(insuranceDetailId); newInsuranceSettle.setInsDetailId(insuranceDetailId);
newInsuranceSettle.setSettleType(newSettleType); newInsuranceSettle.setSettleType(newSettleType);
...@@ -5768,78 +5768,80 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -5768,78 +5768,80 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
//如果没有登记保费 //如果没有登记保费
if (BigDecimalUtils.isNullOrZero(actualPremium)){ if (BigDecimalUtils.isNullOrZero(actualPremium)){
if(byId.getIsEstimatePush() == CommonConstants.ONE_INT && ygFlag){ if(byId.getIsEstimatePush() == CommonConstants.ONE_INT ){
interactiveParam.setCustomerCode(success.getOldCustomerCode()); if (ygFlag) {
interactiveParam.setCustomerName(success.getOldCustomerName()); interactiveParam.setCustomerCode(success.getOldCustomerCode());
interactiveParam.setDeptNo(success.getOldDeptNo()); interactiveParam.setCustomerName(success.getOldCustomerName());
interactiveParam.setDeptName(success.getOldDeptName()); interactiveParam.setDeptNo(success.getOldDeptNo());
interactiveParam.setInteractiveType(InsurancesConstants.ABOLISH_SETTLE_BILL); interactiveParam.setDeptName(success.getOldDeptName());
interactiveParam.setEstimatePremium(one.getEstimatePremium()); interactiveParam.setInteractiveType(InsurancesConstants.ABOLISH_SETTLE_BILL);
interactiveParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL); interactiveParam.setEstimatePremium(one.getEstimatePremium());
String deleteBody = eKPInsuranceUtil.sendToEkp(interactiveParam); interactiveParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
if (StringUtils.isNotBlank(deleteBody)){ String deleteBody = eKPInsuranceUtil.sendToEkp(interactiveParam);
//推送成功后更新作废信息推送状态 if (StringUtils.isNotBlank(deleteBody)) {
cancel.setIsCancelPush(CommonConstants.ONE_INT); //推送成功后更新作废信息推送状态
tInsuranceSettleCancelService.updateById(cancel); cancel.setIsCancelPush(CommonConstants.ONE_INT);
//变更为单独结算 tInsuranceSettleCancelService.updateById(cancel);
if (CommonConstants.ONE_INT == newSettleType){ //变更为单独结算
//删除预估费用和结算id if (CommonConstants.ONE_INT == newSettleType) {
updateWrapper.set(TInsuranceDetail ::getEstimatePremium,new BigDecimal("0.00")); //删除预估费用和结算id
updateWrapper.set(TInsuranceDetail :: getDefaultSettleId,null); updateWrapper.set(TInsuranceDetail::getEstimatePremium, new BigDecimal("0.00"));
update(updateWrapper); updateWrapper.set(TInsuranceDetail::getDefaultSettleId, null);
} update(updateWrapper);
//变更为合并结算 }
if (CommonConstants.ZERO_INT == newSettleType){ //变更为合并结算
//新增新的结算信息 if (CommonConstants.ZERO_INT == newSettleType) {
newInsuranceSettle.setInsDetailId(insuranceDetailId); //新增新的结算信息
newInsuranceSettle.setSettleType(newSettleType); newInsuranceSettle.setInsDetailId(insuranceDetailId);
newInsuranceSettle.setIsEstimatePush(CommonConstants.ZERO_INT); newInsuranceSettle.setSettleType(newSettleType);
newInsuranceSettle.setIsActualPush(CommonConstants.ZERO_INT); newInsuranceSettle.setIsEstimatePush(CommonConstants.ZERO_INT);
newInsuranceSettle.setSettleHandleStatus(CommonConstants.ONE_STRING); newInsuranceSettle.setIsActualPush(CommonConstants.ZERO_INT);
newInsuranceSettle.setCreateTime(LocalDateTime.now()); newInsuranceSettle.setSettleHandleStatus(CommonConstants.ONE_STRING);
newInsuranceSettle.setEstimatePremium(success.getEstimatePremium()); newInsuranceSettle.setCreateTime(LocalDateTime.now());
tInsuranceSettleService.save(newInsuranceSettle); newInsuranceSettle.setEstimatePremium(success.getEstimatePremium());
//更新结算信息 tInsuranceSettleService.save(newInsuranceSettle);
updateWrapper.set(TInsuranceDetail :: getDefaultSettleId,newInsuranceSettle.getId()); //更新结算信息
update(updateWrapper); updateWrapper.set(TInsuranceDetail::getDefaultSettleId, newInsuranceSettle.getId());
//推送新的结算信息至EKP update(updateWrapper);
interactiveParam.setDefaultSettleId(newInsuranceSettle.getId()); //推送新的结算信息至EKP
interactiveParam.setEstimateStatus(EkpConstants.HAVE); interactiveParam.setDefaultSettleId(newInsuranceSettle.getId());
interactiveParam.setCustomerCode(success.getNewCustomerCode()); interactiveParam.setEstimateStatus(EkpConstants.HAVE);
interactiveParam.setCustomerName(success.getNewCustomerName()); interactiveParam.setCustomerCode(success.getNewCustomerCode());
interactiveParam.setDeptNo(success.getNewDeptNo()); interactiveParam.setCustomerName(success.getNewCustomerName());
interactiveParam.setDeptName(success.getNewDeptName()); interactiveParam.setDeptNo(success.getNewDeptNo());
interactiveParam.setInteractiveType(InsurancesConstants.NEW_SETTLE_BILL); interactiveParam.setDeptName(success.getNewDeptName());
interactiveParam.setEstimatePremium(success.getEstimatePremium()); interactiveParam.setInteractiveType(InsurancesConstants.NEW_SETTLE_BILL);
interactiveParam.setActualPremium(success.getActualPremium()); interactiveParam.setEstimatePremium(success.getEstimatePremium());
interactiveParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL); interactiveParam.setActualPremium(success.getActualPremium());
String estimateBody = eKPInsuranceUtil.sendToEkp(interactiveParam); interactiveParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
if(StringUtils.isNotBlank(estimateBody)){ String estimateBody = eKPInsuranceUtil.sendToEkp(interactiveParam);
//推送成功更新预估推送状态 if (StringUtils.isNotBlank(estimateBody)) {
newInsuranceSettle.setIsEstimatePush(CommonConstants.ONE_INT); //推送成功更新预估推送状态
newInsuranceSettle.setEstimatePushTime(LocalDateTime.now()); newInsuranceSettle.setIsEstimatePush(CommonConstants.ONE_INT);
newInsuranceSettle.setUpdateTime(LocalDateTime.now()); newInsuranceSettle.setEstimatePushTime(LocalDateTime.now());
tInsuranceSettleService.updateById(newInsuranceSettle); newInsuranceSettle.setUpdateTime(LocalDateTime.now());
}else{ tInsuranceSettleService.updateById(newInsuranceSettle);
saveInsuranceEkp(interactiveParam,CommonConstants.ONE_INT); } else {
saveInsuranceEkp(interactiveParam, CommonConstants.ONE_INT);
}
}
} else {
saveInsuranceEkp(interactiveParam, CommonConstants.FOUR_INT);
//变更为合并结算
if (CommonConstants.ZERO_INT == newSettleType) {
//推送新的结算信息至EKP
interactiveParam.setDefaultSettleId(newInsuranceSettle.getId());
interactiveParam.setEstimateStatus(EkpConstants.HAVE);
interactiveParam.setCustomerCode(success.getNewCustomerCode());
interactiveParam.setCustomerName(success.getNewCustomerName());
interactiveParam.setDeptNo(success.getNewDeptNo());
interactiveParam.setDeptName(success.getNewDeptName());
interactiveParam.setInteractiveType(InsurancesConstants.NEW_SETTLE_BILL);
interactiveParam.setEstimatePremium(success.getEstimatePremium());
interactiveParam.setActualPremium(success.getActualPremium());
interactiveParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
saveInsuranceEkp(interactiveParam, CommonConstants.ONE_INT);
} }
}
}else{
saveInsuranceEkp(interactiveParam,CommonConstants.FOUR_INT);
//变更为合并结算
if (CommonConstants.ZERO_INT == newSettleType){
//推送新的结算信息至EKP
interactiveParam.setDefaultSettleId(newInsuranceSettle.getId());
interactiveParam.setEstimateStatus(EkpConstants.HAVE);
interactiveParam.setCustomerCode(success.getNewCustomerCode());
interactiveParam.setCustomerName(success.getNewCustomerName());
interactiveParam.setDeptNo(success.getNewDeptNo());
interactiveParam.setDeptName(success.getNewDeptName());
interactiveParam.setInteractiveType(InsurancesConstants.NEW_SETTLE_BILL);
interactiveParam.setEstimatePremium(success.getEstimatePremium());
interactiveParam.setActualPremium(success.getActualPremium());
interactiveParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
saveInsuranceEkp(interactiveParam,CommonConstants.ONE_INT);
} }
} }
}else{ }else{
......
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