From d5bb894f9be2e0a3b62d475b60b44f2ab138528c Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期四, 12 六月 2025 16:48:35 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java |   58 ++++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 38 insertions(+), 20 deletions(-)

diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
index 8341fac..ef5cc4a 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
@@ -3,10 +3,7 @@
 
 import com.baomidou.dynamic.datasource.annotation.DS;
 
-import com.example.erp.dto.pp.DamageReportDTO;
-import com.example.erp.dto.pp.ScheduleProductionScheduleDTO;
-import com.example.erp.dto.pp.TeamOutputDTO;
-import com.example.erp.dto.pp.WorkInProgressDTO;
+import com.example.erp.dto.pp.*;
 import com.example.erp.entity.pp.DamageDetails;
 import com.example.erp.entity.pp.Report;
 import com.example.erp.mapper.pp.ProductionSchedulingMapper;
@@ -89,7 +86,12 @@
             getRowCount.forEach(row -> {
                 Map<String, Integer> getRow = new HashMap<>();
                 // { row: 0, col: 1, rowspan: 3, colspan: 0},
-                getRow.put("row", row.get("RowNum"));
+                Object rowNumObj = row.get("RowNum");
+                if (rowNumObj instanceof Double) {
+                    getRow.put("row", ((Double) rowNumObj).intValue());
+                } else if (rowNumObj instanceof Integer) {
+                    getRow.put("row", (Integer) rowNumObj);
+                }
                 getRow.put("col", col);
                 getRow.put("rowspan", row.get("rowCount"));
                 getRow.put("colspan", 0);
@@ -103,7 +105,7 @@
         return map;
     }
 
-    public Map<String, Object> crossProcessBreakingSv(Integer pageNum, Integer pageSize, List<String> selectDate, DamageDetails damageDetails) {
+    public Map<String, Object> crossProcessBreakingSv(Integer pageNum, Integer pageSize, List<String> selectDate, CrossProcessBreakingDTO crossProcessBreakingDTO) {
         Integer offset = (pageNum - 1) * pageSize;
         String endDate = LocalDate.now().toString();
         String startDate = LocalDate.now().minusDays(15).toString();
@@ -116,13 +118,12 @@
             }
         }
         Map<String, Object> map = new HashMap<>();
-        map.put("data", reportMapper.getProcessBreaking(offset, pageSize, startDate, endDate, damageDetails));
-        map.put("total", reportMapper.getProcessBreakingTotal(offset, pageSize, startDate, endDate, damageDetails));
+        map.put("data", reportMapper.getProcessBreaking(offset, pageSize, startDate, endDate, crossProcessBreakingDTO));
+        map.put("total", reportMapper.getProcessBreakingTotal(offset, pageSize, startDate, endDate, crossProcessBreakingDTO));
         List<String> list = new ArrayList<>();
         list.add(startDate);
         list.add(endDate);
         map.put("selectDate", list);
-//        map.put("total",orderMapper.getPageTotal(offset, pageSize, startDate, endDate, orderDetail));
         return map;
     }
 
@@ -142,18 +143,21 @@
         if (optionVal.equals("1")){
             /* 鏍规嵁閿�鍞崟鍙锋眹鎬�*/
             map.put("data", reportMapper.workInProgressOrderMp(offset, pageSize, orderId, inputProject, selectProcesses, workInProgressDTO));
-            map.put("total", reportMapper.workInProgressOrderTotal(offset, pageSize, orderId, inputProject, selectProcesses, workInProgressDTO));
-
+           // map.put("total", reportMapper.workInProgressOrderTotal(offset, pageSize, orderId, inputProject, selectProcesses, workInProgressDTO));
+            map.put("total" ,reportMapper.workInProgressOrderFootSum(offset, pageSize,orderId, inputProject, selectProcesses, workInProgressDTO));
         }else if(optionVal.equals("2")){
             /* 鏍规祦绋嬪崱鍙锋眹鎬�*/
             map.put("data", reportMapper.workInProgressProcessMp(offset, pageSize, orderId, inputProject, selectProcesses, workInProgressDTO));
-            map.put("total", reportMapper.workInProgressProcessTotal(offset, pageSize, orderId, inputProject, selectProcesses, workInProgressDTO));
+           // map.put("total", reportMapper.workInProgressProcessTotal(offset, pageSize, orderId, inputProject, selectProcesses, workInProgressDTO));
+            map.put("total" ,reportMapper.workInProgressOrderFootSum(offset, pageSize,orderId, inputProject, selectProcesses, workInProgressDTO));
+
         } else if (optionVal.equals("3")) {
 
         } else {
-
+            //娌℃湁閫夋嫨鍒嗙粍
             map.put("data", reportMapper.workInProgressMp(offset, pageSize, orderId, inputProject, selectProcesses, workInProgressDTO));
-            map.put("total", reportMapper.workInProgressTotal(offset, pageSize, orderId, inputProject, selectProcesses, workInProgressDTO));
+            //map.put("total", reportMapper.workInProgressTotal(offset, pageSize, orderId, inputProject, selectProcesses, workInProgressDTO));
+            map.put("total" ,reportMapper.workInProgressOrderFootSum(offset, pageSize,orderId, inputProject, selectProcesses, workInProgressDTO));
 
         }
         map.put("process", productionSchedulingMapper.selectProcess());
