111
k94314517
2024-02-23 274d9de5e50cc2d23b25ba271a8e66021b448916
server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java
@@ -227,15 +227,18 @@
        List<CompanySolution> list = new ArrayList<>();
        int num =0;
        for(CompanySolution s :company.getSolutionList()){
            if(s.getSolutionBaseId() == null){
            if(Objects.isNull(s.getSolution())){
                continue;
            }
            Solutions newVersion = solutionsMapper.selectOne(new QueryWrapper<Solutions>().lambda().eq(Solutions::getBaseId,s.getSolutionBaseId())
            if(s.getSolution().getBaseId() == null){
                continue;
            }
            Solutions newVersion = solutionsMapper.selectOne(new QueryWrapper<Solutions>().lambda().eq(Solutions::getBaseId,s.getSolution().getBaseId())
                    .eq(Solutions::getDataType,Constants.TWO).last("limit 1"));
            if(Objects.isNull(newVersion)){
                throw  new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"请添加有效的保险方案信息!");
            }
            sIds.add(s.getSolutionBaseId());
            sIds.add(s.getSolution().getBaseId());
            s.setCompanyId(company.getId());
            s.setIsdeleted(Constants.ZERO);
            s.setCanAdd(Constants.formatIntegerNum(s.getCanAdd()));
@@ -243,7 +246,7 @@
            s.setCreateDate(company.getCreateDate());
            s.setCreator(company.getCreator());
            s.setSortnum(num++);
            s.setSolutionBaseId( s.getSolutionBaseId() );
            s.setSolutionBaseId( s.getSolution().getBaseId() );
            s.setSolutionId( newVersion.getId() );
            s.setStatus(Constants.ZERO);
            list.add(s);