From 583b80a582f9280a262ee72506d31d1bfa46f734 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 10 十二月 2025 11:29:57 +0800
Subject: [PATCH] 补交

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

diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
index 06a1a6d..d3e2920 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
@@ -189,7 +189,7 @@
                    // if (reviewedState==1){//宸插鏍�
                         //涓嶆槸绗竴閬撳伐搴忥紝鏌ヨ鎶ュ伐鏁版嵁
                         List<Map<String,String>>  details = reportingWorkMapper.SelectReworlDetailMp(processIdStr, splitTechNumbers(technologyStr), process,previousProcess,laminating);
-                        if(process.equals("涓┖")){
+                        if(laminating.equals("stepD")){
                             //鑾峰彇璇ユ祦绋嬪崱璁㈠崟鍙�
                             String orderId = reportingWorkMapper.selectOrderid(processIdStr);
                             details.forEach( detail -> {
@@ -204,24 +204,7 @@
                             });
                         }
                         map.put("Detail",details );
-//                    }else {
-//                        //涓嶆槸绗竴閬撳伐搴忥紝鏌ヨ鎶ュ伐鏁版嵁
-//                        List<Map<String,String>>  details = reportingWorkMapper.SelectReworlDetailMpReview(processIdStr, technologyStr, process,previousProcess,laminating);
-//                        if(process.equals("涓┖")){
-//                            String orderId = reportingWorkMapper.selectOrderid(processIdStr);
-//                            details.forEach( detail -> {
-//                                Integer glassId = orderGlassDetailMapper.
-//                                        getMinIdByGroup(orderId,
-//                                                String.valueOf(detail.get("order_number")),
-//                                                String.valueOf(detail.get("group")));
-//                                int listGlassId = Integer.parseInt(String.valueOf(detail.get("glassId")));
-//                                if(listGlassId  !=glassId){
-//                                    detail.put("rowClass","latter");
-//                                }
-//                            });
-//                        }
-//                        map.put("Detail",details );
-//                    }
+
                 }
             }
 
@@ -914,7 +897,7 @@
 
         } catch (Exception e) {
             e.printStackTrace();
-            throw new RuntimeException("骞惰鏌ヨ鎶ュ伐璁板綍寮傚父锛�" + e.getMessage(), e);
+            throw new RuntimeException("鎶ュ伐鏌ヨ骞惰鏌ヨ鎶ュ伐璁板綍寮傚父锛�" + e.getMessage(), e);
         }
 
         return result;
@@ -1796,4 +1779,37 @@
 
         return result;
     }
+
+    @Transactional(rollbackFor = Exception.class)
+    public Result addWorkInProgress(Map<String, Object> object) {
+        List<Map<String,Object>> list = (List<Map<String,Object>>) object.get("reportingWorks");
+
+        list.forEach(item -> {
+            ReportingWork reportingWork = JSONObject.parseObject(
+                    JSONObject.toJSONString(item.get("processTitle")), ReportingWork.class);
+            Map<String, String> mapTitle = new HashMap<>();
+            String[] processIdStr = reportingWork.getProcessId() != null
+                    ? reportingWork.getProcessId().split("/")
+                    : new String[]{""};
+            mapTitle.put("process", reportingWork.getPreviousProcess());
+            mapTitle.put("processId", reportingWork.getProcessId());
+            mapTitle.put("thisProcess", reportingWork.getThisProcess());
+            mapTitle.put("technologyStr", processIdStr[1]);
+            mapTitle.put("userName", object.get("userName").toString());
+            ReviewReportingWorkSv(mapTitle);
+
+
+            Map<String, Object> map = new HashMap<>();
+            map.put("detail", item.get("processList"));
+            map.put("title", item.get("processTitle"));
+            map.put("type", object.get("type"));
+            map.put("userId", object.get("userId"));
+            map.put("userName", object.get("userName"));
+            map.put("qualityInsStatus", object.get("qualityInsStatus"));
+            map.put("class", object.get("class"));
+            SaveReportingWorkSv(map);
+        });
+
+        return Result.success(true);
+    }
 }

--
Gitblit v1.8.0