111
k94314517
2024-02-23 8a7693fb0c93235dfc9fdd9477992d0bfb41d5f9
111
已修改18个文件
307 ■■■■ 文件已修改
server/company/src/main/java/com/doumee/api/business/DispatchUnitController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/company/src/main/java/com/doumee/api/business/NoticesController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/company/src/main/java/com/doumee/api/business/SettleClaimsController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/utils/Constants.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/ApplyChagneDetail.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/InsuranceApply.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/MemberInsurance.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/ApplyChagneDetailServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java 101 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/DuWorktypeServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java 67 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/InsuranceServiceImpl.java 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/SettleClaimsServiceImpl.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/WorktypeServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/company/src/main/java/com/doumee/api/business/DispatchUnitController.java
@@ -120,7 +120,6 @@
    @PostMapping("/findListByDTO")
    @RequiresPermissions("business:dispatchunit:query")
    public ApiResponse<List<DispatchUnit>> findListByDTO (@RequestBody DispatchUnitQueryDTO dispatchUnitQueryDTO) {
        dispatchUnitQueryDTO.setDataType(Constants.TWO);
        return ApiResponse.success(dispatchUnitService.findByDTO(dispatchUnitQueryDTO));
    }
server/company/src/main/java/com/doumee/api/business/NoticesController.java
@@ -12,6 +12,8 @@
import com.doumee.dao.business.vo.ApplyNoticeVO;
import com.doumee.service.business.NoticesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -105,6 +107,9 @@
    @ApiOperation("投保单关闭提醒")
    @GetMapping("/closeApplyNotice")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "关闭类型:1=待签署提醒;6=续保提醒", required = true),
    })
    public ApiResponse closeApplyNotice(@RequestParam Integer type) {
        LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        noticesService.closeApplyNotice(loginUserInfo.getCompanyId(),type);
server/company/src/main/java/com/doumee/api/business/SettleClaimsController.java
@@ -3,6 +3,8 @@
import com.doumee.api.BaseController;
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
@@ -84,6 +86,15 @@
        return ApiResponse.success(null);
    }
    @ApiOperation("资料下载")
    @PostMapping("/exportFiles")
    @RequiresPermissions("business:settleclaims:exportExcel")
    public void exportFiles(@RequestBody SettleClaims model,HttpServletResponse response) {
        if(model.getId() == null){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        settleClaimsService.exportFiles(model.getId(),response);
    }
    @ApiOperation("分页查询")
    @PostMapping("/page")
server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -748,7 +748,7 @@
        PLATFORM_AGREE_BACK(8, "同意退回申请","",0),
        PLATFORM_UN_AGREE_BACK(9, "驳回退回申请","提交意见:${param}",0),
        COMPANY_EDIT(10, "保单修改","提交意见:${param1}\n${param2}",0),
        PLATFORM_CHECK_PASS(11, "投保审核通过","",0),
        PLATFORM_CHECK_PASS(11, "投保审核通过","提交意见:${param}",0),
        UPLOAD_AGAIN(26, "再次投保","",0),
        PALTFORM_EDIT_BD(22, "修改保单","修改原因:${param}",0),
@@ -758,7 +758,7 @@
        CA_PLATFORM_APPROVE(14, "批单完成","保险生效起期:${param1}变更为${param2}",1),
        CA_PLATFORM_CHECK_SIGNATURE(15, "企业签章","",1),
        CA_COMPANY_EDIT(16, "批单修改","提交意见:${param1}\n${param2}",1),
        CA_COMPANY_COMMIT(17, "提交投保","提交意见:${param}",1),
        CA_COMPANY_COMMIT(17, "提交投保","",1),
        CA_COMPANY_BACK_APPLY(18, "申请退回","提交意见:${param}",1),
        CA_COMPANY_CLOSE(19, "关闭订单","",1),
        CA_PALTFORM_REFUSE_APPLY(20, "驳回退回申请","",1),
@@ -1005,8 +1005,8 @@
    public  enum NoticeType {
        ZERO(0, "待审批","","","待审核","已申请","待受理"),
        ONE(1, "企业待签署","","","工种待审核","","完成受理"),
        ZERO(0, "待审批","","","待审核","待处理","处理中"),
        ONE(1, "企业待签署","","","工种待审核","","处理中"),
        TWO(2, "待出单","待审批","待审批","","",""),
        THREE(3, "申请退回","申请退回","申请退回","","",""),
        FOUR(4, "已退回","已退回","已退回","","",""),
server/service/src/main/java/com/doumee/dao/business/model/ApplyChagneDetail.java
@@ -140,5 +140,13 @@
    @ApiModelProperty(value = "投保申请编码", example = "1")
    @TableField(exist = false)
    private Integer applyId;
    @ApiModelProperty(value = "方案主键", example = "1")
    @TableField(exist = false)
    private Integer solutionId;
    @ApiModelProperty(value = "年龄")
    @TableField(exist = false)
    private long age;
}
server/service/src/main/java/com/doumee/dao/business/model/InsuranceApply.java
@@ -208,6 +208,11 @@
    @TableField(exist = false)
    private Integer timeUnit;
    @ApiModelProperty(value = "最新版本的方案主键", example = "1")
    @TableField(exist = false)
    private Integer newVersionSolutionId;
    public TaxesInvoicingVO toTaxesInvoicingVO(){
        TaxesInvoicingVO taxesInvoicingVO = new TaxesInvoicingVO();
        taxesInvoicingVO.setId(this.getId());
server/service/src/main/java/com/doumee/dao/business/model/MemberInsurance.java
@@ -52,7 +52,7 @@
    //加减保申请数据
    public MemberInsurance(ApplyChagneDetail applyChangeDetail, ApplyChange applyChange, Integer sysUserId,Integer applyDetailId){
    public MemberInsurance(ApplyChagneDetail applyChangeDetail, ApplyChange applyChange, Integer sysUserId,Integer applyDetailId,Integer solutionId){
        this.createDate = new Date();
        this.creator = sysUserId;
        this.isdeleted = Constants.ZERO;
@@ -73,6 +73,7 @@
        this.duName = applyChangeDetail.getDuName();
//        this.relationType = Constants.ONE;
        this.relationId = applyDetailId;
        this.solutionId=solutionId;
    }
server/service/src/main/java/com/doumee/service/business/impl/ApplyChagneDetailServiceImpl.java
@@ -252,7 +252,12 @@
        queryWrapper.leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyChagneDetail::getOldDuId);
        queryWrapper.in(CollectionUtils.isNotEmpty(applyDetailPageDTO.getTypes()),ApplyChagneDetail::getType,applyDetailPageDTO.getTypes());
        queryWrapper.eq(!Objects.isNull(applyDetailPageDTO.getApplyChangeId()),ApplyChagneDetail::getApplyChangeId,applyDetailPageDTO.getApplyChangeId());
        return applyChangeDetailJoinMapper.selectJoinList(ApplyChagneDetail.class, queryWrapper);
        List<ApplyChagneDetail> list = applyChangeDetailJoinMapper.selectJoinList(ApplyChagneDetail.class, queryWrapper);
        for (ApplyChagneDetail applyChagneDetail:list) {
            applyChagneDetail.setAge(Constants.getAgeByIdCard(applyChagneDetail.getMemberIdcardNo()));
        }
        return list;
    }
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
@@ -122,9 +122,11 @@
        if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){
            throw  new BusinessException(ResponseStatus.DATA_EMPTY);
        }
        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())){
        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(),"对不起,该申请状态已流转,当前不支持该操作~");
        }
