From d111849e6e78ed02a63661e31c81dadd65f53104 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期一, 01 十二月 2025 13:28:45 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override

---
 north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml |   77 +++++++++++++++++++++++++++++++++++++-
 1 files changed, 74 insertions(+), 3 deletions(-)

diff --git a/north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml b/north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
index a5ae3ad..e00170b 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
@@ -95,7 +95,8 @@
             o.area = od.c,
             o.perimeter= od.aa,
             o.other_money = ifnull(c.money,0),
-            o.other_remarks = (select group_concat( distinct edging_type) from order_detail where order_id = #{orderId} and  edging_type is not null)
+            o.other_remarks = (select GROUP_CONCAT(DISTINCT edging_type)
+        from order_detail where order_id = #{orderId} and  edging_type is not null)
         where
             o.order_id = #{orderId}
 
@@ -104,12 +105,13 @@
     <select id="getOrderList">
        select * from (select
             o.*,
-        ifnull(sum(fgi.quantity_available),0) as goodsQuantity
+        ifnull(sum(fgi.quantity_available),0) as goodsQuantity,
+        if(DATEDIFF(o.delivery_date, CURDATE()) &lt; 3  and o.delivery &lt; 2, 'timeOut','' ) as timeOut
         from
             sd.`order` as o
         left join mm.finished_goods_inventory as  fgi
         on o.order_id = fgi.order_id
-        where  date(o.create_time)>=#{startDate} and date(o.create_time) &lt;= #{endDate}
+        where  date(o.create_time) between #{startDate} and  #{endDate}
 
           <if test="orderType!= null and orderType != ''">
                and o.create_order = #{orderType}
@@ -379,4 +381,73 @@
         select  warehousing from `order`
         where order_id = #{orderId}
     </select>
+
+    <select id="getProcessIdByOptimizeHeatDetail">
+        select  process_id from pp.optimize_heat_detail as a
+        where a.project_no = #{projectId}
+          and a.layout_id = #{layoutId}
+          and a.sort = #{sort}
+    </select>
+
+    <select id="scannerGlassInfo">
+        select c.order_id as orderId,
+               b.order_number as orderNumber,
+               b.technology_number as technologyNumber,
+               a.process_id as processId,
+               c.customer_name as customerName,
+               concat(a.width," * " , a.height) as size,
+               b.area,
+               b.glass_child as glassChild,
+               d.product_name as productName,
+               d.building_number as buildingNumber,
+               d.remarks as remarks,
+               d.processing_note as processingNote
+        from pp.optimize_heat_detail as a
+        left join sd.order_glass_detail as b
+            on b.order_number = a.order_sort
+            and b.technology_number = a. layer
+            and b.order_id = #{orderId}
+        left join  sd.order as c
+            on c.order_id = b.order_id
+        left join sd.order_detail as d
+            on c.order_id = d.order_id
+            and d.order_number = a.order_sort
+        where a.project_no = #{projectNo}
+        and a.layout_id = #{layoutId}
+        and a.sort = #{sort}
+    </select>
+
+
+    <insert id="saveOrderFile">
+        insert into sd.order_file (order_id,order_number,file_name,file_data,file_json,create_time) values(#{orderId},#{orderNumber},#{fileName},#{dxfData},#{fileJson},now())
+    </insert>
+
+    <select id="selectOrderFile">
+        select  * from sd.order_file
+        where order_id = #{orderId} and order_number = #{orderNumber}
+
+    </select>
+
+    <select id="selectOrderFileList">
+        select  * from sd.order_file
+        where order_id = #{orderId}
+
+    </select>
+
+    <update id="updateOrderFile">
+        update sd.order_file set file_name=#{fileName},file_data=#{dxfData},file_json=#{fileJson},create_time=now() where order_id=#{orderId} and order_number=#{orderNumber}
+    </update>
+
+
+    <select id="selectProcessAttributeConfigOne">
+        select  * from sd.process_attribute_config
+        where level=1
+
+    </select>
+
+    <select id="selectProcessAttributeConfigTow">
+        select  * from sd.process_attribute_config
+        where level=2 and belong=#{belong}
+
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0