| | |
| | | private List<TaxDetial> getJoinDetailListById(Integer id) { |
| | | MPJLambdaWrapper<TaxDetial> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(TaxDetial.class); |
| | | queryWrapper.selectAs(Solutions::getName,TaxDetial::getSolutionName); |
| | | queryWrapper.selectAs(Taxes::getDoneCode,TaxDetial::getTaxDoneCode); |
| | | queryWrapper.selectAs(Taxes::getCreateDate,TaxDetial::getTaxCreateDate); |
| | | queryWrapper.selectAs(InsuranceApply::getCode,TaxDetial::getApplyCode); |
| | | queryWrapper.selectAs(ApplyChange::getCode,TaxDetial::getChangApplyCode); |
| | | queryWrapper.select("(CASE t.type\n" + |
| | | queryWrapper.selectAs(ApplyChange::getValidCode,TaxDetial::getChangApplyCode); |
| | | /* queryWrapper.select("(CASE t.type\n" + |
| | | "WHEN 0 THEN (select count(1) from apply_detail c where c.APPLY_ID=t.INSURANCE_APPLY_ID) \n" + |
| | | "ELSE 0 \n" + |
| | | "END) as applyNum,\n" + |
| | |
| | | "(CASE t.type \n" + |
| | | "WHEN 1 THEN (select count(1) from apply_chagne_detail c where c.APPLY_CHANGE_ID=t.APPLY_CHANGE_ID) \n" + |
| | | "ELSE 0 \n" + |
| | | "END) as applyChangeAddNum"); |
| | | "END) as applyChangeAddNum");*/ |
| | | queryWrapper.leftJoin(InsuranceApply.class,InsuranceApply::getId,TaxDetial::getInsuranceApplyId); |
| | | queryWrapper.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId); |
| | | queryWrapper.leftJoin(ApplyChange.class,ApplyChange::getId,TaxDetial::getApplyChangeId); |
| | | queryWrapper.leftJoin(Taxes.class,Taxes::getId,TaxDetial::getDelTaxId); |
| | | queryWrapper.eq( TaxDetial::getTaxId,id); |
| | | List<TaxDetial> detialList = taxDetailJoinMapper.selectJoinList(TaxDetial.class,queryWrapper.orderByAsc(TaxDetial::getType)); |
| | | |
| | | |
| | |
| | | List<TaxDetial> applyList = new ArrayList<>();//投保和加减保 |
| | | List<TaxDetial> delList = new ArrayList<>();//冲红单 |
| | | if(detialList!=null){ |
| | | for(TaxDetial d :delList){ |
| | | d.setSolutionName(model.getSolutionName()); |
| | | for(TaxDetial d :detialList){ |
| | | // d.setSolutionName(model.getSolutionName()); |
| | | d.setFee(Constants.formatBigdecimal(d.getFee())); |
| | | d.setTotalFee(Constants.formatBigdecimal(d.getTotalFee())); |
| | | if(Constants.equalsInteger(d.getType(),Constants.ZERO) || Constants.equalsInteger(d.getType(),Constants.ONE)){ |
| | | if(Constants.equalsInteger(d.getType(),Constants.ZERO) |
| | | || Constants.equalsInteger(d.getType(),Constants.ONE)){ |
| | | applyList.add(d); |
| | | }else if(Constants.equalsInteger(d.getType(),Constants.TWO)){ |
| | | delList.add(d); |