代码调整

This commit is contained in:
caozehui
2025-03-28 15:06:57 +08:00
parent 48408859b1
commit 71ba7fa139
31 changed files with 296 additions and 414 deletions

View File

@@ -1,212 +0,0 @@
package com.njcn.gather.device.pojo.constant;
/**
* @author caozehui
* @date 2024/11/06
*/
public interface DevValidMessage {
String ID_NOT_BLANK = "id不能为空请检查id参数";
String ID_FORMAT_ERROR = "id格式错误请检查id参数";
String PORT_RANGE_ERROR = "端口号范围错误请检查port参数";
String NAME_NOT_BLANK = "名称不能为空请检查name参数";
String NAME_FORMAT_ERROR = "名称格式错误请检查name参数";
String PATTERN_NOT_BLANK = "模式不能为空请检查pattern参数";
String DEV_TYPE_NOT_BLANK = "设备类型不能为空";
String DEV_CHNS_NOT_NULL = "设备通道系数不能为空请检查devChns参数";
String DEV_VOLT_NOT_NULL = "额定电压不能为空请检查devVolt参数";
String DEV_CURR_NOT_NULL = "额定电流不能为空请检查devCurr参数";
String MANUFACTURER_NOT_BLANK = "设备厂家不能为空请检查manufacturer参数";
String CREATEDATETIME_NOT_NULL = "出厂日期不能为空请检查producedDate参数";
String CREATEDATETIME_FORMAT_ERROR = "出厂日期格式错误请检查createDate参数";
String FACTORYNO_NOT_BLANK = "出厂编号不能为空请检查factoryNo参数";
String FIRMWARE_NOT_BLANK = "固件版本不能为空请检查firmware参数";
String SOFTWARE_NOT_BLANK = "软件版本不能为空请检查software参数";
String PROTOCOL_NOT_BLANK = "通讯协议不能为空请检查protocol参数";
String IP_NOT_BLANK = "IP地址不能为空请检查ip参数";
String IP_FORMAT_ERROR = "IP地址格式错误请检查ip参数";
String PORT_NOT_NULL = "端口号不能为空请检查port参数";
String ENCRYPTION_NOT_NULL = "是否为加密版本不能为空请检查encryption参数";
String RECHECK_NUM_NOT_NULL = "检测次数不能为空请检查reCheckNum参数";
String PLAN_ID_NOT_NULL = "检测计划ID不能为空请检查planId参数";
String PQ_DEV_IDS_NOT_NULL = "设备ID集合不能为null请检查pqDevIds参数";
String ARRIVE_DATE_FORMAT_ERROR = "送样日期格式错误请检查arrivedDateTime参数";
String ENCRYPTION_FLAG_FORMAT_ERROR = "是否为加密版本格式错误请检查encryptionFlag参数";
String RECHECK_NUM_FORMAT_ERROR = "检测次数格式错误请检查recheckNum参数";
String PATTERN_FORMAT_ERROR = "模式格式错误请检查pattern参数";
String SOURCE_IDS_NOT_EMPTY = "检测源ID不能为空请检查sourceIds参数";
String SOURCE_ID_FORMAT_ERROR = "检测源ID格式错误请检查sourceIds参数";
String DEV_TYPE_FORMAT_ERROR = "设备类型格式错误请检查devType参数";
String MANUFACTURER_FORMAT_ERROR = "设备厂家格式错误请检查manufacturer参数";
String PROTOCOL_FORMAT_ERROR = "通讯协议格式错误请检查protocol参数";
String PLAN_ID_FORMAT_ERROR = "检测计划ID格式错误请检查planId参数";
String STANDARD_TIME_FORMAT_ERROR = "标准推行时间格式错误请检查standardTime参数";
String SCRIPT_TYPE_NOT_BLANK = "检测脚本类型不能为空请检查scriptType参数";
String STANDARD_NAME_NOT_BLANK = "参照标准名称不能为空请检查standardName参数";
String STANDARD_NAME_FORMAT_ERROR = "参照标准名称格式错误请检查standardName参数";
String STANDARD_TIME_NOT_BLANK = "标准推行时间不能为空请检查standardTime参数";
String SCRIPT_TYPE_FORMAT_ERROR = "检测脚本类型格式错误请检查scriptType参数";
String DEV_LEVEL_NOT_BLANK = "设备等级不能为空请检查devLevel参数";
String DEV_LEVEL_FORMAT_ERROR = "设备等级格式错误请检查devLevel参数";
String ENABLE_FORMAT_ERROR = "是否启用格式错误请检查enable参数";
String ERR_SYS_ID_NOT_BLANK = "误差体系ID不能为空请检查errSysId参数";
String ERR_SYS_DTLS_ERROR_TYPE_NOT_BLANK = "误差项类型不能为空请检查errorType参数";
String ERR_SYS_DTLS_ERROR_TYPE_FORMAT_ERROR = "误差项类型格式错误请检查errorType参数";
String ERR_SYS_DTLS_SCRIPT_TYPE_NOT_BLANK = "脚本项类型不能为空请检查scriptType参数";
String ERR_SYS_DTLS_SCRIPT_TYPE_FORMAT_ERROR = "脚本项类型格式错误请检查scriptType参数";
String START_VALUE_NOT_NULL = "起始值不能为空请检查startValue参数";
String START_FLAG_NOT_NULL = "是否包含起始值不能为空请检查startFlag参数";
String END_VALUE_NOT_NULL = "结束值不能为空请检查endValue参数";
String END_FLAG_NOT_NULL = "是否包含结束值不能为空请检查endFlag参数";
String CONDITION_TYPE_NOT_BLANK = "判断条件类型不能为空请检查conditionType参数";
String ERROR_VALUE_FORMAT_ERROR = "误差值格式错误请检查errorValue参数";
String MAX_ERROR_VALUE_NOT_NULL = "最大误差值不能为空请检查maxErrorValue参数";
String ERROR_VALUE_TYPE_NOT_BLANK = "误差值类型不能为空请检查errorValueType参数";
String PQ_SOURCE_TYPE_NOT_BLANK = "检测源类型不能为空请检查pqSourceType参数";
String PQ_SOURCE_TYPE_FORMAT_ERROR = "检测源类型格式错误请检查pqSourceType参数";
String ENABLE_NOT_NULL = "状态不能为空请检查enable参数";
String PQ_SOURCE_NAME_FORMAT_ERROR = "检测源名称格式错误请检查pqSourceName参数";
String PQ_SOURCE_PARAMETER_ID_NOT_BLANK = "检测源参数ID不能为空请检查pqSourceParameterId参数";
String PQ_SOURCE_PARAMETER_PID_NOT_BLANK = "检测源参数PID不能为空请检查pqSourceParameterId参数";
String PQ_SOURCE_PARAMETER_TYPE_NOT_BLANK = "检测源参数类型不能为空请检查pqSourceParameterType参数";
String PQ_SOURCE_PARAMETER_REMARK_NOT_BLANK = "检测源参数描述不能为空请检查pqSourceParameterRemark参数";
String PQ_SOURCE_PARAMETER_VALUE_NOT_BLANK = "参数值不能为空请检查pqSourceParameterValue参数";
String DEV_ID_NOT_BLANK = "设备ID不能为空";
String DEV_ID_FORMAT_ERROR = "设备ID格式错误";
String BELONG_LINE_NOT_BLANK = "所属母线不能为空";
String PT_NOT_NULL = "PT变比不能为空";
String CT_NOT_NULL = "CT变比不能为空";
String WIRING_TYPE_NOT_BLANK = "接线方式不能为空";
String WIRING_TYPE_FORMAT_ERROR = "接线方式格式错误";
String DATASOURCE_ID_NOT_EMPTY = "数据源ID不能为空";
String SCRIPT_ID_NOT_BLANK = "检测脚本ID不能为空";
String SCRIPT_ID_FORMAT_ERROR = "检测脚本ID格式错误";
String ERROR_SYS_ID_NOT_BLANK = "误差体系ID不能为空";
String ERROR_SYS_ID_FORMAT_ERROR = "误差体系ID格式错误";
String TIME_CHECK_NOT_NULL = "守时检测不能为空";
String TIME_CHECK_FORMAT_ERROR = "守时检测格式错误";
String TEST_STATE_NOT_NULL = "检测状态不能为空";
String TEST_STATE_FORMAT_ERROR = "检测状态格式错误";
String REPORT_STATE_NOT_NULL = "报告生成状态不能为空";
String REPORT_STATE_FORMAT_ERROR = "报告生成状态格式错误";
String CHECK_RESULT_STATE_NOT_NULL = "检测结果不能为空";
String CHECK_RESULT_STATE_FORMAT_ERROR = "检测结果格式错误";
String CHECK_STATE_FORMAT_ERROR = "检测状态格式错误";
String CHECK_RESULT_FORMAT_ERROR = "检测结果格式错误";
String DOCUMENT_STATE_FORMAT_ERROR = "归档状态格式错误";
String MONITOR_CODE_FORMAT_ERROR = "监测点编码格式错误";
String MONITOR_NUM_NOT_NULL = "监测点序号不能为空";
String FACTOR_FLAG_FORMAT_ERROR = "是否支持系数校准格式错误";
String MONITOR_NUM_FORMAT_ERROR = "监测点序号格式错误";
String SOURC_NOT_BLANK = "检测源不能为空";
String DATASOURCE_NOT_BLANK = "数据源不能为空";
String SCRIPT_NOT_BLANK = "检测脚本不能为空";
String ERRORSYS_NOT_BLANK = "误差体系不能为空";
String TIMECHECK_NOT_BLANK = "是否做守时检测不能为空";
String FACTOR_FLAG_NOT_BLANK = "是否支持系数校准不能为空";
String CONDITION_TYPE_FORMAT_ERROR = "判断条件类型格式错误请检查conditionType参数";
String SORT_NOT_NULL = "排序不能为空";
String PREINVESTMENT_PLAN_NOT_BLANK = "预投资计划不能为空";
String TIMECHECK_NOT_NULL = "是否做守时检测不能为空";
String CREATEID_NOT_BLANK = "设备序列号不能为空";
String ASSOCIATE_REPORT_NOT_NULL = "是否关联报告不能为空";
}