@@ -194,16 +196,15 @@
        param.getPidanFile().setObjType(Constants.MultiFile.CA_PD_PDF.getKey());
        param.getPidanFile().setType(Constants.TWO);
        multifileMapper.insert(param.getPidanFile());
        update.setApplyId(model.getApplyId());
        if(Constants.equalsInteger(model.getType(),Constants.ZERO)){
            //如果是加减保申请 处理加减保明细数据
            dealDetailsValidTime(update);
            dealDetailsValidTime(update,insuranceApply);
        }else{
            //如果是换厂申请 处理明细数据
            dealDetailsDUdata(update);
            dealDetailsDUdata(update,insuranceApply);
        }
        applyChangeMapper.updateById(update);
@@ -294,12 +295,13 @@
     * 处理加减保明细数据
     * @param update
     */
    private void dealDetailsDUdata(ApplyChange update ) {
    private void dealDetailsDUdata(ApplyChange update,InsuranceApply insuranceApply) {
        List<ApplyChagneDetail> detailList = applyChagneDetailJoinMapper.selectJoinList(ApplyChagneDetail.class,
                new MPJLambdaWrapper<ApplyChagneDetail>()
                        .selectAll(ApplyChagneDetail.class)
                        .selectAs(Solutions::getTimeUnit,ApplyChagneDetail::getSolutionTimeUnit)
                        .selectAs(Solutions::getPrice,ApplyChagneDetail::getSolutionPrice)
                        .selectAs(Solutions::getId,ApplyChagneDetail::getSolutionId)
                        .selectAs(Solutions::getName,ApplyChagneDetail::getSolutionsName)
                        .selectAs(Worktype::getName,ApplyChagneDetail::getWorkTypeName)
                        .selectAs(DispatchUnit::getName,ApplyChagneDetail::getDuName)
@@ -397,10 +399,16 @@
                applyDetailJoinMapper.insert(applyDetail);
                MemberInsurance memberInsurance = new MemberInsurance(applyDetail,update.getId());
                memberInsurance.setSolutionId(detail.getSolutionId());
                memberInsurance.setWorktypeName(detail.getWorkTypeName());
                memberInsurance.setDuName(detail.getDuName());
                memberInsurance.setApplyChangeId(detail.getApplyChangeId());
                memberInsurance.setSolutionName(detail.getSolutionsName());
                memberInsurance.setPdCode(update.getValidCode());
                memberInsurance.setBdCode(insuranceApply.getCode());
                memberInsurance.setRelationType(Constants.ONE);
                memberInsuranceJoinMapper.insert(memberInsurance);
            }else{
                applyDetailJoinMapper.update(null, new UpdateWrapper<ApplyDetail>().lambda()
                        .set(ApplyDetail::getEditor,update.getEditor())
                        .set(ApplyDetail::getEditDate,update.getEditDate())
@@ -408,7 +416,6 @@
                        .set(ApplyDetail::getWorktypeId,detail.getWorktypeId())
                        .eq(ApplyDetail::getId,oldModel.getId())
                );
                //员工投保明细记录 历史数据
                memberInsuranceJoinMapper.update(null,new UpdateWrapper<MemberInsurance>().lambda()
                        .set(MemberInsurance::getDuId,detail.getDuId())
@@ -440,7 +447,7 @@
     * 处理加减保明细数据
     * @param update
     */
    private void dealDetailsValidTime(ApplyChange update) {
    private void dealDetailsValidTime(ApplyChange update,InsuranceApply insuranceApply) {
        List<ApplyChagneDetail> detailList = applyChagneDetailJoinMapper.selectJoinList(ApplyChagneDetail.class,
                new MPJLambdaWrapper<ApplyChagneDetail>()
                        .selectAll(ApplyChagneDetail.class)
@@ -477,6 +484,16 @@
        //加保 添加的金额
        CountCyclePriceVO countCyclePriceVO_add = this.getChangeCountCyclePriceVO(applyChangeCyclePriceDTO_add);
        Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId());
        if(Objects.isNull(solutions)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到保险方案");
        }
        if(solutions.getDataType().equals(Constants.ONE)){
            solutions = solutionsMapper.selectOne(new QueryWrapper<Solutions>().lambda().eq(Solutions::getBaseId,solutions.getBaseId()).eq(Solutions::getDataType,Constants.TWO).last("limit 1"));
            if(Objects.isNull(solutions)){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"未查询到方案最新版本信息");
            }
        }
        for (ApplyChagneDetail detail : detailList) {
@@ -531,7 +548,9 @@
                totalFee = totalFee.add(add.getFee());
                currentFee = currentFee.add(add.getCurrentFee());
                MemberInsurance memberInsurance = new MemberInsurance(detail, update, update.getEditor(), add.getId());
                MemberInsurance memberInsurance = new MemberInsurance(detail, update, update.getEditor(), add.getId(),solutions.getId());
                memberInsurance.setStartTime(add.getStartTime());
                memberInsurance.setEndTime(add.getEndTime());
                memberInsurance.setRelationType(Constants.ONE);
                memberInsuranceList.add(memberInsurance);
@@ -567,10 +586,13 @@
                        CountCyclePriceVO timeoutCountCyclePriceVOReduce = this.getChangeCountCyclePriceVO(applyChangeCyclePriceDTO_reduce);
                        updateCurrentFee = timeoutCountCyclePriceVOReduce.getCyclePrice().subtract(countCyclePriceVO_reduce.getCyclePrice());
                    }
                    applyDetailJoinMapper.update(null, new UpdateWrapper<ApplyDetail>().lambda()
                            .setSql(" fee = ifnull(fee,0)+" + updateFee)
                            .setSql(" current_fee = " + updateCurrentFee)
                            .set(ApplyDetail::getEndTime, DateUtil.getMontageDate(update.getApplyStartTime(), 3))
                            .set(insuranceApply.getStartTime().compareTo(update.getValidTime())!=0,ApplyDetail::getEndTime, DateUtil.getMontageDate(update.getApplyStartTime(), 3))
                            .set(insuranceApply.getStartTime().compareTo(update.getValidTime())==0,ApplyDetail::getEndTime, DateUtil.getMontageDate(update.getApplyStartTime(), 2))
                            .set(ApplyDetail::getEditor, update.getEditor())
                            .set(ApplyDetail::getEditDate, update.getEditDate())
                            .eq(ApplyDetail::getId, oldModel.getId())
@@ -581,7 +603,9 @@
                    //修改 员工投保明细记录 历史数据
                    memberInsuranceJoinMapper.update(null, new UpdateWrapper<MemberInsurance>().lambda()
                            .setSql(" fee = ifnull(fee,0)+" + updateFee)
                            .set(MemberInsurance::getEndTime, update.getApplyStartTime())
                            .set(insuranceApply.getStartTime().compareTo(update.getValidTime())!=0,MemberInsurance::getEndTime,DateUtil.getMontageDate(update.getApplyStartTime(), 3))
                            .set(insuranceApply.getStartTime().compareTo(update.getValidTime())==0,MemberInsurance::getEndTime,DateUtil.getMontageDate(update.getApplyStartTime(), 2))
                            .set(MemberInsurance::getStartTime, update.getApplyStartTime())
                            .eq(MemberInsurance::getRelationId, oldModel.getId())
                    );
@@ -661,10 +685,15 @@
            ){
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~");
            }
            if(Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey())){
                update.setStatus(Constants.ApplyChangeStatus.SIGNATURE.getKey());
            }else {
                update.setStatus(Constants.ApplyChangeStatus.UPLOAD.getKey());
            }
            applyLogType = Constants.ApplyLogType.CA_PALTFORM_REFUSE_APPLY;
            info = applyLogType.getInfo();
            info = info.replace("${param}", param.getCheckInfo());
            update.setStatus(Constants.ApplyChangeStatus.SIGNATURE.getKey());
            noticeType = Constants.NoticeType.FIVE;
        }else{
            //如果是同意,两种申请退回状态都可操作
@@ -693,7 +722,7 @@
        }
        //删除其他待办
        noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId()));
        Notices notices = new Notices(noticeObjectType,Constants.ZERO,model.getId(),solutions.getName(),
        Notices notices = new Notices(noticeObjectType,Constants.ONE,model.getId(),solutions.getName(),
                model.getCompanyId(), noticeType);
        noticesMapper.insert(notices);
@@ -735,6 +764,14 @@
        if(Objects.isNull(solutions)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到保险方案");
        }
        if(solutions.getDataType().equals(Constants.ONE)){
            solutions = solutionsMapper.selectOne(new QueryWrapper<Solutions>().lambda().eq(Solutions::getBaseId,solutions.getBaseId()).eq(Solutions::getDataType,Constants.TWO).last("limit 1"));
            if(Objects.isNull(solutions)){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"未查询到方案最新版本信息");
            }
        }
        CompanySolution companySolution = companySolutionMapper.selectOne(new QueryWrapper<CompanySolution>().lambda()
                .eq(CompanySolution::getCompanyId,loginUserInfo.getCompanyId())
                .eq(CompanySolution::getSolutionBaseId,solutions.getBaseId())
@@ -776,9 +813,7 @@
        applyChangeMapper.updateById(applyChangeFee);
        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_COMPANY_COMMIT;
        String info =applyLogType.getInfo();
        info = info.replace("${param}", "");
        ApplyLog log = new ApplyLog(applyChange,applyLogType.getName(),info,applyChange.getId(),applyLogType.getKey(), null, null);
        ApplyLog log = new ApplyLog(applyChange,applyLogType.getName(),"",applyChange.getId(),applyLogType.getKey(), null, null);
        applyLogMapper.insert(log);
        
@@ -829,9 +864,15 @@
        if(Objects.isNull(solutions)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到保险方案");
        }
        if(solutions.getDataType().equals(Constants.ONE)){
            solutions = solutionsMapper.selectOne(new QueryWrapper<Solutions>().lambda().eq(Solutions::getBaseId,solutions.getBaseId()).eq(Solutions::getDataType,Constants.TWO).last("limit 1"));
            if(Objects.isNull(solutions)){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"未查询到方案最新版本信息");
            }
        }
        CompanySolution companySolution = companySolutionMapper.selectOne(new QueryWrapper<CompanySolution>().lambda()
                .eq(CompanySolution::getCompanyId,loginUserInfo.getCompanyId())
                .eq(CompanySolution::getSolutionBaseId,solutions.getId())
                .eq(CompanySolution::getSolutionBaseId,solutions.getBaseId())
                .eq(CompanySolution::getIsdeleted,Constants.ZERO)
                .last(" limit 1 ")
        );
@@ -908,6 +949,13 @@
            if(companySolution.getCanAdd().equals(Constants.ZERO)){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "该企业分配保险方案无法进行加保");
            }
            //验证是否存在重复数据
            List<String> idcarNo = addDetailList.stream().map(m->m.getIdcardNo()).collect(Collectors.toList());
            Set<String> set = new HashSet<>(idcarNo);
            if(idcarNo.size() != set.size()){
                throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"对不起,人员录入数据存在相同数据!");
            }
            //加保明细数据 计算金额  根据批单时间 计算
            applyChangeCyclePriceDTO.setValidTime(DateUtil.getMontageDate(applyChange.getValidTime(),1));
            CountCyclePriceVO countCyclePriceVO =  this.getChangeCountCyclePriceVO(applyChangeCyclePriceDTO);
