jiangping
2024-02-01 f6b0e262db2af5ca2e5ed76f95e746c1dd3c58e3
server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java
@@ -290,8 +290,8 @@
            queryWrapper.eq(Taxes::getCompanyId,-1);//设置无效访问
        }else{
            queryWrapper.in(Taxes::getCompanyId,user.getCompanyIdList());
            queryWrapper.ge(pageWrap.getModel().getStartDate() != null,Taxes::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getStartDate()));
            queryWrapper.le(SignRecord::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getEndDate()));
            queryWrapper.ge(pageWrap.getModel().getStartDate() != null,Taxes::getCreateDate, pageWrap.getModel().getStartDate());
            queryWrapper.le(pageWrap.getModel().getEndDate() != null,Taxes::getCreateDate, pageWrap.getModel().getEndDate());
            queryWrapper.eq(pageWrap.getModel().getTaxBank() != null,Taxes::getTaxBank, pageWrap.getModel().getTaxBank());
            queryWrapper.eq(pageWrap.getModel().getTaxBank() != null,Taxes::getTaxBank, pageWrap.getModel().getTaxBank());
            queryWrapper.eq(pageWrap.getModel().getRemark() != null,Taxes::getRemark, pageWrap.getModel().getRemark());
@@ -340,8 +340,8 @@
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非企业用户无法进行该业务查询");
        }
        if(!Objects.isNull(queryModel)){
            queryWrapper.ge(pageWrap.getModel().getStartDate() != null,Taxes::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getStartDate()));
            queryWrapper.le(SignRecord::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getEndDate()));
            queryWrapper.ge(pageWrap.getModel().getStartDate() != null,Taxes::getCreateDate, (pageWrap.getModel().getStartDate()));
            queryWrapper.le(pageWrap.getModel().getEndDate() != null,Taxes::getCreateDate,  (pageWrap.getModel().getEndDate()));
            queryWrapper.eq(!Objects.isNull(queryModel.getInsuranceApplyId()),Taxes::getInsuranceApplyId,queryModel.getInsuranceApplyId());
            queryWrapper.eq(!Objects.isNull(queryModel.getStatus()),Taxes::getStatus,queryModel.getStatus());
        }
@@ -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);
        }