Просмотр исходного кода

修正通天晓WMS仓库系统因不记录为0的库存数据,但该SKU数量在海关必须要显示为0。增加配置环境说明。

csk 5 лет назад
Родитель
Сommit
7d3f233043

+ 2 - 0
README.md

@@ -12,4 +12,6 @@
     + bug说明:
         - 2019年5月21日分中心修改【acq_shelf_load】上下架表【id】字段类型为【varchar】
         - 使用雪花算法作为增长id
+2. 通天晓WMS仓库系统因不记录为0的库存数据,但该SKU数量在海关必须要显示为0
+    20200220,修改库存和库位抓取SQL,重新打包上线。
 

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

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

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

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

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

@@ -29,7 +29,7 @@ public class OutFeeSchedule {
     /**
      *
      */
-    @Scheduled(cron = "0/10 * * * * ? ")
+    //@Scheduled(cron = "0/10 * * * * ? ")
     public void timerUp() {
         logger.info("==================== 计算关税开始 ====================");
         String begDateTime = LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN);

+ 11 - 1
src/main/resources/application.yml

@@ -8,7 +8,10 @@ app:
 
 # 服务配置
 server:
-  address: 172.18.0.193
+  ## 生产环境
+  # address: 172.18.0.193
+  ## 开发测试环境
+  address: 127.0.0.1
   port: 6666
 
 
@@ -22,6 +25,9 @@ ds:
 # 使用环境
 spring:
   profiles:
+    ## 生产环境
+    #active:
+    ## 开发测试环境
     active: dev
   aop:
     proxy-target-class: true
@@ -32,9 +38,11 @@ spring:
       # 数据源zaxxer HikariCP 读取通天晓数据库
       type: com.zaxxer.hikari.HikariDataSource
       driver-class-name: org.mariadb.jdbc.Driver
+      ## 开发测试环境
       url: jdbc:mysql://out-rm-wz9rps8173a1nx63gio.mysql.rds.aliyuncs.com:3306/wms_qhds?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull
       username: cout_qw
       password: 1#DR1yZCN$
+      ## 生产环境
 #      url: jdbc:mysql://rm-wz9rps8173a1nx63g819.mysql.rds.aliyuncs.com:3306/wms_qhds?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull
 #      username: qhdsf_wms
 #      password: g$2tX98$tX
@@ -66,9 +74,11 @@ spring:
           # 数据源zaxxer HikariCP 读取oms
           type: com.zaxxer.hikari.HikariDataSource
           driver-class-name: org.mariadb.jdbc.Driver
+          ## 开发测试环境
           url: jdbc:mysql://out-rm-wz9rps8173a1nx63gio.mysql.rds.aliyuncs.com:3306/oms_write?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull
           username: out_qhm
           password: r%4PEusOn&
+          ## 生产环境
 #          url: jdbc:mysql://rm-wz9rps8173a1nx63g819.mysql.rds.aliyuncs.com:3306/oms_write?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull
 #          username: qhdsi_oms
 #          password: ZuQhCA#px3

+ 4 - 2
src/main/resources/mybatis/mapper/wms-acq-goods-on-seat.xml

@@ -28,9 +28,11 @@
           WHERE
             1 = 1
             AND th.zone IN ( 'A区', 'B区', 'C区', 'GQ区', 'F区', 'P区', 'Y区' )
-            AND th.created >= '2018-01-01'
+            <if test="thisTime != null">
+              and th.lastUpdated &gt;= #{thisTime}
+            </if>
           ORDER BY
-            th.created DESC
+            th.lastUpdated DESC
           ) AS a
         GROUP BY
           skuNo, seatNo

+ 4 - 2
src/main/resources/mybatis/mapper/wms-acq-inventory-info.xml

@@ -35,9 +35,11 @@
 			WHERE
 				1 = 1
 				AND th.zone IN ( 'A区', 'B区', 'C区', 'GQ区', 'F区', 'P区', 'Y区' )
-				AND th.created >= '2018-01-01'
+				<if test="thisTime != null">
+					and th.lastUpdated &gt;= #{thisTime}
+				</if>
 			ORDER BY
-				th.created DESC
+				th.lastUpdated DESC
 			) AS a
 		GROUP BY
 			codeTs

+ 19 - 2
环境切换需要修改的.txt

@@ -1,3 +1,20 @@
-application.yml的修改:正式站点的每个active里面的去掉dev
-数据库配置
+application.yml的修改:
+
+配置文件环境
+    修改spring:
+      profiles:
+        active: (空)(生产环境)
+        active: dev(开发和测试环境)
+    修改server:
+        address: 127.0.0.1 (开发和测试环境)
+        address: 172.18.0.193 (生产环境)
+
+数据库配置:
+    WMS数据库
+        开发和测试环境,请使用out-rm-***的连接主机(阿里云外网)
+        生产环境,请使用rm-***的连接主机(阿里云内网)
+    OMS数据库
+            开发和测试环境,请使用out-rm-***的连接主机(阿里云外网)
+            生产环境,请使用rm-***的连接主机(阿里云内网)
+