From c2a4d212d9023411cec8b2b86a8a56625f60e5e8 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期四, 20 六月 2024 10:57:42 +0800
Subject: [PATCH] 宽高改成自定义位数,以及订单审核放在加工单页面
---
north-glass-erp/src/main/resources/mapper/sd/CustomerMapper.xml | 25 +++++++++++++++++++++++--
1 files changed, 23 insertions(+), 2 deletions(-)
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 aa4a38d..a947688 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/CustomerMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/CustomerMapper.xml
@@ -161,9 +161,30 @@
<select id="getCustomerList">
select
- *
+ a.*,
+ b.project,
+ b.salesman_id,
+ b.salesman
from
- sd.customer
+ sd.customer as a
+ left join (SELECT
+ t.*
+ FROM
+ (
+ SELECT
+ ROW_NUMBER() over ( PARTITION BY o.customer_id ORDER BY o.id DESC ) AS rn,
+ o.id,
+ o.project,
+ o.salesman_id,
+ o.salesman,
+ o.customer_id
+ FROM
+ sd.ORDER AS o
+ ) t
+ WHERE
+ rn = 1) as b
+ on a.id = b.customer_id
+
</select>
<select id="getSelectCustomer">
select
--
Gitblit v1.8.0