Commit d02449a8 authored by 查济's avatar 查济

Merge branch 'feature-zhaji' into 'develop'

Feature zhaji

See merge request fangxinjiang/yifu!234
parents 7214fabe ff5fcbd8
......@@ -1109,6 +1109,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
try{
updateInsuranceInfo(detail,settle);
}catch (Exception e){
// todo 异常处理
log.error("收入数据同步处理失败:"+e);
}
......@@ -1544,7 +1545,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
boolean booleanInvoiceNo = StringUtils.isNotBlank(invoiceNo) && !invoiceNo.equals(detail.getInvoiceNo());
boolean booleanPolicyNo = StringUtils.isNotBlank(policyNo) && !policyNo.equals(detail.getPolicyNo());
//如果当前保费为空,且保单号或发票号不一样
if(StringUtils.isBlank(success.getActualPremium()) && (!booleanInvoiceNo || !booleanPolicyNo)){
if((StringUtils.isBlank(success.getActualPremium()) || new BigDecimal(success.getActualPremium()).compareTo(detail.getActualPremium()) == 0) && (!booleanInvoiceNo || !booleanPolicyNo)){
if(StringUtils.isNotBlank(detail.getDefaultSettleId())){
TInsuranceSettle settle = tInsuranceSettleService.getById(detail.getDefaultSettleId());
if(Optional.ofNullable(settle).isPresent()){
......@@ -3883,7 +3884,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
interactiveParam.setDeptName(success.getNewDeptName());
interactiveParam.setInteractiveType(InsurancesConstants.NEW_SETTLE_BILL);
interactiveParam.setEstimatePremium(success.getEstimatePremium());
interactiveParam.setActualPremium(null);
interactiveParam.setActualPremium(success.getActualPremium());
interactiveParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
String estimateBody = eKPInsuranceUtil.sendToEkp(interactiveParam);
if(StringUtils.isNotBlank(estimateBody)){
......@@ -3955,7 +3956,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
interactiveParam.setDeptNo(success.getNewDeptNo());
interactiveParam.setDeptName(success.getNewDeptName());
interactiveParam.setInteractiveType(InsurancesConstants.NEW_SETTLE_BILL);
interactiveParam.setEstimatePremium(null);
interactiveParam.setEstimatePremium(success.getEstimatePremium());
interactiveParam.setActualPremium(success.getActualPremium());
interactiveParam.setSettleType(InsurancesConstants.ACTUAL_SETTLE_BILL);
String actualBody = eKPInsuranceUtil.sendToEkp(interactiveParam);
......@@ -3980,7 +3981,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
interactiveParam.setDeptNo(success.getNewDeptNo());
interactiveParam.setDeptName(success.getNewDeptName());
interactiveParam.setInteractiveType(InsurancesConstants.NEW_SETTLE_BILL);
interactiveParam.setEstimatePremium(null);
interactiveParam.setEstimatePremium(success.getEstimatePremium());
interactiveParam.setActualPremium(success.getActualPremium());
interactiveParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
String actualBody = eKPInsuranceUtil.sendToEkp(interactiveParam);
......@@ -4025,7 +4026,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
interactiveParam.setInteractiveType(InsurancesConstants.NEW_SETTLE_BILL);
//推送预估单
interactiveParam.setEstimatePremium(success.getEstimatePremium());
interactiveParam.setActualPremium(null);
interactiveParam.setActualPremium(success.getActualPremium());
interactiveParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
String estimateBody = eKPInsuranceUtil.sendToEkp(interactiveParam);
if (StringUtils.isNotBlank(estimateBody)) {
......@@ -4035,7 +4036,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceSettleService.updateById(newInsuranceSettle);
//推送实缴单
interactiveParam.setSettleType(InsurancesConstants.ACTUAL_SETTLE_BILL);
interactiveParam.setEstimatePremium(null);
interactiveParam.setEstimatePremium(success.getEstimatePremium());
interactiveParam.setActualPremium(success.getActualPremium());
String actualBody = eKPInsuranceUtil.sendToEkp(interactiveParam);
if (StringUtils.isNotBlank(actualBody)) {
......@@ -4066,7 +4067,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
interactiveParam.setInteractiveType(InsurancesConstants.NEW_SETTLE_BILL);
//推送预估单
interactiveParam.setEstimatePremium(success.getEstimatePremium());
interactiveParam.setActualPremium(null);
interactiveParam.setActualPremium(success.getActualPremium());
interactiveParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
String estimateBody = eKPInsuranceUtil.sendToEkp(interactiveParam);
if (StringUtils.isNotBlank(estimateBody)) {
......@@ -4076,7 +4077,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceSettleService.updateById(newInsuranceSettle);
//推送实缴单
interactiveParam.setSettleType(InsurancesConstants.ACTUAL_SETTLE_BILL);
interactiveParam.setEstimatePremium(null);
interactiveParam.setEstimatePremium(success.getEstimatePremium());
interactiveParam.setActualPremium(success.getActualPremium());
String actualBody = eKPInsuranceUtil.sendToEkp(interactiveParam);
if (StringUtils.isNotBlank(actualBody)) {
......@@ -4141,7 +4142,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
interactiveParam.setDeptName(success.getNewDeptName());
interactiveParam.setInteractiveType(InsurancesConstants.NEW_SETTLE_BILL);
interactiveParam.setEstimatePremium(success.getEstimatePremium());
interactiveParam.setActualPremium(null);
interactiveParam.setActualPremium(success.getActualPremium());
interactiveParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
String estimateBody = eKPInsuranceUtil.sendToEkp(interactiveParam);
if(StringUtils.isNotBlank(estimateBody)){
......@@ -4167,7 +4168,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
interactiveParam.setDeptName(success.getNewDeptName());
interactiveParam.setInteractiveType(InsurancesConstants.NEW_SETTLE_BILL);
interactiveParam.setEstimatePremium(success.getEstimatePremium());
interactiveParam.setActualPremium(null);
interactiveParam.setActualPremium(success.getActualPremium());
interactiveParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
String estimateBody = eKPInsuranceUtil.sendToEkp(interactiveParam);
if(StringUtils.isNotBlank(estimateBody)){
......@@ -5570,10 +5571,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link String}
*/
public String pushEstimate(TInsuranceDetail tInsuranceDetail,Integer type){
YifuUser user = SecurityUtils.getUser();
Integer pushType = null;
//1,推送预估保费,2,推送实际保费,3推送预估冲正保费,4更新实际保费
EkpInteractiveParam param = new EkpInteractiveParam();
List<String> deptNoList =new ArrayList<>();
TInsuranceSettleCancel cancel = new TInsuranceSettleCancel();
deptNoList.add(tInsuranceDetail.getDeptNo());
BeanCopyUtils.copyProperties(tInsuranceDetail,param);
param.setDetailId(tInsuranceDetail.getId());
......@@ -5637,6 +5640,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//作废
if(CommonConstants.FIVE_INT == type){
cancel.setDeptNo(tInsuranceDetail.getDeptNo());
cancel.setInsDetailId(tInsuranceDetail.getId());
cancel.setSettleId(tInsuranceDetail.getDefaultSettleId());
cancel.setCreateUesr(user.getId());
cancel.setCreateTime(LocalDateTime.now());
cancel.setDeptName(param.getDeptName());
cancel.setIsCancelPush(CommonConstants.ZERO_INT);
tInsuranceSettleCancelService.save(cancel);
param.setInteractiveType(InsurancesConstants.ABOLISH_SETTLE_BILL);
param.setSettleType(CommonConstants.EMPTY_STRING);
pushType = CommonConstants.FOUR_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