111
k94314517
2024-01-26 c21d5551744f8f55aa44157c17985243670bec24
server/service/src/main/java/com/doumee/service/business/impl/SettleClaimsServiceImpl.java
@@ -83,8 +83,8 @@
            throw  new BusinessException(ResponseStatus.DATA_EMPTY);
        }
        if((Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.RETURN_ACCEPTANCE.getKey())
                ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.FINISH_ACCEPTANCE.getKey()))){
        if((Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.FINISH_ACCEPTANCE.getKey())
                ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.RETURN_ACCEPTANCE.getKey()))){
            throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请当前不支持该操作~");
        }
@@ -123,8 +123,8 @@
        if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){
            throw  new BusinessException(ResponseStatus.DATA_EMPTY);
        }
        if(!(Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.DEAL_ING.getKey()))){
        if((Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.FINISH_ACCEPTANCE.getKey())
                ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.RETURN_ACCEPTANCE.getKey()))){
            throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请当前不支持该操作~");
        }
@@ -148,7 +148,7 @@
    }
    /**
     * 理赔结案提交
     * 理赔备注标签
     * @param param
     * @return
     */
@@ -158,17 +158,15 @@
                ||StringUtils.isBlank( param.getCheckInfo()) ){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        SettleClaims model = settleClaimsMapper.selectById(param.getId());
        if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){
            throw  new BusinessException(ResponseStatus.DATA_EMPTY);
        }
   /*
        if(!(Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.DEAL_ING.getKey())
              ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.CONFIRM_INFORMATION.getKey()))){
        if((Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.FINISH_ACCEPTANCE.getKey())
                ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.RETURN_ACCEPTANCE.getKey()))){
            throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请当前不支持该操作~");
        }
*/
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        SettleClaims update = new SettleClaims();
        update.setEditDate(new Date());
@@ -204,8 +202,8 @@
            throw  new BusinessException(ResponseStatus.DATA_EMPTY);
        }
        //受理中和已确认资料可以进行理赔处理
        if(!(Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.DEAL_ING.getKey())
              ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.CONFIRM_INFORMATION.getKey()))){
        if((Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.FINISH_ACCEPTANCE.getKey())
              ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.RETURN_ACCEPTANCE.getKey()))){
            throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请当前不支持该操作~");
        }
@@ -218,6 +216,11 @@
        update.setCheckUserId(user.getId());
        update.setStatus(Constants.SettleClaimsStatus.FINISH_ACCEPTANCE.getKey());
        update.setId(model.getId());
        update.setYlClaimAccount(Constants.formatBigdecimal(param.getYlClaimAccount()));
        update.setSwClaimAccount(Constants.formatBigdecimal(param.getSwClaimAccount()));
        update.setWgClaimAccount(Constants.formatBigdecimal(param.getWgClaimAccount()));
        update.setScClaimAccount(Constants.formatBigdecimal(param.getScClaimAccount()));
        update.setClaimAccount(update.getYlClaimAccount().add(update.getSwClaimAccount()).add(update.getScClaimAccount()).add(update.getWgClaimAccount()));
        settleClaimsMapper.updateById(update);
        Constants.SettleClaimsLogType applyLogType = Constants.SettleClaimsLogType.PLATFORM_FINISH;
@@ -239,17 +242,15 @@
                ||StringUtils.isBlank( param.getCheckInfo()) ){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        SettleClaims model = settleClaimsMapper.selectById(param.getId());
        if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){
            throw  new BusinessException(ResponseStatus.DATA_EMPTY);
        }
        //受理中和已确认资料可以进行理赔处理
        if(!(Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.DEAL_ING.getKey())
              ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.CONFIRM_INFORMATION.getKey()))){
        if( Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.RETURN_ACCEPTANCE.getKey())
              ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.FINISH_ACCEPTANCE.getKey())){
            throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请当前不支持该操作~");
        }
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        SettleClaims update = new SettleClaims();
        update.setEditDate(new Date());