k94314517
2024-04-03 0a4c7c2b7a73b89c9ac3845f98cac96765a78384
git ch
已修改6个文件
64 ■■■■■ 文件已修改
server/service/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/utils/Constants.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/shop/src/main/java/com/doumee/api/business/ApplyChangeController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java
@@ -1153,7 +1153,7 @@
            }
            Row header1 = sheet.createRow(1);
            header1.createCell(0).setCellValue("投保人");
            header1.createCell(1).setCellValue("报保险人");
            header1.createCell(1).setCellValue("被保险人");
            header1.createCell(2).setCellValue("");
            header1.createCell(3).setCellValue("保险方案");
            header1.createCell(4).setCellValue("保险生效起期");
server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -1375,9 +1375,9 @@
        RETURN_APPLY_SIGNATURE(4, "发起退回申请(已签章)"),
        PLATFORM_AGREE(5, "平台同意(已退回)"),
        CLOSE(6, "已关闭"),
        PALTFORM_CHECK_PASS(7, "审核通过"),
        COMPANY_SIGN(7, "审核通过"),
        PALTFORM_CHECK_PASS_NO(8, "审核不通过"),
        COMPANY_SIGN(9, "企业签署人员名单 - 委托保"),
        WTB_TOUBAOING(9, "投保中"),
        ;
        // 成员变量
        private String name;
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
@@ -135,13 +135,17 @@
            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"未查询到方案信息");
        }
        if(
//                Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.UPLOAD.getKey())
//                ||Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.SIGNATURE.getKey())
//                ||
                Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.APPROVE.getKey())){
            //已提交和已完成状态不支持审核不通过
            throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~");
        if(Constants.equalsInteger(solutions.getType(),Constants.ZERO)){
            if(Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.APPROVE.getKey())){
                //已提交和已完成状态不支持审核不通过
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~");
            }
        }else if(Constants.equalsInteger(solutions.getType(),Constants.ZERO)){
            if(Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.UPLOAD.getKey())
            || Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.SIGNATURE.getKey()) ){
                //已提交和已完成状态不支持审核不通过
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~");
            }
        }
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        ApplyChange update = new ApplyChange();
@@ -1606,14 +1610,10 @@
        }else if(applyChangeOptDTO.getOptType().equals(6)){
            //企业关闭
            applyLogType = Constants.ApplyLogType.CA_COMPANY_CLOSE;
            if(!loginUserInfo.getType().equals(Constants.ONE)){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非企业端用户无法进行该操作");
            }
            if(!applyChange.getStatus().equals(Constants.ApplyChangeStatus.PLATFORM_AGREE.getKey())){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"数据状态错误无法进行该操作!");
            }
            applyChange.setStatus(Constants.ApplyChangeStatus.CLOSE.getKey());
            //存储待办信息
            //删除其他待办
            noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,applyChange.getId()));
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
@@ -113,24 +113,30 @@
            throw  new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        InsuranceApply model = insuranceApplyMapper.selectById(insuranceApply.getId());
        if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){
            throw  new BusinessException(ResponseStatus.DATA_EMPTY);
        }
        if(Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())){
            throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~");
        }
        Solutions solutions = solutionsMapper.selectById(model.getSolutionId());
        if(Objects.isNull(solutions)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询方案信息");
        }
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        InsuranceApply update = new InsuranceApply();
        if(Constants.equalsInteger(solutions.getType(),Constants.ZERO)){
            if(Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())){
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~");
            }
            update.setStatus(Constants.InsuranceApplyStatus.FAIL_RETURN.getKey());
        }else{
            if( !(Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WTB_COMPANY_MEMBER_LIST_SIGNATURE.getKey())
            || Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WTB_COMPANY_APPLY_SIGNATURE.getKey()))){
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~");
            }
            update.setStatus(Constants.InsuranceApplyStatus.WTB_RETURN.getKey());
        }
        update.setEditDate(new Date());
        update.setEditor(user.getId());
        update.setStatus(Constants.InsuranceApplyStatus.FAIL_RETURN.getKey());
        update.setCheckDate(update.getEditDate());
        update.setCheckInfo(insuranceApply.getCheckInfo());
        update.setCheckUserId(user.getId());
server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java
@@ -311,7 +311,7 @@
                        .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId)
                        .eq(ApplyChange::getIsdeleted, Constants.ZERO)
                        .eq(InsuranceApply::getUnionApplyId,saveUnionChangeDTO.getUnionApplyId())
                        .eq(ApplyChange::getStatus,Constants.ApplyChangeStatus.PALTFORM_CHECK_PASS.getKey())
                        .eq(ApplyChange::getStatus,Constants.ApplyChangeStatus.COMPANY_SIGN.getKey())
                        .eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())
                        .eq(ApplyChange::getType,saveUnionChangeDTO.getBusinessType())
                        .in(ApplyChange::getId,saveUnionChangeDTO.getApplyIds())
@@ -336,6 +336,7 @@
                .set(ApplyChange::getUnionChangeId,unionChange.getId())
                .set(ApplyChange::getCheckDate,new Date())
                .set(ApplyChange::getCheckUserId,user.getId())
                .set(ApplyChange::getStatus,Constants.ApplyChangeStatus.WTB_TOUBAOING.getKey())
                .in(ApplyChange::getId,saveUnionChangeDTO.getApplyIds())
        );
@@ -391,6 +392,7 @@
                .set(ApplyChange::getUnionChangeId,null)
                .set(ApplyChange::getCheckDate,new Date())
                .set(ApplyChange::getCheckUserId,user.getId())
                .set(ApplyChange::getStatus,Constants.ApplyChangeStatus.COMPANY_SIGN.getKey())
                .in(ApplyChange::getUnionChangeId,unionChange.getId())
        );
server/shop/src/main/java/com/doumee/api/business/ApplyChangeController.java
@@ -6,6 +6,7 @@
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.dto.ApplyChangeOptDTO;
import com.doumee.dao.business.model.ApplyChange;
import com.doumee.dao.business.model.InsuranceApply;
import com.doumee.service.business.ApplyChangeService;
@@ -149,4 +150,15 @@
    public ApiResponse check(@RequestBody ApplyChange model) {
        return ApiResponse.success(applyChangeService.check(model));
    }
    @ApiOperation(value = "业务处理",notes = "退回申请,关闭等")
    @PostMapping("/applyChangeOpt")
    public ApiResponse applyChangeOpt (@RequestBody ApplyChangeOptDTO applyChangeOptDTO) {
        applyChangeService.changeOpt(applyChangeOptDTO);
        return ApiResponse.success("操作成功");
    }
}