From 0caec92aff3b75e6b82801eabbde20713cde9cec Mon Sep 17 00:00:00 2001
From: suerwei <18810552194@163.com>
Date: 星期四, 23 五月 2024 11:49:35 +0800
Subject: [PATCH] 管材出入库统计_1
---
javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/TubLogMapper.xml | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/TubLogMapper.xml b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/TubLogMapper.xml
index b364545..7410116 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/TubLogMapper.xml
+++ b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/TubLogMapper.xml
@@ -56,10 +56,11 @@
SELECT
a.tub_name,
b.inbound_number,
- a.outbound_number
+ a.outbound_number,
+ a.unit
FROM
- ( SELECT tub_name, SUM( number ) AS outbound_number FROM js_tub_log WHERE outbound_date IS NOT NULL GROUP BY tub_name ) a
- LEFT JOIN ( SELECT tub_name, SUM( number ) AS inbound_number FROM js_tub_log WHERE inbound_date IS NOT NULL GROUP BY tub_name ) b ON a.tub_name = b.tub_name
+ ( SELECT tub_name, SUM( number ) AS outbound_number, unit FROM js_tub_log WHERE outbound_date IS NOT NULL GROUP BY tub_name ) a
+ LEFT JOIN ( SELECT tub_name, SUM( number ) AS inbound_number, unit FROM js_tub_log WHERE inbound_date IS NOT NULL GROUP BY tub_name ) b ON a.tub_name = b.tub_name
</select>
<insert id="insertTubLog" parameterType="TubLog" useGeneratedKeys="true" keyProperty="id">
--
Gitblit v1.9.1