package cn.iocoder.yudao.module.mes.controller.admin.dc.open.vo; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; import java.math.BigDecimal; import java.time.LocalDateTime; @Schema(description = "设备端 - 采集数据上报 Request VO") @Data public class MesDcIngestReqVO { @Schema(description = "设备编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "DC001") @NotBlank(message = "设备编号不能为空") @Size(max = 64, message = "设备编号长度不能超过 64 个字符") private String deviceCode; @Schema(description = "设备侧唯一键(推荐上报,用于重复上报幂等)", example = "20261110142305-0001") @Size(max = 64, message = "设备侧唯一键长度不能超过 64 个字符") private String bizId; @Schema(description = "设备侧记录序号", example = "0001") @Size(max = 64, message = "设备侧记录序号长度不能超过 64 个字符") private String recordNo; @Schema(description = "设备采集时间,不传则取服务器当前时间", example = "2026-11-10 14:23:05") private LocalDateTime recordTime; @Schema(description = "本次计数(与 totalCount 至少填一个;都填时以 count 为准)", example = "12") private Integer count; @Schema(description = "设备累计计数(设备只报累计值时,系统按上一次累计值的差值计算本次数量)", example = "1234") private Integer totalCount; @Schema(description = "本次重量(g)", example = "3500.50") private BigDecimal weight; @Schema(description = "设备累计重量(g)", example = "123456.70") private BigDecimal totalWeight; @Schema(description = "是否在线实时上报;离线补报请传 false,默认 true", example = "true") private Boolean online; @Schema(description = "固件版本(可选,上报后更新到设备台账)", example = "1.0.2") @Size(max = 64, message = "固件版本长度不能超过 64 个字符") private String firmwareVersion; }