| | |
| | | .selectAll(InsuranceApply.class) |
| | | .selectAs(Solutions::getName,InsuranceApply::getSolutionsName) |
| | | .select(" ( select count(1) from apply_detail ad where ad.apply_id = t.id ) as insureNum") |
| | | .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId) |
| | | .notExists(" select 1 from taxes t1 inner join tax_detial t2 on t1.id = t2.tax_id where t2.type = 0 and t1.status != 2 and t.id = t2.INSURANCE_APPLY_ID ") |
| | | .eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey()) |
| | | .eq(InsuranceApply::getId,id) |
| | |
| | | if(CollectionUtils.isNotEmpty(applyChangeList)){ |
| | | for (ApplyChange applyChange:applyChangeList) { |
| | | insuranceApply.setFee(insuranceApply.getFee().subtract(applyChange.getFee())); |
| | | TaxesInvoicingVO taxesInvoicingVO = applyChange.getTaxesInvoicingVO(); |
| | | TaxesInvoicingVO taxesInvoicingVO = applyChange.toTaxesInvoicingVO(); |
| | | if(!Objects.isNull(insuranceApply)){ |
| | | taxesInvoicingVO.setAmount(BigDecimal.ZERO); |
| | | } |
| | |
| | | || Objects.isNull(directInvoicingDTO.getInvoicingMoney()) |
| | | || Objects.isNull(directInvoicingDTO.getType()) |
| | | || Objects.isNull(directInvoicingDTO.getInvoicingDetailDTOList()) |
| | | || StringUtils.isNotBlank(directInvoicingDTO.getAddress()) |
| | | || StringUtils.isBlank(directInvoicingDTO.getAddress()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |