jiangping
2024-01-23 0e31fd20a1be8899f0ade4b7b7fb0e8d196624bf
server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java
@@ -209,6 +209,10 @@
        if(model==null || !Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){
            throw  new BusinessException(ResponseStatus.DATA_EMPTY);
        }
        if(Constants.equalsInteger(model.getType(),Constants.ZERO)){
            List<TaxDetial> detialList = getDetailsApplysListById(id);
            model.setApplyList(detialList);
        }else{
        //查询明细列表
        List<TaxDetial> detialList = getJoinDetailListById(id);
        List<TaxDetial> applyList = new ArrayList<>();//投保和加减保
@@ -227,9 +231,21 @@
        }
        model.setApplyList(applyList);
        model.setDelTaxList(delList);
        }
        return model;
    }
    private List<TaxDetial> getDetailsApplysListById(Integer id) {
            MPJLambdaWrapper<TaxDetial> queryWrapper = new MPJLambdaWrapper<>();
            queryWrapper.selectAll(TaxDetial.class);
            queryWrapper.selectAs(InsuranceApply::getCode,TaxDetial::getApplyCode);
            queryWrapper.selectAs(Solutions::getName,TaxDetial::getSolutionName);
            queryWrapper.leftJoin(InsuranceApply.class,InsuranceApply::getId,TaxDetial::getInsuranceApplyId);
            queryWrapper.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId);
            List<TaxDetial> detialList =  taxDetailJoinMapper.selectJoinList(TaxDetial.class,queryWrapper.orderByAsc(TaxDetial::getType));
            return detialList;
    }
    @Override
    public Taxes findOne(Taxes taxes) {
        QueryWrapper<Taxes> wrapper = new QueryWrapper<>(taxes);