111
k94314517
2024-01-30 4a34f3cfd93da1c06d40663dea68e54e83ec7460
server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java
@@ -472,6 +472,7 @@
                        .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)
@@ -495,7 +496,7 @@
        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);
                }
@@ -521,7 +522,7 @@
                || 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);
        }