From 679a0536c8e684cee5874b746c766dae4949fcdf Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期一, 30 十二月 2024 16:09:38 +0800
Subject: [PATCH] 补片标签打印改为选择自定义标签模版打印

---
 north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml |   29 +++++++++++++++++++++++------
 1 files changed, 23 insertions(+), 6 deletions(-)

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 b77fc0a..d1cb5ec 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -484,7 +484,7 @@
     </select>
 
     <select id="selectPrintFlowCard">
-        select project_no,glass_total,glass_total_area
+        select project_no,glass_total,glass_total_area,labelPrintNum,processPrintNum
         from pp.optimize_project
         where date(create_time)>=#{selectTime1} and date(create_time) &lt;= #{selectTime2}
           and state >= 20
@@ -492,7 +492,7 @@
     </select>
 
     <select id="selectPrintMp">
-        select *
+        SELECT result.*,fcc.print_status from ( select *
         from ((select fc.id,
                       fc.order_id,
                       fc.process_id,
@@ -507,7 +507,6 @@
                       ogdss.concatenated_glass_child                                   as glass_child,
                       fc.founder,
                       date(fc.splitFrame_time)                                         as splitFrame_time,
-                      fc.print_status,
                       processed_part                                                   as process
 
                from flow_card as fc
@@ -549,7 +548,6 @@
                       ogdss.concatenated_glass_child                                   as glass_child,
                       fc.founder,
                       date(fc.splitFrame_time)                                         as splitFrame_time,
-                      fc.print_status,
                       processed_part                                                   as process
 
                from flow_card as fc
@@ -587,7 +585,6 @@
                       ogdss.concatenated_glass_child                                   as glass_child,
                       fc.founder,
                       date(fc.splitFrame_time)                                         as splitFrame_time,
-                      fc.print_status,
                       processed_part                                                   as process
 
                from flow_card as fc
@@ -618,7 +615,9 @@
         where process is not null
           and process != ""
         GROUP BY order_id, process_id, technology_number, process
-        order by order_id, process_id, length(technology_number)
+        order by order_id, process_id, length(technology_number)) as result
+        LEFT JOIN (SELECT * from flow_card GROUP BY process_id,technology_number) as fcc
+        on result.process_id = fcc.process_id and result.technology_number = fcc.technology_number
     </select>
 
     <select id="getPrimaryList">
@@ -2647,4 +2646,22 @@
         GROUP BY fc.process_id, ogd.technology_number
         order by fc.process_id, ogd.technology_number
     </select>
+
+    <update id="updateProjectLabelPrintCount">
+       update optimize_project set labelPrintNum=labelPrintNum+1 where project_no=#{projectNo}
+    </update>
+    
+    <select id="selectProjectLabelPrintCount">
+        select labelPrintNum from optimize_project where project_no=#{projectNo}
+    </select>
+
+    <update id="updateProjectProcessPrintCount">
+        update optimize_project set processPrintNum=processPrintNum+1 where project_no=#{projectNo}
+    </update>
+
+    <select id="selectProjectProcessPrintCount">
+        select processPrintNum from optimize_project where project_no=#{projectNo}
+    </select>
+
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0