From cc1239bf95ee3f1880b0b4fa462a7fd40664cfb2 Mon Sep 17 00:00:00 2001
From: xiebin <123456>
Date: Thu, 22 Sep 2022 16:41:53 +0800
Subject: [PATCH] 图片服务器地址更换
---
src/main/java/org/springblade/modules/recovery/mapper/RecoveryMapper.xml | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/src/main/java/org/springblade/modules/recovery/mapper/RecoveryMapper.xml b/src/main/java/org/springblade/modules/recovery/mapper/RecoveryMapper.xml
index 6a5eaac..81bcf81 100644
--- a/src/main/java/org/springblade/modules/recovery/mapper/RecoveryMapper.xml
+++ b/src/main/java/org/springblade/modules/recovery/mapper/RecoveryMapper.xml
@@ -80,14 +80,16 @@
and DATE_FORMAT(sr.time,'%Y-%m-%d') <= #{recovery.endTime}
</if>
GROUP BY sr.strain_id
+
UNION
- SELECT p.process_id,SUM(p.process_num),l.farm_id,m.machining_type,m.machining_tp
+
+ SELECT p.process_id,SUM(p.process_num),inv.fps_id,m.machining_type,m.machining_tp
FROM sys_process p
LEFT JOIN sys_machining m ON p.process_id = m.id
- LEFT JOIN sys_land l ON p.land_id = l.id
- WHERE 1=1
+ LEFT JOIN sys_process_inv inv ON inv.product_id = p.process_id
+ WHERE 1=1 AND p.is_deleted = 0
<if test="recovery.deptId !=null and recovery.deptId !=''">
- AND l.farm_id = #{recovery.deptId}
+ AND inv.fps_id = #{recovery.deptId}
</if>
<if test="recovery.startTime != null and recovery.startTime !=''">
AND DATE_FORMAT(p.sale_time,'%Y-%m-%d') >= #{recovery.startTime}
@@ -95,7 +97,7 @@
<if test="recovery.endTime != null and recovery.endTime !=''">
and DATE_FORMAT(p.sale_time,'%Y-%m-%d') <= #{recovery.endTime}
</if>
- GROUP BY p.process_id,l.farm_id
+ GROUP BY p.process_id
</select>
<select id="recoveryStatisticsx" resultType="org.springblade.modules.recovery.vo.RecoveryVO">
SELECT sr.strain_id,SUM(sr.weight) AS weight,sr.dept_id,strain.strain_name,strain.url
@@ -111,18 +113,17 @@
<if test="recovery.endTime != null and recovery.endTime !=''">
and DATE_FORMAT(sr.time,'%Y-%m-%d') <= #{recovery.endTime}
</if>
- <if test="recovery.strainType != null and recovery.strainType !=''">
- AND strain.strain_type = #{recovery.strainType}
- </if>
GROUP BY sr.strain_id
+
UNION
- SELECT p.process_id,SUM(p.process_num),l.farm_id,m.machining_type,m.machining_tp
+
+ SELECT p.process_id,SUM(p.process_num),inv.fps_id,m.machining_type,m.machining_tp
FROM sys_process p
LEFT JOIN sys_machining m ON p.process_id = m.id
- LEFT JOIN sys_land l ON p.land_id = l.id
- WHERE 1=1
+ LEFT JOIN sys_process_inv inv ON inv.product_id = p.process_id
+ WHERE 1=1 AND p.is_deleted = 0
<if test="recovery.deptId !=null and recovery.deptId !=''">
- AND l.farm_id = #{recovery.deptId}
+ AND inv.fps_id = #{recovery.deptId}
</if>
<if test="recovery.startTime != null and recovery.startTime !=''">
AND DATE_FORMAT(p.sale_time,'%Y-%m-%d') >= #{recovery.startTime}
@@ -130,6 +131,6 @@
<if test="recovery.endTime != null and recovery.endTime !=''">
and DATE_FORMAT(p.sale_time,'%Y-%m-%d') <= #{recovery.endTime}
</if>
- GROUP BY p.process_id,l.farm_id
+ GROUP BY p.process_id
</select>
</mapper>
--
Gitblit v1.9.3