diff --git a/log/debug/2024-07-04/2024-07-04.0.log b/log/debug/2024-07-04/2024-07-04.0.log
new file mode 100644
index 0000000..e69de29
diff --git a/log/error/2024-07-04/2024-07-04.0.log b/log/error/2024-07-04/2024-07-04.0.log
new file mode 100644
index 0000000..f09de98
--- /dev/null
+++ b/log/error/2024-07-04/2024-07-04.0.log
@@ -0,0 +1 @@
+2024-07-04 09:31:58.049 [scheduling-1] ERROR com.wms.controller.JobComponent - 发生异常:null
diff --git a/log/info/2024-07-04/2024-07-04.0.log b/log/info/2024-07-04/2024-07-04.0.log
new file mode 100644
index 0000000..17772d7
--- /dev/null
+++ b/log/info/2024-07-04/2024-07-04.0.log
@@ -0,0 +1,172 @@
+2024-07-04 09:31:34.577 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 15992 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 09:31:34.579 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 09:31:35.919 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.693 seconds (process running for 2.037)
+2024-07-04 09:31:35.920 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 09:31:35.920 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 09:33:12.128 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 4164 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 09:33:12.129 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 09:33:13.234 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.404 seconds (process running for 1.694)
+2024-07-04 09:33:13.235 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 09:33:13.235 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 09:35:20.045 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 5564 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 09:35:20.047 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 09:35:21.238 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.504 seconds (process running for 1.807)
+2024-07-04 09:35:21.239 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 09:35:21.239 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 09:36:53.906 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 18176 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 09:36:53.908 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 09:36:55.106 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.492 seconds (process running for 1.782)
+2024-07-04 09:36:55.108 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 09:36:55.108 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 09:39:19.027 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 13336 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 09:39:19.028 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 09:39:20.201 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.472 seconds (process running for 1.77)
+2024-07-04 09:39:20.202 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 09:39:20.202 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 09:40:28.531 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 18660 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 09:40:28.532 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 09:40:29.808 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.627 seconds (process running for 2.277)
+2024-07-04 09:40:29.809 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 09:40:29.809 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 09:42:18.599 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 12100 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 09:42:18.600 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 09:42:19.717 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.427 seconds (process running for 1.733)
+2024-07-04 09:42:19.718 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 09:42:19.718 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 09:42:35.376 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 17916 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 09:42:35.377 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 09:42:36.637 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.622 seconds (process running for 1.984)
+2024-07-04 09:42:36.638 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 09:42:36.638 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 09:43:52.585 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 18040 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 09:43:52.587 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 09:43:53.779 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.491 seconds (process running for 1.794)
+2024-07-04 09:43:53.780 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 09:43:53.780 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 09:44:02.496 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 18444 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 09:44:02.498 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 09:44:03.764 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.622 seconds (process running for 2.009)
+2024-07-04 09:44:03.765 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 09:44:03.765 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 09:45:08.479 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 19412 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 09:45:08.481 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 09:45:09.920 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.79 seconds (process running for 2.092)
+2024-07-04 09:45:09.921 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 09:45:09.922 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 09:48:24.618 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 18612 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 09:48:24.619 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 09:48:25.719 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.391 seconds (process running for 1.685)
+2024-07-04 09:48:25.720 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 09:48:25.720 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 09:50:07.283 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 6552 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 09:50:07.284 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 09:50:08.489 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.506 seconds (process running for 1.8)
+2024-07-04 09:50:08.490 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 09:50:08.490 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 09:50:27.700 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 4212 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 09:50:27.702 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 09:50:28.976 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.614 seconds (process running for 1.968)
+2024-07-04 09:50:28.977 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 09:50:28.977 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 09:53:32.928 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 5584 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 09:53:32.929 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 09:53:34.240 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.646 seconds (process running for 2.014)
+2024-07-04 09:53:34.241 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 09:53:34.241 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 10:12:16.618 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 17440 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 10:12:16.619 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 10:12:17.876 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.595 seconds (process running for 1.965)
+2024-07-04 10:12:17.877 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 10:12:17.877 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 10:13:10.804 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 7180 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 10:13:10.806 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 10:13:11.946 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.436 seconds (process running for 1.736)
+2024-07-04 10:13:11.948 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 10:13:11.948 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 10:13:14.760 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 15828 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 10:13:14.760 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 10:13:16.065 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.648 seconds (process running for 2.002)
+2024-07-04 10:13:16.066 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 10:13:16.066 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 10:13:39.439 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 404 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 10:13:39.440 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 10:13:40.736 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.638 seconds (process running for 1.987)
+2024-07-04 10:13:40.738 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 10:13:40.738 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 10:14:14.811 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 21412 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 10:14:14.813 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 10:14:16.066 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.59 seconds (process running for 1.954)
+2024-07-04 10:14:16.067 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 10:14:16.067 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 10:15:03.949 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 16080 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 10:15:03.949 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 10:15:05.151 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.531 seconds (process running for 1.883)
+2024-07-04 10:15:05.152 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 10:15:05.152 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 10:16:05.763 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 12328 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 10:16:05.765 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 10:16:06.991 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.574 seconds (process running for 1.925)
+2024-07-04 10:16:06.992 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 10:16:06.992 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 10:16:41.139 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 8968 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 10:16:41.140 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 10:16:42.395 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.613 seconds (process running for 1.972)
+2024-07-04 10:16:42.396 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 10:16:42.397 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 10:16:58.722 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 18744 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 10:16:58.723 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 10:16:59.919 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.513 seconds (process running for 1.822)
+2024-07-04 10:16:59.921 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 10:16:59.921 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 11:33:33.043 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 11292 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 11:33:33.044 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 13:19:18.010 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 18716 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 13:19:18.011 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 13:19:19.213 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.516 seconds (process running for 1.84)
+2024-07-04 13:19:19.215 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 13:19:19.215 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 13:20:28.442 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 24260 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 13:20:28.443 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 13:20:29.732 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.604 seconds (process running for 1.915)
+2024-07-04 13:20:29.733 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 13:20:29.733 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 13:24:39.124 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 17744 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 13:24:39.126 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 13:24:40.359 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.549 seconds (process running for 1.855)
+2024-07-04 13:24:40.360 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 13:24:40.360 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 13:25:21.731 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 20768 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 13:25:21.733 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 13:25:23.043 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.664 seconds (process running for 2.045)
+2024-07-04 13:25:23.044 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 13:25:23.044 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 13:25:59.682 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 5644 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 13:25:59.684 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 13:26:00.931 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.565 seconds (process running for 1.887)
+2024-07-04 13:26:00.932 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 13:26:00.932 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 13:48:20.688 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 23532 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 13:48:20.690 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 13:48:21.894 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.504 seconds (process running for 1.811)
+2024-07-04 13:48:21.895 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 13:48:21.895 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 13:57:30.212 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 22872 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 13:57:30.212 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 13:57:31.411 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.505 seconds (process running for 1.828)
+2024-07-04 13:57:31.412 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 13:57:31.412 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 14:00:06.091 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 22968 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 14:00:06.091 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 14:00:07.309 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.525 seconds (process running for 1.835)
+2024-07-04 14:00:07.311 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 14:00:07.311 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 14:15:31.159 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 11668 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 14:15:31.161 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 14:15:32.290 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.476 seconds (process running for 1.822)
+2024-07-04 14:15:32.291 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 14:15:32.291 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
+2024-07-04 14:16:07.210 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 21712 (F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve\target\classes started by icewi in F:\A开发项目\A菲达宝开项目\2024-06-2_仪征亚新科\应用程序\wms_serve)
+2024-07-04 14:16:07.211 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online"
+2024-07-04 14:16:08.387 [main] INFO com.wms.WmsApplication - Started WmsApplication in 1.536 seconds (process running for 1.859)
+2024-07-04 14:16:08.389 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中...
+2024-07-04 14:16:08.389 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中...
diff --git a/log/warning/2024-07-04/2024-07-04.0.log b/log/warning/2024-07-04/2024-07-04.0.log
new file mode 100644
index 0000000..e69de29
diff --git a/pom.xml b/pom.xml
index 86bf613..68d1f6f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -132,6 +132,16 @@
springfox-swagger-ui
2.9.2
+
+ org.apache.tomcat.embed
+ tomcat-embed-core
+ 9.0.68
+
+
+ org.apache.tomcat.embed
+ tomcat-embed-core
+ 10.1.25
+
diff --git a/src/main/java/com/wms/constants/enums/OrderCheckStatusEnum.java b/src/main/java/com/wms/constants/enums/OrderCheckStatusEnum.java
new file mode 100644
index 0000000..086c39a
--- /dev/null
+++ b/src/main/java/com/wms/constants/enums/OrderCheckStatusEnum.java
@@ -0,0 +1,28 @@
+package com.wms.constants.enums;
+
+import lombok.Getter;
+
+/**
+ * 盘点表状态枚举
+ */
+@Getter
+public enum OrderCheckStatusEnum {
+
+ CREATED(0, "已创建"),
+
+ CHECKING(1, "盘点中"),
+
+ CHECKED(2, "已盘点"),
+
+ CANCELED(3, "已取消");
+
+
+ private final int code;
+ private final String desc;
+
+ OrderCheckStatusEnum(int code, String desc) {
+ this.code = code;
+ this.desc = desc;
+ }
+
+}
diff --git a/src/main/java/com/wms/constants/enums/OrderOutStatusEnum.java b/src/main/java/com/wms/constants/enums/OrderOutStatusEnum.java
new file mode 100644
index 0000000..7cd7fe9
--- /dev/null
+++ b/src/main/java/com/wms/constants/enums/OrderOutStatusEnum.java
@@ -0,0 +1,21 @@
+package com.wms.constants.enums;
+
+import lombok.Getter;
+
+/**
+ * 出库单状态的枚举
+ */
+@Getter
+public enum OrderOutStatusEnum {
+
+ CREATED(0, "已创建");
+
+
+ private final int code;
+ private final String desc;
+
+ OrderOutStatusEnum(int code, String desc) {
+ this.code = code;
+ this.desc = desc;
+ }
+}
diff --git a/src/main/java/com/wms/constants/enums/StockStatus.java b/src/main/java/com/wms/constants/enums/StockStatus.java
index 7fe6626..a61cfce 100644
--- a/src/main/java/com/wms/constants/enums/StockStatus.java
+++ b/src/main/java/com/wms/constants/enums/StockStatus.java
@@ -4,6 +4,10 @@ package com.wms.constants.enums;
* 库存状态枚举
*/
public enum StockStatus {
+ WAIT_IN(-2, "待入库"),
+
+ IN_ING(-1, "正在入库"),
+
OK(0, "库存正常"),
OUT(1, "准备出库"),
MOVING(2, "正在出库"),
diff --git a/src/main/java/com/wms/controller/parent/ContainerController.java b/src/main/java/com/wms/controller/parent/ContainerController.java
new file mode 100644
index 0000000..81183c9
--- /dev/null
+++ b/src/main/java/com/wms/controller/parent/ContainerController.java
@@ -0,0 +1,23 @@
+package com.wms.controller.parent;
+
+import com.wms.controller.BaseController;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.CrossOrigin;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+/**
+ * 四向车交互
+ * @author icewint
+ */
+@Controller
+@CrossOrigin
+@RequestMapping(value = "/wms/mes")
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
+public class ContainerController extends BaseController {
+
+
+
+
+}
diff --git a/src/main/java/com/wms/controller/parent/MesController.java b/src/main/java/com/wms/controller/parent/MesController.java
index 704a1e5..11e0a54 100644
--- a/src/main/java/com/wms/controller/parent/MesController.java
+++ b/src/main/java/com/wms/controller/parent/MesController.java
@@ -1,17 +1,58 @@
package com.wms.controller.parent;
+import com.wms.controller.BaseController;
+import com.wms.entity.app.mes.CheckNoticeRequest;
+import com.wms.entity.app.mes.MesApiLocalResponse;
+import com.wms.entity.app.mes.OutNoticeRequest;
+import com.wms.entity.app.mes.ReceiptInRequest;
+import com.wms.service.MesService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.CrossOrigin;
-import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
/**
* 和 mes 交互使用的 controller
* @author icewint
*/
-@Controller
+@RestController
@CrossOrigin
-@RequestMapping(value = "/wms/mes")
-public class MesController {
+@RequestMapping(value = "/api/mes")
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
+public class MesController extends BaseController {
+
+ private final MesService mesService;
+
+ /**
+ * mes 入库之前用此接口推送信息 IF201
+ * @param request 请求信息
+ * @return 返回信息
+ */
+ @PostMapping("/ReceiptIn")
+ public MesApiLocalResponse receiptIn(@RequestBody @Validated ReceiptInRequest request) {
+ return mesService.receiptIn(request);
+ }
+
+
+ /**
+ * mes 出库 IF205(IF203)
+ * @param request 请求信息
+ * @return 返回信息
+ */
+ @PostMapping("/OutNotice")
+ public MesApiLocalResponse outNotice(@RequestBody @Validated OutNoticeRequest request) {
+ return mesService.outNotice(request);
+ }
+
+ /**
+ * mes 盘点通知单 IF206
+ * @return 返回信息
+ */
+ @PostMapping("/CheckNotice")
+ public MesApiLocalResponse checkNotice(@RequestBody @Validated CheckNoticeRequest request) {
+ return mesService.checkNotice(request);
+ }
}
diff --git a/src/main/java/com/wms/entity/app/mes/CheckNoticeRequest.java b/src/main/java/com/wms/entity/app/mes/CheckNoticeRequest.java
new file mode 100644
index 0000000..bbe310e
--- /dev/null
+++ b/src/main/java/com/wms/entity/app/mes/CheckNoticeRequest.java
@@ -0,0 +1,35 @@
+package com.wms.entity.app.mes;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import jakarta.validation.constraints.NotBlank;
+import lombok.Data;
+
+/**
+ * 盘点通知单请求类
+ */
+@Data
+public class CheckNoticeRequest {
+
+ /**
+ * 唯一识别码
+ */
+ @JsonProperty("guid")
+ @NotBlank(message = "唯一识别码不允许为空或者空字符串")
+ private String guid;
+
+ /**
+ * 盘点单号
+ */
+ @JsonProperty("InventoryNo")
+ @NotBlank(message = "盘点单号不允许为空或者空字符串")
+ private String inventoryNo;
+
+ /**
+ * 盘点库别
+ */
+ @JsonProperty("IWarehouse")
+ @NotBlank(message = "盘点库别不允许为空或者空字符串")
+ private String iWarehouse;
+
+
+}
diff --git a/src/main/java/com/wms/entity/app/mes/MesApiLocalResponse.java b/src/main/java/com/wms/entity/app/mes/MesApiLocalResponse.java
new file mode 100644
index 0000000..7b3372e
--- /dev/null
+++ b/src/main/java/com/wms/entity/app/mes/MesApiLocalResponse.java
@@ -0,0 +1,29 @@
+package com.wms.entity.app.mes;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+/**
+ * mes 接口的返回类,本地响应给 Mes 用的
+ */
+@Data
+public class MesApiLocalResponse {
+
+ public MesApiLocalResponse(Integer transFlag, String errorMessage) {
+ this.transFlag = transFlag;
+ this.errorMessage = errorMessage;
+ }
+
+ /**
+ * 响应编号:1 - 成功;0 - 失败
+ */
+ @JsonProperty("TransFlag")
+ private Integer transFlag;
+
+ /**
+ * 返回的信息
+ */
+ @JsonProperty("ErrorMessage")
+ private String errorMessage;
+
+}
diff --git a/src/main/java/com/wms/entity/app/mes/OutNoticeRequest.java b/src/main/java/com/wms/entity/app/mes/OutNoticeRequest.java
new file mode 100644
index 0000000..a2ccd4a
--- /dev/null
+++ b/src/main/java/com/wms/entity/app/mes/OutNoticeRequest.java
@@ -0,0 +1,59 @@
+package com.wms.entity.app.mes;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotEmpty;
+import jakarta.validation.constraints.Pattern;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * Mes 出货通单请求信息
+ */
+@Data
+public class OutNoticeRequest {
+
+ /**
+ * 唯一识别码
+ */
+ @NotBlank(message = "唯一识别码不允许为空或者空字符串")
+ @JsonProperty("guid")
+ private String guid;
+
+ /**
+ * 出库通知单号
+ */
+ @NotBlank(message = "发货通知单不允许为空或者空字符串")
+ @JsonProperty("TransferNo")
+ private String transferNo;
+
+ /**
+ * 源库别
+ */
+ @NotBlank(message = "源库别不允许为空或者空字符串")
+ @JsonProperty("FWarehouse")
+ private String fWarehouse;
+
+ /**
+ * 目的库别
+ */
+ @NotBlank(message = "目的库别不允许为空或者空字符串")
+ @JsonProperty("Twarehouse")
+ private String TWarehouse;
+
+ /**
+ * 计划交货日期
+ */
+ @NotBlank(message = "计划交货日不允许为空或者空字符串")
+ @JsonProperty("RDate")
+ private String rDate;
+
+ /**
+ * 行信息
+ */
+ @NotEmpty(message = "行信息不允许为空")
+ @JsonProperty("Row")
+ private OutNoticeRequestRow[] row;
+
+}
diff --git a/src/main/java/com/wms/entity/app/mes/OutNoticeRequestRow.java b/src/main/java/com/wms/entity/app/mes/OutNoticeRequestRow.java
new file mode 100644
index 0000000..27b1907
--- /dev/null
+++ b/src/main/java/com/wms/entity/app/mes/OutNoticeRequestRow.java
@@ -0,0 +1,42 @@
+package com.wms.entity.app.mes;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.Pattern;
+import lombok.Data;
+
+/**
+ * 发货通知单行信息
+ */
+@Data
+public class OutNoticeRequestRow {
+
+ /**
+ * 行号
+ */
+ @Pattern(regexp = "^\\d+$", message = "行号必须为数字")
+ @JsonProperty("TransferLine")
+ private String transferLine;
+
+ /**
+ * 料号
+ */
+ @NotBlank(message = "料号不允许为空或者空字符串")
+ @JsonProperty("ItemCode")
+ private String itemCode;
+
+ /**
+ * 数量
+ */
+ @Pattern(regexp = "^\\d+$", message = "数量必须为数字")
+ @JsonProperty("Qty")
+ private String qty;
+
+ /**
+ * 单位
+ */
+ @NotBlank(message = "单位不允许为空或者空字符串")
+ @JsonProperty("Unit")
+ private String unit;
+}
diff --git a/src/main/java/com/wms/entity/app/mes/ReceiptInRequest.java b/src/main/java/com/wms/entity/app/mes/ReceiptInRequest.java
new file mode 100644
index 0000000..81b2452
--- /dev/null
+++ b/src/main/java/com/wms/entity/app/mes/ReceiptInRequest.java
@@ -0,0 +1,63 @@
+package com.wms.entity.app.mes;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Pattern;
+import lombok.Data;
+
+/**
+ * Mes 推送入库信息的实体
+ */
+@Data
+public class ReceiptInRequest {
+
+ /**
+ * 唯一识别码
+ */
+ @JsonProperty("guid")
+ @NotBlank(message = "唯一识别码不允许为空或者空字符串")
+ private String guid;
+
+ /**
+ * 入库类型
+ * 1-原料入库
+ * 2-半成品入库
+ * 3-成品入库
+ * 4-销售退货入库
+ * 5-其他入库
+ */
+ @JsonProperty("Type")
+ @NotNull(message = "入库类型不允许为空")
+ private Integer type;
+
+ /**
+ * 批次号
+ */
+ @JsonProperty("Losnr")
+ @NotBlank(message = "批次号不允许为空")
+ public String losnr;
+
+ /**
+ * 料号
+ */
+ @JsonProperty("Itemcode")
+ @NotBlank(message = "料号不允许为空")
+ public String itemCode;
+
+ /**
+ * 数量
+ */
+ @JsonProperty("LotQty")
+ @NotNull(message = "数量不允许为空")
+ @Pattern(regexp = "^\\d+$", message = "数量必须为数字")
+ public String lotQty;
+
+ /**
+ * 库别
+ */
+ @JsonProperty("Warehouse")
+ @NotBlank(message = "库别不允许为空")
+ public String warehouse;
+
+}
diff --git a/src/main/java/com/wms/entity/table/OrderCheck.java b/src/main/java/com/wms/entity/table/OrderCheck.java
new file mode 100644
index 0000000..3c180ae
--- /dev/null
+++ b/src/main/java/com/wms/entity/table/OrderCheck.java
@@ -0,0 +1,51 @@
+package com.wms.entity.table;
+
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 盘点通知单表格
+ * tbl_app_order_check
+ */
+@Data
+public class OrderCheck {
+
+ /**
+ * 记录号,唯一识别号
+ */
+ private String recordId;
+
+ /**
+ * 盘点通知单号
+ */
+ private String checkId;
+
+ /**
+ * 库别
+ */
+ private String warehouse;
+
+ /**
+ * 状态
+ */
+ private Integer status;
+
+ /**
+ * 创建时间
+ */
+ private Date createTime;
+
+ /**
+ * 完成时间
+ */
+ private Date completeTime;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+
+
+}
diff --git a/src/main/java/com/wms/entity/table/OrderOut.java b/src/main/java/com/wms/entity/table/OrderOut.java
new file mode 100644
index 0000000..463acf3
--- /dev/null
+++ b/src/main/java/com/wms/entity/table/OrderOut.java
@@ -0,0 +1,88 @@
+package com.wms.entity.table;
+
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 出库单
+ * tbl_app_order_out
+ */
+@Data
+public class OrderOut {
+
+ /**
+ * 记录号
+ */
+ private String recordId;
+
+ /**
+ * 出库通知单号
+ */
+ private String orderId;
+
+ /**
+ * 起始库区
+ */
+ private String warehouseOrigin;
+
+ /**
+ * 目的库区
+ */
+ private String warehouseDestination;
+
+ /**
+ * 出库单类型
+ * 1:生产领料通知单
+ * 2:调拨出库单
+ * 3:出货通知单
+ */
+ private Integer orderType;
+
+ /**
+ * 交货时间
+ */
+ private Date deliveryTime;
+
+ /**
+ * 行号
+ */
+ private Integer rowNo;
+
+ /**
+ * 物料编号
+ */
+ private String goodsId;
+
+ /**
+ * 物料名称
+ */
+ private String goodsName;
+
+ /**
+ * 物料数量
+ */
+ private Integer goodsNum;
+
+ /**
+ * 单位
+ */
+ private String unit;
+
+ /**
+ * 状态
+ */
+ private Integer status;
+
+ /**
+ * 创建时间
+ */
+ private Date createTime;
+
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+}
diff --git a/src/main/java/com/wms/entity/table/Stock.java b/src/main/java/com/wms/entity/table/Stock.java
index 196df63..c46c656 100644
--- a/src/main/java/com/wms/entity/table/Stock.java
+++ b/src/main/java/com/wms/entity/table/Stock.java
@@ -18,6 +18,14 @@ public class Stock extends BaseEntity {
@ExcelExport("库存编号")
private String stockId;
+ /**
+ * 库区编号
+ */
+ @ExcelExport("库区编号")
+ private String warehouseName;
+
+
+
/**
* 库位ID
*/
@@ -160,6 +168,10 @@ public class Stock extends BaseEntity {
return stockId;
}
+ public String getWarehouseName() { return warehouseName; }
+
+ public void setWarehouseName(String warehouseName) { this.warehouseName = warehouseName; }
+
public void setStockId(String stockId) {
this.stockId = stockId;
}
diff --git a/src/main/java/com/wms/filter/GlobalExceptionHandler.java b/src/main/java/com/wms/filter/GlobalExceptionHandler.java
new file mode 100644
index 0000000..6f80736
--- /dev/null
+++ b/src/main/java/com/wms/filter/GlobalExceptionHandler.java
@@ -0,0 +1,35 @@
+package com.wms.filter;
+
+import com.alibaba.fastjson.JSON;
+import com.wms.entity.app.mes.MesApiLocalResponse;
+import org.springframework.context.support.DefaultMessageSourceResolvable;
+import org.springframework.validation.ObjectError;
+import org.springframework.web.bind.MethodArgumentNotValidException;
+import org.springframework.web.bind.annotation.ControllerAdvice;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.lang.reflect.Method;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@ControllerAdvice
+public class GlobalExceptionHandler {
+ @ExceptionHandler(value = MethodArgumentNotValidException.class)
+ @ResponseBody
+ public String handleMethodArgumentNotValidException(MethodArgumentNotValidException e) {
+ StringBuilder sb = new StringBuilder();
+ List allErrors = e.getBindingResult().getAllErrors();
+ String message = allErrors.stream().map(DefaultMessageSourceResolvable::getDefaultMessage).collect(Collectors.joining(";"));
+ Method method = e.getParameter().getMethod();
+ if(method != null) {
+ Class> controllerClass = method.getDeclaringClass();
+ String className = controllerClass.getName();
+ if(className.contains("MesController")) {
+ return JSON.toJSONString(new MesApiLocalResponse(0, message));
+ }
+ }
+ return String.format("{\"code\": 999, \"message\": \"%s\"}", message);
+ }
+
+}
diff --git a/src/main/java/com/wms/mapper/OrderCheckMapper.java b/src/main/java/com/wms/mapper/OrderCheckMapper.java
new file mode 100644
index 0000000..e79b2a2
--- /dev/null
+++ b/src/main/java/com/wms/mapper/OrderCheckMapper.java
@@ -0,0 +1,32 @@
+package com.wms.mapper;
+
+import com.wms.entity.table.OrderCheck;
+import org.mapstruct.Mapper;
+
+import java.util.List;
+
+@Mapper
+public interface OrderCheckMapper {
+
+ /**
+ * 插入一条记录
+ * @param orderCheck 记录
+ * @return 插入数量
+ */
+ int insert(OrderCheck orderCheck);
+
+ /**
+ * 条件查询
+ * @param orderCheck 查询条件
+ * @return 查询结果
+ */
+ List query(OrderCheck orderCheck);
+
+ /**
+ * 插入 批量
+ * @param orderChecks 记录
+ * @return 插入数量
+ */
+ int insertList(List orderChecks);
+
+}
diff --git a/src/main/java/com/wms/mapper/OrderOutMapper.java b/src/main/java/com/wms/mapper/OrderOutMapper.java
new file mode 100644
index 0000000..b812434
--- /dev/null
+++ b/src/main/java/com/wms/mapper/OrderOutMapper.java
@@ -0,0 +1,29 @@
+package com.wms.mapper;
+
+import com.wms.entity.table.OrderOut;
+import org.mapstruct.Mapper;
+
+import java.util.List;
+
+@Mapper
+public interface OrderOutMapper {
+
+ /**
+ * 插入
+ * @param data 要插入的数据
+ * @return 插入的行数
+ */
+ int insert(OrderOut data);
+
+
+ int insertList(List data);
+
+
+ /**
+ * 查询数据
+ * @param data 查询条件
+ * @return 查到的数据
+ */
+ List query(OrderOut data);
+
+}
diff --git a/src/main/java/com/wms/service/MesService.java b/src/main/java/com/wms/service/MesService.java
new file mode 100644
index 0000000..1944d68
--- /dev/null
+++ b/src/main/java/com/wms/service/MesService.java
@@ -0,0 +1,36 @@
+package com.wms.service;
+
+import com.wms.entity.app.mes.CheckNoticeRequest;
+import com.wms.entity.app.mes.MesApiLocalResponse;
+import com.wms.entity.app.mes.OutNoticeRequest;
+import com.wms.entity.app.mes.ReceiptInRequest;
+
+/**
+ * 上位系统交互
+ * Mes 交互 Service
+ * @author icewint
+ */
+public interface MesService {
+
+ /**
+ * mes 入库之前用此接口推送信息
+ * @param request 请求信息
+ * @return 返回信息
+ */
+ MesApiLocalResponse receiptIn(ReceiptInRequest request);
+
+ /**
+ * mes 出库通知单
+ * @param request 请求信息
+ * @return 返回信息
+ */
+ MesApiLocalResponse outNotice(OutNoticeRequest request);
+
+ /**
+ * mes 盘点通知单 IF206
+ * @param request 请求信息
+ * @return 返回信息
+ */
+ MesApiLocalResponse checkNotice(CheckNoticeRequest request);
+
+}
diff --git a/src/main/java/com/wms/service/serviceImplements/parent/MesServiceImplement.java b/src/main/java/com/wms/service/serviceImplements/parent/MesServiceImplement.java
new file mode 100644
index 0000000..5033185
--- /dev/null
+++ b/src/main/java/com/wms/service/serviceImplements/parent/MesServiceImplement.java
@@ -0,0 +1,159 @@
+package com.wms.service.serviceImplements.parent;
+
+import com.wms.constants.enums.OrderCheckStatusEnum;
+import com.wms.constants.enums.OrderOutStatusEnum;
+import com.wms.constants.enums.StockStatus;
+import com.wms.entity.app.mes.CheckNoticeRequest;
+import com.wms.entity.app.mes.MesApiLocalResponse;
+import com.wms.entity.app.mes.OutNoticeRequest;
+import com.wms.entity.app.mes.ReceiptInRequest;
+import com.wms.entity.table.OrderCheck;
+import com.wms.entity.table.OrderOut;
+import com.wms.entity.table.Stock;
+import com.wms.mapper.OrderCheckMapper;
+import com.wms.mapper.OrderOutMapper;
+import com.wms.mapper.StockMapper;
+import com.wms.service.MesService;
+import com.wms.utils.StringUtils;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 上位系统交互
+ * mes控制器的 Service 实现
+ * @author icewint
+ */
+@Service
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
+public class MesServiceImplement implements MesService {
+
+ /**
+ * 库存 Mapper
+ */
+ private final StockMapper stockMapper;
+
+ /**
+ * 出库通知单 Mapper
+ */
+ private final OrderOutMapper orderOutMapper;
+
+ /**
+ * 盘点通知单 Mapper
+ */
+ private final OrderCheckMapper orderCheckMapper;
+
+ /**
+ * mes 入库之前用此接口推送信息
+ * @param request 请求信息
+ * @return 返回信息
+ */
+ @Override
+ public MesApiLocalResponse receiptIn(ReceiptInRequest request) {
+ /* 校验库存是否存在 */
+ Stock checkIsExist = new Stock();
+ checkIsExist.setStockId(request.getGuid());
+ List checkIsExistListResult = stockMapper.selStocks(checkIsExist);
+ if(!checkIsExistListResult.isEmpty()) {
+ // 记录已经存在
+ return new MesApiLocalResponse(0, String.format("该条记录已经存在,记录号:%s", request.getGuid()));
+ }
+ /* 添加信息,标记为待入库状态 */
+ Stock needInStock = new Stock();
+ needInStock.setStockId(request.getGuid());
+ needInStock.setLocationId("-");
+ needInStock.setVehicleId("-");
+ needInStock.setRemark(request.getType().toString());
+ needInStock.setBatchNo(request.getLosnr());
+ needInStock.setGoodsId(request.getItemCode());
+ needInStock.setGoodsName("-");
+ needInStock.setRealNum(Integer.parseInt(request.getLotQty()));
+ needInStock.setAvailableNum(Integer.parseInt(request.getLotQty()));
+ needInStock.setWarehouseName(request.getWarehouse());
+ needInStock.setCreateTime(new Date());
+ needInStock.setStockStatus(StockStatus.WAIT_IN.getCode());
+ int addResult = stockMapper.addStock(needInStock);
+ if(addResult == 1) {
+ return new MesApiLocalResponse(1, "添加成功");
+ }
+ return new MesApiLocalResponse(0, "添加失败");
+
+ }
+
+
+ /**
+ * mes 出库通知单
+ * @param request 请求信息
+ * @return 返回信息
+ */
+ @Override
+ public MesApiLocalResponse outNotice(OutNoticeRequest request) {
+ /* 检验记录是否存在 */
+ OrderOut checkIsExist = new OrderOut();
+ checkIsExist.setRecordId(request.getGuid());
+ List checkIsExistListResult = orderOutMapper.query(checkIsExist);
+ if(!checkIsExistListResult.isEmpty()) {
+ return new MesApiLocalResponse(0, String.format("该条记录已经存在,记录号:%s", request.getGuid()));
+ }
+ /* 插入数据 */
+ List orderOutList = new ArrayList<>();
+ for(var row : request.getRow()) {
+ OrderOut orderOut = new OrderOut();
+ orderOut.setRecordId(request.getGuid());
+ orderOut.setOrderId(request.getTransferNo());
+ orderOut.setWarehouseOrigin(request.getFWarehouse());
+ orderOut.setWarehouseDestination(request.getTWarehouse());
+ orderOut.setOrderType(3);
+ orderOut.setDeliveryTime(StringUtils.toData(request.getRDate()));
+ orderOut.setRowNo(Integer.parseInt(row.getTransferLine()));
+ orderOut.setGoodsId(row.getItemCode());
+ orderOut.setGoodsNum(Integer.parseInt(row.getQty()));
+ orderOut.setUnit(row.getUnit());
+ orderOut.setStatus(OrderOutStatusEnum.CREATED.getCode());
+ orderOut.setCreateTime(new Timestamp(System.currentTimeMillis()));
+ orderOutList.add(orderOut);
+ }
+ if(orderOutList.isEmpty()) {
+ return new MesApiLocalResponse(0, "没有数据");
+ }
+ int addResult = orderOutMapper.insertList(orderOutList);
+ if(addResult == orderOutList.size()) {
+ return new MesApiLocalResponse(1, "添加成功");
+ }
+ return new MesApiLocalResponse(0, "添加失败");
+ }
+
+ /**
+ * mes 盘点通知单 IF206
+ * @param request 请求信息
+ * @return 返回信息
+ */
+ @Override
+ public MesApiLocalResponse checkNotice(CheckNoticeRequest request) {
+ /* 检测这条记录存不存在 */
+ OrderCheck checkIsExist = new OrderCheck();
+ checkIsExist.setRecordId(request.getGuid());
+ List checkIsExistListResult = orderCheckMapper.query(checkIsExist);
+ if(!checkIsExistListResult.isEmpty()) {
+ return new MesApiLocalResponse(0, String.format("该条记录已经存在,记录号:%s", request.getGuid()));
+ }
+ /* 添加记录 */
+ OrderCheck orderCheck = new OrderCheck();
+ orderCheck.setRecordId(request.getGuid());
+ orderCheck.setCheckId(request.getInventoryNo());
+ orderCheck.setWarehouse(request.getIWarehouse());
+ orderCheck.setStatus(OrderCheckStatusEnum.CREATED.getCode());
+ orderCheck.setCreateTime(new Date());
+ int insertResult = orderCheckMapper.insert(orderCheck);
+ if(insertResult == 1) {
+ return new MesApiLocalResponse(1, "添加成功");
+ }
+ return new MesApiLocalResponse(0, "添加失败");
+ }
+}
diff --git a/src/main/java/com/wms/utils/StringUtils.java b/src/main/java/com/wms/utils/StringUtils.java
index e7d2d16..b28745c 100644
--- a/src/main/java/com/wms/utils/StringUtils.java
+++ b/src/main/java/com/wms/utils/StringUtils.java
@@ -1,5 +1,9 @@
package com.wms.utils;
+import javax.xml.crypto.Data;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
/**
* WMS字符串工具类
* @author 梁州
@@ -107,4 +111,20 @@ public class StringUtils {
}
return sb.toString();
}
+
+
+ /**
+ * 将特定字符串转换为时间,若转换失败则返回最小时间
+ * @param dataString 需要转换的时间字符串
+ * @return 转化的结果
+ * @author icewint
+ */
+ public static Date toData(String dataString) {
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ try {
+ return sdf.parse(dataString);
+ }catch ( Exception ex) {
+ return new Date(0);
+ }
+ }
}
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index e5b29f3..9fe86c0 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -7,7 +7,7 @@ spring:
# 在线环境
datasource:
- url: jdbc:mysql://192.168.103.202:3306/wms_bk_xuzhou?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true
+ url: jdbc:mysql://192.168.234.134:3306/wms_yaxinke_yangzhou?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true
username: developer
password: developer
diff --git a/src/main/resources/mapper/OrderCheckMapper.xml b/src/main/resources/mapper/OrderCheckMapper.xml
new file mode 100644
index 0000000..6617357
--- /dev/null
+++ b/src/main/resources/mapper/OrderCheckMapper.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ insert into tbl_app_order_check(record_id, check_id, warehouse, status, create_time, complete_time, remark)
+ values(#{recordId}, #{checkId}, #{warehouse}, #{status}, #{createTime}, #{completeTime}, #{remark})
+
+
+
+
+ insert into tbl_app_order_check(record_id, check_id, warehouse, status, create_time, complete_time, remark)
+ values
+
+ (#{item.recordId}, #{item.checkId}, #{item.warehouse}, #{item.status}, #{item.createTime}, #{item.completeTime}, #{item.remark})
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/resources/mapper/OrderOutMapper.xml b/src/main/resources/mapper/OrderOutMapper.xml
new file mode 100644
index 0000000..d5216b6
--- /dev/null
+++ b/src/main/resources/mapper/OrderOutMapper.xml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ insert into tbl_app_order_out(record_id, order_id, warehouse_origin, warehouse_destination, order_type, delivery_time, row_no, goods_id, goods_name, goods_num, unit, status, create_time, remark)
+ values(#{recordId}, #{orderId}, #{warehouseOrigin}, #{warehouseDestination}, #{orderType}, #{deliveryTime}, #{rowNo}, #{goodsId}, #{goodsName}, #{goodsNum}, #{unit}, #{status}, #{createTime}, #{remark})
+
+
+
+
+ insert into tbl_app_order_out(record_id, order_id, warehouse_origin, warehouse_destination, order_type, delivery_time, row_no, goods_id, goods_name, goods_num, unit, status, create_time, remark)
+ values
+
+ (#{item.recordId}, #{item.orderId}, #{item.warehouseOrigin}, #{item.warehouseDestination}, #{item.orderType},
+ #{item.deliveryTime}, #{item.rowNo}, #{item.goodsId},
+ #{item.goodsName}, #{item.goodsNum}, #{item.unit},
+ #{item.status}, #{item.createTime}, #{item.remark})
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/resources/mapper/StockMapper.xml b/src/main/resources/mapper/StockMapper.xml
index ecccabb..bfa6205 100644
--- a/src/main/resources/mapper/StockMapper.xml
+++ b/src/main/resources/mapper/StockMapper.xml
@@ -26,6 +26,7 @@
+
@@ -71,6 +72,7 @@
and stock_id = #{stockId}
and location_id = #{locationId}
+ and warehouse_name = #{warehouseName}
and vehicle_id = #{vehicleId}
and goods_id = #{goodsId}
and goods_name = #{goodsName}
@@ -100,6 +102,7 @@
insert into tbl_app_stock
stock_id,
+ warehouse_name,
location_id,
vehicle_id,
goods_id,
@@ -125,6 +128,7 @@
#{stockId},
+ #{warehouseName},
#{locationId},
#{vehicleId},
#{goodsId},