溯源码补充

This commit is contained in:
顾君禹
2025-09-15 19:04:35 +08:00
parent b686df62b5
commit c1c6f8c897
5 changed files with 55 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
public class EnvironmentIndicatorsPageReqVO extends PageParam { public class EnvironmentIndicatorsPageReqVO extends PageParam {
@Schema(description = "设备分类id", example = "5134") @Schema(description = "设备分类id", example = "5134")
private String deviceCategoryId; private Integer deviceCategoryId;
@Schema(description = "设备分类名称", example = "芋艿") @Schema(description = "设备分类名称", example = "芋艿")
private String deviceCategoryName; private String deviceCategoryName;

View File

@@ -18,7 +18,7 @@ public class EnvironmentIndicatorsRespVO {
@Schema(description = "设备分类id", example = "5134") @Schema(description = "设备分类id", example = "5134")
@ExcelProperty("设备分类id") @ExcelProperty("设备分类id")
private String deviceCategoryId; private Integer deviceCategoryId;
@Schema(description = "设备分类名称", example = "芋艿") @Schema(description = "设备分类名称", example = "芋艿")
@ExcelProperty("设备分类名称") @ExcelProperty("设备分类名称")

View File

@@ -13,7 +13,7 @@ public class EnvironmentIndicatorsSaveReqVO {
private Integer id; private Integer id;
@Schema(description = "设备分类id", example = "5134") @Schema(description = "设备分类id", example = "5134")
private String deviceCategoryId; private Integer deviceCategoryId;
@Schema(description = "设备分类名称", example = "芋艿") @Schema(description = "设备分类名称", example = "芋艿")
private String deviceCategoryName; private String deviceCategoryName;

View File

@@ -0,0 +1,51 @@
package cn.iocoder.yudao.module.farm.controller.admin.traceabilitycode.vo;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
@Schema(description = "管理后台 - 溯源-溯源码分页结果(含统计信息) Response VO")
@Data
public class TraceabilityCodePageWithStatsRespVO {
@Schema(description = "分页数据列表")
private List<TraceabilityCodeRespVO> list;
@Schema(description = "总记录数")
private Long total;
@Schema(description = "统计信息")
private StatisticsInfo statistics;
@Data
@Schema(description = "统计信息")
public static class StatisticsInfo {
@Schema(description = "总量", example = "1000")
private Long totalAmount;
@Schema(description = "正常码量", example = "800")
private Long normalAmount;
@Schema(description = "废弃码量", example = "200")
private Long wasteAmount;
public StatisticsInfo() {}
public StatisticsInfo(Long totalAmount, Long normalAmount, Long wasteAmount) {
this.totalAmount = totalAmount;
this.normalAmount = normalAmount;
this.wasteAmount = wasteAmount;
}
}
public TraceabilityCodePageWithStatsRespVO() {}
public TraceabilityCodePageWithStatsRespVO(PageResult<TraceabilityCodeRespVO> pageResult, StatisticsInfo statistics) {
this.list = pageResult.getList();
this.total = pageResult.getTotal();
this.statistics = statistics;
}
}

View File

@@ -30,7 +30,7 @@ public class EnvironmentIndicatorsDO extends BaseDO {
/** /**
* 设备分类id * 设备分类id
*/ */
private String deviceCategoryId; private Integer deviceCategoryId;
/** /**
* 设备分类名称 * 设备分类名称
*/ */