k94314517
2024-03-29 7e346c75d1878d4b6dc24ecdf4ba8c27452c37e0
git ch
已修改2个文件
64 ■■■■ 文件已修改
server/service/src/main/java/com/doumee/core/utils/Constants.java 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -707,6 +707,7 @@
        THSQZ(5, "申请退回"),
        YGB(6, "已关闭"),
        DQYQZ(7, "待签署"),
        WTBDQS(28, "待签署"),
        WTBDSH(21, "待审核"),
        WTBDCD(22, "待出单"),
@@ -959,24 +960,22 @@
    public  enum UnionChangeStatus {
        MERGE(0, "待签署申请单","",0),
        UPLOAD_INSURANCE_POLICY(1, "待上传保单","",0),
        FINISH(2, "保障中","",0),
        CLOSE(3, "关闭","",0),
        MERGE(0, "待签署申请单",""),
        UPLOAD_INSURANCE_POLICY(1, "待上传保单",""),
        FINISH(2, "保障中",""),
        CLOSE(3, "关闭",""),
        ;
        // 成员变量
        private String name;
        private String info;
        private int key;
        private int collectStatus;
        // 构造方法
        UnionChangeStatus(int key, String name,String info,int collectStatus) {
        UnionChangeStatus(int key, String name,String info) {
            this.name = name;
            this.key = key;
            this.info = info;
            this.collectStatus = collectStatus;
        }
        // 普通方法
@@ -984,25 +983,6 @@
            for (UnionChangeStatus c : UnionChangeStatus.values()) {
                if (c.getKey() == index) {
                    return c.name;
                }
            }
            return null;
        }
        public static List<Integer> getKesByStatus(Integer collectStatus) {
            List<Integer>  list = new ArrayList<>();
            if(collectStatus!=null){
                for (UnionChangeStatus c : UnionChangeStatus.values()) {
                    if (Constants.equalsInteger(c.getCollectStatus() ,collectStatus)) {
                        list.add(c.getKey());
                    }
                }
            }
            return list;
        }
        public static Integer getCollectStatus(Integer index) {
            for (UnionChangeStatus c : UnionChangeStatus.values()) {
                if (Constants.equalsInteger(c.getKey() , index)) {
                    return c.collectStatus;
                }
            }
            return null;
@@ -1039,14 +1019,6 @@
        public void setInfo(String info) {
            this.info = info;
        }
        public int getCollectStatus() {
            return collectStatus;
        }
        public void setCollectStatus(int collectStatus) {
            this.collectStatus = collectStatus;
        }
    }
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
@@ -1621,13 +1621,34 @@
        QueryWrapper<InsuranceApply> wrapper = new QueryWrapper<>(insuranceApply);
        return insuranceApplyMapper.selectList(wrapper);
    }
    public List<Integer> getCollectStatus(Integer collectStatus){
        List<Integer> statusList = Constants.InsuranceApplyStatus.getKesByStatus(collectStatus);
        if(collectStatus.equals(Constants.ApplyCollectStatus.DCD)){
            statusList.addAll(Constants.InsuranceApplyStatus.getKesByStatus(Constants.ApplyCollectStatus.WTBDCD.getKey()));
        }else if(collectStatus.equals(Constants.ApplyCollectStatus.DSP)){
            statusList.addAll(Constants.InsuranceApplyStatus.getKesByStatus(Constants.ApplyCollectStatus.WTBDSH.getKey()));
        }else if(collectStatus.equals(Constants.ApplyCollectStatus.BZZ)){
            statusList.addAll(Constants.InsuranceApplyStatus.getKesByStatus(Constants.ApplyCollectStatus.WTBBZZ.getKey()));
        }else if(collectStatus.equals(Constants.ApplyCollectStatus.YTH)){
            statusList.addAll(Constants.InsuranceApplyStatus.getKesByStatus(Constants.ApplyCollectStatus.WTBYTH.getKey()));
        }else if(collectStatus.equals(Constants.ApplyCollectStatus.YGB)){
            statusList.addAll(Constants.InsuranceApplyStatus.getKesByStatus(Constants.ApplyCollectStatus.WTBYGB.getKey()));
        }else if(collectStatus.equals(Constants.ApplyCollectStatus.DQYQZ)){
            statusList.addAll(Constants.InsuranceApplyStatus.getKesByStatus(Constants.ApplyCollectStatus.WTBDQS.getKey()));
        }
        return statusList;
    }
  
    @Override
    public PageData<InsuranceApply> findPage(PageWrap<InsuranceApplyQueryDTO> pageWrap) {
        IPage<InsuranceApply> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
        MPJLambdaWrapper<InsuranceApply> queryWrapper = new MPJLambdaWrapper<>();
        Utils.MP.blankToNull(pageWrap.getModel());
        List<Integer> statusList = Constants.InsuranceApplyStatus.getKesByStatus(pageWrap.getModel().getStatusCollect());
        List<Integer> statusList = this.getCollectStatus(pageWrap.getModel().getStatusCollect());
        queryWrapper.selectAll(InsuranceApply.class);
        queryWrapper.selectAs(Company::getName,InsuranceApply::getCompanyName);
        queryWrapper.selectAs(Solutions::getName,InsuranceApply::getSolutionsName);
@@ -2163,6 +2184,7 @@
        ){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        smsEmailService.validateCode(smsCheckDTO.getCode());
        MPJLambdaWrapper wrapper=  new MPJLambdaWrapper<InsuranceApply>()