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

View File

@ -21,7 +21,8 @@
<!-- <module>yudao-module-mp</module>-->
<!-- <module>yudao-module-pay</module>-->
<!-- <module>yudao-module-mall</module>-->
<!-- <module>yudao-module-crm</module>-->
<module>yudao-module-crm</module>
<module>yudao-module-erp</module>
<!-- 示例项目 -->
<!-- <module>yudao-example</module>-->
</modules>

View File

@ -16,7 +16,6 @@
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<description>
crm 包下客户关系管理Customer Relationship Management
例如说:客户、联系人、商机、合同、回款等等

View File

@ -41,7 +41,7 @@ import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.E
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
import static cn.iocoder.yudao.module.crm.enums.ErrorCodeConstants.CUSTOMER_NOT_EXISTS;
@Tag(name = "管理后台 - 商机")
@Tag(name = "管理后台 - CRM 商机")
@RestController
@RequestMapping("/crm/business")
@Validated

View File

@ -40,7 +40,7 @@ import java.util.Set;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
@Tag(name = "管理后台 - 商机状态类型")
@Tag(name = "管理后台 - CRM 商机状态类型")
@RestController
@RequestMapping("/crm/business-status-type")
@Validated

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;

View File

@ -88,11 +88,18 @@
<!-- </dependency>-->
<!-- CRM 相关模块。默认注释,保证编译速度 -->
<!-- <dependency>-->
<!-- <groupId>cn.iocoder.boot</groupId>-->
<!-- <artifactId>yudao-module-crm-biz</artifactId>-->
<!-- <version>${revision}</version>-->
<!-- </dependency>-->
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-module-crm-biz</artifactId>
<version>${revision}</version>
</dependency>
<!-- ERP 相关模块。默认注释,保证编译速度 -->
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-module-erp-biz</artifactId>
<version>${revision}</version>
</dependency>
<!-- spring boot 配置所需依赖 -->
<dependency>