diff --git a/nl-framework/nl-spring-boot-starter-execute/src/main/java/cn/code/nl/framework/execute/biz/api/lms/LmsTaskCommonApi.java b/nl-framework/nl-spring-boot-starter-execute/src/main/java/cn/code/nl/framework/execute/biz/api/lms/LmsTaskCommonApi.java index 3bd8ff04..06c2efc1 100644 --- a/nl-framework/nl-spring-boot-starter-execute/src/main/java/cn/code/nl/framework/execute/biz/api/lms/LmsTaskCommonApi.java +++ b/nl-framework/nl-spring-boot-starter-execute/src/main/java/cn/code/nl/framework/execute/biz/api/lms/LmsTaskCommonApi.java @@ -4,15 +4,14 @@ import cn.code.nl.framework.common.enums.RpcConstants; import cn.code.nl.framework.execute.biz.api.TaskCommonApi; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.RequestMapping; +import io.swagger.v3.oas.annotations.tags.Tag; /** * lms通用API * @Author: liyongde * @Date: 2026/7/15 14:39 */ -@FeignClient(name = RpcConstants.LMS_NAME, primary = false) // TODO 芋艿:fallbackFactory = -@RequestMapping("/lms") +@FeignClient(name = RpcConstants.LMS_NAME, path = "/lms", primary = false) // TODO 芋艿:fallbackFactory = @Tag(name = "RPC 服务 - lms任务") public interface LmsTaskCommonApi extends TaskCommonApi { } diff --git a/nl-framework/nl-spring-boot-starter-execute/src/main/java/cn/code/nl/framework/execute/biz/api/wms/WmsTaskCommonApi.java b/nl-framework/nl-spring-boot-starter-execute/src/main/java/cn/code/nl/framework/execute/biz/api/wms/WmsTaskCommonApi.java index 2e442ddb..dd2a83b3 100644 --- a/nl-framework/nl-spring-boot-starter-execute/src/main/java/cn/code/nl/framework/execute/biz/api/wms/WmsTaskCommonApi.java +++ b/nl-framework/nl-spring-boot-starter-execute/src/main/java/cn/code/nl/framework/execute/biz/api/wms/WmsTaskCommonApi.java @@ -4,15 +4,14 @@ import cn.code.nl.framework.common.enums.RpcConstants; import cn.code.nl.framework.execute.biz.api.TaskCommonApi; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.RequestMapping; +import io.swagger.v3.oas.annotations.tags.Tag; /** * * @Author: liyongde * @Date: 2026/7/15 14:48 */ -@FeignClient(name = RpcConstants.WMS_NAME, primary = false) // TODO 芋艿:fallbackFactory = -@RequestMapping("/wms") +@FeignClient(name = RpcConstants.WMS_NAME, path = "/wms", primary = false) // TODO 芋艿:fallbackFactory = @Tag(name = "RPC 服务 - wms任务") public interface WmsTaskCommonApi extends TaskCommonApi { } diff --git a/nl-module-base/nl-module-base-server/src/main/resources/application-dev.yaml b/nl-module-base/nl-module-base-server/src/main/resources/application-dev.yaml index 05d7e4d3..37d19abb 100644 --- a/nl-module-base/nl-module-base-server/src/main/resources/application-dev.yaml +++ b/nl-module-base/nl-module-base-server/src/main/resources/application-dev.yaml @@ -57,14 +57,14 @@ spring: primary: master datasource: master: - url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 + url: jdbc:mysql://127.0.0.1:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 lazy: true # 开启懒加载,保证启动速度 - url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 + url: jdbc:mysql://127.0.0.1:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: diff --git a/nl-module-base/nl-module-base-server/src/main/resources/application-local.yaml b/nl-module-base/nl-module-base-server/src/main/resources/application-local.yaml index aa7ecc1d..b7116579 100644 --- a/nl-module-base/nl-module-base-server/src/main/resources/application-local.yaml +++ b/nl-module-base/nl-module-base-server/src/main/resources/application-local.yaml @@ -64,7 +64,7 @@ spring: lazy: true # 开启懒加载,保证启动速度 url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: diff --git a/nl-module-base/nl-module-base-server/src/main/resources/application-test.yaml b/nl-module-base/nl-module-base-server/src/main/resources/application-test.yaml index ab781cd6..d3e3ce0c 100644 --- a/nl-module-base/nl-module-base-server/src/main/resources/application-test.yaml +++ b/nl-module-base/nl-module-base-server/src/main/resources/application-test.yaml @@ -59,12 +59,12 @@ spring: master: url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 lazy: true # 开启懒加载,保证启动速度 url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: diff --git a/nl-module-infra/nl-module-infra-server/src/main/resources/application-dev.yaml b/nl-module-infra/nl-module-infra-server/src/main/resources/application-dev.yaml index d9bf0503..bd488096 100644 --- a/nl-module-infra/nl-module-infra-server/src/main/resources/application-dev.yaml +++ b/nl-module-infra/nl-module-infra-server/src/main/resources/application-dev.yaml @@ -57,14 +57,14 @@ spring: primary: master datasource: master: - url: jdbc:mysql://192.168.81.193:3307/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 + url: jdbc:mysql://127.0.0.1:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 lazy: true # 开启懒加载,保证启动速度 - url: jdbc:mysql://192.168.81.193:3307/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 + url: jdbc:mysql://127.0.0.1:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: diff --git a/nl-module-infra/nl-module-infra-server/src/main/resources/application-local.yaml b/nl-module-infra/nl-module-infra-server/src/main/resources/application-local.yaml index 82eca54b..b3d2e8a5 100644 --- a/nl-module-infra/nl-module-infra-server/src/main/resources/application-local.yaml +++ b/nl-module-infra/nl-module-infra-server/src/main/resources/application-local.yaml @@ -66,7 +66,7 @@ spring: # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例 # url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例 username: root - password: root123 + password: root # username: sa # SQL Server 连接的示例 # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例 # username: SYSDBA # DM 连接的示例 @@ -77,7 +77,7 @@ spring: lazy: true # 开启懒加载,保证启动速度 url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true username: root - password: root123 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: diff --git a/nl-module-infra/nl-module-infra-server/src/main/resources/application-test.yaml b/nl-module-infra/nl-module-infra-server/src/main/resources/application-test.yaml index ba155ba6..e0daf805 100644 --- a/nl-module-infra/nl-module-infra-server/src/main/resources/application-test.yaml +++ b/nl-module-infra/nl-module-infra-server/src/main/resources/application-test.yaml @@ -59,12 +59,12 @@ spring: master: url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 lazy: true # 开启懒加载,保证启动速度 url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: diff --git a/nl-module-lms/nl-module-lms-server/src/main/resources/application-dev.yaml b/nl-module-lms/nl-module-lms-server/src/main/resources/application-dev.yaml index e9e05859..6379951a 100644 --- a/nl-module-lms/nl-module-lms-server/src/main/resources/application-dev.yaml +++ b/nl-module-lms/nl-module-lms-server/src/main/resources/application-dev.yaml @@ -59,12 +59,12 @@ spring: master: url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 lazy: true # 开启懒加载,保证启动速度 url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: diff --git a/nl-module-lms/nl-module-lms-server/src/main/resources/application-local.yaml b/nl-module-lms/nl-module-lms-server/src/main/resources/application-local.yaml index 82a2b44f..7d51d4e1 100644 --- a/nl-module-lms/nl-module-lms-server/src/main/resources/application-local.yaml +++ b/nl-module-lms/nl-module-lms-server/src/main/resources/application-local.yaml @@ -59,12 +59,12 @@ spring: master: url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 lazy: true # 开启懒加载,保证启动速度 url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: diff --git a/nl-module-lms/nl-module-lms-server/src/main/resources/application-test.yaml b/nl-module-lms/nl-module-lms-server/src/main/resources/application-test.yaml index 5658794f..616c39f4 100644 --- a/nl-module-lms/nl-module-lms-server/src/main/resources/application-test.yaml +++ b/nl-module-lms/nl-module-lms-server/src/main/resources/application-test.yaml @@ -59,12 +59,12 @@ spring: master: url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 lazy: true # 开启懒加载,保证启动速度 url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: diff --git a/nl-module-system/nl-module-system-server/src/main/resources/application-dev.yaml b/nl-module-system/nl-module-system-server/src/main/resources/application-dev.yaml index 519d180f..c6d5d1a5 100644 --- a/nl-module-system/nl-module-system-server/src/main/resources/application-dev.yaml +++ b/nl-module-system/nl-module-system-server/src/main/resources/application-dev.yaml @@ -57,14 +57,14 @@ spring: primary: master datasource: master: - url: jdbc:mysql://192.168.81.193:3307/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 + url: jdbc:mysql://127.0.0.1:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 lazy: true # 开启懒加载,保证启动速度 - url: jdbc:mysql://192.168.81.193:3307/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 + url: jdbc:mysql://127.0.0.1:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: diff --git a/nl-module-system/nl-module-system-server/src/main/resources/application-local.yaml b/nl-module-system/nl-module-system-server/src/main/resources/application-local.yaml index 35f9597c..1f7b5893 100644 --- a/nl-module-system/nl-module-system-server/src/main/resources/application-local.yaml +++ b/nl-module-system/nl-module-system-server/src/main/resources/application-local.yaml @@ -65,7 +65,7 @@ spring: # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例 # url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例 username: root - password: root123 + password: root # username: sa # SQL Server 连接的示例 # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例 # username: SYSDBA # DM 连接的示例 @@ -76,7 +76,7 @@ spring: lazy: true # 开启懒加载,保证启动速度 url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true username: root - password: root123 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: diff --git a/nl-module-system/nl-module-system-server/src/main/resources/application-test.yaml b/nl-module-system/nl-module-system-server/src/main/resources/application-test.yaml index eadf7bfc..90c16fac 100644 --- a/nl-module-system/nl-module-system-server/src/main/resources/application-test.yaml +++ b/nl-module-system/nl-module-system-server/src/main/resources/application-test.yaml @@ -59,12 +59,12 @@ spring: master: url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 lazy: true # 开启懒加载,保证启动速度 url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: diff --git a/nl-module-task/nl-module-task-server/src/main/resources/application-dev.yaml b/nl-module-task/nl-module-task-server/src/main/resources/application-dev.yaml index f47a45a2..faf8d89f 100644 --- a/nl-module-task/nl-module-task-server/src/main/resources/application-dev.yaml +++ b/nl-module-task/nl-module-task-server/src/main/resources/application-dev.yaml @@ -59,12 +59,12 @@ spring: master: url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 lazy: true # 开启懒加载,保证启动速度 url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: diff --git a/nl-module-task/nl-module-task-server/src/main/resources/application-local.yaml b/nl-module-task/nl-module-task-server/src/main/resources/application-local.yaml index f3c6b3c9..bc06865d 100644 --- a/nl-module-task/nl-module-task-server/src/main/resources/application-local.yaml +++ b/nl-module-task/nl-module-task-server/src/main/resources/application-local.yaml @@ -59,12 +59,12 @@ spring: master: url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 lazy: true # 开启懒加载,保证启动速度 url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: diff --git a/nl-module-task/nl-module-task-server/src/main/resources/application-test.yaml b/nl-module-task/nl-module-task-server/src/main/resources/application-test.yaml index dcba8642..225f82de 100644 --- a/nl-module-task/nl-module-task-server/src/main/resources/application-test.yaml +++ b/nl-module-task/nl-module-task-server/src/main/resources/application-test.yaml @@ -59,12 +59,12 @@ spring: master: url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 lazy: true # 开启懒加载,保证启动速度 url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: diff --git a/nl-module-wms/nl-module-wms-api/src/main/java/cn/code/nl/module/wms/enums/ErrorCodeConstants.java b/nl-module-wms/nl-module-wms-api/src/main/java/cn/code/nl/module/wms/enums/ErrorCodeConstants.java index d0d40c5e..6205362e 100644 --- a/nl-module-wms/nl-module-wms-api/src/main/java/cn/code/nl/module/wms/enums/ErrorCodeConstants.java +++ b/nl-module-wms/nl-module-wms-api/src/main/java/cn/code/nl/module/wms/enums/ErrorCodeConstants.java @@ -9,6 +9,12 @@ public interface ErrorCodeConstants { ErrorCode STRUC_ATTR_NOT_EXISTS = new ErrorCode(3, "仓位属性不存在"); + // ================ 出入库表相关错误码 ================= + ErrorCode IOSTOR_INV_NOT_EXISTS = new ErrorCode(4, "出入库单主表不存在"); + + ErrorCode IOSTORINV_DTL_NOT_EXISTS = new ErrorCode(5, "出入库单明细不存在"); + + ErrorCode IOSTORINV_DIS_NOT_EXISTS = new ErrorCode(6, "出入库单分配不存在"); // ================ 仓储策略相关错误码 ================= ErrorCode WAREHOUSE_STRATEGY_CONFIG_NOT_EXISTS = new ErrorCode(6_000_1, "仓储策略配置不存在"); diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinv/IostorInvController.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinv/IostorInvController.java new file mode 100644 index 00000000..8f3cadd8 --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinv/IostorInvController.java @@ -0,0 +1,104 @@ +package cn.code.nl.module.wms.controller.admin.iostorinv; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.code.nl.framework.common.pojo.PageParam; +import cn.code.nl.framework.common.pojo.PageResult; +import cn.code.nl.framework.common.pojo.CommonResult; +import cn.code.nl.framework.common.util.object.BeanUtils; +import static cn.code.nl.framework.common.pojo.CommonResult.success; + +import cn.code.nl.framework.excel.core.util.ExcelUtils; + +import cn.code.nl.framework.apilog.core.annotation.ApiAccessLog; +import static cn.code.nl.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.code.nl.module.wms.controller.admin.iostorinv.vo.*; +import cn.code.nl.module.wms.dal.dataobject.iostorinv.IostorInvDO; +import cn.code.nl.module.wms.service.iostorinv.IostorInvService; + +@Tag(name = "管理后台 - 出入库单主表") +@RestController +@RequestMapping("/wms/iostor-inv") +@Validated +public class IostorInvController { + + @Resource + private IostorInvService iostorInvService; + + @PostMapping("/create") + @Operation(summary = "创建出入库单主表") + @PreAuthorize("@ss.hasPermission('wms:iostor-inv:create')") + public CommonResult createIostorInv(@Valid @RequestBody IostorInvSaveReqVO createReqVO) { + return success(iostorInvService.createIostorInv(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新出入库单主表") + @PreAuthorize("@ss.hasPermission('wms:iostor-inv:update')") + public CommonResult updateIostorInv(@Valid @RequestBody IostorInvSaveReqVO updateReqVO) { + iostorInvService.updateIostorInv(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除出入库单主表") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('wms:iostor-inv:delete')") + public CommonResult deleteIostorInv(@RequestParam("id") String id) { + iostorInvService.deleteIostorInv(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除出入库单主表") + @PreAuthorize("@ss.hasPermission('wms:iostor-inv:delete')") + public CommonResult deleteIostorInvList(@RequestParam("ids") List ids) { + iostorInvService.deleteIostorInvListByIds(ids); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得出入库单主表") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('wms:iostor-inv:query')") + public CommonResult getIostorInv(@RequestParam("id") String id) { + IostorInvDO iostorInv = iostorInvService.getIostorInv(id); + return success(BeanUtils.toBean(iostorInv, IostorInvRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得出入库单主表分页") + @PreAuthorize("@ss.hasPermission('wms:iostor-inv:query')") + public CommonResult> getIostorInvPage(@Valid IostorInvPageReqVO pageReqVO) { + PageResult pageResult = iostorInvService.getIostorInvPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, IostorInvRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出出入库单主表 Excel") + @PreAuthorize("@ss.hasPermission('wms:iostor-inv:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportIostorInvExcel(@Valid IostorInvPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = iostorInvService.getIostorInvPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "出入库单主表.xls", "数据", IostorInvRespVO.class, + BeanUtils.toBean(list, IostorInvRespVO.class)); + } + +} diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinv/vo/IostorInvPageReqVO.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinv/vo/IostorInvPageReqVO.java new file mode 100644 index 00000000..224ea155 --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinv/vo/IostorInvPageReqVO.java @@ -0,0 +1,88 @@ +package cn.code.nl.module.wms.controller.admin.iostorinv.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.code.nl.framework.common.pojo.PageParam; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.code.nl.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 出入库单主表分页 Request VO") +@Data +public class IostorInvPageReqVO extends PageParam { + + @Schema(description = "单据编号") + private String billCode; + + @Schema(description = "单据类型", example = "2") + private String billType; + + @Schema(description = "业务日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] bizDate; + + @Schema(description = "仓库标识", example = "12635") + private String storId; + + @Schema(description = "来源方名称", example = "李四") + private String sourceName; + + @Schema(description = "来源方类型", example = "2") + private String sourceType; + + @Schema(description = "总数量") + private BigDecimal totalQty; + + @Schema(description = "总重量") + private BigDecimal totalWeight; + + @Schema(description = "明细数", example = "5494") + private Integer detailCount; + + @Schema(description = "单据状态", example = "1") + private String billStatus; + + @Schema(description = "备注", example = "你猜") + private String remark; + + @Schema(description = "生成方式") + private String createMode; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "分配人", example = "27530") + private String disOptid; + + @Schema(description = "分配时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] disTime; + + @Schema(description = "确认人", example = "30295") + private String confirmOptid; + + @Schema(description = "确认时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] confirmTime; + + @Schema(description = "部门ID", example = "8530") + private String sysdeptid; + + @Schema(description = "公司ID", example = "11731") + private String syscompanyid; + + @Schema(description = "是否已上传") + private String isUpload; + + @Schema(description = "回传人", example = "25284") + private String uploadOptid; + + @Schema(description = "回传时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private String[] uploadTime; + +} \ No newline at end of file diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinv/vo/IostorInvRespVO.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinv/vo/IostorInvRespVO.java new file mode 100644 index 00000000..35964cd1 --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinv/vo/IostorInvRespVO.java @@ -0,0 +1,108 @@ +package cn.code.nl.module.wms.controller.admin.iostorinv.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import cn.idev.excel.annotation.*; + +@Schema(description = "管理后台 - 出入库单主表 Response VO") +@Data +@ExcelIgnoreUnannotated +public class IostorInvRespVO { + + @Schema(description = "单据编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("单据编号") + private String billCode; + + @Schema(description = "单据类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("单据类型") + private String billType; + + @Schema(description = "业务日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("业务日期") + private LocalDateTime bizDate; + + @Schema(description = "仓库标识", example = "12635") + @ExcelProperty("仓库标识") + private String storId; + + @Schema(description = "来源方标识", example = "21190") + @ExcelProperty("来源方标识") + private String sourceId; + + @Schema(description = "来源方名称", example = "李四") + @ExcelProperty("来源方名称") + private String sourceName; + + @Schema(description = "来源方类型", example = "2") + @ExcelProperty("来源方类型") + private String sourceType; + + @Schema(description = "总数量", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("总数量") + private BigDecimal totalQty; + + @Schema(description = "总重量") + @ExcelProperty("总重量") + private BigDecimal totalWeight; + + @Schema(description = "明细数", requiredMode = Schema.RequiredMode.REQUIRED, example = "5494") + @ExcelProperty("明细数") + private Integer detailCount; + + @Schema(description = "单据状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("单据状态") + private String billStatus; + + @Schema(description = "备注", example = "你猜") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "生成方式", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("生成方式") + private String createMode; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "分配人", example = "27530") + @ExcelProperty("分配人") + private String disOptid; + + @Schema(description = "分配时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("分配时间") + private LocalDateTime disTime; + + @Schema(description = "确认人", example = "30295") + @ExcelProperty("确认人") + private String confirmOptid; + + @Schema(description = "确认时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("确认时间") + private LocalDateTime confirmTime; + + @Schema(description = "部门ID", example = "8530") + @ExcelProperty("部门ID") + private String sysdeptid; + + @Schema(description = "公司ID", example = "11731") + @ExcelProperty("公司ID") + private String syscompanyid; + + @Schema(description = "是否已上传", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否已上传") + private String isUpload; + + @Schema(description = "回传人", example = "25284") + @ExcelProperty("回传人") + private String uploadOptid; + + @Schema(description = "回传时间") + @ExcelProperty("回传时间") + private String uploadTime; + +} diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinv/vo/IostorInvSaveReqVO.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinv/vo/IostorInvSaveReqVO.java new file mode 100644 index 00000000..521c2676 --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinv/vo/IostorInvSaveReqVO.java @@ -0,0 +1,104 @@ +package cn.code.nl.module.wms.controller.admin.iostorinv.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 出入库单主表新增/修改 Request VO") +@Data +public class IostorInvSaveReqVO { + + @Schema(description = "出入单标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "1273") + private String iostorinvId; + + @Schema(description = "单据编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "单据编号不能为空") + private String billCode; + + @Schema(description = "出入类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "出入类型不能为空") + private String ioType; + + @Schema(description = "单据类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotEmpty(message = "单据类型不能为空") + private String billType; + + @Schema(description = "业务日期", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "业务日期不能为空") + private LocalDateTime bizDate; + + @Schema(description = "仓库标识", example = "12635") + private String storId; + + @Schema(description = "仓库编码") + private String storCode; + + @Schema(description = "仓库名称", example = "赵六") + private String storName; + + @Schema(description = "来源方标识", example = "21190") + private String sourceId; + + @Schema(description = "来源方名称", example = "李四") + private String sourceName; + + @Schema(description = "来源方类型", example = "2") + private String sourceType; + + @Schema(description = "总数量", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "总数量不能为空") + private BigDecimal totalQty; + + @Schema(description = "总重量") + private BigDecimal totalWeight; + + @Schema(description = "明细数", requiredMode = Schema.RequiredMode.REQUIRED, example = "5494") + @NotNull(message = "明细数不能为空") + private Integer detailCount; + + @Schema(description = "单据状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "单据状态不能为空") + private String billStatus; + + @Schema(description = "备注", example = "你猜") + private String remark; + + @Schema(description = "生成方式", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "生成方式不能为空") + private String createMode; + + @Schema(description = "分配人", example = "27530") + private String disOptid; + + @Schema(description = "分配时间", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "分配时间不能为空") + private LocalDateTime disTime; + + @Schema(description = "确认人", example = "30295") + private String confirmOptid; + + @Schema(description = "确认时间", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "确认时间不能为空") + private LocalDateTime confirmTime; + + @Schema(description = "部门ID", example = "8530") + private String sysdeptid; + + @Schema(description = "公司ID", example = "11731") + private String syscompanyid; + + @Schema(description = "是否已上传", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "是否已上传不能为空") + private String isUpload; + + @Schema(description = "回传人", example = "25284") + private String uploadOptid; + + @Schema(description = "回传时间") + private String uploadTime; + +} \ No newline at end of file diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdis/IostorinvDisController.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdis/IostorinvDisController.java new file mode 100644 index 00000000..8fef08bd --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdis/IostorinvDisController.java @@ -0,0 +1,104 @@ +package cn.code.nl.module.wms.controller.admin.iostorinvdis; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.code.nl.framework.common.pojo.PageParam; +import cn.code.nl.framework.common.pojo.PageResult; +import cn.code.nl.framework.common.pojo.CommonResult; +import cn.code.nl.framework.common.util.object.BeanUtils; +import static cn.code.nl.framework.common.pojo.CommonResult.success; + +import cn.code.nl.framework.excel.core.util.ExcelUtils; + +import cn.code.nl.framework.apilog.core.annotation.ApiAccessLog; +import static cn.code.nl.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.code.nl.module.wms.controller.admin.iostorinvdis.vo.*; +import cn.code.nl.module.wms.dal.dataobject.iostorinvdis.IostorinvDisDO; +import cn.code.nl.module.wms.service.iostorinvdis.IostorinvDisService; + +@Tag(name = "管理后台 - 出入库单分配") +@RestController +@RequestMapping("/wms/iostorinv-dis") +@Validated +public class IostorinvDisController { + + @Resource + private IostorinvDisService iostorinvDisService; + + @PostMapping("/create") + @Operation(summary = "创建出入库单分配") + @PreAuthorize("@ss.hasPermission('wms:iostorinv-dis:create')") + public CommonResult createIostorinvDis(@Valid @RequestBody IostorinvDisSaveReqVO createReqVO) { + return success(iostorinvDisService.createIostorinvDis(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新出入库单分配") + @PreAuthorize("@ss.hasPermission('wms:iostorinv-dis:update')") + public CommonResult updateIostorinvDis(@Valid @RequestBody IostorinvDisSaveReqVO updateReqVO) { + iostorinvDisService.updateIostorinvDis(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除出入库单分配") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('wms:iostorinv-dis:delete')") + public CommonResult deleteIostorinvDis(@RequestParam("id") String id) { + iostorinvDisService.deleteIostorinvDis(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除出入库单分配") + @PreAuthorize("@ss.hasPermission('wms:iostorinv-dis:delete')") + public CommonResult deleteIostorinvDisList(@RequestParam("ids") List ids) { + iostorinvDisService.deleteIostorinvDisListByIds(ids); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得出入库单分配") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('wms:iostorinv-dis:query')") + public CommonResult getIostorinvDis(@RequestParam("id") String id) { + IostorinvDisDO iostorinvDis = iostorinvDisService.getIostorinvDis(id); + return success(BeanUtils.toBean(iostorinvDis, IostorinvDisRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得出入库单分配分页") + @PreAuthorize("@ss.hasPermission('wms:iostorinv-dis:query')") + public CommonResult> getIostorinvDisPage(@Valid IostorinvDisPageReqVO pageReqVO) { + PageResult pageResult = iostorinvDisService.getIostorinvDisPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, IostorinvDisRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出出入库单分配 Excel") + @PreAuthorize("@ss.hasPermission('wms:iostorinv-dis:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportIostorinvDisExcel(@Valid IostorinvDisPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = iostorinvDisService.getIostorinvDisPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "出入库单分配.xls", "数据", IostorinvDisRespVO.class, + BeanUtils.toBean(list, IostorinvDisRespVO.class)); + } + +} \ No newline at end of file diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdis/vo/IostorinvDisPageReqVO.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdis/vo/IostorinvDisPageReqVO.java new file mode 100644 index 00000000..a8f1fac0 --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdis/vo/IostorinvDisPageReqVO.java @@ -0,0 +1,79 @@ +package cn.code.nl.module.wms.controller.admin.iostorinvdis.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.code.nl.framework.common.pojo.PageParam; +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 出入库单分配分页 Request VO") +@Data +public class IostorinvDisPageReqVO extends PageParam { + + @Schema(description = "出入单标识", example = "2717") + private String iostorinvId; + + @Schema(description = "出入单明细标识", example = "22004") + private String iostorinvdtlId; + + @Schema(description = "明细序号") + private String seqNo; + + @Schema(description = "库区标识", example = "529") + private String sectId; + + @Schema(description = "库区编码") + private String sectCode; + + @Schema(description = "库区名称", example = "赵六") + private String sectName; + + @Schema(description = "仓位标识", example = "9779") + private String structId; + + @Schema(description = "仓位编码") + private String structCode; + + @Schema(description = "仓位名称", example = "李四") + private String structName; + + @Schema(description = "物料标识", example = "28220") + private String materialId; + + @Schema(description = "物料编码") + private String materialCode; + + @Schema(description = "批次") + private String pcsn; + + @Schema(description = "执行状态", example = "1") + private String workStatus; + + @Schema(description = "任务标识", example = "29117") + private String taskId; + + @Schema(description = "存储载具编码") + private String storagevehicleCode; + + @Schema(description = "是否已下发") + private String isIssued; + + @Schema(description = "数量计量单位标识", example = "26595") + private String qtyUnitId; + + @Schema(description = "数量计量单位名称", example = "张三") + private String qtyUnitName; + + @Schema(description = "计划数量") + private BigDecimal planQty; + + @Schema(description = "实际数量") + private BigDecimal realQty; + + @Schema(description = "出入点位标识") + private String pointCode; + + @Schema(description = "出库类型:0自动搬运1手动搬运", example = "2") + private Boolean handType; + +} \ No newline at end of file diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdis/vo/IostorinvDisRespVO.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdis/vo/IostorinvDisRespVO.java new file mode 100644 index 00000000..9882c825 --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdis/vo/IostorinvDisRespVO.java @@ -0,0 +1,106 @@ +package cn.code.nl.module.wms.controller.admin.iostorinvdis.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.math.BigDecimal; +import cn.idev.excel.annotation.*; + +@Schema(description = "管理后台 - 出入库单分配 Response VO") +@Data +@ExcelIgnoreUnannotated +public class IostorinvDisRespVO { + + @Schema(description = "出入单分配标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "14409") + @ExcelProperty("出入单分配标识") + private String iostorinvdisId; + + @Schema(description = "出入单标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "2717") + @ExcelProperty("出入单标识") + private String iostorinvId; + + @Schema(description = "出入单明细标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "22004") + @ExcelProperty("出入单明细标识") + private String iostorinvdtlId; + + @Schema(description = "明细序号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("明细序号") + private String seqNo; + + @Schema(description = "库区标识", example = "529") + @ExcelProperty("库区标识") + private String sectId; + + @Schema(description = "库区编码") + @ExcelProperty("库区编码") + private String sectCode; + + @Schema(description = "库区名称", example = "赵六") + @ExcelProperty("库区名称") + private String sectName; + + @Schema(description = "仓位标识", example = "9779") + @ExcelProperty("仓位标识") + private String structId; + + @Schema(description = "仓位编码") + @ExcelProperty("仓位编码") + private String structCode; + + @Schema(description = "仓位名称", example = "李四") + @ExcelProperty("仓位名称") + private String structName; + + @Schema(description = "物料标识", example = "28220") + @ExcelProperty("物料标识") + private String materialId; + + @Schema(description = "物料编码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("物料编码") + private String materialCode; + + @Schema(description = "批次", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("批次") + private String pcsn; + + @Schema(description = "执行状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("执行状态") + private String workStatus; + + @Schema(description = "任务标识", example = "29117") + @ExcelProperty("任务标识") + private String taskId; + + @Schema(description = "存储载具编码") + @ExcelProperty("存储载具编码") + private String storagevehicleCode; + + @Schema(description = "是否已下发", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否已下发") + private String isIssued; + + @Schema(description = "数量计量单位标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "26595") + @ExcelProperty("数量计量单位标识") + private String qtyUnitId; + + @Schema(description = "数量计量单位名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @ExcelProperty("数量计量单位名称") + private String qtyUnitName; + + @Schema(description = "计划数量", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("计划数量") + private BigDecimal planQty; + + @Schema(description = "实际数量") + @ExcelProperty("实际数量") + private BigDecimal realQty; + + @Schema(description = "出入点位标识") + @ExcelProperty("出入点位标识") + private String pointCode; + + @Schema(description = "出库类型:0自动搬运1手动搬运", example = "2") + @ExcelProperty("出库类型:0自动搬运1手动搬运") + private Boolean handType; + +} \ No newline at end of file diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdis/vo/IostorinvDisSaveReqVO.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdis/vo/IostorinvDisSaveReqVO.java new file mode 100644 index 00000000..337eb6e9 --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdis/vo/IostorinvDisSaveReqVO.java @@ -0,0 +1,92 @@ +package cn.code.nl.module.wms.controller.admin.iostorinvdis.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 出入库单分配新增/修改 Request VO") +@Data +public class IostorinvDisSaveReqVO { + + @Schema(description = "出入单分配标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "14409") + private String iostorinvdisId; + + @Schema(description = "出入单标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "2717") + @NotEmpty(message = "出入单标识不能为空") + private String iostorinvId; + + @Schema(description = "出入单明细标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "22004") + @NotEmpty(message = "出入单明细标识不能为空") + private String iostorinvdtlId; + + @Schema(description = "明细序号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "明细序号不能为空") + private String seqNo; + + @Schema(description = "库区标识", example = "529") + private String sectId; + + @Schema(description = "库区编码") + private String sectCode; + + @Schema(description = "库区名称", example = "赵六") + private String sectName; + + @Schema(description = "仓位标识", example = "9779") + private String structId; + + @Schema(description = "仓位编码") + private String structCode; + + @Schema(description = "仓位名称", example = "李四") + private String structName; + + @Schema(description = "物料标识", example = "28220") + private String materialId; + + @Schema(description = "物料编码", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "物料编码不能为空") + private String materialCode; + + @Schema(description = "批次", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "批次不能为空") + private String pcsn; + + @Schema(description = "执行状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "执行状态不能为空") + private String workStatus; + + @Schema(description = "任务标识", example = "29117") + private String taskId; + + @Schema(description = "存储载具编码") + private String storagevehicleCode; + + @Schema(description = "是否已下发", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "是否已下发不能为空") + private String isIssued; + + @Schema(description = "数量计量单位标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "26595") + @NotEmpty(message = "数量计量单位标识不能为空") + private String qtyUnitId; + + @Schema(description = "数量计量单位名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @NotEmpty(message = "数量计量单位名称不能为空") + private String qtyUnitName; + + @Schema(description = "计划数量", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "计划数量不能为空") + private BigDecimal planQty; + + @Schema(description = "实际数量") + private BigDecimal realQty; + + @Schema(description = "出入点位标识") + private String pointCode; + + @Schema(description = "出库类型:0自动搬运1手动搬运", example = "2") + private Boolean handType; + +} \ No newline at end of file diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdtl/IostorinvDtlController.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdtl/IostorinvDtlController.java new file mode 100644 index 00000000..eef62d4b --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdtl/IostorinvDtlController.java @@ -0,0 +1,104 @@ +package cn.code.nl.module.wms.controller.admin.iostorinvdtl; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.code.nl.framework.common.pojo.PageParam; +import cn.code.nl.framework.common.pojo.PageResult; +import cn.code.nl.framework.common.pojo.CommonResult; +import cn.code.nl.framework.common.util.object.BeanUtils; +import static cn.code.nl.framework.common.pojo.CommonResult.success; + +import cn.code.nl.framework.excel.core.util.ExcelUtils; + +import cn.code.nl.framework.apilog.core.annotation.ApiAccessLog; +import static cn.code.nl.framework.apilog.core.enums.OperateTypeEnum.*; + +import cn.code.nl.module.wms.controller.admin.iostorinvdtl.vo.*; +import cn.code.nl.module.wms.dal.dataobject.iostorinvdtl.IostorinvDtlDO; +import cn.code.nl.module.wms.service.iostorinvdtl.IostorinvDtlService; + +@Tag(name = "管理后台 - 出入库单明细") +@RestController +@RequestMapping("/wms/iostorinv-dtl") +@Validated +public class IostorinvDtlController { + + @Resource + private IostorinvDtlService iostorinvDtlService; + + @PostMapping("/create") + @Operation(summary = "创建出入库单明细") + @PreAuthorize("@ss.hasPermission('wms:iostorinv-dtl:create')") + public CommonResult createIostorinvDtl(@Valid @RequestBody IostorinvDtlSaveReqVO createReqVO) { + return success(iostorinvDtlService.createIostorinvDtl(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新出入库单明细") + @PreAuthorize("@ss.hasPermission('wms:iostorinv-dtl:update')") + public CommonResult updateIostorinvDtl(@Valid @RequestBody IostorinvDtlSaveReqVO updateReqVO) { + iostorinvDtlService.updateIostorinvDtl(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除出入库单明细") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('wms:iostorinv-dtl:delete')") + public CommonResult deleteIostorinvDtl(@RequestParam("id") String id) { + iostorinvDtlService.deleteIostorinvDtl(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除出入库单明细") + @PreAuthorize("@ss.hasPermission('wms:iostorinv-dtl:delete')") + public CommonResult deleteIostorinvDtlList(@RequestParam("ids") List ids) { + iostorinvDtlService.deleteIostorinvDtlListByIds(ids); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得出入库单明细") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('wms:iostorinv-dtl:query')") + public CommonResult getIostorinvDtl(@RequestParam("id") String id) { + IostorinvDtlDO iostorinvDtl = iostorinvDtlService.getIostorinvDtl(id); + return success(BeanUtils.toBean(iostorinvDtl, IostorinvDtlRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得出入库单明细分页") + @PreAuthorize("@ss.hasPermission('wms:iostorinv-dtl:query')") + public CommonResult> getIostorinvDtlPage(@Valid IostorinvDtlPageReqVO pageReqVO) { + PageResult pageResult = iostorinvDtlService.getIostorinvDtlPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, IostorinvDtlRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出出入库单明细 Excel") + @PreAuthorize("@ss.hasPermission('wms:iostorinv-dtl:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportIostorinvDtlExcel(@Valid IostorinvDtlPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = iostorinvDtlService.getIostorinvDtlPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "出入库单明细.xls", "数据", IostorinvDtlRespVO.class, + BeanUtils.toBean(list, IostorinvDtlRespVO.class)); + } + +} \ No newline at end of file diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdtl/vo/IostorinvDtlPageReqVO.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdtl/vo/IostorinvDtlPageReqVO.java new file mode 100644 index 00000000..eba93573 --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdtl/vo/IostorinvDtlPageReqVO.java @@ -0,0 +1,70 @@ +package cn.code.nl.module.wms.controller.admin.iostorinvdtl.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.code.nl.framework.common.pojo.PageParam; +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 出入库单明细分页 Request VO") +@Data +public class IostorinvDtlPageReqVO extends PageParam { + + @Schema(description = "出入单标识", example = "29865") + private String iostorinvId; + + @Schema(description = "明细序号") + private Integer seqNo; + + @Schema(description = "批次") + private String pcsn; + + @Schema(description = "单据明细状态", example = "1") + private String billStatus; + + @Schema(description = "数量计量单位标识", example = "3271") + private String qtyUnitId; + + @Schema(description = "数量计量单位名称", example = "李四") + private String qtyUnitName; + + @Schema(description = "计划数量") + private BigDecimal planQty; + + @Schema(description = "实际数量") + private BigDecimal realQty; + + @Schema(description = "来源单据明细标识", example = "32560") + private String sourceBilldtlId; + + @Schema(description = "来源单据类型", example = "1") + private String sourceBillType; + + @Schema(description = "来源单编号") + private String sourceBillCode; + + @Schema(description = "来源单表名") + private String sourceBillTable; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "已分配数量") + private BigDecimal assignQty; + + @Schema(description = "未分配数量") + private BigDecimal unassignQty; + + @Schema(description = "物料编号") + private String materialCode; + + @Schema(description = "来源单指定上料口") + private String sourceLoadPort; + + @Schema(description = "单据回传策略配置类名") + private String callbackStrategy; + + @Schema(description = "物料标识", example = "2525") + private String materialId; + +} \ No newline at end of file diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdtl/vo/IostorinvDtlRespVO.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdtl/vo/IostorinvDtlRespVO.java new file mode 100644 index 00000000..aaf02c72 --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdtl/vo/IostorinvDtlRespVO.java @@ -0,0 +1,94 @@ +package cn.code.nl.module.wms.controller.admin.iostorinvdtl.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.math.BigDecimal; +import cn.idev.excel.annotation.*; + +@Schema(description = "管理后台 - 出入库单明细 Response VO") +@Data +@ExcelIgnoreUnannotated +public class IostorinvDtlRespVO { + + @Schema(description = "出入单明细标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "3443") + @ExcelProperty("出入单明细标识") + private String iostorinvdtlId; + + @Schema(description = "出入单标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "29865") + @ExcelProperty("出入单标识") + private String iostorinvId; + + @Schema(description = "明细序号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("明细序号") + private Integer seqNo; + + @Schema(description = "批次") + @ExcelProperty("批次") + private String pcsn; + + @Schema(description = "单据明细状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("单据明细状态") + private String billStatus; + + @Schema(description = "数量计量单位标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "3271") + @ExcelProperty("数量计量单位标识") + private String qtyUnitId; + + @Schema(description = "数量计量单位名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @ExcelProperty("数量计量单位名称") + private String qtyUnitName; + + @Schema(description = "计划数量", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("计划数量") + private BigDecimal planQty; + + @Schema(description = "实际数量") + @ExcelProperty("实际数量") + private BigDecimal realQty; + + @Schema(description = "来源单据明细标识", example = "32560") + @ExcelProperty("来源单据明细标识") + private String sourceBilldtlId; + + @Schema(description = "来源单据类型", example = "1") + @ExcelProperty("来源单据类型") + private String sourceBillType; + + @Schema(description = "来源单编号") + @ExcelProperty("来源单编号") + private String sourceBillCode; + + @Schema(description = "来源单表名") + @ExcelProperty("来源单表名") + private String sourceBillTable; + + @Schema(description = "备注", example = "随便") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "已分配数量") + @ExcelProperty("已分配数量") + private BigDecimal assignQty; + + @Schema(description = "未分配数量") + @ExcelProperty("未分配数量") + private BigDecimal unassignQty; + + @Schema(description = "物料编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("物料编号") + private String materialCode; + + @Schema(description = "来源单指定上料口") + @ExcelProperty("来源单指定上料口") + private String sourceLoadPort; + + @Schema(description = "单据回传策略配置类名") + @ExcelProperty("单据回传策略配置类名") + private String callbackStrategy; + + @Schema(description = "物料标识", example = "2525") + @ExcelProperty("物料标识") + private String materialId; + +} \ No newline at end of file diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdtl/vo/IostorinvDtlSaveReqVO.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdtl/vo/IostorinvDtlSaveReqVO.java new file mode 100644 index 00000000..73a7dc8e --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/controller/admin/iostorinvdtl/vo/IostorinvDtlSaveReqVO.java @@ -0,0 +1,80 @@ +package cn.code.nl.module.wms.controller.admin.iostorinvdtl.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 出入库单明细新增/修改 Request VO") +@Data +public class IostorinvDtlSaveReqVO { + + @Schema(description = "出入单明细标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "3443") + private String iostorinvdtlId; + + @Schema(description = "出入单标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "29865") + @NotEmpty(message = "出入单标识不能为空") + private String iostorinvId; + + @Schema(description = "明细序号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "明细序号不能为空") + private Integer seqNo; + + @Schema(description = "批次") + private String pcsn; + + @Schema(description = "单据明细状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotEmpty(message = "单据明细状态不能为空") + private String billStatus; + + @Schema(description = "数量计量单位标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "3271") + @NotEmpty(message = "数量计量单位标识不能为空") + private String qtyUnitId; + + @Schema(description = "数量计量单位名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") + @NotEmpty(message = "数量计量单位名称不能为空") + private String qtyUnitName; + + @Schema(description = "计划数量", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "计划数量不能为空") + private BigDecimal planQty; + + @Schema(description = "实际数量") + private BigDecimal realQty; + + @Schema(description = "来源单据明细标识", example = "32560") + private String sourceBilldtlId; + + @Schema(description = "来源单据类型", example = "1") + private String sourceBillType; + + @Schema(description = "来源单编号") + private String sourceBillCode; + + @Schema(description = "来源单表名") + private String sourceBillTable; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "已分配数量") + private BigDecimal assignQty; + + @Schema(description = "未分配数量") + private BigDecimal unassignQty; + + @Schema(description = "物料编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "物料编号不能为空") + private String materialCode; + + @Schema(description = "来源单指定上料口") + private String sourceLoadPort; + + @Schema(description = "单据回传策略配置类名") + private String callbackStrategy; + + @Schema(description = "物料标识", example = "2525") + private String materialId; + +} \ No newline at end of file diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/dal/dataobject/iostorinv/IostorInvDO.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/dal/dataobject/iostorinv/IostorInvDO.java new file mode 100644 index 00000000..6035f4d9 --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/dal/dataobject/iostorinv/IostorInvDO.java @@ -0,0 +1,137 @@ +package cn.code.nl.module.wms.dal.dataobject.iostorinv; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.math.BigDecimal; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.code.nl.framework.mybatis.core.dataobject.BaseDO; + +/** + * 出入库单主表 DO + * + * @author 诺力管理员 + */ +@TableName("wms_iostorinv") +@KeySequence("wms_iostorinv_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class IostorInvDO extends BaseDO { + + /** + * 出入单标识 + */ + @TableId(type = IdType.INPUT) + private String iostorinvId; + /** + * 单据编号 + */ + private String billCode; + /** + * 出入类型 + */ + private String ioType; + /** + * 单据类型 + */ + private String billType; + /** + * 业务日期 + */ + private LocalDateTime bizDate; + /** + * 仓库标识 + */ + private String storId; + /** + * 仓库编码 + */ + private String storCode; + /** + * 仓库名称 + */ + private String storName; + /** + * 来源方标识 + */ + private String sourceId; + /** + * 来源方名称 + */ + private String sourceName; + /** + * 来源方类型 + */ + private String sourceType; + /** + * 总数量 + */ + private BigDecimal totalQty; + /** + * 总重量 + */ + private BigDecimal totalWeight; + /** + * 明细数 + */ + private Integer detailCount; + /** + * 单据状态 + */ + private String billStatus; + /** + * 备注 + */ + private String remark; + /** + * 生成方式 + */ + private String createMode; + /** + * 分配人 + */ + private String disOptid; + /** + * 分配时间 + */ + private LocalDateTime disTime; + /** + * 确认人 + */ + private String confirmOptid; + /** + * 确认时间 + */ + private LocalDateTime confirmTime; + /** + * 部门ID + */ + private String sysdeptid; + /** + * 公司ID + */ + private String syscompanyid; + /** + * 是否已上传 + */ + private String isUpload; + /** + * 回传人 + */ + private String uploadOptid; + /** + * 回传时间 + */ + private String uploadTime; + + +} diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/dal/dataobject/iostorinvdis/IostorinvDisDO.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/dal/dataobject/iostorinvdis/IostorinvDisDO.java new file mode 100644 index 00000000..d6ba1660 --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/dal/dataobject/iostorinvdis/IostorinvDisDO.java @@ -0,0 +1,120 @@ +package cn.code.nl.module.wms.dal.dataobject.iostorinvdis; + +import lombok.*; +import java.util.*; +import java.math.BigDecimal; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.*; +import cn.code.nl.framework.mybatis.core.dataobject.BaseDO; + +/** + * 出入库单分配 DO + * + * @author 诺力管理员 + */ +@TableName("wms_iostorinvdis") +@KeySequence("wms_iostorinvdis_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class IostorinvDisDO extends BaseDO { + + /** + * 出入单分配标识 + */ + @TableId(type = IdType.INPUT) + private String iostorinvdisId; + /** + * 出入单标识 + */ + private String iostorinvId; + /** + * 出入单明细标识 + */ + private String iostorinvdtlId; + /** + * 明细序号 + */ + private String seqNo; + /** + * 库区标识 + */ + private String sectId; + /** + * 库区编码 + */ + private String sectCode; + /** + * 库区名称 + */ + private String sectName; + /** + * 仓位标识 + */ + private String structId; + /** + * 仓位编码 + */ + private String structCode; + /** + * 仓位名称 + */ + private String structName; + /** + * 物料标识 + */ + private String materialId; + /** + * 物料编码 + */ + private String materialCode; + /** + * 批次 + */ + private String pcsn; + /** + * 执行状态 + */ + private String workStatus; + /** + * 任务标识 + */ + private String taskId; + /** + * 存储载具编码 + */ + private String storagevehicleCode; + /** + * 是否已下发 + */ + private String isIssued; + /** + * 数量计量单位标识 + */ + private String qtyUnitId; + /** + * 数量计量单位名称 + */ + private String qtyUnitName; + /** + * 计划数量 + */ + private BigDecimal planQty; + /** + * 实际数量 + */ + private BigDecimal realQty; + /** + * 出入点位标识 + */ + private String pointCode; + /** + * 出库类型:0自动搬运1手动搬运 + */ + private Boolean handType; + + +} \ No newline at end of file diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/dal/dataobject/iostorinvdtl/IostorinvDtlDO.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/dal/dataobject/iostorinvdtl/IostorinvDtlDO.java new file mode 100644 index 00000000..75c119da --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/dal/dataobject/iostorinvdtl/IostorinvDtlDO.java @@ -0,0 +1,110 @@ +package cn.code.nl.module.wms.dal.dataobject.iostorinvdtl; + +import lombok.*; +import java.util.*; +import java.math.BigDecimal; +import java.math.BigDecimal; +import java.math.BigDecimal; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.*; +import cn.code.nl.framework.mybatis.core.dataobject.BaseDO; + +/** + * 出入库单明细 DO + * + * @author 诺力管理员 + */ +@TableName("wms_iostorinvdtl") +@KeySequence("wms_iostorinvdtl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class IostorinvDtlDO extends BaseDO { + + /** + * 出入单明细标识 + */ + @TableId(type = IdType.INPUT) + private String iostorinvdtlId; + /** + * 出入单标识 + */ + private String iostorinvId; + /** + * 明细序号 + */ + private Integer seqNo; + /** + * 批次 + */ + private String pcsn; + /** + * 单据明细状态 + */ + private String billStatus; + /** + * 数量计量单位标识 + */ + private String qtyUnitId; + /** + * 数量计量单位名称 + */ + private String qtyUnitName; + /** + * 计划数量 + */ + private BigDecimal planQty; + /** + * 实际数量 + */ + private BigDecimal realQty; + /** + * 来源单据明细标识 + */ + private String sourceBilldtlId; + /** + * 来源单据类型 + */ + private String sourceBillType; + /** + * 来源单编号 + */ + private String sourceBillCode; + /** + * 来源单表名 + */ + private String sourceBillTable; + /** + * 备注 + */ + private String remark; + /** + * 已分配数量 + */ + private BigDecimal assignQty; + /** + * 未分配数量 + */ + private BigDecimal unassignQty; + /** + * 物料编号 + */ + private String materialCode; + /** + * 来源单指定上料口 + */ + private String sourceLoadPort; + /** + * 单据回传策略配置类名 + */ + private String callbackStrategy; + /** + * 物料标识 + */ + private String materialId; + + +} \ No newline at end of file diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/dal/mysql/iostorinv/IostorInvMapper.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/dal/mysql/iostorinv/IostorInvMapper.java new file mode 100644 index 00000000..cc9d17ac --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/dal/mysql/iostorinv/IostorInvMapper.java @@ -0,0 +1,47 @@ +package cn.code.nl.module.wms.dal.mysql.iostorinv; + +import java.util.*; + +import cn.code.nl.framework.common.pojo.PageResult; +import cn.code.nl.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.code.nl.framework.mybatis.core.mapper.BaseMapperX; +import cn.code.nl.module.wms.dal.dataobject.iostorinv.IostorInvDO; +import org.apache.ibatis.annotations.Mapper; +import cn.code.nl.module.wms.controller.admin.iostorinv.vo.*; + +/** + * 出入库单主表 Mapper + * + * @author 诺力管理员 + */ +@Mapper +public interface IostorInvMapper extends BaseMapperX { + + default PageResult selectPage(IostorInvPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(IostorInvDO::getBillCode, reqVO.getBillCode()) + .eqIfPresent(IostorInvDO::getBillType, reqVO.getBillType()) + .betweenIfPresent(IostorInvDO::getBizDate, reqVO.getBizDate()) + .eqIfPresent(IostorInvDO::getStorId, reqVO.getStorId()) + .likeIfPresent(IostorInvDO::getSourceName, reqVO.getSourceName()) + .eqIfPresent(IostorInvDO::getSourceType, reqVO.getSourceType()) + .eqIfPresent(IostorInvDO::getTotalQty, reqVO.getTotalQty()) + .eqIfPresent(IostorInvDO::getTotalWeight, reqVO.getTotalWeight()) + .eqIfPresent(IostorInvDO::getDetailCount, reqVO.getDetailCount()) + .eqIfPresent(IostorInvDO::getBillStatus, reqVO.getBillStatus()) + .eqIfPresent(IostorInvDO::getRemark, reqVO.getRemark()) + .eqIfPresent(IostorInvDO::getCreateMode, reqVO.getCreateMode()) + .betweenIfPresent(IostorInvDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(IostorInvDO::getDisOptid, reqVO.getDisOptid()) + .betweenIfPresent(IostorInvDO::getDisTime, reqVO.getDisTime()) + .eqIfPresent(IostorInvDO::getConfirmOptid, reqVO.getConfirmOptid()) + .betweenIfPresent(IostorInvDO::getConfirmTime, reqVO.getConfirmTime()) + .eqIfPresent(IostorInvDO::getSysdeptid, reqVO.getSysdeptid()) + .eqIfPresent(IostorInvDO::getSyscompanyid, reqVO.getSyscompanyid()) + .eqIfPresent(IostorInvDO::getIsUpload, reqVO.getIsUpload()) + .eqIfPresent(IostorInvDO::getUploadOptid, reqVO.getUploadOptid()) + .betweenIfPresent(IostorInvDO::getUploadTime, reqVO.getUploadTime()) + .orderByDesc(IostorInvDO::getIostorinvId)); + } + +} \ No newline at end of file diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/dal/mysql/iostorinvdis/IostorinvDisMapper.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/dal/mysql/iostorinvdis/IostorinvDisMapper.java new file mode 100644 index 00000000..c33e6c85 --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/dal/mysql/iostorinvdis/IostorinvDisMapper.java @@ -0,0 +1,47 @@ +package cn.code.nl.module.wms.dal.mysql.iostorinvdis; + +import java.util.*; + +import cn.code.nl.framework.common.pojo.PageResult; +import cn.code.nl.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.code.nl.framework.mybatis.core.mapper.BaseMapperX; +import cn.code.nl.module.wms.dal.dataobject.iostorinvdis.IostorinvDisDO; +import org.apache.ibatis.annotations.Mapper; +import cn.code.nl.module.wms.controller.admin.iostorinvdis.vo.*; + +/** + * 出入库单分配 Mapper + * + * @author 诺力管理员 + */ +@Mapper +public interface IostorinvDisMapper extends BaseMapperX { + + default PageResult selectPage(IostorinvDisPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(IostorinvDisDO::getIostorinvId, reqVO.getIostorinvId()) + .eqIfPresent(IostorinvDisDO::getIostorinvdtlId, reqVO.getIostorinvdtlId()) + .eqIfPresent(IostorinvDisDO::getSeqNo, reqVO.getSeqNo()) + .eqIfPresent(IostorinvDisDO::getSectId, reqVO.getSectId()) + .eqIfPresent(IostorinvDisDO::getSectCode, reqVO.getSectCode()) + .likeIfPresent(IostorinvDisDO::getSectName, reqVO.getSectName()) + .eqIfPresent(IostorinvDisDO::getStructId, reqVO.getStructId()) + .eqIfPresent(IostorinvDisDO::getStructCode, reqVO.getStructCode()) + .likeIfPresent(IostorinvDisDO::getStructName, reqVO.getStructName()) + .eqIfPresent(IostorinvDisDO::getMaterialId, reqVO.getMaterialId()) + .eqIfPresent(IostorinvDisDO::getMaterialCode, reqVO.getMaterialCode()) + .eqIfPresent(IostorinvDisDO::getPcsn, reqVO.getPcsn()) + .eqIfPresent(IostorinvDisDO::getWorkStatus, reqVO.getWorkStatus()) + .eqIfPresent(IostorinvDisDO::getTaskId, reqVO.getTaskId()) + .eqIfPresent(IostorinvDisDO::getStoragevehicleCode, reqVO.getStoragevehicleCode()) + .eqIfPresent(IostorinvDisDO::getIsIssued, reqVO.getIsIssued()) + .eqIfPresent(IostorinvDisDO::getQtyUnitId, reqVO.getQtyUnitId()) + .likeIfPresent(IostorinvDisDO::getQtyUnitName, reqVO.getQtyUnitName()) + .eqIfPresent(IostorinvDisDO::getPlanQty, reqVO.getPlanQty()) + .eqIfPresent(IostorinvDisDO::getRealQty, reqVO.getRealQty()) + .eqIfPresent(IostorinvDisDO::getPointCode, reqVO.getPointCode()) + .eqIfPresent(IostorinvDisDO::getHandType, reqVO.getHandType()) + .orderByDesc(IostorinvDisDO::getIostorinvdisId)); + } + +} \ No newline at end of file diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/dal/mysql/iostorinvdtl/IostorinvDtlMapper.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/dal/mysql/iostorinvdtl/IostorinvDtlMapper.java new file mode 100644 index 00000000..df00b8ea --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/dal/mysql/iostorinvdtl/IostorinvDtlMapper.java @@ -0,0 +1,44 @@ +package cn.code.nl.module.wms.dal.mysql.iostorinvdtl; + +import java.util.*; + +import cn.code.nl.framework.common.pojo.PageResult; +import cn.code.nl.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.code.nl.framework.mybatis.core.mapper.BaseMapperX; +import cn.code.nl.module.wms.dal.dataobject.iostorinvdtl.IostorinvDtlDO; +import org.apache.ibatis.annotations.Mapper; +import cn.code.nl.module.wms.controller.admin.iostorinvdtl.vo.*; + +/** + * 出入库单明细 Mapper + * + * @author 诺力管理员 + */ +@Mapper +public interface IostorinvDtlMapper extends BaseMapperX { + + default PageResult selectPage(IostorinvDtlPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(IostorinvDtlDO::getIostorinvId, reqVO.getIostorinvId()) + .eqIfPresent(IostorinvDtlDO::getSeqNo, reqVO.getSeqNo()) + .eqIfPresent(IostorinvDtlDO::getPcsn, reqVO.getPcsn()) + .eqIfPresent(IostorinvDtlDO::getBillStatus, reqVO.getBillStatus()) + .eqIfPresent(IostorinvDtlDO::getQtyUnitId, reqVO.getQtyUnitId()) + .likeIfPresent(IostorinvDtlDO::getQtyUnitName, reqVO.getQtyUnitName()) + .eqIfPresent(IostorinvDtlDO::getPlanQty, reqVO.getPlanQty()) + .eqIfPresent(IostorinvDtlDO::getRealQty, reqVO.getRealQty()) + .eqIfPresent(IostorinvDtlDO::getSourceBilldtlId, reqVO.getSourceBilldtlId()) + .eqIfPresent(IostorinvDtlDO::getSourceBillType, reqVO.getSourceBillType()) + .eqIfPresent(IostorinvDtlDO::getSourceBillCode, reqVO.getSourceBillCode()) + .eqIfPresent(IostorinvDtlDO::getSourceBillTable, reqVO.getSourceBillTable()) + .eqIfPresent(IostorinvDtlDO::getRemark, reqVO.getRemark()) + .eqIfPresent(IostorinvDtlDO::getAssignQty, reqVO.getAssignQty()) + .eqIfPresent(IostorinvDtlDO::getUnassignQty, reqVO.getUnassignQty()) + .eqIfPresent(IostorinvDtlDO::getMaterialCode, reqVO.getMaterialCode()) + .eqIfPresent(IostorinvDtlDO::getSourceLoadPort, reqVO.getSourceLoadPort()) + .eqIfPresent(IostorinvDtlDO::getCallbackStrategy, reqVO.getCallbackStrategy()) + .eqIfPresent(IostorinvDtlDO::getMaterialId, reqVO.getMaterialId()) + .orderByDesc(IostorinvDtlDO::getIostorinvdtlId)); + } + +} \ No newline at end of file diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/iostorinv/IostorInvService.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/iostorinv/IostorInvService.java new file mode 100644 index 00000000..42203b6d --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/iostorinv/IostorInvService.java @@ -0,0 +1,62 @@ +package cn.code.nl.module.wms.service.iostorinv; + +import java.util.*; +import jakarta.validation.*; +import cn.code.nl.module.wms.controller.admin.iostorinv.vo.*; +import cn.code.nl.module.wms.dal.dataobject.iostorinv.IostorInvDO; +import cn.code.nl.framework.common.pojo.PageResult; +import cn.code.nl.framework.common.pojo.PageParam; + +/** + * 出入库单主表 Service 接口 + * + * @author 诺力管理员 + */ +public interface IostorInvService { + + /** + * 创建出入库单主表 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + String createIostorInv(@Valid IostorInvSaveReqVO createReqVO); + + /** + * 更新出入库单主表 + * + * @param updateReqVO 更新信息 + */ + void updateIostorInv(@Valid IostorInvSaveReqVO updateReqVO); + + /** + * 删除出入库单主表 + * + * @param id 编号 + */ + void deleteIostorInv(String id); + + /** + * 批量删除出入库单主表 + * + * @param ids 编号 + */ + void deleteIostorInvListByIds(List ids); + + /** + * 获得出入库单主表 + * + * @param id 编号 + * @return 出入库单主表 + */ + IostorInvDO getIostorInv(String id); + + /** + * 获得出入库单主表分页 + * + * @param pageReqVO 分页查询 + * @return 出入库单主表分页 + */ + PageResult getIostorInvPage(IostorInvPageReqVO pageReqVO); + +} diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/iostorinv/IostorInvServiceImpl.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/iostorinv/IostorInvServiceImpl.java new file mode 100644 index 00000000..f6d75cb2 --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/iostorinv/IostorInvServiceImpl.java @@ -0,0 +1,85 @@ +package cn.code.nl.module.wms.service.iostorinv; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.code.nl.module.wms.controller.admin.iostorinv.vo.*; +import cn.code.nl.module.wms.dal.dataobject.iostorinv.IostorInvDO; +import cn.code.nl.framework.common.pojo.PageResult; +import cn.code.nl.framework.common.pojo.PageParam; +import cn.code.nl.framework.common.util.object.BeanUtils; + +import cn.code.nl.module.wms.dal.mysql.iostorinv.IostorInvMapper; + +import static cn.code.nl.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.code.nl.framework.common.util.collection.CollectionUtils.convertList; +import static cn.code.nl.framework.common.util.collection.CollectionUtils.diffList; +import static cn.code.nl.module.wms.enums.ErrorCodeConstants.*; + +/** + * 出入库单主表 Service 实现类 + * + * @author 诺力管理员 + */ +@Service +@Validated +public class IostorInvServiceImpl implements IostorInvService { + + @Resource + private IostorInvMapper iostorInvMapper; + + @Override + public String createIostorInv(IostorInvSaveReqVO createReqVO) { + // 插入 + IostorInvDO iostorInv = BeanUtils.toBean(createReqVO, IostorInvDO.class); + iostorInvMapper.insert(iostorInv); + + // 返回 + return iostorInv.getIostorinvId(); + } + + @Override + public void updateIostorInv(IostorInvSaveReqVO updateReqVO) { + // 校验存在 + validateIostorInvExists(updateReqVO.getIostorinvId()); + // 更新 + IostorInvDO updateObj = BeanUtils.toBean(updateReqVO, IostorInvDO.class); + iostorInvMapper.updateById(updateObj); + } + + @Override + public void deleteIostorInv(String id) { + // 校验存在 + validateIostorInvExists(id); + // 删除 + iostorInvMapper.deleteById(id); + } + + @Override + public void deleteIostorInvListByIds(List ids) { + // 删除 + iostorInvMapper.deleteByIds(ids); + } + + + private void validateIostorInvExists(String id) { + if (iostorInvMapper.selectById(id) == null) { + throw exception(IOSTOR_INV_NOT_EXISTS); + } + } + + @Override + public IostorInvDO getIostorInv(String id) { + return iostorInvMapper.selectById(id); + } + + @Override + public PageResult getIostorInvPage(IostorInvPageReqVO pageReqVO) { + return iostorInvMapper.selectPage(pageReqVO); + } + +} diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/iostorinvdis/IostorinvDisService.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/iostorinvdis/IostorinvDisService.java new file mode 100644 index 00000000..d6c135c1 --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/iostorinvdis/IostorinvDisService.java @@ -0,0 +1,62 @@ +package cn.code.nl.module.wms.service.iostorinvdis; + +import java.util.*; +import jakarta.validation.*; +import cn.code.nl.module.wms.controller.admin.iostorinvdis.vo.*; +import cn.code.nl.module.wms.dal.dataobject.iostorinvdis.IostorinvDisDO; +import cn.code.nl.framework.common.pojo.PageResult; +import cn.code.nl.framework.common.pojo.PageParam; + +/** + * 出入库单分配 Service 接口 + * + * @author 诺力管理员 + */ +public interface IostorinvDisService { + + /** + * 创建出入库单分配 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + String createIostorinvDis(@Valid IostorinvDisSaveReqVO createReqVO); + + /** + * 更新出入库单分配 + * + * @param updateReqVO 更新信息 + */ + void updateIostorinvDis(@Valid IostorinvDisSaveReqVO updateReqVO); + + /** + * 删除出入库单分配 + * + * @param id 编号 + */ + void deleteIostorinvDis(String id); + + /** + * 批量删除出入库单分配 + * + * @param ids 编号 + */ + void deleteIostorinvDisListByIds(List ids); + + /** + * 获得出入库单分配 + * + * @param id 编号 + * @return 出入库单分配 + */ + IostorinvDisDO getIostorinvDis(String id); + + /** + * 获得出入库单分配分页 + * + * @param pageReqVO 分页查询 + * @return 出入库单分配分页 + */ + PageResult getIostorinvDisPage(IostorinvDisPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/iostorinvdis/IostorinvDisServiceImpl.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/iostorinvdis/IostorinvDisServiceImpl.java new file mode 100644 index 00000000..272efbc3 --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/iostorinvdis/IostorinvDisServiceImpl.java @@ -0,0 +1,85 @@ +package cn.code.nl.module.wms.service.iostorinvdis; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.code.nl.module.wms.controller.admin.iostorinvdis.vo.*; +import cn.code.nl.module.wms.dal.dataobject.iostorinvdis.IostorinvDisDO; +import cn.code.nl.framework.common.pojo.PageResult; +import cn.code.nl.framework.common.pojo.PageParam; +import cn.code.nl.framework.common.util.object.BeanUtils; + +import cn.code.nl.module.wms.dal.mysql.iostorinvdis.IostorinvDisMapper; + +import static cn.code.nl.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.code.nl.framework.common.util.collection.CollectionUtils.convertList; +import static cn.code.nl.framework.common.util.collection.CollectionUtils.diffList; +import static cn.code.nl.module.wms.enums.ErrorCodeConstants.*; + +/** + * 出入库单分配 Service 实现类 + * + * @author 诺力管理员 + */ +@Service +@Validated +public class IostorinvDisServiceImpl implements IostorinvDisService { + + @Resource + private IostorinvDisMapper iostorinvDisMapper; + + @Override + public String createIostorinvDis(IostorinvDisSaveReqVO createReqVO) { + // 插入 + IostorinvDisDO iostorinvDis = BeanUtils.toBean(createReqVO, IostorinvDisDO.class); + iostorinvDisMapper.insert(iostorinvDis); + + // 返回 + return iostorinvDis.getIostorinvdisId(); + } + + @Override + public void updateIostorinvDis(IostorinvDisSaveReqVO updateReqVO) { + // 校验存在 + validateIostorinvDisExists(updateReqVO.getIostorinvdisId()); + // 更新 + IostorinvDisDO updateObj = BeanUtils.toBean(updateReqVO, IostorinvDisDO.class); + iostorinvDisMapper.updateById(updateObj); + } + + @Override + public void deleteIostorinvDis(String id) { + // 校验存在 + validateIostorinvDisExists(id); + // 删除 + iostorinvDisMapper.deleteById(id); + } + + @Override + public void deleteIostorinvDisListByIds(List ids) { + // 删除 + iostorinvDisMapper.deleteByIds(ids); + } + + + private void validateIostorinvDisExists(String id) { + if (iostorinvDisMapper.selectById(id) == null) { + throw exception(IOSTORINV_DIS_NOT_EXISTS); + } + } + + @Override + public IostorinvDisDO getIostorinvDis(String id) { + return iostorinvDisMapper.selectById(id); + } + + @Override + public PageResult getIostorinvDisPage(IostorinvDisPageReqVO pageReqVO) { + return iostorinvDisMapper.selectPage(pageReqVO); + } + +} diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/iostorinvdtl/IostorinvDtlService.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/iostorinvdtl/IostorinvDtlService.java new file mode 100644 index 00000000..e109f9ce --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/iostorinvdtl/IostorinvDtlService.java @@ -0,0 +1,62 @@ +package cn.code.nl.module.wms.service.iostorinvdtl; + +import java.util.*; +import jakarta.validation.*; +import cn.code.nl.module.wms.controller.admin.iostorinvdtl.vo.*; +import cn.code.nl.module.wms.dal.dataobject.iostorinvdtl.IostorinvDtlDO; +import cn.code.nl.framework.common.pojo.PageResult; +import cn.code.nl.framework.common.pojo.PageParam; + +/** + * 出入库单明细 Service 接口 + * + * @author 诺力管理员 + */ +public interface IostorinvDtlService { + + /** + * 创建出入库单明细 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + String createIostorinvDtl(@Valid IostorinvDtlSaveReqVO createReqVO); + + /** + * 更新出入库单明细 + * + * @param updateReqVO 更新信息 + */ + void updateIostorinvDtl(@Valid IostorinvDtlSaveReqVO updateReqVO); + + /** + * 删除出入库单明细 + * + * @param id 编号 + */ + void deleteIostorinvDtl(String id); + + /** + * 批量删除出入库单明细 + * + * @param ids 编号 + */ + void deleteIostorinvDtlListByIds(List ids); + + /** + * 获得出入库单明细 + * + * @param id 编号 + * @return 出入库单明细 + */ + IostorinvDtlDO getIostorinvDtl(String id); + + /** + * 获得出入库单明细分页 + * + * @param pageReqVO 分页查询 + * @return 出入库单明细分页 + */ + PageResult getIostorinvDtlPage(IostorinvDtlPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/iostorinvdtl/IostorinvDtlServiceImpl.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/iostorinvdtl/IostorinvDtlServiceImpl.java new file mode 100644 index 00000000..6961e5f6 --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/iostorinvdtl/IostorinvDtlServiceImpl.java @@ -0,0 +1,85 @@ +package cn.code.nl.module.wms.service.iostorinvdtl; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import cn.code.nl.module.wms.controller.admin.iostorinvdtl.vo.*; +import cn.code.nl.module.wms.dal.dataobject.iostorinvdtl.IostorinvDtlDO; +import cn.code.nl.framework.common.pojo.PageResult; +import cn.code.nl.framework.common.pojo.PageParam; +import cn.code.nl.framework.common.util.object.BeanUtils; + +import cn.code.nl.module.wms.dal.mysql.iostorinvdtl.IostorinvDtlMapper; + +import static cn.code.nl.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.code.nl.framework.common.util.collection.CollectionUtils.convertList; +import static cn.code.nl.framework.common.util.collection.CollectionUtils.diffList; +import static cn.code.nl.module.wms.enums.ErrorCodeConstants.*; + +/** + * 出入库单明细 Service 实现类 + * + * @author 诺力管理员 + */ +@Service +@Validated +public class IostorinvDtlServiceImpl implements IostorinvDtlService { + + @Resource + private IostorinvDtlMapper iostorinvDtlMapper; + + @Override + public String createIostorinvDtl(IostorinvDtlSaveReqVO createReqVO) { + // 插入 + IostorinvDtlDO iostorinvDtl = BeanUtils.toBean(createReqVO, IostorinvDtlDO.class); + iostorinvDtlMapper.insert(iostorinvDtl); + + // 返回 + return iostorinvDtl.getIostorinvdtlId(); + } + + @Override + public void updateIostorinvDtl(IostorinvDtlSaveReqVO updateReqVO) { + // 校验存在 + validateIostorinvDtlExists(updateReqVO.getIostorinvdtlId()); + // 更新 + IostorinvDtlDO updateObj = BeanUtils.toBean(updateReqVO, IostorinvDtlDO.class); + iostorinvDtlMapper.updateById(updateObj); + } + + @Override + public void deleteIostorinvDtl(String id) { + // 校验存在 + validateIostorinvDtlExists(id); + // 删除 + iostorinvDtlMapper.deleteById(id); + } + + @Override + public void deleteIostorinvDtlListByIds(List ids) { + // 删除 + iostorinvDtlMapper.deleteByIds(ids); + } + + + private void validateIostorinvDtlExists(String id) { + if (iostorinvDtlMapper.selectById(id) == null) { + throw exception(IOSTORINV_DTL_NOT_EXISTS); + } + } + + @Override + public IostorinvDtlDO getIostorinvDtl(String id) { + return iostorinvDtlMapper.selectById(id); + } + + @Override + public PageResult getIostorinvDtlPage(IostorinvDtlPageReqVO pageReqVO) { + return iostorinvDtlMapper.selectPage(pageReqVO); + } + +} diff --git a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/structAttr/StrucAttrServiceImpl.java b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/structAttr/StrucAttrServiceImpl.java index a24a3bae..5e1e1c2d 100644 --- a/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/structAttr/StrucAttrServiceImpl.java +++ b/nl-module-wms/nl-module-wms-server/src/main/java/cn/code/nl/module/wms/service/structAttr/StrucAttrServiceImpl.java @@ -1,24 +1,19 @@ package cn.code.nl.module.wms.service.structAttr; -import cn.hutool.core.collection.CollUtil; -import org.springframework.stereotype.Service; -import jakarta.annotation.Resource; -import org.springframework.validation.annotation.Validated; -import org.springframework.transaction.annotation.Transactional; - -import java.util.*; -import cn.code.nl.module.wms.controller.admin.structAttr.vo.*; -import cn.code.nl.module.wms.dal.dataobject.structAttr.StrucAttrDO; import cn.code.nl.framework.common.pojo.PageResult; -import cn.code.nl.framework.common.pojo.PageParam; import cn.code.nl.framework.common.util.object.BeanUtils; - +import cn.code.nl.module.wms.controller.admin.structAttr.vo.StrucAttrPageReqVO; +import cn.code.nl.module.wms.controller.admin.structAttr.vo.StrucAttrSaveReqVO; +import cn.code.nl.module.wms.dal.dataobject.structAttr.StrucAttrDO; import cn.code.nl.module.wms.dal.mysql.structAttr.StrucAttrMapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import java.util.List; import static cn.code.nl.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.code.nl.framework.common.util.collection.CollectionUtils.convertList; -import static cn.code.nl.framework.common.util.collection.CollectionUtils.diffList; -import static cn.code.nl.module.wms.enums.ErrorCodeConstants.*; +import static cn.code.nl.module.wms.enums.ErrorCodeConstants.STRUC_ATTR_NOT_EXISTS; /** * 仓位属性 Service 实现类 diff --git a/nl-module-wms/nl-module-wms-server/src/main/resources/application-dev.yaml b/nl-module-wms/nl-module-wms-server/src/main/resources/application-dev.yaml index 6de07bb1..fa721e92 100644 --- a/nl-module-wms/nl-module-wms-server/src/main/resources/application-dev.yaml +++ b/nl-module-wms/nl-module-wms-server/src/main/resources/application-dev.yaml @@ -57,14 +57,14 @@ spring: primary: master datasource: master: - url: jdbc:mysql://192.168.81.193:3307/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 + url: jdbc:mysql://127.0.0.1:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 lazy: true # 开启懒加载,保证启动速度 - url: jdbc:mysql://192.168.81.193:3307/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 + url: jdbc:mysql://127.0.0.1:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: @@ -75,6 +75,10 @@ spring: # password: 123456 # 密码,建议生产环境开启 --- #################### MQ 消息队列相关配置 #################### + +rocketmq: + name-server: 127.0.0.1:9876 # RocketMQ Namesrv + spring: # RabbitMQ 配置项,对应 RabbitProperties 配置类 rabbitmq: @@ -135,4 +139,6 @@ logging: # 芋道配置项,设置当前项目所有自定义的配置 nl: - demo: false # 开启演示模式 \ No newline at end of file + demo: false # 开启演示模式 + websocket: + enable: false # 本地开发禁用 WebSocket(避免 RocketMQ consumer 连不上报错) \ No newline at end of file diff --git a/nl-module-wms/nl-module-wms-server/src/main/resources/application-local.yaml b/nl-module-wms/nl-module-wms-server/src/main/resources/application-local.yaml index aa7ecc1d..b7116579 100644 --- a/nl-module-wms/nl-module-wms-server/src/main/resources/application-local.yaml +++ b/nl-module-wms/nl-module-wms-server/src/main/resources/application-local.yaml @@ -64,7 +64,7 @@ spring: lazy: true # 开启懒加载,保证启动速度 url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: diff --git a/nl-module-wms/nl-module-wms-server/src/main/resources/application-test.yaml b/nl-module-wms/nl-module-wms-server/src/main/resources/application-test.yaml index 7c03eb65..a0cc978f 100644 --- a/nl-module-wms/nl-module-wms-server/src/main/resources/application-test.yaml +++ b/nl-module-wms/nl-module-wms-server/src/main/resources/application-test.yaml @@ -59,12 +59,12 @@ spring: master: url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 lazy: true # 开启懒加载,保证启动速度 url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: diff --git a/nl-module-wms/nl-module-wms-server/src/main/resources/mapper/iostorinv/IostorInvMapper.xml b/nl-module-wms/nl-module-wms-server/src/main/resources/mapper/iostorinv/IostorInvMapper.xml new file mode 100644 index 00000000..1446a25f --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/resources/mapper/iostorinv/IostorInvMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/nl-module-wms/nl-module-wms-server/src/main/resources/mapper/iostorinvdis/IostorinvDisMapper.xml b/nl-module-wms/nl-module-wms-server/src/main/resources/mapper/iostorinvdis/IostorinvDisMapper.xml new file mode 100644 index 00000000..9d8c0e56 --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/resources/mapper/iostorinvdis/IostorinvDisMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/nl-module-wms/nl-module-wms-server/src/main/resources/mapper/iostorinvdtl/IostorinvDtlMapper.xml b/nl-module-wms/nl-module-wms-server/src/main/resources/mapper/iostorinvdtl/IostorinvDtlMapper.xml new file mode 100644 index 00000000..9e1b610f --- /dev/null +++ b/nl-module-wms/nl-module-wms-server/src/main/resources/mapper/iostorinvdtl/IostorinvDtlMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/nl-server/src/main/resources/application-dev.yaml b/nl-server/src/main/resources/application-dev.yaml index 76d75842..d852c77d 100644 --- a/nl-server/src/main/resources/application-dev.yaml +++ b/nl-server/src/main/resources/application-dev.yaml @@ -47,14 +47,14 @@ spring: primary: master datasource: master: - url: jdbc:mysql://192.168.81.193:3307/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 + url: jdbc:mysql://127.0.0.1:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 lazy: true # 开启懒加载,保证启动速度 - url: jdbc:mysql://192.168.81.193:3307/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 + url: jdbc:mysql://127.0.0.1:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: diff --git a/nl-server/src/main/resources/application-local.yaml b/nl-server/src/main/resources/application-local.yaml index 13148cc8..452a45ed 100644 --- a/nl-server/src/main/resources/application-local.yaml +++ b/nl-server/src/main/resources/application-local.yaml @@ -56,7 +56,7 @@ spring: # url: jdbc:kingbase8://127.0.0.1:54321/test # 人大金仓 KingbaseES 连接的示例 # url: jdbc:postgresql://127.0.0.1:5432/postgres # OpenGauss 连接的示例 username: root - password: root123 + password: root # username: sa # SQL Server 连接的示例 # password: Nl@2024 # SQL Server 连接的示例 # username: SYSDBA # DM 连接的示例 @@ -69,7 +69,7 @@ spring: lazy: true # 开启懒加载,保证启动速度 url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true username: root - password: root123 + password: root # tdengine: # IoT 数据库(需要 IoT 物联网再开启噢!) # url: jdbc:TAOS-WS://127.0.0.1:6041/ruoyi_vue_pro?enableAutoReconnect=true # 参见:https://t.zsxq.com/qaX9c,开启 TDengine WebSocket 自动重连 # driver-class-name: com.taosdata.jdbc.ws.WebSocketDriver diff --git a/nl-server/src/main/resources/application-test.yaml b/nl-server/src/main/resources/application-test.yaml index 33f9f080..67f2329e 100644 --- a/nl-server/src/main/resources/application-test.yaml +++ b/nl-server/src/main/resources/application-test.yaml @@ -49,12 +49,12 @@ spring: master: url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 lazy: true # 开启懒加载,保证启动速度 url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例 username: root - password: root123 + password: root # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 data: diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/api/wms/iostorinv/index.ts b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/api/wms/iostorinv/index.ts new file mode 100644 index 00000000..6afad210 --- /dev/null +++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/api/wms/iostorinv/index.ts @@ -0,0 +1,80 @@ +import type { PageParam, PageResult } from '@vben/request'; +import type { Dayjs } from 'dayjs'; + +import { requestClient } from '#/api/request'; + +export namespace WmsIostorInvApi { + /** 出入库单主表信息 */ + export interface IostorInv { + iostorinvId: string; // 出入单标识 + billCode?: string; // 单据编号 + ioType?: string; // 出入类型 + billType?: string; // 单据类型 + bizDate?: string | Dayjs; // 业务日期 + storId: string; // 仓库标识 + storCode: string; // 仓库编码 + storName: string; // 仓库名称 + sourceId: string; // 来源方标识 + sourceName: string; // 来源方名称 + sourceType: string; // 来源方类型 + totalQty?: number; // 总数量 + totalWeight: number; // 总重量 + detailCount?: number; // 明细数 + billStatus?: string; // 单据状态 + remark: string; // 备注 + createMode?: string; // 生成方式 + disOptid: string; // 分配人 + disTime?: string | Dayjs; // 分配时间 + confirmOptid: string; // 确认人 + confirmTime?: string | Dayjs; // 确认时间 + sysdeptid: string; // 部门ID + syscompanyid: string; // 公司ID + isUpload?: string; // 是否已上传 + uploadOptid: string; // 回传人 + uploadTime: string; // 回传时间 + } +} + +/** 查询出入库单主表分页 */ +export function getIostorInvPage(params: PageParam) { + return requestClient.get>( + '/wms/iostor-inv/page', + { params }, + ); +} + +/** 查询出入库单主表详情 */ +export function getIostorInv(id: number) { + return requestClient.get( + `/wms/iostor-inv/get?id=${id}`, + ); +} + +/** 新增出入库单主表 */ +export function createIostorInv(data: WmsIostorInvApi.IostorInv) { + return requestClient.post('/wms/iostor-inv/create', data); +} + +/** 修改出入库单主表 */ +export function updateIostorInv(data: WmsIostorInvApi.IostorInv) { + return requestClient.put('/wms/iostor-inv/update', data); +} + +/** 删除出入库单主表 */ +export function deleteIostorInv(id: number) { + return requestClient.delete(`/wms/iostor-inv/delete?id=${id}`); +} + +/** 批量删除出入库单主表 */ +export function deleteIostorInvList(ids: number[]) { + return requestClient.delete( + `/wms/iostor-inv/delete-list?ids=${ids.join(',')}`, + ); +} + +/** 导出出入库单主表 */ +export function exportIostorInv(params: any) { + return requestClient.download('/wms/iostor-inv/export-excel', { params }); +} + + diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/iostorinv/data.ts b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/iostorinv/data.ts new file mode 100644 index 00000000..15e9a244 --- /dev/null +++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/iostorinv/data.ts @@ -0,0 +1,447 @@ +import type { VbenFormSchema } from '#/adapter/form'; +import type { VxeTableGridOptions } from '#/adapter/vxe-table'; +import type { WmsIostorInvApi } from '#/api/wms/iostorinv'; + +import { getRangePickerDefaultProps } from '#/utils'; + +/** 新增/修改的表单 */ +export function useFormSchema(): VbenFormSchema[] { + return [ + { + fieldName: 'iostorinvId', + component: 'Input', + dependencies: { + triggerFields: [''], + show: () => false, + }, + }, + { + fieldName: 'billCode', + label: '单据编号', + rules: 'required', + component: 'Input', + componentProps: { + placeholder: '请输入单据编号', + }, + }, + { + fieldName: 'ioType', + label: '出入类型', + rules: 'required', + component: 'Select', + componentProps: { + options: [], + placeholder: '请选择出入类型', + }, + }, + { + fieldName: 'billType', + label: '单据类型', + rules: 'required', + component: 'Select', + componentProps: { + options: [], + placeholder: '请选择单据类型', + }, + }, + { + fieldName: 'bizDate', + label: '业务日期', + rules: 'required', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + }, + }, + { + fieldName: 'storId', + label: '仓库标识', + component: 'Input', + componentProps: { + placeholder: '请输入仓库标识', + }, + }, + { + fieldName: 'storCode', + label: '仓库编码', + component: 'Input', + componentProps: { + placeholder: '请输入仓库编码', + }, + }, + { + fieldName: 'storName', + label: '仓库名称', + component: 'Input', + componentProps: { + placeholder: '请输入仓库名称', + }, + }, + { + fieldName: 'sourceId', + label: '来源方标识', + component: 'Input', + componentProps: { + placeholder: '请输入来源方标识', + }, + }, + { + fieldName: 'sourceName', + label: '来源方名称', + component: 'Input', + componentProps: { + placeholder: '请输入来源方名称', + }, + }, + { + fieldName: 'sourceType', + label: '来源方类型', + component: 'Select', + componentProps: { + options: [], + placeholder: '请选择来源方类型', + }, + }, + { + fieldName: 'totalQty', + label: '总数量', + rules: 'required', + component: 'Input', + componentProps: { + placeholder: '请输入总数量', + }, + }, + { + fieldName: 'totalWeight', + label: '总重量', + component: 'Input', + componentProps: { + placeholder: '请输入总重量', + }, + }, + { + fieldName: 'detailCount', + label: '明细数', + rules: 'required', + component: 'Input', + componentProps: { + placeholder: '请输入明细数', + }, + }, + { + fieldName: 'billStatus', + label: '单据状态', + rules: 'required', + component: 'RadioGroup', + componentProps: { + options: [], + buttonStyle: 'solid', + optionType: 'button', + }, + }, + { + fieldName: 'remark', + label: '备注', + component: 'Input', + componentProps: { + placeholder: '请输入备注', + }, + }, + { + fieldName: 'createMode', + label: '生成方式', + rules: 'required', + component: 'Input', + componentProps: { + placeholder: '请输入生成方式', + }, + }, + { + fieldName: 'disOptid', + label: '分配人', + component: 'Input', + componentProps: { + placeholder: '请输入分配人', + }, + }, + { + fieldName: 'disTime', + label: '分配时间', + rules: 'required', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + }, + }, + { + fieldName: 'confirmOptid', + label: '确认人', + component: 'Input', + componentProps: { + placeholder: '请输入确认人', + }, + }, + { + fieldName: 'confirmTime', + label: '确认时间', + rules: 'required', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + }, + }, + { + fieldName: 'sysdeptid', + label: '部门ID', + component: 'Input', + componentProps: { + placeholder: '请输入部门ID', + }, + }, + { + fieldName: 'syscompanyid', + label: '公司ID', + component: 'Input', + componentProps: { + placeholder: '请输入公司ID', + }, + }, + { + fieldName: 'isUpload', + label: '是否已上传', + rules: 'required', + component: 'Input', + componentProps: { + placeholder: '请输入是否已上传', + }, + }, + { + fieldName: 'uploadOptid', + label: '回传人', + component: 'Input', + componentProps: { + placeholder: '请输入回传人', + }, + }, + { + fieldName: 'uploadTime', + label: '回传时间', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + }, + }, + ]; +} + +/** 列表的搜索表单 */ +export function useGridFormSchema(): VbenFormSchema[] { + return [ + { + fieldName: 'billCode', + label: '单据编号', + component: 'Input', + componentProps: { + allowClear: true, + placeholder: '请输入单据编号', + }, + }, + { + fieldName: 'billType', + label: '单据类型', + component: 'Select', + componentProps: { + allowClear: true, + options: [], + placeholder: '请选择单据类型', + }, + }, + { + fieldName: 'bizDate', + label: '业务日期', + component: 'RangePicker', + componentProps: { + ...getRangePickerDefaultProps(), + allowClear: true, + }, + }, + { + fieldName: 'storId', + label: '仓库标识', + component: 'Input', + componentProps: { + allowClear: true, + placeholder: '请输入仓库标识', + }, + }, + { + fieldName: 'billStatus', + label: '单据状态', + component: 'Select', + componentProps: { + allowClear: true, + options: [], + placeholder: '请选择单据状态', + }, + }, + { + fieldName: 'createTime', + label: '创建时间', + component: 'RangePicker', + componentProps: { + ...getRangePickerDefaultProps(), + allowClear: true, + }, + }, + { + fieldName: 'isUpload', + label: '是否已回传', + component: 'Input', + componentProps: { + allowClear: true, + placeholder: '请输入是否已回传', + }, + } + ]; +} + +/** 列表的字段 */ +export function useGridColumns(): VxeTableGridOptions['columns'] { + return [ + { type: 'checkbox', width: 40 }, + { + field: 'billCode', + title: '单据编号', + minWidth: 120, + }, + { + field: 'billType', + title: '单据类型', + minWidth: 120, + }, + { + field: 'bizDate', + title: '业务日期', + minWidth: 120, + formatter: 'formatDateTime', + }, + { + field: 'storId', + title: '仓库标识', + minWidth: 120, + }, + { + field: 'sourceId', + title: '来源方标识', + minWidth: 120, + }, + { + field: 'sourceName', + title: '来源方名称', + minWidth: 120, + }, + { + field: 'sourceType', + title: '来源方类型', + minWidth: 120, + }, + { + field: 'totalQty', + title: '总数量', + minWidth: 120, + }, + { + field: 'totalWeight', + title: '总重量', + minWidth: 120, + }, + { + field: 'detailCount', + title: '明细数', + minWidth: 120, + }, + { + field: 'billStatus', + title: '单据状态', + minWidth: 120, + }, + { + field: 'remark', + title: '备注', + minWidth: 120, + }, + { + field: 'createMode', + title: '生成方式', + minWidth: 120, + }, + { + field: 'createTime', + title: '创建时间', + minWidth: 120, + formatter: 'formatDateTime', + }, + { + field: 'disOptid', + title: '分配人', + minWidth: 120, + }, + { + field: 'disTime', + title: '分配时间', + minWidth: 120, + formatter: 'formatDateTime', + }, + { + field: 'confirmOptid', + title: '确认人', + minWidth: 120, + }, + { + field: 'confirmTime', + title: '确认时间', + minWidth: 120, + formatter: 'formatDateTime', + }, + { + field: 'sysdeptid', + title: '部门ID', + minWidth: 120, + }, + { + field: 'syscompanyid', + title: '公司ID', + minWidth: 120, + }, + { + field: 'isUpload', + title: '是否已上传', + minWidth: 120, + }, + { + field: 'uploadOptid', + title: '回传人', + minWidth: 120, + }, + { + field: 'uploadTime', + title: '回传时间', + minWidth: 120, + }, + { + title: '操作', + width: 200, + fixed: 'right', + slots: { default: 'actions' }, + }, + ]; +} + diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/iostorinv/index.vue b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/iostorinv/index.vue new file mode 100644 index 00000000..95e5d243 --- /dev/null +++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/iostorinv/index.vue @@ -0,0 +1,186 @@ + + + diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/iostorinv/modules/form.vue b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/iostorinv/modules/form.vue new file mode 100644 index 00000000..dc52fb96 --- /dev/null +++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/iostorinv/modules/form.vue @@ -0,0 +1,82 @@ + + +