buhuazhen
10 天以前 37e17957e82ea4263298b9651eb70dd1e093584e
src/main/java/com/ruoyi/home/service/impl/HomeServiceImpl.java
@@ -588,8 +588,8 @@
    public ProductionTurnoverDto workInProcessTurnover() {
        ProductionTurnoverDto productionTurnoverDto = new ProductionTurnoverDto();
        ProductWorkOrderDto workOrder = new ProductWorkOrderDto();
        workOrder.setPlanStartTime(LocalDate.now().minusMonths(1));
        workOrder.setPlanEndTime(LocalDate.now());
        workOrder.setPlanStartTime(LocalDateTime.now().minusMonths(1));
        workOrder.setPlanEndTime(LocalDateTime.now());
        List<ProductWorkOrderDto> productWorkOrders = productWorkOrderMapper
                .pageProductWorkOrder(new Page<>(1, -1), workOrder).getRecords();
        long sum = productWorkOrders.stream()
@@ -1594,23 +1594,23 @@
    @Override
    public List<MapDto> processOutputAnalysis(Integer type) {
        LocalDate today = LocalDate.now();
        LocalDate startDate;
        LocalDate endDate = today;
        LocalDateTime startDate;
        LocalDateTime endDate = today.atTime(23, 59, 59);
        switch (type) {
            case 1: // 周
                startDate = today.with(DayOfWeek.MONDAY);
                startDate = today.with(DayOfWeek.MONDAY).atStartOfDay();
                break;
            case 2: // 月
                startDate = today.withDayOfMonth(1);
                startDate = today.withDayOfMonth(1).atStartOfDay();
                break;
            case 3: // 季度
                int currentMonth = today.getMonthValue();
                int startMonth = ((currentMonth - 1) / 3) * 3 + 1;
                startDate = LocalDate.of(today.getYear(), startMonth, 1);
                startDate = LocalDate.of(today.getYear(), startMonth, 1).atStartOfDay();
                break;
            default:
                startDate = today.with(DayOfWeek.MONDAY);
                startDate = today.with(DayOfWeek.MONDAY).atStartOfDay();
                break;
        }