From b987214b09dfeedb741f061da845306be4c6324c Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期二, 08 十月 2024 10:27:53 +0800
Subject: [PATCH] 修改工程打印

---
 north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue     |    1 -
 north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java |    2 +-
 north-glass-erp/src/main/resources/mapper/sd/CustomerMapper.xml            |   21 +++++++++++++++++++++
 north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml                  |    5 ++++-
 4 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue
index 3a367e5..9206d1c 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue
@@ -39,7 +39,6 @@
       }
     })
   }else{
-    console.log(printType)
     if (printType == 1) {
       data.value.printList = JSON.parse(route.query.printList)
       request.post(`/processCard/getSelectPrintLabel1`,data.value).then((res) => {
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java b/north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
index c81f7e7..939c679 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
@@ -112,7 +112,7 @@
             log.setOperatorId(order.getCreatorId());
             log.setContent(orderMap.toString());
             log.setFunction("saveOrderTitle淇濆瓨琛ㄥご:"+order.getOrderId());
-            
+
             Order order1 = orderMapper.selectOrderId(order.getOrderId());
             order.setCalculateType(order1.getCalculateType());
 
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 2259a24..c2f2955 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -720,7 +720,7 @@
                od.other_columns,
                od.bend_radius,
                od.order_number as heat_layout_id,
-               ogd.technology_number as heat_layout_sort
+               a.id as heat_layout_sort
         from pp.optimize_detail opd
                  left join sd.`order` o on SUBSTR(opd.process_id, 1, 10) = o.order_id
                  left join sd.order_detail od
@@ -731,6 +731,9 @@
                  left join sd.product p on od.product_id = p.id
                  left join sd.basic_glass_type e on e.type_id = p.type_id
                  left join sd.customer c on c.id = o.customer_id
+        left join
+        (select (@row_number := @row_number + 1) as id,process_id as process_id from (select process_id from pp.optimize_detail tt where project_no =#{projectNo} group by process_id) tt,(select @row_number := 0) as t) a
+        on a.process_id=opd.process_id
         where opd.project_no = #{projectNo}
         order by opd.stock_id
     </select>
diff --git a/north-glass-erp/src/main/resources/mapper/sd/CustomerMapper.xml b/north-glass-erp/src/main/resources/mapper/sd/CustomerMapper.xml
index d4d1026..86491f8 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/CustomerMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/CustomerMapper.xml
@@ -268,6 +268,27 @@
           and d.customer_id = #{orderDetail.order.customerId}
           and om.money is not null
         group by d.delivery_id, o.order_id, om.`column`
+
+        UNION ALL
+
+        select d.delivery_id,
+               d.order_id,
+               d.customer_name,
+               d.project,
+               '杩愯垂'           as product_name,
+               d.freight_quantity    as quantity,
+               0                   as area,
+               d.freight_price    as price,
+               d.freight        as money,
+               date(d.create_time) as create_time
+
+        from sd.delivery d
+
+        where date(d.create_time) >= #{startDate}
+          and date(d.create_time) &lt;= #{endDate}
+          and d.customer_id = #{orderDetail.order.customerId}
+          and d.freight >0
+        group by d.delivery_id
     </select>
 
     <select id="exportSelectCustomerOderDate" >

--
Gitblit v1.8.0