From 9ccc8bd3a53160a40cf60f14e5867f6ce9f6c58f Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期五, 26 十二月 2025 16:49:15 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml | 88 +++++++++++++++++++++++++++++++++++++++++--
1 files changed, 83 insertions(+), 5 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 9640301..029c7ca 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
@@ -39,7 +39,6 @@
`order` as a
where
year(a.create_time) = year(now())
- and a.id>400
</select>
<select id="selectOrderIdMin">
@@ -95,7 +94,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 +104,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()) < 3 and o.delivery < 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) <= #{endDate}
+ where date(o.create_time) between #{startDate} and #{endDate}
<if test="orderType!= null and orderType != ''">
and o.create_order = #{orderType}
@@ -199,7 +200,7 @@
) as acc
order by
<if test="orderBy == null ">
- id desc
+ order_id desc
</if>
<if test="orderBy == 'desc'">
${field} desc
@@ -375,4 +376,81 @@
having count(a.order_number) > 1
</select>
+ <select id="searchOrderWarehousing">
+ 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>
+
+ <select id="selectDeliveryStateConut">
+ select count(*) from sd.delivery_detail dd left join sd.delivery d on dd.delivery_id=d.delivery_id where dd.order_id= #{orderId} and d.delivery_state=0
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0