From 66eb901956ee1434b784a6b0f646ff3b50fc4489 Mon Sep 17 00:00:00 2001 From: icewint Date: Thu, 4 Jul 2024 07:43:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 34 + log/debug/2023-11-28/2023-11-28.0.log | 0 log/debug/2023-12-19/2023-12-19.0.log | 0 log/debug/2023-12-24/2023-12-24.0.log | 0 log/debug/2023-12-25/2023-12-25.0.log | 0 log/debug/2023-12-29/2023-12-29.0.log | 0 log/debug/2024-03-11/2024-03-11.0.log | 0 log/debug/2024-03-12/2024-03-12.0.log | 0 log/error/2023-11-28/2023-11-28.0.log | 0 log/error/2023-12-19/2023-12-19.0.log | 0 log/error/2023-12-24/2023-12-24.0.log | 0 log/error/2023-12-25/2023-12-25.0.log | 0 log/error/2023-12-29/2023-12-29.0.log | 0 log/error/2024-03-11/2024-03-11.0.log | 0 log/error/2024-03-12/2024-03-12.0.log | 0 log/info/2023-11-28/2023-11-28.0.log | 0 log/info/2023-12-19/2023-12-19.0.log | 0 log/info/2023-12-24/2023-12-24.0.log | 0 log/info/2023-12-25/2023-12-25.0.log | 15 + log/info/2023-12-29/2023-12-29.0.log | 5 + log/info/2024-03-11/2024-03-11.0.log | 309 ++++ log/info/2024-03-12/2024-03-12.0.log | 17 + log/warning/2023-11-28/2023-11-28.0.log | 0 log/warning/2023-12-19/2023-12-19.0.log | 0 log/warning/2023-12-24/2023-12-24.0.log | 0 log/warning/2023-12-25/2023-12-25.0.log | 0 log/warning/2023-12-29/2023-12-29.0.log | 0 log/warning/2024-03-11/2024-03-11.0.log | 0 log/warning/2024-03-12/2024-03-12.0.log | 0 mvnw | 316 ++++ mvnw.cmd | 188 ++ pom.xml | 154 ++ src/main/java/META-INF/MANIFEST.MF | 3 + src/main/java/com/wms/WmsApplication.java | 24 + .../java/com/wms/config/InitLocalConfig.java | 22 + .../java/com/wms/config/PageHelperConfig.java | 23 + .../java/com/wms/constants/WmsConstants.java | 61 + .../com/wms/constants/enums/GoodsStatus.java | 29 + .../wms/constants/enums/KateTaskStatus.java | 25 + .../wms/constants/enums/LocationStatus.java | 27 + .../com/wms/constants/enums/ResponseCode.java | 27 + .../com/wms/constants/enums/StockStatus.java | 32 + .../com/wms/constants/enums/TaskType.java | 27 + .../com/wms/constants/enums/UrlEnums.java | 22 + .../wms/constants/enums/VehicleStatus.java | 27 + .../wms/constants/enums/WcsTaskStatus.java | 31 + .../wms/constants/enums/WmsTaskStatus.java | 35 + .../com/wms/controller/BaseController.java | 8 + .../com/wms/controller/ConfigController.java | 87 + .../com/wms/controller/DisplayController.java | 104 ++ .../com/wms/controller/ExcelController.java | 110 ++ .../com/wms/controller/GoodsController.java | 274 +++ .../java/com/wms/controller/JobComponent.java | 170 ++ .../wms/controller/LocationController.java | 336 ++++ .../com/wms/controller/RecordController.java | 90 + .../com/wms/controller/StandController.java | 133 ++ .../com/wms/controller/StockController.java | 202 +++ .../com/wms/controller/TaskController.java | 1230 +++++++++++++ .../wms/controller/TaskDealController.java | 208 +++ .../com/wms/controller/TestController.java | 236 +++ .../com/wms/controller/UserController.java | 205 +++ .../wms/controller/parent/MesController.java | 17 + src/main/java/com/wms/entity/BaseEntity.java | 9 + .../wms/entity/app/FinishPickTaskRequest.java | 139 ++ .../app/FinishVehicleAndPartRequest.java | 31 + .../com/wms/entity/app/InventoryTask.java | 57 + .../com/wms/entity/app/LayerLocation.java | 36 + .../java/com/wms/entity/app/MenuEntity.java | 70 + .../com/wms/entity/app/ResponseEntity.java | 48 + .../java/com/wms/entity/app/RowLocation.java | 34 + .../wms/entity/app/TaskInRequestEntity.java | 166 ++ .../wms/entity/app/TaskOutRequestEntity.java | 57 + .../com/wms/entity/app/UserConfigEntity.java | 34 + .../wms/entity/app/display/LocationData.java | 55 + .../wms/entity/app/display/LocationInfo.java | 45 + .../entity/app/wcs/DisposeStandRequest.java | 40 + .../wms/entity/app/wcs/PickTaskRequest.java | 45 + .../wms/entity/app/wcs/PickTaskResponse.java | 40 + .../wms/entity/app/wcs/RequireInRequest.java | 55 + .../java/com/wms/entity/app/wcs/WcsGoods.java | 83 + .../java/com/wms/entity/app/wcs/WcsTask.java | 152 ++ .../app/wcs/WcsToWmsInspectVesselEntity.java | 102 ++ .../app/wcs/WmsReceiveTaskResultEntity.java | 70 + .../java/com/wms/entity/page/PageDomain.java | 67 + .../com/wms/entity/page/TableRequest.java | 43 + .../com/wms/entity/page/TableResponse.java | 57 + .../java/com/wms/entity/table/Config.java | 73 + src/main/java/com/wms/entity/table/Goods.java | 149 ++ .../java/com/wms/entity/table/Location.java | 175 ++ src/main/java/com/wms/entity/table/Menu.java | 73 + .../java/com/wms/entity/table/PartInfo.java | 212 +++ src/main/java/com/wms/entity/table/Stand.java | 151 ++ src/main/java/com/wms/entity/table/Stock.java | 342 ++++ src/main/java/com/wms/entity/table/Task.java | 345 ++++ src/main/java/com/wms/entity/table/User.java | 101 ++ .../java/com/wms/entity/table/Vehicle.java | 65 + .../java/com/wms/entity/test/ExcelTest.java | 36 + .../java/com/wms/mapper/ConfigMapper.java | 26 + src/main/java/com/wms/mapper/GoodsMapper.java | 45 + .../java/com/wms/mapper/LocationMapper.java | 38 + src/main/java/com/wms/mapper/MenuMapper.java | 15 + .../java/com/wms/mapper/PartInfoMapper.java | 15 + src/main/java/com/wms/mapper/StandMapper.java | 19 + src/main/java/com/wms/mapper/StockMapper.java | 56 + src/main/java/com/wms/mapper/TaskMapper.java | 38 + .../java/com/wms/mapper/TaskRecordMapper.java | 40 + src/main/java/com/wms/mapper/UserMapper.java | 16 + .../java/com/wms/mapper/VehicleMapper.java | 44 + .../java/com/wms/service/ConfigService.java | 20 + .../java/com/wms/service/GoodsService.java | 43 + .../java/com/wms/service/LocationService.java | 36 + .../java/com/wms/service/MenuService.java | 14 + .../java/com/wms/service/PartInfoService.java | 42 + .../java/com/wms/service/StandService.java | 45 + .../java/com/wms/service/StockService.java | 77 + .../com/wms/service/TaskRecordService.java | 42 + .../java/com/wms/service/TaskService.java | 36 + .../java/com/wms/service/UserService.java | 15 + .../java/com/wms/service/VehicleService.java | 42 + .../ConfigServiceImplement.java | 30 + .../GoodsServiceImplements.java | 45 + .../LocationServiceImplements.java | 39 + .../MenuServiceImplements.java | 25 + .../PartInfoServiceImplements.java | 40 + .../StandServiceImplements.java | 45 + .../StockServiceImplements.java | 67 + .../TaskRecordServiceImplements.java | 45 + .../TaskServiceImplements.java | 40 + .../UserServiceImplements.java | 24 + .../VehicleServiceImplements.java | 43 + src/main/java/com/wms/utils/HttpUtils.java | 227 +++ src/main/java/com/wms/utils/JWTUtils.java | 15 + src/main/java/com/wms/utils/MyPassword.java | 113 ++ src/main/java/com/wms/utils/StringUtils.java | 110 ++ src/main/java/com/wms/utils/TokenUtils.java | 6 + src/main/java/com/wms/utils/WmsUtils.java | 170 ++ .../com/wms/utils/excel/ExcelClassField.java | 71 + .../java/com/wms/utils/excel/ExcelExport.java | 22 + .../java/com/wms/utils/excel/ExcelImport.java | 25 + .../java/com/wms/utils/excel/ExcelUtils.java | 1026 +++++++++++ src/main/resources/application.yml | 42 + src/main/resources/logback-spring.xml | 124 ++ src/main/resources/mapper/ConfigMapper.xml | 26 + src/main/resources/mapper/GoodsMapper.xml | 98 + src/main/resources/mapper/LocationMapper.xml | 98 + src/main/resources/mapper/MenuMapper.xml | 18 + src/main/resources/mapper/PartInfoMapper.xml | 134 ++ src/main/resources/mapper/StandMapper.xml | 92 + src/main/resources/mapper/StockMapper.xml | 190 ++ src/main/resources/mapper/TaskMapper.xml | 149 ++ .../resources/mapper/TaskRecordMapper.xml | 158 ++ src/main/resources/mapper/UserMapper.xml | 30 + src/main/resources/mapper/VehicleMapper.xml | 62 + src/main/resources/mybatis-config.xml | 15 + src/main/resources/sql/wms_bk_xuzhou.sql | 1598 +++++++++++++++++ 155 files changed, 13946 insertions(+) create mode 100644 .gitignore create mode 100644 log/debug/2023-11-28/2023-11-28.0.log create mode 100644 log/debug/2023-12-19/2023-12-19.0.log create mode 100644 log/debug/2023-12-24/2023-12-24.0.log create mode 100644 log/debug/2023-12-25/2023-12-25.0.log create mode 100644 log/debug/2023-12-29/2023-12-29.0.log create mode 100644 log/debug/2024-03-11/2024-03-11.0.log create mode 100644 log/debug/2024-03-12/2024-03-12.0.log create mode 100644 log/error/2023-11-28/2023-11-28.0.log create mode 100644 log/error/2023-12-19/2023-12-19.0.log create mode 100644 log/error/2023-12-24/2023-12-24.0.log create mode 100644 log/error/2023-12-25/2023-12-25.0.log create mode 100644 log/error/2023-12-29/2023-12-29.0.log create mode 100644 log/error/2024-03-11/2024-03-11.0.log create mode 100644 log/error/2024-03-12/2024-03-12.0.log create mode 100644 log/info/2023-11-28/2023-11-28.0.log create mode 100644 log/info/2023-12-19/2023-12-19.0.log create mode 100644 log/info/2023-12-24/2023-12-24.0.log create mode 100644 log/info/2023-12-25/2023-12-25.0.log create mode 100644 log/info/2023-12-29/2023-12-29.0.log create mode 100644 log/info/2024-03-11/2024-03-11.0.log create mode 100644 log/info/2024-03-12/2024-03-12.0.log create mode 100644 log/warning/2023-11-28/2023-11-28.0.log create mode 100644 log/warning/2023-12-19/2023-12-19.0.log create mode 100644 log/warning/2023-12-24/2023-12-24.0.log create mode 100644 log/warning/2023-12-25/2023-12-25.0.log create mode 100644 log/warning/2023-12-29/2023-12-29.0.log create mode 100644 log/warning/2024-03-11/2024-03-11.0.log create mode 100644 log/warning/2024-03-12/2024-03-12.0.log create mode 100644 mvnw create mode 100644 mvnw.cmd create mode 100644 pom.xml create mode 100644 src/main/java/META-INF/MANIFEST.MF create mode 100644 src/main/java/com/wms/WmsApplication.java create mode 100644 src/main/java/com/wms/config/InitLocalConfig.java create mode 100644 src/main/java/com/wms/config/PageHelperConfig.java create mode 100644 src/main/java/com/wms/constants/WmsConstants.java create mode 100644 src/main/java/com/wms/constants/enums/GoodsStatus.java create mode 100644 src/main/java/com/wms/constants/enums/KateTaskStatus.java create mode 100644 src/main/java/com/wms/constants/enums/LocationStatus.java create mode 100644 src/main/java/com/wms/constants/enums/ResponseCode.java create mode 100644 src/main/java/com/wms/constants/enums/StockStatus.java create mode 100644 src/main/java/com/wms/constants/enums/TaskType.java create mode 100644 src/main/java/com/wms/constants/enums/UrlEnums.java create mode 100644 src/main/java/com/wms/constants/enums/VehicleStatus.java create mode 100644 src/main/java/com/wms/constants/enums/WcsTaskStatus.java create mode 100644 src/main/java/com/wms/constants/enums/WmsTaskStatus.java create mode 100644 src/main/java/com/wms/controller/BaseController.java create mode 100644 src/main/java/com/wms/controller/ConfigController.java create mode 100644 src/main/java/com/wms/controller/DisplayController.java create mode 100644 src/main/java/com/wms/controller/ExcelController.java create mode 100644 src/main/java/com/wms/controller/GoodsController.java create mode 100644 src/main/java/com/wms/controller/JobComponent.java create mode 100644 src/main/java/com/wms/controller/LocationController.java create mode 100644 src/main/java/com/wms/controller/RecordController.java create mode 100644 src/main/java/com/wms/controller/StandController.java create mode 100644 src/main/java/com/wms/controller/StockController.java create mode 100644 src/main/java/com/wms/controller/TaskController.java create mode 100644 src/main/java/com/wms/controller/TaskDealController.java create mode 100644 src/main/java/com/wms/controller/TestController.java create mode 100644 src/main/java/com/wms/controller/UserController.java create mode 100644 src/main/java/com/wms/controller/parent/MesController.java create mode 100644 src/main/java/com/wms/entity/BaseEntity.java create mode 100644 src/main/java/com/wms/entity/app/FinishPickTaskRequest.java create mode 100644 src/main/java/com/wms/entity/app/FinishVehicleAndPartRequest.java create mode 100644 src/main/java/com/wms/entity/app/InventoryTask.java create mode 100644 src/main/java/com/wms/entity/app/LayerLocation.java create mode 100644 src/main/java/com/wms/entity/app/MenuEntity.java create mode 100644 src/main/java/com/wms/entity/app/ResponseEntity.java create mode 100644 src/main/java/com/wms/entity/app/RowLocation.java create mode 100644 src/main/java/com/wms/entity/app/TaskInRequestEntity.java create mode 100644 src/main/java/com/wms/entity/app/TaskOutRequestEntity.java create mode 100644 src/main/java/com/wms/entity/app/UserConfigEntity.java create mode 100644 src/main/java/com/wms/entity/app/display/LocationData.java create mode 100644 src/main/java/com/wms/entity/app/display/LocationInfo.java create mode 100644 src/main/java/com/wms/entity/app/wcs/DisposeStandRequest.java create mode 100644 src/main/java/com/wms/entity/app/wcs/PickTaskRequest.java create mode 100644 src/main/java/com/wms/entity/app/wcs/PickTaskResponse.java create mode 100644 src/main/java/com/wms/entity/app/wcs/RequireInRequest.java create mode 100644 src/main/java/com/wms/entity/app/wcs/WcsGoods.java create mode 100644 src/main/java/com/wms/entity/app/wcs/WcsTask.java create mode 100644 src/main/java/com/wms/entity/app/wcs/WcsToWmsInspectVesselEntity.java create mode 100644 src/main/java/com/wms/entity/app/wcs/WmsReceiveTaskResultEntity.java create mode 100644 src/main/java/com/wms/entity/page/PageDomain.java create mode 100644 src/main/java/com/wms/entity/page/TableRequest.java create mode 100644 src/main/java/com/wms/entity/page/TableResponse.java create mode 100644 src/main/java/com/wms/entity/table/Config.java create mode 100644 src/main/java/com/wms/entity/table/Goods.java create mode 100644 src/main/java/com/wms/entity/table/Location.java create mode 100644 src/main/java/com/wms/entity/table/Menu.java create mode 100644 src/main/java/com/wms/entity/table/PartInfo.java create mode 100644 src/main/java/com/wms/entity/table/Stand.java create mode 100644 src/main/java/com/wms/entity/table/Stock.java create mode 100644 src/main/java/com/wms/entity/table/Task.java create mode 100644 src/main/java/com/wms/entity/table/User.java create mode 100644 src/main/java/com/wms/entity/table/Vehicle.java create mode 100644 src/main/java/com/wms/entity/test/ExcelTest.java create mode 100644 src/main/java/com/wms/mapper/ConfigMapper.java create mode 100644 src/main/java/com/wms/mapper/GoodsMapper.java create mode 100644 src/main/java/com/wms/mapper/LocationMapper.java create mode 100644 src/main/java/com/wms/mapper/MenuMapper.java create mode 100644 src/main/java/com/wms/mapper/PartInfoMapper.java create mode 100644 src/main/java/com/wms/mapper/StandMapper.java create mode 100644 src/main/java/com/wms/mapper/StockMapper.java create mode 100644 src/main/java/com/wms/mapper/TaskMapper.java create mode 100644 src/main/java/com/wms/mapper/TaskRecordMapper.java create mode 100644 src/main/java/com/wms/mapper/UserMapper.java create mode 100644 src/main/java/com/wms/mapper/VehicleMapper.java create mode 100644 src/main/java/com/wms/service/ConfigService.java create mode 100644 src/main/java/com/wms/service/GoodsService.java create mode 100644 src/main/java/com/wms/service/LocationService.java create mode 100644 src/main/java/com/wms/service/MenuService.java create mode 100644 src/main/java/com/wms/service/PartInfoService.java create mode 100644 src/main/java/com/wms/service/StandService.java create mode 100644 src/main/java/com/wms/service/StockService.java create mode 100644 src/main/java/com/wms/service/TaskRecordService.java create mode 100644 src/main/java/com/wms/service/TaskService.java create mode 100644 src/main/java/com/wms/service/UserService.java create mode 100644 src/main/java/com/wms/service/VehicleService.java create mode 100644 src/main/java/com/wms/service/serviceImplements/ConfigServiceImplement.java create mode 100644 src/main/java/com/wms/service/serviceImplements/GoodsServiceImplements.java create mode 100644 src/main/java/com/wms/service/serviceImplements/LocationServiceImplements.java create mode 100644 src/main/java/com/wms/service/serviceImplements/MenuServiceImplements.java create mode 100644 src/main/java/com/wms/service/serviceImplements/PartInfoServiceImplements.java create mode 100644 src/main/java/com/wms/service/serviceImplements/StandServiceImplements.java create mode 100644 src/main/java/com/wms/service/serviceImplements/StockServiceImplements.java create mode 100644 src/main/java/com/wms/service/serviceImplements/TaskRecordServiceImplements.java create mode 100644 src/main/java/com/wms/service/serviceImplements/TaskServiceImplements.java create mode 100644 src/main/java/com/wms/service/serviceImplements/UserServiceImplements.java create mode 100644 src/main/java/com/wms/service/serviceImplements/VehicleServiceImplements.java create mode 100644 src/main/java/com/wms/utils/HttpUtils.java create mode 100644 src/main/java/com/wms/utils/JWTUtils.java create mode 100644 src/main/java/com/wms/utils/MyPassword.java create mode 100644 src/main/java/com/wms/utils/StringUtils.java create mode 100644 src/main/java/com/wms/utils/TokenUtils.java create mode 100644 src/main/java/com/wms/utils/WmsUtils.java create mode 100644 src/main/java/com/wms/utils/excel/ExcelClassField.java create mode 100644 src/main/java/com/wms/utils/excel/ExcelExport.java create mode 100644 src/main/java/com/wms/utils/excel/ExcelImport.java create mode 100644 src/main/java/com/wms/utils/excel/ExcelUtils.java create mode 100644 src/main/resources/application.yml create mode 100644 src/main/resources/logback-spring.xml create mode 100644 src/main/resources/mapper/ConfigMapper.xml create mode 100644 src/main/resources/mapper/GoodsMapper.xml create mode 100644 src/main/resources/mapper/LocationMapper.xml create mode 100644 src/main/resources/mapper/MenuMapper.xml create mode 100644 src/main/resources/mapper/PartInfoMapper.xml create mode 100644 src/main/resources/mapper/StandMapper.xml create mode 100644 src/main/resources/mapper/StockMapper.xml create mode 100644 src/main/resources/mapper/TaskMapper.xml create mode 100644 src/main/resources/mapper/TaskRecordMapper.xml create mode 100644 src/main/resources/mapper/UserMapper.xml create mode 100644 src/main/resources/mapper/VehicleMapper.xml create mode 100644 src/main/resources/mybatis-config.xml create mode 100644 src/main/resources/sql/wms_bk_xuzhou.sql diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b38d1e5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,34 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ +.log + +### VS Code ### +.vscode/ diff --git a/log/debug/2023-11-28/2023-11-28.0.log b/log/debug/2023-11-28/2023-11-28.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/debug/2023-12-19/2023-12-19.0.log b/log/debug/2023-12-19/2023-12-19.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/debug/2023-12-24/2023-12-24.0.log b/log/debug/2023-12-24/2023-12-24.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/debug/2023-12-25/2023-12-25.0.log b/log/debug/2023-12-25/2023-12-25.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/debug/2023-12-29/2023-12-29.0.log b/log/debug/2023-12-29/2023-12-29.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/debug/2024-03-11/2024-03-11.0.log b/log/debug/2024-03-11/2024-03-11.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/debug/2024-03-12/2024-03-12.0.log b/log/debug/2024-03-12/2024-03-12.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/error/2023-11-28/2023-11-28.0.log b/log/error/2023-11-28/2023-11-28.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/error/2023-12-19/2023-12-19.0.log b/log/error/2023-12-19/2023-12-19.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/error/2023-12-24/2023-12-24.0.log b/log/error/2023-12-24/2023-12-24.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/error/2023-12-25/2023-12-25.0.log b/log/error/2023-12-25/2023-12-25.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/error/2023-12-29/2023-12-29.0.log b/log/error/2023-12-29/2023-12-29.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/error/2024-03-11/2024-03-11.0.log b/log/error/2024-03-11/2024-03-11.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/error/2024-03-12/2024-03-12.0.log b/log/error/2024-03-12/2024-03-12.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/info/2023-11-28/2023-11-28.0.log b/log/info/2023-11-28/2023-11-28.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/info/2023-12-19/2023-12-19.0.log b/log/info/2023-12-19/2023-12-19.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/info/2023-12-24/2023-12-24.0.log b/log/info/2023-12-24/2023-12-24.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/info/2023-12-25/2023-12-25.0.log b/log/info/2023-12-25/2023-12-25.0.log new file mode 100644 index 0000000..1d5951b --- /dev/null +++ b/log/info/2023-12-25/2023-12-25.0.log @@ -0,0 +1,15 @@ +2023-12-25 16:24:26.481 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 10632 (D:\workspace\徐州宝开项目\FDBK_XUZHOU\back\target\classes started by 59475 in D:\workspace\徐州宝开项目\FDBK_XUZHOU\back) +2023-12-25 16:24:26.484 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online" +2023-12-25 16:24:28.720 [scheduling-1] INFO com.wms.controller.JobComponent - 查询待下发任务 +2023-12-25 16:24:28.722 [main] INFO com.wms.WmsApplication - Started WmsApplication in 2.87 seconds (process running for 4.259) +2023-12-25 16:24:28.724 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中... +2023-12-25 16:24:28.725 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中... +2023-12-25 16:24:30.258 [scheduling-1] INFO com.wms.controller.JobComponent - 查询待下发任务 +2023-12-25 16:24:31.273 [scheduling-1] INFO com.wms.controller.JobComponent - 查询待下发任务 +2023-12-25 16:24:32.289 [scheduling-1] INFO com.wms.controller.JobComponent - 查询待下发任务 +2023-12-25 16:24:33.303 [scheduling-1] INFO com.wms.controller.JobComponent - 查询待下发任务 +2023-12-25 16:24:34.319 [scheduling-1] INFO com.wms.controller.JobComponent - 查询待下发任务 +2023-12-25 16:24:35.340 [scheduling-1] INFO com.wms.controller.JobComponent - 查询待下发任务 +2023-12-25 16:24:36.349 [scheduling-1] INFO com.wms.controller.JobComponent - 查询待下发任务 +2023-12-25 16:24:37.364 [scheduling-1] INFO com.wms.controller.JobComponent - 查询待下发任务 +2023-12-25 16:24:38.383 [scheduling-1] INFO com.wms.controller.JobComponent - 查询待下发任务 diff --git a/log/info/2023-12-29/2023-12-29.0.log b/log/info/2023-12-29/2023-12-29.0.log new file mode 100644 index 0000000..8b5cbdb --- /dev/null +++ b/log/info/2023-12-29/2023-12-29.0.log @@ -0,0 +1,5 @@ +2023-12-29 10:07:31.665 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 13296 (D:\workspace\徐州宝开项目\FDBK_XUZHOU\back\target\classes started by 59475 in D:\workspace\徐州宝开项目\FDBK_XUZHOU\back) +2023-12-29 10:07:31.669 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online" +2023-12-29 10:07:34.935 [main] INFO com.wms.WmsApplication - Started WmsApplication in 4.075 seconds (process running for 5.984) +2023-12-29 10:07:34.938 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中... +2023-12-29 10:07:34.939 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中... diff --git a/log/info/2024-03-11/2024-03-11.0.log b/log/info/2024-03-11/2024-03-11.0.log new file mode 100644 index 0000000..d3481d6 --- /dev/null +++ b/log/info/2024-03-11/2024-03-11.0.log @@ -0,0 +1,309 @@ +2024-03-11 10:11:56.463 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 65832 (D:\workspace\徐州宝开项目\FDBK_XUZHOU\back\target\classes started by 59475 in D:\workspace\徐州宝开项目\FDBK_XUZHOU\back) +2024-03-11 10:11:56.465 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online" +2024-03-11 10:11:59.970 [main] INFO com.wms.WmsApplication - Started WmsApplication in 4.233 seconds (process running for 5.859) +2024-03-11 10:11:59.972 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中... +2024-03-11 10:11:59.972 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中... +2024-03-11 10:19:17.268 [http-nio-12315-exec-5] INFO com.wms.controller.UserController - WMS前端用户登录,登录账户名:admin +2024-03-11 10:19:17.301 [http-nio-12315-exec-5] INFO com.wms.controller.UserController - 登录成功,登录账户名:admin +2024-03-11 10:19:17.564 [http-nio-12315-exec-5] INFO com.wms.controller.UserController - 构造用户信息成功,当前用户:{"addTime":"2023-03-23 11:17:06","addUser":"系统","loginAccount":"admin","loginPassword":"812C0C84E2970FA98456DDC5B0B59594","roleId":1,"updateTime":"2023-03-23 11:17:10","userId":1,"userName":"管理员"} +2024-03-11 10:19:18.488 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 10:19:18.493 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 10:19:18.610 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 10:19:21.416 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 10:19:21.418 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 10:19:21.440 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 10:19:30.505 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 10:19:30.505 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 10:19:30.524 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 10:19:30.708 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 10:19:30.709 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 10:19:30.722 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 10:19:30.896 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 10:19:30.897 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 10:19:30.910 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 10:19:31.082 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 10:19:31.083 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 10:19:31.101 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 10:19:31.277 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 10:19:31.278 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 10:19:31.292 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 10:19:34.758 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 10:19:34.759 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 10:19:34.771 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 10:19:34.953 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 10:19:34.953 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 10:19:34.966 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 10:19:35.161 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 10:19:35.161 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 10:19:35.177 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:21:21.458 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 33008 (D:\workspace\徐州宝开项目\FDBK_XUZHOU\back\target\classes started by 59475 in D:\workspace\徐州宝开项目\FDBK_XUZHOU\back) +2024-03-11 14:21:21.461 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online" +2024-03-11 14:21:24.628 [main] INFO com.wms.WmsApplication - Started WmsApplication in 3.787 seconds (process running for 4.679) +2024-03-11 14:21:24.630 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中... +2024-03-11 14:21:24.630 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中... +2024-03-11 14:24:37.393 [http-nio-12315-exec-2] INFO com.wms.controller.UserController - WMS前端用户登录,登录账户名:admin +2024-03-11 14:24:37.409 [http-nio-12315-exec-2] INFO com.wms.controller.UserController - 登录成功,登录账户名:admin +2024-03-11 14:24:37.667 [http-nio-12315-exec-2] INFO com.wms.controller.UserController - 构造用户信息成功,当前用户:{"addTime":"2023-03-23 11:17:06","addUser":"系统","loginAccount":"admin","loginPassword":"812C0C84E2970FA98456DDC5B0B59594","roleId":1,"updateTime":"2023-03-23 11:17:10","userId":1,"userName":"管理员"} +2024-03-11 14:24:38.715 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:24:38.719 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:24:38.804 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:24:41.759 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:24:41.760 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:24:41.784 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:24:53.082 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:24:53.083 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:24:53.093 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:24:54.538 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:24:54.538 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:24:54.554 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:24:55.754 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:24:55.754 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:24:55.762 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:02.139 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:02.139 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:02.164 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:02.322 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:02.323 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:02.350 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:02.517 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:02.517 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:02.531 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:06.266 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:06.267 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:06.281 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:08.484 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:08.484 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:08.502 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:21.500 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:21.500 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:21.518 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:21.694 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:21.695 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:21.710 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:21.889 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:21.889 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:21.918 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:23.037 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:23.037 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:23.047 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:24.206 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:24.207 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:24.213 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:24.402 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:24.403 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:24.409 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:24.589 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:24.589 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:24.597 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:24.753 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:24.753 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:24.759 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:24.941 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:24.942 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:24.948 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:25.121 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:25.121 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:25.126 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:25.308 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:25.309 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:25.313 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:34.256 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:34.256 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:34.275 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:34.443 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:34.443 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:34.456 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:34.623 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:34.623 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:34.641 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:34.818 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:34.819 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:34.840 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:25:34.998 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:25:34.998 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:25:35.013 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 查询库存成功,总数:0,当前页:1,当前页数量:10 +2024-03-11 14:27:05.281 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:27:05.281 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:27:05.292 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:27:05.466 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:27:05.466 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:27:05.474 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:27:05.638 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:27:05.638 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:27:05.647 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:27:05.810 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:27:05.810 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:27:05.819 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:27:06.005 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:27:06.005 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:27:06.012 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:27:06.178 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:27:06.178 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:27:06.185 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:27:13.625 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:27:13.626 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:27:13.633 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:27:13.819 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:27:13.820 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:27:13.829 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:27:14.007 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:27:14.008 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:27:14.016 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:27:14.195 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:27:14.195 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:27:14.207 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:27:14.413 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:27:14.413 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:27:14.421 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:29:27.628 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:29:27.629 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:29:27.640 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:29:28.085 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:29:28.086 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:29:28.098 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:29:28.265 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:29:28.266 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:29:28.282 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:29:29.899 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:29:29.899 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:29:29.938 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:29:31.985 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:29:31.986 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:29:31.995 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:29:37.131 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:29:37.132 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:29:37.180 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:29:38.480 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:29:38.480 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:29:38.494 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:29:39.575 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:29:39.575 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:29:39.604 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:29:47.961 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:29:47.961 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:29:47.975 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:29:49.144 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:29:49.145 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:29:49.194 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:29:50.135 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:29:50.135 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:29:50.150 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:29:51.036 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:29:51.036 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:29:51.078 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:29:52.249 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:29:52.249 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:29:52.261 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:29:53.329 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:29:53.329 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:29:53.358 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:29:54.221 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:29:54.221 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:29:54.232 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:29:56.651 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:29:56.651 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:29:56.687 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:30:35.973 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:30:35.973 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:30:36.010 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:30:39.364 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:30:39.365 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:30:39.404 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:30:43.953 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:30:43.953 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:30:43.986 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:30:44.141 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:30:44.141 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:30:44.193 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:30:44.335 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:30:44.335 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:30:44.378 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:30:46.739 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:30:46.740 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:30:46.770 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:30:49.945 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:30:49.945 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:30:49.957 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:30:51.617 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:30:51.617 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:30:51.644 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:30:53.044 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:30:53.044 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:30:53.055 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:30:54.069 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:30:54.069 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:30:54.105 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:30:55.832 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:30:55.832 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:30:55.846 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:30:57.474 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:30:57.474 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:30:57.505 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:30:58.554 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:30:58.554 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:30:58.565 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:31:01.374 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:31:01.374 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:31:01.414 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:31:02.611 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:31:02.612 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:31:02.621 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:31:05.138 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:31:05.139 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:31:05.175 [http-nio-12315-exec-9] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:31:06.758 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:31:06.758 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:31:06.770 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:52:59.812 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:52:59.813 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:52:59.856 [http-nio-12315-exec-6] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:53:01.211 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:53:01.212 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:53:01.234 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:53:02.967 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:53:02.967 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:53:03.021 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:53:24.051 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:53:24.052 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:53:24.084 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:53:37.579 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:53:37.579 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:53:37.595 [http-nio-12315-exec-3] INFO com.wms.controller.StockController - 查询库存成功,总数:2,当前页:1,当前页数量:10 +2024-03-11 14:53:39.340 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:53:39.340 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:53:39.382 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:57:52.237 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:57:52.237 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:57:52.275 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 14:58:48.206 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 14:58:48.207 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 14:58:48.249 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 15:05:35.051 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 15:05:35.052 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 15:05:35.089 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 15:37:54.511 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 55580 (D:\workspace\徐州宝开项目\FDBK_XUZHOU\back\target\classes started by 59475 in D:\workspace\徐州宝开项目\FDBK_XUZHOU\back) +2024-03-11 15:37:54.513 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online" +2024-03-11 15:37:56.611 [main] INFO com.wms.WmsApplication - Started WmsApplication in 2.665 seconds (process running for 3.623) +2024-03-11 15:37:56.612 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中... +2024-03-11 15:37:56.613 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中... +2024-03-11 15:39:32.802 [http-nio-12315-exec-2] INFO com.wms.controller.UserController - WMS前端用户登录,登录账户名:admin +2024-03-11 15:39:32.814 [http-nio-12315-exec-2] INFO com.wms.controller.UserController - 登录成功,登录账户名:admin +2024-03-11 15:39:32.989 [http-nio-12315-exec-2] INFO com.wms.controller.UserController - 构造用户信息成功,当前用户:{"addTime":"2023-03-23 11:17:06","addUser":"系统","loginAccount":"admin","loginPassword":"812C0C84E2970FA98456DDC5B0B59594","roleId":1,"updateTime":"2023-03-23 11:17:10","userId":1,"userName":"管理员"} +2024-03-11 15:39:33.673 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 15:39:33.676 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 15:39:33.759 [http-nio-12315-exec-4] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 15:39:35.968 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 15:39:35.969 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 15:39:35.997 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 15:40:09.836 [http-nio-12315-exec-5] INFO com.wms.controller.UserController - WMS前端用户登录,登录账户名:admin +2024-03-11 15:40:09.839 [http-nio-12315-exec-5] INFO com.wms.controller.UserController - 登录成功,登录账户名:admin +2024-03-11 15:40:09.841 [http-nio-12315-exec-5] INFO com.wms.controller.UserController - 构造用户信息成功,当前用户:{"addTime":"2023-03-23 11:17:06","addUser":"系统","loginAccount":"admin","loginPassword":"812C0C84E2970FA98456DDC5B0B59594","roleId":1,"updateTime":"2023-03-23 11:17:10","userId":1,"userName":"管理员"} +2024-03-11 15:40:10.444 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 15:40:10.445 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 15:40:10.470 [http-nio-12315-exec-10] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 15:40:14.677 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 15:40:14.677 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 15:40:14.701 [http-nio-12315-exec-1] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-11 15:40:37.962 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-11 15:40:37.962 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-11 15:40:37.987 [http-nio-12315-exec-2] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 diff --git a/log/info/2024-03-12/2024-03-12.0.log b/log/info/2024-03-12/2024-03-12.0.log new file mode 100644 index 0000000..17c1f17 --- /dev/null +++ b/log/info/2024-03-12/2024-03-12.0.log @@ -0,0 +1,17 @@ +2024-03-12 13:24:20.313 [main] INFO com.wms.WmsApplication - Starting WmsApplication using Java 17.0.5 with PID 18516 (D:\workspace\徐州宝开项目\FDBK_XUZHOU\back\target\classes started by 59475 in D:\workspace\徐州宝开项目\FDBK_XUZHOU\back) +2024-03-12 13:24:20.315 [main] INFO com.wms.WmsApplication - The following 1 profile is active: "online" +2024-03-12 13:24:23.388 [main] INFO com.wms.WmsApplication - Started WmsApplication in 3.629 seconds (process running for 5.859) +2024-03-12 13:24:23.390 [main] INFO com.wms.config.InitLocalConfig - 加载设置到内存中... +2024-03-12 13:24:23.390 [main] INFO com.wms.config.InitLocalConfig - 加载配置到内存中... +2024-03-12 14:04:54.679 [http-nio-12315-exec-2] INFO com.wms.controller.UserController - WMS前端用户登录,登录账户名:admin +2024-03-12 14:04:54.694 [http-nio-12315-exec-2] INFO com.wms.controller.UserController - 登录成功,登录账户名:admin +2024-03-12 14:04:54.859 [http-nio-12315-exec-2] INFO com.wms.controller.UserController - 构造用户信息成功,当前用户:{"addTime":"2023-03-23 11:17:06","addUser":"系统","loginAccount":"admin","loginPassword":"812C0C84E2970FA98456DDC5B0B59594","roleId":1,"updateTime":"2023-03-23 11:17:10","userId":1,"userName":"管理员"} +2024-03-12 14:04:55.727 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-12 14:04:55.730 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-12 14:04:55.824 [http-nio-12315-exec-8] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-12 14:05:46.700 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-12 14:05:46.701 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-12 14:05:46.727 [http-nio-12315-exec-5] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 +2024-03-12 14:20:02.489 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 请求的ip地址:127.0.0.1 +2024-03-12 14:20:02.489 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 接收到查询库存请求:{"page":{"isAsc":"asc","orderBy":"","pageNum":1,"pageSize":10},"param":""} +2024-03-12 14:20:02.515 [http-nio-12315-exec-7] INFO com.wms.controller.StockController - 查询库存成功,总数:3,当前页:1,当前页数量:10 diff --git a/log/warning/2023-11-28/2023-11-28.0.log b/log/warning/2023-11-28/2023-11-28.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/warning/2023-12-19/2023-12-19.0.log b/log/warning/2023-12-19/2023-12-19.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/warning/2023-12-24/2023-12-24.0.log b/log/warning/2023-12-24/2023-12-24.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/warning/2023-12-25/2023-12-25.0.log b/log/warning/2023-12-25/2023-12-25.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/warning/2023-12-29/2023-12-29.0.log b/log/warning/2023-12-29/2023-12-29.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/warning/2024-03-11/2024-03-11.0.log b/log/warning/2024-03-11/2024-03-11.0.log new file mode 100644 index 0000000..e69de29 diff --git a/log/warning/2024-03-12/2024-03-12.0.log b/log/warning/2024-03-12/2024-03-12.0.log new file mode 100644 index 0000000..e69de29 diff --git a/mvnw b/mvnw new file mode 100644 index 0000000..8a8fb22 --- /dev/null +++ b/mvnw @@ -0,0 +1,316 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /usr/local/etc/mavenrc ] ; then + . /usr/local/etc/mavenrc + fi + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`\\unset -f command; \\command -v java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + if [ -n "$MVNW_REPOURL" ]; then + jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" + else + jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" + fi + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + if $cygwin; then + wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` + fi + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" + else + wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" + fi + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl -o "$wrapperJarPath" "$jarUrl" -f + else + curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f + fi + + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaClass=`cygpath --path --windows "$javaClass"` + fi + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + $MAVEN_DEBUG_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" \ + "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/mvnw.cmd b/mvnw.cmd new file mode 100644 index 0000000..1d8ab01 --- /dev/null +++ b/mvnw.cmd @@ -0,0 +1,188 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* +if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" + +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% ^ + %JVM_CONFIG_MAVEN_PROPS% ^ + %MAVEN_OPTS% ^ + %MAVEN_DEBUG_OPTS% ^ + -classpath %WRAPPER_JAR% ^ + "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ + %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" +if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%"=="on" pause + +if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% + +cmd /C exit /B %ERROR_CODE% diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..86bf613 --- /dev/null +++ b/pom.xml @@ -0,0 +1,154 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 3.0.2 + + + com + WMS + 1.0 + WMS + WMS + + 17 + + + + org.springframework.boot + spring-boot-starter-web + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + 3.0.0 + + + + com.mysql + mysql-connector-j + runtime + + + org.springframework.boot + spring-boot-starter-test + test + + + + org.springframework.boot + spring-boot-starter-validation + + + + + org.apache.commons + commons-lang3 + + + + + com.fasterxml.jackson.core + jackson-databind + + + + + com.alibaba + fastjson + 2.0.21 + + + + + org.apache.httpcomponents + httpclient + 4.5.13 + + + + + com.google.guava + guava + 31.1-jre + + + + com.github.pagehelper + pagehelper + 5.3.0 + + + com.github.jsqlparser + jsqlparser + 4.4 + + + + + org.apache.httpcomponents + httpmime + 4.5.14 + + + + org.apache.poi + poi-ooxml + 5.2.3 + + + org.apache.poi + poi + 5.2.3 + + + org.projectlombok + lombok + + + + + org.apache.oltu.oauth2 + org.apache.oltu.oauth2.client + 1.0.1 + + + + com.auth0 + java-jwt + 4.4.0 + + + + io.springfox + springfox-swagger2 + 2.9.2 + + + io.springfox + springfox-swagger-ui + 2.9.2 + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + + 16 + 16 + + + + + + diff --git a/src/main/java/META-INF/MANIFEST.MF b/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 0000000..6382671 --- /dev/null +++ b/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: com.wuxiShenNan_W8.WmsTestversionApplication + diff --git a/src/main/java/com/wms/WmsApplication.java b/src/main/java/com/wms/WmsApplication.java new file mode 100644 index 0000000..dbf14ac --- /dev/null +++ b/src/main/java/com/wms/WmsApplication.java @@ -0,0 +1,24 @@ +package com.wms; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +@SpringBootApplication +@EnableScheduling +@EnableTransactionManagement +@MapperScan("com.wms.mapper") +public class WmsApplication { + + /** + * 主函数,程序的入口 + * + * @param args 命令行参数,以字符串数组形式传入 + */ + public static void main(String[] args) { + SpringApplication.run(WmsApplication.class, args); + } + +} diff --git a/src/main/java/com/wms/config/InitLocalConfig.java b/src/main/java/com/wms/config/InitLocalConfig.java new file mode 100644 index 0000000..d9d7758 --- /dev/null +++ b/src/main/java/com/wms/config/InitLocalConfig.java @@ -0,0 +1,22 @@ +package com.wms.config; + +import lombok.RequiredArgsConstructor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.ApplicationArguments; +import org.springframework.boot.ApplicationRunner; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; + +@Component +@Order(1) +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class InitLocalConfig implements ApplicationRunner { + protected final Logger logger = LoggerFactory.getLogger(this.getClass()); + @Override + public void run(ApplicationArguments args) throws Exception { + logger.info("加载设置到内存中..."); + logger.info("加载配置到内存中..."); + } +} diff --git a/src/main/java/com/wms/config/PageHelperConfig.java b/src/main/java/com/wms/config/PageHelperConfig.java new file mode 100644 index 0000000..b908a7a --- /dev/null +++ b/src/main/java/com/wms/config/PageHelperConfig.java @@ -0,0 +1,23 @@ +package com.wms.config; + +import com.github.pagehelper.PageHelper; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import java.util.Properties; + +@Configuration +public class PageHelperConfig { + @Bean + public PageHelper pageHelper() { + PageHelper pageHelper = new PageHelper(); + //添加配置,也可以指定文件路径 + Properties p = new Properties(); + p.setProperty("helperDialect", "mysql"); + p.setProperty("reasonable", "true"); + p.setProperty("supportMethodsArguments", "true"); + p.setProperty("params", "count=countSql"); + pageHelper.setProperties(p); + return pageHelper; + } +} diff --git a/src/main/java/com/wms/constants/WmsConstants.java b/src/main/java/com/wms/constants/WmsConstants.java new file mode 100644 index 0000000..e3170e8 --- /dev/null +++ b/src/main/java/com/wms/constants/WmsConstants.java @@ -0,0 +1,61 @@ +package com.wms.constants; + +import java.math.BigDecimal; +import java.util.Map; + +import com.google.common.collect.ImmutableMap; +import com.wms.constants.enums.WcsTaskStatus; +import com.wms.constants.enums.WmsTaskStatus; + +/** + * WMS系统所需的常量 + * @author 梁州 + * @date 2023/2/13 + */ +public class WmsConstants { + + public static String EMPTY_STRING = ""; + + public static BigDecimal NUMBER_ONE = BigDecimal.valueOf(1); + + public static String ROOT_MENU_ID = "0"; + + + /** + * 虚拟库位设备号 + */ + public static Integer VIRTUAL_LOCATION_EQUIP_ID = 11; + + /** + * 入库库位类型:虚拟库位 + */ + public static String VIRTUAL_LOCATION_IN = "0"; + + /** + * 虚拟库位库区编码 + */ + public static int VIRTUAL_LOCATION_AREA_ID = 99; + + /** + * 空托盘编号 + */ + public static String EMPTY_STOCK_GOODS_ID = "000000000"; + /** + * 空托盘批次号 + */ + public static String EMPTY_STOCK_BATCH_NO = "EMPTY"; + + /** + * 设备号对应入库口 + */ + public static Map LOCATOR_AREA_MAP = ImmutableMap.builder() + .put(WcsTaskStatus.WAIT.getCode(), WmsTaskStatus.WAIT.getCode()) + .put(WcsTaskStatus.RUN.getCode(), WmsTaskStatus.RUN.getCode()) + .put(WcsTaskStatus.LEAVE.getCode(), WmsTaskStatus.RUN.getCode()) + .put(WcsTaskStatus.PARK.getCode(), WmsTaskStatus.RUN.getCode()) + .put(WcsTaskStatus.ARRIVE.getCode(), WmsTaskStatus.RUN.getCode()) + .put(WcsTaskStatus.FINISH.getCode(), WmsTaskStatus.FINISH.getCode()) + .put(WcsTaskStatus.CANCEL.getCode(), WmsTaskStatus.CANCEL.getCode()) + .put(WcsTaskStatus.EXCEPTION.getCode(), WmsTaskStatus.EXCEPTION.getCode()) + .build(); +} diff --git a/src/main/java/com/wms/constants/enums/GoodsStatus.java b/src/main/java/com/wms/constants/enums/GoodsStatus.java new file mode 100644 index 0000000..e132ec1 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/GoodsStatus.java @@ -0,0 +1,29 @@ +package com.wms.constants.enums; + +/** + * 物料状态枚举 + */ +public enum GoodsStatus { + OK(0, "合格"), + BAD(1, "不合格"), + DELAY(2, "延期"), + OVERDUE(3, "过期"), + SCRAP(5, "长时间未使用"); + + private final Integer code; + + private final String value; + + GoodsStatus(Integer code, String value) { + this.code = code; + this.value = value; + } + + public Integer getCode() { + return code; + } + + public String getValue() { + return value; + } +} diff --git a/src/main/java/com/wms/constants/enums/KateTaskStatus.java b/src/main/java/com/wms/constants/enums/KateTaskStatus.java new file mode 100644 index 0000000..9bc5846 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/KateTaskStatus.java @@ -0,0 +1,25 @@ +package com.wms.constants.enums; + +public enum KateTaskStatus { + NEW(0, "待下发"), + WAIT(1, "已下发"), + RUN(2, "执行中"), + PICKING(3, "正在拣货"), + FINISH(5, "任务完成"); + + private final Integer code; + private final String name; + + KateTaskStatus(Integer code, String name) { + this.code = code; + this.name = name; + } + + public Integer getCode() { + return code; + } + + public String getName() { + return name; + } +} diff --git a/src/main/java/com/wms/constants/enums/LocationStatus.java b/src/main/java/com/wms/constants/enums/LocationStatus.java new file mode 100644 index 0000000..e034378 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/LocationStatus.java @@ -0,0 +1,27 @@ +package com.wms.constants.enums; + +/** + * 库位状态枚举 + * /// 托盘状态和站台状态通用 + */ +public enum LocationStatus { + EMPTY(0, "空闲"), + OCCUPY(1, "占用"); + + private final Integer code; + + private final String value; + + LocationStatus(Integer code, String value) { + this.code = code; + this.value = value; + } + + public Integer getCode() { + return code; + } + + public String getValue() { + return value; + } +} diff --git a/src/main/java/com/wms/constants/enums/ResponseCode.java b/src/main/java/com/wms/constants/enums/ResponseCode.java new file mode 100644 index 0000000..92fc841 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/ResponseCode.java @@ -0,0 +1,27 @@ +package com.wms.constants.enums; + +/** + * 接口响应码枚举 + */ +public enum ResponseCode { + OK(0, "正常"), + WARNING(200, "警告"), + ERROR(999, "异常"); + + private final Integer code; + + private final String value; + + ResponseCode(Integer code, String value) { + this.code = code; + this.value = value; + } + + public Integer getCode() { + return code; + } + + public String getValue() { + return value; + } +} diff --git a/src/main/java/com/wms/constants/enums/StockStatus.java b/src/main/java/com/wms/constants/enums/StockStatus.java new file mode 100644 index 0000000..7fe6626 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/StockStatus.java @@ -0,0 +1,32 @@ +package com.wms.constants.enums; + +/** + * 库存状态枚举 + */ +public enum StockStatus { + OK(0, "库存正常"), + OUT(1, "准备出库"), + MOVING(2, "正在出库"), + TRANS(3, "出库完成"), + PICKING(4, "站台拣货中"), + INVENTORY_OUT(5, "站台盘点中"), + BACKING(6, "正在回库"), + LOCK(9, "库存锁定"); + + private final Integer code; + + private final String value; + + StockStatus(Integer code, String value) { + this.code = code; + this.value = value; + } + + public Integer getCode() { + return code; + } + + public String getValue() { + return value; + } +} diff --git a/src/main/java/com/wms/constants/enums/TaskType.java b/src/main/java/com/wms/constants/enums/TaskType.java new file mode 100644 index 0000000..f607857 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/TaskType.java @@ -0,0 +1,27 @@ +package com.wms.constants.enums; + +/** + * 任务类型枚举 + */ +public enum TaskType { + IN(1, "入库"), + OUT(2, "出库"), + INVENTORY(3, "盘点"); + + private final Integer code; + + private final String value; + + TaskType(Integer code, String value) { + this.code = code; + this.value = value; + } + + public Integer getCode() { + return code; + } + + public String getValue() { + return value; + } +} diff --git a/src/main/java/com/wms/constants/enums/UrlEnums.java b/src/main/java/com/wms/constants/enums/UrlEnums.java new file mode 100644 index 0000000..afb344a --- /dev/null +++ b/src/main/java/com/wms/constants/enums/UrlEnums.java @@ -0,0 +1,22 @@ +package com.wms.constants.enums; + +public enum UrlEnums { + URL_WMS_TO_WCS_SEND_TASK("WMS向WCS发送任务", "http://192.168.103.202:18990/api/Wms/WmsTask/SetStackerTask"), + URL_WMS_TO_WCS_CHANGE_TASK("WMS请求变更任务状态", "http://192.168.103.202:18990/api/Wms/WmsTask/ChangeTaskStatus"); + + private final String description; + private final String value; + + UrlEnums(String description, String value) { + this.description = description; + this.value = value; + } + + public String getDescription() { + return description; + } + + public String getValue() { + return value; + } +} diff --git a/src/main/java/com/wms/constants/enums/VehicleStatus.java b/src/main/java/com/wms/constants/enums/VehicleStatus.java new file mode 100644 index 0000000..7a17731 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/VehicleStatus.java @@ -0,0 +1,27 @@ +package com.wms.constants.enums; + +/** + * 载具状态 + */ +public enum VehicleStatus { + IN(1, "入库中"), + ON(2, "在库中"), + OUT(3, "出库中"); + + private final Integer code; + + private final String value; + + VehicleStatus(Integer code, String value) { + this.code = code; + this.value = value; + } + + public Integer getCode() { + return code; + } + + public String getValue() { + return value; + } +} diff --git a/src/main/java/com/wms/constants/enums/WcsTaskStatus.java b/src/main/java/com/wms/constants/enums/WcsTaskStatus.java new file mode 100644 index 0000000..5c15ec7 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/WcsTaskStatus.java @@ -0,0 +1,31 @@ +package com.wms.constants.enums; + +/** + * Wcs任务状态的枚举 + */ +public enum WcsTaskStatus { + WAIT(1, "任务排队中"), + RUN(2, "任务开始执行"), + LEAVE(3, "任务已经离开初始位置"), + PARK(4, "任务到达中间点"), + ARRIVE(5, "任务到达目的地"), + FINISH(100, "任务完成"), + CANCEL(998, "任务取消"), + EXCEPTION(999, "任务异常"); + + private final Integer code; + private final String name; + + WcsTaskStatus(Integer code, String name) { + this.code = code; + this.name = name; + } + + public Integer getCode() { + return code; + } + + public String getName() { + return name; + } +} diff --git a/src/main/java/com/wms/constants/enums/WmsTaskStatus.java b/src/main/java/com/wms/constants/enums/WmsTaskStatus.java new file mode 100644 index 0000000..1e24d71 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/WmsTaskStatus.java @@ -0,0 +1,35 @@ +package com.wms.constants.enums; + +/** + * Wms任务状态的枚举 + */ +public enum WmsTaskStatus { + NEW(0, "任务新建,待下发"), + WAIT(1, "任务已下发"), + RUN(2, "任务开始执行"), + OUT_SUCCESS(3, "出库完成"), + TRANS_MOVE(4, "输送线转运中"), + ARRIVE_STAND(5, "到达拣选站台"), + PICKING(6, "正在拣货"), + BACKING(7, "正在回库"), + INVENTORY(8, "盘点中"), + FINISH(100, "任务完成"), + CANCEL(998, "任务取消"), + EXCEPTION(999, "任务异常"); + + private final Integer code; + private final String name; + + WmsTaskStatus(Integer code, String name) { + this.code = code; + this.name = name; + } + + public Integer getCode() { + return code; + } + + public String getName() { + return name; + } +} diff --git a/src/main/java/com/wms/controller/BaseController.java b/src/main/java/com/wms/controller/BaseController.java new file mode 100644 index 0000000..bfb1271 --- /dev/null +++ b/src/main/java/com/wms/controller/BaseController.java @@ -0,0 +1,8 @@ +package com.wms.controller; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class BaseController { + protected final Logger logger = LoggerFactory.getLogger(this.getClass()); +} diff --git a/src/main/java/com/wms/controller/ConfigController.java b/src/main/java/com/wms/controller/ConfigController.java new file mode 100644 index 0000000..fd87336 --- /dev/null +++ b/src/main/java/com/wms/controller/ConfigController.java @@ -0,0 +1,87 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.wms.constants.enums.ResponseCode; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.page.PageDomain; +import com.wms.entity.page.TableRequest; +import com.wms.entity.page.TableResponse; +import com.wms.entity.table.Config; +import com.wms.service.ConfigService; +import com.wms.utils.HttpUtils; +import com.wms.utils.StringUtils; +import jakarta.servlet.http.HttpServletRequest; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import org.springframework.web.bind.annotation.*; + +import java.util.Arrays; +import java.util.List; + +/** + * WMS系统配置控制类 + * @author 梁州 + * @date 2023/3/23 + */ +@Controller +@CrossOrigin +@RequestMapping(value = "/wms/config") +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class ConfigController extends BaseController{ + /** + * 系统配置服务 + */ + private final ConfigService configService; + /** + * 请求头部信息 + */ + private final HttpServletRequest servletRequest; + + /** + * 查找所有配置 + * @return 配置 + */ + @GetMapping("/getConfigs") + @ResponseBody + public List getConfigs(){ + logger.info("查询系统配置"); + return configService.selectConfigs(""); + } + + /** + * 更新系统配置 + * + * @param config 配置 + * @return 结果 + */ + @PostMapping("/updateConfig") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String updateConfig(@RequestBody Config config) { + logger.info("更新系统配置,{}:{}", config.getConfigName(), config.getConfigValue()); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + configService.updateConfig(config); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("更新系统配置错误:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("更新系统配置成功!"); + return JSON.toJSONString(rsp); + } +} diff --git a/src/main/java/com/wms/controller/DisplayController.java b/src/main/java/com/wms/controller/DisplayController.java new file mode 100644 index 0000000..7b242b3 --- /dev/null +++ b/src/main/java/com/wms/controller/DisplayController.java @@ -0,0 +1,104 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.wms.constants.WmsConstants; +import com.wms.constants.enums.ResponseCode; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.app.display.LocationData; +import com.wms.entity.app.display.LocationInfo; +import com.wms.entity.table.Location; +import com.wms.entity.table.Stock; +import com.wms.service.LocationService; +import com.wms.service.StockService; +import com.wms.utils.HttpUtils; +import com.wms.utils.StringUtils; +import jakarta.servlet.http.HttpServletRequest; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import java.util.LinkedList; +import java.util.List; + +@Controller +@CrossOrigin +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +@RequestMapping(value = "/api/query") +public class DisplayController extends BaseController{ + private final StockService stockService; + private final LocationService locationService; + private final HttpServletRequest servletRequest; + + /** + * 大屏查询库位信息 + * @param location 参数---库位 + * @return 结果 + */ + @GetMapping("/queryLocationInfo") + @ResponseBody + public String queryLocationInfo(@RequestParam String location) { + logger.info("接收到查询大屏库位信息请求,ip地址:{},参数:{}", HttpUtils.getIpAddr(servletRequest), location); + ResponseEntity response = new ResponseEntity(); + if (StringUtils.isEmpty(location)) { + logger.error("查询失败,参数中库位号为空"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("查询失败,参数中库位号为空"); + return JSON.toJSONString(response); + } + Location locationQuery = new Location(); + locationQuery.setLocationId(location); + List locations = locationService.selLocations(locationQuery); + if (locations.size() == 0) { + logger.error("查询失败,该库位立体库中不存在"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("查询失败,请检查库位号正确性"); + return JSON.toJSONString(response); + } + Location currentLocation = locations.get(0); + String vehicleNo = currentLocation.getVehicleId(); + if (StringUtils.isEmpty(vehicleNo)) { + // 设定 + LocationInfo returnData = new LocationInfo(); + returnData.setLocationId(location); + returnData.setVehicleNo(WmsConstants.EMPTY_STRING); + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("查询成功"); + response.setReturnData(returnData); + return JSON.toJSONString(response); + } + // 查询库存 + Stock stockQuery = new Stock(); + stockQuery.setLocationId(location); + stockQuery.setVehicleId(vehicleNo); + List stocks = stockService.selStocks(stockQuery); + List locationData = new LinkedList<>(); + for (Stock tempStock : stocks) { + LocationData tempData = new LocationData(); + tempData.setGoodsId(tempStock.getGoodsId()); + tempData.setGoodsName(tempStock.getGoodsName()); + tempData.setGoodsNum(tempStock.getRealNum()); + locationData.add(tempData); + } + // 设定 + LocationInfo returnData = new LocationInfo(); + returnData.setLocationId(location); + returnData.setVehicleNo(WmsConstants.EMPTY_STRING); + returnData.setLocationData(locationData); + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("查询成功"); + response.setReturnData(returnData); + return JSON.toJSONString(response); + } + + /** + * 查询所有库位 + * @return 结果 + */ + @GetMapping("/getAllLocations") + @ResponseBody + public String queryLocationInfo() { + logger.info("接收到查询大屏所有库位信息请求,ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + return JSON.toJSONString(locationService.selLocations(new Location())); + } +} diff --git a/src/main/java/com/wms/controller/ExcelController.java b/src/main/java/com/wms/controller/ExcelController.java new file mode 100644 index 0000000..8ae11ff --- /dev/null +++ b/src/main/java/com/wms/controller/ExcelController.java @@ -0,0 +1,110 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.wms.constants.enums.KateTaskStatus; +import com.wms.constants.enums.ResponseCode; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.table.*; +import com.wms.service.*; +import com.wms.utils.HttpUtils; +import com.wms.utils.StringUtils; +import com.wms.utils.WmsUtils; +import com.wms.utils.excel.ExcelUtils; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.*; + +/** + * + */ +@Controller +@CrossOrigin +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +@RequestMapping(value = "/wms/excel") +public class ExcelController extends BaseController { + private final StockService stockService;// 库存服务 + private final PartInfoService partInfoService;// 零件服务 + private final HttpServletRequest servletRequest;// 请求服务 + private final TaskRecordService taskRecordService;// 任务记录服务 + + /** + * 导入零件信息 + * + * @param file 文件 + * @return 导入结果 + */ + @PostMapping("/uploadPartInfos") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String uploadPartInfos(@RequestPart("file") MultipartFile file) { + logger.info("接收到导入零件信息请求,ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + ResponseEntity response = new ResponseEntity(); + try { + List files = ExcelUtils.readMultipartFile(file, PartInfo.class); + // 添加进物料表 + for (PartInfo pageInfo : files) { + if (partInfoService.selPartByPartNo(pageInfo.getMaterial()) != null) {// 当前零件号的数据已经存在过 + partInfoService.modifyPart(pageInfo); + } else {// 新零件 + partInfoService.addPart(pageInfo); + } + } + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("导入excel成功"); + response.setReturnData(files); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage(e.getMessage()); + } + return JSON.toJSONString(response); + } + + /** + * 导出库存数据 + * + * @param response 请求 + */ + @GetMapping("/downloadStockExcel") + @ResponseBody + public void downloadStockExcel(HttpServletResponse response) { + List stocks = stockService.selStocks(new Stock()); + ExcelUtils.export(response, "库存报表", stocks, Stock.class); + } + + /** + * 导出入库记录 + * + * @param response 请求 + */ + @GetMapping("/downloadRukuExcel") + @ResponseBody + public void downloadRukuExcel(HttpServletResponse response) { + List ruku = taskRecordService.selTasks(new Task()); + ExcelUtils.export(response, "入库记录报表", ruku, Task.class); + } + + /** + * 导出物料信息 + * + * @param response 请求 + */ + @GetMapping("/downloadMaterialExcel") + @ResponseBody + public void downloadMaterialExcel(HttpServletResponse response) { + List Material = partInfoService.selParts(new PartInfo()); + ExcelUtils.export(response, "物料信息", Material, PartInfo.class); + } + +} \ No newline at end of file diff --git a/src/main/java/com/wms/controller/GoodsController.java b/src/main/java/com/wms/controller/GoodsController.java new file mode 100644 index 0000000..5ed9315 --- /dev/null +++ b/src/main/java/com/wms/controller/GoodsController.java @@ -0,0 +1,274 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.wms.constants.enums.ResponseCode; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.page.PageDomain; +import com.wms.entity.page.TableRequest; +import com.wms.entity.page.TableResponse; +import com.wms.entity.table.Goods; +import com.wms.entity.table.PartInfo; +import com.wms.service.GoodsService; +import com.wms.service.PartInfoService; +import com.wms.utils.HttpUtils; +import com.wms.utils.StringUtils; +import jakarta.servlet.http.HttpServletRequest; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * WMS物料控制类 + * @author 梁州 + * @date 2023/3/9 + */ +@Controller +@CrossOrigin +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +@RequestMapping(value = "/wms/goods") +public class GoodsController extends BaseController{ + + /** + * 物料服务 + */ + private final GoodsService goodsService; + /** + * 零件服务 + */ + private final PartInfoService partInfoService; + /** + * 请求头部信息 + */ + private final HttpServletRequest servletRequest; + + /** + * 查找所有零件信息 + */ + @PostMapping("/getPartInfo") + @ResponseBody + public String getPartInfo(@RequestBody TableRequest tableRequest){ + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到查询零件数据请求:{}", JSON.toJSONString(tableRequest)); + TableResponse tblResp = new TableResponse(); + // 解析请求数据 + if (tableRequest == null || tableRequest.getPage() == null) { + tblResp.setCode(ResponseCode.ERROR.getCode()); + tblResp.setMessage("请求数据为空,无法处理!"); + logger.error("请求数据为空,无法处理!"); + return JSON.toJSONString(tblResp); + } + // 处理分页信息 + PageDomain pageRequest = tableRequest.getPage(); +// String[] orderByArr = {"location_id", "vehicle_id", "goods_id", "batch_no", "remain_num", "expiration_date", "create_time"}; + String orderByStr = "material asc"; + +// if (StringUtils.isNotEmpty(pageRequest.getOrderByColumn()) && Arrays.asList(orderByArr).contains(StringUtils.toUnderScoreCase(pageRequest.getOrderByColumn()))) { +// orderByStr = pageRequest.getOrderBy(); +// } else { +// // 默认排序 +// orderByStr = "expiration_date desc"; +// } + + PageHelper.startPage(pageRequest.getPageNum(), pageRequest.getPageSize(), orderByStr); + List parts = partInfoService.selParts(tableRequest.getParam()); + PageInfo partPageInfo = new PageInfo<>(parts); + tblResp.setCode(ResponseCode.OK.getCode()); + tblResp.setMessage("查询零件信息成功!"); + tblResp.setRows(partPageInfo.getList()); + tblResp.setTotal(partPageInfo.getTotal()); + return JSON.toJSONString(tblResp); + } + + /** + * 更新零件信息 + * + * @param partInfo 零件信息 + * @return 结果 + */ + @PostMapping("/updatePartInfo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String updatePartInfo(@RequestBody PartInfo partInfo) { + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到更新零件信息请求:{}", JSON.toJSONString(partInfo)); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + if (StringUtils.isEmpty(partInfo.getMaterial())) {// 箱号为空,不执行 + logger.error("请求零件号为空"); + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请求零件号为空"); + return JSON.toJSONString(rsp); + } + partInfoService.modifyPart(partInfo); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("发生异常:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("更新零件信息成功"); + return JSON.toJSONString(rsp); + } + + /** + * 更新物料信息 + * + * @param goods 物料 + * @return 结果 + */ + @PostMapping("/updateGoodsInfo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String updateGoodsInfo(@RequestBody Goods goods) { + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + goodsService.modifyGoods(goods); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("更新物料信息发生错误:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + logger.info("更新物料信息成功:{}", goods.toLoggerString()); + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("更新物料信息成功"); + return JSON.toJSONString(rsp); + } + + @PostMapping("/queryPartInfoByPartNo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String queryPartInfoByPartNo(@RequestBody PartInfo partInfo) { + logger.info("前台查询零件数据"); + ResponseEntity rsp = new ResponseEntity(); + if (partInfo == null || StringUtils.isEmpty(partInfo.getMaterial())) { + logger.info("请求查询的参数为空"); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请求查询的参数为空"); + return JSON.toJSONString(rsp); + } + try { + PartInfo partInfoNeed = partInfoService.selPartByPartNo(partInfo.getMaterial()); + if (partInfoNeed == null) { + logger.info("查询零件信息发生错误,零件号:{}", partInfo.getMaterial()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("查询的零件信息为空"); + return JSON.toJSONString(rsp); + } + rsp.setReturnData(partInfoNeed); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("查询零件信息发生错误:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + logger.info("查询零件信息成功"); + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("查询零件信息成功"); + return JSON.toJSONString(rsp); + } + + @PostMapping("/queryPartNo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String queryPartNo(@RequestBody PartInfo partInfo) { + logger.info("前台查询零件数据"); + ResponseEntity rsp = new ResponseEntity(); + if (partInfo == null || StringUtils.isEmpty(partInfo.getMaterial())) { + logger.info("请求查询的参数为空"); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请求查询的参数为空"); + return JSON.toJSONString(rsp); + } + try { + PartInfo query = new PartInfo(); + query.setMaterial(partInfo.getMaterial()); + List partInfoNeed = partInfoService.selParts(query); + if (partInfoNeed.size() == 0) { + logger.info("查询零件信息发生错误,零件号:{}", partInfo.getMaterial()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("查询的零件信息为空"); + return JSON.toJSONString(rsp); + } + rsp.setReturnData(partInfoNeed); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("查询零件信息发生错误:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + logger.info("查询零件信息成功"); + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("查询零件信息成功"); + return JSON.toJSONString(rsp); + } + + /** + * 删除当前零件信息 + * + * @param partInfo 零件 + * @return 结果 + */ + @PostMapping("/deletePartInfo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String deleteVehicle(@RequestBody PartInfo partInfo) { + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到更新料箱信息请求:{}", JSON.toJSONString(partInfo)); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + if (StringUtils.isEmpty(partInfo.getMaterial())) {// 零件号为空,不做处理 + logger.error("请求删除的零件号为空"); + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请求删除的零件号为空"); + return JSON.toJSONString(rsp); + } + partInfoService.deletePartByPartNo(partInfo.getMaterial()); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("发生异常:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("删除零件信息成功"); + return JSON.toJSONString(rsp); + } +} diff --git a/src/main/java/com/wms/controller/JobComponent.java b/src/main/java/com/wms/controller/JobComponent.java new file mode 100644 index 0000000..6961a9c --- /dev/null +++ b/src/main/java/com/wms/controller/JobComponent.java @@ -0,0 +1,170 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.wms.constants.enums.*; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.app.wcs.WcsTask; +import com.wms.entity.table.*; +import com.wms.constants.WmsConstants; +import com.wms.service.*; +import com.wms.utils.HttpUtils; +import com.wms.utils.WmsUtils; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; +import springfox.documentation.spring.web.json.Json; + +import java.util.*; + +/** + * 定期任务类 + */ +@Component +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class JobComponent extends BaseController { + /** + * 任务服务 + */ + private final TaskService taskService; + /** + * 载具/料箱 服务 + */ + private final VehicleService vehicleService; + /** + * 库位服务 + */ + private final LocationService locationService; + /** + * 站台服务 + */ + private final StandService standService; + /** + * 配置服务 + */ + private final ConfigService configService; + /** + * 库存服务 + */ + private final StockService stockService; + private final TaskRecordService taskRecordService; + + /** + * 每隔一秒检索一遍任务列表,同时向WCS下发任务 + */ + @Scheduled(fixedDelay = 1000) + public void executeTasks() { + try { + // 检索任务列表,查询状态为等待状态的任务 + Task taskForQuery = new Task(); + taskForQuery.setTaskStatus(WmsTaskStatus.NEW.getCode()); + List tasks = taskService.selTasks(taskForQuery); + // 相同任务组的任务只发一次 + List taskGroupIds = new LinkedList<>(); + List request = new ArrayList<>(); + if (tasks.size() > 0) {// 存在等待中的任务 + for (Task task : tasks) { + if (taskGroupIds.contains(task.getTaskGroup())) {// 该taskGroup的任务已经发送过 + task.setTaskStatus(WmsTaskStatus.WAIT.getCode()); + continue; + } + // 创建发送的任务 + WcsTask tempTask = new WcsTask(); + tempTask.setTaskId(task.getTaskGroup()); + if (TaskType.OUT.getCode().equals(task.getTaskType()) || TaskType.INVENTORY.getCode().equals(task.getTaskType())) { + tempTask.setTaskType(TaskType.OUT.getCode()); + } else { + tempTask.setTaskType(TaskType.IN.getCode()); + } + tempTask.setOrigin(task.getOrigin()); + tempTask.setDestination(task.getDestination()); + tempTask.setVehicleNo(task.getVehicleNo()); + tempTask.setVehicleSize(1); + tempTask.setWeight(task.getWeight() == null ? 0 : task.getWeight()); + tempTask.setPriority(task.getTaskPriority()); + request.add(tempTask); + + taskGroupIds.add(task.getTaskGroup()); + task.setTaskStatus(WmsTaskStatus.WAIT.getCode()); + } + if (request.size() == 0) { + return; + } + // 发送任务 + ResponseEntity result = JSON.parseObject(HttpUtils.sendHttpPostWithoutToken(UrlEnums.URL_WMS_TO_WCS_SEND_TASK.getValue(), JSON.toJSONString(request)), ResponseEntity.class); + if (result != null && Objects.equals(ResponseCode.OK.getCode(), result.getCode())) { + // 更新任务列表 + for (Task task : tasks) { + // 更新任务 + taskService.executeTask(task); + } + } + } + } catch (Exception exception) { + logger.error("发生异常:{}", exception.getMessage()); + } + } + + /** + * 定期检查设备状态 + * 5秒钟 + */ +// @Scheduled(fixedDelay = 5000) + public void checkEquipmentStatus() { + + } + + /** + * 每天查询一次是否有过期的库存 + * 每天晚上8点执行一次 + */ +// @Scheduled(cron = "0 0 20 * * ?") + public void detectOutOfDateStock() { + logger.info("执行定时任务:查询过期库存"); + List outOfDateStocks = stockService.selStockOutOfDate(); + if (outOfDateStocks.size() > 0) { + logger.info("过期库存数量不为0,准备更新过期库存"); + for (Stock outOfDateStock : outOfDateStocks) { + try { + outOfDateStock.setGoodsStatus(GoodsStatus.OVERDUE.getCode()); + stockService.modifyStock(outOfDateStock); + logger.info("过期库存更新成功"); + } catch (Exception e) { + logger.error("过期库存更新异常:{}", e.getMessage()); + } + } + } + } + + /** + * 每天查询一次是否有入库后长期未使用的库存 + * 每天晚上9点执行一次 + */ +// @Scheduled(cron = "0 0 21 * * ?") + public void detectStockLongTimeNoUse() { + logger.info("执行定时任务:查询是否有入库后长期未使用的库存"); + List stocksLongTimeNoUse = stockService.selStockLongTimeNoUse(7); + if (stocksLongTimeNoUse.size() > 0) { + logger.info("有入库后长期未使用的库存, 准备更新库存状态"); + for (Stock stockLongTimeNoUse : stocksLongTimeNoUse) { + try { + stockLongTimeNoUse.setGoodsStatus(GoodsStatus.SCRAP.getCode()); + stockService.modifyStock(stockLongTimeNoUse); + logger.info("长时间未使用库存状态更新成功"); + } catch (Exception e) { + logger.error("长时间未使用库存状态更新异常:{}", e.getMessage()); + } + } + } + } + + /** + * 每天查询一次是否有过期记录 + * 每天晚上10点执行一次 + */ + @Scheduled(cron = "0 0 22 * * ?") + public void deleteOutOfDateData() { + logger.info("执行定时任务:删除过期数据"); + taskRecordService.deleteTaskRecordRegularly(); + } +} \ No newline at end of file diff --git a/src/main/java/com/wms/controller/LocationController.java b/src/main/java/com/wms/controller/LocationController.java new file mode 100644 index 0000000..ae9269a --- /dev/null +++ b/src/main/java/com/wms/controller/LocationController.java @@ -0,0 +1,336 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.wms.constants.enums.ResponseCode; +import com.wms.constants.enums.VehicleStatus; +import com.wms.entity.app.LayerLocation; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.app.RowLocation; +import com.wms.entity.page.PageDomain; +import com.wms.entity.page.TableRequest; +import com.wms.entity.page.TableResponse; +import com.wms.entity.table.Location; +import com.wms.entity.table.Vehicle; +import com.wms.constants.WmsConstants; +import com.wms.constants.enums.LocationStatus; +import com.wms.service.LocationService; +import com.wms.service.VehicleService; +import com.wms.utils.HttpUtils; +import com.wms.utils.StringUtils; +import jakarta.servlet.http.HttpServletRequest; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import org.springframework.web.bind.annotation.*; + +import java.util.*; + +/** + * WMS库位控制类 + * + * @author 梁州 + * @date 2023/3/6 + */ +@Controller +@CrossOrigin +@RequestMapping(value = "/wms/location") +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class LocationController extends BaseController { + /** + * 库位服务 + */ + private final LocationService locationService; + /** + * 料箱服务 + */ + private final VehicleService vehicleService; + /** + * 请求头部信息 + */ + private final HttpServletRequest servletRequest; + + + /** + * 查询库位 + * + * @param location 查询参数 + * @return 结果 + */ + @PostMapping("/getLocations") + @ResponseBody + public String getLocations(@RequestBody Location location) { + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + // 查询出所有符合条件的库位 + List locations = locationService.selLocations(location); + if (locations.size() < 1) { + logger.error("查询库位发生错误:库位不存在"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("查询库位发生错误:库位不存在"); + return JSON.toJSONString(rsp); + } + List rowLocations = new LinkedList<>(); + // 查找到最大的排 + locations.sort(Comparator.comparing(Location::getQueue).reversed()); + int maxRow = locations.get(0).getQueue(); + // 按排查找库位 + for (int i = 0; i < maxRow; i++) { + int finalI = i; + List currentRowLocations = new ArrayList<>(locations.stream() + .filter(l -> l.getQueue().equals(finalI + 1)) + .toList()); + // 先查找每一层的库位 + List layerLocations = new LinkedList<>(); + // 找到这一排最大的层 + currentRowLocations.sort(Comparator.comparing(Location::getLayer).reversed()); + int maxLayer = currentRowLocations.get(0).getLayer(); + // 按照每一列查找库位 + for (int j = 0; j < maxLayer; j++) { + int finalJ = j; + List currentLayerLocations = currentRowLocations.stream() + .filter(l -> l.getLayer().equals(finalJ + 1)) + .toList(); + LayerLocation tempLayerLocation = new LayerLocation(); + tempLayerLocation.setLayer(finalJ + 1); + tempLayerLocation.setCurrentColLocations(currentLayerLocations); + layerLocations.add(tempLayerLocation); + } + RowLocation tempRowLocation = new RowLocation(); + tempRowLocation.setRow(finalI + 1); + tempRowLocation.setCurrentLayerLocations(layerLocations); + rowLocations.add(tempRowLocation); + } + logger.info("查询库位数据成功,库区:{}", location.getAreaId()); + // 设置最终数据 + rsp.setReturnData(rowLocations); + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("查询库位成功"); + return JSON.toJSONString(rsp); + } catch (Exception e) { + logger.info("查询库位发生错误:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + } + + /** + * 更新库位状态 + * + * @param location 库位 + * @return 结果 + */ + @PostMapping("/updateLocation") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String updateLocation(@RequestBody Location location) { + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + // TODO 这里要更新料箱信息 + if (StringUtils.isNotEmpty(location.getVehicleId())) {// 载具号不为空 + // 判断是不是需要往载具表里面添加数据 + if (vehicleService.selVehicleById(location.getVehicleId()) == null) { + // 添加新载具 + Vehicle newVehicle = new Vehicle(); + newVehicle.setVehicleId(location.getVehicleId()); + newVehicle.setVehicleStatus(VehicleStatus.ON.getCode()); + newVehicle.setCurrentLocation(location.getLocationId()); + newVehicle.setIsEmpty(1); + vehicleService.addVehicle(newVehicle); + } + } + locationService.modifyLocation(location); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("更新库位状态发生错误:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("更新库位状态成功"); + return JSON.toJSONString(rsp); + } + + /** + * 更新库位状态 + * + * @param location 库位 + * @return 结果 + */ + @PostMapping("/getAvailableLocations") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String getAvailableLocations(@RequestBody Location location) { + logger.info("查询空闲可用库位"); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + Location locationQuery = new Location(); + locationQuery.setAreaId(location.getAreaId()); + locationQuery.setLocationStatus(LocationStatus.EMPTY.getCode()); + locationQuery.setIsLock(0); + List availableLocations = locationService.selLocations(locationQuery); + rsp.setReturnData(availableLocations); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("查询可用库位错误:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("查询可用库位成功"); + return JSON.toJSONString(rsp); + } + + /** + * 查询料箱信息 + * @param tableRequest 请求 + * @return 结果 + */ + @PostMapping("/getVehicles") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String getVehicles(@RequestBody TableRequest tableRequest) { + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到查询料箱请求:{}", JSON.toJSONString(tableRequest)); + TableResponse tblResp = new TableResponse(); + // 解析请求数据 + if (tableRequest == null || tableRequest.getPage() == null) { + tblResp.setCode(ResponseCode.ERROR.getCode()); + tblResp.setMessage("请求数据为空,无法处理!"); + logger.error("请求数据为空,无法处理!"); + return JSON.toJSONString(tblResp); + } + // 处理分页信息 + PageDomain pageRequest = tableRequest.getPage(); +// String[] orderByArr = {"task_id", "task_type", "task_status", "goods_id", "goods_name", "task_priority", "expiration_date", "create_time"}; + String orderByStr = ""; + +// if (StringUtils.isNotEmpty(pageRequest.getOrderByColumn()) && Arrays.asList(orderByArr).contains(StringUtils.toUnderScoreCase(pageRequest.getOrderByColumn()))) { +// orderByStr = pageRequest.getOrderBy(); +// } else { +// // 默认排序 +// orderByStr = ""; +// } + + Vehicle vehicleQuery = new Vehicle(); + vehicleQuery.setVehicleId(tableRequest.getParam().getVehicleId()); + PageHelper.startPage(pageRequest.getPageNum(), pageRequest.getPageSize(), orderByStr); + List vehicles = vehicleService.selVehicles(vehicleQuery); + PageInfo vehiclePageInfo = new PageInfo<>(vehicles); + tblResp.setCode(ResponseCode.OK.getCode()); + tblResp.setMessage("查询料箱成功!"); + tblResp.setRows(vehiclePageInfo.getList()); + tblResp.setTotal(vehiclePageInfo.getTotal()); + return JSON.toJSONString(tblResp); + } + + /** + * 更新料箱信息 + * + * @param vehicle 料箱 + * @return 结果 + */ + @PostMapping("/updateVehicleInfo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String updateVehicleInfo(@RequestBody Vehicle vehicle) { + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到更新料箱信息请求:{}", JSON.toJSONString(vehicle)); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + if (StringUtils.isEmpty(vehicle.getVehicleId())) {// 箱号为空,不执行 + logger.error("请求箱号为空"); + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请求箱号为空"); + return JSON.toJSONString(rsp); + } + vehicleService.modifyVehicle(vehicle); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("发生异常:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("更新料箱信息成功"); + return JSON.toJSONString(rsp); + } + + /** + * 删除当前料箱信息 + * + * @param vehicle 料箱 + * @return 结果 + */ + @PostMapping("/deleteVehicle") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String deleteVehicle(@RequestBody Vehicle vehicle) { + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到更新料箱信息请求:{}", JSON.toJSONString(vehicle)); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + if (StringUtils.isEmpty(vehicle.getVehicleId())) {// 箱号为空,不执行 + logger.error("请求箱号为空"); + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请求箱号为空"); + return JSON.toJSONString(rsp); + } + // 判断当前料箱是不是空箱,带料不允许删除 + Vehicle currentVehicle = vehicleService.selVehicleById(vehicle.getVehicleId()); + if (currentVehicle != null && currentVehicle.getIsEmpty() != 1) {// 非空箱 + logger.error("非空箱不允许删除"); + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("非空箱不允许删除"); + return JSON.toJSONString(rsp); + } + // 将库中表中是当前载具的信息清空 + Location locationQuery = new Location(); + locationQuery.setVehicleId(vehicle.getVehicleId()); + List locations = locationService.selLocations(locationQuery); + for (Location location : locations) { + location.setVehicleId(WmsConstants.EMPTY_STRING); + locationService.modifyLocation(location); + } + vehicleService.deleteVehicle(vehicle); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("发生异常:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("删除料箱成功"); + return JSON.toJSONString(rsp); + } +} \ No newline at end of file diff --git a/src/main/java/com/wms/controller/RecordController.java b/src/main/java/com/wms/controller/RecordController.java new file mode 100644 index 0000000..3a431fc --- /dev/null +++ b/src/main/java/com/wms/controller/RecordController.java @@ -0,0 +1,90 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.wms.constants.enums.ResponseCode; +import com.wms.entity.page.PageDomain; +import com.wms.entity.page.TableRequest; +import com.wms.entity.page.TableResponse; +import com.wms.entity.table.Task; +import com.wms.service.TaskRecordService; +import com.wms.utils.HttpUtils; +import jakarta.servlet.http.HttpServletRequest; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * WMS记录控制类 + * + * @author 梁州 + * @date 2023/2/14 + */ +@Controller +@CrossOrigin +@RequestMapping(value = "/wms/record") +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class RecordController extends BaseController { + /** + * 任务记录服务 + */ + private final TaskRecordService taskRecordService; + /** + * 请求头部信息 + */ + private final HttpServletRequest servletRequest; + + /** + * 查询任务记录 + * + * @param tableRequest 请求 + * @return 结果 + */ + @PostMapping("/getTaskRecords") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String getVehicles(@RequestBody TableRequest tableRequest) { + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到查询任务记录请求:{}", JSON.toJSONString(tableRequest)); + TableResponse tblResp = new TableResponse(); + // 解析请求数据 + if (tableRequest == null || tableRequest.getPage() == null) { + tblResp.setCode(ResponseCode.ERROR.getCode()); + tblResp.setMessage("请求数据为空,无法处理!"); + logger.error("请求数据为空,无法处理!"); + return JSON.toJSONString(tblResp); + } + // 处理分页信息 + PageDomain pageRequest = tableRequest.getPage(); +// String[] orderByArr = {"task_id", "task_type", "task_status", "goods_id", "goods_name", "task_priority", "expiration_date", "create_time"}; + String orderByStr = ""; + +// if (StringUtils.isNotEmpty(pageRequest.getOrderByColumn()) && Arrays.asList(orderByArr).contains(StringUtils.toUnderScoreCase(pageRequest.getOrderByColumn()))) { +// orderByStr = pageRequest.getOrderBy(); +// } else { +// // 默认排序 +// orderByStr = ""; +// } + + Task taskRecordQuery = new Task(); + taskRecordQuery.setTaskType(tableRequest.getParam().getTaskType()); + taskRecordQuery.setGoodsId(tableRequest.getParam().getGoodsId()); + taskRecordQuery.setVehicleNo(tableRequest.getParam().getVehicleNo()); + PageHelper.startPage(pageRequest.getPageNum(), pageRequest.getPageSize(), orderByStr); + List records = taskRecordService.selTasks(taskRecordQuery); + PageInfo taskRecordPageInfo = new PageInfo<>(records); + tblResp.setCode(ResponseCode.OK.getCode()); + tblResp.setMessage("查询任务记录成功!"); + tblResp.setRows(taskRecordPageInfo.getList()); + tblResp.setTotal(taskRecordPageInfo.getTotal()); + return JSON.toJSONString(tblResp); + + } +} diff --git a/src/main/java/com/wms/controller/StandController.java b/src/main/java/com/wms/controller/StandController.java new file mode 100644 index 0000000..28d1455 --- /dev/null +++ b/src/main/java/com/wms/controller/StandController.java @@ -0,0 +1,133 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.alibaba.fastjson2.JSONObject; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.wms.constants.enums.ResponseCode; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.page.PageDomain; +import com.wms.entity.page.TableRequest; +import com.wms.entity.page.TableResponse; +import com.wms.entity.table.Stand; +import com.wms.service.StandService; +import com.wms.utils.HttpUtils; +import jakarta.servlet.http.HttpServletRequest; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 站台控制类 + */ +@Controller +@CrossOrigin +@RequestMapping(value = "/wms/stand") +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class StandController extends BaseController { + /** + * 站台服务 + */ + private final StandService standService; + /** + * 请求头部信息 + */ + private final HttpServletRequest servletRequest; + + /** + * 查询可用站台列表 + * @return 符合条件的站台列表 + */ + @PostMapping("/getAllStands") + @ResponseBody + public List getAllStands(@RequestBody JSONObject type){ + logger.info("查询站台{}", JSON.toJSONString(type)); + int type_int = type.getIntValue("type"); + Stand query = new Stand(); + if (type_int == 1) {// 入库站台 + query.setAllowIn(1); + } else if (type_int == 2) {// 出库站台 + query.setAllowOut(1); + } else if (type_int == 3) {// 盘点站台 + query.setAllowIn(1); + query.setAllowOut(1); + } + return standService.selStands(query); + } + + /** + * 更新站台状态 + * + * @param stand 站台 + * @return 结果 + */ + @PostMapping("/updateStandInfo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String updateStandInfo(@RequestBody Stand stand) { + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + standService.modifyStand(stand); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("更新站台信息发生错误:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + logger.info("更新站台信息成功:{}", stand.toLoggerString()); + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("更新站台信息成功"); + return JSON.toJSONString(rsp); + } + + /** + * 查找所有库存 + */ + @PostMapping("/getStands") + @ResponseBody + public String getStands(@RequestBody TableRequest tableRequest){ + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到查询库存请求:{}", JSON.toJSONString(tableRequest)); + TableResponse tblResp = new TableResponse(); + // 解析请求数据 + if (tableRequest == null || tableRequest.getPage() == null) { + tblResp.setCode(ResponseCode.ERROR.getCode()); + tblResp.setMessage("请求数据为空,无法处理!"); + logger.error("请求数据为空,无法处理!"); + return JSON.toJSONString(tblResp); + } + // 处理分页信息 + PageDomain pageRequest = tableRequest.getPage(); +// String[] orderByArr = {"location_id", "vehicle_id", "goods_id", "batch_no", "remain_num", "expiration_date", "create_time"}; + String orderByStr = ""; + +// if (StringUtils.isNotEmpty(pageRequest.getOrderByColumn()) && Arrays.asList(orderByArr).contains(StringUtils.toUnderScoreCase(pageRequest.getOrderByColumn()))) { +// orderByStr = pageRequest.getOrderBy(); +// } else { +// // 默认排序 +// orderByStr = "expiration_date desc"; +// } + + PageHelper.startPage(pageRequest.getPageNum(), pageRequest.getPageSize(), orderByStr); + List stands = standService.selStands(tableRequest.getParam()); + PageInfo standPageInfo = new PageInfo<>(stands); + tblResp.setCode(ResponseCode.OK.getCode()); + tblResp.setMessage("查询库存成功!"); + tblResp.setRows(standPageInfo.getList()); + tblResp.setTotal(standPageInfo.getTotal()); + logger.info("查询库存成功,总数:{},当前页:{},当前页数量:{}", standPageInfo.getTotal(), standPageInfo.getPageNum(), standPageInfo.getPageSize()); + return JSON.toJSONString(tblResp); + } +} diff --git a/src/main/java/com/wms/controller/StockController.java b/src/main/java/com/wms/controller/StockController.java new file mode 100644 index 0000000..53c9c48 --- /dev/null +++ b/src/main/java/com/wms/controller/StockController.java @@ -0,0 +1,202 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.wms.constants.enums.ResponseCode; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.page.PageDomain; +import com.wms.entity.page.TableRequest; +import com.wms.entity.page.TableResponse; +import com.wms.entity.table.Stock; +import com.wms.service.StockService; +import com.wms.utils.HttpUtils; +import com.wms.utils.StringUtils; +import com.wms.utils.WmsUtils; +import jakarta.servlet.http.HttpServletRequest; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import org.springframework.web.bind.annotation.*; + +import java.util.Arrays; +import java.util.List; + +/** + * WMS库存控制类 + * @author 梁州 + * @date 2023/2/14 + */ +@Controller +@CrossOrigin +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +@RequestMapping(value = "/wms/stock") +public class StockController extends BaseController { + /** + * 库存服务 + */ + private final StockService stockService; + + /** + * 请求头部信息 + */ + private final HttpServletRequest servletRequest; + + /** + * 查找所有库存 + */ + @PostMapping("/getAllStocks") + @ResponseBody + public String getAllStocks(@RequestBody TableRequest tableRequest){ + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到查询库存请求:{}", JSON.toJSONString(tableRequest)); + TableResponse tblResp = new TableResponse(); + // 解析请求数据 + if (tableRequest == null || tableRequest.getPage() == null) { + tblResp.setCode(ResponseCode.ERROR.getCode()); + tblResp.setMessage("请求数据为空,无法处理!"); + logger.error("请求数据为空,无法处理!"); + return JSON.toJSONString(tblResp); + } + // 处理分页信息 + PageDomain pageRequest = tableRequest.getPage(); + String[] orderByArr = {"location_id", "vehicle_id", "goods_id", "batch_no", "remain_num", "expiration_date", "create_time"}; + String orderByStr; + + if (StringUtils.isNotEmpty(pageRequest.getOrderByColumn()) && Arrays.asList(orderByArr).contains(StringUtils.toUnderScoreCase(pageRequest.getOrderByColumn()))) { + orderByStr = pageRequest.getOrderBy(); + } else { + // 默认排序 + orderByStr = "expiration_date desc"; + } + + PageHelper.startPage(pageRequest.getPageNum(), pageRequest.getPageSize(), orderByStr); + List stocks = stockService.selStocksFront(tableRequest.getParam()); + PageInfo stockPageInfo = new PageInfo<>(stocks); + tblResp.setCode(ResponseCode.OK.getCode()); + tblResp.setMessage("查询库存成功!"); + tblResp.setRows(stockPageInfo.getList()); + tblResp.setTotal(stockPageInfo.getTotal()); + logger.info("查询库存成功,总数:{},当前页:{},当前页数量:{}", stockPageInfo.getTotal(), stockPageInfo.getPageNum(), stockPageInfo.getPageSize()); + return JSON.toJSONString(tblResp); + } + + /** + * 查找所有库存---按物料汇总 + */ + @PostMapping("/getAllStocksByGoodsId") + @ResponseBody + public String getAllStocksByGoodsId(@RequestBody TableRequest tableRequest){ + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到查询库存请求:{}", JSON.toJSONString(tableRequest)); + TableResponse tblResp = new TableResponse(); + // 解析请求数据 + if (tableRequest == null || tableRequest.getPage() == null) { + tblResp.setCode(ResponseCode.ERROR.getCode()); + tblResp.setMessage("请求数据为空,无法处理!"); + logger.error("请求数据为空,无法处理!"); + return JSON.toJSONString(tblResp); + } + // 处理分页信息 + PageDomain pageRequest = tableRequest.getPage(); + String[] orderByArr = {"location_id", "vehicle_id", "goods_id", "batch_no", "remain_num", "expiration_date", "create_time"}; + String orderByStr; + + if (StringUtils.isNotEmpty(pageRequest.getOrderByColumn()) && Arrays.asList(orderByArr).contains(StringUtils.toUnderScoreCase(pageRequest.getOrderByColumn()))) { + orderByStr = pageRequest.getOrderBy(); + } else { + // 默认排序 + orderByStr = "goods_id desc"; + } + Stock stockQuery = new Stock(); + stockQuery.setGoodsId(tableRequest.getParam()); + PageHelper.startPage(pageRequest.getPageNum(), pageRequest.getPageSize(), orderByStr); + List stocks = stockService.selStocksByGoodsId(stockQuery); + PageInfo stockPageInfo = new PageInfo<>(stocks); + tblResp.setCode(ResponseCode.OK.getCode()); + tblResp.setMessage("查询库存成功!"); + tblResp.setRows(stockPageInfo.getList()); + tblResp.setTotal(stockPageInfo.getTotal()); + logger.info("查询库存成功,总数:{},当前页:{},当前页数量:{}", stockPageInfo.getTotal(), stockPageInfo.getPageNum(), stockPageInfo.getPageSize()); + return JSON.toJSONString(tblResp); + } + + /** + * 更新库存信息 + * + * @param stock 库存 + * @return 结果 + */ + @PostMapping("/updateStockInfo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String updateStockInfo(@RequestBody Stock stock) { + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到更新库存信息请求:{}", JSON.toJSONString(stock)); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + if (StringUtils.isEmpty(stock.getStockId())) {// 库存编号为空,不允许执行 + logger.error("请求的库存编号为空,不允许修改"); + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请求的库存编号为空,不允许修改"); + return JSON.toJSONString(rsp); + } + if (stock.getRealNum() == 0) { + stockService.deleteStock(stock.getStockId()); + } else { + stockService.modifyStock(stock); + } + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("发生异常:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("更新库存信息成功"); + return JSON.toJSONString(rsp); + } + + /** + * 新增库存 + * + * @param stock 库存 + * @return 结果 + */ + @PostMapping("/addNewStock") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String addNewStock(@RequestBody Stock stock) { + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到人工添加库存:{}", JSON.toJSONString(stock)); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + Stock tempStock = new Stock(); + tempStock.setStockId(WmsUtils.generateId("ST")); + + + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("发生异常:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("添加库存信息成功"); + return JSON.toJSONString(rsp); + } +} \ No newline at end of file diff --git a/src/main/java/com/wms/controller/TaskController.java b/src/main/java/com/wms/controller/TaskController.java new file mode 100644 index 0000000..d3af095 --- /dev/null +++ b/src/main/java/com/wms/controller/TaskController.java @@ -0,0 +1,1230 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.wms.constants.enums.*; +import com.wms.entity.app.*; +import com.wms.entity.app.wcs.*; +import com.wms.entity.page.PageDomain; +import com.wms.entity.page.TableRequest; +import com.wms.entity.page.TableResponse; +import com.wms.entity.table.*; +import com.wms.constants.WmsConstants; +import com.wms.service.*; +import com.wms.utils.HttpUtils; +import com.wms.utils.StringUtils; +import com.wms.utils.WmsUtils; +import jakarta.servlet.http.HttpServletRequest; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import org.springframework.web.bind.annotation.*; + +import java.util.*; + +/** + * WMS任务控制类 + * + * @author 梁州 + * @date 2023/2/14 + */ +@Controller +@CrossOrigin +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +@RequestMapping(value = "/wms/task") +public class TaskController extends BaseController { + /** + * 任务服务 + */ + private final TaskService taskService; + /** + * 库存服务 + */ + private final StockService stockService; + /** + * 零件 + */ + private final PartInfoService partInfoService; + /** + * 库位服务 + */ + private final LocationService locationService; + /** + * 任务记录服务 + */ + private final TaskRecordService taskRecordService; + /** + * 站台服务 + */ + private final StandService standService; + /** + * 载具服务 + */ + private final VehicleService vehicleService; + /** + * 请求头部信息 + */ + private final HttpServletRequest servletRequest; + + /** + * 创建入库任务(人工入库) + * + * @param taskInRequestEntityList 入库任务 + * @return 结果 + */ + @PostMapping("/sendGoodsInTask") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String receiveGoodsInTask(@RequestBody List taskInRequestEntityList) { + logger.info("接收到入库任务:{},ip地址:{}", JSON.toJSONString(taskInRequestEntityList), HttpUtils.getIpAddr(servletRequest)); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + // 根据ip获得站台信息 + List stands = standService.selStands(new Stand(2, HttpUtils.getIpAddr(servletRequest), 0)); + if (stands.size() < 1) {// 请求的地址不是站台电脑 + logger.error("请用站台电脑下发任务"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请用站台电脑下发任务"); + return JSON.toJSONString(rsp); + } + // 同一次请求为同一载具任务,为同一任务组 + String taskGroupId = WmsUtils.generateUUIDString(); + // 下一个库位 + Location nextLocation = new Location(); + // 当前载具 + String currentVehicleNo = taskInRequestEntityList.get(0).getVehicleNo(); + // 入库设备号 + int currentSelEquip = 0; + // 查询当前载具库存信息 + Vehicle vehicleQuery = new Vehicle(); + vehicleQuery.setVehicleId(currentVehicleNo); + List existVehicles = vehicleService.selVehicles(vehicleQuery); + if (existVehicles.size() > 0 && Objects.equals(existVehicles.get(0).getVehicleStatus(), VehicleStatus.ON.getCode())) { + logger.error("载具{}已经在库存中,请勿重复入库!", currentVehicleNo); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("该托盘已经在库存中,请勿重复入库!"); + return JSON.toJSONString(rsp); + } + Task taskQuery = new Task(); + taskQuery.setVehicleNo(currentVehicleNo); + List sameVehicleTasks = taskService.selTasks(taskQuery); + if (sameVehicleTasks.size() > 0) { + logger.error("载具{}存在其他任务,请勿重复入库!", currentVehicleNo); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("该载具存在其他任务,请勿重复入库!"); + return JSON.toJSONString(rsp); + } + if (existVehicles.size() > 0) { + nextLocation = locationService.selLocations(new Location(existVehicles.get(0).getCurrentLocation())).get(0); + } + for (TaskInRequestEntity taskInRequestEntity : taskInRequestEntityList) {// 循环生成入库任务 + // 生成任务 + Task task_new = new Task(); + // 保存必要的物料信息 + task_new.setTaskId(WmsUtils.generateId("RK")); + // 设置发送给WCS的任务信息 + task_new.setTaskType(TaskType.IN.getCode()); + task_new.setTaskStatus(WmsTaskStatus.NEW.getCode()); + task_new.setTaskGroup(taskGroupId); + // 查找库位时过滤掉不可用堆垛机 + Stand standQuery1 = new Stand(); + standQuery1.setStandType(3); + standQuery1.setIsLock(0); + standQuery1.setStandStatus(0); + List availableEquips = standService.selStands(standQuery1); + if (availableEquips.size() < 1) {// 没有可用堆垛机,请稍后重试 + logger.error("当前库无可用堆垛机,请稍后重试!"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("当前库无可用堆垛机,请稍后重试!"); + return JSON.toJSONString(rsp); + } + // 找到占用库位数量最少的堆垛机 + int occupyLocationsNum = 1000000; + for (Stand availableEquip : availableEquips) { + Location locationQuery1 = new Location(); + locationQuery1.setEquipmentId(availableEquip.getEquipmentId()); + locationQuery1.setLocationStatus(LocationStatus.OCCUPY.getCode()); + List locations1 = locationService.selLocations(locationQuery1); + if (locations1.size() < occupyLocationsNum) {// 当前最小 + occupyLocationsNum = locations1.size(); + currentSelEquip = availableEquip.getEquipmentId(); + } + } + //查找到对应的入库站台 + Stand standQuery2 = new Stand(); + standQuery2.setAllowIn(1); + standQuery2.setAllowOut(0); + standQuery2.setEquipmentId(currentSelEquip); + standQuery2.setIsLock(0); + standQuery2.setStandStatus(0); + standQuery2.setStandType(1); + List availableStands = standService.selStands(standQuery2); + if (availableStands.size() < 1) { + logger.error("当前堆垛机无可用入库站台,请稍后重试!"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("当前堆垛机无可用入库站台,请稍后重试!"); + return JSON.toJSONString(rsp); + } + task_new.setOrigin(availableStands.get(0).getStandId()); + // 查找下一个可用库位 + if (StringUtils.isEmpty(nextLocation.getLocationId())) { + List nextLocations = locationService.selNextLocation(new Location(currentSelEquip)); + if (nextLocations.size() < 1) { + logger.error("入库错误:没有可用储存位"); + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("入库错误:没有可用储存位"); + return JSON.toJSONString(rsp); + } + nextLocation = nextLocations.get(0); + } + nextLocation.setLocationStatus(LocationStatus.OCCUPY.getCode()); + nextLocation.setVehicleId(taskInRequestEntity.getVehicleNo()); + task_new.setDestination(nextLocation.getLocationId()); + task_new.setWeight(taskInRequestEntity.getWeight() == null ? 0 : taskInRequestEntity.getWeight()); + task_new.setVehicleNo(taskInRequestEntity.getVehicleNo()); + task_new.setCreateTime(new Date()); + task_new.setUserName(taskInRequestEntity.getUserName()); + task_new.setGoodsId(taskInRequestEntity.getGoodsId()); + if (!taskInRequestEntity.getGoodsId().equals(WmsConstants.EMPTY_STOCK_GOODS_ID)) { + // 查询物料信息后设定 + PartInfo partInfo = partInfoService.selPartByPartNo(taskInRequestEntity.getGoodsId()); + task_new.setGoodsName(partInfo.getItemDesc()); + if (Double.parseDouble(partInfo.getSLED()) > 0) { + task_new.setProductionDate(taskInRequestEntity.getProductionDate()); + task_new.setExpirationDate(WmsUtils.calculationMonth(taskInRequestEntity.getProductionDate(), (int) (12 * Double.parseDouble(partInfo.getSLED())))); + } + } + task_new.setOperateNum(taskInRequestEntity.getGoodsNum()); + task_new.setTotalNum(0); + task_new.setTaskPriority(1); + // 插入入库任务 + taskService.addTask(task_new); + } + // 锁定库位 + locationService.modifyLocation(nextLocation); + // 添加载具/更新载具 + if (existVehicles.size() == 0) { + Vehicle newVehicle = new Vehicle(); + newVehicle.setVehicleId(currentVehicleNo); + newVehicle.setVehicleStatus(VehicleStatus.IN.getCode());// 入库中 + newVehicle.setCurrentLocation(nextLocation.getLocationId()); + if (Objects.equals(taskInRequestEntityList.get(0).getIsEmpty(), "0")) { + newVehicle.setIsEmpty(1); + } else { + newVehicle.setIsEmpty(0); + } + vehicleService.addVehicle(newVehicle); + } else { + Vehicle oldVehicle = existVehicles.get(0); + oldVehicle.setVehicleStatus(VehicleStatus.IN.getCode());// + oldVehicle.setCurrentLocation(nextLocation.getLocationId()); + if (Objects.equals(taskInRequestEntityList.get(0).getIsEmpty(), "0")) { + oldVehicle.setIsEmpty(1); + } else { + oldVehicle.setIsEmpty(0); + } + vehicleService.modifyVehicle(oldVehicle); + } + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("创建入库任务成功"); + return JSON.toJSONString(rsp); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.error("发生异常:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + } + + /** + * 出库---根据零件号出库 + * @param taskOutRequest 请求 + * @return 结果 + */ + @PostMapping("/sendGoodsOutTask") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String receiveGoodsOutTask(@RequestBody TaskOutRequestEntity taskOutRequest) { + logger.info("接收到出库请求:{},ip地址:{}", JSON.toJSONString(taskOutRequest), HttpUtils.getIpAddr(servletRequest)); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + StringBuilder returnMessage = new StringBuilder(); + try { + // 根据ip获得站台信息 + List stands = standService.selStands(new Stand(2, HttpUtils.getIpAddr(servletRequest), 0)); + if (stands.size() < 1) {// 请求的地址不是站台电脑 + logger.error("请用站台电脑下发任务"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请用站台电脑下发任务"); + return JSON.toJSONString(rsp); + } + // 判断物料编号和数量有没有输入 + if (taskOutRequest== null || StringUtils.isEmpty(taskOutRequest.getGoodsId()) || taskOutRequest.getNeedNum() == null || taskOutRequest.getNeedNum() == 0) { + logger.error("物料号和数量必须输入,请确认!"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("物料号和数量必须输入,请确认!"); + return JSON.toJSONString(rsp); + } + // 查找库存 + Stock stockQuery = new Stock(); + stockQuery.setGoodsId(taskOutRequest.getGoodsId()); + stockQuery.setVehicleId(taskOutRequest.getVehicleNo()); + stockQuery.setStockStatus(StockStatus.OK.getCode()); + List needStocks = stockService.selStocks(stockQuery); + if (needStocks.size() == 0) {// 没有库存 + logger.error("选择的库存不存在,无法出库!"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("选择的库存不存在,无法出库!"); + return JSON.toJSONString(rsp); + } + int needNum = taskOutRequest.getNeedNum(); + Location currentLocation; + for (Stock needStock : needStocks) { + if (needNum > 0 && needStock.getRemainNum() > 0) {// 还有需求数量 + Task tempTask = new Task(); + tempTask.setTaskId(WmsUtils.generateId("CK")); + tempTask.setTaskType(TaskType.OUT.getCode()); + tempTask.setTaskStatus(WmsTaskStatus.NEW.getCode()); + tempTask.setTaskGroup(WmsUtils.generateUUIDString()); + tempTask.setTaskPriority(1); + tempTask.setPickStand(stands.get(0).getStandId()); + tempTask.setVehicleNo(needStock.getVehicleId()); + tempTask.setUserName(taskOutRequest.getUserName()); + tempTask.setGoodsId(needStock.getGoodsId()); + tempTask.setGoodsName(needStock.getGoodsName()); + tempTask.setCreateTime(new Date()); + tempTask.setProductionDate(needStock.getProductionDate()); + tempTask.setExpirationDate(needStock.getExpirationDate()); + tempTask.setTotalNum(needStock.getRealNum()); + tempTask.setOrigin(needStock.getLocationId()); + //查找到对应的出库 + currentLocation = locationService.selLocations(new Location(needStock.getLocationId())).get(0); + Stand standQuery2 = new Stand(); + standQuery2.setAllowIn(0); + standQuery2.setAllowOut(1); + standQuery2.setEquipmentId(currentLocation.getEquipmentId()); + standQuery2.setIsLock(0); + standQuery2.setStandStatus(0); + standQuery2.setStandType(1); + List availableStands = standService.selStands(standQuery2); + if (availableStands.size() < 1) { + logger.error("当前库存的出库站台不可用!"); + // 返回错误信息 + returnMessage.append("当前库存所在载具").append(currentLocation.getVehicleId()).append("的出库站台不可用!\n"); + } + tempTask.setDestination(availableStands.get(0).getStandId()); + if (needNum <= needStock.getRemainNum()) {// 数量足够 + tempTask.setOperateNum(needNum); + needNum = 0; + needStock.setRemainNum(needStock.getRemainNum() - needNum); + } else { + tempTask.setOperateNum(needStock.getRemainNum()); + needNum -= needStock.getRemainNum(); + needStock.setRemainNum(0); + } + // 添加任务 + taskService.addTask(tempTask); + logger.info("添加任务成功,{}", JSON.toJSONString(tempTask)); + // 更新库存 + needStock.setStockStatus(StockStatus.OUT.getCode()); + stockService.modifyStock(needStock); + logger.info("更新库存信息成功,{}", JSON.toJSONString(needStock)); + // 更新载具信息 + Vehicle currentVehicle = vehicleService.selVehicleById(needStock.getVehicleId()); + if (currentVehicle == null) { + currentVehicle = new Vehicle(); + currentVehicle.setVehicleId(needStock.getVehicleId()); + currentVehicle.setIsEmpty(0); + currentVehicle.setCurrentLocation(needStock.getLocationId()); + currentVehicle.setVehicleStatus(VehicleStatus.OUT.getCode()); + vehicleService.addVehicle(currentVehicle); + } else { + currentVehicle.setVehicleStatus(VehicleStatus.OUT.getCode()); + vehicleService.modifyVehicle(currentVehicle); + } + logger.info("更新载具信息,{}", JSON.toJSONString(currentVehicle)); + // 将当前载具的其他库存也设置为相同状态 + Stock stockQuery2 = new Stock(); + stockQuery2.setVehicleId(needStock.getVehicleId()); + List sameVehicleStocks = stockService.selStocks(stockQuery2); + for (Stock sameVehicleStock : sameVehicleStocks) { + if (!Objects.equals(sameVehicleStock.getStockId(), needStock.getStockId())) { + sameVehicleStock.setStockStatus(StockStatus.OUT.getCode()); + stockService.modifyStock(sameVehicleStock); + } + } + logger.info("更新载具中其他库存信息,{}", needStock.getVehicleId()); + } + } + if (needNum > 0) {// 库存不足的情况下 + returnMessage.append("当前可用数量不足,已将能够出库的库存出库。\n"); + } + logger.info("下发出库任务成功"); + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage(String.valueOf(returnMessage)); + return JSON.toJSONString(rsp); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.error("创建出库任务发生异常:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + } + + /** + * 出库---根据料箱号出 + * @param taskOutRequest 请求 + * @return 结果 + */ + @PostMapping("/vehicleOut") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String selectVehicleOut(@RequestBody TaskOutRequestEntity taskOutRequest) { + logger.info("接收到出箱请求:{},ip地址:{}", JSON.toJSONString(taskOutRequest), HttpUtils.getIpAddr(servletRequest)); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + // 根据ip获得站台信息 + List stands = standService.selStands(new Stand(2, HttpUtils.getIpAddr(servletRequest), 0)); + if (stands.size() < 1) {// 请求的地址不是站台电脑 + logger.error("请用站台电脑下发任务"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请用站台电脑下发任务"); + return JSON.toJSONString(rsp); + } + // 判断物料编号和数量有没有输入 + if (taskOutRequest== null || StringUtils.isEmpty(taskOutRequest.getVehicleNo())) { + logger.error("箱号必须输入,请确认!"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("箱号必须输入,请确认!"); + return JSON.toJSONString(rsp); + } + Vehicle vehicle = vehicleService.selVehicleById(taskOutRequest.getVehicleNo()); + if (vehicle == null || !Objects.equals(vehicle.getVehicleStatus(), VehicleStatus.ON.getCode())) { + logger.error("当前箱子不可用,请确认!"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("当前箱子不可用,请确认!"); + return JSON.toJSONString(rsp); + } + // 生成任务 + Task tempTask = new Task(); + tempTask.setVehicleNo(taskOutRequest.getVehicleNo()); + tempTask.setTaskId(WmsUtils.generateId("RKCK")); + tempTask.setTaskGroup(WmsUtils.generateUUIDString()); + tempTask.setTaskStatus(WmsTaskStatus.NEW.getCode()); + tempTask.setTaskType(TaskType.OUT.getCode()); + tempTask.setOperateNum(0); + tempTask.setCreateTime(new Date()); + tempTask.setGoodsId(WmsConstants.EMPTY_STOCK_GOODS_ID); + tempTask.setUserName(taskOutRequest.getUserName()); + tempTask.setPickStand(stands.get(0).getStandId()); + tempTask.setTaskPriority(1); + tempTask.setWeight((double) 0); + tempTask.setOrigin(vehicle.getCurrentLocation()); + //查找到对应的出库站台 + Location currentLocation = locationService.selLocations(new Location(vehicle.getCurrentLocation())).get(0); + Stand standQuery2 = new Stand(); + standQuery2.setAllowIn(0); + standQuery2.setAllowOut(1); + standQuery2.setEquipmentId(currentLocation.getEquipmentId()); + standQuery2.setIsLock(0); + standQuery2.setStandStatus(0); + standQuery2.setStandType(1); + List availableStands = standService.selStands(standQuery2); + if (availableStands.size() < 1) { + logger.error("当前箱子的出库站台不可用!"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("当前箱子的出库站台不可用!"); + return JSON.toJSONString(rsp); + } + tempTask.setDestination(availableStands.get(0).getStandId()); + taskService.addTask(tempTask); + logger.info("下发出箱任务成功"); + // 更新料箱状态 + vehicle.setVehicleStatus(VehicleStatus.OUT.getCode()); + vehicleService.modifyVehicle(vehicle); + logger.info("更新料箱状态成功"); + // 该箱子上的库存状态变更 + Stock stockQuery = new Stock(); + stockQuery.setVehicleId(taskOutRequest.getVehicleNo()); + List stocks = stockService.selStocks(stockQuery); + for (Stock tempStock : stocks) { + tempStock.setStockStatus(StockStatus.OUT.getCode()); + stockService.modifyStock(tempStock); + } + logger.info("更新库存状态成功"); + logger.info("下发出库任务成功"); + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("箱号" + taskOutRequest.getVehicleNo() + "生成出库任务成功"); + return JSON.toJSONString(rsp); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.error("创建出库任务发生异常:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + } + + /** + * 盘点出库 + * + * @param request 请求 + * @return 结果 + */ + @PostMapping("/sendInventoryTask") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String sendInventoryTask(@RequestBody InventoryTask request) { + // TODO 盘点优化 + logger.info("接收到盘库请求:{},ip地址:{}", JSON.toJSONString(request), HttpUtils.getIpAddr(servletRequest)); + ResponseEntity rsp = new ResponseEntity(); + try { + // 根据ip获得站台信息 + List stands = standService.selStands(new Stand(2, HttpUtils.getIpAddr(servletRequest), 0)); + if (stands.size() < 1) {// 请求的地址不是站台电脑 + logger.error("请用站台电脑下发盘库任务"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请用站台电脑下发盘库任务"); + return JSON.toJSONString(rsp); + } + // 判断零件号是否输入 + if (StringUtils.isEmpty(request.getGoodsId())) { + logger.error("未选择盘点零件"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请选择盘点零件"); + return JSON.toJSONString(rsp); + } + // 判断当前零件是否有其他任务 + Task taskQuery2 = new Task(); + taskQuery2.setGoodsId(request.getGoodsId()); + taskQuery2.setVehicleNo(request.getVehicleId()); + List sameGoodsTasks = taskService.selTasks(taskQuery2); + if (sameGoodsTasks.size() > 0) { + logger.error("当前零件存在其他任务"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("当前零件存在其他任务,请勿执行盘点"); + return JSON.toJSONString(rsp); + } + // 判断库存中是否有此物料 + Stock stockQuery1 = new Stock(); + stockQuery1.setGoodsId(request.getGoodsId()); + stockQuery1.setVehicleId(request.getVehicleId()); + stockQuery1.setStockStatus(StockStatus.OK.getCode()); + List detailStocks = stockService.selStocks(stockQuery1); + List summaryStocks = stockService.selStocksByGoodsId(stockQuery1); + if (detailStocks.size() == 0) {// 当前零件无库存 + logger.error("当前零件无库存"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("当前零件无库存"); + return JSON.toJSONString(rsp); + } + if (summaryStocks.size() == 0) { + logger.error("当前零件无库存"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("当前零件无库存"); + return JSON.toJSONString(rsp); + } + for (Stock tempDetailStock : detailStocks) { + // 根据库存生成任务 + // 生成出库任务 + Task task = new Task(); + // 任务编号 + task.setTaskId(WmsUtils.generateId("PDCK")); + // 任务类型 + task.setTaskType(TaskType.INVENTORY.getCode()); + // 起点 + task.setOrigin(tempDetailStock.getLocationId()); + // 查找对应库位对应的站台 + Location locationQuery = new Location(); + locationQuery.setLocationId(tempDetailStock.getLocationId()); + Location currentLocation = locationService.selLocations(locationQuery).get(0); + Stand standQuery = new Stand(); + standQuery.setEquipmentId(currentLocation.getEquipmentId()); + standQuery.setAllowIn(0); + standQuery.setAllowOut(1); + standQuery.setStandType(1); + Stand targetStand = standService.selStands(standQuery).get(0); + task.setDestination(targetStand.getStandId()); + task.setPickStand(stands.get(0).getStandId()); + // 重量 + // 查找零件数据,然后计算重量 + PartInfo partInfo = partInfoService.selPartByPartNo(tempDetailStock.getGoodsId()); + task.setWeight(partInfo.getPartWeight() * tempDetailStock.getRealNum());// 重量 + // 载具编号 + task.setVehicleNo(tempDetailStock.getVehicleId()); + // 尺寸 + task.setVehicleSize(1); + task.setCreateTime(new Date()); + // 用户名 + task.setUserName(request.getUserName()); + task.setGoodsId(tempDetailStock.getGoodsId()); + task.setGoodsName(tempDetailStock.getGoodsName()); + task.setProductionDate(tempDetailStock.getProductionDate()); + task.setExpirationDate(tempDetailStock.getExpirationDate()); + task.setOperateNum(0); + task.setTotalNum(tempDetailStock.getRealNum()); + task.setTaskPriority(2); + + tempDetailStock.setIsInventory(1); + tempDetailStock.setInventoryTaskId(task.getTaskId()); + task.setTaskStatus(WmsTaskStatus.NEW.getCode());// 新建出库任务 + task.setTaskGroup(WmsUtils.generateUUIDString());// group + taskService.addTask(task); + // 将库存设定为盘点出库状态 + tempDetailStock.setStockStatus(StockStatus.OUT.getCode()); + stockService.modifyStock(tempDetailStock); + // 将这个托盘上的其他库存都设定为盘点出库状态 + List sameVehicleStock = stockService.selStocks(new Stock(tempDetailStock.getVehicleId())); + for (Stock tempStock : sameVehicleStock) { + if (Objects.equals(tempStock.getStockId(), tempDetailStock.getStockId())) { + continue; + } + tempStock.setStockStatus(StockStatus.OUT.getCode()); + stockService.modifyStock(tempStock); + } + // 将当前的载具设置为出库中 + Vehicle currentVehicle = vehicleService.selVehicleById(tempDetailStock.getVehicleId()); + currentVehicle.setVehicleStatus(VehicleStatus.OUT.getCode()); + vehicleService.modifyVehicle(currentVehicle); + } + + logger.info("创建盘点任务成功,零件号:{}", request.getGoodsId()); + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("创建盘库任务成功"); + rsp.setReturnData(summaryStocks.size() > 0 ? summaryStocks.get(0) : new Stock()); + return JSON.toJSONString(rsp); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.error("创建盘库任务发生异常:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + } + + /** + * 接收WCS发送的任务结果 + * + * @param wmsReceiveTaskResultEntity 请求 + * @return 响应结果 + */ + @PostMapping("/sendTaskResult") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String receiveTaskResult(@RequestBody WmsReceiveTaskResultEntity wmsReceiveTaskResultEntity) { + logger.info("接收到任务反馈:{},ip地址:{}", wmsReceiveTaskResultEntity.toLoggerString(), HttpUtils.getIpAddr(servletRequest)); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + // 获取任务号 + String taskId = wmsReceiveTaskResultEntity.getTaskId(); + Integer result = wmsReceiveTaskResultEntity.getTaskStatus(); + String vehicleNo = wmsReceiveTaskResultEntity.getVehicleNo(); + // 查找对应任务 + Task taskForQuery = new Task(); + taskForQuery.setTaskGroup(taskId); + List tasks = taskService.selTasks(taskForQuery); + if (tasks.size() < 1) { + logger.error("任务号不正确"); + // 返回失败 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("任务号不正确"); + return JSON.toJSONString(rsp); + } + // 设定任务类型 + Integer taskType = tasks.get(0).getTaskType(); + if (result.compareTo(WcsTaskStatus.FINISH.getCode()) == 0) {// 任务完成 + // 回原库位 + if (taskType.compareTo(TaskType.IN.getCode()) == 0) {// 入库任务 + logger.info("入库任务完成,开始处理"); + // 更新载具信息 + Vehicle currentVehicle = vehicleService.selVehicleById(vehicleNo); + currentVehicle.setVehicleStatus(2);// 在库中 + currentVehicle.setCurrentLocation(wmsReceiveTaskResultEntity.getDestination()); + vehicleService.modifyVehicle(currentVehicle); + // 添加库存 + for (Task task : tasks) { + if (!Objects.equals(task.getTaskType(), TaskType.IN.getCode())) { + continue; + } + if (task.getTaskId().startsWith("HK")) {// 回库的库存 + // 查询是不是回库的库存 + Stock stockQuery1 = new Stock(); + stockQuery1.setVehicleId(vehicleNo); + stockQuery1.setGoodsId(task.getGoodsId()); + List backStocks = stockService.selStocks(stockQuery1); + for (Stock tempBackStock : backStocks) { + tempBackStock.setLocationId(task.getDestination()); + tempBackStock.setStockStatus(StockStatus.OK.getCode()); + tempBackStock.setLastUpdateTime(new Date()); + stockService.modifyStock(tempBackStock); + logger.info("更新回库库存"); + } + } else if (task.getTaskId().startsWith("RK")) {// 新增库存 + if (!task.getGoodsId().equals(WmsConstants.EMPTY_STOCK_GOODS_ID)) {// 空箱入库的情况下不生成库存 + Stock exsitStockQuery = new Stock(); + exsitStockQuery.setVehicleId(vehicleNo); + exsitStockQuery.setGoodsId(task.getGoodsId()); + List exsitStocks = stockService.selStocks(exsitStockQuery); + if (exsitStocks.size() > 0) {// 说明该箱子上已有该零件 + // 直接添加数量 + Stock exsitStock = exsitStocks.get(0); + exsitStock.setRemainNum(exsitStock.getRemainNum() + task.getOperateNum()); + exsitStock.setRealNum(exsitStock.getRealNum() + task.getOperateNum()); + exsitStock.setStockStatus(StockStatus.OK.getCode()); + exsitStock.setLocationId(task.getDestination()); + stockService.modifyStock(exsitStock); + logger.info("已有库存增加数量成功:{}", JSON.toJSONString(exsitStock)); + } else { + Stock stockTemp = new Stock(); + stockTemp.setStockId(WmsUtils.generateId("ST")); + stockTemp.setLocationId(task.getDestination()); + stockTemp.setVehicleId(vehicleNo); + stockTemp.setGoodsId(task.getGoodsId()); + // 查询物料信息后设定 + PartInfo partInfo = partInfoService.selPartByPartNo(task.getGoodsId()); + stockTemp.setGoodsName(partInfo.getItemDesc()); + if (Double.parseDouble(partInfo.getSLED()) > 0) { + stockTemp.setProductionDate(task.getProductionDate()); + stockTemp.setShelfLife(Double.parseDouble(partInfo.getSLED())); + stockTemp.setExpirationDate(task.getExpirationDate()); + } + stockTemp.setAvailableNum(task.getOperateNum()); + stockTemp.setRemainNum(task.getOperateNum()); + stockTemp.setRealNum(task.getOperateNum()); + stockTemp.setProviderId(partInfo.getVendorId()); + stockTemp.setProviderName(partInfo.getVendorNameCN()); + stockTemp.setStockStatus(StockStatus.OK.getCode()); + stockTemp.setGoodsStatus(GoodsStatus.OK.getCode()); + stockTemp.setCreateTime(new Date()); + stockTemp.setLastUpdateTime(new Date()); + stockTemp.setIsInventory(0); + stockTemp.setCurrentLocation(task.getDestination()); + logger.info("生成新库存:{}", JSON.toJSONString(stockTemp)); + stockService.addStock(stockTemp); + } + } + } + // 查看当前料箱上还有没有其他料 + logger.info("更新料箱上其他库存"); + Stock stockQuery3 = new Stock(); + stockQuery3.setVehicleId(vehicleNo); + List backStocks3 = stockService.selStocks(stockQuery3); + for (Stock tempBackStock3 : backStocks3) { + if (Objects.equals(tempBackStock3.getGoodsId(), task.getGoodsId())) { + continue; + } + if (tempBackStock3.getRealNum() <= 0) {// 无库存 + stockService.deleteStock(tempBackStock3.getStockId()); + } else { + tempBackStock3.setLocationId(task.getDestination()); + tempBackStock3.setStockStatus(StockStatus.OK.getCode()); + stockService.modifyStock(tempBackStock3); + } + } + } + // 对完成的入库任务进行处理 + for (Task task : tasks) { + // 入库任务完成,先添加任务记录,然后删除任务。 + task.setTaskStatus(WmsTaskStatus.FINISH.getCode()); + task.setFinishTime(new Date()); + taskRecordService.addTask(task); + taskService.deleteTask(task.getTaskId()); + } + } else if (taskType.compareTo(TaskType.OUT.getCode()) == 0) {// 出库任务 + logger.info("出库任务完成,开始处理"); + // 更改载具位置为站台 + Vehicle vehicle = vehicleService.selVehicleById(vehicleNo); + vehicleService.modifyVehicle(vehicle); + // 更新库存当前位置----根据载具号查询到库存,该载具上的所有库存做统一处理。 + Stock stockQueryParam1 = new Stock(); + stockQueryParam1.setVehicleId(vehicleNo); + List tempStockList1 = stockService.selStocks(stockQueryParam1); + for (Stock temp : tempStockList1) { + temp.setStockStatus(StockStatus.TRANS.getCode()); + temp.setCurrentLocation(wmsReceiveTaskResultEntity.getDestination()); + temp.setLastUpdateTime(new Date()); + stockService.modifyStock(temp); + } + for (Task task : tasks) { + if (!Objects.equals(task.getTaskType(), TaskType.OUT.getCode())) { + continue; + } + if (task.getGoodsId().equals(WmsConstants.EMPTY_STOCK_GOODS_ID)) { + task.setTaskStatus(WmsTaskStatus.FINISH.getCode());// 出库完成状态 + task.setFinishTime(new Date()); + taskRecordService.addTask(task); + taskService.deleteTask(task.getTaskId()); + } else { + task.setTaskStatus(WmsTaskStatus.OUT_SUCCESS.getCode());// 出库完成状态 + taskService.executeTask(task); + } + } + } else if (taskType.compareTo(TaskType.INVENTORY.getCode()) == 0) {// 盘点任务 + logger.info("盘点任务完成,开始处理"); + // 更改载具位置为站台 + Vehicle vehicle = vehicleService.selVehicleById(vehicleNo); + vehicleService.modifyVehicle(vehicle); + // 更新库存当前位置----根据载具号查询到库存,该载具上的所有库存做统一处理。 + Stock stockQueryParam1 = new Stock(); + stockQueryParam1.setVehicleId(vehicleNo); + List tempStockList1 = stockService.selStocks(stockQueryParam1); + for (Stock temp : tempStockList1) { + temp.setStockStatus(StockStatus.TRANS.getCode()); + temp.setCurrentLocation(wmsReceiveTaskResultEntity.getDestination()); + temp.setLastUpdateTime(new Date()); + stockService.modifyStock(temp); + } + for (Task task : tasks) { + if (!Objects.equals(task.getTaskType(), TaskType.INVENTORY.getCode())) { + continue; + } + task.setTaskStatus(WmsTaskStatus.OUT_SUCCESS.getCode());// 出库完成状态 + taskService.executeTask(task); + } + } + } else if (result.compareTo(WcsTaskStatus.RUN.getCode()) == 0) {// 任务开始执行 + logger.info("任务开始执行"); + for (Task task : tasks) { + task.setTaskStatus(WmsTaskStatus.RUN.getCode());// 任务开始执行 + taskService.executeTask(task); + } + } else if (result.compareTo(WcsTaskStatus.EXCEPTION.getCode()) == 0) {// 任务开始执行 + logger.info("任务发生异常"); + for (Task task : tasks) { + task.setTaskStatus(WmsTaskStatus.EXCEPTION.getCode());// 任务开始执行 + taskService.executeTask(task); + } + } else if (result.compareTo(WcsTaskStatus.CANCEL.getCode()) == 0) { + if (taskType.compareTo(TaskType.IN.getCode()) == 0) {// 入库任务取消 + logger.info("入库任务取消,开始处理"); + for (Task tempInTask : tasks) { + if (tempInTask.getTaskId().startsWith("HK")) {// 回库任务,需要删除库存 + Stock stockQueryParam1 = new Stock(); + stockQueryParam1.setVehicleId(vehicleNo); + stockQueryParam1.setGoodsId(tempInTask.getGoodsId()); + List tempStockList1 = stockService.selStocks(stockQueryParam1); + for (Stock temp : tempStockList1) { + stockService.deleteStock(temp.getStockId()); + } + } + } + } else if (taskType.compareTo(TaskType.OUT.getCode()) == 0) {// 出库任务取消 + logger.info("出库任务取消,开始处理"); + // 更改载具位置为站台 + logger.info("更新载具为在库中"); + Vehicle vehicle = vehicleService.selVehicleById(vehicleNo); + vehicle.setVehicleStatus(VehicleStatus.ON.getCode()); + vehicleService.modifyVehicle(vehicle); + // 更新库存当前位置----根据载具号查询到库存,该载具上的所有库存做统一处理。 + logger.info("更新库存为正常状态"); + Stock stockQueryParam1 = new Stock(); + stockQueryParam1.setVehicleId(vehicleNo); + List tempStockList1 = stockService.selStocks(stockQueryParam1); + for (Stock temp : tempStockList1) { + temp.setStockStatus(StockStatus.OK.getCode()); + stockService.modifyStock(temp); + } + } else if (taskType.compareTo(TaskType.INVENTORY.getCode()) == 0) {// 盘点任务取消 + logger.info("盘点任务取消,开始处理"); + // 更改载具位置为站台 + logger.info("更新载具为在库中"); + Vehicle vehicle = vehicleService.selVehicleById(vehicleNo); + vehicle.setVehicleStatus(VehicleStatus.ON.getCode()); + vehicleService.modifyVehicle(vehicle); + // 更新库存当前位置----根据载具号查询到库存,该载具上的所有库存做统一处理。 + logger.info("更新库存为正常状态"); + Stock stockQueryParam1 = new Stock(); + stockQueryParam1.setVehicleId(vehicleNo); + List tempStockList1 = stockService.selStocks(stockQueryParam1); + for (Stock temp : tempStockList1) { + temp.setStockStatus(StockStatus.OK.getCode()); + stockService.modifyStock(temp); + } + } + // 更新任务状态 + logger.info("删除取消的任务,并添加任务记录"); + for (Task task : tasks) { + task.setTaskStatus(WmsTaskStatus.CANCEL.getCode());// 任务开始执行 + task.setFinishTime(new Date()); + taskService.deleteTask(task.getTaskId()); + taskRecordService.addTask(task); + } + } + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.error("发生异常"); + // 返回失败 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("发生异常,请尝试重新发送一次"); + return JSON.toJSONString(rsp); + } + logger.info("获取任务反馈处理成功"); + // 返回失败 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("任务处理成功"); + return JSON.toJSONString(rsp); + } + + /** + * WCS向WMS上报箱子到达拣货口 + * @param pickTask 拣选任务 + * @return 结果 + */ + @PostMapping("/boxArrive") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String boxArrive(@RequestBody PickTaskResponse pickTask) { + logger.info("接收到WCS向WMS上报箱子到达拣货点:{}", JSON.toJSONString(pickTask)); + ResponseEntity response = new ResponseEntity(); + try { + // 根据载具号加拣选点位找到对应的任务----出库任务/盘点任务 + Task taskQueryParam1 = new Task(); + taskQueryParam1.setVehicleNo(pickTask.getVehicleNo()); + taskQueryParam1.setTaskStatus(WmsTaskStatus.OUT_SUCCESS.getCode()); + List tasks = taskService.selTasks(taskQueryParam1); + if (tasks.size() < 1) { + logger.error("当前反馈的箱号{}不存在可以操作的任务", pickTask.getVehicleNo()); + // 返回失败 + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("当前反馈的箱号没有对应的任务"); + return JSON.toJSONString(response); + } + // 更新当前载具的当前位置为拣选站台 + Vehicle vehicle = vehicleService.selVehicleById(pickTask.getVehicleNo()); + if (vehicle == null) { + logger.error("没查询到对应载具{}", pickTask.getVehicleNo()); + // 返回失败 + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("没查询到对应载具信息"); + return JSON.toJSONString(response); + } + vehicleService.modifyVehicle(vehicle); + // 更新库存位置 + Stock stockQueryParam1 = new Stock(); + stockQueryParam1.setVehicleId(pickTask.getVehicleNo()); + List stocks = stockService.selStocks(stockQueryParam1); + if (stocks.size() < 1) { + logger.error("载具{}没查询到对应库存", pickTask.getVehicleNo()); + // 返回失败 + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("反馈的载具没查询到对应库存"); + return JSON.toJSONString(response); + } + for (Stock tempStock : stocks) { + tempStock.setStockStatus(StockStatus.PICKING.getCode()); + tempStock.setCurrentLocation(pickTask.getPickStand()); + stockService.modifyStock(tempStock); + } + // 更新任务状态 + for (Task tempTaskForPicking : tasks) { + if (Objects.equals(tempTaskForPicking.getTaskType(), TaskType.OUT.getCode())) { + // 更新任务状态 + tempTaskForPicking.setTaskStatus(WmsTaskStatus.PICKING.getCode()); + taskService.executeTask(tempTaskForPicking); + } else if (Objects.equals(tempTaskForPicking.getTaskType(), TaskType.INVENTORY.getCode())) {// 盘点出库 + // 更新任务状态 + tempTaskForPicking.setTaskStatus(WmsTaskStatus.INVENTORY.getCode()); + taskService.executeTask(tempTaskForPicking); + } + } + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.error("发生异常:{}", e.getMessage()); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("发生异常"); + return JSON.toJSONString(response); + } + logger.info("处理成功"); + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("成功"); + return JSON.toJSONString(response); + } + + /** + * 当前箱子请求回库 + * + * @param request 请求 + * @return 结果 + */ + @PostMapping("/finishPicking") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String finishPicking(@RequestBody FinishPickTaskRequest request) { + logger.info("确认拣货完成:{}", JSON.toJSONString(request)); + ResponseEntity response = new ResponseEntity(); + try { + if (StringUtils.isEmpty(request.getTaskId())) {// + logger.error("任务号为空"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("任务号为空"); + return JSON.toJSONString(response); + } + // 将当前任务信息更新 + Task taskQuery1 = new Task(); + taskQuery1.setTaskId(request.getTaskId()); + List tasks1 = taskService.selTasks(taskQuery1); + if (tasks1.size() < 1) { + logger.error("数据库中查询不到当前正在执行的任务:{}", request.getTaskId()); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("数据库中查询不到当前正在执行的任务"); + return JSON.toJSONString(response); + } + Task currentTask = tasks1.get(0); + currentTask.setTaskStatus(WmsTaskStatus.FINISH.getCode()); + if (request.getPickNum() != null) { + currentTask.setOperateNum(request.getPickNum()); + } + if (Objects.equals(currentTask.getTaskType(), TaskType.INVENTORY.getCode())) {// 盘点任务 + currentTask.setOperateNum(currentTask.getTotalNum() - request.getRealNum()); + } + currentTask.setFinishTime(new Date()); + taskRecordService.addTask(currentTask); + taskService.deleteTask(currentTask.getTaskId()); + // 根据这个任务的数据来更新库存 + Stock stockQuery1 = new Stock(); + stockQuery1.setVehicleId(currentTask.getVehicleNo()); + stockQuery1.setGoodsId(currentTask.getGoodsId()); + List stocks = stockService.selStocks(stockQuery1); + if (stocks.size() < 1) { + logger.error("查询不到对应库存"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("查询不到对应库存"); + return JSON.toJSONString(response); + } + Stock currentStock = stocks.get(0); + if (request.getRealNum() != null) { + currentStock.setRealNum(request.getRealNum()); + if (Objects.equals(currentTask.getTaskType(), TaskType.INVENTORY.getCode())) { + currentStock.setRemainNum(currentStock.getRealNum()); + currentStock.setAvailableNum(currentStock.getRealNum()); + } + } else { + currentStock.setRealNum(currentStock.getRealNum() - currentTask.getOperateNum()); + } + + // 判断当前任务的载具号是否还有其他任务 + Task taskQuery2 = new Task(); + taskQuery2.setVehicleNo(request.getVehicleNo()); + taskQuery2.setTaskType(TaskType.OUT.getCode()); + List sameVehicleTasks = taskService.selTasks(taskQuery2); + if (sameVehicleTasks.size() > 0) {// 存在其他任务 + logger.info("当前载具还有其他任务"); + // 库存只更新 + stockService.modifyStock(currentStock); + } else { + // 标记当前箱子入库中 + // 标记当前载具为空箱 + Vehicle currentVehicle = vehicleService.selVehicleById(currentTask.getVehicleNo()); + currentVehicle.setVehicleStatus(VehicleStatus.IN.getCode()); + vehicleService.modifyVehicle(currentVehicle); + //查找到对应的入库站台 + Stand standQuery2 = new Stand(); + standQuery2.setAllowIn(1); + standQuery2.setAllowOut(0); + standQuery2.setStandType(1); + // 判断库存是否为0 + if (currentStock.getRealNum() <= 0) {// 库存为0 + logger.info("拣货后库存为0,空箱回库"); + // 删除当前库存 + stockService.deleteStock(currentStock.getStockId()); + // 根据这个任务的数据来更新库存 + Stock stockQuery2 = new Stock(); + stockQuery2.setVehicleId(currentTask.getVehicleNo()); + List stocks2 = stockService.selStocks(stockQuery2); + // 判断当前载具上是否还有其他库存 + if (stocks2.size() == 0) {// 当前载具是空托 + // 标记当前载具为空箱 + currentVehicle.setIsEmpty(1); + vehicleService.modifyVehicle(currentVehicle); + } else {// 更新载具上其他库存为回库状态 + for (Stock tempSameVehicleStock : stocks2) { + tempSameVehicleStock.setStockStatus(StockStatus.BACKING.getCode()); + stockService.modifyStock(tempSameVehicleStock); + } + } + // 生成空托回库任务---回到原来位置 + Task emptyBackTask = new Task(); + emptyBackTask.setTaskId(WmsUtils.generateId("HK")); + emptyBackTask.setTaskType(TaskType.IN.getCode()); + emptyBackTask.setTaskStatus(WmsTaskStatus.NEW.getCode()); + emptyBackTask.setTaskGroup(WmsUtils.generateUUIDString()); + emptyBackTask.setDestination(currentStock.getLocationId()); + // 根据库位查找站台 + Location currentLocation = locationService.selLocations(new Location(currentStock.getLocationId())).get(0); + standQuery2.setEquipmentId(currentLocation.getEquipmentId()); + List availableStands = standService.selStands(standQuery2); + emptyBackTask.setOrigin(availableStands.get(0).getStandId()); + emptyBackTask.setWeight((double) 0); + emptyBackTask.setVehicleNo(currentTask.getVehicleNo()); + emptyBackTask.setVehicleSize(0); + emptyBackTask.setCreateTime(new Date()); + emptyBackTask.setUserName(currentTask.getUserName()); + emptyBackTask.setGoodsId(WmsConstants.EMPTY_STOCK_GOODS_ID); + emptyBackTask.setTaskPriority(1); + taskService.addTask(emptyBackTask); + } else { + logger.info("拣货后库存不为0,回库"); + // 更新库存 + currentStock.setRemainNum(currentStock.getRealNum()); + stockService.modifyStock(currentStock); + // 设置当前载具的其他库存也为回库中 + Stock stockQuery2 = new Stock(); + stockQuery2.setVehicleId(currentTask.getVehicleNo()); + List stocks2 = stockService.selStocks(stockQuery2); + for (Stock sameVehicleStock : stocks2) { + sameVehicleStock.setStockStatus(StockStatus.BACKING.getCode()); + stockService.modifyStock(sameVehicleStock); + } + // 生成入库任务 + Task backTask = new Task(); + backTask.setTaskId(WmsUtils.generateId("HK")); + backTask.setTaskType(TaskType.IN.getCode()); + backTask.setTaskStatus(WmsTaskStatus.NEW.getCode()); + backTask.setTaskGroup(WmsUtils.generateUUIDString()); + backTask.setDestination(currentStock.getLocationId()); + // 根据库位查找站台 + Location currentLocation = locationService.selLocations(new Location(currentStock.getLocationId())).get(0); + standQuery2.setEquipmentId(currentLocation.getEquipmentId()); + List availableStands = standService.selStands(standQuery2); + backTask.setOrigin(availableStands.get(0).getStandId()); + backTask.setWeight((double) 0); + backTask.setVehicleNo(currentTask.getVehicleNo()); + backTask.setVehicleSize(0); + backTask.setCreateTime(new Date()); + backTask.setUserName(currentTask.getUserName()); + backTask.setGoodsId(currentStock.getGoodsId()); + backTask.setGoodsName(currentStock.getGoodsName()); + backTask.setProductionDate(currentStock.getProductionDate()); + backTask.setExpirationDate(currentStock.getExpirationDate()); + backTask.setOperateNum(currentStock.getRealNum()); + backTask.setTotalNum(currentStock.getRealNum()); + backTask.setTaskPriority(1); + taskService.addTask(backTask); + } + } + + logger.info("物料回库成功"); + response.setCode(0); + response.setMessage("成功"); + return JSON.toJSONString(response); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.error("发生异常:{}", e.getMessage()); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("发生异常"); + return JSON.toJSONString(response); + } + } + + /** + * 查找所有任务 + */ + @PostMapping("/getTasks") + @ResponseBody + public String getTasks(@RequestBody TableRequest tableRequest) { + TableResponse tblResp = new TableResponse(); + // 解析请求数据 + if (tableRequest == null || tableRequest.getPage() == null) { + tblResp.setCode(ResponseCode.ERROR.getCode()); + tblResp.setMessage("请求数据为空,无法处理!"); + logger.error("请求数据为空,无法处理!"); + return JSON.toJSONString(tblResp); + } + // 处理分页信息 + PageDomain pageRequest = tableRequest.getPage(); + String[] orderByArr = {"task_id", "task_type", "task_status", "goods_id", "goods_name", "task_priority", "expiration_date", "create_time"}; + String orderByStr; + + if (StringUtils.isNotEmpty(pageRequest.getOrderByColumn()) && Arrays.asList(orderByArr).contains(StringUtils.toUnderScoreCase(pageRequest.getOrderByColumn()))) { + orderByStr = pageRequest.getOrderBy(); + } else { + // 默认排序 + orderByStr = ""; + } + + Task taskQuery = new Task(); + taskQuery.setTaskType(tableRequest.getParam().getTaskType()); + taskQuery.setGoodsId(tableRequest.getParam().getGoodsId()); + taskQuery.setVehicleNo(tableRequest.getParam().getVehicleNo()); + // 查找对应站台 + List stands = standService.selStands(new Stand(2, HttpUtils.getIpAddr(servletRequest), 0)); + if (stands.size() > 0 && (Objects.equals(taskQuery.getTaskType(), TaskType.OUT.getCode()) || Objects.equals(taskQuery.getTaskType(), TaskType.INVENTORY.getCode()))) { + taskQuery.setPickStand(stands.get(0).getStandId()); + } + PageHelper.startPage(pageRequest.getPageNum(), pageRequest.getPageSize(), orderByStr); + List tasks = taskService.selTasks(taskQuery); + PageInfo taskPageInfo = new PageInfo<>(tasks); + tblResp.setCode(ResponseCode.OK.getCode()); + tblResp.setMessage("查询任务成功!"); + tblResp.setRows(taskPageInfo.getList()); + tblResp.setTotal(taskPageInfo.getTotal()); + return JSON.toJSONString(tblResp); + } + + /** + * 根据参数查询wms任务 + */ + @PostMapping("/getTaskByTask") + @ResponseBody + public String getTaskByTask(@RequestBody Task request) { + ResponseEntity response = new ResponseEntity(); + if (request == null) { + logger.error("请求参数为空"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("请求参数为空"); + return JSON.toJSONString(response); + } + List stands = standService.selStands(new Stand(2, HttpUtils.getIpAddr(servletRequest), 0)); + if (stands.size() > 0) { + request.setPickStand(stands.get(0).getStandId()); + } else { + request.setPickStand("other"); + } + List tasks = taskService.selTasks(request); + + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("成功"); + response.setReturnData(tasks.size() > 0 ? tasks.get(0) : null); + return JSON.toJSONString(response); + } +} \ No newline at end of file diff --git a/src/main/java/com/wms/controller/TaskDealController.java b/src/main/java/com/wms/controller/TaskDealController.java new file mode 100644 index 0000000..0310e86 --- /dev/null +++ b/src/main/java/com/wms/controller/TaskDealController.java @@ -0,0 +1,208 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.wms.constants.enums.*; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.table.Location; +import com.wms.entity.app.wcs.WmsReceiveTaskResultEntity; +import com.wms.entity.table.Stock; +import com.wms.entity.table.Task; +import com.wms.service.LocationService; +import com.wms.service.StockService; +import com.wms.service.TaskService; +import com.wms.utils.HttpUtils; +import com.wms.utils.StringUtils; +import jakarta.servlet.http.HttpServletRequest; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Objects; + +/** + * 这个类处理任务反馈信息 + */ +@Controller +@CrossOrigin +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +@RequestMapping(value = "/wms/taskDeal") +public class TaskDealController extends BaseController{ + private final TaskService taskService; + private final HttpServletRequest servletRequest; + private final TaskController taskController; + private final StockService stockService; + private final LocationService locationService; + + /** + * 更改任务状态 + * + * @param request 请求参数 + * @return 结果 + */ + @PostMapping("/changeTaskStatus") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String changeTaskStatus(@RequestBody Task request) { + logger.info("用户请求更改任务状态,用户名:{},ip地址:{}", request.getUserName(), HttpUtils.getIpAddr(servletRequest)); + logger.info("请求详细:{}", JSON.toJSONString(request)); + ResponseEntity response = new ResponseEntity(); + try { + if (request.getTaskStatus() == null) { + logger.error("请选择任务状态"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("请选择任务状态"); + return JSON.toJSONString(response); + } + // 更改后的任务状态 + int taskStatusRequest = request.getTaskStatus(); + int wcsTaskStatusAfter = 0; + // 查询任务 + Task taskQuery = new Task(); + taskQuery.setTaskId(request.getTaskId()); + List tasks = taskService.selTasks(taskQuery); + if (tasks.size() == 0) { + logger.error("当前任务不存在"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("当前任务不存在"); + return JSON.toJSONString(response); + } + Task currentTask = tasks.get(0); + String newDestination = ""; + if (Objects.equals(currentTask.getTaskType(), TaskType.IN.getCode()) && StringUtils.isNotEmpty(request.getDestination()) && !Objects.equals(request.getDestination(), currentTask.getDestination())) {// 入库任务库位变更 + if (taskStatusRequest != 0) { + logger.error("更改库位必须重置任务"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("更改库位必须重置任务"); + return JSON.toJSONString(response); + } + newDestination = request.getDestination(); + } + if (currentTask.getTaskId().startsWith("HK") && taskStatusRequest == 1) { + logger.error("回库任务不允许取消"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("回库任务不允许取消"); + return JSON.toJSONString(response); + } + String taskGroupId = currentTask.getTaskGroup(); + if (taskStatusRequest == 0) {// 重置任务 + logger.info("任务重置"); + // 将当前taskGroup的所有任务都设置为新建状态 + Task taskQuery2 = new Task(); + taskQuery2.setTaskGroup(taskGroupId); + List tasks2 = taskService.selTasks(taskQuery2); + for (Task task2 : tasks2) { + if (StringUtils.isNotEmpty(newDestination)) { + task2.setDestination(newDestination); + } + task2.setTaskStatus(WmsTaskStatus.NEW.getCode()); + task2.setUserName(request.getUserName()); + taskService.executeTask(task2); + } + // 如果更新了任务,那么该库位信息也要变更 + if (Objects.equals(currentTask.getTaskType(), TaskType.IN.getCode()) && StringUtils.isNotEmpty(newDestination)) { + Location newLocationQuery = new Location(newDestination); + List newLocations = locationService.selLocations(newLocationQuery); + for (Location newLocation : newLocations) { + newLocation.setVehicleId(currentTask.getVehicleNo()); + newLocation.setLocationStatus(LocationStatus.EMPTY.getCode()); + locationService.modifyLocation(newLocation); + break; + } + } + // WCS取消任务 + } else if (taskStatusRequest == 1) {// 取消任务 + logger.info("任务取消"); + WmsReceiveTaskResultEntity sendToWmsRequest = new WmsReceiveTaskResultEntity(); + sendToWmsRequest.setTaskId(taskGroupId); + sendToWmsRequest.setTaskStatus(WcsTaskStatus.CANCEL.getCode()); + sendToWmsRequest.setVehicleNo(currentTask.getVehicleNo()); + sendToWmsRequest.setDestination(currentTask.getDestination()); + taskController.receiveTaskResult(sendToWmsRequest); + wcsTaskStatusAfter = 999; + } else if (taskStatusRequest == 2) {// 完成任务 + logger.info("任务完成"); + WmsReceiveTaskResultEntity sendToWmsRequest = new WmsReceiveTaskResultEntity(); + sendToWmsRequest.setTaskId(taskGroupId); + sendToWmsRequest.setTaskStatus(WcsTaskStatus.FINISH.getCode()); + sendToWmsRequest.setVehicleNo(currentTask.getVehicleNo()); + sendToWmsRequest.setDestination(currentTask.getDestination()); + taskController.receiveTaskResult(sendToWmsRequest); + wcsTaskStatusAfter = 3; + } + // 向WCS反馈 + WmsReceiveTaskResultEntity sendToWcsRequest = new WmsReceiveTaskResultEntity(); + sendToWcsRequest.setTaskId(taskGroupId); + sendToWcsRequest.setTaskStatus(wcsTaskStatusAfter); + if (StringUtils.isNotEmpty(newDestination)) { + sendToWcsRequest.setDestination(newDestination); + } + ResponseEntity response1; + for (int i = 0; i < 5; i++) { + response1 = JSON.parseObject(HttpUtils.sendHttpPostWithoutToken(UrlEnums.URL_WMS_TO_WCS_CHANGE_TASK.getValue(), JSON.toJSONString(sendToWcsRequest)), ResponseEntity.class); + logger.info("向WCS反馈任务状态变更"); + if (Objects.equals(response1.getCode(), 0)) {// 发送成功,则不再发送;不成功,一共尝试发送5次 + break; + } + } + logger.info("更新任务状态成功"); + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("更新任务状态成功"); + return JSON.toJSONString(response); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.error("发生异常{}", e.getMessage()); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("发生异常" + e.getMessage()); + return JSON.toJSONString(response); + } + } + + /** + * 删除kate清单数据 + * + * @param request 请求参数 + * @return 结果 + */ + @PostMapping("/deleteAllKateTasks") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String deleteAllKateTasks(@RequestBody Task request) { + logger.info("用户请求删除配料任务清单,包括配件、合件、紧急件,用户名:{},ip地址:{}", request.getUserName(), HttpUtils.getIpAddr(servletRequest)); + ResponseEntity response = new ResponseEntity(); + try { + // 有任务正在执行时不允许删除清单 + Task taskQuery = new Task(); + taskQuery.setTaskType(TaskType.OUT.getCode()); + List tasks = taskService.selTasks(taskQuery); + if (tasks.size() > 0) { + for (Task task : tasks) { + if (StringUtils.isNotEmpty(task.getKateTaskId())) {// 卡特任务未做完 + logger.error("卡特任务未做完,不允许删除"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("卡特任务未做完,不允许删除"); + return JSON.toJSONString(response); + } + } + } + stockService.resetStock(new Stock()); + logger.info("删除任务清单成功"); + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("删除任务清单成功"); + return JSON.toJSONString(response); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.error("发生异常{}", e.getMessage()); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("发生异常" + e.getMessage()); + return JSON.toJSONString(response); + } + } +} diff --git a/src/main/java/com/wms/controller/TestController.java b/src/main/java/com/wms/controller/TestController.java new file mode 100644 index 0000000..ca545da --- /dev/null +++ b/src/main/java/com/wms/controller/TestController.java @@ -0,0 +1,236 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.wms.constants.enums.LocationStatus; +import com.wms.constants.enums.ResponseCode; +import com.wms.constants.enums.VehicleStatus; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.table.Location; +import com.wms.entity.table.User; +import com.wms.entity.table.Vehicle; +import com.wms.entity.test.ExcelTest; +import com.wms.service.LocationService; +import com.wms.service.VehicleService; +import com.wms.utils.MyPassword; +import com.wms.utils.excel.ExcelUtils; +import jakarta.servlet.http.HttpServletResponse; +import lombok.RequiredArgsConstructor; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.ArrayList; +import java.util.List; + +/** + * 测试控制类 + */ +@Controller +@CrossOrigin +@RequestMapping(value = "/wms/test") +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class TestController extends BaseController { + /** + * 库位服务 + */ + private final LocationService locationService; + private final VehicleService vehicleService; + + @PostMapping("/genLocations") + @ResponseBody + public String genLocations() { + // 巷道1 一共2排45列12层 + for (int i = 1; i <= 2; i++) {// 排 + for (int j = 1; j <= 45; j++) {// 列 + for (int k = 1; k <= 12; k++) {// 层 + Location tempLocation = new Location(); + tempLocation.setLocationId(StringUtils.leftPad(String.valueOf(i), 2, "0") + StringUtils.leftPad(String.valueOf(j), 2, "0") + StringUtils.leftPad(String.valueOf(k), 2, "0")); + tempLocation.setAreaId(1); + tempLocation.setTunnelId(1); + tempLocation.setEquipmentId(1); + tempLocation.setLocationType(0); + tempLocation.setQueue(i); + tempLocation.setLine(j); + tempLocation.setLayer(k); + tempLocation.setDepth(1); + tempLocation.setIsLock(0); + tempLocation.setLocationStatus(0); + if (locationService.selLocations(tempLocation).size() == 0) { + locationService.addLocation(tempLocation); + } + } + } + } +// // 巷道2 +// for (int i = 3; i <= 4; i++) {// 排 +// for (int j = 3; j <= 34; j++) {// 列 +// Location tempLocation = new Location(); +// tempLocation.setLocationId(StringUtils.leftPad(String.valueOf(i), 2, "0") + StringUtils.leftPad(String.valueOf(j), 2, "0") + StringUtils.leftPad(String.valueOf(13), 2, "0")); +// tempLocation.setAreaId(1); +// tempLocation.setTunnelId(2); +// tempLocation.setEquipmentId(2); +// tempLocation.setLocationType(0); +// tempLocation.setQueue(i); +// tempLocation.setLine(j); +// tempLocation.setLayer(13); +// tempLocation.setDepth(1); +// tempLocation.setIsLock(0); +// tempLocation.setLocationStatus(0); +// locationService.addLocation(tempLocation); +// } +// } + return "success"; + } + + @PostMapping("/genETagLocations") + @ResponseBody + public String genETagLocations() { +// for (int i = 1; i <= 40; i++) { +// ETagLocation eTagLocation = new ETagLocation(); +// eTagLocation.setLocationId("A" + StringUtils.leftPad(String.valueOf(i), 2, "0")); +// eTagLocation.setAreaId("1"); +// eTagLocation.setStandId("2001"); +// eTagLocation.setSequenceNo(i); +// eTagLocationService.addETagLocation(eTagLocation); +// } +// for (int i = 1; i <= 70; i++) { +// ETagLocation eTagLocation = new ETagLocation(); +// eTagLocation.setLocationId("B" + StringUtils.leftPad(String.valueOf(i), 2, "0")); +// eTagLocation.setAreaId("2"); +// eTagLocation.setStandId("2002"); +// eTagLocation.setSequenceNo(i); +// eTagLocationService.addETagLocation(eTagLocation); +// } +// for (int i = 1; i <= 70; i++) { +// ETagLocation eTagLocation = new ETagLocation(); +// eTagLocation.setLocationId("C" + StringUtils.leftPad(String.valueOf(i), 2, "0")); +// eTagLocation.setAreaId("3"); +// eTagLocation.setStandId("2003"); +// eTagLocation.setSequenceNo(i); +// eTagLocationService.addETagLocation(eTagLocation); +// } +// for (int i = 1; i <= 70; i++) { +// ETagLocation eTagLocation = new ETagLocation(); +// eTagLocation.setLocationId("D" + StringUtils.leftPad(String.valueOf(i), 2, "0")); +// eTagLocation.setAreaId("4"); +// eTagLocation.setStandId("2004"); +// eTagLocation.setSequenceNo(i); +// eTagLocationService.addETagLocation(eTagLocation); +// } +// for (int i = 1; i <= 70; i++) { +// ETagLocation eTagLocation = new ETagLocation(); +// eTagLocation.setLocationId("E" + StringUtils.leftPad(String.valueOf(i), 2, "0")); +// eTagLocation.setAreaId("5"); +// eTagLocation.setStandId("2005"); +// eTagLocation.setSequenceNo(i); +// eTagLocationService.addETagLocation(eTagLocation); +// } +// for (int i = 1; i <= 70; i++) { +// ETagLocation eTagLocation = new ETagLocation(); +// eTagLocation.setLocationId("F" + StringUtils.leftPad(String.valueOf(i), 2, "0")); +// eTagLocation.setAreaId("6"); +// eTagLocation.setStandId("2006"); +// eTagLocation.setSequenceNo(i); +// eTagLocationService.addETagLocation(eTagLocation); +// } +// for (int i = 1; i <= 70; i++) { +// ETagLocation eTagLocation = new ETagLocation(); +// eTagLocation.setLocationId("G" + StringUtils.leftPad(String.valueOf(i), 2, "0")); +// eTagLocation.setAreaId("7"); +// eTagLocation.setStandId("2007"); +// eTagLocation.setSequenceNo(i); +// eTagLocationService.addETagLocation(eTagLocation); +// } +// for (int i = 1; i <= 40; i++) { +// ETagLocation eTagLocation = new ETagLocation(); +// eTagLocation.setLocationId("H" + StringUtils.leftPad(String.valueOf(i), 2, "0")); +// eTagLocation.setAreaId("8"); +// eTagLocation.setStandId("2008"); +// eTagLocation.setSequenceNo(i); +// eTagLocationService.addETagLocation(eTagLocation); +// } + return "success"; + } + + /** + * 测试导入 + * + * @param file 文件 + * @return 导入结果 + */ + @PostMapping("/testExcelImport") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String testExcelImport(@RequestPart("file") MultipartFile file) { + ResponseEntity response = new ResponseEntity(); + try { + List tests = ExcelUtils.readMultipartFile(file, ExcelTest.class); + for (ExcelTest test : tests) { + // 更新库位 + Location locationQuery = new Location(); + locationQuery.setLocationId(test.getLocationId()); + List locations = locationService.selLocations(locationQuery); + if (locations.size() > 0) { + Location currentLocation = locations.get(0); + currentLocation.setLocationStatus(LocationStatus.OCCUPY.getCode()); + currentLocation.setVehicleId("XZBK" + StringUtils.leftPad(test.getVehicleId().trim(), 4, "0")); + locationService.modifyLocation(currentLocation); + // 添加载具 + Vehicle vehicle = new Vehicle(); + vehicle.setVehicleId("XZBK" + StringUtils.leftPad(test.getVehicleId().trim(), 4, "0")); + vehicle.setCurrentLocation(test.getLocationId()); + vehicle.setVehicleStatus(VehicleStatus.ON.getCode()); + vehicle.setIsEmpty(1); + if (vehicleService.selVehicleById(test.getVehicleId()) == null) { + vehicleService.addVehicle(vehicle); + } else { + vehicleService.modifyVehicle(vehicle); + } + } + } + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("导入excel成功"); + response.setReturnData(tests); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("导入excel发生错误"); + } + logger.info(JSON.toJSONString(response)); + return JSON.toJSONString(response); + } + + /** + * 测试导出 + * + * @param response 请求 + */ + @GetMapping("/testExcelExport") + @ResponseBody + public void testExcelExport(HttpServletResponse response) { + List tests = new ArrayList<>(); + ExcelTest temp1 = new ExcelTest("010101", "XZBK0001"); + ExcelTest temp2 = new ExcelTest("020101", "XZBK0002"); + tests.add(temp1); + tests.add(temp2); + ExcelUtils.export(response, "测试导出", tests, ExcelTest.class); + } + + @PostMapping("/genPassword") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String genPassword(@RequestBody User user) { + ResponseEntity response = new ResponseEntity(); + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("创建密码成功"); + response.setReturnData(MyPassword.encrypt(user.getLoginPassword())); + return JSON.toJSONString(response); + } +} diff --git a/src/main/java/com/wms/controller/UserController.java b/src/main/java/com/wms/controller/UserController.java new file mode 100644 index 0000000..6357295 --- /dev/null +++ b/src/main/java/com/wms/controller/UserController.java @@ -0,0 +1,205 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.wms.constants.enums.ResponseCode; +import com.wms.entity.app.MenuEntity; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.app.UserConfigEntity; +import com.wms.entity.table.Menu; +import com.wms.entity.table.User; +import com.wms.service.MenuService; +import com.wms.service.UserService; +import com.wms.utils.MyPassword; +import com.wms.constants.WmsConstants; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import org.springframework.web.bind.annotation.*; + +import java.util.LinkedList; +import java.util.List; +import java.util.Objects; + +/** + * WMS用户控制类 + * @author 梁州 + * @date 2023/2/14 + */ +@Controller +@CrossOrigin +@RequestMapping(value = "/wms/user") +public class UserController extends BaseController { + /** + * 用户服务 + */ + final UserService userService; + /** + * 菜单服务 + */ + final MenuService menuService; + + @Autowired + public UserController(UserService userService, MenuService menuService) { + this.userService = userService; + this.menuService = menuService; + } + + /** + * 带密码登录 + * @param user 用户 + * @return 结果 + */ + @PostMapping("/loginWithAuth") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String loginWithAuth(@RequestBody User user) { + logger.info("WMS前端用户登录,登录账户名:{}", user.getLoginAccount()); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + // 查找对应用户的信息 + User userForQuery = new User(); + userForQuery.setLoginAccount(user.getLoginAccount()); + List waitForAuthUsers = userService.selectUsers(userForQuery); + if (waitForAuthUsers.size() < 1) { + logger.error("用户不存在,登录账户名:{}", user.getLoginAccount()); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("用户不存在"); + return JSON.toJSONString(rsp); + } + // 验证密码 + User waitForAuthUser = waitForAuthUsers.get(0); + if (!Objects.equals(MyPassword.encrypt(user.getLoginPassword()), waitForAuthUser.getLoginPassword())) { + logger.error("密码错误,登录账户名:{}", user.getLoginAccount()); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("密码错误"); + return JSON.toJSONString(rsp); + } + // 当前用户 + User currentUser = waitForAuthUsers.get(0); + + // 返回成功 + logger.info("登录成功,登录账户名:{}", currentUser.getLoginAccount()); + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("登录成功"); + // 返回用户数据 + rsp.setReturnData(generateUserInfo(currentUser)); + return JSON.toJSONString(rsp); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("数据库错误:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + } + + /** + * 无密码登录 + * @param user 用户 + * @return 结果 + */ + @PostMapping("/loginWithoutAuth") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String loginWithoutAuth(@RequestBody User user) { + logger.info("WMS前端用户登录,登录账户名:{}", user.getLoginAccount()); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + // 查找对应用户的信息 + User userForQuery = new User(); + userForQuery.setLoginAccount(user.getLoginAccount()); + List waitForAuthUsers = userService.selectUsers(userForQuery); + if (waitForAuthUsers.size() < 1) { + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("用户不存在"); + return JSON.toJSONString(rsp); + } + User currentUser = waitForAuthUsers.get(0); + // 返回成功 + logger.info("登录成功,登录账户名:{}", currentUser.getLoginAccount()); + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("登录成功"); + // 返回用户数据 + rsp.setReturnData(generateUserInfo(currentUser)); + return JSON.toJSONString(rsp); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("数据库错误:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("数据库错误"); + return JSON.toJSONString(rsp); + } + } + + /** + * 构造用户信息(菜单、按钮等权限) + * @param currentUser 当前用户 + * @return 用户信息 + */ + private UserConfigEntity generateUserInfo (User currentUser) { + UserConfigEntity userConfigEntity = new UserConfigEntity(); + try { + List menus = menuService.selMenuByRoleId(currentUser.getRoleId()); + List menuList = new LinkedList<>(); + // 查找一级菜单 + for (Menu firstMenu : menus) { + if (WmsConstants.ROOT_MENU_ID.equals(firstMenu.getParentId())) {// 查找到所有的一级子菜单 + MenuEntity tempFirstMenu = new MenuEntity(); + tempFirstMenu.setId(firstMenu.getMenuId());// ID + tempFirstMenu.setLabelName(firstMenu.getLabelName());// 菜单显示名称 + tempFirstMenu.setIconValue(firstMenu.getIconValue());// 图标 + tempFirstMenu.setPath(firstMenu.getPath());// 路径 + // 设置子菜单 + List tempFirstMenuChildren = new LinkedList<>(); + for (Menu secondMenu : menus) { + if (firstMenu.getMenuId().equals(secondMenu.getParentId())) { + MenuEntity tempSecondMenu = new MenuEntity(); + tempSecondMenu.setId(secondMenu.getMenuId());// ID + tempSecondMenu.setLabelName(secondMenu.getLabelName());// 菜单显示名称 + tempSecondMenu.setIconValue(secondMenu.getIconValue());// 图标 + tempSecondMenu.setPath(secondMenu.getPath());// 路径 + // 设置子菜单 + List tempSecondMenuChildren = new LinkedList<>(); + for (Menu thirdMenu : menus) { + if (secondMenu.getMenuId().equals(thirdMenu.getParentId())) { + MenuEntity tempThirdMenu = new MenuEntity(); + tempSecondMenu.setId(thirdMenu.getMenuId());// ID + tempSecondMenu.setLabelName(thirdMenu.getLabelName());// 菜单显示名称 + tempSecondMenu.setIconValue(thirdMenu.getIconValue());// 图标 + tempSecondMenu.setPath(thirdMenu.getPath());// 路径 + // 添加按钮 + tempSecondMenuChildren.add(tempThirdMenu); + } + } + tempSecondMenu.setChildren(tempSecondMenuChildren); + // 添加二级菜单 + tempFirstMenuChildren.add(tempSecondMenu); + } + } + tempFirstMenu.setChildren(tempFirstMenuChildren); + // 添加一级菜单 + menuList.add(tempFirstMenu); + } + } + logger.info("构造用户信息成功,当前用户:{}", currentUser.toLoggerString()); + // 设置返回信息 + userConfigEntity.setUser(currentUser); + userConfigEntity.setMenuList(menuList); + } catch (Exception e) { + logger.error("构造用户信息失败,当前用户:{}", currentUser.toLoggerString()); + } + return userConfigEntity; + } +} diff --git a/src/main/java/com/wms/controller/parent/MesController.java b/src/main/java/com/wms/controller/parent/MesController.java new file mode 100644 index 0000000..704a1e5 --- /dev/null +++ b/src/main/java/com/wms/controller/parent/MesController.java @@ -0,0 +1,17 @@ +package com.wms.controller.parent; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.RequestMapping; + +/** + * 和 mes 交互使用的 controller + * @author icewint + */ +@Controller +@CrossOrigin +@RequestMapping(value = "/wms/mes") +public class MesController { + + +} diff --git a/src/main/java/com/wms/entity/BaseEntity.java b/src/main/java/com/wms/entity/BaseEntity.java new file mode 100644 index 0000000..36ab926 --- /dev/null +++ b/src/main/java/com/wms/entity/BaseEntity.java @@ -0,0 +1,9 @@ +package com.wms.entity; + +import com.alibaba.fastjson2.JSON; + +public class BaseEntity { + public String toLoggerString() { + return JSON.toJSONString(this); + } +} diff --git a/src/main/java/com/wms/entity/app/FinishPickTaskRequest.java b/src/main/java/com/wms/entity/app/FinishPickTaskRequest.java new file mode 100644 index 0000000..77377bd --- /dev/null +++ b/src/main/java/com/wms/entity/app/FinishPickTaskRequest.java @@ -0,0 +1,139 @@ +package com.wms.entity.app; + +/** + * 完成当前载具拣货任务实体类 + */ +public class FinishPickTaskRequest { + /** + * 任务id + */ + private String taskId; + /** + * 卡特任务id + */ + private String kateTaskId; + /** + * 料盒号 + */ + private String boxNo; + /** + * 零件号 + */ + private String partNo; + /** + * 需求/分配数量 + */ + private Integer needNum; + /** + * 实际库存 + */ + private Integer realNum; + /** + * 实际拣货数量 + */ + private Integer realPickNum; + /** + * 载具号 + */ + private String vehicleNo; + /** + * 出库数量 + */ + private Integer goodsNum; + /** + * 重量 + */ + private Double weight; + /** + * 拣选数量 + */ + private Integer pickNum; + + public String getTaskId() { + return taskId; + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + public String getKateTaskId() { + return kateTaskId; + } + + public void setKateTaskId(String kateTaskId) { + this.kateTaskId = kateTaskId; + } + + public String getBoxNo() { + return boxNo; + } + + public void setBoxNo(String boxNo) { + this.boxNo = boxNo; + } + + public String getPartNo() { + return partNo; + } + + public void setPartNo(String partNo) { + this.partNo = partNo; + } + + public Integer getNeedNum() { + return needNum; + } + + public void setNeedNum(Integer needNum) { + this.needNum = needNum; + } + + public Integer getRealNum() { + return realNum; + } + + public void setRealNum(Integer realNum) { + this.realNum = realNum; + } + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public Integer getRealPickNum() { + return realPickNum; + } + + public void setRealPickNum(Integer realPickNum) { + this.realPickNum = realPickNum; + } + + public Integer getGoodsNum() { + return goodsNum; + } + + public void setGoodsNum(Integer goodsNum) { + this.goodsNum = goodsNum; + } + + public Double getWeight() { + return weight; + } + + public void setWeight(Double weight) { + this.weight = weight; + } + + public Integer getPickNum() { + return pickNum; + } + + public void setPickNum(Integer pickNum) { + this.pickNum = pickNum; + } +} diff --git a/src/main/java/com/wms/entity/app/FinishVehicleAndPartRequest.java b/src/main/java/com/wms/entity/app/FinishVehicleAndPartRequest.java new file mode 100644 index 0000000..0b57214 --- /dev/null +++ b/src/main/java/com/wms/entity/app/FinishVehicleAndPartRequest.java @@ -0,0 +1,31 @@ +package com.wms.entity.app; + +/** + * 完成当前载具的当次拣货任务 + */ +public class FinishVehicleAndPartRequest { + /** + * wms任务号 + */ + private String wmsTaskId; + /** + * 实际拣货数量 + */ + private Integer realPickNum; + + public String getWmsTaskId() { + return wmsTaskId; + } + + public void setWmsTaskId(String wmsTaskId) { + this.wmsTaskId = wmsTaskId; + } + + public Integer getRealPickNum() { + return realPickNum; + } + + public void setRealPickNum(Integer realPickNum) { + this.realPickNum = realPickNum; + } +} diff --git a/src/main/java/com/wms/entity/app/InventoryTask.java b/src/main/java/com/wms/entity/app/InventoryTask.java new file mode 100644 index 0000000..bba21a6 --- /dev/null +++ b/src/main/java/com/wms/entity/app/InventoryTask.java @@ -0,0 +1,57 @@ +package com.wms.entity.app; + +import com.wms.entity.BaseEntity; + +/** + * 盘点任务信息 + */ +public class InventoryTask extends BaseEntity { + /** + * 零件号 + */ + private String goodsId; + /** + * 料箱号 + */ + private String vehicleId; + /** + * 库区id + */ + private String areaId; + /** + * 用户 + */ + private String userName; + + public String getGoodsId() { + return goodsId; + } + + public void setGoodsId(String goodsId) { + this.goodsId = goodsId; + } + + public String getVehicleId() { + return vehicleId; + } + + public void setVehicleId(String vehicleId) { + this.vehicleId = vehicleId; + } + + public String getAreaId() { + return areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } +} diff --git a/src/main/java/com/wms/entity/app/LayerLocation.java b/src/main/java/com/wms/entity/app/LayerLocation.java new file mode 100644 index 0000000..956a04f --- /dev/null +++ b/src/main/java/com/wms/entity/app/LayerLocation.java @@ -0,0 +1,36 @@ +package com.wms.entity.app; + +import com.wms.entity.table.Location; + +import java.util.List; + +/** + * 按层划分的库位实体类 + */ +public class LayerLocation { + /** + * 当前层 + */ + private Integer layer; + + /** + * 当前层的所有库位 + */ + private List currentColLocations; + + public Integer getLayer() { + return layer; + } + + public void setLayer(Integer layer) { + this.layer = layer; + } + + public List getCurrentColLocations() { + return currentColLocations; + } + + public void setCurrentColLocations(List currentColLocations) { + this.currentColLocations = currentColLocations; + } +} diff --git a/src/main/java/com/wms/entity/app/MenuEntity.java b/src/main/java/com/wms/entity/app/MenuEntity.java new file mode 100644 index 0000000..a779176 --- /dev/null +++ b/src/main/java/com/wms/entity/app/MenuEntity.java @@ -0,0 +1,70 @@ +package com.wms.entity.app; + +import java.util.List; + +public class MenuEntity { + /** + * 菜单Id + */ + private String id; + + /** + * 菜单名称 + */ + private String labelName; + + /** + * 图标值 + */ + private String iconValue; + + /** + * 地址 + */ + private String path; + + /** + * 子菜单 + */ + private List children; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getLabelName() { + return labelName; + } + + public void setLabelName(String labelName) { + this.labelName = labelName; + } + + public String getIconValue() { + return iconValue; + } + + public void setIconValue(String iconValue) { + this.iconValue = iconValue; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public List getChildren() { + return children; + } + + public void setChildren(List children) { + this.children = children; + } +} diff --git a/src/main/java/com/wms/entity/app/ResponseEntity.java b/src/main/java/com/wms/entity/app/ResponseEntity.java new file mode 100644 index 0000000..b16c506 --- /dev/null +++ b/src/main/java/com/wms/entity/app/ResponseEntity.java @@ -0,0 +1,48 @@ +package com.wms.entity.app; + +import com.wms.entity.BaseEntity; + +/** + * 接口响应实体类 + */ +public class ResponseEntity extends BaseEntity { + + /** + * 响应代码 + */ + private Integer code; + + /** + * 错误信息 + */ + private String message; + + /** + * 返回数据(非必须) + */ + private Object returnData; + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public Object getReturnData() { + return returnData; + } + + public void setReturnData(Object returnData) { + this.returnData = returnData; + } +} diff --git a/src/main/java/com/wms/entity/app/RowLocation.java b/src/main/java/com/wms/entity/app/RowLocation.java new file mode 100644 index 0000000..d90d50a --- /dev/null +++ b/src/main/java/com/wms/entity/app/RowLocation.java @@ -0,0 +1,34 @@ +package com.wms.entity.app; + +import java.util.List; + +/** + * 排 + */ +public class RowLocation { + /** + * 当前排 + */ + private Integer row; + + /** + * 当前排的所有库位 + */ + private List currentLayerLocations; + + public Integer getRow() { + return row; + } + + public void setRow(Integer row) { + this.row = row; + } + + public List getCurrentLayerLocations() { + return currentLayerLocations; + } + + public void setCurrentLayerLocations(List currentLayerLocations) { + this.currentLayerLocations = currentLayerLocations; + } +} diff --git a/src/main/java/com/wms/entity/app/TaskInRequestEntity.java b/src/main/java/com/wms/entity/app/TaskInRequestEntity.java new file mode 100644 index 0000000..bd54e4a --- /dev/null +++ b/src/main/java/com/wms/entity/app/TaskInRequestEntity.java @@ -0,0 +1,166 @@ +package com.wms.entity.app; + +import com.wms.entity.BaseEntity; + +import java.util.Date; + +/** + * WMS接收入库任务的接口实体类 + */ +public class TaskInRequestEntity extends BaseEntity { + /** + * 物料编号 + */ + private String goodsId; + + /** + * 批次号 + */ + private String batchNo; + + /** + * 入库数量 + */ + private Integer goodsNum; + + /** + * 入库日期/生产日期 + */ + private Date productionDate; + + /** + * 托盘号 + */ + private String vehicleNo; + + /** + * 尺寸 + */ + private Integer vehicleSize; + + /** + * 重量 + */ + private Double weight; + + /** + * 起始位置 + */ + private String origin; + + /** + * 目标位置 + */ + private String destination; + + /** + * 入库库位类型:是否为虚拟库位 0:虚拟库位;1:真实库位 + */ + private String isVirtual; + + /** + * 是否空箱入库 0:空箱入库;1:带料入库 + */ + private String isEmpty; + + /** + * 用户 + */ + private String userName; + + public String getGoodsId() { + return goodsId; + } + + public void setGoodsId(String goodsId) { + this.goodsId = goodsId; + } + + public String getBatchNo() { + return batchNo; + } + + public void setBatchNo(String batchNo) { + this.batchNo = batchNo; + } + + public Integer getGoodsNum() { + return goodsNum; + } + + public void setGoodsNum(Integer goodsNum) { + this.goodsNum = goodsNum; + } + + public Date getProductionDate() { + return productionDate; + } + + public void setProductionDate(Date productionDate) { + this.productionDate = productionDate; + } + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public Double getWeight() { + return weight; + } + + public void setWeight(Double weight) { + this.weight = weight; + } + + public String getOrigin() { + return origin; + } + + public void setOrigin(String origin) { + this.origin = origin; + } + + public String getDestination() { + return destination; + } + + public void setDestination(String destination) { + this.destination = destination; + } + + public Integer getVehicleSize() { + return vehicleSize; + } + + public void setVehicleSize(Integer vehicleSize) { + this.vehicleSize = vehicleSize; + } + + public String getIsVirtual() { + return isVirtual; + } + + public void setIsVirtual(String isVirtual) { + this.isVirtual = isVirtual; + } + + public String getIsEmpty() { + return isEmpty; + } + + public void setIsEmpty(String isEmpty) { + this.isEmpty = isEmpty; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } +} diff --git a/src/main/java/com/wms/entity/app/TaskOutRequestEntity.java b/src/main/java/com/wms/entity/app/TaskOutRequestEntity.java new file mode 100644 index 0000000..f505193 --- /dev/null +++ b/src/main/java/com/wms/entity/app/TaskOutRequestEntity.java @@ -0,0 +1,57 @@ +package com.wms.entity.app; + +import com.wms.entity.BaseEntity; + +/** + * 前台向后台发送出库请求实体类 + */ +public class TaskOutRequestEntity extends BaseEntity { + /** + * 物料编号 + */ + private String goodsId; + /** + * 需求数量 + */ + private Integer needNum; + /** + * 载具编号 + */ + private String vehicleNo; + /** + * 用户名称 + */ + private String userName; + + public String getGoodsId() { + return goodsId; + } + + public void setGoodsId(String goodsId) { + this.goodsId = goodsId; + } + + public Integer getNeedNum() { + return needNum; + } + + public void setNeedNum(Integer needNum) { + this.needNum = needNum; + } + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } +} diff --git a/src/main/java/com/wms/entity/app/UserConfigEntity.java b/src/main/java/com/wms/entity/app/UserConfigEntity.java new file mode 100644 index 0000000..b09116c --- /dev/null +++ b/src/main/java/com/wms/entity/app/UserConfigEntity.java @@ -0,0 +1,34 @@ +package com.wms.entity.app; + +import com.wms.entity.table.User; +import com.wms.entity.BaseEntity; + +import java.util.List; + +public class UserConfigEntity extends BaseEntity { + /** + * 用户认证信息 + */ + private User user; + + /** + * 菜单及各种按钮信息 + */ + private List menuList; + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public List getMenuList() { + return menuList; + } + + public void setMenuList(List menuList) { + this.menuList = menuList; + } +} diff --git a/src/main/java/com/wms/entity/app/display/LocationData.java b/src/main/java/com/wms/entity/app/display/LocationData.java new file mode 100644 index 0000000..2c9f2b9 --- /dev/null +++ b/src/main/java/com/wms/entity/app/display/LocationData.java @@ -0,0 +1,55 @@ +package com.wms.entity.app.display; + +/** + * 大屏用数据详细类 + */ +public class LocationData { + /** + * 零件号 + */ + private String goodsId; + /** + * 零件名称 + */ + private String goodsName; + /** + * 数量 + */ + private Integer goodsNum; + /** + * 备注 + */ + private String remark; + + public String getGoodsId() { + return goodsId; + } + + public void setGoodsId(String goodsId) { + this.goodsId = goodsId; + } + + public String getGoodsName() { + return goodsName; + } + + public void setGoodsName(String goodsName) { + this.goodsName = goodsName; + } + + public Integer getGoodsNum() { + return goodsNum; + } + + public void setGoodsNum(Integer goodsNum) { + this.goodsNum = goodsNum; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } +} diff --git a/src/main/java/com/wms/entity/app/display/LocationInfo.java b/src/main/java/com/wms/entity/app/display/LocationInfo.java new file mode 100644 index 0000000..10eeee1 --- /dev/null +++ b/src/main/java/com/wms/entity/app/display/LocationInfo.java @@ -0,0 +1,45 @@ +package com.wms.entity.app.display; + +import java.util.List; + +/** + * 大屏用库位信息 + */ +public class LocationInfo { + /** + * 库位编号 + */ + private String locationId; + /** + * 料箱号 + */ + private String vehicleNo; + /** + * 详细数据 + */ + private List locationData; + + public String getLocationId() { + return locationId; + } + + public void setLocationId(String locationId) { + this.locationId = locationId; + } + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public List getLocationData() { + return locationData; + } + + public void setLocationData(List locationData) { + this.locationData = locationData; + } +} diff --git a/src/main/java/com/wms/entity/app/wcs/DisposeStandRequest.java b/src/main/java/com/wms/entity/app/wcs/DisposeStandRequest.java new file mode 100644 index 0000000..9de2ab6 --- /dev/null +++ b/src/main/java/com/wms/entity/app/wcs/DisposeStandRequest.java @@ -0,0 +1,40 @@ +package com.wms.entity.app.wcs; + +public class DisposeStandRequest { + /** + * 站台 + */ + private String pickStand; + /** + * 载具号 + */ + private String vehicleNo; + /** + * 状态 + */ + private Integer status; + + public String getPickStand() { + return pickStand; + } + + public void setPickStand(String pickStand) { + this.pickStand = pickStand; + } + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } +} diff --git a/src/main/java/com/wms/entity/app/wcs/PickTaskRequest.java b/src/main/java/com/wms/entity/app/wcs/PickTaskRequest.java new file mode 100644 index 0000000..036c48c --- /dev/null +++ b/src/main/java/com/wms/entity/app/wcs/PickTaskRequest.java @@ -0,0 +1,45 @@ +package com.wms.entity.app.wcs; + +import java.util.List; + +/** + * WCS上报箱子到达接口请求 + */ +public class PickTaskRequest { + /** + * 载具号 + */ + private String vehicleNo; + /** + * 拣选站台 + */ + private List pickStand; + /** + * 备注 + */ + private String remark; + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public List getPickStand() { + return pickStand; + } + + public void setPickStand(List pickStand) { + this.pickStand = pickStand; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } +} diff --git a/src/main/java/com/wms/entity/app/wcs/PickTaskResponse.java b/src/main/java/com/wms/entity/app/wcs/PickTaskResponse.java new file mode 100644 index 0000000..6d1f449 --- /dev/null +++ b/src/main/java/com/wms/entity/app/wcs/PickTaskResponse.java @@ -0,0 +1,40 @@ +package com.wms.entity.app.wcs; + +public class PickTaskResponse { + /** + * 载具号 + */ + private String vehicleNo; + /** + * 拣选站台 + */ + private String pickStand; + /** + * 备注 + */ + private String remark; + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public String getPickStand() { + return pickStand; + } + + public void setPickStand(String pickStand) { + this.pickStand = pickStand; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } +} diff --git a/src/main/java/com/wms/entity/app/wcs/RequireInRequest.java b/src/main/java/com/wms/entity/app/wcs/RequireInRequest.java new file mode 100644 index 0000000..3036abf --- /dev/null +++ b/src/main/java/com/wms/entity/app/wcs/RequireInRequest.java @@ -0,0 +1,55 @@ +package com.wms.entity.app.wcs; + +/** + * WCS请求载具入库 实体类 + */ +public class RequireInRequest { + /** + * 点位 + */ + private String point; + /** + * 载具编号 + */ + private String vehicleNo; + /** + * 条码信息 + */ + private String codeMessage; + /** + * 备注 + */ + private String remark; + + public String getPoint() { + return point; + } + + public void setPoint(String point) { + this.point = point; + } + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public String getCodeMessage() { + return codeMessage; + } + + public void setCodeMessage(String codeMessage) { + this.codeMessage = codeMessage; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } +} diff --git a/src/main/java/com/wms/entity/app/wcs/WcsGoods.java b/src/main/java/com/wms/entity/app/wcs/WcsGoods.java new file mode 100644 index 0000000..227b094 --- /dev/null +++ b/src/main/java/com/wms/entity/app/wcs/WcsGoods.java @@ -0,0 +1,83 @@ +package com.wms.entity.app.wcs; + +import com.wms.entity.BaseEntity; + +import java.math.BigDecimal; + +/** + * wcs需要的物料信息 + */ +public class WcsGoods extends BaseEntity { + /** + * 物品编号 + */ + private String goodsId; + /** + * 物品名称 + */ + private String goodsName; + /** + * 物品批次 + */ + private String batch; + /** + * 物品条码 + */ + private String goodsCode; + /** + * 物品单位 + */ + private String unit; + /** + * 物品数量 + */ + private BigDecimal goodsNum; + + public String getGoodsId() { + return goodsId; + } + + public void setGoodsId(String goodsId) { + this.goodsId = goodsId; + } + + public String getGoodsName() { + return goodsName; + } + + public void setGoodsName(String goodsName) { + this.goodsName = goodsName; + } + + public String getBatch() { + return batch; + } + + public void setBatch(String batch) { + this.batch = batch; + } + + public String getGoodsCode() { + return goodsCode; + } + + public void setGoodsCode(String goodsCode) { + this.goodsCode = goodsCode; + } + + public String getUnit() { + return unit; + } + + public void setUnit(String unit) { + this.unit = unit; + } + + public BigDecimal getGoodsNum() { + return goodsNum; + } + + public void setGoodsNum(BigDecimal goodsNum) { + this.goodsNum = goodsNum; + } +} diff --git a/src/main/java/com/wms/entity/app/wcs/WcsTask.java b/src/main/java/com/wms/entity/app/wcs/WcsTask.java new file mode 100644 index 0000000..f3d697f --- /dev/null +++ b/src/main/java/com/wms/entity/app/wcs/WcsTask.java @@ -0,0 +1,152 @@ +package com.wms.entity.app.wcs; + +import com.wms.entity.BaseEntity; + +/** + * WMS向WCS发送任务请求的实体类 + */ +public class WcsTask extends BaseEntity { + + /** + * 任务编号 + */ + private String taskId; + + /** + * 任务类型 + */ + private Integer taskType; + + /** + * 优先级 + */ + private Integer priority; + + /** + * 任务状态 + */ + private Integer taskStatus; + + /** + * 起点 + */ + private String origin; + + /** + * 任务中间点 + */ + private String midPoint; + + /** + * 终点 + */ + private String destination; + + /** + * 载具编号 + */ + private String vehicleNo; + + /** + * 载具尺寸 + */ + private Integer vehicleSize; + + /** + * 重量 + */ + private Double weight; + + /** + * 信息---一般填异常信息 + */ + private String message; + + public String getTaskId() { + return taskId; + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + public Integer getTaskType() { + return taskType; + } + + public void setTaskType(Integer taskType) { + this.taskType = taskType; + } + + public Integer getPriority() { + return priority; + } + + public void setPriority(Integer priority) { + this.priority = priority; + } + + public Integer getTaskStatus() { + return taskStatus; + } + + public void setTaskStatus(Integer taskStatus) { + this.taskStatus = taskStatus; + } + + public String getOrigin() { + return origin; + } + + public void setOrigin(String origin) { + this.origin = origin; + } + + public String getMidPoint() { + return midPoint; + } + + public void setMidPoint(String midPoint) { + this.midPoint = midPoint; + } + + public String getDestination() { + return destination; + } + + public void setDestination(String destination) { + this.destination = destination; + } + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public Integer getVehicleSize() { + return vehicleSize; + } + + public void setVehicleSize(Integer vehicleSize) { + this.vehicleSize = vehicleSize; + } + + public Double getWeight() { + return weight; + } + + public void setWeight(Double weight) { + this.weight = weight; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/src/main/java/com/wms/entity/app/wcs/WcsToWmsInspectVesselEntity.java b/src/main/java/com/wms/entity/app/wcs/WcsToWmsInspectVesselEntity.java new file mode 100644 index 0000000..dea894b --- /dev/null +++ b/src/main/java/com/wms/entity/app/wcs/WcsToWmsInspectVesselEntity.java @@ -0,0 +1,102 @@ +package com.wms.entity.app.wcs; + +import com.wms.entity.BaseEntity; + +import java.math.BigDecimal; + +/** + * WCS向WMS发送容器信息的实体类 + */ +public class WcsToWmsInspectVesselEntity extends BaseEntity { + + /** + * 请求时间 + */ + private String requestTime; + + /** + * 任务类型 + */ + private Integer taskType; + + /** + * 载具编号 + */ + private String vehicleNo; + + /** + * 设备编号 + */ + private Integer equipmentId; + + /** + * 地点 + */ + private String place; + + /** + * 尺寸 + */ + private Integer size; + + /** + * 重量 + */ + private BigDecimal weight; + + public String getRequestTime() { + return requestTime; + } + + public void setRequestTime(String requestTime) { + this.requestTime = requestTime; + } + + public Integer getTaskType() { + return taskType; + } + + public void setTaskType(Integer taskType) { + this.taskType = taskType; + } + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public String getPlace() { + return place; + } + + public void setPlace(String place) { + this.place = place; + } + + public Integer getSize() { + return size; + } + + public void setSize(Integer size) { + this.size = size; + } + + public BigDecimal getWeight() { + return weight; + } + + public void setWeight(BigDecimal weight) { + this.weight = weight; + } + + public Integer getEquipmentId() { + return equipmentId; + } + + public void setEquipmentId(Integer equipmentId) { + this.equipmentId = equipmentId; + } +} diff --git a/src/main/java/com/wms/entity/app/wcs/WmsReceiveTaskResultEntity.java b/src/main/java/com/wms/entity/app/wcs/WmsReceiveTaskResultEntity.java new file mode 100644 index 0000000..425c224 --- /dev/null +++ b/src/main/java/com/wms/entity/app/wcs/WmsReceiveTaskResultEntity.java @@ -0,0 +1,70 @@ +package com.wms.entity.app.wcs; + +import com.wms.entity.BaseEntity; + +/** + * WCS向WMS发送任务结果请求实体类 + */ +public class WmsReceiveTaskResultEntity extends BaseEntity { + + /** + * WMS任务编号 + */ + private String taskId; + /** + * 任务状态 + */ + private Integer taskStatus; + /** + * 任务终点 + */ + private String destination; + /** + * 载具号/箱号 + */ + private String vehicleNo; + /** + * 任务信息 + */ + private String message; + + public String getTaskId() { + return taskId; + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + public Integer getTaskStatus() { + return taskStatus; + } + + public void setTaskStatus(Integer taskStatus) { + this.taskStatus = taskStatus; + } + + public String getDestination() { + return destination; + } + + public void setDestination(String destination) { + this.destination = destination; + } + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/src/main/java/com/wms/entity/page/PageDomain.java b/src/main/java/com/wms/entity/page/PageDomain.java new file mode 100644 index 0000000..dc6e300 --- /dev/null +++ b/src/main/java/com/wms/entity/page/PageDomain.java @@ -0,0 +1,67 @@ +package com.wms.entity.page; + +import com.wms.utils.StringUtils; + +/** + * 分页请求 + * 前端表格用 + */ +public class PageDomain { + /** + * 当前记录起始索引 + */ + private Integer pageNum; + /** + * 每页显示记录数 + */ + private Integer pageSize; + /** + *排序列 + */ + private String orderByColumn; + /** + * 排序方向 + */ + private String isAsc = "asc"; + + public String getOrderBy() + { + if (StringUtils.isEmpty(orderByColumn)) + { + return ""; + } + return StringUtils.toUnderScoreCase(orderByColumn) + " " + isAsc; + } + + public Integer getPageNum() { + return pageNum; + } + + public void setPageNum(Integer pageNum) { + this.pageNum = pageNum; + } + + public Integer getPageSize() { + return pageSize; + } + + public void setPageSize(Integer pageSize) { + this.pageSize = pageSize; + } + + public String getOrderByColumn() { + return orderByColumn; + } + + public void setOrderByColumn(String orderByColumn) { + this.orderByColumn = orderByColumn; + } + + public String getIsAsc() { + return isAsc; + } + + public void setIsAsc(String isAsc) { + this.isAsc = isAsc; + } +} diff --git a/src/main/java/com/wms/entity/page/TableRequest.java b/src/main/java/com/wms/entity/page/TableRequest.java new file mode 100644 index 0000000..a29b835 --- /dev/null +++ b/src/main/java/com/wms/entity/page/TableRequest.java @@ -0,0 +1,43 @@ +package com.wms.entity.page; + +/** + * 前端请求表格数据 + */ +public class TableRequest { + /** + * 分页请求数据 + */ + private PageDomain page; + /** + * 参数 + */ + private T param; + /** + * 参数2 + */ + private T2 param2; + + public PageDomain getPage() { + return page; + } + + public void setPage(PageDomain page) { + this.page = page; + } + + public T getParam() { + return param; + } + + public void setParam(T param) { + this.param = param; + } + + public T2 getParam2() { + return param2; + } + + public void setParam2(T2 param2) { + this.param2 = param2; + } +} diff --git a/src/main/java/com/wms/entity/page/TableResponse.java b/src/main/java/com/wms/entity/page/TableResponse.java new file mode 100644 index 0000000..4ea4218 --- /dev/null +++ b/src/main/java/com/wms/entity/page/TableResponse.java @@ -0,0 +1,57 @@ +package com.wms.entity.page; + +import java.util.List; + +/** + * 前端表格请求的返回值 + */ +public class TableResponse { + /** + * 总记录数 + */ + private long total; + /** + * 列表数据 + */ + private List rows; + /** + * 状态码 + */ + private int code; + /** + * 消息 + */ + private String message; + + public long getTotal() { + return total; + } + + public void setTotal(long total) { + this.total = total; + } + + public List getRows() { + return rows; + } + + public void setRows(List rows) { + this.rows = rows; + } + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/src/main/java/com/wms/entity/table/Config.java b/src/main/java/com/wms/entity/table/Config.java new file mode 100644 index 0000000..b0d5979 --- /dev/null +++ b/src/main/java/com/wms/entity/table/Config.java @@ -0,0 +1,73 @@ +package com.wms.entity.table; + +import com.wms.entity.BaseEntity; + +/** + * 配置 + */ +public class Config extends BaseEntity { + /** + * 配置ID + */ + private Integer configId; + + /** + * 配置键 + */ + private String configKey; + + /** + * 配置值 + */ + private String configValue; + + /** + * 配置展示类型 + */ + private String configType; + + /** + * 配置名称 + */ + private String configName; + + public Integer getConfigId() { + return configId; + } + + public void setConfigId(Integer configId) { + this.configId = configId; + } + + public String getConfigKey() { + return configKey; + } + + public void setConfigKey(String configKey) { + this.configKey = configKey; + } + + public String getConfigValue() { + return configValue; + } + + public void setConfigValue(String configValue) { + this.configValue = configValue; + } + + public String getConfigType() { + return configType; + } + + public void setConfigType(String configType) { + this.configType = configType; + } + + public String getConfigName() { + return configName; + } + + public void setConfigName(String configName) { + this.configName = configName; + } +} diff --git a/src/main/java/com/wms/entity/table/Goods.java b/src/main/java/com/wms/entity/table/Goods.java new file mode 100644 index 0000000..4be40f5 --- /dev/null +++ b/src/main/java/com/wms/entity/table/Goods.java @@ -0,0 +1,149 @@ +package com.wms.entity.table; + +import com.wms.entity.BaseEntity; + +import java.util.Date; + +/** + * 物料 + */ +public class Goods extends BaseEntity { + + /** + * 物料编号 + */ + private String goodsId; + + /** + * 物料名称 + */ + private String goodsName; + + /** + * 单位 + */ + private String goodsUnit; + + /** + * 物料ID + */ + private String itemId; + /** + * 用户物料类型 + */ + private String itemType; + /** + * 库存类别 + */ + private String invCategory; + /** + * 存储天数 + */ + private Integer lifeDays; + /** + * 库存组织Id + */ + private String organizationId; + /** + * 库存组织代码 + */ + private String organizationCode; + + /** + * 最后更新日期 + */ + private Date lastUpdateTime; + + /** + * 最后更新用户 + */ + private String lastUpdateUser; + + public String getGoodsId() { + return goodsId; + } + + public void setGoodsId(String goodsId) { + this.goodsId = goodsId; + } + + public String getGoodsName() { + return goodsName; + } + + public void setGoodsName(String goodsName) { + this.goodsName = goodsName; + } + + public String getGoodsUnit() { + return goodsUnit; + } + + public void setGoodsUnit(String goodsUnit) { + this.goodsUnit = goodsUnit; + } + + public String getItemId() { + return itemId; + } + + public void setItemId(String itemId) { + this.itemId = itemId; + } + + public String getItemType() { + return itemType; + } + + public void setItemType(String itemType) { + this.itemType = itemType; + } + + public String getInvCategory() { + return invCategory; + } + + public void setInvCategory(String invCategory) { + this.invCategory = invCategory; + } + + public Integer getLifeDays() { + return lifeDays; + } + + public void setLifeDays(Integer lifeDays) { + this.lifeDays = lifeDays; + } + + public String getOrganizationId() { + return organizationId; + } + + public void setOrganizationId(String organizationId) { + this.organizationId = organizationId; + } + + public String getOrganizationCode() { + return organizationCode; + } + + public void setOrganizationCode(String organizationCode) { + this.organizationCode = organizationCode; + } + + public Date getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Date lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUser() { + return lastUpdateUser; + } + + public void setLastUpdateUser(String lastUpdateUser) { + this.lastUpdateUser = lastUpdateUser; + } +} diff --git a/src/main/java/com/wms/entity/table/Location.java b/src/main/java/com/wms/entity/table/Location.java new file mode 100644 index 0000000..fd43a7d --- /dev/null +++ b/src/main/java/com/wms/entity/table/Location.java @@ -0,0 +1,175 @@ +package com.wms.entity.table; + +import com.wms.entity.BaseEntity; + +/** + * 库位 + */ +public class Location extends BaseEntity { + + /** + * 库位编号 + */ + private String locationId; + + /** + * 库区编号 + */ + private Integer areaId; + + /** + * 巷道编号 + */ + private Integer tunnelId; + + /** + * 设备编号 + */ + private Integer equipmentId; + + /** + * 库位类型 + */ + private Integer locationType; + + /** + * 行 + */ + private Integer queue; + + /** + * 列 + */ + private Integer line; + + /** + * 层 + */ + private Integer layer; + + /** + * 深度 + */ + private Integer depth; + + /** + * 是否锁定 + */ + private Integer isLock; + + /** + * 库位状态 + */ + private Integer locationStatus; + + /** + * 载具编号 + */ + private String vehicleId; + + public Location() { + } + + public Location(String locationId) { + this.locationId = locationId; + } + public Location(Integer equipmentId) { + this.equipmentId = equipmentId; + } + + public String getLocationId() { + return locationId; + } + + public void setLocationId(String locationId) { + this.locationId = locationId; + } + + public Integer getEquipmentId() { + return equipmentId; + } + + public void setEquipmentId(Integer equipmentId) { + this.equipmentId = equipmentId; + } + + public Integer getAreaId() { + return areaId; + } + + public void setAreaId(Integer areaId) { + this.areaId = areaId; + } + + public Integer getQueue() { + return queue; + } + + public void setQueue(Integer queue) { + this.queue = queue; + } + + public Integer getLine() { + return line; + } + + public void setLine(Integer line) { + this.line = line; + } + + public Integer getLayer() { + return layer; + } + + public void setLayer(Integer layer) { + this.layer = layer; + } + + public Integer getDepth() { + return depth; + } + + public void setDepth(Integer depth) { + this.depth = depth; + } + + public Integer getIsLock() { + return isLock; + } + + public void setIsLock(Integer isLock) { + this.isLock = isLock; + } + + public Integer getLocationStatus() { + return locationStatus; + } + + public void setLocationStatus(Integer locationStatus) { + this.locationStatus = locationStatus; + } + + public String getVehicleId() { + return vehicleId; + } + + public void setVehicleId(String vehicleId) { + this.vehicleId = vehicleId; + } + + public Integer getTunnelId() { + return tunnelId; + } + + public void setTunnelId(Integer tunnelId) { + this.tunnelId = tunnelId; + } + + public Integer getLocationType() { + return locationType; + } + + public void setLocationType(Integer locationType) { + this.locationType = locationType; + } +} diff --git a/src/main/java/com/wms/entity/table/Menu.java b/src/main/java/com/wms/entity/table/Menu.java new file mode 100644 index 0000000..641e220 --- /dev/null +++ b/src/main/java/com/wms/entity/table/Menu.java @@ -0,0 +1,73 @@ +package com.wms.entity.table; + +import com.wms.entity.BaseEntity; + +/** + * 菜单 + */ +public class Menu extends BaseEntity { + /** + * 菜单Id + */ + private String menuId; + + /** + * 菜单名称 + */ + private String labelName; + + /** + * 图标值 + */ + private String iconValue; + + /** + * 地址 + */ + private String path; + + /** + * 父菜单Id + */ + private String parentId; + + public String getMenuId() { + return menuId; + } + + public void setMenuId(String menuId) { + this.menuId = menuId; + } + + public String getLabelName() { + return labelName; + } + + public void setLabelName(String labelName) { + this.labelName = labelName; + } + + public String getIconValue() { + return iconValue; + } + + public void setIconValue(String iconValue) { + this.iconValue = iconValue; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public String getParentId() { + return parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } +} diff --git a/src/main/java/com/wms/entity/table/PartInfo.java b/src/main/java/com/wms/entity/table/PartInfo.java new file mode 100644 index 0000000..cbc1c17 --- /dev/null +++ b/src/main/java/com/wms/entity/table/PartInfo.java @@ -0,0 +1,212 @@ +package com.wms.entity.table; + +import com.wms.utils.excel.ExcelExport; +import com.wms.utils.excel.ExcelImport; + +/** + * 零件数据 + */ +public class PartInfo { + @ExcelImport("Material") + @ExcelExport("零件号") + private String material; + @ExcelImport("Desc") + @ExcelExport("描述") + private String itemDesc; + @ExcelImport("Category") + @ExcelExport("零件类型") + private String category; + @ExcelImport("CategoryRemark") + @ExcelExport("策略") + private String categoryRemark; + @ExcelImport("Unload Place") + @ExcelExport("卸货点") + private String unloadPlace; + @ExcelImport("Kitting Point") + @ExcelExport("配料点") + private String kittingPoint; + @ExcelImport("Property") + @ExcelExport("可用性") + private String property; + @ExcelImport("Vendor ID") + @ExcelExport("供应商代码") + private String vendorId; + @ExcelImport("Data Owner") + @ExcelExport("数据负责人") + private String dataOwner; + @ExcelImport("Part Weight") + @ExcelExport("重量") + private Double partWeight; + @ExcelImport("Storage Location") + @ExcelExport("库位") + private String storageLocation; + @ExcelImport("Storage Type") + @ExcelExport("存储类型") + private String storageType; + @ExcelImport("Storage Bin") + @ExcelExport("BIN位") + private String storageBin; + @ExcelImport("Vendor Name") + @ExcelExport("供应商名称(英文)") + private String vendorNameEN; + + @ExcelImport("供应商") + @ExcelExport("供应商名称(中文)") + private String vendorNameCN; + + @ExcelImport("Vendor Country") + @ExcelExport("供应商国家/地区") + private String vendorCountry; + + @ExcelImport("SLED") + @ExcelExport("SLED") + private String SLED; + + @ExcelImport("UpdateDate") + @ExcelExport("更新时间") + private String updateDate; + + public String getMaterial() { + return material; + } + + public void setMaterial(String material) { + this.material = material; + } + + public String getItemDesc() { + return itemDesc; + } + + public void setItemDesc(String itemDesc) { + this.itemDesc = itemDesc; + } + + public String getCategory() { + return category; + } + + public void setCategory(String category) { + this.category = category; + } + + public String getCategoryRemark() { + return categoryRemark; + } + + public void setCategoryRemark(String categoryRemark) { + this.categoryRemark = categoryRemark; + } + + public String getUnloadPlace() { + return unloadPlace; + } + + public void setUnloadPlace(String unloadPlace) { + this.unloadPlace = unloadPlace; + } + + public String getKittingPoint() { + return kittingPoint; + } + + public void setKittingPoint(String kittingPoint) { + this.kittingPoint = kittingPoint; + } + + public String getProperty() { + return property; + } + + public void setProperty(String property) { + this.property = property; + } + + public String getVendorId() { + return vendorId; + } + + public void setVendorId(String vendorId) { + this.vendorId = vendorId; + } + + public String getDataOwner() { + return dataOwner; + } + + public void setDataOwner(String dataOwner) { + this.dataOwner = dataOwner; + } + + public Double getPartWeight() { + return partWeight; + } + + public void setPartWeight(Double partWeight) { + this.partWeight = partWeight; + } + + public String getStorageLocation() { + return storageLocation; + } + + public void setStorageLocation(String storageLocation) { + this.storageLocation = storageLocation; + } + + public String getStorageType() { + return storageType; + } + + public void setStorageType(String storageType) { + this.storageType = storageType; + } + + public String getStorageBin() { + return storageBin; + } + + public void setStorageBin(String storageBin) { + this.storageBin = storageBin; + } + + public String getVendorNameEN() { + return vendorNameEN; + } + + public void setVendorNameEN(String vendorNameEN) { + this.vendorNameEN = vendorNameEN; + } + + public String getVendorCountry() { + return vendorCountry; + } + + public void setVendorCountry(String vendorCountry) { + this.vendorCountry = vendorCountry; + } + + public String getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(String updateDate) { + this.updateDate = updateDate; + } + + public String getSLED() { + return SLED; + } + + public void setSLED(String SLED) { + this.SLED = SLED; + } + + public String getVendorNameCN() { + return vendorNameCN; + } + + public void setVendorNameCN(String vendorNameCN) { + this.vendorNameCN = vendorNameCN; + } +} diff --git a/src/main/java/com/wms/entity/table/Stand.java b/src/main/java/com/wms/entity/table/Stand.java new file mode 100644 index 0000000..35fe5f6 --- /dev/null +++ b/src/main/java/com/wms/entity/table/Stand.java @@ -0,0 +1,151 @@ +package com.wms.entity.table; + +import com.wms.entity.BaseEntity; + +/** + * 站台表 + */ +public class Stand extends BaseEntity { + /** + * 站台id + */ + private String standId; + /** + * 是否允许入库 + */ + private Integer allowIn; + /** + * 是否允许出库 + */ + private Integer allowOut; + /** + * 任务号 + */ + private String taskId; + /** + * 站台是否锁定 + */ + private Integer isLock; + /** + * 站台状态 + */ + private Integer standStatus; + + /** + * 设备编号 + */ + private Integer equipmentId; + + /** + * 库区编号 + */ + private Integer areaId; + /** + * 站台类型 + */ + private Integer standType; + /** + * 站台ip + */ + private String standIp; + + public Stand() { + + } + public Stand(Integer standType, String standIp, Integer standStatus) { + this.standType = standType; + this.standIp = standIp; + this.standStatus = standStatus; + } + public Stand(String standId, Integer allowIn, Integer allowOut, String taskId, Integer isLock, Integer standStatus, Integer equipmentId, Integer areaId, Integer standType) { + this.standId = standId; + this.allowIn = allowIn; + this.allowOut = allowOut; + this.taskId = taskId; + this.isLock = isLock; + this.standStatus = standStatus; + this.equipmentId = equipmentId; + this.areaId = areaId; + this.standType = standType; + } + + public String getStandId() { + return standId; + } + + public void setStandId(String standId) { + this.standId = standId; + } + + public Integer getAllowIn() { + return allowIn; + } + + public void setAllowIn(Integer allowIn) { + this.allowIn = allowIn; + } + + public Integer getAllowOut() { + return allowOut; + } + + public void setAllowOut(Integer allowOut) { + this.allowOut = allowOut; + } + + public String getTaskId() { + return taskId; + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + public Integer getIsLock() { + return isLock; + } + + public void setIsLock(Integer isLock) { + this.isLock = isLock; + } + + public Integer getStandStatus() { + return standStatus; + } + + public void setStandStatus(Integer standStatus) { + this.standStatus = standStatus; + } + + public Integer getEquipmentId() { + return equipmentId; + } + + public void setEquipmentId(Integer equipmentId) { + this.equipmentId = equipmentId; + } + + public Integer getAreaId() { + return areaId; + } + + public void setAreaId(Integer areaId) { + this.areaId = areaId; + } + + public Integer getStandType() { + return standType; + } + + public void setStandType(Integer standType) { + this.standType = standType; + } + + public String getStandIp() { + return standIp; + } + + public void setStandIp(String standIp) { + this.standIp = standIp; + } +} diff --git a/src/main/java/com/wms/entity/table/Stock.java b/src/main/java/com/wms/entity/table/Stock.java new file mode 100644 index 0000000..196df63 --- /dev/null +++ b/src/main/java/com/wms/entity/table/Stock.java @@ -0,0 +1,342 @@ +package com.wms.entity.table; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.wms.entity.BaseEntity; +import com.wms.utils.excel.ExcelExport; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * 库存 + */ +public class Stock extends BaseEntity { + + /** + * 库存编号 + */ + @ExcelExport("库存编号") + private String stockId; + + /** + * 库位ID + */ + @ExcelExport("库位") + private String locationId; + + /** + * 托盘号 + */ + @ExcelExport("箱号") + private String vehicleId; + + /** + * 物料编号 + */ + @ExcelExport("零件号") + private String goodsId; + + /** + * 物料名称 + */ + @ExcelExport("零件名称") + private String goodsName; + + /** + * 批次号 + */ + @ExcelExport("批次号") + private String batchNo; + + /** + * 可用数量 + */ + @ExcelExport("可用数量") + private Integer availableNum; + + /** + * 剩余数量 + */ + @ExcelExport("剩余数量") + private Integer remainNum; + + /** + * 实际数量 + */ + @ExcelExport("实际数量") + private Integer realNum; + + /** + * 供应商编号 + */ + @ExcelExport("供应商编号") + private String providerId; + /** + * 供应商名称 + */ + @ExcelExport("供应商名称") + private String providerName; + /** + * 生产日期 + */ + @ExcelExport("生产日期") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date productionDate; + /** + * 过期日期 + */ + @ExcelExport("过期日期") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date expirationDate; + /** + * 库存状态 + * 正常、出库中、锁定 等 + */ + @ExcelExport("库存状态") + private Integer stockStatus; + /** + * 物料状态 + * 合格、不合格、报废、延期 等 + */ + @ExcelExport("零件状态") + private Integer goodsStatus; + /** + * 创建时间 + */ + @ExcelExport("入库时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + /** + * 最后更新时间 + */ + @ExcelExport("最后更新时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date lastUpdateTime; + /** + * 最后更新用户 + */ + @ExcelExport("上架人") + private String lastUpdateUser; + /** + * 备注 + */ + @ExcelExport("备注") + private String remark; + /** + * 是否盘点 + */ + @ExcelExport("是否盘点") + private Integer isInventory; + /** + * 盘点任务号 盘点出库和盘点入库同样 + */ + @ExcelExport("盘点任务号") + private String inventoryTaskId; + /** + * 当前位置 + */ + @ExcelExport("当前位置") + private String currentLocation; + + /** + * 保质期 + */ + @ExcelExport("保质期") + private Double shelfLife; + + public Stock() { + + } + + public Stock(String vehicleId) { + this.vehicleId = vehicleId; + } + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getLocationId() { + return locationId; + } + + public void setLocationId(String locationId) { + this.locationId = locationId; + } + + public String getVehicleId() { + return vehicleId; + } + + public void setVehicleId(String vehicleId) { + this.vehicleId = vehicleId; + } + + public String getGoodsId() { + return goodsId; + } + + public void setGoodsId(String goodsId) { + this.goodsId = goodsId; + } + + public String getGoodsName() { + return goodsName; + } + + public void setGoodsName(String goodsName) { + this.goodsName = goodsName; + } + + public String getBatchNo() { + return batchNo; + } + + public void setBatchNo(String batchNo) { + this.batchNo = batchNo; + } + + public Integer getRemainNum() { + return remainNum; + } + + public void setRemainNum(Integer remainNum) { + this.remainNum = remainNum; + } + + public Integer getAvailableNum() { + return availableNum; + } + + public void setAvailableNum(Integer availableNum) { + this.availableNum = availableNum; + } + + public Integer getRealNum() { + return realNum; + } + + public void setRealNum(Integer realNum) { + this.realNum = realNum; + } + + public String getProviderId() { + return providerId; + } + + public void setProviderId(String providerId) { + this.providerId = providerId; + } + + public String getProviderName() { + return providerName; + } + + public void setProviderName(String providerName) { + this.providerName = providerName; + } + + public Date getProductionDate() { + return productionDate; + } + + public void setProductionDate(Date productionDate) { + this.productionDate = productionDate; + } + + public Date getExpirationDate() { + return expirationDate; + } + + public void setExpirationDate(Date expirationDate) { + this.expirationDate = expirationDate; + } + + public Integer getStockStatus() { + return stockStatus; + } + + public void setStockStatus(Integer stockStatus) { + this.stockStatus = stockStatus; + } + + public Integer getGoodsStatus() { + return goodsStatus; + } + + public void setGoodsStatus(Integer goodsStatus) { + this.goodsStatus = goodsStatus; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Date lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUser() { + return lastUpdateUser; + } + + public void setLastUpdateUser(String lastUpdateUser) { + this.lastUpdateUser = lastUpdateUser; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public Integer getIsInventory() { + return isInventory; + } + + public void setIsInventory(Integer isInventory) { + this.isInventory = isInventory; + } + + public String getInventoryTaskId() { + return inventoryTaskId; + } + + public void setInventoryTaskId(String inventoryTaskId) { + this.inventoryTaskId = inventoryTaskId; + } + + public String getCurrentLocation() { + return currentLocation; + } + + public void setCurrentLocation(String currentLocation) { + this.currentLocation = currentLocation; + } + + public Double getShelfLife() { + return shelfLife; + } + + public void setShelfLife(Double shelfLife) { + this.shelfLife = shelfLife; + } +} diff --git a/src/main/java/com/wms/entity/table/Task.java b/src/main/java/com/wms/entity/table/Task.java new file mode 100644 index 0000000..dfc643b --- /dev/null +++ b/src/main/java/com/wms/entity/table/Task.java @@ -0,0 +1,345 @@ +package com.wms.entity.table; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.wms.entity.BaseEntity; +import com.wms.utils.excel.ExcelExport; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * 任务 + */ +public class Task extends BaseEntity { + + /** + * 物料编号 + */ + @ExcelExport("零件号") + private String goodsId; + + /** + * 任务编号 + */ + @ExcelExport("箱号") + private String taskId; + + /** + * 物料名称 + */ + @ExcelExport("零件名称") + private String goodsName; + + + /** + * 任务类型 + */ + @ExcelExport("任务类型") + private Integer taskType; + + /** + * 任务组 + */ + @ExcelExport("任务组") + private String taskGroup; + + /** + * 起点 + */ + @ExcelExport("起点") + private String origin; + + /** + * 终点 + */ + @ExcelExport("终点") + private String destination; + + /** + * 拣选站台 + */ + @ExcelExport("拣选站台") + private String pickStand; + + /** + * 重量 + */ + @ExcelExport("重量") + private Double weight; + + /** + * 生产日期 + */ + @ExcelExport("生产日期") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date productionDate; + + /** + * 过期日期 + */ + @ExcelExport("有效日期") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date expirationDate; + + /** + * 本次操作数量 + */ + @ExcelExport("操作数量") + private Integer operateNum; + + /** + * 库存总数量 + */ + @ExcelExport("库存数量") + private Integer totalNum; + + /** + * 任务优先级 + */ + @ExcelExport("任务优先级") + private Integer taskPriority; + + /** + * 卡特任务的id + */ + @ExcelExport("配件任务号") + private String kateTaskId; + + /** + * 操作人员姓名 + */ + @ExcelExport("操作人员姓名") + private String userName; + + /** + * 创建时间 + */ + @ExcelExport("创建时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + /** + * 完成时间 + */ + @ExcelExport("任务完成时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date finishTime; + + + /** + * 任务状态 + */ + @ExcelExport("任务状态") + private Integer taskStatus; + + /** + * 载具编号 + */ + + private String vehicleNo; + + /** + * 尺寸 + */ + private Integer vehicleSize; + + + /** + * 电子标签库位 + */ + private String etagLocation; + + /** + * 备用字段 + * 1. 原包装出库的货架号 + */ + private String remark1; + + public String getTaskId() { + return taskId; + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + public Integer getTaskType() { + return taskType; + } + + public void setTaskType(Integer taskType) { + this.taskType = taskType; + } + + public Integer getTaskStatus() { + return taskStatus; + } + + public void setTaskStatus(Integer taskStatus) { + this.taskStatus = taskStatus; + } + + public String getTaskGroup() { + return taskGroup; + } + + public void setTaskGroup(String taskGroup) { + this.taskGroup = taskGroup; + } + + public String getOrigin() { + return origin; + } + + public void setOrigin(String origin) { + this.origin = origin; + } + + public String getDestination() { + return destination; + } + + public void setDestination(String destination) { + this.destination = destination; + } + + public String getPickStand() { + return pickStand; + } + + public void setPickStand(String pickStand) { + this.pickStand = pickStand; + } + + public Double getWeight() { + return weight; + } + + public void setWeight(Double weight) { + this.weight = weight; + } + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public Integer getVehicleSize() { + return vehicleSize; + } + + public void setVehicleSize(Integer vehicleSize) { + this.vehicleSize = vehicleSize; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getGoodsId() { + return goodsId; + } + + public void setGoodsId(String goodsId) { + this.goodsId = goodsId; + } + + public String getGoodsName() { + return goodsName; + } + + public void setGoodsName(String goodsName) { + this.goodsName = goodsName; + } + + public Date getProductionDate() { + return productionDate; + } + + public void setProductionDate(Date productionDate) { + this.productionDate = productionDate; + } + + public Date getExpirationDate() { + return expirationDate; + } + + public void setExpirationDate(Date expirationDate) { + this.expirationDate = expirationDate; + } + + public Integer getOperateNum() { + return operateNum; + } + + public void setOperateNum(Integer operateNum) { + this.operateNum = operateNum; + } + + public Integer getTotalNum() { + return totalNum; + } + + public void setTotalNum(Integer totalNum) { + this.totalNum = totalNum; + } + + public String getEtagLocation() { + return etagLocation; + } + + public void setEtagLocation(String etagLocation) { + this.etagLocation = etagLocation; + } + + public Integer getTaskPriority() { + return taskPriority; + } + + public void setTaskPriority(Integer taskPriority) { + this.taskPriority = taskPriority; + } + + public String getKateTaskId() { + return kateTaskId; + } + + public void setKateTaskId(String kateTaskId) { + this.kateTaskId = kateTaskId; + } + + public Date getFinishTime() { + return finishTime; + } + + public void setFinishTime(Date finishTime) { + this.finishTime = finishTime; + } + + public String getRemark1() { + return remark1; + } + + public void setRemark1(String remark1) { + this.remark1 = remark1; + } +} diff --git a/src/main/java/com/wms/entity/table/User.java b/src/main/java/com/wms/entity/table/User.java new file mode 100644 index 0000000..ee3c8ea --- /dev/null +++ b/src/main/java/com/wms/entity/table/User.java @@ -0,0 +1,101 @@ +package com.wms.entity.table; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.wms.entity.BaseEntity; + +import java.util.Date; + +/** + * 用户 + */ +public class User extends BaseEntity { + /** 用户ID */ + private Integer userId; + + /** 用户名 */ + private String userName; + + /** 角色Id */ + private Integer roleId = null; + + /** 登录账户 */ + private String loginAccount; + + /** 登录密码 */ + private String loginPassword; + + /** 添加时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date addTime; + + /** 更新时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + + /** 添加用户名 */ + private String addUser; + + public Integer getUserId() { + return userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public Integer getRoleId() { + return roleId; + } + + public void setRoleId(Integer roleId) { + this.roleId = roleId; + } + + public String getLoginAccount() { + return loginAccount; + } + + public void setLoginAccount(String loginAccount) { + this.loginAccount = loginAccount; + } + + public String getLoginPassword() { + return loginPassword; + } + + public void setLoginPassword(String loginPassword) { + this.loginPassword = loginPassword; + } + + public Date getAddTime() { + return addTime; + } + + public void setAddTime(Date addTime) { + this.addTime = addTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getAddUser() { + return addUser; + } + + public void setAddUser(String addUser) { + this.addUser = addUser; + } +} diff --git a/src/main/java/com/wms/entity/table/Vehicle.java b/src/main/java/com/wms/entity/table/Vehicle.java new file mode 100644 index 0000000..30a7859 --- /dev/null +++ b/src/main/java/com/wms/entity/table/Vehicle.java @@ -0,0 +1,65 @@ +package com.wms.entity.table; + +import com.wms.entity.BaseEntity; + +/** + * 载具 + */ +public class Vehicle extends BaseEntity { + /** + * 载具编号 + */ + private String vehicleId; + /** + * 当前所在位置 + */ + private String currentLocation; + /** + * 载具状态 + */ + private Integer vehicleStatus; + /** + * 是否是空箱 + */ + private Integer isEmpty; + + public Vehicle() { + + } + + public Vehicle(String vehicleId) { + this.vehicleId = vehicleId; + } + + public String getVehicleId() { + return vehicleId; + } + + public void setVehicleId(String vehicleId) { + this.vehicleId = vehicleId; + } + + public String getCurrentLocation() { + return currentLocation; + } + + public void setCurrentLocation(String currentLocation) { + this.currentLocation = currentLocation; + } + + public Integer getVehicleStatus() { + return vehicleStatus; + } + + public void setVehicleStatus(Integer vehicleStatus) { + this.vehicleStatus = vehicleStatus; + } + + public Integer getIsEmpty() { + return isEmpty; + } + + public void setIsEmpty(Integer isEmpty) { + this.isEmpty = isEmpty; + } +} diff --git a/src/main/java/com/wms/entity/test/ExcelTest.java b/src/main/java/com/wms/entity/test/ExcelTest.java new file mode 100644 index 0000000..03bead4 --- /dev/null +++ b/src/main/java/com/wms/entity/test/ExcelTest.java @@ -0,0 +1,36 @@ +package com.wms.entity.test; + +import com.wms.utils.excel.ExcelExport; +import com.wms.utils.excel.ExcelImport; + +public class ExcelTest { + @ExcelImport("库位") + @ExcelExport("库位") + private String locationId; + @ExcelImport("箱号") + @ExcelExport("箱号") + private String vehicleId; + + public ExcelTest(){}; + + public ExcelTest(String locationId, String vehicleId) { + this.locationId = locationId; + this.vehicleId = vehicleId; + } + + public String getLocationId() { + return locationId; + } + + public void setLocationId(String locationId) { + this.locationId = locationId; + } + + public String getVehicleId() { + return vehicleId; + } + + public void setVehicleId(String vehicleId) { + this.vehicleId = vehicleId; + } +} diff --git a/src/main/java/com/wms/mapper/ConfigMapper.java b/src/main/java/com/wms/mapper/ConfigMapper.java new file mode 100644 index 0000000..55d19c7 --- /dev/null +++ b/src/main/java/com/wms/mapper/ConfigMapper.java @@ -0,0 +1,26 @@ +package com.wms.mapper; + +import com.wms.entity.table.Config; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 配置 + */ +@Mapper +public interface ConfigMapper { + /** + * 通过键查询配置值(configKey为null或者空时,查询所有的键值) + * @param configKey 键值 + * @return 结果 + */ + List selectConfigs(String configKey); + + /** + * 更新系统配置信息 + * @param config 配置 + * @return 结果 + */ + int updateConfig(Config config); +} diff --git a/src/main/java/com/wms/mapper/GoodsMapper.java b/src/main/java/com/wms/mapper/GoodsMapper.java new file mode 100644 index 0000000..424259c --- /dev/null +++ b/src/main/java/com/wms/mapper/GoodsMapper.java @@ -0,0 +1,45 @@ +package com.wms.mapper; + +import com.wms.entity.table.Goods; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface GoodsMapper { + + /** + * 查询物料信息 + * @param goods + * @return + */ + List selGoods(Goods goods); + + /** + * 根据物料id查询物料信息 + * @param goodsId + * @return + */ + Goods selGoodsByGoodsId(String goodsId); + + /** + * 添加物料信息 + * @param goods + * @return + */ + int addGoods(Goods goods); + + /** + * 修改物料信息 + * @param goods + * @return + */ + int modifyGoods(Goods goods); + + /** + * 删除物料信息 + * @param goodsId + * @return + */ + int deleteGoods(String goodsId); +} diff --git a/src/main/java/com/wms/mapper/LocationMapper.java b/src/main/java/com/wms/mapper/LocationMapper.java new file mode 100644 index 0000000..2b5fdee --- /dev/null +++ b/src/main/java/com/wms/mapper/LocationMapper.java @@ -0,0 +1,38 @@ +package com.wms.mapper; + +import com.wms.entity.table.Location; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface LocationMapper { + + /** + * 查询库位列表 + * @param location + * @return + */ + List selLocations(Location location); + + /** + * 查找下一个可用库位 + * @param location 具体信息 + * @return 结果 + */ + List selNextLocation(Location location); + + /** + * 添加一个新库位 + * @param location 库位信息 + * @return 添加结果 + */ + int addLocation(Location location); + + /** + * 修改库位信息 + * @param location + * @return + */ + int modifyLocation(Location location); +} diff --git a/src/main/java/com/wms/mapper/MenuMapper.java b/src/main/java/com/wms/mapper/MenuMapper.java new file mode 100644 index 0000000..6512fc5 --- /dev/null +++ b/src/main/java/com/wms/mapper/MenuMapper.java @@ -0,0 +1,15 @@ +package com.wms.mapper; + +import com.wms.entity.table.Menu; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 菜单Mapper + */ +@Mapper +public interface MenuMapper { + + List selMenuByRoleId(int roleId); +} diff --git a/src/main/java/com/wms/mapper/PartInfoMapper.java b/src/main/java/com/wms/mapper/PartInfoMapper.java new file mode 100644 index 0000000..5f2c9e5 --- /dev/null +++ b/src/main/java/com/wms/mapper/PartInfoMapper.java @@ -0,0 +1,15 @@ +package com.wms.mapper; + +import com.wms.entity.table.PartInfo; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface PartInfoMapper { + List selParts(PartInfo partInfo); + PartInfo selPartByPartNo(String material); + int addPart(PartInfo partInfo); + int modifyPart(PartInfo partInfo); + int deletePartByPartNo(String material); +} diff --git a/src/main/java/com/wms/mapper/StandMapper.java b/src/main/java/com/wms/mapper/StandMapper.java new file mode 100644 index 0000000..cedcf7d --- /dev/null +++ b/src/main/java/com/wms/mapper/StandMapper.java @@ -0,0 +1,19 @@ +package com.wms.mapper; + +import com.wms.entity.table.Stand; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface StandMapper { + List selStands(Stand stand); + + Stand selStandById(String standId); + + int addStand(Stand stand); + + int modifyStand(Stand stand); + + int deleteStand(Stand stand); +} diff --git a/src/main/java/com/wms/mapper/StockMapper.java b/src/main/java/com/wms/mapper/StockMapper.java new file mode 100644 index 0000000..b7b0fa5 --- /dev/null +++ b/src/main/java/com/wms/mapper/StockMapper.java @@ -0,0 +1,56 @@ +package com.wms.mapper; + +import com.wms.entity.table.Stock; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +@Mapper +public interface StockMapper { + + /** + * 查询库存列表 + * @param stock 库存参数 + * @return 结果 + */ + List selStocks(Stock stock); + + /** + * 查询库存,前端用 + * @param query 查询键值 + * @return 结果 + */ + List selStocksFront(@Param("query") String query); + + /** + * 添加库存 + * @param stock + * @return + */ + int addStock(Stock stock); + + /** + * 修改库存信息 + * @param stock + * @return + */ + int modifyStock(Stock stock); + + /** + * 删除库存 + * @param stockId + * @return + */ + int deleteStock(String stockId); + + List selStocksByGoodsId(Stock stock); + + List selStockOutOfDate(); + + List selStockNearDeadLine(int nearInterval); + + List selStockLongTimeNoUse(int nearInterval); + + int resetStock(Stock stock); +} diff --git a/src/main/java/com/wms/mapper/TaskMapper.java b/src/main/java/com/wms/mapper/TaskMapper.java new file mode 100644 index 0000000..3c760bc --- /dev/null +++ b/src/main/java/com/wms/mapper/TaskMapper.java @@ -0,0 +1,38 @@ +package com.wms.mapper; + +import com.wms.entity.table.Task; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface TaskMapper { + + /** + * 查找任务 + * @param task + * @return 符合条件的任务列表 + */ + List selTasks(Task task); + + /** + * 添加任务 + * @param task + * @return + */ + int addTask(Task task); + + /** + * 执行任务 + * @param task + * @return + */ + int executeTask(Task task); + + /** + * 删除任务 + * @param taskId + * @return + */ + int deleteTask(String taskId); +} diff --git a/src/main/java/com/wms/mapper/TaskRecordMapper.java b/src/main/java/com/wms/mapper/TaskRecordMapper.java new file mode 100644 index 0000000..f100620 --- /dev/null +++ b/src/main/java/com/wms/mapper/TaskRecordMapper.java @@ -0,0 +1,40 @@ +package com.wms.mapper; + +import com.wms.entity.table.Task; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface TaskRecordMapper { + + /** + * 查找任务记录 + * @param taskRecord 任务记录 + * @return 符合条件的任务列表 + */ + List selTasks(Task taskRecord); + + /** + * 添加任务记录 + * @param taskRecord 任务记录 + * @return 结果 + */ + int addTask(Task taskRecord); + + /** + * 更新任务记录 + * @param taskRecord 任务记录 + * @return 结果 + */ + int executeTask(Task taskRecord); + + /** + * 删除任务 + * @param taskId 任务记录 + * @return 结果 + */ + int deleteTask(String taskId); + + int deleteTaskRecordRegularly(); +} diff --git a/src/main/java/com/wms/mapper/UserMapper.java b/src/main/java/com/wms/mapper/UserMapper.java new file mode 100644 index 0000000..9538961 --- /dev/null +++ b/src/main/java/com/wms/mapper/UserMapper.java @@ -0,0 +1,16 @@ +package com.wms.mapper; + +import com.wms.entity.table.User; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface UserMapper { + /** + * 查找用户 + * @param user + * @return + */ + List selectUsers(User user); +} diff --git a/src/main/java/com/wms/mapper/VehicleMapper.java b/src/main/java/com/wms/mapper/VehicleMapper.java new file mode 100644 index 0000000..c7aa4e8 --- /dev/null +++ b/src/main/java/com/wms/mapper/VehicleMapper.java @@ -0,0 +1,44 @@ +package com.wms.mapper; + +import com.wms.entity.table.Vehicle; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface VehicleMapper { + /** + * 根据条件查找载具 + * @param vehicle 载具信息 + * @return 查询到的载具 + */ + List selVehicles(Vehicle vehicle); + + /** + * 根据id查询载具 + * @param vehicleId 载具id + * @return 结果 + */ + Vehicle selVehicleById(String vehicleId); + + /** + * 添加载具 + * @param vehicle 载具 + * @return 结果 + */ + int addVehicle(Vehicle vehicle); + + /** + * 更新载具 + * @param vehicle 载具 + * @return 结果 + */ + int modifyVehicle(Vehicle vehicle); + + /** + * 删除载具 + * @param vehicle 载具 + * @return 结果 + */ + int deleteVehicle(Vehicle vehicle); +} diff --git a/src/main/java/com/wms/service/ConfigService.java b/src/main/java/com/wms/service/ConfigService.java new file mode 100644 index 0000000..397ecd9 --- /dev/null +++ b/src/main/java/com/wms/service/ConfigService.java @@ -0,0 +1,20 @@ +package com.wms.service; + +import com.wms.entity.table.Config; + +import java.util.List; + +public interface ConfigService { + /** + * 通过键查询配置值(configKey为null或者空时,查询所有的键值) + * @param configKey 配置键值 + * @return 结果 + */ + List selectConfigs(String configKey); + + /** + * 更新系统配置信息 + * @param config 配置 + */ + int updateConfig(Config config); +} diff --git a/src/main/java/com/wms/service/GoodsService.java b/src/main/java/com/wms/service/GoodsService.java new file mode 100644 index 0000000..3c645f4 --- /dev/null +++ b/src/main/java/com/wms/service/GoodsService.java @@ -0,0 +1,43 @@ +package com.wms.service; + +import com.wms.entity.table.Goods; + +import java.util.List; + +public interface GoodsService { + + /** + * 查询物料信息 + * @param goods 物料 + * @return 结果 + */ + List selGoods(Goods goods); + + /** + * 根据物料id查询物料信息 + * @param goodsId 物料id + * @return 结果 + */ + Goods selGoodsByGoodsId(String goodsId); + + /** + * 添加物料信息 + * @param goods 物料信息 + * @return 物料 + */ + int addGoods(Goods goods); + + /** + * 修改物料信息 + * @param goods 物料信息 + * @return 结果 + */ + int modifyGoods(Goods goods); + + /** + * 删除物料信息 + * @param goodsId 物料id + * @return 结果 + */ + int deleteGoods(String goodsId); +} diff --git a/src/main/java/com/wms/service/LocationService.java b/src/main/java/com/wms/service/LocationService.java new file mode 100644 index 0000000..5a436b0 --- /dev/null +++ b/src/main/java/com/wms/service/LocationService.java @@ -0,0 +1,36 @@ +package com.wms.service; + +import com.wms.entity.table.Location; + +import java.util.List; + +public interface LocationService { + + /** + * 查询库位列表 + * @param location 库位查询参数 + * @return 结果 + */ + List selLocations(Location location); + + /** + * 查找下一个可用库位 + * @param location 设备id + * @return 结果 + */ + List selNextLocation(Location location); + + /** + * 添加一个新库位 + * @param location 库位信息 + * @return 添加结果 + */ + int addLocation(Location location); + + /** + * 修改库位信息 + * @param location 库位 + * @return 结果 + */ + int modifyLocation(Location location); +} diff --git a/src/main/java/com/wms/service/MenuService.java b/src/main/java/com/wms/service/MenuService.java new file mode 100644 index 0000000..c69626a --- /dev/null +++ b/src/main/java/com/wms/service/MenuService.java @@ -0,0 +1,14 @@ +package com.wms.service; + +import com.wms.entity.table.Menu; + +import java.util.List; + +public interface MenuService { + /** + * 根据角色查找对应的菜单/权限 + * @param roleId 角色id + * @return 结果 + */ + List selMenuByRoleId(int roleId); +} diff --git a/src/main/java/com/wms/service/PartInfoService.java b/src/main/java/com/wms/service/PartInfoService.java new file mode 100644 index 0000000..af752b0 --- /dev/null +++ b/src/main/java/com/wms/service/PartInfoService.java @@ -0,0 +1,42 @@ +package com.wms.service; + +import com.wms.entity.table.PartInfo; + +import java.util.List; + +public interface PartInfoService { + /** + * 查询零件信息 + * @param partInfo 零件信息 + * @return 结果 + */ + List selParts(PartInfo partInfo); + + /** + * 根据零件号查询零件信息 + * @param material 零件号 + * @return 结果 + */ + PartInfo selPartByPartNo(String material); + + /** + * 添加零件 + * @param partInfo 零件信息 + * @return 结果 + */ + int addPart(PartInfo partInfo); + + /** + * 更新零件信息 + * @param partInfo 新的零件信息 + * @return 结果 + */ + int modifyPart(PartInfo partInfo); + + /** + * 根据零件号删除零件 + * @param material 零件号 + * @return 结果 + */ + int deletePartByPartNo(String material); +} diff --git a/src/main/java/com/wms/service/StandService.java b/src/main/java/com/wms/service/StandService.java new file mode 100644 index 0000000..23d6f42 --- /dev/null +++ b/src/main/java/com/wms/service/StandService.java @@ -0,0 +1,45 @@ +package com.wms.service; + +import com.wms.entity.table.Stand; + +import java.util.List; + +/** + * + */ +public interface StandService { + /** + * 查询站台 + * @param stand 查询参数 + * @return 结果 + */ + List selStands(Stand stand); + + /** + * 根据站台id查询站台 + * @param standId 站台id + * @return 结果 + */ + Stand selStandById(String standId); + + /** + * 添加新站台 + * @param stand 站台信息 + * @return 结果 + */ + int addStand(Stand stand); + + /** + * 更新站台信息 + * @param stand 更新参数 + * @return 结果 + */ + int modifyStand(Stand stand); + + /** + * 删除站台 + * @param stand 删除参数 + * @return 结果 + */ + int deleteStand(Stand stand); +} diff --git a/src/main/java/com/wms/service/StockService.java b/src/main/java/com/wms/service/StockService.java new file mode 100644 index 0000000..301fc44 --- /dev/null +++ b/src/main/java/com/wms/service/StockService.java @@ -0,0 +1,77 @@ +package com.wms.service; + +import com.wms.entity.table.Stock; + +import java.util.List; + +public interface StockService { + + /** + * 查询库存列表 + * @param stock 库存查询参数 + * @return 结果 + */ + List selStocks(Stock stock); + + /** + * 前端用查询库存 + * @param query 查询键值 + * @return 结果 + */ + List selStocksFront(String query); + + /** + * 添加库存 + * @param stock 库存信息 + * @return 结果 + */ + int addStock(Stock stock); + + /** + * 修改库存信息 + * @param stock 库存信息 + * @return 结果 + */ + int modifyStock(Stock stock); + + /** + * 删除库存 + * @param stockId 库存id + * @return 结果 + */ + int deleteStock(String stockId); + + /** + * 根据零件号查询零件总数 + * @param stock 参数 + * @return 结果 + */ + List selStocksByGoodsId(Stock stock); + + /** + * 查询过期的合格物料 + * @return 结果 + */ + List selStockOutOfDate(); + + /** + * 查询临近期限的合格物料 + * @param nearInterval 天数 + * @return 结果 + */ + List selStockNearDeadLine(int nearInterval); + + /** + * 查询长时间未使用的库存 + * @param nearInterval 天数 + * @return 结果 + */ + List selStockLongTimeNoUse(int nearInterval); + + /** + * 重置库存数量 + * @param stock 参数 + * @return 结果 + */ + int resetStock(Stock stock); +} diff --git a/src/main/java/com/wms/service/TaskRecordService.java b/src/main/java/com/wms/service/TaskRecordService.java new file mode 100644 index 0000000..b362f80 --- /dev/null +++ b/src/main/java/com/wms/service/TaskRecordService.java @@ -0,0 +1,42 @@ +package com.wms.service; + +import com.wms.entity.table.Task; + +import java.util.List; + +public interface TaskRecordService { + + /** + * 查找任务记录 + * @param taskRecord 任务记录 + * @return 符合条件的任务列表 + */ + List selTasks(Task taskRecord); + + /** + * 添加任务记录 + * @param taskRecord 任务记录 + * @return 结果 + */ + int addTask(Task taskRecord); + + /** + * 更新任务记录 + * @param taskRecord 任务记录 + * @return 结果 + */ + int executeTask(Task taskRecord); + + /** + * 删除任务记录 + * @param taskId 任务id + * @return 结果 + */ + int deleteTask(String taskId); + + /** + * 定期删除任务记录 + * @return 结果 + */ + int deleteTaskRecordRegularly(); +} diff --git a/src/main/java/com/wms/service/TaskService.java b/src/main/java/com/wms/service/TaskService.java new file mode 100644 index 0000000..a97d38e --- /dev/null +++ b/src/main/java/com/wms/service/TaskService.java @@ -0,0 +1,36 @@ +package com.wms.service; + +import com.wms.entity.table.Task; + +import java.util.List; + +public interface TaskService{ + + /** + * 查找任务 + * @param task 任务 + * @return 符合条件的任务列表 + */ + List selTasks(Task task); + + /** + * 添加任务 + * @param task 任务 + * @return 结果 + */ + int addTask(Task task); + + /** + * 执行任务 + * @param task 任务 + * @return 结果 + */ + int executeTask(Task task); + + /** + * 删除任务 + * @param taskId 任务id + * @return 结果 + */ + int deleteTask(String taskId); +} diff --git a/src/main/java/com/wms/service/UserService.java b/src/main/java/com/wms/service/UserService.java new file mode 100644 index 0000000..31b9141 --- /dev/null +++ b/src/main/java/com/wms/service/UserService.java @@ -0,0 +1,15 @@ +package com.wms.service; + +import com.wms.entity.table.User; + +import java.util.List; + +public interface UserService { + + /** + * 查找用户 + * @param user 用户 + * @return 结果 + */ + List selectUsers(User user); +} diff --git a/src/main/java/com/wms/service/VehicleService.java b/src/main/java/com/wms/service/VehicleService.java new file mode 100644 index 0000000..ad6c29c --- /dev/null +++ b/src/main/java/com/wms/service/VehicleService.java @@ -0,0 +1,42 @@ +package com.wms.service; + +import com.wms.entity.table.Vehicle; + +import java.util.List; + +public interface VehicleService { + /** + * 根据条件查找载具 + * @param vehicle 载具信息 + * @return 查询到的载具 + */ + List selVehicles(Vehicle vehicle); + + /** + * 根据id查询载具 + * @param vehicleId 载具id + * @return 结果 + */ + Vehicle selVehicleById(String vehicleId); + + /** + * 添加载具 + * @param vehicle 载具 + * @return 结果 + */ + int addVehicle(Vehicle vehicle); + + /** + * 更新载具 + * @param vehicle 载具 + * @return 结果 + */ + int modifyVehicle(Vehicle vehicle); + + /** + * 删除载具 + * @param vehicle 载具 + * @return 结果 + */ + int deleteVehicle(Vehicle vehicle); +} diff --git a/src/main/java/com/wms/service/serviceImplements/ConfigServiceImplement.java b/src/main/java/com/wms/service/serviceImplements/ConfigServiceImplement.java new file mode 100644 index 0000000..e2eff9f --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/ConfigServiceImplement.java @@ -0,0 +1,30 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.Config; +import com.wms.mapper.ConfigMapper; +import com.wms.service.ConfigService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class ConfigServiceImplement implements ConfigService { + + private final ConfigMapper configMapper; + + @Autowired + public ConfigServiceImplement(ConfigMapper configMapper){ + this.configMapper = configMapper; + } + + @Override + public List selectConfigs(String configKey) { + return this.configMapper.selectConfigs(configKey); + } + + @Override + public int updateConfig(Config config) { + return this.configMapper.updateConfig(config); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/GoodsServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/GoodsServiceImplements.java new file mode 100644 index 0000000..ed7ce66 --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/GoodsServiceImplements.java @@ -0,0 +1,45 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.Goods; +import com.wms.mapper.GoodsMapper; +import com.wms.service.GoodsService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class GoodsServiceImplements implements GoodsService { + + + private final GoodsMapper goodsMapper; + @Autowired + public GoodsServiceImplements(GoodsMapper goodsMapper) { + this.goodsMapper = goodsMapper; + } + + @Override + public List selGoods(Goods goods){ + return this.goodsMapper.selGoods(goods); + } + + @Override + public Goods selGoodsByGoodsId(String goodsId) { + return this.goodsMapper.selGoodsByGoodsId(goodsId); + } + + @Override + public int addGoods(Goods goods) { + return this.goodsMapper.addGoods(goods); + } + + @Override + public int modifyGoods(Goods goods) { + return this.goodsMapper.modifyGoods(goods); + } + + @Override + public int deleteGoods(String goodsId) { + return this.goodsMapper.deleteGoods(goodsId); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/LocationServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/LocationServiceImplements.java new file mode 100644 index 0000000..ecfabd4 --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/LocationServiceImplements.java @@ -0,0 +1,39 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.Location; +import com.wms.mapper.LocationMapper; +import com.wms.service.LocationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class LocationServiceImplements implements LocationService { + + private final LocationMapper locationMapper; + @Autowired + public LocationServiceImplements(LocationMapper locationMapper) { + this.locationMapper = locationMapper; + } + + @Override + public List selLocations(Location location) { + return this.locationMapper.selLocations(location); + } + + @Override + public List selNextLocation(Location location) { + return locationMapper.selNextLocation(location); + } + + @Override + public int addLocation(Location location) { + return locationMapper.addLocation(location); + } + + @Override + public int modifyLocation(Location location) { + return this.locationMapper.modifyLocation(location); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/MenuServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/MenuServiceImplements.java new file mode 100644 index 0000000..f4ca5b1 --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/MenuServiceImplements.java @@ -0,0 +1,25 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.Menu; +import com.wms.mapper.MenuMapper; +import com.wms.service.MenuService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class MenuServiceImplements implements MenuService { + + + private final MenuMapper menuMapper; + @Autowired + public MenuServiceImplements(MenuMapper menuMapper) { + this.menuMapper = menuMapper; + } + + @Override + public List selMenuByRoleId(int roleId) { + return this.menuMapper.selMenuByRoleId(roleId); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/PartInfoServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/PartInfoServiceImplements.java new file mode 100644 index 0000000..77e1ac8 --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/PartInfoServiceImplements.java @@ -0,0 +1,40 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.PartInfo; +import com.wms.mapper.PartInfoMapper; +import com.wms.service.PartInfoService; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class PartInfoServiceImplements implements PartInfoService { + private final PartInfoMapper partInfoMapper; + @Override + public List selParts(PartInfo partInfo) { + return partInfoMapper.selParts(partInfo); + } + + @Override + public PartInfo selPartByPartNo(String material) { + return partInfoMapper.selPartByPartNo(material); + } + + @Override + public int addPart(PartInfo partInfo) { + return partInfoMapper.addPart(partInfo); + } + + @Override + public int modifyPart(PartInfo partInfo) { + return partInfoMapper.modifyPart(partInfo); + } + + @Override + public int deletePartByPartNo(String material) { + return partInfoMapper.deletePartByPartNo(material); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/StandServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/StandServiceImplements.java new file mode 100644 index 0000000..effa96f --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/StandServiceImplements.java @@ -0,0 +1,45 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.Stand; +import com.wms.mapper.StandMapper; +import com.wms.service.StandService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class StandServiceImplements implements StandService { + + private final StandMapper standMapper; + + @Autowired + public StandServiceImplements(StandMapper standMapper) { + this.standMapper = standMapper; + } + + @Override + public List selStands(Stand stand) { + return this.standMapper.selStands(stand); + } + + @Override + public Stand selStandById(String standId) { + return this.standMapper.selStandById(standId); + } + + @Override + public int addStand(Stand stand) { + return this.standMapper.addStand(stand); + } + + @Override + public int modifyStand(Stand stand) { + return this.standMapper.modifyStand(stand); + } + + @Override + public int deleteStand(Stand stand) { + return this.standMapper.deleteStand(stand); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/StockServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/StockServiceImplements.java new file mode 100644 index 0000000..c1d6688 --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/StockServiceImplements.java @@ -0,0 +1,67 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.Stock; +import com.wms.mapper.StockMapper; +import com.wms.service.StockService; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class StockServiceImplements implements StockService { + + private final StockMapper stockMapper; + + @Override + public List selStocks(Stock stock) { + return this.stockMapper.selStocks(stock); + } + + @Override + public List selStocksFront(String query) { + return stockMapper.selStocksFront(query); + } + + @Override + public int addStock(Stock stock) { + return this.stockMapper.addStock(stock); + } + + @Override + public int modifyStock(Stock stock) { + return this.stockMapper.modifyStock(stock); + } + + @Override + public int deleteStock(String stockId) { + return this.stockMapper.deleteStock(stockId); + } + + @Override + public List selStocksByGoodsId(Stock stock) { + return stockMapper.selStocksByGoodsId(stock); + } + + @Override + public List selStockOutOfDate() { + return stockMapper.selStockOutOfDate(); + } + + @Override + public List selStockNearDeadLine(int nearInterval) { + return stockMapper.selStockNearDeadLine(nearInterval); + } + + @Override + public List selStockLongTimeNoUse(int nearInterval) { + return stockMapper.selStockLongTimeNoUse(nearInterval); + } + + @Override + public int resetStock(Stock stock) { + return stockMapper.resetStock(stock); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/TaskRecordServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/TaskRecordServiceImplements.java new file mode 100644 index 0000000..7fe4718 --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/TaskRecordServiceImplements.java @@ -0,0 +1,45 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.Task; +import com.wms.mapper.TaskRecordMapper; +import com.wms.service.TaskRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class TaskRecordServiceImplements implements TaskRecordService { + + private final TaskRecordMapper taskRecordMapper; + + @Autowired + public TaskRecordServiceImplements(TaskRecordMapper taskRecordMapper) { + this.taskRecordMapper = taskRecordMapper; + } + + @Override + public List selTasks(Task taskRecord) { + return taskRecordMapper.selTasks(taskRecord); + } + + @Override + public int addTask(Task taskRecord) { + return taskRecordMapper.addTask(taskRecord); + } + + @Override + public int executeTask(Task taskRecord) { + return taskRecordMapper.executeTask(taskRecord); + } + + @Override + public int deleteTask(String taskId) { + return taskRecordMapper.deleteTask(taskId); + } + + @Override + public int deleteTaskRecordRegularly() { + return taskRecordMapper.deleteTaskRecordRegularly(); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/TaskServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/TaskServiceImplements.java new file mode 100644 index 0000000..937fa5c --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/TaskServiceImplements.java @@ -0,0 +1,40 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.Task; +import com.wms.mapper.TaskMapper; +import com.wms.service.TaskService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class TaskServiceImplements implements TaskService { + + private final TaskMapper taskMapper; + + @Autowired + public TaskServiceImplements(TaskMapper taskMapper) { + this.taskMapper = taskMapper; + } + + @Override + public List selTasks(Task task) { + return taskMapper.selTasks(task); + } + + @Override + public int addTask(Task task) { + return taskMapper.addTask(task); + } + + @Override + public int executeTask(Task task) { + return taskMapper.executeTask(task); + } + + @Override + public int deleteTask(String taskId) { + return taskMapper.deleteTask(taskId); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/UserServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/UserServiceImplements.java new file mode 100644 index 0000000..c601321 --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/UserServiceImplements.java @@ -0,0 +1,24 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.User; +import com.wms.mapper.UserMapper; +import com.wms.service.UserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class UserServiceImplements implements UserService { + + private final UserMapper userMapper; + @Autowired + public UserServiceImplements(UserMapper userMapper) { + this.userMapper = userMapper; + } + + @Override + public List selectUsers(User user) { + return userMapper.selectUsers(user); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/VehicleServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/VehicleServiceImplements.java new file mode 100644 index 0000000..4987863 --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/VehicleServiceImplements.java @@ -0,0 +1,43 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.Vehicle; +import com.wms.mapper.VehicleMapper; +import com.wms.service.VehicleService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class VehicleServiceImplements implements VehicleService { + private final VehicleMapper vehicleMapper; + + @Autowired + public VehicleServiceImplements(VehicleMapper vehicleMapper) { + this.vehicleMapper = vehicleMapper; + } + @Override + public List selVehicles(Vehicle vehicle) { + return vehicleMapper.selVehicles(vehicle); + } + + @Override + public Vehicle selVehicleById(String vehicleId) { + return vehicleMapper.selVehicleById(vehicleId); + } + + @Override + public int addVehicle(Vehicle vehicle) { + return vehicleMapper.addVehicle(vehicle); + } + + @Override + public int modifyVehicle(Vehicle vehicle) { + return vehicleMapper.modifyVehicle(vehicle); + } + + @Override + public int deleteVehicle(Vehicle vehicle) { + return vehicleMapper.deleteVehicle(vehicle); + } +} diff --git a/src/main/java/com/wms/utils/HttpUtils.java b/src/main/java/com/wms/utils/HttpUtils.java new file mode 100644 index 0000000..62fdc63 --- /dev/null +++ b/src/main/java/com/wms/utils/HttpUtils.java @@ -0,0 +1,227 @@ +package com.wms.utils; + +import java.io.IOException; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.nio.charset.Charset; +import java.util.Base64; +import java.util.Map; + +import jakarta.servlet.http.HttpServletRequest; +import org.apache.commons.lang3.StringUtils; +import org.apache.http.HttpEntity; +import org.apache.http.ParseException; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.util.EntityUtils; + +/** + * Http工具类 + */ +public class HttpUtils { + + /** + * 获取请求的ip地址 + * @param request 请求 + * @return ip地址 + */ + public static String getIpAddr(HttpServletRequest request) { + String ip = request.getHeader("x-forwarded-for"); + if (ip == null || ip.isEmpty() || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("Proxy-Client-IP"); + } + if (ip == null || ip.isEmpty() || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("WL-Proxy-Client-IP"); + } + if (ip == null || ip.isEmpty() || "unknown".equalsIgnoreCase(ip)) { + ip = request.getRemoteAddr(); + } + if (ip != null && ip.indexOf(",") > 0) { + String[] parts = ip.split(","); + for (String part : parts) { + if (!part.isEmpty() && !"unknown".equalsIgnoreCase(part)) { + ip = part.trim(); + break; + } + } + } + if ("0:0:0:0:0:0:0:1".equals(ip)) { + ip = "127.0.0.1"; + } + return ip; + } + + /** + * 发送HttpGet请求(无参数) + * @param url 地址 + * @return 响应结果 + */ + public static String sendHttpGet(String url) { + String result = ""; + CloseableHttpClient httpClient = null; + CloseableHttpResponse response = null; + try { + httpClient = HttpClients.createDefault(); + HttpGet httpget = new HttpGet(url); + response = httpClient.execute(httpget); + HttpEntity entity = null; + if (response != null) { + entity = response.getEntity(); + } + if (entity != null) { + result = EntityUtils.toString(entity); + } + } catch (ParseException | IOException e) { + e.printStackTrace(); + } finally { + if(response!=null){ try{response.close();}catch (IOException e){ e.printStackTrace();} } + if(httpClient!=null){ try{httpClient.close();}catch(IOException e){ e.printStackTrace();} } + } + return result; + } + + /** + * 发送HttpGet请求(带参数) + * @param url 地址 + * @param header 参数放在请求头里面 + * @return 响应结果 + */ + public static String sendHttpGet(String url, Map header) { + if (header == null) {// 没有参数 + return sendHttpGet(url); + } + String result = ""; + CloseableHttpClient httpClient = null; + CloseableHttpResponse response = null; + try { + httpClient = HttpClients.createDefault(); + HttpGet httpGet = new HttpGet(url); + // 设置超时时间 + RequestConfig requestConfig = RequestConfig.custom() + .setConnectTimeout(5000) + .setConnectionRequestTimeout(1000) + .setSocketTimeout(5000).build(); + httpGet.setConfig(requestConfig); + for(Map.Entry entry : header.entrySet()){ + + httpGet.setHeader(entry.getKey(), entry.getValue()); + } + response = httpClient.execute(httpGet); + HttpEntity entity = null; + if (response != null) { + entity = response.getEntity(); + } + if (entity != null) { + result = EntityUtils.toString(entity); + } + } catch (ParseException | IOException e) { + e.printStackTrace(); + } finally { + if(response!=null){ try{response.close();}catch (IOException e){ e.printStackTrace();} } + if(httpClient!=null){ try{httpClient.close();}catch(IOException e){ e.printStackTrace();} } + } + return result; + } + + /** + * 发送httpPost请求(不需要认证信息) + * @param url 目的地址 + * @param param 参数 + * @return 请求结果 + */ + public static String sendHttpPostWithoutToken(String url,String param) { + return sendHttpPost(url, param, null, null, null); + } + + /** + * 发送httpPost请求 + * @param url 目的地址 + * @param param 参数 + * @param token 认证信息 + * @param userName 登录账户 + * @param password 登录密码 + * @return 请求结果 + */ + public static String sendHttpPost(String url, String param, String token, String userName, String password) { + String data=""; + CloseableHttpClient httpClient = null; + CloseableHttpResponse response = null; + try { + httpClient = HttpClients.createDefault(); + HttpPost httppost = new HttpPost(url); + RequestConfig requestConfig = RequestConfig.custom() + .setConnectTimeout(5000) + .setConnectionRequestTimeout(1000) + .setSocketTimeout(5000).build(); + httppost.setConfig(requestConfig); + httppost.setHeader("Content-Type", "application/json;charset=UTF-8"); + if (StringUtils.isEmpty(token) && StringUtils.isNotEmpty(userName) && StringUtils.isNotEmpty(password)) { + httppost.setHeader("Authorization", "Basic " + Base64.getUrlEncoder().encodeToString((userName + ":" + password).getBytes())); + } else { + httppost.setHeader("Authorization", "Bearer " + token); + } + StringEntity se = new StringEntity(param, Charset.forName("UTF-8")); + se.setContentType("text/json"); + se.setContentEncoding("UTF-8"); + httppost.setEntity(se); + response = httpClient.execute(httppost); + data = EntityUtils.toString(response.getEntity(), "utf-8"); + EntityUtils.consume(response.getEntity()); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if(response!=null){ try{response.close();}catch (IOException e){ e.printStackTrace();} } + if(httpClient!=null){ try{httpClient.close();}catch(IOException e){ e.printStackTrace();} } + } + return data; + } + + /** + * 发送httpPost请求 + * @param url 目的地址 + * @param param 参数 + * @param token 认证信息 + * @param userName 登录账户 + * @param password 登录密码 + * @return 请求结果 + */ + public static String sendHttpPostForm(String url, String param, String token, String userName, String password) { + + String data=""; + CloseableHttpClient httpClient = null; + CloseableHttpResponse response = null; + try { + httpClient = HttpClients.createDefault(); + HttpPost httppost = new HttpPost(url); + RequestConfig requestConfig = RequestConfig.custom() + .setConnectTimeout(5000) + .setConnectionRequestTimeout(1000) + .setSocketTimeout(5000).build(); + httppost.setConfig(requestConfig); + httppost.setHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8"); + if (StringUtils.isEmpty(token) && StringUtils.isNotEmpty(userName) && StringUtils.isNotEmpty(password)) { + httppost.setHeader("Authorization", "Basic " + Base64.getUrlEncoder().encodeToString((userName + ":" + password).getBytes())); + } else { + httppost.setHeader("Authorization", "Bearer " + token); + } + StringEntity se = new StringEntity(param, Charset.forName("UTF-8")); + se.setContentType("application/x-www-form-urlencoded"); + se.setContentEncoding("UTF-8"); + httppost.setEntity(se); + response = httpClient.execute(httppost); + data = EntityUtils.toString(response.getEntity(), "utf-8"); + EntityUtils.consume(response.getEntity()); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if(response!=null){ try{response.close();}catch (IOException e){ e.printStackTrace();} } + if(httpClient!=null){ try{httpClient.close();}catch(IOException e){ e.printStackTrace();} } + } + return data; + } +} diff --git a/src/main/java/com/wms/utils/JWTUtils.java b/src/main/java/com/wms/utils/JWTUtils.java new file mode 100644 index 0000000..20363ad --- /dev/null +++ b/src/main/java/com/wms/utils/JWTUtils.java @@ -0,0 +1,15 @@ +package com.wms.utils; + +import com.auth0.jwt.JWT; +import com.auth0.jwt.interfaces.DecodedJWT; + +public class JWTUtils { + /** + * 解码token + * @param token token + * @return 结果 + */ + public static DecodedJWT decodeToken(String token) { + return JWT.decode(token); + } +} diff --git a/src/main/java/com/wms/utils/MyPassword.java b/src/main/java/com/wms/utils/MyPassword.java new file mode 100644 index 0000000..ceb6ab3 --- /dev/null +++ b/src/main/java/com/wms/utils/MyPassword.java @@ -0,0 +1,113 @@ +package com.wms.utils; + +import javax.crypto.Cipher; +import javax.crypto.KeyGenerator; +import javax.crypto.SecretKey; +import javax.crypto.spec.SecretKeySpec; +import java.security.SecureRandom; + +/** + * Md5加密算法 + */ +public class MyPassword { + + // 密钥 + private static final String myPwd = "fdbk"; + + /** + * 加密 + * @param originalPassword + * @return + */ + public static String encrypt(String originalPassword) { + byte[] targetPassword; + try { + // 声明加密算法 + KeyGenerator kgen = KeyGenerator.getInstance("AES"); + SecureRandom random = SecureRandom.getInstance("SHA1PRNG"); + random.setSeed(myPwd.getBytes()); + kgen.init(128, random); + SecretKey secretKey = kgen.generateKey(); + byte[] enCodeFormat = secretKey.getEncoded(); + SecretKeySpec key = new SecretKeySpec(enCodeFormat, "AES"); + + // 创建密码器 + Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); + cipher.init(Cipher.ENCRYPT_MODE, key); + byte[] byteContent = originalPassword.getBytes(); + targetPassword = cipher.doFinal(byteContent); + + } catch (Exception e) { + return null; + } + + return parseByte2HexStr(targetPassword); + } + + /** + * 解密 + * @param targetPassword + * @return + */ + public static String decrypt(String targetPassword) { + byte[] originalPassword; + byte[] content = parseHexStr2Byte(targetPassword); + try { + KeyGenerator kgen = KeyGenerator.getInstance("AES"); + SecureRandom random = SecureRandom.getInstance("SHA1PRNG"); + random.setSeed(myPwd.getBytes()); + kgen.init(128, random); + SecretKey secretKey = kgen.generateKey(); + byte[] enCodeFormat = secretKey.getEncoded(); + SecretKeySpec key = new SecretKeySpec(enCodeFormat, "AES"); + + // 创建密码器 + Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); + cipher.init(Cipher.DECRYPT_MODE, key); + originalPassword = cipher.doFinal(content); + + } catch (Exception e) { + e.printStackTrace(); + return null; + } + + return new String(originalPassword); + } + + /** + * 将二进制转换成十六进制 + * + * @param buf + * @return + */ + public static String parseByte2HexStr(byte buf[]) { + StringBuffer sb = new StringBuffer(); + for (int i = 0; i < buf.length; i++) { + String hex = Integer.toHexString(buf[i] & 0xFF); + if (hex.length() == 1) { + hex = '0' + hex; + } + sb.append(hex.toUpperCase()); + } + return sb.toString(); + } + + /** + * 将十六进制转换为二进制 + * + * @param hexStr + * @return + */ + public static byte[] parseHexStr2Byte(String hexStr) { + if (hexStr.length() < 1) { + return null; + } + byte[] result = new byte[hexStr.length() / 2]; + for (int i = 0; i < hexStr.length() / 2; i++) { + int high = Integer.parseInt(hexStr.substring(i * 2, i * 2 + 1), 16); + int low = Integer.parseInt(hexStr.substring(i * 2 + 1, i * 2 + 2), 16); + result[i] = (byte) (high * 16 + low); + } + return result; + } +} diff --git a/src/main/java/com/wms/utils/StringUtils.java b/src/main/java/com/wms/utils/StringUtils.java new file mode 100644 index 0000000..e7d2d16 --- /dev/null +++ b/src/main/java/com/wms/utils/StringUtils.java @@ -0,0 +1,110 @@ +package com.wms.utils; + +/** + * WMS字符串工具类 + * @author 梁州 + * @date 2023/2/13 + */ +public class StringUtils { + /** 空字符串 */ + private static final String NULLSTR = ""; + + /** 下划线 */ + private static final char SEPARATOR = '_'; + + public static boolean isEmpty(String value) { + return value == null || value.equals(NULLSTR); + } + + public static boolean isNotEmpty(String value) { + return !isEmpty(value); + } + + /** + * 驼峰转下划线命名 + */ + public static String toUnderScoreCase(String str) + { + if (str == null) + { + return null; + } + StringBuilder sb = new StringBuilder(); + // 前置字符是否大写 + boolean preCharIsUpperCase = true; + // 当前字符是否大写 + boolean curreCharIsUpperCase = true; + // 下一字符是否大写 + boolean nexteCharIsUpperCase = true; + for (int i = 0; i < str.length(); i++) + { + char c = str.charAt(i); + if (i > 0) + { + preCharIsUpperCase = Character.isUpperCase(str.charAt(i - 1)); + } + else + { + preCharIsUpperCase = false; + } + + curreCharIsUpperCase = Character.isUpperCase(c); + + if (i < (str.length() - 1)) + { + nexteCharIsUpperCase = Character.isUpperCase(str.charAt(i + 1)); + } + + if (preCharIsUpperCase && curreCharIsUpperCase && !nexteCharIsUpperCase) + { + sb.append(SEPARATOR); + } + else if ((i != 0 && !preCharIsUpperCase) && curreCharIsUpperCase) + { + sb.append(SEPARATOR); + } + sb.append(Character.toLowerCase(c)); + } + + return sb.toString(); + } + + /** + * 驼峰式命名法 + * 例如:user_name->userName + */ + public static String toCamelCase(String s) + { + if (s == null) + { + return null; + } + if (s.indexOf(SEPARATOR) == -1) + { + s = s.toLowerCase(); + return s; + } + s = s.toLowerCase(); + StringBuilder sb = new StringBuilder(s.length()); + boolean upperCase = false; + for (int i = 0; i < s.length(); i++) + { + char c = s.charAt(i); + + if (c == SEPARATOR) + { + upperCase = true; + } + else if (upperCase) + { + sb.append(Character.toUpperCase(c)); + upperCase = false; + } + else + { + sb.append(c); + } + } + return sb.toString(); + } +} diff --git a/src/main/java/com/wms/utils/TokenUtils.java b/src/main/java/com/wms/utils/TokenUtils.java new file mode 100644 index 0000000..f824f25 --- /dev/null +++ b/src/main/java/com/wms/utils/TokenUtils.java @@ -0,0 +1,6 @@ +package com.wms.utils; + +public class TokenUtils { + private static final long EXPIRE_TIME= 10*60*60*1000; //十小时 + private static final String TOKEN_SECRET="123456"; //密钥盐 +} diff --git a/src/main/java/com/wms/utils/WmsUtils.java b/src/main/java/com/wms/utils/WmsUtils.java new file mode 100644 index 0000000..e9d0b5b --- /dev/null +++ b/src/main/java/com/wms/utils/WmsUtils.java @@ -0,0 +1,170 @@ +package com.wms.utils; + +import org.apache.commons.lang3.StringUtils; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.UUID; + +/** + * WMS工具类 + * @author 梁州 + * @date 2023/2/13 + */ +public class WmsUtils { + // 日期格式 + private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); + // 时间格式 + private static final SimpleDateFormat timeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + // id用的时间格式 + private static final SimpleDateFormat idTimeFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS"); + private static volatile Long lastTimestamp = -1L; + /** + * 生成唯一的编号 + * @param code 插入字符串 + * @return 唯一id + */ + public static String generateId(String code) { + return code + generateUUIDString(); + } + + /** + * 生成UUID + */ + public synchronized static String generateUUIDString() { + long timeStamp = System.currentTimeMillis(); + if (timeStamp == lastTimestamp) { + try { + Thread.sleep(1); + } catch (InterruptedException e){ + timeStamp = System.currentTimeMillis(); + lastTimestamp = timeStamp; + return idTimeFormat.format(new Date()).concat(String.valueOf(timeStamp)); + } + timeStamp = System.currentTimeMillis(); + lastTimestamp = timeStamp; + return idTimeFormat.format(new Date()).concat(String.valueOf(timeStamp)); + } else { + lastTimestamp = timeStamp; + return idTimeFormat.format(new Date()).concat(String.valueOf(timeStamp)); + } + } + + /** + * 时间字符串转时间格式 + * @param time 时间 + */ + public static Date timeStringToTime(String time) throws ParseException { + return timeFormat.parse(time); + } + + /** + * 日期字符串 + * @param date 日期 + */ + public static Date dateStringToDate(String date) throws ParseException { + return dateFormat.parse(date); + } + + /** + * 生成时间戳,格式yyyy-MM-dd HH:mm:ss + * @return 时间戳 + */ + public static String createCurrentTimeString() { + return timeFormat.format(new Date()); + } + + /** + * 生成日期字符串,格式yyyy-MM-dd + * @return 时间戳 + */ + public static String createCurrentDateString() { + return dateFormat.format(new Date()); + } + + /** + * 格式化日期,格式yyyy-MM-dd + * @param date 日期 + * @return 时间戳 + */ + public static String formatDateString(Date date) { + return dateFormat.format(date); + } + + /** + * 格式化时间,格式yyyy-MM-dd HH:mm:ss + * @param date 日期 + * @return 时间戳 + */ + public static String formatTimeString(Date date) { + return timeFormat.format(date); + } + + /** + * 获得指定日期之后指定天数的日期 + * @param beginDay 开始日期 + * @param days 天数 + * @return 日期 + */ + public static Date calculationDate(Date beginDay, int days){ + Calendar calendar = Calendar.getInstance(); + calendar.setTime(beginDay); + calendar.add(Calendar.DATE, days); + return calendar.getTime(); + } + + /** + * 获得指定日期之后指定月数的日期 + * @param beginDay 开始日期 + * @param months 月数 + * @return 日期 + */ + public static Date calculationMonth(Date beginDay, int months){ + Calendar calendar = Calendar.getInstance(); + calendar.setTime(beginDay); + calendar.add(Calendar.MONTH, months); + return calendar.getTime(); + } + + /** + * 获得指定日期之后指定年数的日期 + * @param beginDay 开始日期 + * @param years 年数 + * @return 日期 + */ + public static Date calculationYear(Date beginDay, int years){ + Calendar calendar = Calendar.getInstance(); + calendar.setTime(beginDay); + calendar.add(Calendar.YEAR, years); + return calendar.getTime(); + } + + /** + * 获取指定天数后的日期 + * @param day 天数 + * @return 日期 + */ + public static Date getDay(int day){ + return calculationDate(new Date(), day); + } + + /** + * 获取任意月后的时间 + * @Params: mon 1表示后一个月 -1表示前一个月 + * @Return + */ + public static Date getMon(int mon){ + return calculationMonth(new Date(), mon); + } + + /** + * 获取任意年之后的日期 + * @param year 年 + * @return 日期 + */ + public static Date getYear(int year){ + return calculationYear(new Date(), year); + } +} diff --git a/src/main/java/com/wms/utils/excel/ExcelClassField.java b/src/main/java/com/wms/utils/excel/ExcelClassField.java new file mode 100644 index 0000000..008be2b --- /dev/null +++ b/src/main/java/com/wms/utils/excel/ExcelClassField.java @@ -0,0 +1,71 @@ +package com.wms.utils.excel; + +import java.util.LinkedHashMap; + +public class ExcelClassField { + /** 字段名称 */ + private String fieldName; + + /** 表头名称 */ + private String name; + + /** 映射关系 */ + private LinkedHashMap kvMap; + + /** 示例值 */ + private Object example; + + /** 排序 */ + private int sort; + + /** 是否为注解字段:0-否,1-是 */ + private int hasAnnotation; + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public LinkedHashMap getKvMap() { + return kvMap; + } + + public void setKvMap(LinkedHashMap kvMap) { + this.kvMap = kvMap; + } + + public Object getExample() { + return example; + } + + public void setExample(Object example) { + this.example = example; + } + + public int getSort() { + return sort; + } + + public void setSort(int sort) { + this.sort = sort; + } + + public int getHasAnnotation() { + return hasAnnotation; + } + + public void setHasAnnotation(int hasAnnotation) { + this.hasAnnotation = hasAnnotation; + } +} diff --git a/src/main/java/com/wms/utils/excel/ExcelExport.java b/src/main/java/com/wms/utils/excel/ExcelExport.java new file mode 100644 index 0000000..431d99e --- /dev/null +++ b/src/main/java/com/wms/utils/excel/ExcelExport.java @@ -0,0 +1,22 @@ +package com.wms.utils.excel; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target(ElementType.FIELD) +@Retention(RetentionPolicy.RUNTIME) +public @interface ExcelExport { + /** 字段名称 */ + String value(); + + /** 导出排序先后: 数字越小越靠前(默认按Java类字段顺序导出) */ + int sort() default 0; + + /** 导出映射,格式如:0-未知;1-男;2-女 */ + String kv() default ""; + + /** 导出模板示例值(有值的话,直接取该值,不做映射) */ + String example() default ""; +} diff --git a/src/main/java/com/wms/utils/excel/ExcelImport.java b/src/main/java/com/wms/utils/excel/ExcelImport.java new file mode 100644 index 0000000..58c7b52 --- /dev/null +++ b/src/main/java/com/wms/utils/excel/ExcelImport.java @@ -0,0 +1,25 @@ +package com.wms.utils.excel; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target(ElementType.FIELD) +@Retention(RetentionPolicy.RUNTIME) +public @interface ExcelImport { + /** 字段名称 */ + String value(); + + /** 导出映射,格式如:0-未知;1-男;2-女 */ + String kv() default ""; + + /** 是否为必填字段(默认为非必填) */ + boolean required() default false; + + /** 最大长度(默认255) */ + int maxLength() default 255; + + /** 导入唯一性验证(多个字段则取联合验证) */ + boolean unique() default false; +} diff --git a/src/main/java/com/wms/utils/excel/ExcelUtils.java b/src/main/java/com/wms/utils/excel/ExcelUtils.java new file mode 100644 index 0000000..28c81d1 --- /dev/null +++ b/src/main/java/com/wms/utils/excel/ExcelUtils.java @@ -0,0 +1,1026 @@ +package com.wms.utils.excel; + + +import com.alibaba.fastjson2.JSONArray; +import com.alibaba.fastjson2.JSONObject; +import jakarta.servlet.ServletOutputStream; +import jakarta.servlet.http.HttpServletResponse; +import org.apache.poi.hssf.usermodel.HSSFDataFormatter; +import org.apache.poi.hssf.usermodel.HSSFDataValidation; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.poifs.filesystem.POIFSFileSystem; +import org.apache.poi.ss.usermodel.*; +import org.apache.poi.ss.util.CellRangeAddress; +import org.apache.poi.ss.util.CellRangeAddressList; +import org.apache.poi.xssf.streaming.SXSSFWorkbook; +import org.apache.poi.xssf.usermodel.*; +import org.springframework.web.multipart.MultipartFile; +import org.apache.poi.ss.usermodel.DateUtil; + +import java.io.*; +import java.lang.reflect.Field; +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.net.URL; +import java.text.DecimalFormat; +import java.text.NumberFormat; +import java.text.SimpleDateFormat; +import java.util.*; + +/** + * Excel工具类 + */ +@SuppressWarnings("unused") +public class ExcelUtils { + private static final String XLSX = ".xlsx"; + private static final String XLS = ".xls"; + public static final String ROW_MERGE = "row_merge"; + public static final String COLUMN_MERGE = "column_merge"; + private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; + private static final String ROW_NUM = "rowNum"; + private static final String ROW_DATA = "rowData"; + private static final String ROW_TIPS = "rowTips"; + private static final int CELL_OTHER = 0; + private static final int CELL_ROW_MERGE = 1; + private static final int CELL_COLUMN_MERGE = 2; + private static final int IMG_HEIGHT = 30; + private static final int IMG_WIDTH = 30; + private static final char LEAN_LINE = '/'; + private static final int BYTES_DEFAULT_LENGTH = 10240; + private static final NumberFormat NUMBER_FORMAT = NumberFormat.getNumberInstance(); + + public static List readFile(File file, Class clazz) throws Exception { + JSONArray array = readFile(file); + return getBeanList(array, clazz); + } + + public static List readMultipartFile(MultipartFile mFile, Class clazz) throws Exception { + JSONArray array = readMultipartFile(mFile); + return getBeanList(array, clazz); + } + public static JSONArray readFile(File file) throws Exception { + return readExcel(null, file); + } + + public static JSONArray readMultipartFile(MultipartFile mFile) throws Exception { + return readExcel(mFile, null); + } + + public static Map readFileManySheet(File file) throws Exception { + return readExcelManySheet(null, file); + } + + public static Map readFileManySheet(MultipartFile file) throws Exception { + return readExcelManySheet(file, null); + } + + private static List getBeanList(JSONArray array, Class clazz) throws Exception { + List list = new ArrayList<>(); + Map uniqueMap = new HashMap<>(16); + for (int i = 0; i < array.size(); i++) { + list.add(getBean(clazz, array.getJSONObject(i), uniqueMap)); + } + return list; + } + + + /** + * 获取每个对象的数据 + */ + private static T getBean(Class c, JSONObject obj, Map uniqueMap) throws Exception { + T t = c.getDeclaredConstructor().newInstance(); + Field[] fields = c.getDeclaredFields(); + List errMsgList = new ArrayList<>(); + boolean hasRowTipsField = false; + StringBuilder uniqueBuilder = new StringBuilder(); + int rowNum = 0; + for (Field field : fields) { + // 行号 + if (field.getName().equals(ROW_NUM)) { + rowNum = obj.getInteger(ROW_NUM); + field.setAccessible(true); + field.set(t, rowNum); + continue; + } + // 是否需要设置异常信息 + if (field.getName().equals(ROW_TIPS)) { + hasRowTipsField = true; + continue; + } + // 原始数据 + if (field.getName().equals(ROW_DATA)) { + field.setAccessible(true); + field.set(t, obj.toString()); + continue; + } + // 设置对应属性值 + setFieldValue(t, field, obj, uniqueBuilder, errMsgList); + } + // 数据唯一性校验 + if (uniqueBuilder.length() > 0) { + if (uniqueMap.containsValue(uniqueBuilder.toString())) { + Set rowNumKeys = uniqueMap.keySet(); + for (Integer num : rowNumKeys) { + if (uniqueMap.get(num).equals(uniqueBuilder.toString())) { + errMsgList.add(String.format("数据唯一性校验失败,(%s)与第%s行重复)", uniqueBuilder, num)); + } + } + } else { + uniqueMap.put(rowNum, uniqueBuilder.toString()); + } + } + // 失败处理 + if (errMsgList.isEmpty() && !hasRowTipsField) { + return t; + } + StringBuilder sb = new StringBuilder(); + int size = errMsgList.size(); + for (int i = 0; i < size; i++) { + if (i == size - 1) { + sb.append(errMsgList.get(i)); + } else { + sb.append(errMsgList.get(i)).append(";"); + } + } + // 设置错误信息 + for (Field field : fields) { + if (field.getName().equals(ROW_TIPS)) { + field.setAccessible(true); + field.set(t, sb.toString()); + } + } + return t; + } + + private static void setFieldValue(T t, Field field, JSONObject obj, StringBuilder uniqueBuilder, List errMsgList) { + // 获取 ExcelImport 注解属性 + ExcelImport annotation = field.getAnnotation(ExcelImport.class); + if (annotation == null) { + return; + } + String cname = annotation.value(); + if (cname.trim().length() == 0) { + return; + } + // 获取具体值 + String val = null; + if (obj.containsKey(cname)) { + val = getString(obj.getString(cname)); + } + if (val == null) { + return; + } + field.setAccessible(true); + // 判断是否必填 + boolean require = annotation.required(); + if (require && val.isEmpty()) { + errMsgList.add(String.format("[%s]不能为空", cname)); + return; + } + // 数据唯一性获取 + boolean unique = annotation.unique(); + if (unique) { + if (uniqueBuilder.length() > 0) { + uniqueBuilder.append("--").append(val); + } else { + uniqueBuilder.append(val); + } + } + // 判断是否超过最大长度 + int maxLength = annotation.maxLength(); + if (maxLength > 0 && val.length() > maxLength) { + errMsgList.add(String.format("[%s]长度不能超过%s个字符(当前%s个字符)", cname, maxLength, val.length())); + } + // 判断当前属性是否有映射关系 + LinkedHashMap kvMap = getKvMap(annotation.kv()); + if (!kvMap.isEmpty()) { + boolean isMatch = false; + for (String key : kvMap.keySet()) { + if (kvMap.get(key).equals(val)) { + val = key; + isMatch = true; + break; + } + } + if (!isMatch) { + errMsgList.add(String.format("[%s]的值不正确(当前值为%s)", cname, val)); + return; + } + } + // 其余情况根据类型赋值 + String fieldClassName = field.getType().getSimpleName(); + try { + if ("String".equalsIgnoreCase(fieldClassName)) { + field.set(t, val); + } else if ("boolean".equalsIgnoreCase(fieldClassName)) { + field.set(t, Boolean.valueOf(val)); + } else if ("int".equalsIgnoreCase(fieldClassName) || "Integer".equals(fieldClassName)) { + try { + field.set(t, Integer.valueOf(val)); + } catch (NumberFormatException e) { + errMsgList.add(String.format("[%s]的值格式不正确(当前值为%s)", cname, val)); + } + } else if ("double".equalsIgnoreCase(fieldClassName)) { + field.set(t, Double.valueOf(val)); + } else if ("long".equalsIgnoreCase(fieldClassName)) { + field.set(t, Long.valueOf(val)); + } else if ("BigDecimal".equalsIgnoreCase(fieldClassName)) { + field.set(t, new BigDecimal(val)); + } else if ("Date".equalsIgnoreCase(fieldClassName)) { + try { + field.set(t, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(val)); + } catch (Exception e) { + field.set(t, new SimpleDateFormat("yyyy-MM-dd").parse(val)); + } + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + private static Map readExcelManySheet(MultipartFile mFile, File file) throws IOException { + Workbook book = getWorkbook(mFile, file); + if (book == null) { + return Collections.emptyMap(); + } + Map map = new LinkedHashMap<>(); + for (int i = 0; i < book.getNumberOfSheets(); i++) { + Sheet sheet = book.getSheetAt(i); + JSONArray arr = readSheet(sheet); + map.put(sheet.getSheetName(), arr); + } + book.close(); + return map; + } + + private static JSONArray readExcel(MultipartFile mFile, File file) throws IOException { + Workbook book = getWorkbook(mFile, file); + if (book == null) { + return new JSONArray(); + } + JSONArray array = readSheet(book.getSheetAt(0)); + book.close(); + return array; + } + + private static Workbook getWorkbook(MultipartFile mFile, File file) throws IOException { + boolean fileNotExist = (file == null || !file.exists()); + if (mFile == null && fileNotExist) { + return null; + } + // 解析表格数据 + InputStream in; + String fileName; + if (mFile != null) { + // 上传文件解析 + in = mFile.getInputStream(); + fileName = getString(mFile.getOriginalFilename()).toLowerCase(); + } else { + // 本地文件解析 + in = new FileInputStream(file); + fileName = file.getName().toLowerCase(); + } + Workbook book; + if (fileName.endsWith(XLSX)) { + book = new XSSFWorkbook(in); + } else if (fileName.endsWith(XLS)) { + POIFSFileSystem poifsFileSystem = new POIFSFileSystem(in); + book = new HSSFWorkbook(poifsFileSystem); + } else { + return null; + } + in.close(); + return book; + } + + private static JSONArray readSheet(Sheet sheet) { + // 首行下标 + int rowStart = sheet.getFirstRowNum(); + // 尾行下标 + int rowEnd = sheet.getLastRowNum(); + // 获取表头行 + Row headRow = sheet.getRow(rowStart); + if (headRow == null) { + return new JSONArray(); + } + int cellStart = headRow.getFirstCellNum(); + int cellEnd = headRow.getLastCellNum(); + Map keyMap = new HashMap<>(); + for (int j = cellStart; j < cellEnd; j++) { + // 获取表头数据 + String val = getCellValue(headRow.getCell(j)); + if (val != null && val.trim().length() != 0) { + keyMap.put(j, val); + } + } + // 如果表头没有数据则不进行解析 + if (keyMap.isEmpty()) { + return (JSONArray) Collections.emptyList(); + } + // 获取每行JSON对象的值 + JSONArray array = new JSONArray(); + // 如果首行与尾行相同,表明只有一行,返回表头数据 + if (rowStart == rowEnd) { + JSONObject obj = new JSONObject(); + // 添加行号 + obj.put(ROW_NUM, 1); + for (int i : keyMap.keySet()) { + obj.put(keyMap.get(i), ""); + } + array.add(obj); + return array; + } + for (int i = rowStart + 1; i <= rowEnd; i++) { + Row eachRow = sheet.getRow(i); + JSONObject obj = new JSONObject(); + // 添加行号 + obj.put(ROW_NUM, i + 1); + StringBuilder sb = new StringBuilder(); + for (int k = cellStart; k < cellEnd; k++) { + if (eachRow != null) { + String val = getCellValue(eachRow.getCell(k)); + // 所有数据添加到里面,用于判断该行是否为空 + sb.append(val); + obj.put(keyMap.get(k), val); + } + } + if (sb.length() > 0) { + array.add(obj); + } + } + return array; + } + + private static String getCellValue(Cell cell) { + // 空白或空 + if (cell == null || cell.getCellType() == CellType.BLANK) { + return ""; + } + // String类型 + if (cell.getCellType() == CellType.STRING) { + String val = cell.getStringCellValue(); + if (val == null || val.trim().length() == 0) { + return ""; + } + return val.trim(); + } + // 数字类型 + if (cell.getCellType() == CellType.NUMERIC) { + if (DateUtil.isCellDateFormatted(cell)) {// 日期类型 + // 短日期转化为字符串 + Date date = cell.getDateCellValue(); + if (date != null) { + // 标准0点 1970/01/01 08:00:00 + if (date.getTime() % 86400000 == 16 * 3600 * 1000 && cell.getCellStyle().getDataFormat() == 14) { + return new SimpleDateFormat("yyyy-MM-dd").format(date); + } else { + return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date); + } + } + } else {// 数值 + //System.out.println("Value:"+cell.getNumericCellValue()); + String numberStr = new HSSFDataFormatter().formatCellValue(cell); + // 货币格式,如:1,200.00 + if (numberStr.contains(",")) { + numberStr = numberStr.replace(",", ""); + } + if (numberStr.contains("E")) { // 科学计算法 + numberStr = new DecimalFormat("0").format(cell.getNumericCellValue()); //4.89481368464913E14还原为长整数 + return numberStr; + } else { + if (numberStr.contains(".")) { // 小数 + return numberStr; + } else { // 转换为整数 + return numberStr; + } + } + } +// String s = cell.getNumericCellValue() + ""; +// // 去掉尾巴上的小数点0 +// if (Pattern.matches(".*\\.0*", s)) { +// return s.split("\\.")[0]; +// } else { +// return s; +// } + } + // 布尔值类型 + if (cell.getCellType() == CellType.BOOLEAN) { + return String.valueOf(cell.getBooleanCellValue()); + } + // 错误类型 + return cell.getCellFormula(); + } + + public static void exportTemplate(HttpServletResponse response, String fileName, Class clazz) { + exportTemplate(response, fileName, fileName, clazz, false); + } + + public static void exportTemplate(HttpServletResponse response, String fileName, String sheetName, + Class clazz) { + exportTemplate(response, fileName, sheetName, clazz, false); + } + + public static void exportTemplate(HttpServletResponse response, String fileName, Class clazz, + boolean isContainExample) { + exportTemplate(response, fileName, fileName, clazz, isContainExample); + } + + public static void exportTemplate(HttpServletResponse response, String fileName, String sheetName, + Class clazz, boolean isContainExample) { + // 获取表头字段 + List headFieldList = getExcelClassFieldList(clazz); + // 获取表头数据和示例数据 + List> sheetDataList = new ArrayList<>(); + List headList = new ArrayList<>(); + List exampleList = new ArrayList<>(); + Map> selectMap = new LinkedHashMap<>(); + for (int i = 0; i < headFieldList.size(); i++) { + ExcelClassField each = headFieldList.get(i); + headList.add(each.getName()); + exampleList.add(each.getExample()); + LinkedHashMap kvMap = each.getKvMap(); + if (kvMap != null && kvMap.size() > 0) { + selectMap.put(i, new ArrayList<>(kvMap.values())); + } + } + sheetDataList.add(headList); + if (isContainExample) { + sheetDataList.add(exampleList); + } + // 导出数据 + export(response, fileName, sheetName, sheetDataList, selectMap); + } + + private static List getExcelClassFieldList(Class clazz) { + // 解析所有字段 + Field[] fields = clazz.getDeclaredFields(); + boolean hasExportAnnotation = false; + Map> map = new LinkedHashMap<>(); + List sortList = new ArrayList<>(); + for (Field field : fields) { + ExcelClassField cf = getExcelClassField(field); + if (cf.getHasAnnotation() == 1) { + hasExportAnnotation = true; + } + int sort = cf.getSort(); + if (map.containsKey(sort)) { + map.get(sort).add(cf); + } else { + List list = new ArrayList<>(); + list.add(cf); + sortList.add(sort); + map.put(sort, list); + } + } + Collections.sort(sortList); + // 获取表头 + List headFieldList = new ArrayList<>(); + if (hasExportAnnotation) { + for (Integer sort : sortList) { + for (ExcelClassField cf : map.get(sort)) { + if (cf.getHasAnnotation() == 1) { + headFieldList.add(cf); + } + } + } + } else { + headFieldList.addAll(map.get(0)); + } + return headFieldList; + } + + private static ExcelClassField getExcelClassField(Field field) { + ExcelClassField cf = new ExcelClassField(); + String fieldName = field.getName(); + cf.setFieldName(fieldName); + ExcelExport annotation = field.getAnnotation(ExcelExport.class); + // 无 ExcelExport 注解情况 + if (annotation == null) { + cf.setHasAnnotation(0); + cf.setName(fieldName); + cf.setSort(0); + return cf; + } + // 有 ExcelExport 注解情况 + cf.setHasAnnotation(1); + cf.setName(annotation.value()); + String example = getString(annotation.example()); + if (!example.isEmpty()) { + if (isNumeric(example) && example.length() < 8) { + cf.setExample(Double.valueOf(example)); + } else { + cf.setExample(example); + } + } else { + cf.setExample(""); + } + cf.setSort(annotation.sort()); + // 解析映射 + String kv = getString(annotation.kv()); + cf.setKvMap(getKvMap(kv)); + return cf; + } + + private static LinkedHashMap getKvMap(String kv) { + LinkedHashMap kvMap = new LinkedHashMap<>(); + if (kv.isEmpty()) { + return kvMap; + } + String[] kvs = kv.split(";"); + for (String each : kvs) { + String[] eachKv = getString(each).split("-"); + if (eachKv.length != 2) { + continue; + } + String k = eachKv[0]; + String v = eachKv[1]; + if (k.isEmpty() || v.isEmpty()) { + continue; + } + kvMap.put(k, v); + } + return kvMap; + } + + /** + * 导出表格到本地 + * + * @param file 本地文件对象 + * @param sheetData 导出数据 + */ + public static void exportFile(File file, List> sheetData) { + if (file == null) { + System.out.println("文件创建失败"); + return; + } + if (sheetData == null) { + sheetData = new ArrayList<>(); + } + Map>> map = new HashMap<>(); + map.put(file.getName(), sheetData); + export(null, file, file.getName(), map, null); + } + + /** + * 导出表格到本地 + * + * @param 导出数据类似,和K类型保持一致 + * @param filePath 文件父路径(如:D:/doc/excel/) + * @param fileName 文件名称(不带尾缀,如:学生表) + * @param list 导出数据 + * @throws IOException IO异常 + */ + public static File exportFile(String filePath, String fileName, List list) throws IOException { + File file = getFile(filePath, fileName); + List> sheetData = getSheetData(list); + exportFile(file, sheetData); + return file; + } + + /** + * 获取文件 + * + * @param filePath filePath 文件父路径(如:D:/doc/excel/) + * @param fileName 文件名称(不带尾缀,如:用户表) + * @return 本地File文件对象 + */ + private static File getFile(String filePath, String fileName) throws IOException { + String dirPath = getString(filePath); + String fileFullPath; + if (dirPath.isEmpty()) { + fileFullPath = fileName; + } else { + // 判定文件夹是否存在,如果不存在,则级联创建 + File dirFile = new File(dirPath); + if (!dirFile.exists()) { + boolean mkdirs = dirFile.mkdirs(); + if (!mkdirs) { + return null; + } + } + // 获取文件夹全名 + if (dirPath.endsWith(String.valueOf(LEAN_LINE))) { + fileFullPath = dirPath + fileName + XLSX; + } else { + fileFullPath = dirPath + LEAN_LINE + fileName + XLSX; + } + } + System.out.println(fileFullPath); + File file = new File(fileFullPath); + if (!file.exists()) { + boolean result = file.createNewFile(); + if (!result) { + return null; + } + } + return file; + } + + private static List> getSheetData(List list) { + // 获取表头字段 + List excelClassFieldList = getExcelClassFieldList(list.get(0).getClass()); + List headFieldList = new ArrayList<>(); + List headList = new ArrayList<>(); + Map headFieldMap = new HashMap<>(); + for (ExcelClassField each : excelClassFieldList) { + String fieldName = each.getFieldName(); + headFieldList.add(fieldName); + headFieldMap.put(fieldName, each); + headList.add(each.getName()); + } + // 添加表头名称 + List> sheetDataList = new ArrayList<>(); + sheetDataList.add(headList); + // 获取表数据 + for (T t : list) { + Map fieldDataMap = getFieldDataMap(t); + Set fieldDataKeys = fieldDataMap.keySet(); + List rowList = new ArrayList<>(); + for (String headField : headFieldList) { + if (!fieldDataKeys.contains(headField)) { + continue; + } + Object data = fieldDataMap.get(headField); + if (data == null) { + rowList.add(""); + continue; + } + ExcelClassField cf = headFieldMap.get(headField); + // 判断是否有映射关系 + LinkedHashMap kvMap = cf.getKvMap(); + if (kvMap == null || kvMap.isEmpty()) { + rowList.add(data); + continue; + } + String val = kvMap.get(data.toString()); + if (isNumeric(val)) { + rowList.add(Double.valueOf(val)); + } else { + rowList.add(val); + } + } + sheetDataList.add(rowList); + } + return sheetDataList; + } + + private static Map getFieldDataMap(T t) { + Map map = new HashMap<>(); + Field[] fields = t.getClass().getDeclaredFields(); + try { + for (Field field : fields) { + String fieldName = field.getName(); + field.setAccessible(true); + Object object = field.get(t); + map.put(fieldName, object); + } + } catch (IllegalArgumentException | IllegalAccessException e) { + e.printStackTrace(); + } + return map; + } + + public static void exportEmpty(HttpServletResponse response, String fileName) { + List> sheetDataList = new ArrayList<>(); + List headList = new ArrayList<>(); + headList.add("导出无数据"); + sheetDataList.add(headList); + export(response, fileName, sheetDataList); + } + + public static void export(HttpServletResponse response, String fileName, List> sheetDataList) { + export(response, fileName, fileName, sheetDataList, null); + } + + public static void exportManySheet(HttpServletResponse response, String fileName, Map>> sheetMap) { + export(response, null, fileName, sheetMap, null); + } + + + public static void export(HttpServletResponse response, String fileName, String sheetName, + List> sheetDataList) { + export(response, fileName, sheetName, sheetDataList, null); + } + + public static void export(HttpServletResponse response, String fileName, String sheetName, + List> sheetDataList, Map> selectMap) { + + Map>> map = new HashMap<>(); + map.put(sheetName, sheetDataList); + export(response, null, fileName, map, selectMap); + } + + public static void export(HttpServletResponse response, String fileName, List list, Class template) { + // list 是否为空 + boolean lisIsEmpty = list == null || list.isEmpty(); + // 如果模板数据为空,且导入的数据为空,则导出空文件 + if (template == null && lisIsEmpty) { + exportEmpty(response, fileName); + return; + } + // 如果 list 数据,则导出模板数据 + if (lisIsEmpty) { + exportTemplate(response, fileName, template); + return; + } + // 导出数据 + List> sheetDataList = getSheetData(list); + export(response, fileName, sheetDataList); + } + + public static void export(HttpServletResponse response, String fileName, List> sheetDataList, Map> selectMap) { + export(response, fileName, fileName, sheetDataList, selectMap); + } + + private static void export(HttpServletResponse response, File file, String fileName, + Map>> sheetMap, Map> selectMap) { + // 整个 Excel 表格 book 对象 + SXSSFWorkbook book = new SXSSFWorkbook(); + // 每个 Sheet 页 + Set>>> entries = sheetMap.entrySet(); + for (Map.Entry>> entry : entries) { + List> sheetDataList = entry.getValue(); + Sheet sheet = book.createSheet(entry.getKey()); + Drawing patriarch = sheet.createDrawingPatriarch(); + // 设置表头背景色(灰色) + CellStyle headStyle = book.createCellStyle(); + headStyle.setFillForegroundColor(IndexedColors.GREY_80_PERCENT.index); + headStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); + headStyle.setAlignment(HorizontalAlignment.CENTER); + headStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.index); + // 设置表身背景色(默认色) + CellStyle rowStyle = book.createCellStyle(); + rowStyle.setAlignment(HorizontalAlignment.CENTER); + rowStyle.setVerticalAlignment(VerticalAlignment.CENTER); + // 设置表格列宽度(默认为15个字节) + sheet.setDefaultColumnWidth(15); + // 创建合并算法数组 + int rowLength = sheetDataList.size(); + int columnLength = sheetDataList.get(0).size(); + int[][] mergeArray = new int[rowLength][columnLength]; + for (int i = 0; i < sheetDataList.size(); i++) { + // 每个 Sheet 页中的行数据 + Row row = sheet.createRow(i); + List rowList = sheetDataList.get(i); + for (int j = 0; j < rowList.size(); j++) { + // 每个行数据中的单元格数据 + Object o = rowList.get(j); + int v = 0; + if (o instanceof URL) { + // 如果要导出图片的话, 链接需要传递 URL 对象 + setCellPicture(book, row, patriarch, i, j, (URL) o); + } else { + Cell cell = row.createCell(j); + if (i == 0) { + // 第一行为表头行,采用灰色底背景 + v = setCellValue(cell, o, headStyle); + } else { + // 其他行为数据行,默认白底色 + v = setCellValue(cell, o, rowStyle); + } + } + mergeArray[i][j] = v; + } + } + // 合并单元格 + mergeCells(sheet, mergeArray); + // 设置下拉列表 + setSelect(sheet, selectMap); + } + // 写数据 + if (response != null) { + // 前端导出 + try { + write(response, book, fileName); + } catch (IOException e) { + e.printStackTrace(); + } + } else { + // 本地导出 + FileOutputStream fos; + try { + fos = new FileOutputStream(file); + ByteArrayOutputStream ops = new ByteArrayOutputStream(); + book.write(ops); + fos.write(ops.toByteArray()); + fos.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + /** + * 合并当前Sheet页的单元格 + * + * @param sheet 当前 sheet 页 + * @param mergeArray 合并单元格算法 + */ + private static void mergeCells(Sheet sheet, int[][] mergeArray) { + // 横向合并 + for (int x = 0; x < mergeArray.length; x++) { + int[] arr = mergeArray[x]; + boolean merge = false; + int y1 = 0; + int y2 = 0; + for (int y = 0; y < arr.length; y++) { + int value = arr[y]; + if (value == CELL_COLUMN_MERGE) { + if (!merge) { + y1 = y; + } + y2 = y; + merge = true; + } else { + merge = false; + if (y1 > 0) { + sheet.addMergedRegion(new CellRangeAddress(x, x, (y1 - 1), y2)); + } + y1 = 0; + y2 = 0; + } + } + if (y1 > 0) { + sheet.addMergedRegion(new CellRangeAddress(x, x, (y1 - 1), y2)); + } + } + // 纵向合并 + int xLen = mergeArray.length; + int yLen = mergeArray[0].length; + for (int y = 0; y < yLen; y++) { + boolean merge = false; + int x1 = 0; + int x2 = 0; + for (int x = 0; x < xLen; x++) { + int value = mergeArray[x][y]; + if (value == CELL_ROW_MERGE) { + if (!merge) { + x1 = x; + } + x2 = x; + merge = true; + } else { + merge = false; + if (x1 > 0) { + sheet.addMergedRegion(new CellRangeAddress((x1 - 1), x2, y, y)); + } + x1 = 0; + x2 = 0; + } + } + if (x1 > 0) { + sheet.addMergedRegion(new CellRangeAddress((x1 - 1), x2, y, y)); + } + } + } + + private static void write(HttpServletResponse response, SXSSFWorkbook book, String fileName) throws IOException { + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setCharacterEncoding("utf-8"); + String name = new String(fileName.getBytes("GBK"), "ISO8859_1") + XLSX; + response.addHeader("Content-Disposition", "attachment;filename=" + name); + ServletOutputStream out = response.getOutputStream(); + book.write(out); + out.flush(); + out.close(); + } + + private static int setCellValue(Cell cell, Object o, CellStyle style) { + // 设置样式 + cell.setCellStyle(style); + // 数据为空时 + if (o == null) { +// cell.setCellType(CellType.STRING); + cell.setCellValue(""); + return CELL_OTHER; + } + // 是否为字符串 + if (o instanceof String) { + String s = o.toString(); + // 当数字类型长度超过8位时,改为字符串类型显示(Excel数字超过一定长度会显示为科学计数法) +// if (isNumeric(s) && s.length() < 8) { +//// cell.setCellType(CellType.NUMERIC); +// cell.setCellValue(Double.parseDouble(s)); +// return CELL_OTHER; +// } else { +//// cell.setCellType(CellType.STRING); +// cell.setCellValue(s); +// } + cell.setCellValue(s); + if (s.equals(ROW_MERGE)) { + return CELL_ROW_MERGE; + } else if (s.equals(COLUMN_MERGE)) { + return CELL_COLUMN_MERGE; + } else { + return CELL_OTHER; + } + } + // 是否为字符串 + if (o instanceof Integer || o instanceof Long || o instanceof Double || o instanceof Float) { +// cell.setCellType(CellType.NUMERIC); + cell.setCellValue(Double.parseDouble(o.toString())); + return CELL_OTHER; + } + // 是否为Boolean + if (o instanceof Boolean) { +// cell.setCellType(CellType.BOOLEAN); + cell.setCellValue((Boolean) o); + return CELL_OTHER; + } + // 如果是BigDecimal,则默认3位小数 + if (o instanceof BigDecimal) { +// cell.setCellType(CellType.NUMERIC); + cell.setCellValue(((BigDecimal) o).setScale(3, RoundingMode.HALF_UP).doubleValue()); + return CELL_OTHER; + } + // 如果是Date数据,则显示格式化数据 + if (o instanceof Date) { +// cell.setCellType(CellType.STRING); + cell.setCellValue(formatDate((Date) o)); + return CELL_OTHER; + } + // 如果是其他,则默认字符串类型 +// cell.setCellType(CellType.STRING); + cell.setCellValue(o.toString()); + return CELL_OTHER; + } + + private static void setCellPicture(SXSSFWorkbook wb, Row sr, Drawing patriarch, int x, int y, URL url) { + // 设置图片宽高 + sr.setHeight((short) (IMG_WIDTH * IMG_HEIGHT)); + // (jdk1.7版本try中定义流可自动关闭) + try (InputStream is = url.openStream(); ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) { + byte[] buff = new byte[BYTES_DEFAULT_LENGTH]; + int rc; + while ((rc = is.read(buff, 0, BYTES_DEFAULT_LENGTH)) > 0) { + outputStream.write(buff, 0, rc); + } + // 设置图片位置 + XSSFClientAnchor anchor = new XSSFClientAnchor(0, 0, 0, 0, y, x, y + 1, x + 1); + // 设置这个,图片会自动填满单元格的长宽 + anchor.setAnchorType(ClientAnchor.AnchorType.MOVE_AND_RESIZE); + patriarch.createPicture(anchor, wb.addPicture(outputStream.toByteArray(), HSSFWorkbook.PICTURE_TYPE_JPEG)); + } catch (Exception e) { + e.printStackTrace(); + } + } + + private static String formatDate(Date date) { + if (date == null) { + return ""; + } + SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT); + return format.format(date); + } + + private static void setSelect(Sheet sheet, Map> selectMap) { + if (selectMap == null || selectMap.isEmpty()) { + return; + } + Set>> entrySet = selectMap.entrySet(); + for (Map.Entry> entry : entrySet) { + int y = entry.getKey(); + List list = entry.getValue(); + if (list == null || list.isEmpty()) { + continue; + } + String[] arr = new String[list.size()]; + for (int i = 0; i < list.size(); i++) { + arr[i] = list.get(i); + } + DataValidationHelper helper = sheet.getDataValidationHelper(); + CellRangeAddressList addressList = new CellRangeAddressList(1, 65000, y, y); + DataValidationConstraint dvc = helper.createExplicitListConstraint(arr); + DataValidation dv = helper.createValidation(dvc, addressList); + if (dv instanceof HSSFDataValidation) { + dv.setSuppressDropDownArrow(false); + } else { + dv.setSuppressDropDownArrow(true); + dv.setShowErrorBox(true); + } + sheet.addValidationData(dv); + } + } + + private static boolean isNumeric(String str) { + if (Objects.nonNull(str) && "0.0".equals(str)) { + return true; + } + for (int i = str.length(); --i >= 0; ) { + if (!Character.isDigit(str.charAt(i))) { + return false; + } + } + return true; + } + + private static String getString(String s) { + if (s == null) { + return ""; + } + if (s.isEmpty()) { + return s; + } + return s.trim(); + } +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..e5b29f3 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,42 @@ +spring: + # 本地测试环境 +# datasource: +# url: jdbc:mysql://localhost:3306/wms_bk_xuzhou?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true +# username: developer +# password: developer + + # 在线环境 + datasource: + url: jdbc:mysql://192.168.103.202:3306/wms_bk_xuzhou?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true + username: developer + password: developer + + profiles: + active: online +server: + # 服务端配置 + port: 12315 + servlet: + # 接口地址 + context-path: / + encoding: + charset: utf-8 + enabled: true + force: true + + +mybatis: + config-location: classpath:mybatis-config.xml + mapper-locations: classpath:mapper/*.xml + type-aliases-package: com.wms.entity.table + +logging: + config: classpath:logback-spring.xml + +#mybatis 分页插件 +#pagehelper: +# helperDialect: mysql +# reasonable: true +# supportMethodsArguments: true +# params: count=countSql + diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..005203d --- /dev/null +++ b/src/main/resources/logback-spring.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + ${LOG_HOME}/info/%d{yyyy-MM-dd}/%d{yyyy-MM-dd}.%i.log + + 10MB + + + 30 + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + + + INFO + ACCEPT + DENY + + + + + + ${LOG_HOME}/warning/%d{yyyy-MM-dd}/%d{yyyy-MM-dd}.%i.log + + 10MB + + + 30 + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + + + WARNING + ACCEPT + DENY + + + + + + ${LOG_HOME}/error/%d{yyyy-MM-dd}/%d{yyyy-MM-dd}.%i.log + + 10MB + + + 30 + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + + + ERROR + ACCEPT + DENY + + + + + + ${LOG_HOME}/debug/%d{yyyy-MM-dd}/%d{yyyy-MM-dd}.%i.log + + 10MB + + + 30 + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + + + DEBUG + ACCEPT + DENY + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/mapper/ConfigMapper.xml b/src/main/resources/mapper/ConfigMapper.xml new file mode 100644 index 0000000..1aad51f --- /dev/null +++ b/src/main/resources/mapper/ConfigMapper.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + update tbl_sys_config + set config_value = #{configValue} + where config_id = #{configId} + + \ No newline at end of file diff --git a/src/main/resources/mapper/GoodsMapper.xml b/src/main/resources/mapper/GoodsMapper.xml new file mode 100644 index 0000000..550f8cd --- /dev/null +++ b/src/main/resources/mapper/GoodsMapper.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + select goods_id, goods_name, goods_unit, item_id, item_type, inv_category, life_days, organization_id, + organization_code, last_update_time, last_update_user + from tbl_app_goods + + + + + + + + insert into tbl_app_goods + + goods_id, + goods_name, + goods_unit, + item_id, + item_type, + inv_category, + life_days, + organization_id, + organization_code, + last_update_time, + last_update_user, + + + #{goodsId}, + #{goodsName}, + #{goodsUnit}, + #{itemId}, + #{itemType}, + #{invCategory}, + #{lifeDays}, + #{organizationId}, + #{organizationCode}, + #{lastUpdateTime}, + #{lastUpdateUser}, + + + + + update tbl_app_goods + + goods_name = #{goodsName}, + goods_unit = #{goodsUnit}, + item_id = #{itemId}, + item_type = #{itemType}, + inv_category = #{invCategory}, + life_days = #{lifeDays}, + organization_id = #{organizationId}, + organization_code = #{organizationCode}, + last_update_time = #{lastUpdateTime}, + last_update_user = #{lastUpdateUser}, + + where goods_id = #{goodsId} + + + + delete from tbl_app_goods where goods_id = #{goodsId} + + \ No newline at end of file diff --git a/src/main/resources/mapper/LocationMapper.xml b/src/main/resources/mapper/LocationMapper.xml new file mode 100644 index 0000000..8868718 --- /dev/null +++ b/src/main/resources/mapper/LocationMapper.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + select location_id, area_id, tunnel_id, equipment_id, location_type, queue, line, layer, depth, is_lock, location_status, vehicle_id + from tbl_app_location + + + + + + + + insert into tbl_app_location + + location_id, + area_id, + tunnel_id, + equipment_id, + location_type, + queue, + line, + layer, + depth, + is_lock, + location_status, + vehicle_id, + + + #{locationId}, + #{areaId}, + #{tunnelId}, + #{equipmentId}, + #{locationType}, + #{queue}, + #{line}, + #{layer}, + #{depth}, + #{isLock}, + #{locationStatus}, + #{vehicleId}, + + + + + update tbl_app_location + + is_lock = #{isLock}, + location_status = #{locationStatus}, + vehicle_id = #{vehicleId}, + + where location_id = #{locationId} + + \ No newline at end of file diff --git a/src/main/resources/mapper/MenuMapper.xml b/src/main/resources/mapper/MenuMapper.xml new file mode 100644 index 0000000..0be30d7 --- /dev/null +++ b/src/main/resources/mapper/MenuMapper.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/PartInfoMapper.xml b/src/main/resources/mapper/PartInfoMapper.xml new file mode 100644 index 0000000..9cc8e11 --- /dev/null +++ b/src/main/resources/mapper/PartInfoMapper.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select Material, ItemDesc, Category, CategoryRemark, Unload_Place, Kitting_Point, Property, Vendor_ID, Data_Owner, + Part_Weight, Storage_Location, Storage_Type, Storage_Bin, Vendor_Name_EN, Vendor_Country, UpdateDate, + SLED, Vendor_Name_CN + from tbl_app_part_info + + + + + + + + insert into tbl_app_part_info + + Material, + ItemDesc, + Category, + CategoryRemark, + Unload_Place, + Kitting_Point, + Property, + Vendor_ID, + Data_Owner, + Part_Weight, + Storage_Location, + Storage_Type, + Storage_Bin, + Vendor_Name_EN, + Vendor_Country, + UpdateDate, + SLED, + Vendor_Name_CN, + + + #{material}, + #{itemDesc}, + #{category}, + #{categoryRemark}, + #{unloadPlace}, + #{kittingPoint}, + #{property}, + #{vendorId}, + #{dataOwner}, + #{partWeight}, + #{storageLocation}, + #{storageType}, + #{storageBin}, + #{vendorNameEN}, + #{vendorCountry}, + #{updateDate}, + #{SLED}, + #{vendorNameCN}, + + + + + update tbl_app_part_info + + ItemDesc = #{itemDesc}, + Category = #{category}, + CategoryRemark = #{categoryRemark}, + Unload_Place = #{unloadPlace}, + Kitting_Point = #{kittingPoint}, + Property = #{property}, + Vendor_ID = #{vendorId}, + Data_Owner = #{dataOwner}, + Part_Weight = #{partWeight}, + Storage_Location = #{storageLocation}, + Storage_Type = #{storageType}, + Storage_Bin = #{storageBin}, + Vendor_Name_EN = #{vendorNameEN}, + Vendor_Country = #{vendorCountry}, + UpdateDate = #{updateDate}, + SLED = #{SLED}, + Vendor_Name_CN = #{vendorNameCN}, + + where Material = #{material} + + + + delete from tbl_app_part_info where Material = #{material} + + \ No newline at end of file diff --git a/src/main/resources/mapper/StandMapper.xml b/src/main/resources/mapper/StandMapper.xml new file mode 100644 index 0000000..f534bb1 --- /dev/null +++ b/src/main/resources/mapper/StandMapper.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + select stand_id, allow_in, allow_out, task_id, is_lock, stand_status, equipment_id, area_id, stand_type, stand_ip + from tbl_app_stand + + + + + + + + insert into tbl_app_stand + + stand_id, + allow_in, + allow_out, + task_id, + is_lock, + stand_status, + equipment_id, + area_id, + stand_type, + stand_ip, + + + #{standId}, + #{allowIn}, + #{allowOut}, + #{taskId}, + #{isLock}, + #{standStatus}, + #{equipmentId}, + #{areaId}, + #{standType}, + #{standIp}, + + + + + update tbl_app_stand + + allow_in = #{allowIn}, + allow_out = #{allowOut}, + task_id = #{taskId}, + is_lock = #{isLock}, + stand_status = #{standStatus}, + equipment_id = #{equipmentId}, + area_id = #{areaId}, + stand_type = #{standType}, + stand_ip = #{standIp}, + + where stand_id = #{standId} + + + + delete from tbl_app_stand where stand_id = #{standId} + + \ No newline at end of file diff --git a/src/main/resources/mapper/StockMapper.xml b/src/main/resources/mapper/StockMapper.xml new file mode 100644 index 0000000..ecccabb --- /dev/null +++ b/src/main/resources/mapper/StockMapper.xml @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select stock_id, location_id, vehicle_id, goods_id, goods_name, batch_no, available_num, remain_num, real_num, provider_id, + provider_name, production_date, expiration_date, stock_status, goods_status, create_time, last_update_time, last_update_user, remark, + is_inventory, inventory_task_id, current_location, shelf_life + from tbl_app_stock + + + + + + + + + + + + + + + + insert into tbl_app_stock + + stock_id, + location_id, + vehicle_id, + goods_id, + goods_name, + batch_no, + remain_num, + available_num, + real_num, + provider_id, + provider_name, + production_date, + expiration_date, + stock_status, + goods_status, + create_time, + last_update_time, + last_update_user, + remark, + is_inventory, + inventory_task_id, + current_location, + shelf_life, + + + #{stockId}, + #{locationId}, + #{vehicleId}, + #{goodsId}, + #{goodsName}, + #{batchNo}, + #{remainNum}, + #{availableNum}, + #{realNum}, + #{providerId}, + #{providerName}, + #{productionDate}, + #{expirationDate}, + #{stockStatus}, + #{goodsStatus}, + #{createTime}, + #{lastUpdateTime}, + #{lastUpdateUser}, + #{remark}, + #{isInventory}, + #{inventoryTaskId}, + #{currentLocation}, + #{shelfLife}, + + + + + update tbl_app_stock + + location_id = #{locationId}, + vehicle_id = #{vehicleId}, + goods_id = #{goodsId}, + goods_name = #{goodsName}, + batch_no = #{batchNo}, + remain_num = #{remainNum}, + available_num = #{availableNum}, + real_num = #{realNum}, + provider_id = #{providerId}, + provider_name = #{providerName}, + production_date = #{productionDate}, + expiration_date = #{expirationDate}, + stock_status = #{stockStatus}, + goods_status = #{goodsStatus}, + create_time = #{createTime}, + last_update_time = #{lastUpdateTime}, + last_update_user = #{lastUpdateUser}, + remark = #{remark}, + is_inventory = #{isInventory}, + inventory_task_id = #{inventoryTaskId}, + current_location = #{currentLocation}, + shelf_life = #{shelfLife}, + + where stock_id = #{stockId} + + + + update tbl_app_stock set available_num = real_num; + + + + + delete from tbl_app_stock where stock_id = #{stockId} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TaskMapper.xml b/src/main/resources/mapper/TaskMapper.xml new file mode 100644 index 0000000..72ef873 --- /dev/null +++ b/src/main/resources/mapper/TaskMapper.xml @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select task_id, task_type, task_status, task_group, origin, destination, pick_stand, weight, vehicle_no, vehicle_size, + create_time, user_name, goods_id, goods_name, operate_num, total_num, etag_location, task_priority, + production_date, expiration_date, kate_task_id, remark1 + from tbl_app_task + + + + + + insert into tbl_app_task + + task_id, + task_type, + task_status, + task_group, + origin, + destination, + pick_stand, + weight, + vehicle_no, + vehicle_size, + create_time, + user_name, + goods_id, + goods_name, + operate_num, + total_num, + etag_location, + task_priority, + production_date, + expiration_date, + kate_task_id, + remark1, + + + #{taskId}, + #{taskType}, + #{taskStatus}, + #{taskGroup}, + #{origin}, + #{destination}, + #{pickStand}, + #{weight}, + #{vehicleNo}, + #{vehicleSize}, + #{createTime}, + #{userName}, + #{goodsId}, + #{goodsName}, + #{operateNum}, + #{totalNum}, + #{etagLocation}, + #{taskPriority}, + #{productionDate}, + #{expirationDate}, + #{kateTaskId}, + #{remark1}, + + + + + update tbl_app_task + + task_type = #{taskType}, + task_status = #{taskStatus}, + task_group = #{taskGroup}, + origin = #{origin}, + destination = #{destination}, + pick_stand = #{pickStand}, + weight = #{weight}, + vehicle_no = #{vehicleNo}, + vehicle_size = #{vehicleSize}, + create_time = #{createTime}, + user_name = #{userName}, + goods_id = #{goodsId}, + goods_name = #{goodsName}, + operate_num = #{operateNum}, + total_num = #{totalNum}, + etag_location = #{etagLocation}, + task_priority = #{taskPriority}, + production_date = #{productionDate}, + expiration_date = #{expirationDate}, + kate_task_id = #{kateTaskId}, + remark1 = #{remark1}, + + where task_id = #{taskId} + + + + delete from tbl_app_task where task_id = #{taskId} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TaskRecordMapper.xml b/src/main/resources/mapper/TaskRecordMapper.xml new file mode 100644 index 0000000..077c445 --- /dev/null +++ b/src/main/resources/mapper/TaskRecordMapper.xml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select task_id, task_type, task_status, task_group, origin, destination, pick_stand, weight, vehicle_no, vehicle_size, + create_time, user_name, goods_id, goods_name, operate_num, total_num, etag_location, task_priority, + production_date, expiration_date, kate_task_id, finish_time, remark1 + from tbl_app_task_bak + + + + + + insert into tbl_app_task_bak + + task_id, + task_type, + task_status, + task_group, + origin, + destination, + pick_stand, + weight, + vehicle_no, + vehicle_size, + create_time, + user_name, + goods_id, + goods_name, + operate_num, + total_num, + etag_location, + task_priority, + production_date, + expiration_date, + kate_task_id, + finish_time, + remark1, + + + #{taskId}, + #{taskType}, + #{taskStatus}, + #{taskGroup}, + #{origin}, + #{destination}, + #{pickStand}, + #{weight}, + #{vehicleNo}, + #{vehicleSize}, + #{createTime}, + #{userName}, + #{goodsId}, + #{goodsName}, + #{operateNum}, + #{totalNum}, + #{etagLocation}, + #{taskPriority}, + #{productionDate}, + #{expirationDate}, + #{kateTaskId}, + #{finishTime}, + #{remark1}, + + + + + update tbl_app_task_bak + + task_type = #{taskType}, + task_status = #{taskStatus}, + task_group = #{taskGroup}, + origin = #{origin}, + destination = #{destination}, + pick_stand = #{pickStand}, + weight = #{weight}, + vehicle_no = #{vehicleNo}, + vehicle_size = #{vehicleSize}, + create_time = #{createTime}, + user_name = #{userName}, + goods_id = #{goodsId}, + goods_name = #{goodsName}, + operate_num = #{operateNum}, + total_num = #{totalNum}, + etag_location = #{etagLocation}, + task_priority = #{taskPriority}, + task_priority = #{productionDate}, + expiration_date = #{expirationDate}, + kate_task_id = #{kateTaskId}, + finish_time = #{finishTime}, + remark1 = #{remark1}, + + where task_id = #{taskId} + + + + delete from tbl_app_task_bak where task_id = #{taskId} + + + + delete from tbl_app_task_bak where finish_time < date_add(curdate(),INTERVAL -7 DAY) and task_type != 3 + + \ No newline at end of file diff --git a/src/main/resources/mapper/UserMapper.xml b/src/main/resources/mapper/UserMapper.xml new file mode 100644 index 0000000..9b7bf82 --- /dev/null +++ b/src/main/resources/mapper/UserMapper.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/VehicleMapper.xml b/src/main/resources/mapper/VehicleMapper.xml new file mode 100644 index 0000000..983999d --- /dev/null +++ b/src/main/resources/mapper/VehicleMapper.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + select vehicle_id, current_location, vehicle_status, is_empty + from tbl_app_vehicle + + + + + + + + insert into tbl_app_vehicle + + vehicle_id, + current_location, + vehicle_status, + is_empty, + + + #{vehicleId}, + #{currentLocation}, + #{vehicleStatus}, + #{isEmpty}, + + + + + update tbl_app_vehicle + + current_location = #{currentLocation}, + vehicle_status = #{vehicleStatus}, + is_empty = #{isEmpty}, + + where vehicle_id = #{vehicleId} + + + + delete from tbl_app_vehicle where vehicle_id = #{vehicleId} + + \ No newline at end of file diff --git a/src/main/resources/mybatis-config.xml b/src/main/resources/mybatis-config.xml new file mode 100644 index 0000000..91ea525 --- /dev/null +++ b/src/main/resources/mybatis-config.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/sql/wms_bk_xuzhou.sql b/src/main/resources/sql/wms_bk_xuzhou.sql new file mode 100644 index 0000000..eb2c387 --- /dev/null +++ b/src/main/resources/sql/wms_bk_xuzhou.sql @@ -0,0 +1,1598 @@ +/* + Navicat Premium Data Transfer + + Source Server : 本地数据库 + Source Server Type : MySQL + Source Server Version : 80032 (8.0.32) + Source Host : localhost:3306 + Source Schema : wms_bk_xuzhou + + Target Server Type : MySQL + Target Server Version : 80032 (8.0.32) + File Encoding : 65001 + + Date: 15/03/2024 14:03:24 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for tbl_app_goods +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_app_goods`; +CREATE TABLE `tbl_app_goods` ( + `goods_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '物料编号', + `goods_name` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物料名称', + `goods_unit` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '单位', + `item_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物料id', + `item_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物料类别', + `inv_category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库存类别', + `life_days` int NULL DEFAULT NULL COMMENT '存储天数', + `organization_id` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库存组织id', + `organization_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库存组织代码', + `last_update_time` datetime NULL DEFAULT NULL COMMENT '最后更新时间', + `last_update_user` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最后更新用户', + PRIMARY KEY (`goods_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_app_goods +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tbl_app_location +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_app_location`; +CREATE TABLE `tbl_app_location` ( + `location_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '库位编号', + `area_id` int NULL DEFAULT NULL COMMENT '区域编号', + `tunnel_id` int NULL DEFAULT NULL COMMENT '巷道编号', + `equipment_id` int NULL DEFAULT NULL COMMENT '设备编号', + `location_type` int NULL DEFAULT NULL COMMENT '库位类型', + `queue` int NULL DEFAULT NULL COMMENT '排', + `line` int NULL DEFAULT NULL COMMENT '列', + `layer` int NULL DEFAULT NULL COMMENT '层', + `depth` int NULL DEFAULT NULL COMMENT '深度', + `is_lock` int NULL DEFAULT NULL COMMENT '库位是否锁定(0:未锁定,1:锁定)', + `location_status` int NULL DEFAULT NULL COMMENT '库位状态(0:空闲,1:占用)', + `vehicle_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '载具编号', + PRIMARY KEY (`location_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_app_location +-- ---------------------------- +INSERT INTO `tbl_app_location` VALUES ('010101', 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010102', 1, 1, 1, 0, 1, 1, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010103', 1, 1, 1, 0, 1, 1, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010104', 1, 1, 1, 0, 1, 1, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010105', 1, 1, 1, 0, 1, 1, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010106', 1, 1, 1, 0, 1, 1, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010107', 1, 1, 1, 0, 1, 1, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010108', 1, 1, 1, 0, 1, 1, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010109', 1, 1, 1, 0, 1, 1, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010110', 1, 1, 1, 0, 1, 1, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010111', 1, 1, 1, 0, 1, 1, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010112', 1, 1, 1, 0, 1, 1, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010201', 1, 1, 1, 0, 1, 2, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010202', 1, 1, 1, 0, 1, 2, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010203', 1, 1, 1, 0, 1, 2, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010204', 1, 1, 1, 0, 1, 2, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010205', 1, 1, 1, 0, 1, 2, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010206', 1, 1, 1, 0, 1, 2, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010207', 1, 1, 1, 0, 1, 2, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010208', 1, 1, 1, 0, 1, 2, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010209', 1, 1, 1, 0, 1, 2, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010210', 1, 1, 1, 0, 1, 2, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010211', 1, 1, 1, 0, 1, 2, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010212', 1, 1, 1, 0, 1, 2, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010301', 1, 1, 1, 0, 1, 3, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010302', 1, 1, 1, 0, 1, 3, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010303', 1, 1, 1, 0, 1, 3, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010304', 1, 1, 1, 0, 1, 3, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010305', 1, 1, 1, 0, 1, 3, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010306', 1, 1, 1, 0, 1, 3, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010307', 1, 1, 1, 0, 1, 3, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010308', 1, 1, 1, 0, 1, 3, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010309', 1, 1, 1, 0, 1, 3, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010310', 1, 1, 1, 0, 1, 3, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010311', 1, 1, 1, 0, 1, 3, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010312', 1, 1, 1, 0, 1, 3, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010401', 1, 1, 1, 0, 1, 4, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010402', 1, 1, 1, 0, 1, 4, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010403', 1, 1, 1, 0, 1, 4, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010404', 1, 1, 1, 0, 1, 4, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010405', 1, 1, 1, 0, 1, 4, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010406', 1, 1, 1, 0, 1, 4, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010407', 1, 1, 1, 0, 1, 4, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010408', 1, 1, 1, 0, 1, 4, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010409', 1, 1, 1, 0, 1, 4, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010410', 1, 1, 1, 0, 1, 4, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010411', 1, 1, 1, 0, 1, 4, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010412', 1, 1, 1, 0, 1, 4, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010501', 1, 1, 1, 0, 1, 5, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010502', 1, 1, 1, 0, 1, 5, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010503', 1, 1, 1, 0, 1, 5, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010504', 1, 1, 1, 0, 1, 5, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010505', 1, 1, 1, 0, 1, 5, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010506', 1, 1, 1, 0, 1, 5, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010507', 1, 1, 1, 0, 1, 5, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010508', 1, 1, 1, 0, 1, 5, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010509', 1, 1, 1, 0, 1, 5, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010510', 1, 1, 1, 0, 1, 5, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010511', 1, 1, 1, 0, 1, 5, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010512', 1, 1, 1, 0, 1, 5, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010601', 1, 1, 1, 0, 1, 6, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010602', 1, 1, 1, 0, 1, 6, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010603', 1, 1, 1, 0, 1, 6, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010604', 1, 1, 1, 0, 1, 6, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010605', 1, 1, 1, 0, 1, 6, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010606', 1, 1, 1, 0, 1, 6, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010607', 1, 1, 1, 0, 1, 6, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010608', 1, 1, 1, 0, 1, 6, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010609', 1, 1, 1, 0, 1, 6, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010610', 1, 1, 1, 0, 1, 6, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010611', 1, 1, 1, 0, 1, 6, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010612', 1, 1, 1, 0, 1, 6, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010701', 1, 1, 1, 0, 1, 7, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010702', 1, 1, 1, 0, 1, 7, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010703', 1, 1, 1, 0, 1, 7, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010704', 1, 1, 1, 0, 1, 7, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010705', 1, 1, 1, 0, 1, 7, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010706', 1, 1, 1, 0, 1, 7, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010707', 1, 1, 1, 0, 1, 7, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010708', 1, 1, 1, 0, 1, 7, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010709', 1, 1, 1, 0, 1, 7, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010710', 1, 1, 1, 0, 1, 7, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010711', 1, 1, 1, 0, 1, 7, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010712', 1, 1, 1, 0, 1, 7, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010801', 1, 1, 1, 0, 1, 8, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010802', 1, 1, 1, 0, 1, 8, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010803', 1, 1, 1, 0, 1, 8, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010804', 1, 1, 1, 0, 1, 8, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010805', 1, 1, 1, 0, 1, 8, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010806', 1, 1, 1, 0, 1, 8, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010807', 1, 1, 1, 0, 1, 8, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010808', 1, 1, 1, 0, 1, 8, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010809', 1, 1, 1, 0, 1, 8, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010810', 1, 1, 1, 0, 1, 8, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010811', 1, 1, 1, 0, 1, 8, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010812', 1, 1, 1, 0, 1, 8, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010901', 1, 1, 1, 0, 1, 9, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010902', 1, 1, 1, 0, 1, 9, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010903', 1, 1, 1, 0, 1, 9, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010904', 1, 1, 1, 0, 1, 9, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010905', 1, 1, 1, 0, 1, 9, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010906', 1, 1, 1, 0, 1, 9, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010907', 1, 1, 1, 0, 1, 9, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010908', 1, 1, 1, 0, 1, 9, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010909', 1, 1, 1, 0, 1, 9, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010910', 1, 1, 1, 0, 1, 9, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010911', 1, 1, 1, 0, 1, 9, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010912', 1, 1, 1, 0, 1, 9, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011001', 1, 1, 1, 0, 1, 10, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011002', 1, 1, 1, 0, 1, 10, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011003', 1, 1, 1, 0, 1, 10, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011004', 1, 1, 1, 0, 1, 10, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011005', 1, 1, 1, 0, 1, 10, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011006', 1, 1, 1, 0, 1, 10, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011007', 1, 1, 1, 0, 1, 10, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011008', 1, 1, 1, 0, 1, 10, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011009', 1, 1, 1, 0, 1, 10, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011010', 1, 1, 1, 0, 1, 10, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011011', 1, 1, 1, 0, 1, 10, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011012', 1, 1, 1, 0, 1, 10, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011101', 1, 1, 1, 0, 1, 11, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011102', 1, 1, 1, 0, 1, 11, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011103', 1, 1, 1, 0, 1, 11, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011104', 1, 1, 1, 0, 1, 11, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011105', 1, 1, 1, 0, 1, 11, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011106', 1, 1, 1, 0, 1, 11, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011107', 1, 1, 1, 0, 1, 11, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011108', 1, 1, 1, 0, 1, 11, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011109', 1, 1, 1, 0, 1, 11, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011110', 1, 1, 1, 0, 1, 11, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011111', 1, 1, 1, 0, 1, 11, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011112', 1, 1, 1, 0, 1, 11, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011201', 1, 1, 1, 0, 1, 12, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011202', 1, 1, 1, 0, 1, 12, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011203', 1, 1, 1, 0, 1, 12, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011204', 1, 1, 1, 0, 1, 12, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011205', 1, 1, 1, 0, 1, 12, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011206', 1, 1, 1, 0, 1, 12, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011207', 1, 1, 1, 0, 1, 12, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011208', 1, 1, 1, 0, 1, 12, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011209', 1, 1, 1, 0, 1, 12, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011210', 1, 1, 1, 0, 1, 12, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011211', 1, 1, 1, 0, 1, 12, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011212', 1, 1, 1, 0, 1, 12, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011301', 1, 1, 1, 0, 1, 13, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011302', 1, 1, 1, 0, 1, 13, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011303', 1, 1, 1, 0, 1, 13, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011304', 1, 1, 1, 0, 1, 13, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011305', 1, 1, 1, 0, 1, 13, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011306', 1, 1, 1, 0, 1, 13, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011307', 1, 1, 1, 0, 1, 13, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011308', 1, 1, 1, 0, 1, 13, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011309', 1, 1, 1, 0, 1, 13, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011310', 1, 1, 1, 0, 1, 13, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011311', 1, 1, 1, 0, 1, 13, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011312', 1, 1, 1, 0, 1, 13, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011401', 1, 1, 1, 0, 1, 14, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011402', 1, 1, 1, 0, 1, 14, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011403', 1, 1, 1, 0, 1, 14, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011404', 1, 1, 1, 0, 1, 14, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011405', 1, 1, 1, 0, 1, 14, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011406', 1, 1, 1, 0, 1, 14, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011407', 1, 1, 1, 0, 1, 14, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011408', 1, 1, 1, 0, 1, 14, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011409', 1, 1, 1, 0, 1, 14, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011410', 1, 1, 1, 0, 1, 14, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011411', 1, 1, 1, 0, 1, 14, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011412', 1, 1, 1, 0, 1, 14, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011501', 1, 1, 1, 0, 1, 15, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011502', 1, 1, 1, 0, 1, 15, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011503', 1, 1, 1, 0, 1, 15, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011504', 1, 1, 1, 0, 1, 15, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011505', 1, 1, 1, 0, 1, 15, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011506', 1, 1, 1, 0, 1, 15, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011507', 1, 1, 1, 0, 1, 15, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011508', 1, 1, 1, 0, 1, 15, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011509', 1, 1, 1, 0, 1, 15, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011510', 1, 1, 1, 0, 1, 15, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011511', 1, 1, 1, 0, 1, 15, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011512', 1, 1, 1, 0, 1, 15, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011601', 1, 1, 1, 0, 1, 16, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011602', 1, 1, 1, 0, 1, 16, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011603', 1, 1, 1, 0, 1, 16, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011604', 1, 1, 1, 0, 1, 16, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011605', 1, 1, 1, 0, 1, 16, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011606', 1, 1, 1, 0, 1, 16, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011607', 1, 1, 1, 0, 1, 16, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011608', 1, 1, 1, 0, 1, 16, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011609', 1, 1, 1, 0, 1, 16, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011610', 1, 1, 1, 0, 1, 16, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011611', 1, 1, 1, 0, 1, 16, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011612', 1, 1, 1, 0, 1, 16, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011701', 1, 1, 1, 0, 1, 17, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011702', 1, 1, 1, 0, 1, 17, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011703', 1, 1, 1, 0, 1, 17, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011704', 1, 1, 1, 0, 1, 17, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011705', 1, 1, 1, 0, 1, 17, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011706', 1, 1, 1, 0, 1, 17, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011707', 1, 1, 1, 0, 1, 17, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011708', 1, 1, 1, 0, 1, 17, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011709', 1, 1, 1, 0, 1, 17, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011710', 1, 1, 1, 0, 1, 17, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011711', 1, 1, 1, 0, 1, 17, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011712', 1, 1, 1, 0, 1, 17, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011801', 1, 1, 1, 0, 1, 18, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011802', 1, 1, 1, 0, 1, 18, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011803', 1, 1, 1, 0, 1, 18, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011804', 1, 1, 1, 0, 1, 18, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011805', 1, 1, 1, 0, 1, 18, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011806', 1, 1, 1, 0, 1, 18, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011807', 1, 1, 1, 0, 1, 18, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011808', 1, 1, 1, 0, 1, 18, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011809', 1, 1, 1, 0, 1, 18, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011810', 1, 1, 1, 0, 1, 18, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011811', 1, 1, 1, 0, 1, 18, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011812', 1, 1, 1, 0, 1, 18, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011901', 1, 1, 1, 0, 1, 19, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011902', 1, 1, 1, 0, 1, 19, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011903', 1, 1, 1, 0, 1, 19, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011904', 1, 1, 1, 0, 1, 19, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011905', 1, 1, 1, 0, 1, 19, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011906', 1, 1, 1, 0, 1, 19, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011907', 1, 1, 1, 0, 1, 19, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011908', 1, 1, 1, 0, 1, 19, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011909', 1, 1, 1, 0, 1, 19, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011910', 1, 1, 1, 0, 1, 19, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011911', 1, 1, 1, 0, 1, 19, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011912', 1, 1, 1, 0, 1, 19, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012001', 1, 1, 1, 0, 1, 20, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012002', 1, 1, 1, 0, 1, 20, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012003', 1, 1, 1, 0, 1, 20, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012004', 1, 1, 1, 0, 1, 20, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012005', 1, 1, 1, 0, 1, 20, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012006', 1, 1, 1, 0, 1, 20, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012007', 1, 1, 1, 0, 1, 20, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012008', 1, 1, 1, 0, 1, 20, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012009', 1, 1, 1, 0, 1, 20, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012010', 1, 1, 1, 0, 1, 20, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012011', 1, 1, 1, 0, 1, 20, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012012', 1, 1, 1, 0, 1, 20, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012101', 1, 1, 1, 0, 1, 21, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012102', 1, 1, 1, 0, 1, 21, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012103', 1, 1, 1, 0, 1, 21, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012104', 1, 1, 1, 0, 1, 21, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012105', 1, 1, 1, 0, 1, 21, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012106', 1, 1, 1, 0, 1, 21, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012107', 1, 1, 1, 0, 1, 21, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012108', 1, 1, 1, 0, 1, 21, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012109', 1, 1, 1, 0, 1, 21, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012110', 1, 1, 1, 0, 1, 21, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012111', 1, 1, 1, 0, 1, 21, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012112', 1, 1, 1, 0, 1, 21, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012201', 1, 1, 1, 0, 1, 22, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012202', 1, 1, 1, 0, 1, 22, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012203', 1, 1, 1, 0, 1, 22, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012204', 1, 1, 1, 0, 1, 22, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012205', 1, 1, 1, 0, 1, 22, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012206', 1, 1, 1, 0, 1, 22, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012207', 1, 1, 1, 0, 1, 22, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012208', 1, 1, 1, 0, 1, 22, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012209', 1, 1, 1, 0, 1, 22, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012210', 1, 1, 1, 0, 1, 22, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012211', 1, 1, 1, 0, 1, 22, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012212', 1, 1, 1, 0, 1, 22, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012301', 1, 1, 1, 0, 1, 23, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012302', 1, 1, 1, 0, 1, 23, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012303', 1, 1, 1, 0, 1, 23, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012304', 1, 1, 1, 0, 1, 23, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012305', 1, 1, 1, 0, 1, 23, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012306', 1, 1, 1, 0, 1, 23, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012307', 1, 1, 1, 0, 1, 23, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012308', 1, 1, 1, 0, 1, 23, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012309', 1, 1, 1, 0, 1, 23, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012310', 1, 1, 1, 0, 1, 23, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012311', 1, 1, 1, 0, 1, 23, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012312', 1, 1, 1, 0, 1, 23, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012401', 1, 1, 1, 0, 1, 24, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012402', 1, 1, 1, 0, 1, 24, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012403', 1, 1, 1, 0, 1, 24, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012404', 1, 1, 1, 0, 1, 24, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012405', 1, 1, 1, 0, 1, 24, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012406', 1, 1, 1, 0, 1, 24, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012407', 1, 1, 1, 0, 1, 24, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012408', 1, 1, 1, 0, 1, 24, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012409', 1, 1, 1, 0, 1, 24, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012410', 1, 1, 1, 0, 1, 24, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012411', 1, 1, 1, 0, 1, 24, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012412', 1, 1, 1, 0, 1, 24, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012501', 1, 1, 1, 0, 1, 25, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012502', 1, 1, 1, 0, 1, 25, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012503', 1, 1, 1, 0, 1, 25, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012504', 1, 1, 1, 0, 1, 25, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012505', 1, 1, 1, 0, 1, 25, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012506', 1, 1, 1, 0, 1, 25, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012507', 1, 1, 1, 0, 1, 25, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012508', 1, 1, 1, 0, 1, 25, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012509', 1, 1, 1, 0, 1, 25, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012510', 1, 1, 1, 0, 1, 25, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012511', 1, 1, 1, 0, 1, 25, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012512', 1, 1, 1, 0, 1, 25, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012601', 1, 1, 1, 0, 1, 26, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012602', 1, 1, 1, 0, 1, 26, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012603', 1, 1, 1, 0, 1, 26, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012604', 1, 1, 1, 0, 1, 26, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012605', 1, 1, 1, 0, 1, 26, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012606', 1, 1, 1, 0, 1, 26, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012607', 1, 1, 1, 0, 1, 26, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012608', 1, 1, 1, 0, 1, 26, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012609', 1, 1, 1, 0, 1, 26, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012610', 1, 1, 1, 0, 1, 26, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012611', 1, 1, 1, 0, 1, 26, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012612', 1, 1, 1, 0, 1, 26, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012701', 1, 1, 1, 0, 1, 27, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012702', 1, 1, 1, 0, 1, 27, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012703', 1, 1, 1, 0, 1, 27, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012704', 1, 1, 1, 0, 1, 27, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012705', 1, 1, 1, 0, 1, 27, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012706', 1, 1, 1, 0, 1, 27, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012707', 1, 1, 1, 0, 1, 27, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012708', 1, 1, 1, 0, 1, 27, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012709', 1, 1, 1, 0, 1, 27, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012710', 1, 1, 1, 0, 1, 27, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012711', 1, 1, 1, 0, 1, 27, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012712', 1, 1, 1, 0, 1, 27, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012801', 1, 1, 1, 0, 1, 28, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012802', 1, 1, 1, 0, 1, 28, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012803', 1, 1, 1, 0, 1, 28, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012804', 1, 1, 1, 0, 1, 28, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012805', 1, 1, 1, 0, 1, 28, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012806', 1, 1, 1, 0, 1, 28, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012807', 1, 1, 1, 0, 1, 28, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012808', 1, 1, 1, 0, 1, 28, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012809', 1, 1, 1, 0, 1, 28, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012810', 1, 1, 1, 0, 1, 28, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012811', 1, 1, 1, 0, 1, 28, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012812', 1, 1, 1, 0, 1, 28, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012901', 1, 1, 1, 0, 1, 29, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012902', 1, 1, 1, 0, 1, 29, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012903', 1, 1, 1, 0, 1, 29, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012904', 1, 1, 1, 0, 1, 29, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012905', 1, 1, 1, 0, 1, 29, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012906', 1, 1, 1, 0, 1, 29, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012907', 1, 1, 1, 0, 1, 29, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012908', 1, 1, 1, 0, 1, 29, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012909', 1, 1, 1, 0, 1, 29, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012910', 1, 1, 1, 0, 1, 29, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012911', 1, 1, 1, 0, 1, 29, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012912', 1, 1, 1, 0, 1, 29, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013001', 1, 1, 1, 0, 1, 30, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013002', 1, 1, 1, 0, 1, 30, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013003', 1, 1, 1, 0, 1, 30, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013004', 1, 1, 1, 0, 1, 30, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013005', 1, 1, 1, 0, 1, 30, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013006', 1, 1, 1, 0, 1, 30, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013007', 1, 1, 1, 0, 1, 30, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013008', 1, 1, 1, 0, 1, 30, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013009', 1, 1, 1, 0, 1, 30, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013010', 1, 1, 1, 0, 1, 30, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013011', 1, 1, 1, 0, 1, 30, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013012', 1, 1, 1, 0, 1, 30, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013101', 1, 1, 1, 0, 1, 31, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013102', 1, 1, 1, 0, 1, 31, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013103', 1, 1, 1, 0, 1, 31, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013104', 1, 1, 1, 0, 1, 31, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013105', 1, 1, 1, 0, 1, 31, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013106', 1, 1, 1, 0, 1, 31, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013107', 1, 1, 1, 0, 1, 31, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013108', 1, 1, 1, 0, 1, 31, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013109', 1, 1, 1, 0, 1, 31, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013110', 1, 1, 1, 0, 1, 31, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013111', 1, 1, 1, 0, 1, 31, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013112', 1, 1, 1, 0, 1, 31, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013201', 1, 1, 1, 0, 1, 32, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013202', 1, 1, 1, 0, 1, 32, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013203', 1, 1, 1, 0, 1, 32, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013204', 1, 1, 1, 0, 1, 32, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013205', 1, 1, 1, 0, 1, 32, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013206', 1, 1, 1, 0, 1, 32, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013207', 1, 1, 1, 0, 1, 32, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013208', 1, 1, 1, 0, 1, 32, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013209', 1, 1, 1, 0, 1, 32, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013210', 1, 1, 1, 0, 1, 32, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013211', 1, 1, 1, 0, 1, 32, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013212', 1, 1, 1, 0, 1, 32, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013301', 1, 1, 1, 0, 1, 33, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013302', 1, 1, 1, 0, 1, 33, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013303', 1, 1, 1, 0, 1, 33, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013304', 1, 1, 1, 0, 1, 33, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013305', 1, 1, 1, 0, 1, 33, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013306', 1, 1, 1, 0, 1, 33, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013307', 1, 1, 1, 0, 1, 33, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013308', 1, 1, 1, 0, 1, 33, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013309', 1, 1, 1, 0, 1, 33, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013310', 1, 1, 1, 0, 1, 33, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013311', 1, 1, 1, 0, 1, 33, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013312', 1, 1, 1, 0, 1, 33, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013401', 1, 1, 1, 0, 1, 34, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013402', 1, 1, 1, 0, 1, 34, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013403', 1, 1, 1, 0, 1, 34, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013404', 1, 1, 1, 0, 1, 34, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013405', 1, 1, 1, 0, 1, 34, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013406', 1, 1, 1, 0, 1, 34, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013407', 1, 1, 1, 0, 1, 34, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013408', 1, 1, 1, 0, 1, 34, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013409', 1, 1, 1, 0, 1, 34, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013410', 1, 1, 1, 0, 1, 34, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013411', 1, 1, 1, 0, 1, 34, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013412', 1, 1, 1, 0, 1, 34, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013501', 1, 1, 1, 0, 1, 35, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013502', 1, 1, 1, 0, 1, 35, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013503', 1, 1, 1, 0, 1, 35, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013504', 1, 1, 1, 0, 1, 35, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013505', 1, 1, 1, 0, 1, 35, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013506', 1, 1, 1, 0, 1, 35, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013507', 1, 1, 1, 0, 1, 35, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013508', 1, 1, 1, 0, 1, 35, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013509', 1, 1, 1, 0, 1, 35, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013510', 1, 1, 1, 0, 1, 35, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013511', 1, 1, 1, 0, 1, 35, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013512', 1, 1, 1, 0, 1, 35, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013601', 1, 1, 1, 0, 1, 36, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013602', 1, 1, 1, 0, 1, 36, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013603', 1, 1, 1, 0, 1, 36, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013604', 1, 1, 1, 0, 1, 36, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013605', 1, 1, 1, 0, 1, 36, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013606', 1, 1, 1, 0, 1, 36, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013607', 1, 1, 1, 0, 1, 36, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013608', 1, 1, 1, 0, 1, 36, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013609', 1, 1, 1, 0, 1, 36, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013610', 1, 1, 1, 0, 1, 36, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013611', 1, 1, 1, 0, 1, 36, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013612', 1, 1, 1, 0, 1, 36, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013701', 1, 1, 1, 0, 1, 37, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013702', 1, 1, 1, 0, 1, 37, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013703', 1, 1, 1, 0, 1, 37, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013704', 1, 1, 1, 0, 1, 37, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013705', 1, 1, 1, 0, 1, 37, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013706', 1, 1, 1, 0, 1, 37, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013707', 1, 1, 1, 0, 1, 37, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013708', 1, 1, 1, 0, 1, 37, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013709', 1, 1, 1, 0, 1, 37, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013710', 1, 1, 1, 0, 1, 37, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013711', 1, 1, 1, 0, 1, 37, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013712', 1, 1, 1, 0, 1, 37, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013801', 1, 1, 1, 0, 1, 38, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013802', 1, 1, 1, 0, 1, 38, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013803', 1, 1, 1, 0, 1, 38, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013804', 1, 1, 1, 0, 1, 38, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013805', 1, 1, 1, 0, 1, 38, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013806', 1, 1, 1, 0, 1, 38, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013807', 1, 1, 1, 0, 1, 38, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013808', 1, 1, 1, 0, 1, 38, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013809', 1, 1, 1, 0, 1, 38, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013810', 1, 1, 1, 0, 1, 38, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013811', 1, 1, 1, 0, 1, 38, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013812', 1, 1, 1, 0, 1, 38, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013901', 1, 1, 1, 0, 1, 39, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013902', 1, 1, 1, 0, 1, 39, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013903', 1, 1, 1, 0, 1, 39, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013904', 1, 1, 1, 0, 1, 39, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013905', 1, 1, 1, 0, 1, 39, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013906', 1, 1, 1, 0, 1, 39, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013907', 1, 1, 1, 0, 1, 39, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013908', 1, 1, 1, 0, 1, 39, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013909', 1, 1, 1, 0, 1, 39, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013910', 1, 1, 1, 0, 1, 39, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013911', 1, 1, 1, 0, 1, 39, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013912', 1, 1, 1, 0, 1, 39, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014001', 1, 1, 1, 0, 1, 40, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014002', 1, 1, 1, 0, 1, 40, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014003', 1, 1, 1, 0, 1, 40, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014004', 1, 1, 1, 0, 1, 40, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014005', 1, 1, 1, 0, 1, 40, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014006', 1, 1, 1, 0, 1, 40, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014007', 1, 1, 1, 0, 1, 40, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014008', 1, 1, 1, 0, 1, 40, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014009', 1, 1, 1, 0, 1, 40, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014010', 1, 1, 1, 0, 1, 40, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014011', 1, 1, 1, 0, 1, 40, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014012', 1, 1, 1, 0, 1, 40, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014101', 1, 1, 1, 0, 1, 41, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014102', 1, 1, 1, 0, 1, 41, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014103', 1, 1, 1, 0, 1, 41, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014104', 1, 1, 1, 0, 1, 41, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014105', 1, 1, 1, 0, 1, 41, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014106', 1, 1, 1, 0, 1, 41, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014107', 1, 1, 1, 0, 1, 41, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014108', 1, 1, 1, 0, 1, 41, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014109', 1, 1, 1, 0, 1, 41, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014110', 1, 1, 1, 0, 1, 41, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014111', 1, 1, 1, 0, 1, 41, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014112', 1, 1, 1, 0, 1, 41, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014201', 1, 1, 1, 0, 1, 42, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014202', 1, 1, 1, 0, 1, 42, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014203', 1, 1, 1, 0, 1, 42, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014204', 1, 1, 1, 0, 1, 42, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014205', 1, 1, 1, 0, 1, 42, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014206', 1, 1, 1, 0, 1, 42, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014207', 1, 1, 1, 0, 1, 42, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014208', 1, 1, 1, 0, 1, 42, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014209', 1, 1, 1, 0, 1, 42, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014210', 1, 1, 1, 0, 1, 42, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014211', 1, 1, 1, 0, 1, 42, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014212', 1, 1, 1, 0, 1, 42, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014301', 1, 1, 1, 0, 1, 43, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014302', 1, 1, 1, 0, 1, 43, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014303', 1, 1, 1, 0, 1, 43, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014304', 1, 1, 1, 0, 1, 43, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014305', 1, 1, 1, 0, 1, 43, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014306', 1, 1, 1, 0, 1, 43, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014307', 1, 1, 1, 0, 1, 43, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014308', 1, 1, 1, 0, 1, 43, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014309', 1, 1, 1, 0, 1, 43, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014310', 1, 1, 1, 0, 1, 43, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014311', 1, 1, 1, 0, 1, 43, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014312', 1, 1, 1, 0, 1, 43, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014401', 1, 1, 1, 0, 1, 44, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014402', 1, 1, 1, 0, 1, 44, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014403', 1, 1, 1, 0, 1, 44, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014404', 1, 1, 1, 0, 1, 44, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014405', 1, 1, 1, 0, 1, 44, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014406', 1, 1, 1, 0, 1, 44, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014407', 1, 1, 1, 0, 1, 44, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014408', 1, 1, 1, 0, 1, 44, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014409', 1, 1, 1, 0, 1, 44, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014410', 1, 1, 1, 0, 1, 44, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014411', 1, 1, 1, 0, 1, 44, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014412', 1, 1, 1, 0, 1, 44, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014501', 1, 1, 1, 0, 1, 45, 1, 1, 0, 1, 'XZBK0001'); +INSERT INTO `tbl_app_location` VALUES ('014502', 1, 1, 1, 0, 1, 45, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014503', 1, 1, 1, 0, 1, 45, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014504', 1, 1, 1, 0, 1, 45, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014505', 1, 1, 1, 0, 1, 45, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014506', 1, 1, 1, 0, 1, 45, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014507', 1, 1, 1, 0, 1, 45, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014508', 1, 1, 1, 0, 1, 45, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014509', 1, 1, 1, 0, 1, 45, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014510', 1, 1, 1, 0, 1, 45, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014511', 1, 1, 1, 0, 1, 45, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014512', 1, 1, 1, 0, 1, 45, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020101', 1, 1, 1, 0, 2, 1, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020102', 1, 1, 1, 0, 2, 1, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020103', 1, 1, 1, 0, 2, 1, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020104', 1, 1, 1, 0, 2, 1, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020105', 1, 1, 1, 0, 2, 1, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020106', 1, 1, 1, 0, 2, 1, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020107', 1, 1, 1, 0, 2, 1, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020108', 1, 1, 1, 0, 2, 1, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020109', 1, 1, 1, 0, 2, 1, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020110', 1, 1, 1, 0, 2, 1, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020111', 1, 1, 1, 0, 2, 1, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020112', 1, 1, 1, 0, 2, 1, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020201', 1, 1, 1, 0, 2, 2, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020202', 1, 1, 1, 0, 2, 2, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020203', 1, 1, 1, 0, 2, 2, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020204', 1, 1, 1, 0, 2, 2, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020205', 1, 1, 1, 0, 2, 2, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020206', 1, 1, 1, 0, 2, 2, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020207', 1, 1, 1, 0, 2, 2, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020208', 1, 1, 1, 0, 2, 2, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020209', 1, 1, 1, 0, 2, 2, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020210', 1, 1, 1, 0, 2, 2, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020211', 1, 1, 1, 0, 2, 2, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020212', 1, 1, 1, 0, 2, 2, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020301', 1, 1, 1, 0, 2, 3, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020302', 1, 1, 1, 0, 2, 3, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020303', 1, 1, 1, 0, 2, 3, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020304', 1, 1, 1, 0, 2, 3, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020305', 1, 1, 1, 0, 2, 3, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020306', 1, 1, 1, 0, 2, 3, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020307', 1, 1, 1, 0, 2, 3, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020308', 1, 1, 1, 0, 2, 3, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020309', 1, 1, 1, 0, 2, 3, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020310', 1, 1, 1, 0, 2, 3, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020311', 1, 1, 1, 0, 2, 3, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020312', 1, 1, 1, 0, 2, 3, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020401', 1, 1, 1, 0, 2, 4, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020402', 1, 1, 1, 0, 2, 4, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020403', 1, 1, 1, 0, 2, 4, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020404', 1, 1, 1, 0, 2, 4, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020405', 1, 1, 1, 0, 2, 4, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020406', 1, 1, 1, 0, 2, 4, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020407', 1, 1, 1, 0, 2, 4, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020408', 1, 1, 1, 0, 2, 4, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020409', 1, 1, 1, 0, 2, 4, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020410', 1, 1, 1, 0, 2, 4, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020411', 1, 1, 1, 0, 2, 4, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020412', 1, 1, 1, 0, 2, 4, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020501', 1, 1, 1, 0, 2, 5, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020502', 1, 1, 1, 0, 2, 5, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020503', 1, 1, 1, 0, 2, 5, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020504', 1, 1, 1, 0, 2, 5, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020505', 1, 1, 1, 0, 2, 5, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020506', 1, 1, 1, 0, 2, 5, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020507', 1, 1, 1, 0, 2, 5, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020508', 1, 1, 1, 0, 2, 5, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020509', 1, 1, 1, 0, 2, 5, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020510', 1, 1, 1, 0, 2, 5, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020511', 1, 1, 1, 0, 2, 5, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020512', 1, 1, 1, 0, 2, 5, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020601', 1, 1, 1, 0, 2, 6, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020602', 1, 1, 1, 0, 2, 6, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020603', 1, 1, 1, 0, 2, 6, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020604', 1, 1, 1, 0, 2, 6, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020605', 1, 1, 1, 0, 2, 6, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020606', 1, 1, 1, 0, 2, 6, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020607', 1, 1, 1, 0, 2, 6, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020608', 1, 1, 1, 0, 2, 6, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020609', 1, 1, 1, 0, 2, 6, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020610', 1, 1, 1, 0, 2, 6, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020611', 1, 1, 1, 0, 2, 6, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020612', 1, 1, 1, 0, 2, 6, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020701', 1, 1, 1, 0, 2, 7, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020702', 1, 1, 1, 0, 2, 7, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020703', 1, 1, 1, 0, 2, 7, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020704', 1, 1, 1, 0, 2, 7, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020705', 1, 1, 1, 0, 2, 7, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020706', 1, 1, 1, 0, 2, 7, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020707', 1, 1, 1, 0, 2, 7, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020708', 1, 1, 1, 0, 2, 7, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020709', 1, 1, 1, 0, 2, 7, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020710', 1, 1, 1, 0, 2, 7, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020711', 1, 1, 1, 0, 2, 7, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020712', 1, 1, 1, 0, 2, 7, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020801', 1, 1, 1, 0, 2, 8, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020802', 1, 1, 1, 0, 2, 8, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020803', 1, 1, 1, 0, 2, 8, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020804', 1, 1, 1, 0, 2, 8, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020805', 1, 1, 1, 0, 2, 8, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020806', 1, 1, 1, 0, 2, 8, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020807', 1, 1, 1, 0, 2, 8, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020808', 1, 1, 1, 0, 2, 8, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020809', 1, 1, 1, 0, 2, 8, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020810', 1, 1, 1, 0, 2, 8, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020811', 1, 1, 1, 0, 2, 8, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020812', 1, 1, 1, 0, 2, 8, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020901', 1, 1, 1, 0, 2, 9, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020902', 1, 1, 1, 0, 2, 9, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020903', 1, 1, 1, 0, 2, 9, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020904', 1, 1, 1, 0, 2, 9, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020905', 1, 1, 1, 0, 2, 9, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020906', 1, 1, 1, 0, 2, 9, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020907', 1, 1, 1, 0, 2, 9, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020908', 1, 1, 1, 0, 2, 9, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020909', 1, 1, 1, 0, 2, 9, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020910', 1, 1, 1, 0, 2, 9, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020911', 1, 1, 1, 0, 2, 9, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020912', 1, 1, 1, 0, 2, 9, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021001', 1, 1, 1, 0, 2, 10, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021002', 1, 1, 1, 0, 2, 10, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021003', 1, 1, 1, 0, 2, 10, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021004', 1, 1, 1, 0, 2, 10, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021005', 1, 1, 1, 0, 2, 10, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021006', 1, 1, 1, 0, 2, 10, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021007', 1, 1, 1, 0, 2, 10, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021008', 1, 1, 1, 0, 2, 10, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021009', 1, 1, 1, 0, 2, 10, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021010', 1, 1, 1, 0, 2, 10, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021011', 1, 1, 1, 0, 2, 10, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021012', 1, 1, 1, 0, 2, 10, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021101', 1, 1, 1, 0, 2, 11, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021102', 1, 1, 1, 0, 2, 11, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021103', 1, 1, 1, 0, 2, 11, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021104', 1, 1, 1, 0, 2, 11, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021105', 1, 1, 1, 0, 2, 11, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021106', 1, 1, 1, 0, 2, 11, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021107', 1, 1, 1, 0, 2, 11, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021108', 1, 1, 1, 0, 2, 11, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021109', 1, 1, 1, 0, 2, 11, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021110', 1, 1, 1, 0, 2, 11, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021111', 1, 1, 1, 0, 2, 11, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021112', 1, 1, 1, 0, 2, 11, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021201', 1, 1, 1, 0, 2, 12, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021202', 1, 1, 1, 0, 2, 12, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021203', 1, 1, 1, 0, 2, 12, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021204', 1, 1, 1, 0, 2, 12, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021205', 1, 1, 1, 0, 2, 12, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021206', 1, 1, 1, 0, 2, 12, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021207', 1, 1, 1, 0, 2, 12, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021208', 1, 1, 1, 0, 2, 12, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021209', 1, 1, 1, 0, 2, 12, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021210', 1, 1, 1, 0, 2, 12, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021211', 1, 1, 1, 0, 2, 12, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021212', 1, 1, 1, 0, 2, 12, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021301', 1, 1, 1, 0, 2, 13, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021302', 1, 1, 1, 0, 2, 13, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021303', 1, 1, 1, 0, 2, 13, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021304', 1, 1, 1, 0, 2, 13, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021305', 1, 1, 1, 0, 2, 13, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021306', 1, 1, 1, 0, 2, 13, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021307', 1, 1, 1, 0, 2, 13, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021308', 1, 1, 1, 0, 2, 13, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021309', 1, 1, 1, 0, 2, 13, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021310', 1, 1, 1, 0, 2, 13, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021311', 1, 1, 1, 0, 2, 13, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021312', 1, 1, 1, 0, 2, 13, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021401', 1, 1, 1, 0, 2, 14, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021402', 1, 1, 1, 0, 2, 14, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021403', 1, 1, 1, 0, 2, 14, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021404', 1, 1, 1, 0, 2, 14, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021405', 1, 1, 1, 0, 2, 14, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021406', 1, 1, 1, 0, 2, 14, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021407', 1, 1, 1, 0, 2, 14, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021408', 1, 1, 1, 0, 2, 14, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021409', 1, 1, 1, 0, 2, 14, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021410', 1, 1, 1, 0, 2, 14, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021411', 1, 1, 1, 0, 2, 14, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021412', 1, 1, 1, 0, 2, 14, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021501', 1, 1, 1, 0, 2, 15, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021502', 1, 1, 1, 0, 2, 15, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021503', 1, 1, 1, 0, 2, 15, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021504', 1, 1, 1, 0, 2, 15, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021505', 1, 1, 1, 0, 2, 15, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021506', 1, 1, 1, 0, 2, 15, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021507', 1, 1, 1, 0, 2, 15, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021508', 1, 1, 1, 0, 2, 15, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021509', 1, 1, 1, 0, 2, 15, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021510', 1, 1, 1, 0, 2, 15, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021511', 1, 1, 1, 0, 2, 15, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021512', 1, 1, 1, 0, 2, 15, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021601', 1, 1, 1, 0, 2, 16, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021602', 1, 1, 1, 0, 2, 16, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021603', 1, 1, 1, 0, 2, 16, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021604', 1, 1, 1, 0, 2, 16, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021605', 1, 1, 1, 0, 2, 16, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021606', 1, 1, 1, 0, 2, 16, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021607', 1, 1, 1, 0, 2, 16, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021608', 1, 1, 1, 0, 2, 16, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021609', 1, 1, 1, 0, 2, 16, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021610', 1, 1, 1, 0, 2, 16, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021611', 1, 1, 1, 0, 2, 16, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021612', 1, 1, 1, 0, 2, 16, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021701', 1, 1, 1, 0, 2, 17, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021702', 1, 1, 1, 0, 2, 17, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021703', 1, 1, 1, 0, 2, 17, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021704', 1, 1, 1, 0, 2, 17, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021705', 1, 1, 1, 0, 2, 17, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021706', 1, 1, 1, 0, 2, 17, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021707', 1, 1, 1, 0, 2, 17, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021708', 1, 1, 1, 0, 2, 17, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021709', 1, 1, 1, 0, 2, 17, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021710', 1, 1, 1, 0, 2, 17, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021711', 1, 1, 1, 0, 2, 17, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021712', 1, 1, 1, 0, 2, 17, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021801', 1, 1, 1, 0, 2, 18, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021802', 1, 1, 1, 0, 2, 18, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021803', 1, 1, 1, 0, 2, 18, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021804', 1, 1, 1, 0, 2, 18, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021805', 1, 1, 1, 0, 2, 18, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021806', 1, 1, 1, 0, 2, 18, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021807', 1, 1, 1, 0, 2, 18, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021808', 1, 1, 1, 0, 2, 18, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021809', 1, 1, 1, 0, 2, 18, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021810', 1, 1, 1, 0, 2, 18, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021811', 1, 1, 1, 0, 2, 18, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021812', 1, 1, 1, 0, 2, 18, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021901', 1, 1, 1, 0, 2, 19, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021902', 1, 1, 1, 0, 2, 19, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021903', 1, 1, 1, 0, 2, 19, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021904', 1, 1, 1, 0, 2, 19, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021905', 1, 1, 1, 0, 2, 19, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021906', 1, 1, 1, 0, 2, 19, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021907', 1, 1, 1, 0, 2, 19, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021908', 1, 1, 1, 0, 2, 19, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021909', 1, 1, 1, 0, 2, 19, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021910', 1, 1, 1, 0, 2, 19, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021911', 1, 1, 1, 0, 2, 19, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021912', 1, 1, 1, 0, 2, 19, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022001', 1, 1, 1, 0, 2, 20, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022002', 1, 1, 1, 0, 2, 20, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022003', 1, 1, 1, 0, 2, 20, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022004', 1, 1, 1, 0, 2, 20, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022005', 1, 1, 1, 0, 2, 20, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022006', 1, 1, 1, 0, 2, 20, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022007', 1, 1, 1, 0, 2, 20, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022008', 1, 1, 1, 0, 2, 20, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022009', 1, 1, 1, 0, 2, 20, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022010', 1, 1, 1, 0, 2, 20, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022011', 1, 1, 1, 0, 2, 20, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022012', 1, 1, 1, 0, 2, 20, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022101', 1, 1, 1, 0, 2, 21, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022102', 1, 1, 1, 0, 2, 21, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022103', 1, 1, 1, 0, 2, 21, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022104', 1, 1, 1, 0, 2, 21, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022105', 1, 1, 1, 0, 2, 21, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022106', 1, 1, 1, 0, 2, 21, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022107', 1, 1, 1, 0, 2, 21, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022108', 1, 1, 1, 0, 2, 21, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022109', 1, 1, 1, 0, 2, 21, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022110', 1, 1, 1, 0, 2, 21, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022111', 1, 1, 1, 0, 2, 21, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022112', 1, 1, 1, 0, 2, 21, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022201', 1, 1, 1, 0, 2, 22, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022202', 1, 1, 1, 0, 2, 22, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022203', 1, 1, 1, 0, 2, 22, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022204', 1, 1, 1, 0, 2, 22, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022205', 1, 1, 1, 0, 2, 22, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022206', 1, 1, 1, 0, 2, 22, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022207', 1, 1, 1, 0, 2, 22, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022208', 1, 1, 1, 0, 2, 22, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022209', 1, 1, 1, 0, 2, 22, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022210', 1, 1, 1, 0, 2, 22, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022211', 1, 1, 1, 0, 2, 22, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022212', 1, 1, 1, 0, 2, 22, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022301', 1, 1, 1, 0, 2, 23, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022302', 1, 1, 1, 0, 2, 23, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022303', 1, 1, 1, 0, 2, 23, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022304', 1, 1, 1, 0, 2, 23, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022305', 1, 1, 1, 0, 2, 23, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022306', 1, 1, 1, 0, 2, 23, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022307', 1, 1, 1, 0, 2, 23, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022308', 1, 1, 1, 0, 2, 23, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022309', 1, 1, 1, 0, 2, 23, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022310', 1, 1, 1, 0, 2, 23, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022311', 1, 1, 1, 0, 2, 23, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022312', 1, 1, 1, 0, 2, 23, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022401', 1, 1, 1, 0, 2, 24, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022402', 1, 1, 1, 0, 2, 24, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022403', 1, 1, 1, 0, 2, 24, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022404', 1, 1, 1, 0, 2, 24, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022405', 1, 1, 1, 0, 2, 24, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022406', 1, 1, 1, 0, 2, 24, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022407', 1, 1, 1, 0, 2, 24, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022408', 1, 1, 1, 0, 2, 24, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022409', 1, 1, 1, 0, 2, 24, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022410', 1, 1, 1, 0, 2, 24, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022411', 1, 1, 1, 0, 2, 24, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022412', 1, 1, 1, 0, 2, 24, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022501', 1, 1, 1, 0, 2, 25, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022502', 1, 1, 1, 0, 2, 25, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022503', 1, 1, 1, 0, 2, 25, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022504', 1, 1, 1, 0, 2, 25, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022505', 1, 1, 1, 0, 2, 25, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022506', 1, 1, 1, 0, 2, 25, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022507', 1, 1, 1, 0, 2, 25, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022508', 1, 1, 1, 0, 2, 25, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022509', 1, 1, 1, 0, 2, 25, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022510', 1, 1, 1, 0, 2, 25, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022511', 1, 1, 1, 0, 2, 25, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022512', 1, 1, 1, 0, 2, 25, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022601', 1, 1, 1, 0, 2, 26, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022602', 1, 1, 1, 0, 2, 26, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022603', 1, 1, 1, 0, 2, 26, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022604', 1, 1, 1, 0, 2, 26, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022605', 1, 1, 1, 0, 2, 26, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022606', 1, 1, 1, 0, 2, 26, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022607', 1, 1, 1, 0, 2, 26, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022608', 1, 1, 1, 0, 2, 26, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022609', 1, 1, 1, 0, 2, 26, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022610', 1, 1, 1, 0, 2, 26, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022611', 1, 1, 1, 0, 2, 26, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022612', 1, 1, 1, 0, 2, 26, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022701', 1, 1, 1, 0, 2, 27, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022702', 1, 1, 1, 0, 2, 27, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022703', 1, 1, 1, 0, 2, 27, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022704', 1, 1, 1, 0, 2, 27, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022705', 1, 1, 1, 0, 2, 27, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022706', 1, 1, 1, 0, 2, 27, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022707', 1, 1, 1, 0, 2, 27, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022708', 1, 1, 1, 0, 2, 27, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022709', 1, 1, 1, 0, 2, 27, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022710', 1, 1, 1, 0, 2, 27, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022711', 1, 1, 1, 0, 2, 27, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022712', 1, 1, 1, 0, 2, 27, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022801', 1, 1, 1, 0, 2, 28, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022802', 1, 1, 1, 0, 2, 28, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022803', 1, 1, 1, 0, 2, 28, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022804', 1, 1, 1, 0, 2, 28, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022805', 1, 1, 1, 0, 2, 28, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022806', 1, 1, 1, 0, 2, 28, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022807', 1, 1, 1, 0, 2, 28, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022808', 1, 1, 1, 0, 2, 28, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022809', 1, 1, 1, 0, 2, 28, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022810', 1, 1, 1, 0, 2, 28, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022811', 1, 1, 1, 0, 2, 28, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022812', 1, 1, 1, 0, 2, 28, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022901', 1, 1, 1, 0, 2, 29, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022902', 1, 1, 1, 0, 2, 29, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022903', 1, 1, 1, 0, 2, 29, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022904', 1, 1, 1, 0, 2, 29, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022905', 1, 1, 1, 0, 2, 29, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022906', 1, 1, 1, 0, 2, 29, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022907', 1, 1, 1, 0, 2, 29, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022908', 1, 1, 1, 0, 2, 29, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022909', 1, 1, 1, 0, 2, 29, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022910', 1, 1, 1, 0, 2, 29, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022911', 1, 1, 1, 0, 2, 29, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022912', 1, 1, 1, 0, 2, 29, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023001', 1, 1, 1, 0, 2, 30, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023002', 1, 1, 1, 0, 2, 30, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023003', 1, 1, 1, 0, 2, 30, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023004', 1, 1, 1, 0, 2, 30, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023005', 1, 1, 1, 0, 2, 30, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023006', 1, 1, 1, 0, 2, 30, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023007', 1, 1, 1, 0, 2, 30, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023008', 1, 1, 1, 0, 2, 30, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023009', 1, 1, 1, 0, 2, 30, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023010', 1, 1, 1, 0, 2, 30, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023011', 1, 1, 1, 0, 2, 30, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023012', 1, 1, 1, 0, 2, 30, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023101', 1, 1, 1, 0, 2, 31, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023102', 1, 1, 1, 0, 2, 31, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023103', 1, 1, 1, 0, 2, 31, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023104', 1, 1, 1, 0, 2, 31, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023105', 1, 1, 1, 0, 2, 31, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023106', 1, 1, 1, 0, 2, 31, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023107', 1, 1, 1, 0, 2, 31, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023108', 1, 1, 1, 0, 2, 31, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023109', 1, 1, 1, 0, 2, 31, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023110', 1, 1, 1, 0, 2, 31, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023111', 1, 1, 1, 0, 2, 31, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023112', 1, 1, 1, 0, 2, 31, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023201', 1, 1, 1, 0, 2, 32, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023202', 1, 1, 1, 0, 2, 32, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023203', 1, 1, 1, 0, 2, 32, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023204', 1, 1, 1, 0, 2, 32, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023205', 1, 1, 1, 0, 2, 32, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023206', 1, 1, 1, 0, 2, 32, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023207', 1, 1, 1, 0, 2, 32, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023208', 1, 1, 1, 0, 2, 32, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023209', 1, 1, 1, 0, 2, 32, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023210', 1, 1, 1, 0, 2, 32, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023211', 1, 1, 1, 0, 2, 32, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023212', 1, 1, 1, 0, 2, 32, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023301', 1, 1, 1, 0, 2, 33, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023302', 1, 1, 1, 0, 2, 33, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023303', 1, 1, 1, 0, 2, 33, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023304', 1, 1, 1, 0, 2, 33, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023305', 1, 1, 1, 0, 2, 33, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023306', 1, 1, 1, 0, 2, 33, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023307', 1, 1, 1, 0, 2, 33, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023308', 1, 1, 1, 0, 2, 33, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023309', 1, 1, 1, 0, 2, 33, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023310', 1, 1, 1, 0, 2, 33, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023311', 1, 1, 1, 0, 2, 33, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023312', 1, 1, 1, 0, 2, 33, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023401', 1, 1, 1, 0, 2, 34, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023402', 1, 1, 1, 0, 2, 34, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023403', 1, 1, 1, 0, 2, 34, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023404', 1, 1, 1, 0, 2, 34, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023405', 1, 1, 1, 0, 2, 34, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023406', 1, 1, 1, 0, 2, 34, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023407', 1, 1, 1, 0, 2, 34, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023408', 1, 1, 1, 0, 2, 34, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023409', 1, 1, 1, 0, 2, 34, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023410', 1, 1, 1, 0, 2, 34, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023411', 1, 1, 1, 0, 2, 34, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023412', 1, 1, 1, 0, 2, 34, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023501', 1, 1, 1, 0, 2, 35, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023502', 1, 1, 1, 0, 2, 35, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023503', 1, 1, 1, 0, 2, 35, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023504', 1, 1, 1, 0, 2, 35, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023505', 1, 1, 1, 0, 2, 35, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023506', 1, 1, 1, 0, 2, 35, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023507', 1, 1, 1, 0, 2, 35, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023508', 1, 1, 1, 0, 2, 35, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023509', 1, 1, 1, 0, 2, 35, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023510', 1, 1, 1, 0, 2, 35, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023511', 1, 1, 1, 0, 2, 35, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023512', 1, 1, 1, 0, 2, 35, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023601', 1, 1, 1, 0, 2, 36, 1, 1, 0, 1, 'XZBK0014'); +INSERT INTO `tbl_app_location` VALUES ('023602', 1, 1, 1, 0, 2, 36, 2, 1, 0, 1, 'XZBK0013'); +INSERT INTO `tbl_app_location` VALUES ('023603', 1, 1, 1, 0, 2, 36, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023604', 1, 1, 1, 0, 2, 36, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023605', 1, 1, 1, 0, 2, 36, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023606', 1, 1, 1, 0, 2, 36, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023607', 1, 1, 1, 0, 2, 36, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023608', 1, 1, 1, 0, 2, 36, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023609', 1, 1, 1, 0, 2, 36, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023610', 1, 1, 1, 0, 2, 36, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023611', 1, 1, 1, 0, 2, 36, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023612', 1, 1, 1, 0, 2, 36, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023701', 1, 1, 1, 0, 2, 37, 1, 1, 0, 1, 'XZBK0010'); +INSERT INTO `tbl_app_location` VALUES ('023702', 1, 1, 1, 0, 2, 37, 2, 1, 0, 1, 'XZBK0009'); +INSERT INTO `tbl_app_location` VALUES ('023703', 1, 1, 1, 0, 2, 37, 3, 1, 0, 1, 'XZBK0008'); +INSERT INTO `tbl_app_location` VALUES ('023704', 1, 1, 1, 0, 2, 37, 4, 1, 0, 1, 'XZBK0007'); +INSERT INTO `tbl_app_location` VALUES ('023705', 1, 1, 1, 0, 2, 37, 5, 1, 0, 1, 'XZBK0006'); +INSERT INTO `tbl_app_location` VALUES ('023706', 1, 1, 1, 0, 2, 37, 6, 1, 0, 1, 'XZBK0005'); +INSERT INTO `tbl_app_location` VALUES ('023707', 1, 1, 1, 0, 2, 37, 7, 1, 0, 1, 'XZBK0020'); +INSERT INTO `tbl_app_location` VALUES ('023708', 1, 1, 1, 0, 2, 37, 8, 1, 0, 1, 'XZBK0019'); +INSERT INTO `tbl_app_location` VALUES ('023709', 1, 1, 1, 0, 2, 37, 9, 1, 0, 1, 'XZBK0018'); +INSERT INTO `tbl_app_location` VALUES ('023710', 1, 1, 1, 0, 2, 37, 10, 1, 0, 1, 'XZBK0017'); +INSERT INTO `tbl_app_location` VALUES ('023711', 1, 1, 1, 0, 2, 37, 11, 1, 0, 1, 'XZBK0016'); +INSERT INTO `tbl_app_location` VALUES ('023712', 1, 1, 1, 0, 2, 37, 12, 1, 0, 1, 'XZBK0015'); +INSERT INTO `tbl_app_location` VALUES ('023801', 1, 1, 1, 0, 2, 38, 1, 1, 0, 1, 'XZBK0022'); +INSERT INTO `tbl_app_location` VALUES ('023802', 1, 1, 1, 0, 2, 38, 2, 1, 0, 1, 'XZBK0021'); +INSERT INTO `tbl_app_location` VALUES ('023803', 1, 1, 1, 0, 2, 38, 3, 1, 0, 1, 'XZBK0036'); +INSERT INTO `tbl_app_location` VALUES ('023804', 1, 1, 1, 0, 2, 38, 4, 1, 0, 1, 'XZBK0035'); +INSERT INTO `tbl_app_location` VALUES ('023805', 1, 1, 1, 0, 2, 38, 5, 1, 0, 1, 'XZBK0034'); +INSERT INTO `tbl_app_location` VALUES ('023806', 1, 1, 1, 0, 2, 38, 6, 1, 0, 1, 'XZBK0033'); +INSERT INTO `tbl_app_location` VALUES ('023807', 1, 1, 1, 0, 2, 38, 7, 1, 0, 1, 'XZBK0032'); +INSERT INTO `tbl_app_location` VALUES ('023808', 1, 1, 1, 0, 2, 38, 8, 1, 0, 1, 'XZBK0031'); +INSERT INTO `tbl_app_location` VALUES ('023809', 1, 1, 1, 0, 2, 38, 9, 1, 0, 1, 'XZBK0030'); +INSERT INTO `tbl_app_location` VALUES ('023810', 1, 1, 1, 0, 2, 38, 10, 1, 0, 1, 'XZBK0029'); +INSERT INTO `tbl_app_location` VALUES ('023811', 1, 1, 1, 0, 2, 38, 11, 1, 0, 1, 'XZBK0012'); +INSERT INTO `tbl_app_location` VALUES ('023812', 1, 1, 1, 0, 2, 38, 12, 1, 0, 1, 'XZBK0011'); +INSERT INTO `tbl_app_location` VALUES ('023901', 1, 1, 1, 0, 2, 39, 1, 1, 0, 1, 'XZBK0050'); +INSERT INTO `tbl_app_location` VALUES ('023902', 1, 1, 1, 0, 2, 39, 2, 1, 0, 1, 'XZBK0049'); +INSERT INTO `tbl_app_location` VALUES ('023903', 1, 1, 1, 0, 2, 39, 3, 1, 0, 1, 'XZBK0048'); +INSERT INTO `tbl_app_location` VALUES ('023904', 1, 1, 1, 0, 2, 39, 4, 1, 0, 1, 'XZBK0047'); +INSERT INTO `tbl_app_location` VALUES ('023905', 1, 1, 1, 0, 2, 39, 5, 1, 0, 1, 'XZBK0046'); +INSERT INTO `tbl_app_location` VALUES ('023906', 1, 1, 1, 0, 2, 39, 6, 1, 0, 1, 'XZBK0045'); +INSERT INTO `tbl_app_location` VALUES ('023907', 1, 1, 1, 0, 2, 39, 7, 1, 0, 1, 'XZBK0028'); +INSERT INTO `tbl_app_location` VALUES ('023908', 1, 1, 1, 0, 2, 39, 8, 1, 0, 1, 'XZBK0027'); +INSERT INTO `tbl_app_location` VALUES ('023909', 1, 1, 1, 0, 2, 39, 9, 1, 0, 1, 'XZBK0026'); +INSERT INTO `tbl_app_location` VALUES ('023910', 1, 1, 1, 0, 2, 39, 10, 1, 0, 1, 'XZBK0025'); +INSERT INTO `tbl_app_location` VALUES ('023911', 1, 1, 1, 0, 2, 39, 11, 1, 0, 1, 'XZBK0024'); +INSERT INTO `tbl_app_location` VALUES ('023912', 1, 1, 1, 0, 2, 39, 12, 1, 0, 1, 'XZBK0023'); +INSERT INTO `tbl_app_location` VALUES ('024001', 1, 1, 1, 0, 2, 40, 1, 1, 0, 1, 'XZBK0061'); +INSERT INTO `tbl_app_location` VALUES ('024002', 1, 1, 1, 0, 2, 40, 2, 1, 0, 1, 'XZBK0739'); +INSERT INTO `tbl_app_location` VALUES ('024003', 1, 1, 1, 0, 2, 40, 3, 1, 0, 1, 'XZBK0044'); +INSERT INTO `tbl_app_location` VALUES ('024004', 1, 1, 1, 0, 2, 40, 4, 1, 0, 1, 'XZBK0043'); +INSERT INTO `tbl_app_location` VALUES ('024005', 1, 1, 1, 0, 2, 40, 5, 1, 0, 1, 'XZBK0042'); +INSERT INTO `tbl_app_location` VALUES ('024006', 1, 1, 1, 0, 2, 40, 6, 1, 0, 1, 'XZBK0041'); +INSERT INTO `tbl_app_location` VALUES ('024007', 1, 1, 1, 0, 2, 40, 7, 1, 0, 1, 'XZBK0040'); +INSERT INTO `tbl_app_location` VALUES ('024008', 1, 1, 1, 0, 2, 40, 8, 1, 0, 1, 'XZBK0039'); +INSERT INTO `tbl_app_location` VALUES ('024009', 1, 1, 1, 0, 2, 40, 9, 1, 0, 1, 'XZBK0038'); +INSERT INTO `tbl_app_location` VALUES ('024010', 1, 1, 1, 0, 2, 40, 10, 1, 0, 1, 'XZBK0037'); +INSERT INTO `tbl_app_location` VALUES ('024011', 1, 1, 1, 0, 2, 40, 11, 1, 0, 1, 'XZBK0052'); +INSERT INTO `tbl_app_location` VALUES ('024012', 1, 1, 1, 0, 2, 40, 12, 1, 0, 1, 'XZBK0051'); +INSERT INTO `tbl_app_location` VALUES ('024101', 1, 1, 1, 0, 2, 41, 1, 1, 0, 1, 'XZBK0057'); +INSERT INTO `tbl_app_location` VALUES ('024102', 1, 1, 1, 0, 2, 41, 2, 1, 0, 1, 'XZBK0056'); +INSERT INTO `tbl_app_location` VALUES ('024103', 1, 1, 1, 0, 2, 41, 3, 1, 0, 1, 'XZBK0055'); +INSERT INTO `tbl_app_location` VALUES ('024104', 1, 1, 1, 0, 2, 41, 4, 1, 0, 1, 'XZBK0054'); +INSERT INTO `tbl_app_location` VALUES ('024105', 1, 1, 1, 0, 2, 41, 5, 1, 0, 1, 'XZBK0053'); +INSERT INTO `tbl_app_location` VALUES ('024106', 1, 1, 1, 0, 2, 41, 6, 1, 0, 1, 'XZBK0068'); +INSERT INTO `tbl_app_location` VALUES ('024107', 1, 1, 1, 0, 2, 41, 7, 1, 0, 1, 'XZBK0067'); +INSERT INTO `tbl_app_location` VALUES ('024108', 1, 1, 1, 0, 2, 41, 8, 1, 0, 1, 'XZBK0066'); +INSERT INTO `tbl_app_location` VALUES ('024109', 1, 1, 1, 0, 2, 41, 9, 1, 0, 1, 'XZBK0065'); +INSERT INTO `tbl_app_location` VALUES ('024110', 1, 1, 1, 0, 2, 41, 10, 1, 0, 1, 'XZBK0064'); +INSERT INTO `tbl_app_location` VALUES ('024111', 1, 1, 1, 0, 2, 41, 11, 1, 0, 1, 'XZBK0063'); +INSERT INTO `tbl_app_location` VALUES ('024112', 1, 1, 1, 0, 2, 41, 12, 1, 0, 1, 'XZBK0062'); +INSERT INTO `tbl_app_location` VALUES ('024201', 1, 1, 1, 0, 2, 42, 1, 1, 0, 1, 'XZBK0069'); +INSERT INTO `tbl_app_location` VALUES ('024202', 1, 1, 1, 0, 2, 42, 2, 1, 0, 1, 'XZBK0084'); +INSERT INTO `tbl_app_location` VALUES ('024203', 1, 1, 1, 0, 2, 42, 3, 1, 0, 1, 'XZBK0083'); +INSERT INTO `tbl_app_location` VALUES ('024204', 1, 1, 1, 0, 2, 42, 4, 1, 0, 1, 'XZBK0082'); +INSERT INTO `tbl_app_location` VALUES ('024205', 1, 1, 1, 0, 2, 42, 5, 1, 0, 1, 'XZBK0081'); +INSERT INTO `tbl_app_location` VALUES ('024206', 1, 1, 1, 0, 2, 42, 6, 1, 0, 1, 'XZBK0080'); +INSERT INTO `tbl_app_location` VALUES ('024207', 1, 1, 1, 0, 2, 42, 7, 1, 0, 1, 'XZBK0079'); +INSERT INTO `tbl_app_location` VALUES ('024208', 1, 1, 1, 0, 2, 42, 8, 1, 0, 1, 'XZBK0078'); +INSERT INTO `tbl_app_location` VALUES ('024209', 1, 1, 1, 0, 2, 42, 9, 1, 0, 1, 'XZBK0077'); +INSERT INTO `tbl_app_location` VALUES ('024210', 1, 1, 1, 0, 2, 42, 10, 1, 0, 1, 'XZBK0060'); +INSERT INTO `tbl_app_location` VALUES ('024211', 1, 1, 1, 0, 2, 42, 11, 1, 0, 1, 'XZBK0059'); +INSERT INTO `tbl_app_location` VALUES ('024212', 1, 1, 1, 0, 2, 42, 12, 1, 0, 1, 'XZBK0058'); +INSERT INTO `tbl_app_location` VALUES ('024301', 1, 1, 1, 0, 2, 43, 1, 1, 0, 1, 'XZBK0776'); +INSERT INTO `tbl_app_location` VALUES ('024302', 1, 1, 1, 0, 2, 43, 2, 1, 0, 1, 'XZBK0747'); +INSERT INTO `tbl_app_location` VALUES ('024303', 1, 1, 1, 0, 2, 43, 3, 1, 0, 1, 'XZBK0002'); +INSERT INTO `tbl_app_location` VALUES ('024304', 1, 1, 1, 0, 2, 43, 4, 1, 0, 1, 'XZBK0745'); +INSERT INTO `tbl_app_location` VALUES ('024305', 1, 1, 1, 0, 2, 43, 5, 1, 0, 1, 'XZBK0746'); +INSERT INTO `tbl_app_location` VALUES ('024306', 1, 1, 1, 0, 2, 43, 6, 1, 0, 1, 'XZBK0076'); +INSERT INTO `tbl_app_location` VALUES ('024307', 1, 1, 1, 0, 2, 43, 7, 1, 0, 1, 'XZBK0075'); +INSERT INTO `tbl_app_location` VALUES ('024308', 1, 1, 1, 0, 2, 43, 8, 1, 0, 1, 'XZBK0074'); +INSERT INTO `tbl_app_location` VALUES ('024309', 1, 1, 1, 0, 2, 43, 9, 1, 0, 1, 'XZBK0073'); +INSERT INTO `tbl_app_location` VALUES ('024310', 1, 1, 1, 0, 2, 43, 10, 1, 0, 1, 'XZBK0072'); +INSERT INTO `tbl_app_location` VALUES ('024311', 1, 1, 1, 0, 2, 43, 11, 1, 0, 1, 'XZBK0071'); +INSERT INTO `tbl_app_location` VALUES ('024312', 1, 1, 1, 0, 2, 43, 12, 1, 0, 1, 'XZBK0070'); +INSERT INTO `tbl_app_location` VALUES ('024401', 1, 1, 1, 0, 2, 44, 1, 1, 0, 1, 'XZBK0096'); +INSERT INTO `tbl_app_location` VALUES ('024402', 1, 1, 1, 0, 2, 44, 2, 1, 0, 1, 'XZBK0095'); +INSERT INTO `tbl_app_location` VALUES ('024403', 1, 1, 1, 0, 2, 44, 3, 1, 0, 1, 'XZBK0094'); +INSERT INTO `tbl_app_location` VALUES ('024404', 1, 1, 1, 0, 2, 44, 4, 1, 0, 1, 'XZBK0093'); +INSERT INTO `tbl_app_location` VALUES ('024405', 1, 1, 1, 0, 2, 44, 5, 1, 0, 1, 'XZBK0744'); +INSERT INTO `tbl_app_location` VALUES ('024406', 1, 1, 1, 0, 2, 44, 6, 1, 0, 1, 'XZBK0738'); +INSERT INTO `tbl_app_location` VALUES ('024407', 1, 1, 1, 0, 2, 44, 7, 1, 0, 1, 'XZBK0737'); +INSERT INTO `tbl_app_location` VALUES ('024408', 1, 1, 1, 0, 2, 44, 8, 1, 0, 1, 'XZBK0736'); +INSERT INTO `tbl_app_location` VALUES ('024409', 1, 1, 1, 0, 2, 44, 9, 1, 0, 1, 'XZBK0743'); +INSERT INTO `tbl_app_location` VALUES ('024410', 1, 1, 1, 0, 2, 44, 10, 1, 0, 1, 'XZBK0742'); +INSERT INTO `tbl_app_location` VALUES ('024411', 1, 1, 1, 0, 2, 44, 11, 1, 0, 1, 'XZBK0741'); +INSERT INTO `tbl_app_location` VALUES ('024412', 1, 1, 1, 0, 2, 44, 12, 1, 0, 1, 'XZBK0740'); +INSERT INTO `tbl_app_location` VALUES ('024501', 1, 1, 1, 0, 2, 45, 1, 1, 0, 1, 'XZBK0092'); +INSERT INTO `tbl_app_location` VALUES ('024502', 1, 1, 1, 0, 2, 45, 2, 1, 0, 1, 'XZBK0091'); +INSERT INTO `tbl_app_location` VALUES ('024503', 1, 1, 1, 0, 2, 45, 3, 1, 0, 1, 'XZBK0090'); +INSERT INTO `tbl_app_location` VALUES ('024504', 1, 1, 1, 0, 2, 45, 4, 1, 0, 1, 'XZBK0089'); +INSERT INTO `tbl_app_location` VALUES ('024505', 1, 1, 1, 0, 2, 45, 5, 1, 0, 1, 'XZBK0088'); +INSERT INTO `tbl_app_location` VALUES ('024506', 1, 1, 1, 0, 2, 45, 6, 1, 0, 1, 'XZBK0087'); +INSERT INTO `tbl_app_location` VALUES ('024507', 1, 1, 1, 0, 2, 45, 7, 1, 0, 1, 'XZBK0086'); +INSERT INTO `tbl_app_location` VALUES ('024508', 1, 1, 1, 0, 2, 45, 8, 1, 0, 1, 'XZBK0085'); +INSERT INTO `tbl_app_location` VALUES ('024509', 1, 1, 1, 0, 2, 45, 9, 1, 0, 1, 'XZBK0100'); +INSERT INTO `tbl_app_location` VALUES ('024510', 1, 1, 1, 0, 2, 45, 10, 1, 0, 1, 'XZBK0099'); +INSERT INTO `tbl_app_location` VALUES ('024511', 1, 1, 1, 0, 2, 45, 11, 1, 0, 1, 'XZBK0098'); +INSERT INTO `tbl_app_location` VALUES ('024512', 1, 1, 1, 0, 2, 45, 12, 1, 0, 1, 'XZBK0097'); + +-- ---------------------------- +-- Table structure for tbl_app_part_info +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_app_part_info`; +CREATE TABLE `tbl_app_part_info` ( + `Material` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '零件号', + `ItemDesc` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '描述', + `Category` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '零件类型', + `CategoryRemark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '策略', + `Unload_Place` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '卸货点', + `Kitting_Point` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '配料点', + `Property` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '可用性', + `Vendor_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商代码', + `Data_Owner` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '数据负责人', + `Part_Weight` double NULL DEFAULT NULL COMMENT '重量', + `Storage_Location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库位', + `Storage_Type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '存储类型', + `Storage_Bin` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'BIN位', + `Vendor_Name_EN` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商名称-英文', + `Vendor_Country` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '进口/国产', + `UpdateDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '更新日期', + `SLED` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '有效期', + `Vendor_Name_CN` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商名称-中文' +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_app_part_info +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tbl_app_stand +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_app_stand`; +CREATE TABLE `tbl_app_stand` ( + `stand_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '站台', + `allow_in` int NULL DEFAULT NULL COMMENT '允许入库', + `allow_out` int NULL DEFAULT NULL COMMENT '允许出库', + `task_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '任务id', + `is_lock` int NULL DEFAULT NULL COMMENT '是否锁定/默认值0:未锁定', + `stand_status` int NULL DEFAULT NULL COMMENT '库存状态/默认值0:空闲', + `equipment_id` int NULL DEFAULT NULL, + `area_id` int NULL DEFAULT NULL, + `stand_type` int NULL DEFAULT NULL COMMENT '站台类型,1:基础入出库站台,2:拣选站台', + `stand_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '站台电脑的ip', + PRIMARY KEY (`stand_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_app_stand +-- ---------------------------- +INSERT INTO `tbl_app_stand` VALUES ('1', 0, 0, NULL, 0, 0, 1, 1, 3, NULL); +INSERT INTO `tbl_app_stand` VALUES ('101', 0, 1, NULL, 0, 0, 1, 1, 1, NULL); +INSERT INTO `tbl_app_stand` VALUES ('111', 1, 0, NULL, 0, 0, 1, 1, 1, NULL); +INSERT INTO `tbl_app_stand` VALUES ('2001', 0, 0, NULL, 0, 0, 0, 1, 2, '127.0.0.1'); + +-- ---------------------------- +-- Table structure for tbl_app_stock +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_app_stock`; +CREATE TABLE `tbl_app_stock` ( + `stock_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '库存编号', + `location_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '库位编号', + `vehicle_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '载具编号', + `goods_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物料编码', + `goods_name` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物料描述', + `batch_no` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号', + `available_num` int NULL DEFAULT NULL COMMENT '可用数量', + `real_num` int NULL DEFAULT NULL COMMENT '实际数量', + `provider_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商编号', + `provider_name` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商名称', + `production_date` datetime NULL DEFAULT NULL COMMENT '生产日期', + `expiration_date` datetime NULL DEFAULT NULL COMMENT '过期日期', + `stock_status` int NULL DEFAULT NULL COMMENT '库存状态', + `goods_status` int NULL DEFAULT NULL COMMENT '物料状态', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + `last_update_time` datetime NULL DEFAULT NULL COMMENT '最近更新时间', + `last_update_user` datetime NULL DEFAULT NULL COMMENT '最近更新用户', + `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '备注,预留字段', + `is_inventory` int NULL DEFAULT NULL COMMENT '是否盘点,默认为空。', + `inventory_task_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '盘点的任务单号', + `current_location` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '当前所在位置', + `remain_num` int NULL DEFAULT NULL COMMENT '剩余数量', + `shelf_life` double NULL DEFAULT NULL COMMENT '保质期--单位:年', + PRIMARY KEY (`stock_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_app_stock +-- ---------------------------- +INSERT INTO `tbl_app_stock` VALUES ('1', '010101', 'XZBK0001', '1', '1', '1', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `tbl_app_stock` VALUES ('2', '010102', 'XZBK0002', '1', '1', '1', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `tbl_app_stock` VALUES ('3', '010103', 'XZBK0003', '2', '2', '2', 2, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + +-- ---------------------------- +-- Table structure for tbl_app_task +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_app_task`; +CREATE TABLE `tbl_app_task` ( + `task_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务编号,主键,UUID', + `task_type` int NOT NULL COMMENT '任务类型(1:入库;2:出库;9:移库)', + `task_status` int NOT NULL COMMENT '任务状态', + `task_group` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务组', + `origin` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '起点', + `destination` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '终点', + `pick_stand` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '拣货站台', + `weight` double NULL DEFAULT NULL COMMENT '重量', + `vehicle_no` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '托盘号', + `vehicle_size` int NULL DEFAULT NULL COMMENT '尺寸', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + `user_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作人员姓名', + `goods_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物料编号', + `goods_name` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物料名称', + `operate_num` int NULL DEFAULT NULL COMMENT '本次操作数量', + `total_num` int NULL DEFAULT NULL COMMENT '库存总数量', + `etag_location` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '电子标签位置', + `task_priority` int NULL DEFAULT NULL COMMENT '任务优先级:1普通9紧急', + `production_date` datetime NULL DEFAULT NULL COMMENT '入库日期/生产日期', + `expiration_date` datetime NULL DEFAULT NULL COMMENT '过期日期', + `kate_task_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '卡特任务的id', + `remark1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备用字段', + PRIMARY KEY (`task_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_app_task +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tbl_app_task_bak +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_app_task_bak`; +CREATE TABLE `tbl_app_task_bak` ( + `task_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务编号,主键,UUID', + `task_type` int NOT NULL COMMENT '任务类型(1:入库;2:出库;9:移库)', + `task_status` int NOT NULL COMMENT '任务状态', + `task_group` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务组', + `origin` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '起点', + `destination` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '终点', + `pick_stand` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '拣货站台', + `weight` double NULL DEFAULT NULL COMMENT '重量', + `vehicle_no` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '托盘号', + `vehicle_size` int NULL DEFAULT NULL COMMENT '尺寸', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + `user_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作人员姓名', + `goods_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物料编号', + `goods_name` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物料名称', + `operate_num` int NULL DEFAULT NULL COMMENT '本次操作数量', + `total_num` int NULL DEFAULT NULL COMMENT '库存总数量', + `etag_location` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '电子标签位置', + `task_priority` int NULL DEFAULT NULL COMMENT '任务优先级:1普通9紧急', + `production_date` datetime NULL DEFAULT NULL COMMENT '入库日期/生产日期', + `expiration_date` datetime NULL DEFAULT NULL COMMENT '过期日期', + `kate_task_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '卡特任务的id', + `finish_time` datetime NULL DEFAULT NULL COMMENT '完成时间', + `remark1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备用字段', + PRIMARY KEY (`task_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_app_task_bak +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tbl_app_vehicle +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_app_vehicle`; +CREATE TABLE `tbl_app_vehicle` ( + `vehicle_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '载具编号', + `vehicle_status` int NULL DEFAULT NULL COMMENT '载具状态', + `current_location` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '当前位置', + `is_empty` int NULL DEFAULT NULL COMMENT '是否空箱', + PRIMARY KEY (`vehicle_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_app_vehicle +-- ---------------------------- +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0001', 2, '014501', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0002', 2, '024303', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0005', 2, '023706', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0006', 2, '023705', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0007', 2, '023704', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0008', 2, '023703', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0009', 2, '023702', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0010', 2, '023701', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0011', 2, '023812', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0012', 2, '023811', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0013', 2, '023602', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0014', 2, '023601', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0015', 2, '023712', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0016', 2, '023711', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0017', 2, '023710', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0018', 2, '023709', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0019', 2, '023708', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0020', 2, '023707', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0021', 2, '023802', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0022', 2, '023801', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0023', 2, '023912', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0024', 2, '023911', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0025', 2, '023910', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0026', 2, '023909', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0027', 2, '023908', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0028', 2, '023907', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0029', 2, '023810', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0030', 2, '023809', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0031', 2, '023808', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0032', 2, '023807', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0033', 2, '023806', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0034', 2, '023805', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0035', 2, '023804', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0036', 2, '023803', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0037', 2, '024010', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0038', 2, '024009', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0039', 2, '024008', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0040', 2, '024007', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0041', 2, '024006', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0042', 2, '024005', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0043', 2, '024004', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0044', 2, '024003', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0045', 2, '023906', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0046', 2, '023905', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0047', 2, '023904', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0048', 2, '023903', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0049', 2, '023902', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0050', 2, '023901', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0051', 2, '024012', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0052', 2, '024011', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0053', 2, '024105', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0054', 2, '024104', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0055', 2, '024103', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0056', 2, '024102', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0057', 2, '024101', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0058', 2, '024212', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0059', 2, '024211', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0060', 2, '024210', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0061', 2, '024001', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0062', 2, '024112', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0063', 2, '024111', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0064', 2, '024110', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0065', 2, '024109', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0066', 2, '024108', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0067', 2, '024107', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0068', 2, '024106', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0069', 2, '024201', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0070', 2, '024312', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0071', 2, '024311', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0072', 2, '024310', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0073', 2, '024309', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0074', 2, '024308', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0075', 2, '024307', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0076', 2, '024306', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0077', 2, '024209', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0078', 2, '024208', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0079', 2, '024207', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0080', 2, '024206', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0081', 2, '024205', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0082', 2, '024204', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0083', 2, '024203', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0084', 2, '024202', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0085', 2, '024508', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0086', 2, '024507', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0087', 2, '024506', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0088', 2, '024505', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0089', 2, '024504', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0090', 2, '024503', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0091', 2, '024502', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0092', 2, '024501', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0093', 2, '024404', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0094', 2, '024403', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0095', 2, '024402', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0096', 2, '024401', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0097', 2, '024512', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0098', 2, '024511', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0099', 2, '024510', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0100', 2, '024509', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0736', 2, '024408', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0737', 2, '024407', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0738', 2, '024406', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0739', 2, '024002', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0740', 2, '024412', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0741', 2, '024411', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0742', 2, '024410', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0743', 2, '024409', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0744', 2, '024405', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0745', 2, '024304', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0746', 2, '024305', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0747', 2, '024302', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0776', 2, '024301', 1); + +-- ---------------------------- +-- Table structure for tbl_sys_config +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_sys_config`; +CREATE TABLE `tbl_sys_config` ( + `config_id` int NOT NULL COMMENT '配置ID', + `config_key` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '配置键', + `config_value` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '配置值', + `config_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '配置类型:1.输入框2.下拉多选3.下拉单选', + `config_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '配置显示名称', + PRIMARY KEY (`config_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_sys_config +-- ---------------------------- +INSERT INTO `tbl_sys_config` VALUES (1, 'MAX_EMPTY_VEHICLE_NUM', '4', '1', '空箱个数'); + +-- ---------------------------- +-- Table structure for tbl_sys_log +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_sys_log`; +CREATE TABLE `tbl_sys_log` ( + `log_id` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '日志id', + `log_title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '日志标题', + `log_method` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '请求方法名', + `log_request` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '请求参数', + `log_response` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '请求响应结果', + `log_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '请求ip', + `log_time` datetime NULL DEFAULT NULL COMMENT '请求时间', + `log_user` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '请求用户', + PRIMARY KEY (`log_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_sys_log +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tbl_sys_menu +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_sys_menu`; +CREATE TABLE `tbl_sys_menu` ( + `menu_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '菜单编号', + `label_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '菜单名称', + `icon_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '图标名称', + `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '菜单地址', + `parent_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '父菜单编号', + PRIMARY KEY (`menu_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_sys_menu +-- ---------------------------- +INSERT INTO `tbl_sys_menu` VALUES ('1', '操作', 'Operation', '', '0'); +INSERT INTO `tbl_sys_menu` VALUES ('11', '入库', NULL, '/goodsIn', '1'); +INSERT INTO `tbl_sys_menu` VALUES ('12', '出库', NULL, '/goodsOut', '1'); +INSERT INTO `tbl_sys_menu` VALUES ('13', '盘点', NULL, '/inventory', '1'); +INSERT INTO `tbl_sys_menu` VALUES ('2', '数据', 'Histogram', '', '0'); +INSERT INTO `tbl_sys_menu` VALUES ('21', '库存信息', NULL, '/stock', '2'); +INSERT INTO `tbl_sys_menu` VALUES ('22', '物料信息', NULL, '/goods', '2'); +INSERT INTO `tbl_sys_menu` VALUES ('23', '入库记录', NULL, '/inTaskRecord', '2'); +INSERT INTO `tbl_sys_menu` VALUES ('24', '出库记录', NULL, '/outTaskRecord', '2'); +INSERT INTO `tbl_sys_menu` VALUES ('241', '盘点记录', NULL, '/inventoryRecord', '2'); +INSERT INTO `tbl_sys_menu` VALUES ('25', '任务监控', NULL, '/taskMonitor', '2'); +INSERT INTO `tbl_sys_menu` VALUES ('26', '库位监控', NULL, '/location', '2'); +INSERT INTO `tbl_sys_menu` VALUES ('27', '料箱监控', NULL, '/vehicle', '2'); +INSERT INTO `tbl_sys_menu` VALUES ('3', '系统', 'Setting', NULL, '0'); +INSERT INTO `tbl_sys_menu` VALUES ('31', '用户', NULL, '/user', '3'); +INSERT INTO `tbl_sys_menu` VALUES ('32', '角色', NULL, '/role', '3'); +INSERT INTO `tbl_sys_menu` VALUES ('33', '菜单', NULL, '/menu', '3'); +INSERT INTO `tbl_sys_menu` VALUES ('34', '库口设置', NULL, '/standSettings', '3'); +INSERT INTO `tbl_sys_menu` VALUES ('35', '系统配置', NULL, '/config', '3'); + +-- ---------------------------- +-- Table structure for tbl_sys_permission +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_sys_permission`; +CREATE TABLE `tbl_sys_permission` ( + `permission_id` int NOT NULL AUTO_INCREMENT COMMENT '权限编号', + `menu_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '菜单编号', + `role_id` int NOT NULL COMMENT '角色编号', + PRIMARY KEY (`permission_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 53 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_sys_permission +-- ---------------------------- +INSERT INTO `tbl_sys_permission` VALUES (1, '1', 1); +INSERT INTO `tbl_sys_permission` VALUES (2, '11', 1); +INSERT INTO `tbl_sys_permission` VALUES (3, '12', 1); +INSERT INTO `tbl_sys_permission` VALUES (4, '13', 1); +INSERT INTO `tbl_sys_permission` VALUES (5, '2', 1); +INSERT INTO `tbl_sys_permission` VALUES (6, '21', 1); +INSERT INTO `tbl_sys_permission` VALUES (7, '22', 1); +INSERT INTO `tbl_sys_permission` VALUES (8, '23', 1); +INSERT INTO `tbl_sys_permission` VALUES (9, '24', 1); +INSERT INTO `tbl_sys_permission` VALUES (10, '241', 1); +INSERT INTO `tbl_sys_permission` VALUES (11, '25', 1); +INSERT INTO `tbl_sys_permission` VALUES (12, '26', 1); +INSERT INTO `tbl_sys_permission` VALUES (13, '27', 1); +INSERT INTO `tbl_sys_permission` VALUES (14, '3', 1); +INSERT INTO `tbl_sys_permission` VALUES (15, '31', 1); +INSERT INTO `tbl_sys_permission` VALUES (16, '32', 1); +INSERT INTO `tbl_sys_permission` VALUES (17, '33', 1); +INSERT INTO `tbl_sys_permission` VALUES (18, '34', 1); +INSERT INTO `tbl_sys_permission` VALUES (19, '35', 1); + +-- ---------------------------- +-- Table structure for tbl_sys_role +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_sys_role`; +CREATE TABLE `tbl_sys_role` ( + `role_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '角色编号', + `role_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '角色名称', + PRIMARY KEY (`role_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_sys_role +-- ---------------------------- +INSERT INTO `tbl_sys_role` VALUES ('1', '管理员'); +INSERT INTO `tbl_sys_role` VALUES ('2', '普通用户'); + +-- ---------------------------- +-- Table structure for tbl_sys_settings +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_sys_settings`; +CREATE TABLE `tbl_sys_settings` ( + `setting_id` int NOT NULL COMMENT '设置id', + `setting_key` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '配置键', + `setting_value` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '配置值', + `setting_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '配置类型:1.输入框2.下拉多选3.下拉单选', + `setting_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '配置显示名称', + PRIMARY KEY (`setting_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of tbl_sys_settings +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tbl_sys_user +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_sys_user`; +CREATE TABLE `tbl_sys_user` ( + `user_id` int NOT NULL AUTO_INCREMENT COMMENT '用户ID', + `user_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '用户名', + `role_id` int NULL DEFAULT NULL COMMENT '角色', + `login_account` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '登录账号', + `login_password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '登录密码', + `add_time` datetime NULL DEFAULT NULL, + `update_time` datetime NULL DEFAULT NULL, + `add_user` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '添加人', + PRIMARY KEY (`user_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_sys_user +-- ---------------------------- +INSERT INTO `tbl_sys_user` VALUES (1, '管理员', 1, 'admin', '812C0C84E2970FA98456DDC5B0B59594', '2023-03-23 11:17:06', '2023-03-23 11:17:10', '系统'); + +SET FOREIGN_KEY_CHECKS = 1;