nidapeng
2024-04-01 91ef431d0dda430889b190f79afd9c0849b35b5e
提交一把
已修改4个文件
72 ■■■■■ 文件已修改
company/src/components/business/detailsEntrustedInsurance.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/dto/InsuranceApplyQueryDTO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/shop/src/main/java/com/doumee/api/business/InsuranceApplyController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/detailsEntrustedInsurance.vue
@@ -20,7 +20,7 @@
              <el-button v-if="[0].includes(model.status) " type="primary" @click="$refs.OperaUnionApplyCheckWindow.open('上传投保单',model,2)">上传投保单</el-button>
              <el-button v-if="model.status == 1" type="primary" @click="getSignLink(0)">签署投保单</el-button>
              <el-button v-if="[2,3,4].includes(model.status)" type="primary" @click="viewToubaodan">查看投保单</el-button>
              <el-button v-if="[3].includes(model.status) " type="primary" @click="$refs.OperaUnionApplyCheckWindow.open('上传投保单',model,3)">上传保险单</el-button>
              <el-button v-if="[2].includes(model.status) " type="primary" @click="$refs.OperaUnionApplyCheckWindow.open('上传保险单',model,3)">上传保险单</el-button>
              <el-button v-if="model.status == 4" type="primary" @click="viewBaoxiandan">查看保险单</el-button>
              <el-button v-if="[0,1,2].includes(model.status) " type="danger" @click="$refs.OperaUnionApplyCheckWindow.open('退回投保',model,1)">退回申请</el-button>
            </template>
server/service/src/main/java/com/doumee/dao/business/dto/InsuranceApplyQueryDTO.java
@@ -80,4 +80,8 @@
    @ApiModelProperty(value = "生效中 0=是")
    private Integer isEffective;
    @ApiModelProperty(value = "合并单编码")
    private Integer unionApplyId;
    @ApiModelProperty(value = "是否获取附件信息 0不需要 1需要")
    private Integer getFiles;
}
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
@@ -1932,9 +1932,13 @@
        queryWrapper.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId);
        queryWrapper.leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId);
        queryWrapper.eq(InsuranceApply::getIsdeleted,Constants.ZERO);
        queryWrapper.eq(model.getUnionApplyId()!=null,InsuranceApply::getUnionApplyId, model.getUnionApplyId());
        //企业人员查看本企业数据
        if(loginUserInfo.getType().equals(Constants.ONE)){
            queryWrapper.eq(InsuranceApply::getCompanyId, loginUserInfo.getCompanyId());
        }else if(loginUserInfo.getType().equals(Constants.TWO)){
            //如果是商家查看
            queryWrapper.eq(Solutions::getShopId, loginUserInfo.getCompanyId());
        }else{
            if(loginUserInfo.getCompanyIdList()!=null && loginUserInfo.getCompanyIdList().size()>0){
                queryWrapper.in(InsuranceApply::getCompanyId, loginUserInfo.getCompanyIdList());
@@ -1985,9 +1989,64 @@
            queryWrapper.ge(InsuranceApply::getEndTime,DateUtil.DateToStr(new Date(),"yyyy-MM-dd HH:mm:ss"));
        }
        List<InsuranceApply> list = insuranceApplyJoinMapper.selectJoinList(InsuranceApply.class, queryWrapper);
        if(Constants.equalsObject(model.getGetFiles(),Constants.ONE)){
            //如果是合并单,需要查询附件信息
            initFileForList(list);
        }
        return list;
    }
    private void initFileForList(List<InsuranceApply> list) {
        List<Integer> objList =  new ArrayList<>();
        if(list!=null && list.size()>0){
            for(InsuranceApply param : list){
                objList.get(param.getId());
            }
        }else{
            return;
        }
        List<Multifile> multifiles = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda()
                .in(Multifile::getObjId,objList)
                .in(Multifile::getObjType,Arrays.asList(new Integer[]{Constants.MultiFile.BD_APPLY_PDF.getKey()
                        ,Constants.MultiFile.BD_SIGNED_PDF.getKey()
                        ,Constants.MultiFile.WTB_CONFIRMATION_LATTER.getKey()
                        ,Constants.MultiFile.MEMBER_LIST_LATTER.getKey()
                        ,Constants.MultiFile.BD_DONE_PDF.getKey()}))
                .eq(Multifile::getIsdeleted,Constants.ZERO)
                .orderByAsc(Multifile::getId));
        if(multifiles!=null && multifiles.size()>0){
            String path = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()
                    +systemDictDataBiz.queryByCode(Constants.OSS,Constants.APPLY_FILE).getCode();
                for(InsuranceApply model : list){
                    for(Multifile f : multifiles) {
                        if (StringUtils.isBlank(f.getFileurl())) {
                            continue;
                        }
                        f.setFileurlFull(path+f.getFileurl());
                        if(Constants.equalsInteger(f.getObjId(), model.getId()) ){
                            if (Constants.equalsInteger(f.getObjType(), Constants.MultiFile.BD_APPLY_PDF.getKey())) {
                                //签署前的投保单
                                model.setToubaodanFile(f);
                            } else if (Constants.equalsInteger(f.getObjType(), Constants.MultiFile.BD_SIGNED_PDF.getKey())) {
                                //签署后的投保单
                                model.setToubaodanSignedFile(f);
                            } else if (Constants.equalsInteger(f.getObjType(), Constants.MultiFile.BD_DONE_PDF.getKey())) {
                                //最終保险单
                                model.setBaoxiandanFile(f);
                            } else if (Constants.equalsInteger(f.getObjType(), Constants.MultiFile.MEMBER_LIST_LATTER.getKey())) {
                                //申请单
                                model.setShenqingdanFile(f);
                            } else if (Constants.equalsInteger(f.getObjType(), Constants.MultiFile.WTB_CONFIRMATION_LATTER.getKey())) {
                                //签署后确认书
                                model.setFanganFile(f);
                            }
                        }
                    }
                }
        }
    }
    @Override
    public long count(InsuranceApply insuranceApply) {
server/shop/src/main/java/com/doumee/api/business/InsuranceApplyController.java
@@ -50,6 +50,13 @@
    public ApiResponse back(@RequestBody InsuranceApply insuranceApply) {
        return ApiResponse.success(insuranceApplyService.back(insuranceApply));
    }
    @ApiOperation("列表")
    @PostMapping("/findListByDTO")
    @RequiresPermissions("business:insuranceapply:query")
    public ApiResponse<List<InsuranceApply>> findListByDTO (@RequestBody InsuranceApplyQueryDTO insuranceApplyQueryDTO) {
        return ApiResponse.success(insuranceApplyService.findListByDTO(insuranceApplyQueryDTO));
    }
    @ApiOperation("商户关闭委托投保")
    @PostMapping("/closeWtbForShop")
    @RequiresPermissions("business:insuranceapply:back")