| | |
| | | queryWrapper.le(queryModel.getEndDate() != null,Taxes::getCreateDate, (queryModel.getEndDate())); |
| | | queryWrapper.eq(!Objects.isNull(queryModel.getInsuranceApplyId()),Taxes::getInsuranceApplyId,queryModel.getInsuranceApplyId()); |
| | | queryWrapper.eq(!Objects.isNull(queryModel.getStatus()),Taxes::getStatus,queryModel.getStatus()); |
| | | queryWrapper.exists(!Objects.isNull(queryModel.getApplyId())," select 1 from tax_detial td where td.insurance_apply_id = "+queryModel.getApplyId()+" and t.id = td.tax_id "); |
| | | } |
| | | queryWrapper.orderByAsc(Taxes::getCreateDate); |
| | | |
| | |
| | | || Objects.isNull(entrustInvoicingDTO.getInvoicingMoney()) |
| | | || Objects.isNull(entrustInvoicingDTO.getType()) |
| | | || Objects.isNull(entrustInvoicingDTO.getTaxDetialList()) |
| | | || StringUtils.isNotBlank(entrustInvoicingDTO.getAddress()) |
| | | || StringUtils.isBlank(entrustInvoicingDTO.getAddress()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | |
| | | //查询每个保单下可以投保的金额 |
| | | InsuranceApply insuranceApply = insuranceApplyJoinMapper.selectJoinOne(InsuranceApply.class,new MPJLambdaWrapper<InsuranceApply>() |
| | | .selectAll(InsuranceApply.class) |
| | | .select(" ( select sum(td.fee) from taxes ts inner join tax_detial td on ts.TAX_ID = ts.id where ts.status != 2 and td.INSURANCE_APPLY_ID = t.id ) as taxesMoney ") |
| | | .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 ") |
| | | .eq(InsuranceApply::getId,taxDetial.getInsuranceApplyId()) |
| | | ); |
| | | if(Objects.isNull(insuranceApply)){ |