Commit c99ae090e98bbaf72cdf4a42108a1d00e8812d6d
1 parent
213adb2c
feat(wms):初始化
Showing
14 changed files
with
219 additions
and
0 deletions
pom.xml
| ... | ... | @@ -25,6 +25,7 @@ |
| 25 | 25 | <!-- <module>yudao-module-erp</module>--> |
| 26 | 26 | <!-- <module>yudao-module-iot</module>--> |
| 27 | 27 | <!-- <module>yudao-module-mes</module>--> |
| 28 | + <module>yudao-module-wms</module> | |
| 28 | 29 | <!-- 请参考 https://doc.iocoder.cn/ai/build/ 文档,完成 AI 模块的启动!!! --> |
| 29 | 30 | <!-- <module>yudao-module-ai</module>--> |
| 30 | 31 | </modules> | ... | ... |
yudao-module-wms/pom.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" | |
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| 5 | + <parent> | |
| 6 | + <groupId>cn.iocoder.boot</groupId> | |
| 7 | + <artifactId>yudao</artifactId> | |
| 8 | + <version>${revision}</version> | |
| 9 | + </parent> | |
| 10 | + <modelVersion>4.0.0</modelVersion> | |
| 11 | + <artifactId>yudao-module-wms</artifactId> | |
| 12 | + <packaging>jar</packaging> | |
| 13 | + | |
| 14 | + <name>${project.artifactId}</name> | |
| 15 | + <description> | |
| 16 | + wms 模块下,仓库管理系统(Warehouse Management System)。 | |
| 17 | + 例如说:仓库、物料、库存、入库、出库、移库、盘库等等 | |
| 18 | + </description> | |
| 19 | + | |
| 20 | + <dependencies> | |
| 21 | + <dependency> | |
| 22 | + <groupId>cn.iocoder.boot</groupId> | |
| 23 | + <artifactId>yudao-module-system</artifactId> | |
| 24 | + <version>${revision}</version> | |
| 25 | + </dependency> | |
| 26 | + | |
| 27 | + <!-- 业务组件 --> | |
| 28 | + | |
| 29 | + <!-- Web 相关 --> | |
| 30 | + <dependency> | |
| 31 | + <groupId>cn.iocoder.boot</groupId> | |
| 32 | + <artifactId>yudao-spring-boot-starter-web</artifactId> | |
| 33 | + </dependency> | |
| 34 | + | |
| 35 | + <dependency> | |
| 36 | + <groupId>cn.iocoder.boot</groupId> | |
| 37 | + <artifactId>yudao-spring-boot-starter-security</artifactId> | |
| 38 | + </dependency> | |
| 39 | + | |
| 40 | + <!-- DB 相关 --> | |
| 41 | + <dependency> | |
| 42 | + <groupId>cn.iocoder.boot</groupId> | |
| 43 | + <artifactId>yudao-spring-boot-starter-mybatis</artifactId> | |
| 44 | + </dependency> | |
| 45 | + | |
| 46 | + <dependency> | |
| 47 | + <groupId>cn.iocoder.boot</groupId> | |
| 48 | + <artifactId>yudao-spring-boot-starter-redis</artifactId> | |
| 49 | + </dependency> | |
| 50 | + | |
| 51 | + <!-- 工具类相关 --> | |
| 52 | + <dependency> | |
| 53 | + <groupId>cn.iocoder.boot</groupId> | |
| 54 | + <artifactId>yudao-spring-boot-starter-excel</artifactId> | |
| 55 | + </dependency> | |
| 56 | + | |
| 57 | + <!-- Test 测试相关 --> | |
| 58 | + <dependency> | |
| 59 | + <groupId>cn.iocoder.boot</groupId> | |
| 60 | + <artifactId>yudao-spring-boot-starter-test</artifactId> | |
| 61 | + </dependency> | |
| 62 | + | |
| 63 | + </dependencies> | |
| 64 | + | |
| 65 | +</project> | ... | ... |
yudao-module-wms/src/main/java/cn/iocoder/yudao/module/wms/controller/admin/package-info.java
0 → 100644
yudao-module-wms/src/main/java/cn/iocoder/yudao/module/wms/controller/package-info.java
0 → 100644
yudao-module-wms/src/main/java/cn/iocoder/yudao/module/wms/enums/DictTypeConstants.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.wms.enums; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * WMS 字典类型常量 | |
| 5 | + * | |
| 6 | + * @author 芋道源码 | |
| 7 | + */ | |
| 8 | +public interface DictTypeConstants { | |
| 9 | + | |
| 10 | + String RECEIPT_STATUS = "wms_receipt_status"; | |
| 11 | + String RECEIPT_TYPE = "wms_receipt_type"; | |
| 12 | + String SHIPMENT_STATUS = "wms_shipment_status"; | |
| 13 | + String SHIPMENT_TYPE = "wms_shipment_type"; | |
| 14 | + String INVENTORY_HISTORY_TYPE = "wms_inventory_history_type"; | |
| 15 | + String MOVEMENT_STATUS = "wms_movement_status"; | |
| 16 | + String CHECK_STATUS = "wms_check_status"; | |
| 17 | + | |
| 18 | +} | ... | ... |
yudao-module-wms/src/main/java/cn/iocoder/yudao/module/wms/enums/ErrorCodeConstants.java
0 → 100644
yudao-module-wms/src/main/java/cn/iocoder/yudao/module/wms/framework/config/WmsConfiguration.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.wms.framework.config; | |
| 2 | + | |
| 3 | +import org.springframework.boot.context.properties.EnableConfigurationProperties; | |
| 4 | +import org.springframework.context.annotation.Configuration; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * WMS 模块配置 | |
| 8 | + * | |
| 9 | + * @author 芋道源码 | |
| 10 | + */ | |
| 11 | +@Configuration(proxyBeanMethods = false) | |
| 12 | +@EnableConfigurationProperties(WmsProperties.class) | |
| 13 | +public class WmsConfiguration { | |
| 14 | +} | ... | ... |
yudao-module-wms/src/main/java/cn/iocoder/yudao/module/wms/framework/config/WmsProperties.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.wms.framework.config; | |
| 2 | + | |
| 3 | +import lombok.Data; | |
| 4 | +import org.springframework.boot.context.properties.ConfigurationProperties; | |
| 5 | +import org.springframework.validation.annotation.Validated; | |
| 6 | + | |
| 7 | +import jakarta.validation.constraints.AssertTrue; | |
| 8 | +import jakarta.validation.constraints.NotNull; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * WMS 配置项 | |
| 12 | + * | |
| 13 | + * @author 芋道源码 | |
| 14 | + */ | |
| 15 | +@ConfigurationProperties(prefix = "yudao.wms") | |
| 16 | +@Validated | |
| 17 | +@Data | |
| 18 | +public class WmsProperties { | |
| 19 | + | |
| 20 | + /** | |
| 21 | + * 是否启用库区模式 | |
| 22 | + */ | |
| 23 | + @NotNull(message = "是否启用库区模式不能为空") | |
| 24 | + private Boolean areaEnable = false; | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 是否启用批次/效期/库存明细模式 | |
| 28 | + * | |
| 29 | + * 依赖 {@link #areaEnable} 为 true | |
| 30 | + */ | |
| 31 | + @NotNull(message = "是否启用批次/效期/库存明细模式不能为空") | |
| 32 | + private Boolean batchEnable = false; | |
| 33 | + | |
| 34 | + public boolean isAreaEnabled() { | |
| 35 | + return Boolean.TRUE.equals(areaEnable); | |
| 36 | + } | |
| 37 | + | |
| 38 | + public boolean isBatchEnabled() { | |
| 39 | + return Boolean.TRUE.equals(batchEnable); | |
| 40 | + } | |
| 41 | + | |
| 42 | + @AssertTrue(message = "WMS 批次/效期模式依赖库区模式,请先开启 yudao.wms.area-enable") | |
| 43 | + public boolean isBatchDependsOnAreaValid() { | |
| 44 | + return !isBatchEnabled() || isAreaEnabled(); | |
| 45 | + } | |
| 46 | + | |
| 47 | +} | ... | ... |
yudao-module-wms/src/main/java/cn/iocoder/yudao/module/wms/framework/config/package-info.java
0 → 100644
yudao-module-wms/src/main/java/cn/iocoder/yudao/module/wms/framework/package-info.java
0 → 100644
yudao-module-wms/src/main/java/cn/iocoder/yudao/module/wms/framework/web/config/WmsWebConfiguration.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.wms.framework.web.config; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.swagger.config.YudaoSwaggerAutoConfiguration; | |
| 4 | +import org.springdoc.core.models.GroupedOpenApi; | |
| 5 | +import org.springframework.context.annotation.Bean; | |
| 6 | +import org.springframework.context.annotation.Configuration; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * WMS 模块的 web 组件的 Configuration | |
| 10 | + * | |
| 11 | + * @author 芋道源码 | |
| 12 | + */ | |
| 13 | +@Configuration(proxyBeanMethods = false) | |
| 14 | +public class WmsWebConfiguration { | |
| 15 | + | |
| 16 | + /** | |
| 17 | + * WMS 模块的 API 分组 | |
| 18 | + */ | |
| 19 | + @Bean | |
| 20 | + public GroupedOpenApi wmsGroupedOpenApi() { | |
| 21 | + return YudaoSwaggerAutoConfiguration.buildGroupedOpenApi("wms"); | |
| 22 | + } | |
| 23 | + | |
| 24 | +} | ... | ... |
yudao-module-wms/src/main/java/cn/iocoder/yudao/module/wms/framework/web/package-info.java
0 → 100644
yudao-module-wms/src/main/java/cn/iocoder/yudao/module/wms/package-info.java
0 → 100644
yudao-server/pom.xml
| ... | ... | @@ -122,6 +122,13 @@ |
| 122 | 122 | <!-- <version>${revision}</version>--> |
| 123 | 123 | <!-- </dependency>--> |
| 124 | 124 | |
| 125 | + <!-- WMS 仓库管理模块 --> | |
| 126 | + <dependency> | |
| 127 | + <groupId>cn.iocoder.boot</groupId> | |
| 128 | + <artifactId>yudao-module-wms</artifactId> | |
| 129 | + <version>${revision}</version> | |
| 130 | + </dependency> | |
| 131 | + | |
| 125 | 132 | <!-- spring boot 配置所需依赖 --> |
| 126 | 133 | <dependency> |
| 127 | 134 | <groupId>org.springframework.boot</groupId> | ... | ... |