@@ -921,6 +969,13 @@
        //减保数据
        List<ApplyChagneDetail> delDetailList = applyChange.getDelDetailList();
        if (CollectionUtils.isNotEmpty(delDetailList)) {
            //验证是否存在重复数据
            List<String> idcarNo = delDetailList.stream().map(m->m.getIdcardNo()).collect(Collectors.toList());
            Set<String> set = new HashSet<>(idcarNo);
            if(idcarNo.size() != set.size()){
                throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"对不起,人员录入数据存在相同数据!");
            }
            if(companySolution.getCanReduce().equals(Constants.ZERO)){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "该企业分配保险方案无法进行减保");
            }
@@ -928,7 +983,7 @@
            applyChangeCyclePriceDTO.setValidTime(DateUtil.getMontageDate(applyChange.getValidTime(),2));
            CountCyclePriceVO countCyclePriceVO =  this.getChangeCountCyclePriceVO(applyChangeCyclePriceDTO);
            BigDecimal detailFee = countCyclePriceVO.getCyclePrice();
            this.delChangeDetail(applyChange,delDetailList,insuranceApply,solutions,loginUserInfo,detailFee);
            this.delChangeDetail(applyChange,delDetailList,insuranceApply,solutions,loginUserInfo,detailFee,applyChangeCyclePriceDTO.getValidTime());
            fee = fee.add(delDetailList.stream().map(ApplyChagneDetail::getFee).reduce(BigDecimal.ZERO,BigDecimal::add));
        }
