From 911ea91bf388a124e15b6fe4d1884231fe117b07 Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期一, 02 十二月 2024 16:11:43 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override

---
 north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java |   77 ++++++++++++++++++++++++++++----------
 1 files changed, 56 insertions(+), 21 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 95c2bd1..f77a9b7 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
@@ -25,7 +25,6 @@
 import com.example.erp.service.userInfo.LogService;
 import com.example.erp.service.userInfo.SysErrorService;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
@@ -132,31 +131,55 @@
             //鏌ヨ鏈伐搴忔姤宸ラ渶瑕佸摢鍑犲眰锛屼笂宸ュ簭鏄粈涔�
             String obtainTechnology = reportingWorkMapper.SelectWorkTechnologyMp(processIdStr);
 
-            map.put("numberList", flowCardMapper.getGlassNumber(Integer.valueOf(technologyStr),processIdStr));
+            map.put("numberList", flowCardMapper.getGlassNumber(technologyStr,processIdStr));
 
             //鍒ゆ柇鏈伐搴忔槸涓嶆槸绗竴閬撳伐搴�
             if (interceptProcess.equals(process)) {
                 //鏄涓�閬撳伐搴忥紝鏌ヨ娴佺▼鍗℃暟鎹�
                 map.put("Detail", reportingWorkMapper.SelectTechnologicalNumMp(processIdStr, technologyStr, process,reportType));
             } else {
-                //涓嶆槸绗竴閬撳伐搴忥紝鏌ヨ鎶ュ伐鏁版嵁
-                List<Map<String,String>>  details = reportingWorkMapper.SelectReworlDetailMp(processIdStr, technologyStr, process,previousProcess);
-                if(process.equals("涓┖")){
-                    String orderId = processIdStr.substring(0,10);
-                    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");
+                ReportingWork retrievedData = (ReportingWork) map.get("data");
+                if (retrievedData!=null){
+                    Integer reviewedState = retrievedData.getReviewedState();
+                    //鏍规嵁瀹℃牳鐘舵�佹煡璇㈡湭瀹℃牳鏁版嵁
+                    if (reviewedState==1){//宸插鏍�
+                        //涓嶆槸绗竴閬撳伐搴忥紝鏌ヨ鎶ュ伐鏁版嵁
+                        List<Map<String,String>>  details = reportingWorkMapper.SelectReworlDetailMp(processIdStr, technologyStr, process,previousProcess);
+                        if(process.equals("涓┖")){
+                            String orderId = processIdStr.substring(0,10);
+                            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 );
+                    }else {
+                        //涓嶆槸绗竴閬撳伐搴忥紝鏌ヨ鎶ュ伐鏁版嵁
+                        List<Map<String,String>>  details = reportingWorkMapper.SelectReworlDetailMpReview(processIdStr, technologyStr, process,previousProcess);
+                        if(process.equals("涓┖")){
+                            String orderId = processIdStr.substring(0,10);
+                            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 );
+                    }
                 }
-
-
-                map.put("Detail",details );
             }
 
             // 绗竴閬撳伐搴忥紙娴佺▼鍗℃暟+琛ョ墖鏁伴噺-瀹屽伐鏁�-娆$牬鏁�-杩斿伐鏈畬鎴愭暟-绂佺敤鏁伴噺锛�
@@ -178,9 +201,21 @@
     }
 
     //鏌ヨ宸ュ簭
-    public Map<String, Object> SelectProcessSv() {
+    public Map<String, Object> SelectProcessSv(String userId) {
         Map<String, Object> map = new HashMap<>();
-        map.put("process", reportingWorkMapper.SelectProcessMp());
+        String process = reportingWorkMapper.selectUserProcess(userId);
+        if (process==null) {
+            map.put("process", reportingWorkMapper.SelectProcessMp());
+        }
+        else {
+            if (process.equals("澶硅兌")){
+                map.put("process",reportingWorkMapper.getSelectProcessJiajiao() );
+            }
+            if (process.equals("鎶�鏈儴澶氭洸")){
+                map.put("process",reportingWorkMapper.getSelectProcessDuoqu() );
+            }
+        }
+
         return map;
     }
 
@@ -309,7 +344,7 @@
             }
 
             //鏇存柊娴佺▼鍗¤〃鐨勬姤宸ユ暟閲�
-            if (Objects.equals(reportingWork.getNextProcess(), "")) {
+            if (Objects.equals(reportingWork.getNextProcess(), "")|| Objects.equals(reportingWork.getNextProcess(), null)) {
                 LambdaUpdateWrapper<FlowCard> flowCardLambdaUpdateWrapper =
                         new LambdaUpdateWrapper<>();
                 flowCardLambdaUpdateWrapper

--
Gitblit v1.8.0