feat:新增计量单位管理模块,包括实体、请求和响应对象,服务接口及实现,控制器,依赖配置等
This commit is contained in:
@@ -40,7 +40,11 @@
|
||||
<artifactId>zt-module-erp-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-unit-management-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<!-- Web 相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
|
||||
1
pom.xml
1
pom.xml
@@ -12,6 +12,7 @@
|
||||
<module>zt-module-contract-order</module>
|
||||
<module>zt-module-erp</module>
|
||||
<module>base-server</module>
|
||||
<module>zt-module-unit-management</module>
|
||||
</modules>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
|
||||
24
zt-module-unit-management/pom.xml
Normal file
24
zt-module-unit-management/pom.xml
Normal 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>
|
||||
<artifactId>dsc-base</artifactId>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modules>
|
||||
<module>zt-module-unit-management-api</module>
|
||||
<module>zt-module-unit-management-server</module>
|
||||
</modules>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>zt-module-unit-management</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
<description>
|
||||
计量单位 模块。
|
||||
</description>
|
||||
|
||||
</project>
|
||||
@@ -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>
|
||||
@@ -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, "单位信息记录不存在");
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,35 @@
|
||||
package com.zt.plat.module.unitmanagement.controller.admin.QuantityUnitRelation.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 计量单位量与单位关联批量保存 Request VO")
|
||||
@Data
|
||||
public class QuantityUnitRelationBatchSaveReqVO {
|
||||
|
||||
@Schema(description = "计量单位量ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11015")
|
||||
@NotNull(message = "计量单位量ID不能为空")
|
||||
private Long untQtyId;
|
||||
|
||||
@Schema(description = "单位关联列表", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "单位关联列表不能为空")
|
||||
private List<UnitRelationItemVO> unitRelations;
|
||||
|
||||
@Schema(description = "单位关联项")
|
||||
@Data
|
||||
public static class UnitRelationItemVO {
|
||||
|
||||
@Schema(description = "主键ID(新增时为空,更新时必填)", example = "11015")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "计量单位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30976")
|
||||
@NotNull(message = "计量单位ID不能为空")
|
||||
private Long untId;
|
||||
|
||||
@Schema(description = "是否基准单位-标识该维度基准单位")
|
||||
private Integer isBse;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.zt.plat.module.unitmanagement.controller.admin.QuantityUnitRelation.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 计量单位量与单位关联分页 Request VO")
|
||||
@Data
|
||||
public class QuantityUnitRelationPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "所属量纲")
|
||||
private Long untQtyId;
|
||||
|
||||
@Schema(description = "是否基准单位-标识该维度基准单位")
|
||||
private Integer isBse;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.zt.plat.module.unitmanagement.controller.admin.QuantityUnitRelation.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 计量单位量与单位关联 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class QuantityUnitRelationRespVO {
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11015")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "计量单位量ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11015")
|
||||
@ExcelProperty("计量单位量ID")
|
||||
private Long untQtyId;
|
||||
|
||||
@Schema(description = "计量单位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30976")
|
||||
@ExcelProperty("计量单位ID")
|
||||
private Long untId;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "是否基准单位-标识该维度基准单位")
|
||||
@ExcelProperty("是否基准单位-标识该维度基准单位")
|
||||
private Integer isBse;
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user