From a7748c3f762c5a68c368effdfef9c6f8e867059b Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期一, 10 二月 2025 09:27:03 +0800
Subject: [PATCH] 更改查询历史项目分组条件

---
 north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java |   53 ++++++++++++++++++++++++-----------------------------
 1 files changed, 24 insertions(+), 29 deletions(-)

diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
index d3070e5..cc57050 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -129,11 +129,7 @@
     public Boolean updateLayoutStatusSv(String processId, Integer state) {
 
         if (!processId.isEmpty()) {
-//            Integer Status = flowCardMapper.selectLayoutStatus(processId);
-
             flowCardMapper.updateLayoutStatusMp(processId, state);
-
-
             return true;
         } else {
             return false;
@@ -146,7 +142,6 @@
         if (object.get("userName") != null) {
             userName = object.get("userName").toString();
         }
-
         String productionId = "";
         if (object.get("productionId") != null) {
             productionId = object.get("productionId").toString();
@@ -174,13 +169,12 @@
                 List<OrderGlassDetail> orderGlassDetailList =
                         orderGlassDetailMapper.selectList(
                                 new QueryWrapper<OrderGlassDetail>()
-                                        .eq("order_id", flowCard.getProcessId().substring(0, 10))
+                                        .eq("order_id", orderId)
                                         .eq("order_number", flowCard.getOrderNumber())
                         );
                 List<OrderProcessDetail> orderProcessDetailList = getOrderProcessDetails(orderGlassDetailList);
                 orderProcessDetailList.forEach(
                         orderGlassDetail -> orderGlassDetail.setProcessId(flowCard.getProcessId()));
-
 
                 //璧嬪�艰鍗曞伐鑹鸿〃
                 orderProcessDetailMapper.insertOrderProcessDetail(orderProcessDetailList);
@@ -207,7 +201,6 @@
             map.put("data", flowCardMapper.selectNoSchedulingMp(selectTime1, selectTime2, orderId, processes, flowCard));
 
         }
-
         return map;
     }
 
@@ -252,11 +245,11 @@
         if (!flowCardList.isEmpty()) {
             for (FlowCard flowCard : flowCardList) {
                 Map<String, Object> itemmap = new HashMap<>();
-                if ("1".equals(inquiryMode)){
+                if ("1".equals(inquiryMode)){//鍚堝苟娴佺▼鍗�
                     itemmap.put("detail", flowCardMapper.selectPrintMp(flowCard.getOrderId()));
-                } else if ("3".equals(inquiryMode)) {
+                } else if ("3".equals(inquiryMode)) {//鍚堝苟娴佺▼鍗′笉鎸夐厤缃樉绀�
                     itemmap.put("detail", flowCardMapper.selectPrintAllMp(flowCard.getOrderId()));
-                } else {
+                } else {//闈炲悎骞舵祦绋嬪崱
                     itemmap.put("detail", flowCardMapper.selectPrintNotMp(flowCard.getOrderId()));
                 }
 
@@ -296,7 +289,7 @@
                     //鏄惁鍖呭惈鍒囧壊
                     //boolean containsCutting = flowCard.getProcess().contains("鍒囧壊");
                     String processSub=flowCard.getProcess().substring(0, 2);
-                    if(processSub.equals("澶硅兌") || processSub.equals("涓┖")){
+                    if(processSub.equals("澶硅兌") || processSub.equals("涓┖")){//宸ヨ壓鏄惁鍖呭惈澶硅兌涓┖
                         itemmap.put("detail", flowCardMapper.getPrimaryListLimt(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()),flowCard.getGlassChild(),flowCard.getProcess(),flowCard.getOrderId()));
 
                         List<Map<String, Object>> detailList = flowCardMapper.getDetailList(flowCard.getProcessId(), flowCard.getTechnologyNumber(),flowCard.getProcess());
@@ -311,7 +304,6 @@
 
                 }
                 else {
-
                     //娴佺▼鍗℃槑缁嗘暟鎹�
                     if (printLike.equals("")||printLike.equals("null") ){
                         itemmap.put("detail", flowCardMapper.getPrimaryListMerge(flowCard.getProcessId(), printMerge, flowCard.getOrderId()));
@@ -471,18 +463,13 @@
 
     public Map<String, Object> getSelectPrintLabelSv1(Map<String, Object> object) {
         Map<String, Object> map = new HashMap<>();
-
             List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//鏈�缁堢粨鏋�
             List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class);
             if (!flowCardList.isEmpty()) {
                 for (FlowCard flowCard : flowCardList) {
-                    // Integer count=flowCardMapper.getPrintLabelCount(flowCard.getProcessId(), flowCard.getTechnologyNumber());
                     Map<String, Object> itemmap = new HashMap<>();
-                    // for (int i = 0; i < count; i++) {
                     itemmap.put("data", flowCardMapper.getPrintLabel1(flowCard.getProcessId(), flowCard.getTechnologyNumber()));
                     list.add(itemmap);
-                    //}
-
                 }
             }
             map.put("data", list);
@@ -497,13 +484,9 @@
         List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class);
         if (!flowCardList.isEmpty()) {
             for (FlowCard flowCard : flowCardList) {
-                // Integer count=flowCardMapper.getPrintLabelCount(flowCard.getProcessId(), flowCard.getTechnologyNumber());
                 Map<String, Object> itemmap = new HashMap<>();
-                // for (int i = 0; i < count; i++) {
                 itemmap.put("data", flowCardMapper.getPrintLabelDetail(flowCard));
                 list.add(itemmap);
-                //}
-
             }
         }
         map.put("data", list);
@@ -521,7 +504,6 @@
         List<FlowCard> FlowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("flowCard")), FlowCard.class);
         if (!FlowCardList.isEmpty()) {
             for (FlowCard flowCard : FlowCardList) {
-               // flowCardMapper.printSortMp(flowCard.getProcessId(),flowCard.getOrderNumber(),flowCard.getTechnologyNumber(),flowCard.getSort());
                 //鍒ゆ柇淇濆瓨鐨勬暟鎹槸鍚﹀凡瀛樺湪
                 Integer count = flowCardMapper.printAddSortCountMp(flowCard.getProcessId(),flowCard.getOrderNumber(),flowCard.getTechnologyNumber(),flowCard.getSort(),flowCard.getProcess());
                 if (count >0){
@@ -542,7 +524,7 @@
         if (!flowCardList.isEmpty()) {
             Set<String> processedProcessIds = new HashSet<>();  // 鐢ㄦ潵瀛樻斁宸插鐞嗚繃鐨� processId
 
-            if (lableType != 2){
+            if (lableType != 2){//鎴愬搧鏍囩
                 for (FlowCard flowCard : flowCardList) {
                     String processId = flowCard.getProcessId();
 
@@ -551,14 +533,14 @@
                         continue;
                     }
                     Map<String, Object> itemmap = new HashMap<>();
-                    itemmap.put("data", flowCardMapper.getPrintCustomData(flowCard.getProcessId(),flowCard.getTechnologyNumber()));
+                    itemmap.put("data", flowCardMapper.getPrintCustomData(flowCard.getProcessId(),flowCard.getOrderNumber()));
                     list.add(itemmap);
 
                     // 灏嗚 processId 鍔犲叆宸插鐞嗛泦鍚�
                     processedProcessIds.add(processId);
                 }
             }
-            else{
+            else{//灏忕墖鏍囩
                 for (FlowCard flowCard : flowCardList) {
                     Map<String, Object> itemmap = new HashMap<>();
                     itemmap.put("data", flowCardMapper.getPrintCustomDataSemi(flowCard.getProcessId(),flowCard.getTechnologyNumber(),flowCard.getProcess()));
@@ -739,7 +721,7 @@
         if (!flowCardList.isEmpty()) {
             Set<String> processedProcessIds = new HashSet<>();  // 鐢ㄦ潵瀛樻斁宸插鐞嗚繃鐨� processId
 
-            if (lableType != 2){
+            if (lableType != 2){//鎴愬搧鏍囩
                 for (FlowCard flowCard : flowCardList) {
                     String processId = flowCard.getProcessId();
                     String orderNumber = flowCard.getOrderNumber().toString();
@@ -757,7 +739,7 @@
                     processedProcessIds.add(orderNumber);
                 }
             }
-            else{
+            else{//灏忕墖鏍囩
                 for (FlowCard flowCard : flowCardList) {
                     Map<String, Object> itemmap = new HashMap<>();
                     itemmap.put("data", flowCardMapper.getPrintCustomDataSemi(flowCard.getProcessId(),flowCard.getTechnologyNumber(),flowCard.getProcess()));
@@ -863,6 +845,7 @@
         }
         List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("composing")), FlowCard.class);
             for (FlowCard flowCard : flowCardList) {
+                //鏌ヨ鏄惁鎶ュ伐
                 Integer count = flowCardMapper.reportingWorkCount(flowCard.getProcessId());
                 if (count == 0) {
                     //淇敼鍒嗘灦鐘舵��
@@ -913,10 +896,12 @@
             Set<String> processedProcessIds = new HashSet<>();  // 鐢ㄦ潵瀛樻斁宸插鐞嗚繃鐨� processId
                 for (FlowCard flowCard : flowCardList) {
                     Map<String, Object> itemmap = new HashMap<>();
-                    if (detailType==0){
+                    //鏄惁鏄伐绋嬫槑缁嗘墦鍗�
+                    if (detailType==0){//宸ョ▼鎵撳嵃鏄庣粏
                         itemmap.put("data", flowCardMapper.getPrintCustomDataProjectDetail(flowCard.getProjectNo(),flowCard.getStockId()));
 
                     }
+                    //闈炲伐绋嬫墦鍗�
                     else if (detailType==1) {
                         itemmap.put("data", flowCardMapper.getPrintCustomDataProject(flowCard.getProjectNo()));
 
@@ -962,6 +947,16 @@
 
 
     }
+
+    public Integer updateProjectLabelPrintCount(String projectNo) {
+        flowCardMapper.updateProjectLabelPrintCount(projectNo);
+        return flowCardMapper.selectProjectLabelPrintCount(projectNo);
+    }
+
+    public Integer updateProjectProcessPrintCount(String projectNo) {
+        flowCardMapper.updateProjectProcessPrintCount(projectNo);
+        return flowCardMapper.selectProjectProcessPrintCount(projectNo);
+    }
 }
 
 

--
Gitblit v1.8.0