修改验证
This commit is contained in:
parent
c0e73fccfc
commit
4e56ac3733
|
@ -6,10 +6,7 @@ import com.isu.gaswellwatch.dto.modbus.ModbusCommandDto;
|
|||
import com.isu.gaswellwatch.vo.command.etc.PlungerTimer;
|
||||
import com.isu.gaswellwatch.vo.command.etc.SensorDelay;
|
||||
import com.isu.gaswellwatch.vo.command.knpcv1.mode.*;
|
||||
import com.isu.gaswellwatch.vo.command.scss.ControlMode;
|
||||
import com.isu.gaswellwatch.vo.command.scss.PlungerLogicMode;
|
||||
import com.isu.gaswellwatch.vo.command.scss.SimpleLogicMode;
|
||||
import com.isu.gaswellwatch.vo.command.scss.SystemInfo;
|
||||
import com.isu.gaswellwatch.vo.command.scss.*;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -44,6 +41,9 @@ import java.util.Objects;
|
|||
@JsonSubTypes.Type(value = ControlMode.class, name = Command.SCSS_CONTROL_MODE),
|
||||
@JsonSubTypes.Type(value = SimpleLogicMode.class, name = Command.SCSS_SIMPLE_LOGIC_MODE),
|
||||
@JsonSubTypes.Type(value = PlungerLogicMode.class, name = Command.SCSS_PLUNGER_LOGIC_MODE),
|
||||
@JsonSubTypes.Type(value = CasingMode.class, name = Command.SCSS_CASING_MODE),
|
||||
@JsonSubTypes.Type(value = SamplingInterval.class, name = Command.SCSS_SAMPLING_INTERVAL_MODE),
|
||||
@JsonSubTypes.Type(value = TimeMode.class, name = Command.SCSS_TIME_MODE),
|
||||
@JsonSubTypes.Type(value = com.isu.gaswellwatch.vo.command.etc.TurnOn.class, name = Command.ETC_TURN_ON_THE_WELL),
|
||||
@JsonSubTypes.Type(value = com.isu.gaswellwatch.vo.command.etc.TurnOff.class, name = Command.ETC_TURN_OFF_THE_WELL),
|
||||
@JsonSubTypes.Type(value = com.isu.gaswellwatch.vo.command.scss.TurnOn.class, name = Command.SCSS_TURN_ON_THE_WELL),
|
||||
|
|
|
@ -2,6 +2,8 @@ package com.isu.gaswellwatch.vo.command.scss;
|
|||
|
||||
import com.isu.gaswellwatch.dto.modbus.ModbusCommandDto;
|
||||
import com.isu.gaswellwatch.vo.command.Command;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
@ -29,10 +31,12 @@ public class SamplingInterval extends Command {
|
|||
/**
|
||||
* 连续采样间隔
|
||||
*/
|
||||
@NotNull(message = "连续采样间隔不能为空且需大于0")
|
||||
private int continuousSamplingIntervalDuration;
|
||||
/**
|
||||
* 到达传感器有效电平
|
||||
*/
|
||||
@NotNull(message = "到达传感器有效电平不能为空且需大于0")
|
||||
private BigDecimal sensorSignalEffectiveLevel;
|
||||
|
||||
public SamplingInterval() {
|
||||
|
|
|
@ -77,10 +77,10 @@
|
|||
from ${tableName} t
|
||||
<where>
|
||||
t.device_id = #{deviceId}
|
||||
<if test="startTime!=null">
|
||||
<if test="startTime!=null and startTime!=''">
|
||||
and t.collection_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime!=null">
|
||||
<if test="endTime!=null and endTime!=''">
|
||||
and t.collection_time <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
|
@ -89,10 +89,10 @@
|
|||
|
||||
<select id="deviceOptLogPage" resultType="com.isu.gaswellwatch.entity.DeviceOptLog">
|
||||
select t.* from device_opt_log t where t.device_id = #{deviceId}
|
||||
<if test="startTime!=null">
|
||||
<if test="startTime!=null and startTime!=''">
|
||||
and t.create_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime!=null">
|
||||
<if test="endTime!=null and endTime!=''">
|
||||
and t.create_time <= #{endTime}
|
||||
</if>
|
||||
order by t.create_time desc
|
||||
|
@ -113,10 +113,10 @@
|
|||
from ${tableName} t
|
||||
<where>
|
||||
t.device_id = #{deviceId}
|
||||
<if test="startTime!=null">
|
||||
<if test="startTime!=null and startTime!=''">
|
||||
and t.collection_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime!=null">
|
||||
<if test="endTime!=null and endTime!=''">
|
||||
and t.collection_time <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
|
@ -131,10 +131,10 @@
|
|||
from ${tableName} t
|
||||
<where>
|
||||
t.device_id = #{deviceId}
|
||||
<if test="startTime!=null">
|
||||
<if test="startTime!=null and startTime!=''">
|
||||
and t.collection_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime!=null">
|
||||
<if test="endTime!=null and endTime!=''">
|
||||
and t.collection_time <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
|
|
Loading…
Reference in New Issue