From c3e3920e4e7fcda3dd986c00bb80188381e93015 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期四, 18 四月 2024 09:59:50 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/a1536384743/erp_-override

---
 north-glass-erp/src/main/resources/mapper/sd/OrderDetail.xml |   46 +++++++++++++++++++++++++++++++---------------
 1 files changed, 31 insertions(+), 15 deletions(-)

diff --git a/north-glass-erp/src/main/resources/mapper/sd/OrderDetail.xml b/north-glass-erp/src/main/resources/mapper/sd/OrderDetail.xml
index ca2d4d0..b4409d1 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/OrderDetail.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/OrderDetail.xml
@@ -91,21 +91,19 @@
         <result column="total_thickness" property="totalThickness"/>
         <result column="createTime" property="createTime"/>
 
-        <association property="order" javaType="com.example.erp.entity.sd.Order">
-            <result column="order_type" property="orderType"/>
-            <result column="customer_name" property="customerName"/>
-            <result column="project" property="project"/>
-            <result column="order_id" property="orderId"/>
-            <result column="batch" property="batch"/>
-            <result column="b.processing_note" property="processingNote"/>
-            <result column="icon" property="icon"/>
-            <result column="packType" property="packType"/>
-            <result column="salesman" property="salesman"/>
-            <result column="delivery_address" property="deliveryAddress"/>
-            <result column="creator" property="creator"/>
-            <result column="verifier" property="verifier"/>
-            <result column="customer_batch" property="customerBatch"/>
-        </association>
+        <result column="order_type" property="order.orderType"/>
+        <result column="customer_name" property="order.customerName"/>
+        <result column="project" property="order.project"/>
+        <result column="order_id" property="order.orderId"/>
+        <result column="batch" property="order.batch"/>
+        <result column="b.processing_note" property="order.processingNote"/>
+        <result column="icon" property="order.icon"/>
+        <result column="packType" property="order.packType"/>
+        <result column="salesman" property="order.salesman"/>
+        <result column="delivery_address" property="order.deliveryAddress"/>
+        <result column="creator" property="order.creator"/>
+        <result column="verifier" property="order.verifier"/>
+        <result column="customer_batch" property="order.customerBatch"/>
 
     </resultMap>
 
@@ -393,4 +391,22 @@
         order by a.id desc
     </select>
 
+    <select id="exportOrderReport">
+        SELECT
+            *,
+            a.create_time as createTime,
+            d.type_name as levelOne,
+            e.type_name as levelTwo
+        from order_detail as a
+         left join sd.`order` as b
+                   on b.order_id = a.order_id
+         left join sd.product as c
+                   on c.id = a.product_id
+         left join sd.basic_glass_type as d
+                   on d.type_id = c.type_id
+         left join sd.basic_glass_type as e
+                   on e.type_id = d.belong
+
+    </select>
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0