From f8a5192aa2797e83f5000ff9035f149b0a1b00a1 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期一, 28 十月 2024 15:42:58 +0800
Subject: [PATCH] #更新接口

---
 zy-asrs-common/src/main/resources/mapper/wms/ViewStayTimeMapper.xml |   55 ++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 36 insertions(+), 19 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..04e1c8d 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,43 @@
 "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} + '%'
+	<!-- 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>
+		<if test="viewStayTime.zpallet!=null and viewStayTime.zpallet!='' ">
+			and wms_loc_detl.zpallet like '%' + #{viewStayTime.zpallet} + '%'
 		</if>
-		<if test="viewStayTime.matnr!=null and viewStayTime.matnr!='' ">
-			and matnr like '%' + #{viewStayTime.matnr} + '%'
-		</if>
-</sql>
+	</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