gongzuming
2024-11-12 24f7f046f8854d63839ad52d0cff34ea45a0f449
src/main/java/com/mzl/flower/service/payment/DeliveryOrderService.java
@@ -7,9 +7,11 @@
import com.mzl.flower.config.security.SecurityUtils;
import com.mzl.flower.constant.Constants;
import com.mzl.flower.dto.request.payment.*;
import com.mzl.flower.dto.request.report.QueryAppSupplierDTO;
import com.mzl.flower.dto.response.flower.ParamItemDTO;
import com.mzl.flower.dto.response.flower.StationStatisticDTO;
import com.mzl.flower.dto.response.payment.*;
import com.mzl.flower.dto.response.report.AppSupplierStatisticsVO;
import com.mzl.flower.dto.response.supplier.SupplierOrderDTO;
import com.mzl.flower.entity.payment.*;
import com.mzl.flower.entity.supplier.Station;
@@ -21,6 +23,7 @@
import com.mzl.flower.mapper.supplier.StationMapper;
import com.mzl.flower.service.BaseService;
import com.mzl.flower.service.flower.FlowerParamService;
import com.mzl.flower.service.report.OrderReportService;
import com.mzl.flower.utils.UUIDGenerator;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
@@ -73,6 +76,9 @@
    @Autowired
    private OrderItemSettlementService orderItemSettlementService;
    @Autowired
    private OrderReportService orderReportService;
    public void createDeliveryOrder(Order order) {
        String orderId = order.getId();
@@ -528,6 +534,12 @@
            LocalDateTime s1 = endDate.plusDays(-30);
            Integer dealCountDay30 = deliveryOrderItemMapper.getDoItemCount(supplierId, null, s1, endDate);
            dto.setDealCountDay30(dealCountDay30);
            // 供应商 总成交、本月成交、上月成交、今日成交、缺货(本月)、上月质检缺货、本月质检降级、上月质检降级、本月质检补货、上月质检补货
            QueryAppSupplierDTO appDto=new QueryAppSupplierDTO();
            appDto.setSupplierId(supplierId);
            final AppSupplierStatisticsVO appSupplierStatistics = orderReportService.getAppSupplierStatistics(appDto);
            BeanUtils.copyProperties(appSupplierStatistics,dto);
        }
        return dto;