From ca83a37c04d4d4029eaffa7a7d11578c26ad74b8 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期四, 20 二月 2025 14:32:30 +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/ReportingWorkService.java |    1 
 north-glass-erp/northglass-erp/src/views/pp/report/ProcessCardProgress.vue         |   37 +++++++++++++++---
 north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue                  |   20 +++++++---
 north-glass-erp/src/main/java/com/example/erp/entity/sd/OrderProcessDetail.java    |    5 ++
 north-glass-erp/src/main/resources/mapper/pp/Report.xml                            |    7 +++
 north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java        |    7 +++
 north-glass-erp/src/main/resources/mapper/mm/MaterialInventory.xml                 |    1 
 north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml                          |    6 ++-
 8 files changed, 67 insertions(+), 17 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/ProcessCardProgress.vue b/north-glass-erp/northglass-erp/src/views/pp/report/ProcessCardProgress.vue
index 8e65a26..29a12ed 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/ProcessCardProgress.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/ProcessCardProgress.vue
@@ -52,17 +52,19 @@
 let column = [1,3,8]
 //鐐瑰嚮鏌ヨ
 const getWorkOrder = () => {
+  gridOptions.columns = gridOptions.columns.slice(0, 11); //娓呴櫎鍔ㄦ�佺敓鎴愮殑鍒楅噸鏂版煡璇�
   request.post(`/report/processCardProgress/${form.orderId}`, column).then((res) => {
     if (res.code == 200) {
       if (res.data.data.length === 0) {
         ElMessage.warning(t('report.noDataFoundForThisOrder'))
         return
       }
+
       // 鍔ㄦ�佹坊鍔犲垪
       res.data.title.forEach((item, index) => {
         let column = {
           slots: { default: 'quantitySum' },
-          width: 90,
+          width: 150,
           title: item.process,
           field: `dynamicColumn${index}` // 涓哄姩鎬佸垪娣诲姞鍞竴鐨� field
         }
@@ -71,6 +73,7 @@
       res.data.data.forEach(item => {
         item.reportWorkQuantity = JSON.parse(item.reportWorkQuantity)
         item.reportWorkQuantityCount = JSON.parse(item.reportWorkQuantityCount)
+        item.reportWorkTime = JSON.parse(item.reportWorkTime)
       })
       mergeCells.value = res.data.mergeCell
       xGrid.value.loadData(res.data.data)
@@ -92,14 +95,34 @@
 const quantitySum = ( row,column )=>{
   const reportWorkQuantity = row.reportWorkQuantity[column.title] || 0
   const reportWorkQuantityCount = row.reportWorkQuantityCount[column.title] || 0
-  if(reportWorkQuantity===reportWorkQuantityCount){
-    return reportWorkQuantity
+  const reportWorkTime = row.reportWorkTime[column.title] || 0
+  if (reportWorkTime===0){
+    if(reportWorkQuantity===reportWorkQuantityCount){
+      return reportWorkQuantity
+    }
+
+    return (reportWorkQuantity
+        +'('
+        +reportWorkQuantityCount
+        +')' )
+  }
+  else {
+    if(reportWorkQuantity===reportWorkQuantityCount){
+      return (reportWorkQuantity+'['
+          +reportWorkTime
+          +']')
+    }
+
+    return (reportWorkQuantity
+        +'('
+        +reportWorkQuantityCount
+        +')'
+        +'['
+        +reportWorkTime
+        +']'
+    )
   }
 
-  return (reportWorkQuantity
-      +'('
-      +reportWorkQuantityCount
-      +')' )
   //return
 }
 
diff --git a/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue b/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
index 2a25300..7ff78dd 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -630,7 +630,7 @@
             const val = getNestedProperty(dataList[result.start],result.cell)+""
             if(!/\d$/.test(val)){
               const matches = val.match(/\D/g);
-              const a= val.lastIndexOf(matches[matches.length - 1])
+              const b= val.lastIndexOf(matches[matches.length-1])
 
               const numbersArr = []
               const regex = /\d+/g
@@ -640,8 +640,10 @@
               }
               let numbers=numbersArr[numbersArr.length-1]
               var subStr1 = val.substring(numbers.index);
+              const matche = subStr1.match(/(\d+)([^0-9]|$)/);
+              const a= val.lastIndexOf(matche[2])
               var subStr2 = val.substring(0, numbers.index);
-              var subStr3 = val.substring(a);
+              var subStr3 = val.substring(a,b+1);
               let number = parseInt(subStr1)
               var reg =new RegExp(number,"g")
               dataList.forEach((item,index) =>{
@@ -649,8 +651,11 @@
                   let newStr = subStr1.replace(reg, number);
                   if(parseInt(newStr)>9){
                     newStr=parseInt(newStr)
+                    if(!/\d$/.test(val)){
+                      newStr=newStr+subStr3
+                    }
                   }
-                  setNestedValue(item,result.cell,subStr2+newStr+subStr3)
+                  setNestedValue(item,result.cell,subStr2+newStr)
                   number=number+1
                 }
 
@@ -692,7 +697,7 @@
             const val = getNestedProperty(dataList[result.start], result.cell)+""
             if(!/\d$/.test(val)){
               const matches = val.match(/\D/g);
-              const a= val.lastIndexOf(matches[matches.length - 1])
+              const b= val.lastIndexOf(matches[matches.length-1])
 
               const numbersArr = []
               const regex = /\d+/g
@@ -702,8 +707,10 @@
               }
               let numbers=numbersArr[numbersArr.length-1]
               var subStr1 = val.substring(numbers.index);
+              const matche = subStr1.match(/(\d+)([^0-9]|$)/);
+              const a= val.lastIndexOf(matche[2])
               var subStr2 = val.substring(0, numbers.index);
-              var subStr3 = val.substring(a);
+              var subStr3 = val.substring(a,b+1);
               let number = parseInt(subStr1)
               var reg =new RegExp(number,"g")
               dataList.forEach((item,index) =>{
@@ -711,8 +718,9 @@
                   let newStr = subStr1.replace(reg, number);
                   if(parseInt(newStr)>9){
                     newStr=parseInt(newStr)
+                    newStr=newStr+subStr3
                   }
-                  setNestedValue(item,result.cell,subStr2+newStr+subStr3)
+                  setNestedValue(item,result.cell,subStr2+newStr)
                   number=number+1
                 }
 
diff --git a/north-glass-erp/src/main/java/com/example/erp/entity/sd/OrderProcessDetail.java b/north-glass-erp/src/main/java/com/example/erp/entity/sd/OrderProcessDetail.java
index f048918..2a34115 100644
--- a/north-glass-erp/src/main/java/com/example/erp/entity/sd/OrderProcessDetail.java
+++ b/north-glass-erp/src/main/java/com/example/erp/entity/sd/OrderProcessDetail.java
@@ -1,9 +1,12 @@
 package com.example.erp.entity.sd;
 
+import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
+
+import java.time.LocalDate;
 
 @Data
 @TableName("sd.order_process_detail")
@@ -19,6 +22,8 @@
     private int reportingWorkNumCount;
     private int reportingWorkNum;
     private int brokenNum;
+    @ExcelProperty("淇敼鏃ユ湡")
+    private LocalDate updateTime;
 
 //    private Order order;
 //    private OrderDetail orderDetail;
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 acb75f4..73d07f2 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
@@ -86,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);
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 8eb9bba..aa21b3d 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
@@ -331,6 +331,7 @@
                     .eq(OrderProcessDetail::getTechnologyNumber, reportingWorkDetail.getTechnologyNumber())
                     .setSql("reporting_work_num_count = reporting_work_num_count +" + orderProcessDetail.getReportingWorkNum())
                     .setSql("reporting_work_num =reporting_work_num +" + orderProcessDetail.getReportingWorkNum())
+                    .setSql("update_time = now()")
                     .setSql("broken_num =broken_num +" + orderProcessDetail.getBrokenNum());
             orderProcessDetailMapper.update(null, updateWrapper);
             //鍒ゆ柇瀹屽伐鏁伴噺鍜屽埡鐮存暟閲忔槸鍚︿负0锛屼负0鍒欎笉鎻掑叆鍒版暟鎹簱
diff --git a/north-glass-erp/src/main/resources/mapper/mm/MaterialInventory.xml b/north-glass-erp/src/main/resources/mapper/mm/MaterialInventory.xml
index 5fc2cbc..0304072 100644
--- a/north-glass-erp/src/main/resources/mapper/mm/MaterialInventory.xml
+++ b/north-glass-erp/src/main/resources/mapper/mm/MaterialInventory.xml
@@ -172,6 +172,7 @@
         mi.inventory_quantity AS inventoryQuantity,
         ou.not_use_count AS availableQuantity,
         ou.not_use_count AS planQuantity,
+        ou.not_use_count AS outboundQuantity,
         mi.id,
         mi.inventory_organization as inventoryOrganization,
         mi.material_code AS materialCode,
diff --git a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
index 91135dd..b658b20 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -2163,7 +2163,8 @@
                       fc.founder,
                       date(fc.splitFrame_time)                                         as splitFrame_time,
                       fc.print_status,
-                      processed_part                                                   as process
+                      processed_part                                                   as process,
+                      merge
 
                from flow_card as fc
                         left join sd.order_glass_detail as ogd
@@ -2201,7 +2202,8 @@
                       fc.founder,
                       date(fc.splitFrame_time)                                         as splitFrame_time,
                       fc.print_status,
-                      processed_part                                                   as process
+                      processed_part                                                   as process,
+                      merge
 
                from flow_card as fc
                         left join sd.order_glass_detail as ogd
diff --git a/north-glass-erp/src/main/resources/mapper/pp/Report.xml b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
index 04754d7..8b23cc8 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/Report.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -166,6 +166,7 @@
                c.quantity,
                e.reportWorkQuantity,
                e.reportWorkQuantityCount,
+               e.reportWorkTime,
                e.broken_num,
                ifnull(f.inventory, 0)                         as inventory,
                round(ifnull(f.inventory, 0) * a.area, 2)      as inventoryArea,
@@ -196,7 +197,11 @@
                                    concat('{',
                                           GROUP_CONCAT(concat("\"", process, "\":\"", reporting_work_num_count, "\"")),
                                           '}'
-                                       )             as reportWorkQuantityCount
+                                       )             as reportWorkQuantityCount,
+                                   concat('{',
+                                          GROUP_CONCAT(concat("\"", process, "\":\"", IFNULL(date(update_time),''), "\"")),
+                                          '}'
+                                       )             as reportWorkTime
                             FROM sd.order_process_detail as a
                             where a.order_id = #{orderId}
                             GROUP BY process_id, a.order_number, a.technology_number) as e

--
Gitblit v1.8.0