feat:新增计量单位管理模块,包括实体、请求和响应对象,服务接口及实现,控制器,依赖配置等

This commit is contained in:
hewencai
2025-10-22 16:56:13 +08:00
parent 163da2f79d
commit fc289752df
43 changed files with 2124 additions and 1 deletions

View File

@@ -0,0 +1,46 @@
<?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>
<artifactId>zt-module-unit-management</artifactId>
<groupId>com.zt.plat</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>zt-module-unit-management-api</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>
暴露给其它模块调用
</description>
<dependencies>
<dependency>
<groupId>com.zt.plat</groupId>
<artifactId>zt-common</artifactId>
</dependency>
<!-- Web 相关 -->
<dependency>
<groupId>org.springdoc</groupId> <!-- 接口文档:使用最新版本的 Swagger 模型 -->
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- 参数校验 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<optional>true</optional>
</dependency>
<!-- RPC 远程调用相关 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,22 @@
package com.zt.plat.module.unitmanagement.enums;
import com.zt.plat.framework.common.exception.ErrorCode;
/**
* unit-management 模块的错误码常量
*/
public interface UnitErrorCodeConstants {
ErrorCode QUANTITY_UNIT_RELATION_NOT_EXISTS =
new ErrorCode(1_010_000_001, "计量单位量与单位关联不存在");
ErrorCode UNIT_CONVERSION_NOT_EXISTS =
new ErrorCode(1_010_000_002, "单位转换记录不存在");
ErrorCode UNIT_QUANTITY_NOT_EXISTS =
new ErrorCode(1_010_000_003, "单位数量记录不存在");
ErrorCode UNT_INFO_NOT_EXISTS =
new ErrorCode(1_010_000_004, "单位信息记录不存在");
}