@@ -966,7 +1021,7 @@
     * @param loginUserInfo
     */
    public void delChangeDetail(ApplyChange applyChange ,List<ApplyChagneDetail> delDetailList,InsuranceApply insuranceApply,Solutions solutions,
                                LoginUserInfo loginUserInfo,BigDecimal detailFee){
                                LoginUserInfo loginUserInfo,BigDecimal detailFee,Date endTime){
        for (ApplyChagneDetail applyChagneDetail : delDetailList) {
            if (Objects.isNull(applyChagneDetail.getMemberId())) {
                throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "减保人员【" + applyChagneDetail.getMemberName() + "】必填项缺失");
@@ -1018,7 +1073,7 @@
            applyChagneDetail.setType(Constants.ONE);
            applyChagneDetail.setStartTime(applyDetail.getStartTime());
            applyChagneDetail.setEndTime(DateUtil.getMontageDate(applyChange.getApplyStartTime(),3));
            applyChagneDetail.setEndTime(endTime);
            member.setApplyId(insuranceApply.getId());
            member.setDuId(applyChagneDetail.getDuId());
@@ -1512,6 +1567,8 @@
        String info = applyLogType.getInfo();
        if(StringUtils.isNotBlank(applyChangeOptDTO.getOptIllustration())){
            info = info.replace("${param}", applyChangeOptDTO.getOptIllustration());
        }else{
            info = info.replace("${param}", "");
        }
        ApplyLog log = new ApplyLog(applyChange,applyLogType.getName(),info,applyChange.getId(),applyLogType.getKey(), null, null);
        applyLogMapper.insert(log);
server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java
@@ -153,7 +153,7 @@
            response.setContentType("application/octet-stream");
            response.setHeader("eva-opera-type", "download");
            response.setHeader("eva-download-filename", encodeFileName);
            Constants. packFilesToZip(fileList,response.getOutputStream());
            Constants.packFilesToZip(fileList,response.getOutputStream());
        } catch (IOException e) {
            throw new BusinessException(ResponseStatus.EXPORT_EXCEL_ERROR, e);
        }
server/service/src/main/java/com/doumee/service/business/impl/DuWorktypeServiceImpl.java
@@ -63,13 +63,13 @@
        duWorktypeMapper.deleteById(id);
        if(duWorktypeMapper.selectCount(new QueryWrapper<DuWorktype>().lambda()
                .eq(DuWorktype::getWorkTypeId,dbDuWorkType.getWorkTypeId())
                .eq(DuWorktype::getDispatchUnitId,dispatchUnit.getId())
                .eq(DuWorktype::getStatus,Constants.ZERO)
                .ne(DuWorktype::getId,dbDuWorkType.getId())
        )>Constants.ZERO){
            dispatchUnit.setWorktypeStatus(0);
        }else  if(duWorktypeMapper.selectCount(new QueryWrapper<DuWorktype>().lambda()
                .eq(DuWorktype::getWorkTypeId,dbDuWorkType.getWorkTypeId())
                .eq(DuWorktype::getDispatchUnitId,dispatchUnit.getId())
                .eq(DuWorktype::getStatus,Constants.TWO)
                .ne(DuWorktype::getId,dbDuWorkType.getId())
        )>Constants.ZERO){
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
@@ -214,7 +214,7 @@
        String info = "";
        if(model.getApplyStartTime()!=null && model.getApplyStartTime().getTime()/1000!= insuranceApply.getStartTime().getTime()/1000){
            info =applyLogType.getInfo();
            info = info.replace("${param1}",DateUtil.getPlusTime2(model.getApplyEndTime()));
            info = info.replace("${param1}",DateUtil.getPlusTime2(model.getStartTime()));
            info = info.replace("${param2}",DateUtil.getPlusTime2(insuranceApply.getStartTime()));
        }
        ApplyLog log = new ApplyLog(update,applyLogType.getName(), info,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update));
@@ -332,13 +332,22 @@
        InsuranceApply update = new InsuranceApply();
        if(insuranceApply.getDealBackApply() ==1){
            //如果是驳回,只能可驳回已签章状态下的退回申请状态进行操作
            if(!Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_SIGNATURE.getKey())){
            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()))
            ){
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~");
            }
            applyLogType = Constants.ApplyLogType.PLATFORM_UN_AGREE_BACK;
            info = applyLogType.getInfo();
            info = info.replace("${param}", insuranceApply.getCheckInfo());
            update.setStatus(Constants.InsuranceApplyStatus.SIGNATURE.getKey());
            if( Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_SIGNATURE.getKey())){
                update.setStatus(Constants.InsuranceApplyStatus.SIGNATURE.getKey());
            }else if( Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_WAIT_SIGNATURE.getKey())){
                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_SIGNATURE.getKey())
