From 79f094ecc2d1b7bec8c577fa6237a615cdb8773b Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期一, 23 十二月 2024 16:52:57 +0800
Subject: [PATCH] 添加 工程信息显示流程卡功能

---
 north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml |   24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)

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 720263d..3a7c802 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -255,7 +255,7 @@
 
         WHERE
             fc.process_id = #{processIdStr}
-        <if test="process != '涓┖' and process != '澶硅兌' and process != '鍖呰' and process != '鎵撹兌鍜岀矘妗�' ">
+        <if test="laminating != 'laminating'">
            AND POSITION(fc.technology_number in #{technologyStr})
         </if>
         AND odpd.process = #{process}
@@ -430,11 +430,11 @@
                 ifnull(g.completed_quantity,0) as nextQuantitySum,  -- 鍚庡伐搴忓凡瀹屾垚
                 if((f.completed_quantity
                     -ifnull(g.completed_quantity,0))
-                    &gt;=
+                    >
                    a.completed_quantity,
                     0,
-                   (a.completed_quantity-f.completed_quantity
-                       +ifnull(g.completed_quantity,0))
+                   (f.completed_quantity
+                       -ifnull(g.completed_quantity,0))
                     )  as minQuantity -- 淇敼鏈�灏忔暟
             </if>
             <if test="nextProcess == null or nextProcess == ''">  -- 鏈�鍚庝竴閬撳伐搴�
@@ -533,7 +533,7 @@
                            on rwd.reporting_work_id = rw.reporting_work_id and rwd.order_number = ogd.order_number and
                               rwd.technology_number = ogd.technology_number
         where rw.reviewed_state != 2
-          and rw.reporting_work_time between #{selectTime1} and #{selectTime2}
+          and DATE_FORMAT((rw.reporting_work_time), '%Y-%m-%d') between #{selectTime1} and #{selectTime2}
           and position(#{orderId} in rw.order_id)
           and rw.reviewed_state!=-1
           and o.create_order>0
@@ -576,7 +576,7 @@
                            on rwd.reporting_work_id = rw.reporting_work_id and rwd.order_number = ogd.order_number and
                               rwd.technology_number = ogd.technology_number
         where rw.reviewed_state != 2
-          and rw.reporting_work_time between #{selectTime1} and #{selectTime2} and position(#{orderId} in rw.order_id)
+          and DATE_FORMAT((rw.reporting_work_time), '%Y-%m-%d') between #{selectTime1} and #{selectTime2} and position(#{orderId} in rw.order_id)
           and rw.reviewed_state!=-1
           and o.create_order>0
         <if test="reportingWork.reportingWorkId != null and reportingWork.reportingWorkId != ''">
@@ -705,7 +705,7 @@
 
                  left join damage_details as dd on dd.reporting_work_id=rw.reporting_work_id
         where rw.reviewed_state != 2
-          and rw.reporting_work_time between #{selectTime1} and #{selectTime2}
+          and DATE_FORMAT((rw.reporting_work_time), '%Y-%m-%d') between #{selectTime1} and #{selectTime2}
           and position(#{processId} in rw.process_id)
           and position(#{state} in dd.quality_ins_status)
           and rw.reviewed_state!=-1
@@ -735,7 +735,7 @@
 
                  left join damage_details as dd on dd.reporting_work_id=rw.reporting_work_id
         where rw.reviewed_state != 2
-          and rw.reporting_work_time between #{selectTime1} and #{selectTime2}
+          and DATE_FORMAT((rw.reporting_work_time), '%Y-%m-%d') between #{selectTime1} and #{selectTime2}
           and position(#{processId} in rw.process_id)
           and position(#{state} in dd.quality_ins_status)
           and rw.reviewed_state!=-1
@@ -987,17 +987,21 @@
         from reporting_work as a
         left join reporting_work_detail as b on a.reporting_work_id = b.reporting_work_id
         where this_process=#{previousProcess} and reviewed_state=0 and process_id= #{processIdStr}
-        and  POSITION(b.technology_number in #{technologyStr})
+
         GROUP BY a.reporting_work_id,b.order_number,b.technology_number
         ) as rws
         on rws.process_id = fc.process_id and rws.order_number=fc.order_number and rws.technology_number=fc.technology_number
         WHERE
         fc.process_id = #{processIdStr}
-        <if test="process != '涓┖' and process != '澶硅兌' and process != '鍖呰' and process != '鎵撹兌鍜岀矘妗�' ">
+        <if test="laminating != 'laminating' ">
             AND POSITION(fc.technology_number in #{technologyStr})
         </if>
         AND odpd.process = #{process}
         and rws.reviewed_state=0
         order by fc.order_number
     </select>
+
+    <select id="getProcessLaminating">
+        select IFNULL(nickname,'') from sd.basic_data where basic_category='process' and basic_name=#{process}
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0