View File

@@ -2,7 +2,7 @@ package com.njcn.gather.device.pojo.param;
import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.gather.monitor.pojo.param.PqMonitorParam;
import com.njcn.gather.device.pojo.constant.DevValidMessage;
import com.njcn.gather.pojo.constant.DetectionValidMessage;
import com.njcn.web.pojo.annotation.DateTimeStrValid;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModelProperty;
@@ -25,13 +25,13 @@ public class PqDevParam {
private String name;
@ApiModelProperty(value = "设备模式,字典表(数字、模拟、比对)", required = true)
@NotBlank(message = DevValidMessage.PATTERN_NOT_BLANK)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DevValidMessage.PATTERN_FORMAT_ERROR)
@NotBlank(message = DetectionValidMessage.PATTERN_NOT_BLANK)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DetectionValidMessage.PATTERN_FORMAT_ERROR)
private String pattern;
@ApiModelProperty(value = "设备类型,字典表", required = true)
@NotBlank(message = DevValidMessage.DEV_TYPE_NOT_BLANK)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DevValidMessage.DEV_TYPE_FORMAT_ERROR)
@NotBlank(message = DetectionValidMessage.DEV_TYPE_NOT_BLANK)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DetectionValidMessage.DEV_TYPE_FORMAT_ERROR)
private String devType;
@ApiModelProperty(value = "设备厂家,字典表", required = true)
@@ -41,7 +41,7 @@ public class PqDevParam {
private String createDate;
@ApiModelProperty(value = "设备序列号", required = true)
@NotBlank(message = DevValidMessage.FACTORYNO_NOT_BLANK)
@NotBlank(message = DetectionValidMessage.FACTORYNO_NOT_BLANK)
private String createId;
@ApiModelProperty(value = "固件版本", required = true)
@@ -51,24 +51,24 @@ public class PqDevParam {
private String softwareVersion;
@ApiModelProperty(value = "通讯协议", required = true)
@NotBlank(message = DevValidMessage.PROTOCOL_NOT_BLANK)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DevValidMessage.PROTOCOL_FORMAT_ERROR)
@NotBlank(message = DetectionValidMessage.PROTOCOL_NOT_BLANK)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DetectionValidMessage.PROTOCOL_FORMAT_ERROR)
private String protocol;
@ApiModelProperty(value = "IP地址", required = true)
@NotBlank(message = DevValidMessage.IP_NOT_BLANK)
@Pattern(regexp = PatternRegex.IP_REGEX, message = DevValidMessage.IP_FORMAT_ERROR)
@NotBlank(message = DetectionValidMessage.IP_NOT_BLANK)
@Pattern(regexp = PatternRegex.IP_REGEX, message = DetectionValidMessage.IP_FORMAT_ERROR)
private String ip;
@ApiModelProperty(value = "端口号", required = true)
@NotNull(message = DevValidMessage.PORT_NOT_NULL)
@Range(min = 1, max = 65535, message = DevValidMessage.PORT_RANGE_ERROR)
@NotNull(message = DetectionValidMessage.PORT_NOT_NULL)
@Range(min = 1, max = 65535, message = DetectionValidMessage.PORT_RANGE_ERROR)
private Integer port;
@ApiModelProperty(value = "装置是否为加密版本", required = true)
@NotNull(message = DevValidMessage.ENCRYPTION_NOT_NULL)
@Min(value = 0, message = DevValidMessage.ENCRYPTION_FLAG_FORMAT_ERROR)
@Max(value = 1, message = DevValidMessage.ENCRYPTION_FLAG_FORMAT_ERROR)
@NotNull(message = DetectionValidMessage.ENCRYPTION_NOT_NULL)
@Min(value = 0, message = DetectionValidMessage.ENCRYPTION_FLAG_FORMAT_ERROR)
@Max(value = 1, message = DetectionValidMessage.ENCRYPTION_FLAG_FORMAT_ERROR)
private Integer encryptionFlag;
@ApiModelProperty("装置识别码3ds加密")
@@ -81,7 +81,7 @@ public class PqDevParam {
private String sampleId;
@ApiModelProperty(value = "送样日期")
@DateTimeStrValid(message = DevValidMessage.ARRIVE_DATE_FORMAT_ERROR)
@DateTimeStrValid(message = DetectionValidMessage.ARRIVE_DATE_FORMAT_ERROR)
private String arrivedDate;
@ApiModelProperty("所属地市名称")
@@ -100,13 +100,13 @@ public class PqDevParam {
private String qrCode;
@ApiModelProperty(value = "检测次数,默认为0", required = true)
@NotNull(message = DevValidMessage.RECHECK_NUM_NOT_NULL)
@Min(value = 0, message = DevValidMessage.RECHECK_NUM_FORMAT_ERROR)
@NotNull(message = DetectionValidMessage.RECHECK_NUM_NOT_NULL)
@Min(value = 0, message = DetectionValidMessage.RECHECK_NUM_FORMAT_ERROR)
private Integer reCheckNum;
@ApiModelProperty("是否支持系数校准")
@Min(value = 0, message = DevValidMessage.FACTOR_FLAG_FORMAT_ERROR)
@Max(value = 1, message = DevValidMessage.FACTOR_FLAG_FORMAT_ERROR)
@Min(value = 0, message = DetectionValidMessage.FACTOR_FLAG_FORMAT_ERROR)
@Max(value = 1, message = DetectionValidMessage.FACTOR_FLAG_FORMAT_ERROR)
private String factorFlag;
@ApiModelProperty("监测点台账列表")
@@ -127,8 +127,8 @@ public class PqDevParam {
public static class UpdateParam extends PqDevParam {
@ApiModelProperty(value = "id", required = true)
@NotBlank(message = DevValidMessage.ID_NOT_BLANK)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DevValidMessage.ID_FORMAT_ERROR)
@NotBlank(message = DetectionValidMessage.ID_NOT_BLANK)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DetectionValidMessage.ID_FORMAT_ERROR)
private String id;
}
@@ -152,17 +152,17 @@ public class PqDevParam {
@ApiModelProperty("检测状态列表")
private List<
@Min(value = 0, message = DevValidMessage.CHECK_STATE_FORMAT_ERROR)
@Max(value = 3, message = DevValidMessage.CHECK_STATE_FORMAT_ERROR) Integer> checkStateList;
@Min(value = 0, message = DetectionValidMessage.CHECK_STATE_FORMAT_ERROR)
@Max(value = 3, message = DetectionValidMessage.CHECK_STATE_FORMAT_ERROR) Integer> checkStateList;
@ApiModelProperty("检测结果")
@Min(value = 0, message = DevValidMessage.CHECK_RESULT_FORMAT_ERROR)
@Max(value = 2, message = DevValidMessage.CHECK_RESULT_FORMAT_ERROR)
@Min(value = 0, message = DetectionValidMessage.CHECK_RESULT_FORMAT_ERROR)
@Max(value = 2, message = DetectionValidMessage.CHECK_RESULT_FORMAT_ERROR)
private Integer checkResult;
@ApiModelProperty("报告状态")
@Min(value = 0, message = DevValidMessage.REPORT_STATE_FORMAT_ERROR)
@Max(value = 2, message = DevValidMessage.REPORT_STATE_FORMAT_ERROR)
@Min(value = 0, message = DetectionValidMessage.REPORT_STATE_FORMAT_ERROR)
@Max(value = 2, message = DetectionValidMessage.REPORT_STATE_FORMAT_ERROR)
private Integer reportState;
}
@@ -170,23 +170,23 @@ public class PqDevParam {
@Data
public static class DeleteParam {
@ApiModelProperty(value = "ids")
private List<@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DevValidMessage.ID_FORMAT_ERROR) String> ids;
private List<@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DetectionValidMessage.ID_FORMAT_ERROR) String> ids;
@ApiModelProperty(value = "设备模式,字典表(数字、模拟、比对)", required = true)
@NotBlank(message = DevValidMessage.PATTERN_NOT_BLANK)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DevValidMessage.PATTERN_FORMAT_ERROR)
@NotBlank(message = DetectionValidMessage.PATTERN_NOT_BLANK)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DetectionValidMessage.PATTERN_FORMAT_ERROR)
private String pattern;
}
@Data
public static class BindPlanParam {
@ApiModelProperty("检测计划ID")
@NotNull(message = DevValidMessage.PLAN_ID_NOT_NULL)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DevValidMessage.PLAN_ID_FORMAT_ERROR)
@NotNull(message = DetectionValidMessage.PLAN_ID_NOT_NULL)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DetectionValidMessage.PLAN_ID_FORMAT_ERROR)
private String planId;
@ApiModelProperty("被检设备ID列表")
@NotNull(message = DevValidMessage.PQ_DEV_IDS_NOT_NULL)
@NotNull(message = DetectionValidMessage.PQ_DEV_IDS_NOT_NULL)
private List<String> pqDevIds;
}
}