@@ -347,13 +356,7 @@
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~");
            }
            applyLogType = Constants.ApplyLogType.PLATFORM_AGREE_BACK;
            if( Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_SIGNATURE.getKey())){
                update.setStatus(Constants.InsuranceApplyStatus.SIGNATURE.getKey());
            }else if( Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_WAIT_SIGNATURE.getKey())){
                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());
            }
            update.setStatus(Constants.InsuranceApplyStatus.PLATFORM_RETURN.getKey());
        }
        update.setEditDate(new Date());
        update.setEditor(user.getId());
@@ -697,6 +700,12 @@
                || Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.PLATFORM_CHECK_PASS.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();
        update.setEditDate(new Date());
@@ -734,6 +743,12 @@
        //删除其他待办
        Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY;
        noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,insuranceApply.getId()));
        Notices notices = new Notices(noticeObjectType,Constants.ONE,model.getId(),solutions.getName(),
                model.getCompanyId(), Constants.NoticeType.ONE);
        noticesMapper.insert(notices);
        return  1;
@@ -796,7 +811,11 @@
        noticesMapper.insert(notices);
        String info =applyLogType.getInfo();
        info = info.replace("${param}", update.getCheckInfo());
        if(StringUtils.isNotBlank(update.getCheckInfo())){
            info = info.replace("${param}", update.getCheckInfo());
        }else{
            info = null;
        }
        ApplyLog log = new ApplyLog(update,applyLogType.getName(),info,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update));
        applyLogMapper.insert(log);
        return  1;
