From 205657134d435d84114c4bb7663c17d76575cbaa Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期四, 25 四月 2024 08:28:14 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/a1536384743/erp_-override

---
 north-glass-erp/src/main/resources/application.yml                                  |    8 ++--
 north-glass-erp/target/classes/mapper/pp/ReportingWork.xml                          |   42 +++++++++++----------
 north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue |    1 
 north-glass-erp/target/classes/application.yml                                      |    8 ++--
 north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml                      |   31 +++++++++------
 5 files changed, 49 insertions(+), 41 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue
index ebf7f45..f5af339 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue
@@ -223,6 +223,7 @@
 //瀛愮粍浠舵帴鏀跺弬鏁�
 const xGrid = ref()
 const gridOptions = reactive({
+  loading: true,
   border:  "full",//琛ㄦ牸鍔犺竟妗�
   keepSource: true,//淇濇寔婧愭暟鎹�
   align: 'center',//鏂囧瓧灞呬腑
diff --git a/north-glass-erp/src/main/resources/application.yml b/north-glass-erp/src/main/resources/application.yml
index 8c37623..5441601 100644
--- a/north-glass-erp/src/main/resources/application.yml
+++ b/north-glass-erp/src/main/resources/application.yml
@@ -11,22 +11,22 @@
       strict: false #璁剧疆涓ユ牸妯″紡,榛樿false涓嶅惎鍔�. 鍚姩鍚庡湪鏈尮閰嶅埌鎸囧畾鏁版嵁婧愭椂鍊欏洖鎶涘嚭寮傚父,涓嶅惎鍔ㄤ細浣跨敤榛樿鏁版嵁婧�.
       datasource:
         user_info:
-          url: jdbc:mysql://localhost:3306/erp_user_info?serverTimezone=GMT%2b8
+          url: jdbc:mysql://10.153.19.150:3306/erp_user_info?serverTimezone=GMT%2b8
           username: root
           password: beibo.123/
           driver-class-name: com.mysql.cj.jdbc.Driver
         sd:
-          url: jdbc:mysql://localhost:3306/sd?serverTimezone=GMT%2b8&allowMultiQueries=true
+          url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8&allowMultiQueries=true
           username: root
           password: beibo.123/
           driver-class-name: com.mysql.cj.jdbc.Driver
         mm:
-          url: jdbc:mysql://localhost:3306/mm?serverTimezone=GMT%2b8
+          url: jdbc:mysql://10.153.19.150:3306/mm?serverTimezone=GMT%2b8
           username: root
           password: beibo.123/
           driver-class-name: com.mysql.cj.jdbc.Driver
         pp:
-          url: jdbc:mysql://localhost:3306/pp?serverTimezone=GMT%2b8
+          url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8
           username: root
           password: beibo.123/
           driver-class-name: com.mysql.cj.jdbc.Driver
diff --git a/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml b/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
index 26ccb10..8d19a0f 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -383,10 +383,12 @@
             d.child_width,
             d.child_height,
             e.shape,
-            a.completed_quantity+a.breakage_quantity as 'quantity', -- 鍙姤宸ユ暟
-            a.completed_quantity as 'completedQuantity', -- 瀹屽伐鏁�
-            a.breakage_quantity as 'breakageQuantity', -- 鐮存崯鏁�
-            f.completed_quantity as thisQuantitySum ,-- 鏈伐搴忓畬宸ュ拰
+            if(ifnull(a.completed_quantity+a.breakage_quantity,0)=0,
+                c.quantity-ifnull(a.completed_quantity+a.breakage_quantity,0),
+                ifnull(a.completed_quantity+a.breakage_quantity,0)) as 'quantity', -- 鍙姤宸ユ暟
+            ifnull(a.completed_quantity,0) as 'completedQuantity', -- 瀹屽伐鏁�
+            ifnull(a.breakage_quantity,0) as 'breakageQuantity', -- 鐮存崯鏁�
+            ifnull(f.completed_quantity,0) as thisQuantitySum ,-- 鏈伐搴忓畬宸ュ拰
             if(c.quantity-f.completed_quantity = 0 ,true,false) as saveFlag,
             <if test="nextProcess != null and nextProcess != ''">  -- 闈炴渶鍚庝竴閬撳伐搴�
                 ifnull(g.completed_quantity,0) as nextQuantitySum,  -- 鍚庡伐搴忓凡瀹屾垚
@@ -411,13 +413,16 @@
                 as minQuantity -- 淇敼鏈�灏忔暟
             </if>
             -- e.thisQuantitySum
-        from
-            reporting_work_detail as a
-            left join reporting_work as b
-                on  a.reporting_work_id = b.reporting_work_id
-            left join  flow_card as c
-                on c.process_id = b.process_id
-                and c.technology_number = a.technology_number
+        from reporting_work as b
+
+        right join  flow_card as c
+        on c.process_id = b.process_id
+
+        left join reporting_work_detail as a
+        on  a.reporting_work_id = b.reporting_work_id
+        and c.order_number=a.order_number
+        and c.technology_number = a.technology_number
+
             left join  sd.order_glass_detail as d
                 on d.order_id = c.order_id
                 and c.order_number = d.order_number
@@ -461,7 +466,8 @@
                   and g.order_number = a.order_number
                   and g.technology_number = a.technology_number
         </if>
-        where a.reporting_work_id = #{reportingWorkId}
+        where b.reporting_work_id = #{reportingWorkId}
+        GROUP BY c.order_number
     </select>
 <select id="selectReportingWorkMp" resultMap="reportingWorkMap">
         select rw.reporting_work_id,
@@ -574,7 +580,6 @@
         select process
         from sd.order_process_detail
         where process_id = #{processId}
-          and order_number = 1
           and technology_number = 1
         order by id desc
         LIMIT 1
diff --git a/north-glass-erp/target/classes/application.yml b/north-glass-erp/target/classes/application.yml
index 8c37623..5441601 100644
--- a/north-glass-erp/target/classes/application.yml
+++ b/north-glass-erp/target/classes/application.yml
@@ -11,22 +11,22 @@
       strict: false #璁剧疆涓ユ牸妯″紡,榛樿false涓嶅惎鍔�. 鍚姩鍚庡湪鏈尮閰嶅埌鎸囧畾鏁版嵁婧愭椂鍊欏洖鎶涘嚭寮傚父,涓嶅惎鍔ㄤ細浣跨敤榛樿鏁版嵁婧�.
       datasource:
         user_info:
-          url: jdbc:mysql://localhost:3306/erp_user_info?serverTimezone=GMT%2b8
+          url: jdbc:mysql://10.153.19.150:3306/erp_user_info?serverTimezone=GMT%2b8
           username: root
           password: beibo.123/
           driver-class-name: com.mysql.cj.jdbc.Driver
         sd:
-          url: jdbc:mysql://localhost:3306/sd?serverTimezone=GMT%2b8&allowMultiQueries=true
+          url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8&allowMultiQueries=true
           username: root
           password: beibo.123/
           driver-class-name: com.mysql.cj.jdbc.Driver
         mm:
-          url: jdbc:mysql://localhost:3306/mm?serverTimezone=GMT%2b8
+          url: jdbc:mysql://10.153.19.150:3306/mm?serverTimezone=GMT%2b8
           username: root
           password: beibo.123/
           driver-class-name: com.mysql.cj.jdbc.Driver
         pp:
-          url: jdbc:mysql://localhost:3306/pp?serverTimezone=GMT%2b8
+          url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8
           username: root
           password: beibo.123/
           driver-class-name: com.mysql.cj.jdbc.Driver
diff --git a/north-glass-erp/target/classes/mapper/pp/ReportingWork.xml b/north-glass-erp/target/classes/mapper/pp/ReportingWork.xml
index 70d7661..8d19a0f 100644
--- a/north-glass-erp/target/classes/mapper/pp/ReportingWork.xml
+++ b/north-glass-erp/target/classes/mapper/pp/ReportingWork.xml
@@ -310,13 +310,10 @@
     </select>
     <select id="selectGlassProcessNum" resultType="java.lang.Integer">
         select
-            if((d.reporting_work_num_count+ifnull(c.reworkNumSum,0)-b.reporting_work_num_count-b.broken_num)&lt; 0,
-               0,
-               (d.reporting_work_num_count+ifnull(c.reworkNumSum,0)-b.reporting_work_num_count-b.broken_num)
-                )
-
-
-
+        if((d.reporting_work_num_count+ifnull(c.reworkNumSum,0)-b.reporting_work_num_count-b.broken_num)&lt; 0,
+           0,
+           (d.reporting_work_num_count+ifnull(c.reworkNumSum,0)-b.reporting_work_num_count-b.broken_num)
+            )
         from flow_card as a
         left join sd.order_process_detail as b
         on
@@ -386,10 +383,12 @@
             d.child_width,
             d.child_height,
             e.shape,
-            a.completed_quantity+a.breakage_quantity as 'quantity', -- 鍙姤宸ユ暟
-            a.completed_quantity as 'completedQuantity', -- 瀹屽伐鏁�
-            a.breakage_quantity as 'breakageQuantity', -- 鐮存崯鏁�
-            f.completed_quantity as thisQuantitySum ,-- 鏈伐搴忓畬宸ュ拰
+            if(ifnull(a.completed_quantity+a.breakage_quantity,0)=0,
+                c.quantity-ifnull(a.completed_quantity+a.breakage_quantity,0),
+                ifnull(a.completed_quantity+a.breakage_quantity,0)) as 'quantity', -- 鍙姤宸ユ暟
+            ifnull(a.completed_quantity,0) as 'completedQuantity', -- 瀹屽伐鏁�
+            ifnull(a.breakage_quantity,0) as 'breakageQuantity', -- 鐮存崯鏁�
+            ifnull(f.completed_quantity,0) as thisQuantitySum ,-- 鏈伐搴忓畬宸ュ拰
             if(c.quantity-f.completed_quantity = 0 ,true,false) as saveFlag,
             <if test="nextProcess != null and nextProcess != ''">  -- 闈炴渶鍚庝竴閬撳伐搴�
                 ifnull(g.completed_quantity,0) as nextQuantitySum,  -- 鍚庡伐搴忓凡瀹屾垚
@@ -414,13 +413,16 @@
                 as minQuantity -- 淇敼鏈�灏忔暟
             </if>
             -- e.thisQuantitySum
-        from
-            reporting_work_detail as a
-            left join reporting_work as b
-                on  a.reporting_work_id = b.reporting_work_id
-            left join  flow_card as c
-                on c.process_id = b.process_id
-                and c.technology_number = a.technology_number
+        from reporting_work as b
+
+        right join  flow_card as c
+        on c.process_id = b.process_id
+
+        left join reporting_work_detail as a
+        on  a.reporting_work_id = b.reporting_work_id
+        and c.order_number=a.order_number
+        and c.technology_number = a.technology_number
+
             left join  sd.order_glass_detail as d
                 on d.order_id = c.order_id
                 and c.order_number = d.order_number
@@ -464,7 +466,8 @@
                   and g.order_number = a.order_number
                   and g.technology_number = a.technology_number
         </if>
-        where a.reporting_work_id = #{reportingWorkId}
+        where b.reporting_work_id = #{reportingWorkId}
+        GROUP BY c.order_number
     </select>
 <select id="selectReportingWorkMp" resultMap="reportingWorkMap">
         select rw.reporting_work_id,
@@ -577,7 +580,6 @@
         select process
         from sd.order_process_detail
         where process_id = #{processId}
-          and order_number = 1
           and technology_number = 1
         order by id desc
         LIMIT 1

--
Gitblit v1.8.0