Commit 45584e7e authored by huyuchen's avatar huyuchen

huych-实缴配置修改

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