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

File diff suppressed because it is too large Load Diff

View File

@@ -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;
}
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -0,0 +1,24 @@
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 QuantityUnitRelationSaveReqVO {
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11015")
private Long id;
@Schema(description = "计量单位量ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11015")
private Long untQtyId;
@Schema(description = "计量单位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30976")
private Long untId;
@Schema(description = "是否基准单位-标识该维度基准单位")
private Integer isBse;
}

View File

@@ -0,0 +1,33 @@
package com.zt.plat.module.unitmanagement.controller.admin.UnitConversion.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.zt.plat.framework.common.pojo.PageParam;
import java.math.BigDecimal;
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 UnitConversionPageReqVO extends PageParam {
@Schema(description = "源单位ID", example = "26239")
private Long srcUntId;
@Schema(description = "目标单位ID", example = "25640")
private Long tgtUntId;
@Schema(description = "转换因子")
private BigDecimal fctr;
@Schema(description = "转换公式")
private String fmu;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

View File

@@ -0,0 +1,40 @@
package com.zt.plat.module.unitmanagement.controller.admin.UnitConversion.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 单位转换 Response VO")
@Data
@ExcelIgnoreUnannotated
public class UnitConversionRespVO {
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "339")
@ExcelProperty("主键ID")
private Long id;
@Schema(description = "源单位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26239")
@ExcelProperty("源单位ID")
private Long srcUntId;
@Schema(description = "目标单位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25640")
@ExcelProperty("目标单位ID")
private Long tgtUntId;
@Schema(description = "转换因子")
@ExcelProperty("转换因子")
private BigDecimal fctr;
@Schema(description = "转换公式", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("转换公式")
private String fmu;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}

View File

@@ -0,0 +1,30 @@
package com.zt.plat.module.unitmanagement.controller.admin.UnitConversion.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
@Schema(description = "管理后台 - 单位转换新增/修改 Request VO")
@Data
public class UnitConversionSaveReqVO {
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "339")
private Long id;
@Schema(description = "源单位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26239")
@NotNull(message = "源单位ID不能为空")
private Long srcUntId;
@Schema(description = "目标单位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25640")
@NotNull(message = "目标单位ID不能为空")
private Long tgtUntId;
@Schema(description = "转换因子")
private BigDecimal fctr;
@Schema(description = "转换公式", requiredMode = Schema.RequiredMode.REQUIRED)
private String fmu;
}

Some files were not shown because too many files have changed in this diff Show More