View File

@@ -2,9 +2,8 @@ package com.njcn.gather.device.pojo.vo;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.gather.device.pojo.constant.DevValidMessage;
import com.njcn.gather.pojo.constant.DetectionValidMessage;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Range;
import javax.validation.constraints.NotBlank;
@@ -19,24 +18,24 @@ import javax.validation.constraints.Pattern;
public class CNDevExcel {
@Excel(name = "预投计划*", width = 20, orderNum = "1")
@NotBlank(message = DevValidMessage.PREINVESTMENT_PLAN_NOT_BLANK)
@NotBlank(message = DetectionValidMessage.PREINVESTMENT_PLAN_NOT_BLANK)
private String preinvestmentPlan;
@Excel(name = "设备编号(开始编号-结束编号,编号为数字)*", width = 50, orderNum = "2")
@NotBlank(message = DevValidMessage.NAME_NOT_BLANK)
@Pattern(regexp = PatternRegex.CN_DEV_NAME_REGEX, message = DevValidMessage.NAME_FORMAT_ERROR)
@NotBlank(message = DetectionValidMessage.NAME_NOT_BLANK)
@Pattern(regexp = PatternRegex.CN_DEV_NAME_REGEX, message = DetectionValidMessage.NAME_FORMAT_ERROR)
private String name;
@Excel(name = "设备类型*", width = 20, orderNum = "3")
@NotBlank(message = DevValidMessage.DEV_TYPE_NOT_BLANK)
@NotBlank(message = DetectionValidMessage.DEV_TYPE_NOT_BLANK)
private String devType;
@Excel(name = "通讯协议*", width = 15, orderNum = "4")
@NotBlank(message = DevValidMessage.PROTOCOL_NOT_BLANK)
@NotBlank(message = DetectionValidMessage.PROTOCOL_NOT_BLANK)
private String protocol;
@Excel(name = "是否加密*", width = 20, replace = {"否_0", "是_1"}, orderNum = "5")
@NotNull(message = DevValidMessage.ENCRYPTION_NOT_NULL)
@NotNull(message = DetectionValidMessage.ENCRYPTION_NOT_NULL)
private Integer encryptionFlag;
@Excel(name = "识别码(当加密时必填)", width = 30, orderNum = "6")
@@ -49,12 +48,12 @@ public class CNDevExcel {
private Integer factorFlag;
@Excel(name = "IP地址*", width = 20, orderNum = "9")
@NotBlank(message = DevValidMessage.IP_NOT_BLANK)
@Pattern(regexp = PatternRegex.IP_REGEX, message = DevValidMessage.IP_FORMAT_ERROR)
@NotBlank(message = DetectionValidMessage.IP_NOT_BLANK)
@Pattern(regexp = PatternRegex.IP_REGEX, message = DetectionValidMessage.IP_FORMAT_ERROR)
private String ip;
@Excel(name = "端口号*", width = 15, orderNum = "10")
@NotNull(message = DevValidMessage.PORT_NOT_NULL)
@Range(min = 1, max = 65535, message = DevValidMessage.PORT_RANGE_ERROR)
@NotNull(message = DetectionValidMessage.PORT_NOT_NULL)
@Range(min = 1, max = 65535, message = DetectionValidMessage.PORT_RANGE_ERROR)
private Integer port;
}

View File

@@ -2,8 +2,7 @@ package com.njcn.gather.device.pojo.vo;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.gather.device.pojo.constant.DevValidMessage;
import com.njcn.web.pojo.annotation.DateTimeStrValid;
import com.njcn.gather.pojo.constant.DetectionValidMessage;
import lombok.Data;
import org.hibernate.validator.constraints.Range;
@@ -24,24 +23,24 @@ public class ProvinceDevExcel implements Serializable {
private static final long serialVersionUID = 1L;
@Excel(name = "装置编号*", width = 20)
@NotBlank(message = DevValidMessage.FACTORYNO_NOT_BLANK)
@NotBlank(message = DetectionValidMessage.FACTORYNO_NOT_BLANK)
private String createId;
@Excel(name = "设备名称*", width = 20, orderNum = "2")
@NotBlank(message = DevValidMessage.NAME_NOT_BLANK)
@Pattern(regexp = PatternRegex.DEV_NAME_REGEX, message = DevValidMessage.NAME_FORMAT_ERROR)
@NotBlank(message = DetectionValidMessage.NAME_NOT_BLANK)
@Pattern(regexp = PatternRegex.DEV_NAME_REGEX, message = DetectionValidMessage.NAME_FORMAT_ERROR)
private String name;
@Excel(name = "设备类型*", width = 20, orderNum = "3")
@NotBlank(message = DevValidMessage.DEV_TYPE_NOT_BLANK)
@NotBlank(message = DetectionValidMessage.DEV_TYPE_NOT_BLANK)
private String devType;
@Excel(name = "设备厂家*", width = 20, orderNum = "7")
@NotBlank(message = DevValidMessage.MANUFACTURER_NOT_BLANK)
@NotBlank(message = DetectionValidMessage.MANUFACTURER_NOT_BLANK)
private String manufacturer;
@Excel(name = "出厂日期*", width = 25, format = "yyyy-MM-dd", orderNum = "8")
@NotNull(message = DevValidMessage.CREATEDATETIME_NOT_NULL)
@NotNull(message = DetectionValidMessage.CREATEDATETIME_NOT_NULL)
private LocalDate createDate;
@Excel(name = "固件版本", width = 15, orderNum = "9")
@@ -51,11 +50,11 @@ public class ProvinceDevExcel implements Serializable {
private String softwareVersion;
@Excel(name = "通讯协议*", width = 15, orderNum = "11")
@NotBlank(message = DevValidMessage.PROTOCOL_NOT_BLANK)
@NotBlank(message = DetectionValidMessage.PROTOCOL_NOT_BLANK)
private String protocol;
@Excel(name = "是否加密*", width = 20, replace = {"否_0", "是_1"}, orderNum = "12")
@NotNull(message = DevValidMessage.ENCRYPTION_NOT_NULL)
@NotNull(message = DetectionValidMessage.ENCRYPTION_NOT_NULL)
private Integer encryptionFlag;
@Excel(name = "识别码(当加密时必填)", width = 30, orderNum = "13")
@@ -68,12 +67,12 @@ public class ProvinceDevExcel implements Serializable {
private Integer factorFlag;
@Excel(name = "IP地址*", width = 20, orderNum = "16")
@NotBlank(message = DevValidMessage.IP_NOT_BLANK)
@Pattern(regexp = PatternRegex.IP_REGEX, message = DevValidMessage.IP_FORMAT_ERROR)
@NotBlank(message = DetectionValidMessage.IP_NOT_BLANK)
@Pattern(regexp = PatternRegex.IP_REGEX, message = DetectionValidMessage.IP_FORMAT_ERROR)
private String ip;
@Excel(name = "端口号*", width = 15, orderNum = "17")
@NotNull(message = DevValidMessage.PORT_NOT_NULL)
@Range(min = 1, max = 65535, message = DevValidMessage.PORT_RANGE_ERROR)
@NotNull(message = DetectionValidMessage.PORT_NOT_NULL)
@Range(min = 1, max = 65535, message = DetectionValidMessage.PORT_RANGE_ERROR)
private Integer port;
}