From bb99f3d2bd880fc4bea36efa8f9fb041b483f279 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期一, 09 九月 2024 14:38:33 +0800
Subject: [PATCH] #

---
 zy-asrs-common/src/main/resources/mapper/wms/ViewStayTimeMapper.xml |   54 ++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 34 insertions(+), 20 deletions(-)

diff --git a/zy-asrs-common/src/main/resources/mapper/wms/ViewStayTimeMapper.xml b/zy-asrs-common/src/main/resources/mapper/wms/ViewStayTimeMapper.xml
index 5a220a1..9177994 100644
--- a/zy-asrs-common/src/main/resources/mapper/wms/ViewStayTimeMapper.xml
+++ b/zy-asrs-common/src/main/resources/mapper/wms/ViewStayTimeMapper.xml
@@ -3,26 +3,40 @@
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.zy.asrs.common.wms.mapper.ReportQueryMapper">
 
-<!-- mapper涓嶆敮鎸乻ql璇彞宓屽鏃讹紝閲囩敤sql鐗囨鍖呭惈鏂瑰紡锛岃В鍐硏ml鏍囩闂 -->
-<sql id="viewStayTimeConditionSql">
-		<if test="viewStayTime.locNo!=null and viewStayTime.locNo!='' ">
-			and common_loc_mast.loc_no like '%' + #{viewStayTime.locNo} + '%'
-		</if>
-		<if test="viewStayTime.matnr!=null and viewStayTime.matnr!='' ">
-			and matnr like '%' + #{viewStayTime.matnr} + '%'
-		</if>
-</sql>
+	<!-- mapper涓嶆敮鎸乻ql璇彞宓屽鏃讹紝閲囩敤sql鐗囨鍖呭惈鏂瑰紡锛岃В鍐硏ml鏍囩闂 -->
+	<sql id="viewStayTimeConditionSql">
+			<if test="viewStayTime.locNo!=null and viewStayTime.locNo!='' ">
+				and common_loc_mast.loc_no like '%' + #{viewStayTime.locNo} + '%'
+			</if>
+			<if test="viewStayTime.matnr!=null and viewStayTime.matnr!='' ">
+				and wms_loc_detl.matnr like '%' + #{viewStayTime.matnr} + '%'
+			</if>
+	</sql>
 
-<!-- 鍒嗛〉鏌ヨ鎵�鏈変俊鎭� -->
-<select id="queryViewStayTimeList" parameterType="com.zy.asrs.common.wms.entity.ViewStayTimeBean" resultType="com.zy.asrs.common.wms.entity.ViewStayTimeBean">
-	SELECT
-	GETDATE() AS today
-	, CONVERT(decimal, DATEDIFF(second,wms_loc_detl.appe_time, GETDATE()) / 86400.0, 9) AS stay_time
-	, wms_loc_detl.*
-	FROM wms_loc_detl
-	INNER JOIN common_loc_mast ON wms_loc_detl.loc_no = common_loc_mast.loc_no and wms_loc_detl.host_id = common_loc_mast.host_id
-	where 1=1
-	<include refid="viewStayTimeConditionSql"></include>
-</select>
+	<!-- 鍒嗛〉鏌ヨ鎵�鏈変俊鎭� -->
+	<select id="queryViewStayTimeList" parameterType="com.zy.asrs.common.wms.entity.ViewStayTimeBean" resultType="com.zy.asrs.common.wms.entity.ViewStayTimeBean">
+		SELECT
+		GETDATE() AS today
+		, CONVERT(decimal, DATEDIFF(second,wms_loc_detl.appe_time, GETDATE()) / 86400.0, 9) AS stay_time
+		, wms_loc_detl.*
+		FROM wms_loc_detl
+		INNER JOIN common_loc_mast ON wms_loc_detl.loc_no = common_loc_mast.loc_no and wms_loc_detl.host_id = common_loc_mast.host_id
+		where 1=1
+		<include refid="viewStayTimeConditionSql"></include>
+	</select>
+
+	<!-- 涓嶅垎椤垫煡璇㈡墍鏈変俊鎭紝鐢ㄤ簬excel瀵煎嚭 -->
+	<select id="getViewStayTimeAll" parameterType="map" resultType="com.zy.asrs.common.wms.entity.ViewStayTimeBean">
+		SELECT
+		GETDATE() AS today
+		, CONVERT(decimal, DATEDIFF(second,wms_loc_detl.appe_time, GETDATE()) / 86400.0, 9) AS stay_time
+		, wms_loc_detl.*
+		FROM wms_loc_detl
+		INNER JOIN common_loc_mast ON wms_loc_detl.loc_no = common_loc_mast.loc_no and wms_loc_detl.host_id = common_loc_mast.host_id
+		where 1=1
+		<if test="locNo!=null and locNo!='' ">
+			and wms_loc_detl.loc_no like '%' + #{locNo} + '%'
+		</if>
+	</select>
 
 </mapper>

--
Gitblit v1.9.1