Jelajahi Sumber

修改wms查询区域

dq 5 tahun lalu
induk
melakukan
64f5408871

+ 1 - 1
src/main/java/com/emato/cus/supervise/schedule/AcqGoodsMoveSchedule.java

@@ -30,7 +30,7 @@ public class AcqGoodsMoveSchedule {
      */
     //每月1号开始,每天12,18点执行各1次,共2次
     @Scheduled(cron = "0 0 12,18 1/1 * ?")
-//    @Scheduled(cron = "0/10 * * * * ? ")
+//    @Scheduled(cron = "0 0/1 * * * ? ")
     public void timerUp() {
         logger.info("==================== 货物库位移动数据:上架:监控数据读取开始 ====================");
         String begDateTime = LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN);

+ 1 - 0
src/main/java/com/emato/cus/supervise/schedule/AcqGoodsSeatSchedule.java

@@ -31,6 +31,7 @@ public class AcqGoodsSeatSchedule {
      */
     //每月1号开始,每天10,12,15,18,22点各1次,共5次
     @Scheduled(cron = "0 0 10,12,15,18,22 1/1 * ?")
+//    @Scheduled(cron = "0 0/1 * * * ? ")
     public void timerUp() {
         logger.info("==================== 库位货物数据::监控数据读取开始 ====================");
         String begDateTime = LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN);

+ 1 - 0
src/main/java/com/emato/cus/supervise/schedule/AcqInventoryInfoSchedule.java

@@ -29,6 +29,7 @@ public class AcqInventoryInfoSchedule {
      */
     //每月1号开始,每天12,22点各1次,共2次
     @Scheduled(cron = "0 0 12,22 1/1 * ?")
+//    @Scheduled(cron = "0 0/1 * * * ? ")
     public void timer() {
         logger.info("==================== 货物库存数据::监控数据读取开始 ====================");
         String begDateTime = LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN);

+ 2 - 0
src/main/java/com/emato/cus/supervise/schedule/AcqShelfLoadSchedule.java

@@ -35,6 +35,7 @@ public class AcqShelfLoadSchedule {
      */
     //每月1号开始,每天10,18点执行各1次,共2次
     @Scheduled(cron = "0 0 10,18 1/1 * ?")
+//    @Scheduled(cron = "0 0/1 * * * ? ")
     public void timerUp() {
         logger.info("==================== 货物上下架数据::上架::监控数据读取开始 ====================");
         String begDateTime = LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN);
@@ -53,6 +54,7 @@ public class AcqShelfLoadSchedule {
      */
     //每月1号开始,每天18点执行1次,共1次
     @Scheduled(cron = "0 0 18 1/1 * ?")
+//    @Scheduled(cron = "0 0/1 * * * ? ")
     public void timerDown() {
         logger.info("==================== 货物上下架数据::下架::监控数据读取开始 ====================");
         String begDateTime = LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN);

+ 3 - 7
src/main/resources/mybatis/mapper/wms-acq-goods-move.xml

@@ -4,8 +4,7 @@
 <mapper namespace="com.emato.cus.supervise.mapper.WmsAcqGoodsMoveMapper">
 
     <!-- 企业货物在仓库库的移动查询: 上架查询 -->
-    <select id="getWmsAcqGoodsMoveUp" parameterType="java.util.Map"
-            resultType="com.emato.cus.supervise.domain.WmsAcqGoodsMove">
+    <select id="getWmsAcqGoodsMoveUp" parameterType="java.util.Map" resultType="com.emato.cus.supervise.domain.WmsAcqGoodsMove">
 		SELECT
 		td.taskType AS taskType,
 		td.created AS created,
@@ -19,20 +18,17 @@
 		i.unitDesc AS gUnit,
 		td.totalqty AS gQty,
 		CONCAT(i.itemSize,'-',i.itemColor,'-',i.itemStyle) as goodsModel
-		FROM
-		task_detail td
+		FROM task_detail td
 		LEFT JOIN item i on td.itemcode = i.CODE
 		LEFT JOIN location l1 ON td.toLoc = l1.CODE
 		LEFT JOIN location l2 ON td.fromLoc = l2.CODE
 		<where>
 			1 = 1
-			and (l1.zoneCode in ('A区', 'B区', 'C区', 'D区') or l2.zoneCode in ('A区', 'B区', 'C区', 'D区'))
+			and (l1.zoneCode in ('A区', 'B区', 'C区', 'GQ区', 'F区', 'P区') or l2.zoneCode in ('A区', 'B区', 'C区', 'GQ区', 'F区', 'P区'))
 			<if test="thisTime != null">
 				and td.lastUpdated &gt;= #{thisTime}
 			</if>
 		</where>
     </select>
 
-
-
 </mapper>

+ 6 - 14
src/main/resources/mybatis/mapper/wms-acq-goods-on-seat.xml

@@ -4,8 +4,7 @@
 <mapper namespace="com.emato.cus.supervise.mapper.WmsAcqGoodsSeatMapper">
 
     <!-- 库位上的货品信息 -->
-    <select id="getWmsAcqGoodsSeat" parameterType="java.util.Map"
-            resultType="com.emato.cus.supervise.domain.WmsAcqGoodsOnSeat">
+    <select id="getWmsAcqGoodsSeat" parameterType="java.util.Map" resultType="com.emato.cus.supervise.domain.WmsAcqGoodsOnSeat">
         SELECT
         li.companyCode AS merchSn,
         li.locationCode AS seatNo,
@@ -14,27 +13,20 @@
         li.itemCode AS skuNo,
         li.itemCode AS goodsId,
         i.unitDesc AS gUnit,
-        li.onHandQty AS gQty,
+        SUM(li.onHandQty) AS gQty,
         li.warehouseCode AS storeCode,
-        CONCAT(
-        i.itemSize,
-        '-',
-        i.itemColor,
-        '-',
-        i.itemStyle
-        ) AS goodsModel
-        FROM
-        location_inventory li
+        CONCAT(i.itemSize, '-', i.itemColor, '-', i.itemStyle) AS goodsModel
+        FROM location_inventory li
         LEFT JOIN item i ON li.itemCode = i.CODE
         LEFT JOIN location l ON li.locationCode = l.CODE
         <where>
             1 = 1
-            and li.inventorySts = '正常'
-            and l.zoneCode in ('A区', 'B区', 'C区', 'D区')
+            and l.zoneCode in ('A区', 'B区', 'C区', 'GQ区', 'F区', 'P区')
             <if test="thisTime != null">
                 and li.lastUpdated &gt;= #{thisTime}
             </if>
         </where>
+        GROUP BY li.itemCode, li.locationCode
     </select>
 
 

+ 9 - 12
src/main/resources/mybatis/mapper/wms-acq-inventory-info.xml

@@ -8,26 +8,23 @@
     <select id="getWmsAcqInventoryInfo" parameterType="java.util.Map"
             resultType="com.emato.cus.supervise.domain.WmsAcqInventoryInfo">
 		SELECT
-			li.companyCode AS merchSn,
-			li.itemName AS goodsName,
-			li.itemCode AS codeTs,
-			i.unitDesc AS gUnit,
-			SUM(li.onHandQty) AS gQty,
-			CONCAT(i.itemSize,'-',i.itemColor,'-',i.itemStyle) as goodsModel
-		FROM
-			location_inventory li
+		li.companyCode AS merchSn,
+		li.itemName AS goodsName,
+		li.itemCode AS codeTs,
+		i.unitDesc AS gUnit,
+		SUM(li.onHandQty) AS gQty,
+		CONCAT(i.itemSize,'-',i.itemColor,'-',i.itemStyle) as goodsModel
+		FROM location_inventory li
 		LEFT JOIN item i ON li.itemCode = i.CODE
 		LEFT JOIN location l ON li.locationCode = l.CODE
 		<where>
 			1 = 1
-			and li.inventorySts = '正常'
-			and l.zoneCode in ('A区', 'B区', 'C区', 'D区')
+			and l.zoneCode in ('A区', 'B区', 'C区', 'GQ区', 'F区', 'P区')
 			<if test="thisTime != null">
 				and li.lastUpdated &gt;= #{thisTime}
 			</if>
 		</where>
-		GROUP BY
-		li.itemCode
+		GROUP BY li.itemCode
     </select>
 
 

+ 20 - 36
src/main/resources/mybatis/mapper/wms-acq-shelf-load.xml

@@ -4,32 +4,24 @@
 <mapper namespace="com.emato.cus.supervise.mapper.WmsAcqShelfLoadMapper">
 
     <!-- 企业货物上下架信息: 上架查询 -->
-    <select id="getWmsAcqShelfLoadUp" parameterType="java.util.Map"
-            resultType="com.emato.cus.supervise.domain.WmsAcqShelfLoad">
-			SELECT
-				rc.created AS shelfLoadTime,
-				rc.itemCode AS skuNo,
-				rc.itemCode AS codeTs,
-				rc.itemCode AS goodsId,
-				rc.quantity AS gQty,
-				rc.toLocation AS seatNo,
-				i.unitDesc AS gUnit,
-				'I' AS shelfLoadType,
-				i.`name` AS goodsName,
-				CONCAT(
-					i.itemSize,
-					'-',
-					i.itemColor,
-					'-',
-					i.itemStyle
-				) AS goodsModel
-			FROM
-				receipt_container rc
-			LEFT JOIN item i ON rc.itemcode = i. CODE
-			LEFT JOIN location l ON rc.toLocation = l.CODE
+    <select id="getWmsAcqShelfLoadUp" parameterType="java.util.Map" resultType="com.emato.cus.supervise.domain.WmsAcqShelfLoad">
+		SELECT
+		rc.created AS shelfLoadTime,
+		rc.itemCode AS skuNo,
+		rc.itemCode AS codeTs,
+		rc.itemCode AS goodsId,
+		rc.quantity AS gQty,
+		rc.toLocation AS seatNo,
+		i.unitDesc AS gUnit,
+		'I' AS shelfLoadType,
+		i.`name` AS goodsName,
+		CONCAT(i.itemSize, '-', i.itemColor, '-', i.itemStyle) AS goodsModel
+		FROM receipt_container rc
+		LEFT JOIN item i ON rc.itemcode = i. CODE
+		LEFT JOIN location l ON rc.toLocation = l.CODE
 		<where>
 			1 = 1
-			and l.zoneCode in ('A区', 'B区', 'C区', 'D区')
+			and l.zoneCode in ('A区', 'B区', 'C区', 'GQ区', 'F区', 'P区')
 			<if test="thisTime != null">
 				and rc.lastUpdated &gt;= #{thisTime}
 			</if>
@@ -37,8 +29,7 @@
     </select>
 
 	<!-- 企业货物上下架信息: 下架查询 -->
-	<select id="getWmsAcqShelfLoadDown" parameterType="java.util.Map"
-			resultType="com.emato.cus.supervise.domain.WmsAcqShelfLoad">
+	<select id="getWmsAcqShelfLoadDown" parameterType="java.util.Map" resultType="com.emato.cus.supervise.domain.WmsAcqShelfLoad">
 		SELECT
 		i.`name` AS goodsName,
 		itemCode AS codeTs,
@@ -46,23 +37,16 @@
 		itemCode AS goodsId,
 		quantity AS gQty,
 		i.unitDesc AS gUnit,
-		CONCAT(
-		i.itemSize,
-		'-',
-		i.itemColor,
-		'-',
-		i.itemStyle
-		) AS goodsModel,
+		CONCAT(i.itemSize, '-', i.itemColor, '-', i.itemStyle) AS goodsModel,
 		originalPickLoc AS seatNo,
 		scd.created AS shelfLoadTime,
 		'E' AS shelfLoadType
-		FROM
-		Shipping_container_detail scd
+		FROM Shipping_container_detail scd
 		LEFT JOIN item i ON scd.itemCode = i.`code`
 		LEFT JOIN location l ON scd.originalPickLoc = l.CODE
 		<where>
 			1 = 1
-			and l.zoneCode in ('A区', 'B区', 'C区', 'D区')
+			and l.zoneCode in ('A区', 'B区', 'C区', 'GQ区', 'F区', 'P区')
 			<if test="thisTime != null">
 				and scd.lastUpdated &gt;= #{thisTime}
 			</if>