From 1e69d160cb1e04b1438db0ca950dd5c15088619d Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期四, 17 四月 2025 15:26:52 +0800 Subject: [PATCH] 灌溉计划终止时不区分终止方式 --- pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoController.java | 55 ++++++++++++++++++++++++++++++++++++------------------- 1 files changed, 36 insertions(+), 19 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoController.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoController.java index 25c88b2..03d969b 100644 --- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoController.java +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoController.java @@ -1,12 +1,14 @@ package com.dy.pipIrrGlobal.voPr; +import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; import com.dy.common.po.BaseEntity; import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.Max; -import jakarta.validation.constraints.Min; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -16,48 +18,63 @@ * @author ZhuBaoMin * @date 2023-12-29 10:27 * @LastEditTime 2023-12-29 10:27 - * @Description + * @Description 鎺у埗鍣ㄨ鍥惧璞� */ @Data -@Schema(title = "鎺у埗鍣ㄨ鍥惧璞�") +@JsonPropertyOrder({ "id", "rtuAddr", "intakeName", "bindNumber", "findDt", "isOnLine", "protocol", "protocolVersion", "remarks"}) +@HeadRowHeight(30) +@ContentRowHeight(20) public class VoController implements BaseEntity { private static final long serialVersionUID = 202401241704003L; @Schema(title = "ID") - @ExcelProperty("ID") - @ColumnWidth(10) + @ExcelIgnore private String id; @Schema(title = "鎺у埗鍣ㄥ湴鍧�") - @ExcelProperty("鎺у埗鍣ㄥ湴鍧�") + @ExcelProperty(value = {"${title}", "闃�鎺у櫒鍦板潃"}) @ColumnWidth(15) private String rtuAddr; @Schema(title = "缁戝畾鍙栨按鍙�") - @ExcelProperty("缁戝畾鍙栨按鍙�") - @ColumnWidth(10) + @ExcelProperty(value = {"${title}", "鍙栨按鍙g紪鍙�"}) + @ColumnWidth(15) private String intakeName; @Schema(title = "缁戝畾娆℃暟") - @ExcelProperty("缁戝畾娆℃暟") + @ExcelProperty(value = {"${title}", "缁戝畾娆℃暟"}) @ColumnWidth(10) private Integer bindNumber; @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @Schema(title = "鍙戠幇鏃ユ湡鏃堕棿") - @ExcelProperty("鍙戠幇鏃ユ湡鏃堕棿") - @ColumnWidth(30) + @ExcelProperty(value = {"${title}", "鍙戠幇鏃堕棿"}) + @ColumnWidth(20) private Date findDt; +// @Schema(title = "鍦ㄧ嚎鐘舵��") +// @ExcelProperty("鍦ㄧ嚎鐘舵��") +// @ColumnWidth(6) +// private String onlineState; + /** - * 鍦ㄧ嚎鐘舵��;1-鍦ㄧ嚎锛�2-绂荤嚎 + * 鏄惁鍦ㄧ嚎 */ - @Schema(description = "鍦ㄧ嚎鐘舵��", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @ExcelProperty("鍦ㄧ嚎鐘舵��") - @ColumnWidth(1) - @Max(message = "鍦ㄧ嚎鐘舵�佸彧鑳�1鎴�2", value = 2) - @Min(message = "鍦ㄧ嚎鐘舵�佸彧鑳�1鎴�2",value = 1) - private byte onlineState; + @ExcelIgnore + private Boolean isOnLine; + + + @Schema(title = "閫氳鍗忚") + @ExcelIgnore + private String protocol; + + @Schema(title = "鍗忚鐗堟湰鍙�") + @ExcelIgnore + private String protocolVersion; + + @Schema(title = "澶囨敞") + @ExcelIgnore + private String remarks; } -- Gitblit v1.8.0