@@ -1153,8 +1172,8 @@
        queryWrapper.select(" DATEDIFF( t.END_TIME ,now()  ) AS loseEfficacyDays  ");
        queryWrapper.select(" ( select count(DISTINCT(ad.MEMBER_ID)) from apply_detail ad  where ad.apply_id = t.id ) as insureNum");
        if(!Objects.isNull(pageWrap.getModel())&&!Objects.isNull(pageWrap.getModel().getType())){
            queryWrapper.select(" ifnull(( select sum(td.fee) from taxes ts inner join tax_detial td on td.TAX_ID = ts.id  where ts.status != 2 and td.INSURANCE_APPLY_ID = t.id ),0) as taxesMoney");
            queryWrapper.select(" ( select td.CREATE_DATE from taxes ts inner join tax_detial td on td.TAX_ID = ts.id  where ts.status != 2 and td.INSURANCE_APPLY_ID = t.id order by td.CREATE_DATE desc limit 1 ) as taxesLast ");
            queryWrapper.select(" ifnull(( select sum(td.fee) from taxes ts inner join tax_detial td on td.TAX_ID = ts.id  where ts.status  = 1 and td.INSURANCE_APPLY_ID = t.id ),0) as taxesMoney");
            queryWrapper.select(" ( select td.CREATE_DATE from taxes ts inner join tax_detial td on td.TAX_ID = ts.id  where ts.status = 1 and td.INSURANCE_APPLY_ID = t.id order by td.CREATE_DATE desc limit 1 ) as taxesLast ");
        }
        queryWrapper.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId);
        queryWrapper.leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId);
@@ -1207,6 +1226,9 @@
        }
        if (pageWrap.getModel().getStatus() != null) {
            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 ");
        }
        if(CollectionUtils.isNotEmpty(pageWrap.getSorts())){
            for(PageWrap.SortData sortData: pageWrap.getSorts()) {
@@ -1333,6 +1355,19 @@
            throw new BusinessException(ResponseStatus.DATA_EMPTY);
        }
        Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId());
        if(Objects.isNull(solutions)){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"未查询到方案信息");
        }
        if(solutions.getDataType().equals(Constants.ONE)){
            Solutions newVersionSolution = solutionsMapper.selectOne(new QueryWrapper<Solutions>().lambda().eq(Solutions::getBaseId,solutions.getBaseId()).eq(Solutions::getDataType,Constants.TWO).last("limit 1"));
            if(Objects.isNull(newVersionSolution)){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"未查询到方案最新版本信息");
            }
            insuranceApply.setNewVersionSolutionId(newVersionSolution.getId());
        }else{
            insuranceApply.setNewVersionSolutionId(solutions.getId());
        }
        if(insuranceApply.getStartTime().compareTo(new Date())<0  && insuranceApply.getEndTime().compareTo(new Date()) > 0 ){
            insuranceApply.setLoseEfficacyDays(DateUtil.daysBetweenDates(insuranceApply.getEndTime(),new Date()));
        }
@@ -1493,7 +1528,7 @@
            noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey())
                            .ne(Notices::getType,Constants.NoticeType.SIX.getStatus())
                    .eq(Notices::getObjId,insuranceApply.getId()));
            Notices notices = new Notices(noticeObjectType,Constants.ONE,insuranceApply.getId(),solutions.getName(),
            Notices notices = new Notices(noticeObjectType,Constants.ZERO,insuranceApply.getId(),solutions.getName(),
                    insuranceApply.getCompanyId(), Constants.NoticeType.THREE);
            noticesMapper.insert(notices);
@@ -1519,7 +1554,9 @@
        //存储日志数据
        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.COMPANY_APPLY_RETURN;
        String info =applyLogType.getInfo();
        info = info.replace("${param}", insuranceApplyOptDTO.getOptIllustration());
        if(StringUtils.isNotBlank(insuranceApplyOptDTO.getOptIllustration())){
            info = info.replace("${param}", insuranceApplyOptDTO.getOptIllustration());
        }
        ApplyLog log = new ApplyLog(insuranceApply,applyLogType.getName(),info,insuranceApply.getId(),applyLogType.getKey(),JSONObject.toJSONString(insuranceApply), JSONObject.toJSONString(insuranceApply));
        applyLogMapper.insert(log);
    }
