ERP:初始化模块,立个 2024 年的 flag

This commit is contained in:
YunaiV
2024-01-27 17:25:07 +08:00
parent 722223c659
commit ebd9222764
16 changed files with 225 additions and 9 deletions

24
yudao-module-erp/pom.xml Normal file
View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao</artifactId>
<version>${revision}</version>
</parent>
<modules>
<module>yudao-module-erp-api</module>
<module>yudao-module-erp-biz</module>
</modules>
<modelVersion>4.0.0</modelVersion>
<artifactId>yudao-module-erp</artifactId>
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<description>
erp 包下企业资源管理Enterprise Resource Planning
例如说:采购、销售、库存、财务、产品等等
</description>
</project>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-module-erp</artifactId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>yudao-module-erp-api</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>
erp 模块 API暴露给其它模块调用
</description>
<dependencies>
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-common</artifactId>
</dependency>
<!-- 参数校验 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,4 @@
/**
* erp API 包,定义暴露给其它模块的 API
*/
package cn.iocoder.yudao.module.erp.api;

View File

@ -0,0 +1,10 @@
package cn.iocoder.yudao.module.erp.enums;
/**
* ERP 字典类型的枚举类
*
* @author 芋道源码
*/
public interface DictTypeConstants {
}

View File

@ -0,0 +1,11 @@
package cn.iocoder.yudao.module.erp.enums;
/**
* ERP 错误码枚举类
* <p>
* erp 系统,使用 1-030-000-000 段
*/
public interface ErrorCodeConstants {
}

View File

@ -0,0 +1,12 @@
package cn.iocoder.yudao.module.erp.enums;
/**
* ERP 操作日志枚举
* 目的:统一管理,也减少 Service 里各种“复杂”字符串
*
* @author 芋道源码
*/
public interface LogRecordConstants {
}

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-module-erp</artifactId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>yudao-module-erp-biz</artifactId>
<name>${project.artifactId}</name>
<description>
erp 包下企业资源管理Enterprise Resource Planning
例如说:采购、销售、库存、财务、产品等等
</description>
<dependencies>
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-module-system-api</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-module-erp-api</artifactId>
<version>${revision}</version>
</dependency>
<!-- 业务组件 -->
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId>
</dependency>
<!-- Web 相关 -->
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-spring-boot-starter-security</artifactId>
</dependency>
<!-- DB 相关 -->
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-spring-boot-starter-mybatis</artifactId>
</dependency>
<!-- 工具类相关 -->
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-spring-boot-starter-excel</artifactId>
</dependency>
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-spring-boot-starter-biz-dict</artifactId>
</dependency>
<!-- Test 测试相关 -->
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-spring-boot-starter-test</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,4 @@
### 请求 /transfer
GET {{baseUrl}}/erp/sale-order/demo
Authorization: Bearer {{token}}
tenant-id: {{adminTenentId}}

View File

@ -0,0 +1,23 @@
package cn.iocoder.yudao.module.erp.controller.admin.sale;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Tag(name = "管理后台 - ERP 销售订单")
@RestController
@RequestMapping("/erp/sale-order")
@Validated
public class ErpSaleOrderController {
@GetMapping("/demo")
public CommonResult<Boolean> demo() {
return success(true);
}
}

View File

@ -0,0 +1,6 @@
/**
* 提供 RESTful API 给前端:
* 1. admin 包:提供给管理后台 yudao-ui-admin 前端项目
* 2. app 包:提供给用户 APP yudao-ui-app 前端项目,它的 Controller 和 VO 都要添加 App 前缀,用于和管理后台进行区分
*/
package cn.iocoder.yudao.module.erp.controller;

View File

@ -0,0 +1,10 @@
/**
* erp 包下企业资源管理Enterprise Resource Planning
* 例如说:采购、销售、库存、财务、产品等等
*
* 1. Controller URL以 /erp/ 开头,避免和其它 Module 冲突
* 2. DataObject 表名:以 erp_ 开头,方便在数据库中区分
*
* 注意,由于 Erp 模块下,容易和其它模块重名,所以类名都加载 Erp 的前缀~
*/
package cn.iocoder.yudao.module.erp;