Browse Source

数据库切换到阿里云,增加readme.md说明,增加emt_record_time全库数据写入的截止脚本,修复系统bug,修复控制台日志乱码bug

csk 1 year ago
parent
commit
5ca35af45e
24 changed files with 161 additions and 122 deletions
  1. 20 0
      README.md
  2. 0 4
      src/main/java/com/emato/cus/supervise/biz/acqGoodsMoveSchedule/up/AcqGoodsMoveUpBiz.java
  3. 8 2
      src/main/java/com/emato/cus/supervise/biz/acqGoodsMoveSchedule/up/AcqGoodsMoveUpDataConversion.java
  4. 7 1
      src/main/java/com/emato/cus/supervise/biz/acqGoodsSeat/AcqGoodsOnSeatDataConversion.java
  5. 0 4
      src/main/java/com/emato/cus/supervise/biz/acqGoodsSeat/AcqGoodsSeatBiz.java
  6. 1 25
      src/main/java/com/emato/cus/supervise/biz/acqInventoryInfo/AcqInventoryInfoBiz.java
  7. 7 1
      src/main/java/com/emato/cus/supervise/biz/acqInventoryInfo/AcqInventoryInfoDataConversion.java
  8. 1 4
      src/main/java/com/emato/cus/supervise/biz/acqShelfLoad/down/AcqShelfLoadDownBiz.java
  9. 7 1
      src/main/java/com/emato/cus/supervise/biz/acqShelfLoad/down/AcqShelfLoadDownDataConversion.java
  10. 0 8
      src/main/java/com/emato/cus/supervise/biz/acqShelfLoad/up/AcqShelfLoadUpBiz.java
  11. 3 3
      src/main/java/com/emato/cus/supervise/constant/Dict.java
  12. 0 3
      src/main/java/com/emato/cus/supervise/schedule/AcqGoodsMoveSchedule.java
  13. 0 4
      src/main/java/com/emato/cus/supervise/schedule/AcqGoodsSeatSchedule.java
  14. 0 3
      src/main/java/com/emato/cus/supervise/schedule/AcqInventoryInfoSchedule.java
  15. 0 6
      src/main/java/com/emato/cus/supervise/schedule/AcqShelfLoadSchedule.java
  16. 2 22
      src/main/resources/application.yml
  17. 29 31
      src/main/resources/logback.xml
  18. 16 0
      src/main/resources/mybatis/mapper/wms-acq-goods-move.xml
  19. 3 0
      src/main/resources/mybatis/mapper/wms-acq-shelf-load.xml
  20. 13 0
      src/main/resources/mybatis/mapperOms/oms-shop-acq-goods-move.xml
  21. 9 0
      src/main/resources/mybatis/mapperOms/oms-shop-acq-shelf-load.xml
  22. 1 0
      src/sql/emt-record-time-2.0.sql
  23. 28 0
      src/sql/emt-record-time-2.1初始时间为2019年.sql
  24. 6 0
      src/sql/emt_record_time_2.2_再次全库数据写入_截止2023_06_25_12_05_45.sql

+ 20 - 0
README.md

@@ -16,6 +16,24 @@
 1. 参见系统classes/application.yml中【jobs.schedule】节点配置
 2. 【jobs.schedule】节点参数配置,必须征得负责人同意方可修改
 
+## Mysql数据库配置
+1. 因为系统向`mysql`数据库写入数据量大,必须配置`mysql`的`max_allowed_packet`参数值。
+2. 如果配置参数少于写入数据大小,`mysql`会报`Could not send query: stream size 50664717 is >= to max_allowed_packet (4194304)`异常;
+3. 永久性解决方案,修改配置文件:
+    ```
+    ## vim /etc/my.cnf
+    [mysqld]
+    ## 修改为500M
+    max_allowed_packet = 500M
+    ```
+4. 临时解决方案,命令行修改:
+    ```
+    ## 命令行修改只是临时,重启Mysql还是会恢复到默认值
+    ## mysql命令行或客户端
+    show variables like ‘max_allowed_packet’;
+    ## 修改为500M
+    set global max_allowed_packet = 500 * 1024 * 1024;
+    ```
 ## bug
 1. \#20190521001
     + bug编号
@@ -30,4 +48,6 @@
     
 3. 20200512
     海关为新零售增加展示账册,以监控保税区展示账册和门店展示账册中的货品。
+4. 20230619
+    变更数据库服务器,迁移到阿里云。
 

+ 0 - 4
src/main/java/com/emato/cus/supervise/biz/acqGoodsMoveSchedule/up/AcqGoodsMoveUpBiz.java

