闸阀关联视频点分页查询修改,新增修改
parent
87a80f07f1
commit
0b2a575612
|
|
@ -64,6 +64,7 @@ public class GateValveCctvRelController {
|
||||||
.count() > 0) {
|
.count() > 0) {
|
||||||
throw new IllegalArgumentException("当前编号已关联");
|
throw new IllegalArgumentException("当前编号已关联");
|
||||||
}
|
}
|
||||||
|
dto.setCreateTime(null);
|
||||||
boolean result = service.updateById(dto);
|
boolean result = service.updateById(dto);
|
||||||
return R.ok(result ? dto : null);
|
return R.ok(result ? dto : null);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,10 @@ public interface GateValveCctvRelMapper extends BaseMapper<GateValveCctvRel> {
|
||||||
LEFT JOIN public.att_cctv_base acb ON t.index_code = acb.index_code
|
LEFT JOIN public.att_cctv_base acb ON t.index_code = acb.index_code
|
||||||
<where>
|
<where>
|
||||||
<if test="obj.valveName != null and obj.valveName !=''">
|
<if test="obj.valveName != null and obj.valveName !=''">
|
||||||
agv.valve_name LIKE concat('%',#{obj.valveName},'%')
|
AND agv.valve_name LIKE '%'||#{obj.valveName}||'%'
|
||||||
</if>
|
</if>
|
||||||
<if test="obj.indexName != null and obj.indexName !=''">
|
<if test="obj.indexName != null and obj.indexName !=''">
|
||||||
acb.name LIKE concat('%',#{obj.indexName},'%')
|
AND acb.name LIKE '%'||#{obj.indexName}||'%'
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
<if test="obj.orderField != null and obj.orderField !=''">
|
<if test="obj.orderField != null and obj.orderField !=''">
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,10 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import com.gunshi.core.dateformat.DateFormatString;
|
||||||
import com.gunshi.project.xyt.validate.markers.Insert;
|
import com.gunshi.project.xyt.validate.markers.Insert;
|
||||||
import com.gunshi.project.xyt.validate.markers.Update;
|
import com.gunshi.project.xyt.validate.markers.Update;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
@ -45,7 +47,7 @@ public class GateValveCctvRel implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value="valve_code")
|
@TableField(value="valve_code")
|
||||||
@Schema(description="闸阀编号")
|
@Schema(description="闸阀编号")
|
||||||
@Size(max = 20,message = "闸阀编号最大长度要小于 20")
|
@Size(max = 100,message = "闸阀编号最大长度要小于 100")
|
||||||
@NotBlank(message = "闸阀编号不能为空", groups = {Insert.class,Update.class})
|
@NotBlank(message = "闸阀编号不能为空", groups = {Insert.class,Update.class})
|
||||||
private String valveCode;
|
private String valveCode;
|
||||||
|
|
||||||
|
|
@ -54,7 +56,7 @@ public class GateValveCctvRel implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value="index_code")
|
@TableField(value="index_code")
|
||||||
@Schema(description="视频点")
|
@Schema(description="视频点")
|
||||||
@Size(max = 150,message = "视频点最大长度要小于 150")
|
@Size(max = 100,message = "视频点最大长度要小于 100")
|
||||||
@NotBlank(message = "视频点不能为空", groups = {Insert.class,Update.class})
|
@NotBlank(message = "视频点不能为空", groups = {Insert.class,Update.class})
|
||||||
private String indexCode;
|
private String indexCode;
|
||||||
|
|
||||||
|
|
@ -63,6 +65,7 @@ public class GateValveCctvRel implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value="create_time")
|
@TableField(value="create_time")
|
||||||
@Schema(description="创建时间")
|
@Schema(description="创建时间")
|
||||||
|
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue