jiangping
2024-03-05 2e1ac74716f62ca5712d0187cb7d7d25ee13efe5
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
@@ -334,7 +334,8 @@
            //如果是驳回,只能可驳回已签章状态下的退回申请状态进行操作
            if(!(Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_SIGNATURE.getKey())||
                Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_WAIT_SIGNATURE.getKey())||
                Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_UPLOAD.getKey()))
                Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_UPLOAD.getKey())||
                    Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_PASS.getKey()))
            ){
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~");
            }
@@ -347,6 +348,8 @@
                update.setStatus(Constants.InsuranceApplyStatus.WAIT_SIGNATURE.getKey());
            }else if(  Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_UPLOAD.getKey())){
                update.setStatus(Constants.InsuranceApplyStatus.UPLOAD.getKey());
            }else if(  Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_PASS.getKey())){
                update.setStatus(Constants.InsuranceApplyStatus.PLATFORM_CHECK_PASS.getKey());
            }
        }else{
            //如果是同意,两种申请退回状态都可操作
@@ -808,8 +811,8 @@
        noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey())
                .ne(Notices::getType,Constants.NoticeType.SIX.getStatus())
                .eq(Notices::getObjId,model.getId()));
        Notices notices = new Notices(noticeObjectType,Constants.ONE,model.getId(),solutions.getName(),model.getCompanyId(),noticeType);
        noticesMapper.insert(notices);
//        Notices notices = new Notices(noticeObjectType,Constants.ONE,model.getId(),solutions.getName(),model.getCompanyId(),noticeType);
//        noticesMapper.insert(notices);
        String info =applyLogType.getInfo();
        if(StringUtils.isNotBlank(update.getCheckInfo())){
@@ -1229,7 +1232,7 @@
            queryWrapper.in(InsuranceApply::getStatus, pageWrap.getModel().getStatus().split(","));
        }
        if (pageWrap.getModel().getLoseEfficacy() != null && pageWrap.getModel().getLoseEfficacy() ==1) {
            queryWrapper.apply("  DATEDIFF(t.END_TIME,CURRENT_DATE() ) <= 5 ");
            queryWrapper.apply("  DATEDIFF(t.END_TIME,CURRENT_DATE() ) <= 5  and t.END_TIME >= now() ");
        }
        if(CollectionUtils.isNotEmpty(pageWrap.getSorts())){
            for(PageWrap.SortData sortData: pageWrap.getSorts()) {
@@ -1513,6 +1516,7 @@
        if(insuranceApplyOptDTO.getOptType().equals(Constants.ONE)){
            if(!(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.UPLOAD.getKey())
                    ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.WAIT_SIGNATURE.getKey())
                    ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.PLATFORM_CHECK_PASS.getKey())
                    ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.SIGNATURE.getKey()))){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"数据状态非可申请退回!");
            }
@@ -1522,6 +1526,8 @@
                insuranceApplyStatus =  Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_WAIT_SIGNATURE;
            }else  if(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.SIGNATURE.getKey())){
                insuranceApplyStatus =  Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_SIGNATURE;
            }else  if(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.PLATFORM_CHECK_PASS.getKey())){
                insuranceApplyStatus =  Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_PASS;
            }
            //存储待办信息