@@ -84,10 +84,6 @@ public class AcqGoodsMoveUpBiz implements CusWmsTask {
             logger.info("--- 【" + WMS_DATA_TYPE_INFO + "】获取到本次扫描数据为空, 不执行写数据操作。");
             // 不执行WMS相关操作
             wmsOp = false;
-            //下次扫描时间
-            /*acqGoodsMoveUpRecordTime.updateWmsRecordTime(LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN),
-                    oldThisTime);
-            return;*/
         }
 
         // req_20200430001 门店库存海关监管

+ 8 - 2
src/main/java/com/emato/cus/supervise/biz/acqGoodsMoveSchedule/up/AcqGoodsMoveUpDataConversion.java

@@ -88,8 +88,14 @@ public class AcqGoodsMoveUpDataConversion implements DataConversion {
                 }
                 OmsMerchInfo omsMerchInfo = omsMerchInfoMap.get(merchEmsType);
 
+                String wmssku = wmsAcqGoodsMove.getSkuNo();
+
+                OmsProductInfo omsProductInfo = omsProductInfoMap.get(wmssku);
+                if (null == omsProductInfo) {
+                    logger.error("wms库位sku:{},但在oms产品备案信息中查不到该sku", wmssku);
+                    continue;
+                }
 
-                OmsProductInfo omsProductInfo = omsProductInfoMap.get(wmsAcqGoodsMove.getSkuNo());
                 String osku = omsProductInfo.getSkuNo();
                 if (StringUtils.isBlank(osku)) {
                     logger.error("当前转换的sku为: {}, 对应的产品备案数据异常", osku);
@@ -97,7 +103,7 @@ public class AcqGoodsMoveUpDataConversion implements DataConversion {
                 }
                 //logger.debug("当前转换的sku为: {}", osku);
 
-                String targetSeatNo = wmsAcqGoodsMove.getTargetSeatNo();
+                // String targetSeatNo = wmsAcqGoodsMove.getTargetSeatNo();
 
 
                 CusAcqGoodsMove05 cusAcqGoodsMove05 = new CusAcqGoodsMove05();

+ 7 - 1
src/main/java/com/emato/cus/supervise/biz/acqGoodsSeat/AcqGoodsOnSeatDataConversion.java

@@ -75,8 +75,14 @@ public class AcqGoodsOnSeatDataConversion implements DataConversion{
                 }
                 OmsMerchInfo omsMerchInfo = omsMerchInfoMap.get(merchEmsType);
 
+                String wmssku = wmsAcqGoodsOnSeat.getSkuNo();
 
-                OmsProductInfo omsProductInfo = omsProductInfoMap.get(wmsAcqGoodsOnSeat.getSkuNo());
+                OmsProductInfo omsProductInfo = omsProductInfoMap.get(wmssku);
+                if (null == omsProductInfo) {
+                    logger.error("wms库位sku:{},但在oms产品备案信息中查不到该sku", wmssku);
+                    continue;
+                }
+                
                 String osku = omsProductInfo.getSkuNo();
                 if (StringUtils.isBlank(osku)) {
                     logger.error("当前转换的sku为: {}, 对应的产品备案数据异常", osku);

+ 0 - 4
src/main/java/com/emato/cus/supervise/biz/acqGoodsSeat/AcqGoodsSeatBiz.java

@@ -87,10 +87,6 @@ public class AcqGoodsSeatBiz implements CusWmsTask {
             logger.info("--- 【" + WMS_DATA_TYPE_INFO + "】获取到本次扫描数据为空, 不执行写数据操作.");
             // 不执行WMS相关操作
             wmsOp = false;
-            //下次扫描时间
-            /*acqGoodsOnSeatRecordTime.updateWmsRecordTime(LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN),
-                    oldThisTime);
-            return;*/
         }
 
 

+ 1 - 25
src/main/java/com/emato/cus/supervise/biz/acqInventoryInfo/AcqInventoryInfoBiz.java

@@ -91,38 +91,14 @@ public class AcqInventoryInfoBiz implements CusWmsTask {
             logger.info("--- 【" + WMS_DATA_TYPE_INFO + "】获取到本次扫描WMS数据为空, 不执行写数据操作。");
             // 不执行WMS相关操作
             wmsOp = false;
-            //下次扫描时间
-            /*acqInventoryInfoRecordTime.updateWmsRecordTime(LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN),
-                    oldThisTime);
-            return;*/
         }
 
-
-        // req_20200430001 门店库存海关监管
-        /*List<OmsShopAcqInventoryInfo> omsShopList = acqInventoryInfoOmsShopData.getOmsShopData(oldThisTime);
-        boolean omsShopOp = true;
-        if (omsShopList == null || omsShopList.size() == 0) {
-            logger.info("--- 【" + SHOP_DATA_TYPE_INFO + "】获取到本次扫描数据为空, 不执行写数据操作.");
-            omsShopOp = false;
-        }*/
-
-        //if (!wmsOp && !omsShopOp) {
-        /*if (!wmsOp) {
-            logger.info("--- 【" + WMS_DATA_TYPE_INFO + "】获取到本次扫描数据为空, 不执行写数据操作, 提前结束");
-            //下次扫描时间
-            acqInventoryInfoRecordTime.updateWmsRecordTime(LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN),
-                    oldThisTime);
-            return;
-        }*/
+        // req_20200430001 门店库存海关监管 (不需要)
 
         if (wmsOp) {
             operateWms(wmsList, oldThisTime);
         }
 
-        /*if (omsShopOp) {
-            operateOmsShop(omsShopList, oldThisTime);
-        }*/
-
         // 更新扫描时间
         boolean bl = acqInventoryInfoRecordTime.updateWmsRecordTime(LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN),
                 oldThisTime);

+ 7 - 1
src/main/java/com/emato/cus/supervise/biz/acqInventoryInfo/AcqInventoryInfoDataConversion.java

@@ -73,8 +73,14 @@ public class AcqInventoryInfoDataConversion implements DataConversion {
                 }
                 OmsMerchInfo omsMerchInfo = omsMerchInfoMap.get(merchEmsType);
 
+                String wmssku = wmsAcqInventoryInfo.getSkuNo();
+
+                OmsProductInfo omsProductInfo = omsProductInfoMap.get(wmssku);
+                if (null == omsProductInfo) {
+                    logger.error("wms库位sku:{},但在oms产品备案信息中查不到该sku", wmssku);
+                    continue;
+                }
 
-                OmsProductInfo omsProductInfo = omsProductInfoMap.get(wmsAcqInventoryInfo.getSkuNo());
                 String osku = omsProductInfo.getSkuNo();
                 if (StringUtils.isBlank(osku)) {
                     logger.error("当前转换的sku为: {}, 对应的产品备案数据异常", osku);

+ 1 - 4
src/main/java/com/emato/cus/supervise/biz/acqShelfLoad/down/AcqShelfLoadDownBiz.java

@@ -95,9 +95,6 @@ public class AcqShelfLoadDownBiz implements CusWmsTask{
             logger.info("--- 【" + DATA_TYPE_INFO + "】获取到本次扫描数据为空, 不执行写数据操作, 本次扫描提前结束!!!");
             // 不执行WMS相关操作
             wmsOp = false;
-            /*acqShelfLoadDownRecordTime.updateWmsRecordTime(LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN),
-                    oldThisTime);
-            return;*/
         }
 
         // req_20200430001 门店库存海关监管
@@ -112,7 +109,7 @@ public class AcqShelfLoadDownBiz implements CusWmsTask{
         // 销售 下架
         List<OmsShopAcqShelfLoad> omsShopSaleList = acqShelfLoadSaleDownOmsShopData.getOmsShopData(oldThisTime);
         boolean omsShopSaleOp = true;
-        if (omsShopList == null || omsShopList.size() == 0) {
+        if (omsShopSaleList == null || omsShopSaleList.size() == 0) {
             logger.info("--- 【" + SHOP_DATA_TYPE_INFO_SALE_DOWN + "】获取到本次扫描数据为空, 不执行写数据操作.");
             omsShopSaleOp = false;
         }

+ 7 - 1
src/main/java/com/emato/cus/supervise/biz/acqShelfLoad/down/AcqShelfLoadDownDataConversion.java

@@ -80,8 +80,14 @@ public class AcqShelfLoadDownDataConversion implements DataConversion {
                 }
                 OmsMerchInfo omsMerchInfo = omsMerchInfoMap.get(merchEmsType);
 
+                String wmssku = wmsAcqShelfLoad.getSkuNo();
+
+                OmsProductInfo omsProductInfo = omsProductInfoMap.get(wmssku);
+                if (null == omsProductInfo) {
+                    logger.error("wms库位sku:{},但在oms产品备案信息中查不到该sku", wmssku);
+                    continue;
+                }
 
-                OmsProductInfo omsProductInfo = omsProductInfoMap.get(wmsAcqShelfLoad.getSkuNo());
                 String osku = omsProductInfo.getSkuNo();
                 if (StringUtils.isBlank(osku)) {
                     logger.error("当前转换的sku为: {}, 对应的产品备案数据异常", osku);

+ 0 - 8
src/main/java/com/emato/cus/supervise/biz/acqShelfLoad/up/AcqShelfLoadUpBiz.java

@@ -86,10 +86,6 @@ public class AcqShelfLoadUpBiz implements CusWmsTask{
             logger.info("--- 【" + WMS_DATA_TYPE_INFO + "】获取到本次扫描数据为空, 不执行写数据操作。");
             // 不执行WMS相关操作
             wmsOp = false;
-            //下次扫描时间
-            /*acqShelfLoadUpRecordTime.updateWmsRecordTime(LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN),
-                    oldThisTime);
-            return;*/
         }
 
         // req_20200430001 门店库存海关监管
@@ -98,10 +94,6 @@ public class AcqShelfLoadUpBiz implements CusWmsTask{
         if (omsShopList == null || omsShopList.size() == 0) {
             logger.info("--- 【" + SHOP_DATA_TYPE_INFO + "】获取到本次扫描数据为空, 不执行写数据操作.");
             omsShopOp = false;
-            //下次扫描时间
-            /*acqGoodsMoveUpRecordTime.updateWmsRecordTime(LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN),
-                    oldThisTime);
-            return;*/
         }
 
         if (!wmsOp && !omsShopOp) {

+ 3 - 3
src/main/java/com/emato/cus/supervise/constant/Dict.java

@@ -41,9 +41,9 @@ public class Dict {
      */
     public static final Map<String, String> emsClassTypeMap = new HashMap<String, String>(){
         {
-            put("ZS", "zszc");  // 展示账册分类
-            put("F", "fbwl");   // 非保账册分类
-            put("Others", "kjds");  // 跨境电商账册分类
+            put("ZS", "zszc");  // 展示账册分类,zs:展示账册
+            put("F", "fbwl");   // 非保账册分类,fbwl:非保物流
+            put("Others", "kjds");  // 跨境电商账册分类,bswl:保税物流
         }
     };
 

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

@@ -28,9 +28,6 @@ public class AcqGoodsMoveSchedule {
     /**
      * 货物库位移动数据
      */
-    //每月1号开始,每天12,18点执行各1次,共2次
-    //@Scheduled(cron = "0 0 12,18 1/1 * ?")
-    //@Scheduled(cron = "0 0/1 * * * ? ")
     @Scheduled(cron = "${jobs.schedule.move.up}")
     public void timerUp() {
         logger.info("==================== 货物库位移动数据:上架:监控数据读取开始 ====================");

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

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

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

@@ -27,9 +27,6 @@ public class AcqInventoryInfoSchedule {
     /**
      * 货物库存数据
      */
-    //每月1号开始,每天12,22点各1次,共2次
-    //@Scheduled(cron = "0 0 12,13,22 1/1 * ?")
-    //@Scheduled(cron = "0 0/1 * * * ? ")
     @Scheduled(cron = "${jobs.schedule.inventory}")
     public void timer() {
         logger.info("==================== 货物库存数据::监控数据读取开始 ====================");

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

@@ -33,9 +33,6 @@ public class AcqShelfLoadSchedule {
     /**
      * 上架
      */
-    //每月1号开始,每天10,18点执行各1次,共2次
-    //@Scheduled(cron = "0 0 10,18 1/1 * ?")
-    //@Scheduled(cron = "0 0/1 * * * ? ")
     @Scheduled(cron = "${jobs.schedule.shelf-load.up}")
     public void timerUp() {
         logger.info("==================== 货物上下架数据::上架::监控数据读取开始 ====================");
@@ -53,9 +50,6 @@ public class AcqShelfLoadSchedule {
     /**
      * 下架
      */
-    //每月1号开始,每天18点执行1次,共1次
-    // @Scheduled(cron = "0 0 18 1/1 * ?")
-    //@Scheduled(cron = "0 0/1 * * * ? ")
     @Scheduled(cron = "${jobs.schedule.shelf-load.down}")
     public void timerDown() {
         logger.info("==================== 货物上下架数据::下架::监控数据读取开始 ====================");

+ 2 - 22
src/main/resources/application.yml

@@ -31,7 +31,7 @@ spring:
         ## 生产环境
         active: default
         ## 开发测试环境
-        #active: dev
+        ## active: dev
     aop:
         proxy-target-class: true
 
@@ -41,10 +41,6 @@ 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
@@ -62,12 +58,8 @@ spring:
             # 数据源zaxxer HikariCP 写入数据库
             type: com.zaxxer.hikari.HikariDataSource
             driver-class-name: org.mariadb.jdbc.Driver
-            #            # 开发测试环境
-            #            url: jdbc:mysql://127.0.0.1:3306/wms_data?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull
-            #            username: root
-            #            password: 111111
             # 生产环境
-            url: jdbc:mysql://183.3.221.144:3306/wms_data?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull
+            url: jdbc:mysql://out-rm-wz92efl25x02n44xego.mysql.rds.aliyuncs.com:3306/wms_data?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull
             username: wms_admin
             password: DsuBkL2w$q
             # hikari连接池配置
@@ -82,10 +74,6 @@ 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
@@ -131,28 +119,20 @@ jobs:
                 0 0 12,18 1/1 * ?
         # 库位货物数据
         seat:
-            # 每月1号开始,每天10,12,15,18,22点各1次,共5次
-            # 0 0 10,12,13,15,18,22 1/1 * ?
             # 每月1号开始,每天10,12,15,18,22点05分各1次,共5次
             0 5 10,12,13,15,18,22 1/1 * ?
         # 货物库存数据
         inventory:
-            # 每月1号开始,每天12,22点各1次,共2次
-            # 0 0 12,13,22 1/1 * ?
             # 每月1号开始,每天12,22点10分各1次,共2次
             0 10 12,13,22 1/1 * ?
         # 上下架
         shelf-load:
             # 上架
             up:
-                # 每月1号开始,每天10,18点执行各1次,共2次
-                # 0 0 10,18 1/1 * ?
                 # 每月1号开始,每天10,18点15分执行各1次,共2次
                 0 15 10,18 1/1 * ?
             # 下架
             down:
-                # 每月1号开始,每天18点执行1次,共1次
-                # 0 0 18 1/1 * ?
                 # 每月1号开始,每天25点20分执行1次,共1次
                 0 20 18 1/1 * ?
 

+ 29 - 31
src/main/resources/logback.xml

@@ -6,7 +6,7 @@ debug:当此属性设置为true时,将打印出logback内部日志信息,
 -->
 <configuration scan="false" scanPeriod="60 seconds" debug="false">
 
-    <property name="LOG_HOME" value="/data_cus_data_supervise/new_cus_data_supervise/logs"/>
+    <property name="LOG_HOME" value="/data/logs/new_cus_data_supervise/"/>
     <!-- 定义日志的根目录 -->
     <property name="DEBUG_DIR" value="debug" />
     <property name="INFO_DIR" value="info" />
@@ -24,20 +24,19 @@ debug:当此属性设置为true时,将打印出logback内部日志信息,
     <property name="STD_CONSOLE_LOG_PATTERN"
               value="%d{yyyy-MM-dd HH:mm:ss.SSS}[%yellow(%thread)]-[%highlight(%-5level)][%green(%logger{70}):%cyan(%line)] - %msg%n"/>
 
+
     <property name="CONSOLE_LOG_PATTERN"
               value="%d{yyyy-MM-dd HH:mm:ss.SSS}[%thread]-[%-5level][%logger{70}:%line] - %msg%n"/>
-
     <appender name="stdoutAppender" class="ch.qos.logback.core.ConsoleAppender">
-
         <encoder>
             <pattern>${STD_CONSOLE_LOG_PATTERN}</pattern>
-            <charset>UTF-8</charset>
+            <!--<charset>UTF-8</charset>-->
         </encoder>
     </appender>
 
 
+    <!-- TRACE 日志 appender  -->
     <appender name="traceAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
-
         <file>${LOG_HOME}/${TRACE_DIR}/${TRACE_FILE_NAME}.log</file>
         <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/${TRACE_DIR}/${TRACE_FILE_NAME}-%d{yyyy-MM-dd}-%i.log</fileNamePattern>
@@ -52,11 +51,11 @@ debug:当此属性设置为true时,将打印出logback内部日志信息,
         </encoder>
         <filter class="ch.qos.logback.classic.filter.LevelFilter">
             <level>TRACE</level>
-
         </filter>
     </appender>
 
 
+    <!-- DEBUG 日志 appender  -->
     <appender name="debugAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
         <file>${LOG_HOME}/${DEBUG_DIR}/${DEBUG_FILE_NAME}.log</file>
         <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
@@ -78,7 +77,6 @@ debug:当此属性设置为true时,将打印出logback内部日志信息,
 
     <!-- phrase 日志 appender  -->
     <appender name="infoAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <!-- 指定日志文件的名称 -->
         <file>${LOG_HOME}/${INFO_DIR}/${INFO_FILE_NAME}.log</file>
         <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/${INFO_DIR}/${INFO_FILE_NAME}-%d{yyyy-MM-dd}-%i.log</fileNamePattern>
@@ -97,8 +95,8 @@ debug:当此属性设置为true时,将打印出logback内部日志信息,
     </appender>
 
 
+    <!-- WARN 日志 appender  -->
     <appender name="warnAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <!-- 指定日志文件的名称 -->
         <file>${LOG_HOME}/${WARN_DIR}/${WARN_FILE_NAME}.log</file>
         <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/${WARN_DIR}/${WARN_FILE_NAME}-%d{yyyy-MM-dd}-%i.log</fileNamePattern>
@@ -119,13 +117,10 @@ debug:当此属性设置为true时,将打印出logback内部日志信息,
 
     <!-- ERROR 日志 appender  -->
     <appender name="errorAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <!-- 指定日志文件的名称 -->
         <file>${LOG_HOME}/${ERROR_DIR}/${ERROR_FILE_NAME}.log</file>
         <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/${ERROR_DIR}/${ERROR_FILE_NAME}-%d{yyyy-MM-dd}-%i.log</fileNamePattern>
-
             <MaxHistory>365</MaxHistory>
-
             <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
                 <maxFileSize>10MB</maxFileSize>
             </timeBasedFileNamingAndTriggeringPolicy>
@@ -135,34 +130,37 @@ debug:当此属性设置为true时,将打印出logback内部日志信息,
             <pattern>${CONSOLE_LOG_PATTERN}</pattern>
             <charset>UTF-8</charset>
         </encoder>
-
-        <filter class="ch.qos.logback.classic.filter.LevelFilter"><!-- 只打印错误日志 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
             <level>ERROR</level>
         </filter>
     </appender>
 
-    <logger name="org.apache" level="ERROR"/>
-    <logger name="org.apache.shiro" level="DEBUG"/>
-    <logger name="org.mybatis" level="DEBUG"/>
-    <logger name="org.hibernate" level="WARN"/>
-    <logger name="org.springframework" level="INFO"/>
-    <logger name="io.lettuce" level="INFO"/>
-    <logger name="org.thymeleaf" level="INFO"/>
-    <logger name="com.zaxxer.hikari" level="ERROR" additivity="false">
-        <appender-ref ref="stdoutAppender" />
-        <appender-ref ref="errorAppender" />
-    </logger>
-    <logger name="org.apache.shiro" level="DEBUG" additivity="false">
-        <appender-ref ref="stdoutAppender" />
-        <appender-ref ref="traceAppender" />
-    </logger>
+
+    <logger name="org.apache.shiro" level="DEBUG" additivity="false" />
+    <logger name="com.zaxxer.hikari" level="ERROR" additivity="false" />
+    <logger name="org.apache" level="ERROR" />
+    <logger name="org.springframework.context.annotation.ClassPathBeanDefinitionScanner" level="INFO" />
+    <logger name="org.springframework.beans.factory.support.DefaultListableBeanFactory" level="INFO" />
+    <logger name="org.springframework.data.convert.CustomConversions" level="INFO"/>
+    <logger name="org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener" level="INFO" />
+    <logger name="org.springframework.boot.autoconfigure.web.servlet.WelcomePageHandlerMapping" level="INFO" />
+    <logger name="org.springframework" level="DEBUG" />
+    <logger name="io.netty" level="INFO" />
+    <logger name="org.mybatis" level="INFO" />
+    <logger name="org.hibernate" level="INFO" />
+    <logger name="io.lettuce" level="INFO" />
+    <logger name="springfox.documentation" level="INFO" />
+
+    <logger name="com.netflix.discovery" level="ERROR" />
+    <logger name="com.netflix.eureka" level="ERROR" />
+    <logger name="org.springframework.security" level="ERROR" />
 
     <root level="DEBUG" >
         <appender-ref ref="stdoutAppender" />
         <!--<appender-ref ref="traceAppender" />-->
         <appender-ref ref="debugAppender" />
-        <!--<appender-ref ref="infoAppender" />
-        <appender-ref ref="warnAppender" />
-        <appender-ref ref="errorAppender" />-->
+        <!--<appender-ref ref="infoAppender" />-->
+        <!--<appender-ref ref="warnAppender" />-->
+        <!--<appender-ref ref="errorAppender" />-->
     </root>
 </configuration>

+ 16 - 0
src/main/resources/mybatis/mapper/wms-acq-goods-move.xml

@@ -28,6 +28,22 @@
 			<if test="thisTime != null">
 				and td.lastUpdated &gt;= #{thisTime}
 			</if>
+
+			/* 2023-06-20 数据重新写入,分时间段写入 */
+			/* 2019年数据 */
+			/*and td.lastUpdated &gt;= '2019-01-01 00:00:00' and td.lastUpdated &lt;= '2019-05-31 23:59:59';*/
+			/*and td.lastUpdated &gt;= '2019-06-01 00:00:00' and td.lastUpdated &lt;= '2019-10-31 23:59:59';*/
+			/*and td.lastUpdated &gt;= '2019-11-01 00:00:00' and td.lastUpdated &lt;= '2019-12-31 23:59:59';*/
+			/* 2020年数据 */
+			/*and td.lastUpdated &gt;= '2020-01-01 00:00:00' and td.lastUpdated &lt;= '2020-12-31 23:59:59';*/
+			/* 2021年数据 */
+			/*and td.lastUpdated &gt;= '2021-01-01 00:00:00' and td.lastUpdated &lt;= '2021-12-31 23:59:59';*/
+			/* 2022年数据 */
+			/*and td.lastUpdated &gt;= '2022-01-01 00:00:00' and td.lastUpdated &lt;= '2022-12-31 23:59:59';*/
+			/* 2023年数据 */
+			/*and td.lastUpdated &gt;= '2023-01-01 00:00:00' and td.lastUpdated &lt;= '2023-06-20 18:00:00';*/
+
+
 		</where>
     </select>
 

+ 3 - 0
src/main/resources/mybatis/mapper/wms-acq-shelf-load.xml

@@ -26,12 +26,14 @@
 			<if test="thisTime != null">
 				and rc.lastUpdated &gt;= #{thisTime}
 			</if>
+			/*and rc.lastUpdated >= '2019-01-01 00:00:00'*/
 		</where>
     </select>
 
 	<!-- 企业货物上下架信息: 下架查询 -->
 	<select id="getWmsAcqShelfLoadDown" parameterType="java.util.Map" resultType="com.emato.cus.supervise.domain.WmsAcqShelfLoad">
 		SELECT
+			i.`companyCode` AS merchSn,
 			i.`name` AS goodsName,
 			itemCode AS codeTs,
 			itemCode AS skuNo,
@@ -52,6 +54,7 @@
 			<if test="thisTime != null">
 				and scd.lastUpdated &gt;= #{thisTime}
 			</if>
+			/*and scd.lastUpdated >= '2019-01-01 00:00:00'*/
 		</where>
 	</select>
 

+ 13 - 0
src/main/resources/mybatis/mapperOms/oms-shop-acq-goods-move.xml

@@ -34,6 +34,19 @@
 			<if test="thisTime != null">
 				and t.create_time &gt;= #{thisTime}
 			</if>
+
+			/* 2023-06-25 数据重新写入,分时间段写入 */
+			/* 2019年无数据 */
+			/*and t.create_time &gt;= '2019-01-01 00:00:00' and t.create_time &lt;= '2019-12-31 23:59:59';*/
+			/* 2020年数据 */
+			/*and t.create_time &gt;= '2020-01-01 00:00:00' and t.create_time &lt;= '2020-12-31 23:59:59';*/
+			/* 2021年数据 */
+			/*and t.create_time &gt;= '2021-01-01 00:00:00' and t.create_time &lt;= '2021-12-31 23:59:59';*/
+			/* 2022年数据 */
+			/*and t.create_time &gt;= '2022-01-01 00:00:00' and t.create_time &lt;= '2022-12-31 23:59:59';*/
+			/* 2023年数据 */
+			/*and t.create_time &gt;= '2023-01-01 00:00:00' and t.create_time &lt;= '2023-06-20 18:00:00';*/
+			    
 		</where>
 	</select>
 

+ 9 - 0
src/main/resources/mybatis/mapperOms/oms-shop-acq-shelf-load.xml

@@ -33,6 +33,7 @@
 			<if test="thisTime != null">
 				and t.create_time &gt;= #{thisTime}
 			</if>
+			/*and t.create_time >= '2019-01-01 00:00:00'*/
 		</where>
 	</select>
 
@@ -66,6 +67,7 @@
 			<if test="thisTime != null">
 				and t.create_time &gt;= #{thisTime}
 			</if>
+			/*and t.create_time >= '2019-01-01 00:00:00'*/
 		</where>
 	</select>
 
@@ -98,6 +100,13 @@
 			<if test="thisTime != null">
 				and t.create_time &gt;= #{thisTime}
 			</if>
+			/* 2023-06-25 数据重新写入,分时间段写入 */
+			/*and t.create_time &gt;= '2019-01-01 00:00:00' and t.create_time &lt;= '2020-12-31 23:59:59';*/
+			/*and t.create_time &gt;= '2021-01-01 00:00:00' and t.create_time &lt;= '2021-05-31 23:59:59';*/
+			/*and t.create_time &gt;= '2021-06-01 00:00:00' and t.create_time &lt;= '2021-12-31 23:59:59';*/
+			/*and t.create_time &gt;= '2022-01-01 00:00:00' and t.create_time &lt;= '2022-07-31 23:59:59';*/
+			/*and t.create_time &gt;= '2022-08-01 00:00:00' and t.create_time &lt;= '2022-12-31 23:59:59';*/
+			/*and t.create_time &gt;= '2023-01-01 00:00:00';*/
 		</where>
 	</select>
 

+ 1 - 0
src/sql/emt-record-time-2.0.sql

@@ -1,3 +1,4 @@
+use wms_data;
 DELETE FROM emt_record_time;
 -- 企业库存信息
 INSERT INTO emt_record_time (data_type, last_time, this_time, creater_sn, create_time, moder_sn, mod_time) VALUES (

+ 28 - 0
src/sql/emt-record-time-2.1初始时间为2019年.sql

@@ -0,0 +1,28 @@
+use wms_data;
+DELETE FROM emt_record_time;
+-- 企业库存信息
+INSERT INTO emt_record_time (data_type, last_time, this_time, creater_sn, create_time, moder_sn, mod_time) VALUES (
+  'ACQ_INVENTORY_INFO', '2019-01-01 00:00:00', '2019-01-01 00:00:00', '1', now(), '1', now()
+);
+-- 企业货物上下架信息
+-- 上架
+INSERT INTO emt_record_time (data_type, last_time, this_time, creater_sn, create_time, moder_sn, mod_time) VALUES (
+  'ACQ_SHELF_LOAD', '2019-01-01 00:00:00', '2019-01-01 00:00:00', '1', now(), '1', now()
+);
+-- 下架
+INSERT INTO emt_record_time (data_type, last_time, this_time, creater_sn, create_time, moder_sn, mod_time) VALUES (
+  'ACQ_SHELF_LOAD_DOWN', '2019-01-01 00:00:00', '2019-01-01 00:00:00', '1', now(), '1', now()
+);
+-- 企业货物在仓库的移动信息
+-- 上架
+INSERT INTO emt_record_time (data_type, last_time, this_time, creater_sn, create_time, moder_sn, mod_time) VALUES (
+  'ACQ_GOODS_MOVE_UP', '2019-01-01 00:00:00', '2019-01-01 00:00:00', '1', now(), '1', now()
+);
+-- 下架
+INSERT INTO emt_record_time (data_type, last_time, this_time, creater_sn, create_time, moder_sn, mod_time) VALUES (
+  'ACQ_GOODS_MOVE_DOWN', '2019-01-01 00:00:00', '2019-01-01 00:00:00', '1', now(), '1', now()
+);
+-- 库位上的货物信息
+INSERT INTO emt_record_time (data_type, last_time, this_time, creater_sn, create_time, moder_sn, mod_time) VALUES (
+  'ACQ_GOODS_ON_SEAT', '2019-01-01 00:00:00', '2019-01-01 00:00:00', '1', now(), '1', now()
+);

+ 6 - 0
src/sql/emt_record_time_2.2_再次全库数据写入_截止2023_06_25_12_05_45.sql

@@ -0,0 +1,6 @@
+INSERT INTO wms_data.`emt_record_time_1_2023-06-25 12:05:45` (data_type, last_time, this_time, creater_sn, create_time, moder_sn, mod_time, tstm) VALUES ('ACQ_GOODS_MOVE_DOWN', '2019-01-01 00:00:00', '2019-01-01 00:00:00', '1', '2023-06-20 17:18:18', '1', '2023-06-20 17:18:18', '2023-06-20 17:18:18');
+INSERT INTO wms_data.`emt_record_time_1_2023-06-25 12:05:45` (data_type, last_time, this_time, creater_sn, create_time, moder_sn, mod_time, tstm) VALUES ('ACQ_GOODS_MOVE_UP', '2023-06-20 18:10:26', '2023-06-20 18:19:25', '1', '2023-06-20 17:18:18', 'user999999999999999999', '2023-06-20 18:19:25', '2023-06-20 18:19:25');
+INSERT INTO wms_data.`emt_record_time_1_2023-06-25 12:05:45` (data_type, last_time, this_time, creater_sn, create_time, moder_sn, mod_time, tstm) VALUES ('ACQ_GOODS_ON_SEAT', '2023-06-21 11:58:26', '2023-06-21 12:46:36', '1', '2023-06-20 17:18:18', 'user999999999999999999', '2023-06-21 12:46:36', '2023-06-21 12:46:36');
+INSERT INTO wms_data.`emt_record_time_1_2023-06-25 12:05:45` (data_type, last_time, this_time, creater_sn, create_time, moder_sn, mod_time, tstm) VALUES ('ACQ_INVENTORY_INFO', '2019-01-01 00:00:00', '2023-06-21 13:23:36', '1', '2023-06-20 17:18:18', 'user999999999999999999', '2023-06-21 13:23:36', '2023-06-21 13:23:36');
+INSERT INTO wms_data.`emt_record_time_1_2023-06-25 12:05:45` (data_type, last_time, this_time, creater_sn, create_time, moder_sn, mod_time, tstm) VALUES ('ACQ_SHELF_LOAD', '2019-01-01 00:00:00', '2023-06-25 11:21:45', '1', '2023-06-20 17:18:18', 'user999999999999999999', '2023-06-25 11:10:44', '2023-06-25 12:14:33');
+INSERT INTO wms_data.`emt_record_time_1_2023-06-25 12:05:45` (data_type, last_time, this_time, creater_sn, create_time, moder_sn, mod_time, tstm) VALUES ('ACQ_SHELF_LOAD_DOWN', '2023-06-21 14:22:34', '2023-06-25 12:05:45', '1', '2023-06-20 17:18:18', 'user999999999999999999', '2023-06-25 12:05:46', '2023-06-25 12:05:45');