@@ -170,6 +174,8 @@
         Map<String, Object> map = new HashMap<>();
         map.put("data", reportMapper.processToBeCompletedMp(selectTime1, selectTime2, orderId, inputProject, selectProcesses, report));
         map.put("process", productionSchedulingMapper.selectProcess());
+        map.put("footSum" ,reportMapper.processToBeCompletedFootSum(selectTime1, selectTime2, orderId, inputProject, selectProcesses, report));
+
         return map;
     }
 
@@ -178,6 +184,7 @@
         Map<String, Object> map = new HashMap<>();
         map.put("data", reportMapper.selectDamageReportMp(offset, pageSize, selectTime1, selectTime2, damageReportDTO));
         map.put("total", reportMapper.getDamageReportPageTotal(offset, pageSize, selectTime1, selectTime2, damageReportDTO));
+        map.put("footSum" ,reportMapper.damageReportFootSum(selectTime1, selectTime2, damageReportDTO));
         return map;
     }
 
@@ -344,6 +351,12 @@
         return map;
     }
 
+    public Map<String, Object> orderReportingWorks(Date selectTime1, Date selectTime2, Report report) {
+        Map<String, Object> map = new HashMap<>();
+        map.put("data", reportMapper.orderReportingWorks(selectTime1, selectTime2, report));
+        return map;
+    }
+
     public Map<String, Object> rawMaterialRequisitionSv(Date selectTime1, Date selectTime2, Report report) {
         Map<String, Object> map = new HashMap<>();
         map.put("data", reportMapper.rawMaterialRequisitionMp(selectTime1, selectTime2, report));
@@ -355,7 +368,10 @@
     }
 
     public List exportDamageReportSv(List<LocalDate> dates) {
-
+        if (dates != null && dates.size() > 1) {
+            dates.set(1, dates.get(1).plusDays(1)); // 灏嗙浜屼釜鏃ユ湡鍔犱竴澶�
+        }
+        System.out.println(dates);
         return reportMapper.exportDamageReportMp(dates);
     }
 
@@ -378,7 +394,6 @@
     }
 
     public List exportWorkInProgressSv(Map<String, Object> dates) {
-        List<LocalDate> date= (List<LocalDate>) dates.get("date");
         String process= (String) dates.get("processes");
         String inputVal= (String) dates.get("inputVal");
         String project= (String) dates.get("project");
@@ -388,7 +403,7 @@
         if ("null".equals(project)) {
             project = "";
         }
-        return reportMapper.exportWorkInProgressMp(date,process,inputVal,project);
+        return reportMapper.exportWorkInProgressMp(process,inputVal,project);
     }
 
     public List exportTaskCompletionStatusSv(Map<String, Object> dates) {
@@ -415,9 +430,11 @@
         }
         Integer offset = (pageNum - 1) * pageSize;
         Map<String, Object> map = new HashMap<>();
-        map.put("data", reportMapper.teamOutputMp(offset, pageSize, selectTime1, selectTime2,selectProcesses, teamOutputDTO));
+        String laminating = reportMapper.getLaminating(selectProcesses);
+        map.put("data", reportMapper.teamOutputMp(offset, pageSize, selectTime1, selectTime2,selectProcesses,laminating, teamOutputDTO));
         map.put("process", productionSchedulingMapper.selectProcess());
-        map.put("total", reportMapper.teamOutputPageTotal(offset, pageSize, selectTime1, selectTime2,selectProcesses, teamOutputDTO));
+        map.put("total", reportMapper.teamOutputPageTotal(offset, pageSize, selectTime1, selectTime2,selectProcesses,laminating, teamOutputDTO));
+        map.put("footSum" ,reportMapper.teamOutputFootSum(selectTime1, selectTime2,selectProcesses,laminating, teamOutputDTO));
         return map;
     }
 
@@ -442,6 +459,7 @@
         if (process.equals("鍏ㄩ儴")){
             process="";
         }
-        return reportMapper.exportTeamOutputMp(date,process);
+        String laminating = reportMapper.getLaminating(process);
+        return reportMapper.exportTeamOutputMp(date,process,laminating);
     }
 }

--
Gitblit v1.8.0