server/service/src/main/java/com/doumee/service/business/impl/InsuranceServiceImpl.java
@@ -10,6 +10,7 @@
import com.doumee.dao.business.InsuranceMapper;
import com.doumee.dao.business.WorktypeMapper;
import com.doumee.dao.business.model.Insurance;
import com.doumee.dao.business.model.Solutions;
import com.doumee.dao.business.model.Worktype;
import com.doumee.dao.system.model.SystemUser;
import com.doumee.service.business.InsuranceService;
@@ -25,10 +26,8 @@
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import java.util.*;
import java.util.stream.Collectors;
/**
 * 保险公司信息表Service实现
@@ -49,6 +48,13 @@
        LoginUserInfo user= (LoginUserInfo)SecurityUtils.getSubject().getPrincipal();
        initCreateParam(insurance);//工种数据有效性检验,去除空白行数据
        if(insuranceMapper.selectCount(new QueryWrapper<Insurance>().lambda().eq(Insurance::getName,insurance.getName())
                .eq(Insurance::getIsdeleted,Constants.ZERO)
                .eq(Insurance::getDataType,Constants.ZERO)
        )>Constants.ZERO){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"保险公司名称已存在");
        }
        insurance.setIsdeleted(Constants.ZERO);
        insurance.setCreator(user.getId());
@@ -72,7 +78,22 @@
    }
    private void dealWorkTypeData(Insurance insurance, Insurance newModel, List<Worktype> worktypeList,boolean isNew) {
       int num=0;
        List<String> workTypeName = worktypeList.stream().map(m->m.getName()).collect(Collectors.toList());
        Set<String> set = new HashSet<>(workTypeName);
        if(workTypeName.size() != set.size()){
            throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"对不起,工种录入数据存在相同数据!");
        }
        for(Worktype w : worktypeList) {
            if(!isNew){
                //查询保险公司下是否已存在该工种
                if(worktypeMapper.selectCount(new QueryWrapper<Worktype>().lambda().eq(Worktype::getInsuranceId,insurance.getId())
                        .eq(Worktype::getIsdeleted,Constants.ZERO)
                        .eq(Worktype::getDataType,Constants.ZERO)
                        .eq(Worktype::getName,w.getName())
                )>Constants.ZERO){
                    throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"当前保险公司下存在【"+w.getName()+"】该工种信息");
                }
            }
            //基础版本
            w.setInsuranceId(insurance.getId());
            w.setIsdeleted(Constants.ZERO);
@@ -83,6 +104,7 @@
            w.setVersion(insurance.getVersion());
            w.setSortnum(num++);
            worktypeMapper.insert(w);
            //历史版本的工种信息
            Worktype newType = new Worktype();
@@ -169,6 +191,14 @@
        }
        //数据有效性校验
        initCreateParam(insurance);
        if(insuranceMapper.selectCount(new QueryWrapper<Insurance>().lambda().eq(Insurance::getName,insurance.getName())
                .eq(Insurance::getIsdeleted,Constants.ZERO)
                .eq(Insurance::getDataType,Constants.ZERO)
                .ne(Insurance::getId,insurance.getId())
        )>Constants.ZERO){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"保险公司名称已存在");
        }
        LoginUserInfo user= (LoginUserInfo)SecurityUtils.getSubject().getPrincipal();
        Insurance updateModel = new Insurance();
        updateModel.setEditor(user.getId());
server/service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
@@ -205,7 +205,7 @@
                .like(StringUtils.isNotBlank(memberQueryDTO.getIdCard()),Member::getIdcardNo, memberQueryDTO.getIdCard())
                .like(StringUtils.isNotBlank(memberQueryDTO.getDuName()),DispatchUnit::getName, memberQueryDTO.getDuName())
                .eq(!Objects.isNull(memberQueryDTO.getDuId()),Member::getDuId, memberQueryDTO.getDuId())
                .eq(!Objects.isNull(memberQueryDTO.getSolutionsId()),Solutions::getId, memberQueryDTO.getSolutionsId())
                .eq(!Objects.isNull(memberQueryDTO.getSolutionsId()),Solutions::getBaseId, memberQueryDTO.getSolutionsId())
                .apply(!Objects.isNull(memberQueryDTO.getSolutionsStatus())&&memberQueryDTO.getSolutionsStatus().equals(Constants.ONE),"now() between t.start_time and t.end_time")
                .apply(!Objects.isNull(memberQueryDTO.getSolutionsStatus())&&memberQueryDTO.getSolutionsStatus().equals(Constants.TWO),"now()  >  t.end_time")
        ;
server/service/src/main/java/com/doumee/service/business/impl/SettleClaimsServiceImpl.java
@@ -449,16 +449,19 @@
                            Constants.MultiFile.LP_SCZL_FILE.getKey(),
                            Constants.MultiFile.LP_JACL_FILE.getKey(),
                    }))
                    .orderByAsc(Multifile::getCreateDate)
            );
            if(multifileList== null || multifileList.size() == 0){
                throw  new BusinessException(ResponseStatus.DATA_EMPTY);
            }
            String path = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()+systemDictDataBiz.queryByCode(Constants.OSS,Constants.SETTLE_FILE).getCode();
            Integer sn = 1;
            for(Multifile l : multifileList){
                File f = Constants.getFileByNetFile(path + l.getFileurl(),StringUtils.defaultString(l.getName(),"未命名"));
                File f = Constants.getFileByNetFile(path + l.getFileurl(),StringUtils.defaultString(sn + "_" +l.getName(),"未命名"));
                if(f !=null && f.isFile()){
                    fileList.add(f);
                }
                sn = sn +1;
            }
            if(fileList == null || fileList.size() == 0){
                throw  new BusinessException(ResponseStatus.DATA_EMPTY);
server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java
@@ -61,6 +61,15 @@
        LoginUserInfo user= (LoginUserInfo)SecurityUtils.getSubject().getPrincipal();
        initCreateParam(solutions);//工种数据有效性检验,去除空白行数据
        if(solutionsMapper.selectCount(new QueryWrapper<Solutions>().lambda()
                .eq(Solutions::getName,solutions.getName())
                .eq(Solutions::getIsdeleted,Constants.ZERO)
                .eq(Solutions::getDataType,Constants.ZERO)
        )>Constants.ZERO){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"保险方案名称已存在");
        }
        solutions.setIsdeleted(Constants.ZERO);
        solutions.setCreator(user.getId());
        solutions.setCreateDate(new Date());
@@ -167,7 +176,14 @@
        }
        //数据有效性校验
        initCreateParam(solutions);
        if(solutionsMapper.selectCount(new QueryWrapper<Solutions>().lambda()
                .eq(Solutions::getName,solutions.getName())
                .eq(Solutions::getIsdeleted,Constants.ZERO)
                .eq(Solutions::getDataType,Constants.ZERO)
                .ne(Solutions::getId,solutions.getId())
        )>Constants.ZERO){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"保险方案名称已存在");
        }
        solutions.setEditor(user.getId());
        solutions.setVersion(UUID.randomUUID().toString());
        solutions.setEditDate(new Date());
server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java
@@ -189,6 +189,20 @@
        update.setImgurl(taxes.getImgurl());
        taxesMapper.updateById(update);
        //查询开票明细记录
        List<TaxDetial> taxDetialList = taxDetialMapper.selectList(new QueryWrapper<TaxDetial>().lambda()
                .eq(TaxDetial::getTaxId,taxes.getId())
                .eq(TaxDetial::getType,Constants.TWO));
        if(CollectionUtils.isNotEmpty(taxDetialList)){
            for (TaxDetial taxDetial:taxDetialList) {
                taxesMapper.update(null,new UpdateWrapper<Taxes>().lambda()
                                .set(Taxes::getEditDate,new Date())
                                .set(Taxes::getEditor,user.getId())
                        .set(Taxes::getStatus,3).eq(Taxes::getId,taxDetial.getDelTaxId()));
            }
        }
        //存储待办信息
        Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.TAXES;
        //删除其他待办
server/service/src/main/java/com/doumee/service/business/impl/WorktypeServiceImpl.java
@@ -105,10 +105,11 @@
        List<Worktype> list = worktypeMapper.selectList(new QueryWrapper<Worktype>().lambda()
                .eq(Worktype::getIsdeleted,Constants.ZERO)
                .eq(Worktype::getDataType,Constants.TWO)
                .eq(Worktype::getStatus,Constants.ZERO)
                .apply(workTypeQueryDTO.getQueryType().equals(Constants.ZERO),
                        "id in ( select  sw.worktype_id from solution_worktype sw where sw.SOLUTION_ID = "+workTypeQueryDTO.getId()+" )")
                .apply(workTypeQueryDTO.getQueryType().equals(Constants.ONE),
                        "id in ( select  dw.work_type_id from du_worktype dw where dw.du_solution_id = "+workTypeQueryDTO.getId()+" )")
                        "id in ( select  dw.work_type_id from du_worktype dw where dw.status = 1 and  dw.du_solution_id = "+workTypeQueryDTO.getId()+" )")
                .apply(workTypeQueryDTO.getQueryType().equals(Constants.TWO),
                        "id in ( select  dw.WORKTYPE_ID from apply_detail dw where dw.APPLY_ID = "+workTypeQueryDTO.getId()+" )")
        );
@@ -192,7 +193,7 @@
        ExcelImporter ie = null;
        List<WorktypeImport> dataList =null;
        try {
            ie = new ExcelImporter(file,0,0);
            ie = new ExcelImporter(file,1,0);
            dataList = ie.getDataList(WorktypeImport.class,null);
        }  catch (Exception e) {
            e.printStackTrace();
@@ -202,6 +203,9 @@
        }
         List<String> result = new ArrayList<>();
        for(WorktypeImport model : dataList){
            if(StringUtils.isBlank(model.getName())){
                throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,录入数据存在异常");
            }
//            if(StringUtils.isNotBlank(model.getName()) && !isNewWorkTypeByName(model.getName(),list)){
                result.add(model.getName());
//            }