1. 统一包名修改
This commit is contained in:
46
cloud-module-product/cloud-module-product-api/pom.xml
Normal file
46
cloud-module-product/cloud-module-product-api/pom.xml
Normal 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>cloud-module-product</artifactId>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>cloud-module-product-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
<description>
|
||||
暴露给其它模块调用
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>cloud-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,90 @@
|
||||
package com.zt.plat.module.product.enums;
|
||||
|
||||
import com.zt.plat.framework.common.exception.ErrorCode;
|
||||
|
||||
/**
|
||||
* product 错误码枚举类
|
||||
* <p>
|
||||
* 1-030-400-000 ~ 1-030-599-999
|
||||
* <p>
|
||||
* 1-030-400(公共)-xxx
|
||||
* --------------------plan-----------------------
|
||||
* 1-030-411(plan-template)-xxx
|
||||
* 1-030-412(plan-template-column)-xxx
|
||||
* 1-030-413(plan-template-column-data)-xxx
|
||||
* 1-030-414(plan-template-item)-xxx
|
||||
* 1-030-415(factory_plan)-xxx
|
||||
* 1-030-416(factory_plan-column)-xxx
|
||||
* 1-030-417(factory_plan-column-data)-xxx
|
||||
* 1-030-418(factory_plan-item)-xxx
|
||||
* 1-030-419(factory_plan-item-data)-xxx
|
||||
* 1-030-420(company_plan)-xxx
|
||||
* 1-030-421(company_plan-column)-xxx
|
||||
* 1-030-422(company_plan-column-data)-xxx
|
||||
* 1-030-423(company_plan-item)-xxx
|
||||
* 1-030-424(company_plan-item-data)-xxx
|
||||
* -------------------------------------------
|
||||
* -----------------factory-------------------
|
||||
* 1-030-424 工厂模型(factory-model)
|
||||
* -------------------------------------------
|
||||
* -----------------schedule------------------
|
||||
* 1-030-425 排班配置(schedule-config)
|
||||
* 1-030-426 排班班组(schedule-team)
|
||||
* 1-030-427 排班班次(schedule-shift)
|
||||
* 1-030-428 排班规则(schedule-rule)
|
||||
* 1-030-429 排班数据(schedule-data)
|
||||
* -------------------------------------------
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
public interface ErrorCodeConstants {
|
||||
//通用
|
||||
ErrorCode CODE_GENERATION_SERVICE_CALL_FAILED = new ErrorCode(1_030_400_001, "编码生成服务调用失败");
|
||||
|
||||
//计划模板(plan-template)
|
||||
ErrorCode PLAN_TEMPLATE_NOT_EXISTS = new ErrorCode(1_030_411_001, "计划模板不存在");
|
||||
ErrorCode PLAN_TEMPLATE_PLAN_TYPE_IS_NULL = new ErrorCode(1_030_411_002, "计划模板类型为空");
|
||||
ErrorCode PLAN_TEMPLATE_PLAN_TYPE_NOT_EXISTS = new ErrorCode(1_030_411_003, "计划模板类型不存在");
|
||||
ErrorCode PLAN_TEMPLATE_PLAN_FAILED_TO_RETRIEVE_ENCODING = new ErrorCode(1_030_411_004, "计划模板编号获取失败");
|
||||
|
||||
//计划模板动态列(plan-template-column)
|
||||
ErrorCode PLAN_TEMPLATE_COLUMN_NOT_EXISTS = new ErrorCode(1_030_412_001, "计划模板动态列不存在");
|
||||
ErrorCode PLAN_TEMPLATE_COLUMN_OPERATION_ID_IS_NULL = new ErrorCode(1_030_412_002, "计划模板动态列操作标识为空");
|
||||
ErrorCode PLAN_TEMPLATE_COLUMN_ENCODING_INFORMATION_ALREADY_EXISTS = new ErrorCode(1_030_412_003, "计划模板动态列编码不能重复");
|
||||
|
||||
//计划模板动态列数据(plan-template-column-data)
|
||||
ErrorCode PLAN_TEMPLATE_COLUMN_DATA_NOT_EXISTS = new ErrorCode(1_030_413_001, "计划模板动态列结果不存在");
|
||||
|
||||
//计划模板项目(plan-template-item)
|
||||
ErrorCode PLAN_TEMPLATE_ITEM_NOT_EXISTS = new ErrorCode(1_030_414_001, "计划模板项目不存在");
|
||||
ErrorCode PLAN_TEMPLATE_ITEM_OPERATION_ID_IS_NULL = new ErrorCode(1_030_414_002, "计划模板动态列操作标识为空");
|
||||
|
||||
//1_030_424 工厂模型(factory-model)
|
||||
ErrorCode FACTORY_MODEL_NOT_EXISTS = new ErrorCode(1_030_424_001, "工厂模型不存在");
|
||||
ErrorCode FACTORY_MODEL_NODE_CODE_EXISTS = new ErrorCode(1_030_424_002, "节点编码已存在");
|
||||
ErrorCode FACTORY_MODEL_NODE_NAME_EXISTS = new ErrorCode(1_030_424_003, "节点名称已存在");
|
||||
|
||||
//1_030_425 排班配置(schedule-config)
|
||||
ErrorCode SCHEDULE_CONFIG_NOT_EXISTS = new ErrorCode(1_030_425_001, "排班配置不存在");
|
||||
ErrorCode SCHEDULE_CONFIG_CODE_EXISTS = new ErrorCode(1_030_425_002, "排班编码已存在");
|
||||
ErrorCode SCHEDULE_CONFIG_NAME_EXISTS = new ErrorCode(1_030_425_003, "排班名称已存在");
|
||||
|
||||
//1_030_426 排班班组(schedule-team)
|
||||
ErrorCode SCHEDULE_TEAM_NOT_EXISTS = new ErrorCode(1_030_426_001, "排班班组不存在");
|
||||
ErrorCode SCHEDULE_TEAM_NAME_EXISTS = new ErrorCode(1_030_426_002, "排班班组名称重复");
|
||||
ErrorCode SCHEDULE_TEAM_NOT_CREATE = new ErrorCode(1_030_426_003, "排班班组信息未创建");
|
||||
|
||||
//1_030_427 排班班次(schedule-shift)
|
||||
ErrorCode SCHEDULE_SHIFT_NOT_EXISTS = new ErrorCode(1_030_427_001, "排班班次不存在");
|
||||
ErrorCode SCHEDULE_SHIFT_NAME_EXISTS = new ErrorCode(1_030_427_002, "排班班次名称重复");
|
||||
ErrorCode SCHEDULE_SHIFT_NOT_CREATE = new ErrorCode(1_030_427_003, "排班班次信息未创建");
|
||||
|
||||
//1_030_428 排班规则(schedule-rule)
|
||||
ErrorCode SCHEDULE_RULE_NOT_EXISTS = new ErrorCode(1_030_428_001, "排班规则不存在");
|
||||
ErrorCode SCHEDULE_RULE_DATE_EXISTS = new ErrorCode(1_030_428_002, "排班日期重复");
|
||||
|
||||
//1_030_429 排班数据(schedule-data)
|
||||
ErrorCode SCHEDULE_DATA_NOT_EXISTS = new ErrorCode(1_030_429_001, "排班数据不存在");
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.zt.plat.module.product.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 计划模板状态
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@Getter
|
||||
public enum PlanTemplateTypeEnums {
|
||||
Month("M", "月计划", "PLN_TMPL_M"),
|
||||
Day("D", "日计划", "PLN_TMPL_D");
|
||||
|
||||
private final String type;
|
||||
private final String name;
|
||||
private final String codeRule;
|
||||
|
||||
PlanTemplateTypeEnums(String type, String name, String codeRule) {
|
||||
this.type = type;
|
||||
this.name = name;
|
||||
this.codeRule = codeRule;
|
||||
}
|
||||
|
||||
// 根据code获取枚举
|
||||
public static String getCodeRuleByType(String type) {
|
||||
for (PlanTemplateTypeEnums templateTypeEnums : values()) {
|
||||
if (templateTypeEnums.type.equals(type)) {
|
||||
return templateTypeEnums.codeRule;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user