From 6d6e2c77e34e7dbae4fba340c423eaafc2b9c231 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期二, 16 四月 2024 16:46:28 +0800
Subject: [PATCH] 后端导出excel文件
---
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml | 23 +++++++----------------
1 files changed, 7 insertions(+), 16 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 dd4a3a8..0c9b1fd 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -61,7 +61,7 @@
sum(c.compute_gross_area) as compute_gross_area,
a.founder,
c.processing_note,
- if(a.layout_status=0,"涓嶅彲鎺掔増",if(a.layout_status=1,"鍙帓鐗�","宸叉帓鐗�")) as layout_status
+ if(a.layout_status=0,'涓嶅彲鎺掔増',if(a.layout_status=1,'鍙帓鐗�','宸叉帓鐗�')) as layout_status
from (select id,order_id,process_id,order_number, quantity,founder,layout_status,create_time from flow_card group by process_Id,order_number) as a left join sd.`order` as b on a.order_Id=b.order_id
left join sd.order_detail as c on a.order_Id=c.order_id and a.order_Number=c.order_number
where a.create_time between #{selectTime1} and #{selectTime2}
@@ -167,31 +167,20 @@
</select>
<!-- 鍒嗘灦鏄庣粏鏌ヨ-->
- <select id="detailsSelectMp" resultMap="flowCardMap">
+ <select id="detailsSelectMp">
select od.order_id,
ogd.production_id,
od.product_id,
od.product_name,
SUM( od.quantity) as quantity,
SUM(od.compute_gross_area) as compute_gross_area,
- od.perimeter
+ sum(od.perimeter) as perimeter
from sd.order_detail as od left join
(select order_id,order_number,production_id,splitting_status from sd.order_glass_detail
GROUP BY order_id,order_number
) as ogd on od.order_id=ogd.order_id and od.order_number=ogd.order_number
where od.order_id = #{orderId} and ogd.splitting_status=0
- <if test="flowCard.orderId != null and flowCard.orderId != ''">
- and od.order_id regexp #{flowCard.orderId}
- </if>
- <if test="flowCard.orderGlassDetail.productionId != null and flowCard.orderGlassDetail.productionId != ''">
- and ogd.production_id regexp #{flowCard.orderGlassDetail.productionId}
- </if>
- <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">
- and od.product_id regexp #{flowCard.orderDetail.productId}
- </if>
- <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName != ''">
- and od.product_name regexp #{flowCard.orderDetail.productName}
- </if>
+
group by od.order_id, ogd.production_id
order by od.id desc
</select>
@@ -203,7 +192,7 @@
on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number
set ogd.splitting_status=0
where ogd.order_id = #{orderId}
- and fc.process_id = #{processId}
+ and ogd.production_id = left(#{processId},11)
</update>
@@ -392,6 +381,8 @@
fc.order_number,
fc.technology_number,
fc.quantity,
+ ogd.child_width,
+ ogd.child_height,
round(ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2) as area,
od.product_name,
ogd.glass_child,
--
Gitblit v1.8.0