闸门监控
parent
e998019421
commit
2656d0e722
|
|
@ -0,0 +1,65 @@
|
|||
package com.gunshi.project.xyt.controller;
|
||||
|
||||
import com.gunshi.core.result.R;
|
||||
import com.gunshi.project.xyt.entity.vo.GateMonitorDataVo;
|
||||
import com.gunshi.project.xyt.model.AttGateB;
|
||||
import com.gunshi.project.xyt.service.AttGateBService;
|
||||
import com.gunshi.project.xyt.validate.markers.Insert;
|
||||
import com.gunshi.project.xyt.validate.markers.Update;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 描述: 水闸基本情况调查表
|
||||
* author: xusan
|
||||
* date: 2024-09-26 10:44:06
|
||||
*/
|
||||
@Tag(name = "水闸基本情况调查表")
|
||||
@RestController
|
||||
@RequestMapping(value="/attGateB")
|
||||
public class AttGateBController {
|
||||
|
||||
@Autowired
|
||||
private AttGateBService service;
|
||||
|
||||
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/insert")
|
||||
public R<AttGateB> insert(@Validated(Insert.class) @RequestBody AttGateB dto) {
|
||||
boolean result = service.save(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping("/update")
|
||||
public R<AttGateB> update(@Validated(Update.class) @RequestBody AttGateB dto) {
|
||||
boolean result = service.updateById(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除")
|
||||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
return R.ok(service.removeById(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "列表")
|
||||
@PostMapping("/list")
|
||||
public R<List<AttGateB>> list() {
|
||||
return R.ok(service.queryList());
|
||||
}
|
||||
|
||||
@Operation(summary = "监测数据")
|
||||
@GetMapping("/data")
|
||||
public R<List<GateMonitorDataVo>> dataList(@Schema(name = "gateCode",description = "水闸编码") @RequestParam("gateCode") String gateCode) {
|
||||
return R.ok(service.dataList(gateCode));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package com.gunshi.project.xyt.controller;
|
||||
|
||||
import com.gunshi.core.result.R;
|
||||
import com.gunshi.project.xyt.model.GatePore;
|
||||
import com.gunshi.project.xyt.service.GatePoreService;
|
||||
import com.gunshi.project.xyt.validate.markers.Insert;
|
||||
import com.gunshi.project.xyt.validate.markers.Update;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 描述: 闸孔信息表
|
||||
* author: xusan
|
||||
* date: 2024-09-26 10:44:57
|
||||
*/
|
||||
@Tag(name = "闸孔信息表")
|
||||
@RestController
|
||||
@RequestMapping(value="/gatePore")
|
||||
public class GatePoreController {
|
||||
|
||||
@Autowired
|
||||
private GatePoreService service;
|
||||
|
||||
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/insert")
|
||||
public R<GatePore> insert(@Validated(Insert.class) @RequestBody GatePore dto) {
|
||||
boolean result = service.save(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping("/update")
|
||||
public R<GatePore> update(@Validated(Update.class) @RequestBody GatePore dto) {
|
||||
boolean result = service.updateById(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除")
|
||||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
return R.ok(service.removeById(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "通过stcd获取闸孔开度")
|
||||
@GetMapping("/listByStcd")
|
||||
public R<List<GatePore>> list(@Schema(name = "stcd",description = "测站编码") @RequestParam("stcd") String stcd) {
|
||||
return R.ok(service.lambdaQuery().eq(GatePore::getStcd,stcd).orderByAsc(GatePore::getGateNumber).list());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.gunshi.project.xyt.entity.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author xusan
|
||||
* @Date 2023/7/4 10:28
|
||||
* @Notes
|
||||
**/
|
||||
@Data
|
||||
public class GateMonitorDataVo {
|
||||
|
||||
@Schema(description = "水闸编号")
|
||||
private String gateCode;
|
||||
|
||||
@Schema(description = "测站")
|
||||
private String stcd;
|
||||
|
||||
@Schema(description = "类型(1闸前水位站 2闸后水位站 3流量站)")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "时间")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date tm;
|
||||
|
||||
@Schema(description = "值")
|
||||
private BigDecimal value;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.gunshi.project.xyt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gunshi.project.xyt.entity.vo.GateMonitorDataVo;
|
||||
import com.gunshi.project.xyt.model.AttGateB;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 描述: 水闸基本情况调查表
|
||||
* author: xusan
|
||||
* date: 2024-09-26 10:44:06
|
||||
*/
|
||||
@Mapper
|
||||
public interface AttGateBMapper extends BaseMapper<AttGateB> {
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select t1.*,t2.z as value,t2.tm from public.gate_stbprp_rel t1
|
||||
left join public.st_river_r_real t2 on t1.stcd = t2.stcd
|
||||
where t1.type in (1,2)
|
||||
union all
|
||||
select t3.*,t4.q as value,t4.tm from public.gate_stbprp_rel t3
|
||||
left join public.st_water_r_real t4 on t3.stcd = t4.stcd
|
||||
where t3.type = 3
|
||||
</script>
|
||||
""")
|
||||
List<GateMonitorDataVo> dataList(@Param("gateCode") String gateCode);
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.gunshi.project.xyt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.gunshi.project.xyt.model.GatePore;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 描述: 闸孔信息表
|
||||
* author: xusan
|
||||
* date: 2024-09-26 10:44:57
|
||||
*/
|
||||
@Mapper
|
||||
public interface GatePoreMapper extends BaseMapper<GatePore> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,405 @@
|
|||
package com.gunshi.project.xyt.model;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 描述: 水闸基本情况调查表
|
||||
* author: xusan
|
||||
* date: 2024-09-26 10:44:05
|
||||
*/
|
||||
@Schema(description="水闸基本情况调查表")
|
||||
@Data
|
||||
@TableName("public.att_gate_b")
|
||||
public class AttGateB implements Serializable {
|
||||
|
||||
public final static String thisTableName = "AttGateB";
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 水闸工程代码
|
||||
*/
|
||||
@TableId(value="gate_code", type= IdType.AUTO)
|
||||
@Schema(description="水闸工程代码")
|
||||
@Size(max = 20,message = "水闸工程代码最大长度要小于 20")
|
||||
@NotBlank(message = "水闸工程代码不能为空")
|
||||
private String gateCode;
|
||||
|
||||
/**
|
||||
* 水闸名称
|
||||
*/
|
||||
@TableField(value="gate_name")
|
||||
@Schema(description="水闸名称")
|
||||
@Size(max = 100,message = "水闸名称最大长度要小于 100")
|
||||
@NotBlank(message = "水闸名称不能为空")
|
||||
private String gateName;
|
||||
|
||||
/**
|
||||
* 管理单位
|
||||
*/
|
||||
@TableField(value="eng_man_name")
|
||||
@Schema(description="管理单位")
|
||||
@Size(max = 255,message = "管理单位最大长度要小于 255")
|
||||
private String engManName;
|
||||
|
||||
/**
|
||||
* 所属行政位置
|
||||
*/
|
||||
@TableField(value="ad_namee")
|
||||
@Schema(description="所属行政位置")
|
||||
@Size(max = 255,message = "所属行政位置最大长度要小于 255")
|
||||
private String adNamee;
|
||||
|
||||
/**
|
||||
* 所在渠道
|
||||
*/
|
||||
@TableField(value="chan_name")
|
||||
@Schema(description="所在渠道")
|
||||
@Size(max = 255,message = "所在渠道最大长度要小于 255")
|
||||
private String chanName;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@TableField(value="lgtd")
|
||||
@Schema(description="经度")
|
||||
private BigDecimal lgtd;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@TableField(value="lttd")
|
||||
@Schema(description="纬度")
|
||||
private BigDecimal lttd;
|
||||
|
||||
/**
|
||||
* 桩号
|
||||
*/
|
||||
@TableField(value="bnch")
|
||||
@Schema(description="桩号")
|
||||
@Size(max = 12,message = "桩号最大长度要小于 12")
|
||||
private String bnch;
|
||||
|
||||
/**
|
||||
* 闸孔数量
|
||||
*/
|
||||
@TableField(value="gaor_num")
|
||||
@Schema(description="闸孔数量")
|
||||
private Integer gaorNum;
|
||||
|
||||
/**
|
||||
* 水闸类别:1分(泄)洪闸,2节制闸,3排(退)水闸,4引(进)水闸,5 挡潮闸,6 船闸,9其他
|
||||
*/
|
||||
@TableField(value="waga_type")
|
||||
@Schema(description="水闸类别:1分(泄)洪闸,2节制闸,3排(退)水闸,4引(进)水闸,5 挡潮闸,6 船闸,9其他")
|
||||
@Size(max = 50,message = "水闸类别:1分(泄)洪闸,2节制闸,3排(退)水闸,4引(进)水闸,5 挡潮闸,6 船闸,9其他最大长度要小于 50")
|
||||
private String wagaType;
|
||||
|
||||
/**
|
||||
* 闸门类型
|
||||
*/
|
||||
@TableField(value="gate_tp")
|
||||
@Schema(description="闸门类型")
|
||||
@Size(max = 30,message = "闸门类型最大长度要小于 30")
|
||||
private String gateTp;
|
||||
|
||||
/**
|
||||
* 闸门尺寸(m)
|
||||
*/
|
||||
@TableField(value="gate_size")
|
||||
@Schema(description="闸门尺寸(m)")
|
||||
@Size(max = 255,message = "闸门尺寸(m)最大长度要小于 255")
|
||||
private String gateSize;
|
||||
|
||||
/**
|
||||
* 动力类型:1手动,2电动,3手电两用
|
||||
*/
|
||||
@TableField(value="pwr_tp")
|
||||
@Schema(description="动力类型:1手动,2电动,3手电两用")
|
||||
@Size(max = 50,message = "动力类型:1手动,2电动,3手电两用最大长度要小于 50")
|
||||
private String pwrTp;
|
||||
|
||||
/**
|
||||
* 启闭设备类型:1卷扬式,2螺杆式,3凹轮式,4涡轮式,5丝杆式
|
||||
*/
|
||||
@TableField(value="hdgr_tp")
|
||||
@Schema(description="启闭设备类型:1卷扬式,2螺杆式,3凹轮式,4涡轮式,5丝杆式")
|
||||
@Size(max = 50,message = "启闭设备类型:1卷扬式,2螺杆式,3凹轮式,4涡轮式,5丝杆式最大长度要小于 50")
|
||||
private String hdgrTp;
|
||||
|
||||
/**
|
||||
* 进口高程(m)
|
||||
*/
|
||||
@TableField(value="in_ele")
|
||||
@Schema(description="进口高程(m)")
|
||||
private BigDecimal inEle;
|
||||
|
||||
/**
|
||||
* 出口高程(m)
|
||||
*/
|
||||
@TableField(value="out_ele")
|
||||
@Schema(description="出口高程(m)")
|
||||
private BigDecimal outEle;
|
||||
|
||||
/**
|
||||
* 设计流量(m3/s)
|
||||
*/
|
||||
@TableField(value="dsfl")
|
||||
@Schema(description="设计流量(m3/s)")
|
||||
private BigDecimal dsfl;
|
||||
|
||||
/**
|
||||
* 实达流量(m3/s)
|
||||
*/
|
||||
@TableField(value="stfl")
|
||||
@Schema(description="实达流量(m3/s)")
|
||||
private BigDecimal stfl;
|
||||
|
||||
/**
|
||||
* 建成时间
|
||||
*/
|
||||
@TableField(value="comp_date")
|
||||
@Schema(description="建成时间")
|
||||
@Size(max = 10,message = "建成时间最大长度要小于 10")
|
||||
private String compDate;
|
||||
|
||||
/**
|
||||
* 更新或维修时间
|
||||
*/
|
||||
@TableField(value="updser_date")
|
||||
@Schema(description="更新或维修时间")
|
||||
@Size(max = 10,message = "更新或维修时间最大长度要小于 10")
|
||||
private String updserDate;
|
||||
|
||||
/**
|
||||
* 更新或维修原因
|
||||
*/
|
||||
@TableField(value="updser_rsn")
|
||||
@Schema(description="更新或维修原因")
|
||||
@Size(max = 50,message = "更新或维修原因最大长度要小于 50")
|
||||
private String updserRsn;
|
||||
|
||||
/**
|
||||
* 更新或维修投资
|
||||
*/
|
||||
@TableField(value="updser_invst")
|
||||
@Schema(description="更新或维修投资")
|
||||
private BigDecimal updserInvst;
|
||||
|
||||
/**
|
||||
* 工程等别:1Ⅰ,2Ⅱ,3Ⅲ,4Ⅳ,5Ⅴ
|
||||
*/
|
||||
@TableField(value="eng_grad")
|
||||
@Schema(description="工程等别:1Ⅰ,2Ⅱ,3Ⅲ,4Ⅳ,5Ⅴ")
|
||||
@Size(max = 50,message = "工程等别:1Ⅰ,2Ⅱ,3Ⅲ,4Ⅳ,5Ⅴ最大长度要小于 50")
|
||||
private String engGrad;
|
||||
|
||||
/**
|
||||
* 运行情况:1在用良好,2在用故障,3停用
|
||||
*/
|
||||
@TableField(value="run_stat")
|
||||
@Schema(description="运行情况:1在用良好,2在用故障,3停用")
|
||||
@Size(max = 50,message = "运行情况:1在用良好,2在用故障,3停用最大长度要小于 50")
|
||||
private String runStat;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField(value="note")
|
||||
@Schema(description="备注")
|
||||
@Size(max = 255,message = "备注最大长度要小于 255")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 起点经度
|
||||
*/
|
||||
@TableField(value="start_long")
|
||||
@Schema(description="起点经度")
|
||||
private BigDecimal startLong;
|
||||
|
||||
/**
|
||||
* 起点纬度
|
||||
*/
|
||||
@TableField(value="start_lat")
|
||||
@Schema(description="起点纬度")
|
||||
private BigDecimal startLat;
|
||||
|
||||
/**
|
||||
* 终点经度
|
||||
*/
|
||||
@TableField(value="end_long")
|
||||
@Schema(description="终点经度")
|
||||
private BigDecimal endLong;
|
||||
|
||||
/**
|
||||
* 终点纬度
|
||||
*/
|
||||
@TableField(value="end_lat")
|
||||
@Schema(description="终点纬度")
|
||||
private BigDecimal endLat;
|
||||
|
||||
/**
|
||||
* 水闸用途
|
||||
*/
|
||||
@TableField(value="waga_use")
|
||||
@Schema(description="水闸用途")
|
||||
@Size(max = 255,message = "水闸用途最大长度要小于 255")
|
||||
private String wagaUse;
|
||||
|
||||
/**
|
||||
* 取水水源类型:1水库,2湖泊,3河流,4其他
|
||||
*/
|
||||
@TableField(value="wain_waso_type")
|
||||
@Schema(description="取水水源类型:1水库,2湖泊,3河流,4其他")
|
||||
@Size(max = 50,message = "取水水源类型:1水库,2湖泊,3河流,4其他最大长度要小于 50")
|
||||
private String wainWasoType;
|
||||
|
||||
/**
|
||||
* 最大过闸流量(m3/s)
|
||||
*/
|
||||
@TableField(value="lock_disc")
|
||||
@Schema(description="最大过闸流量(m3/s)")
|
||||
private BigDecimal lockDisc;
|
||||
|
||||
/**
|
||||
* 装机功率(kw)
|
||||
*/
|
||||
@TableField(value="ins_pow")
|
||||
@Schema(description="装机功率(kw)")
|
||||
private BigDecimal insPow;
|
||||
|
||||
/**
|
||||
* 设计装机总容量(mw)
|
||||
*/
|
||||
@TableField(value="des_tot_ins_cap")
|
||||
@Schema(description="设计装机总容量(mw)")
|
||||
@Size(max = 255,message = "设计装机总容量(mw)最大长度要小于 255")
|
||||
private String desTotInsCap;
|
||||
|
||||
/**
|
||||
* 工程建设情况:0未建,1在建,2已建
|
||||
*/
|
||||
@TableField(value="eng_stat")
|
||||
@Schema(description="工程建设情况:0未建,1在建,2已建")
|
||||
@Size(max = 50,message = "工程建设情况:0未建,1在建,2已建最大长度要小于 50")
|
||||
private String engStat;
|
||||
|
||||
/**
|
||||
* 开工时间
|
||||
*/
|
||||
@TableField(value="start_date")
|
||||
@Schema(description="开工时间")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date startDate;
|
||||
|
||||
/**
|
||||
* 归口管理部门:1水利部门,2电力部门,3农业部门,4 林业部门,5城建部门,6航运部门,7环保部门,9其他部门
|
||||
*/
|
||||
@TableField(value="adm_dep")
|
||||
@Schema(description="归口管理部门:1水利部门,2电力部门,3农业部门,4 林业部门,5城建部门,6航运部门,7环保部门,9其他部门")
|
||||
@Size(max = 1,message = "归口管理部门:1水利部门,2电力部门,3农业部门,4 林业部门,5城建部门,6航运部门,7环保部门,9其他部门最大长度要小于 1")
|
||||
private String admDep;
|
||||
|
||||
/**
|
||||
* 属性采集时间
|
||||
*/
|
||||
@TableField(value="coll_date")
|
||||
@Schema(description="属性采集时间")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date collDate;
|
||||
|
||||
/**
|
||||
* 属性更新时间
|
||||
*/
|
||||
@TableField(value="upd_date")
|
||||
@Schema(description="属性更新时间")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date updDate;
|
||||
|
||||
/**
|
||||
* 是否可控 0 否 1 是
|
||||
*/
|
||||
@TableField(value="ctrl_type")
|
||||
@Schema(description="是否可控 0 否 1 是")
|
||||
private Integer ctrlType;
|
||||
|
||||
/**
|
||||
* 闸控代码
|
||||
*/
|
||||
@TableField(value="stcd")
|
||||
@Schema(description="闸控代码")
|
||||
@Size(max = 10,message = "闸控代码最大长度要小于 10")
|
||||
private String stcd;
|
||||
|
||||
/**
|
||||
* 独立密码
|
||||
*/
|
||||
@TableField(value="ctrl_pass")
|
||||
@Schema(description="独立密码")
|
||||
@Size(max = 16,message = "独立密码最大长度要小于 16")
|
||||
@NotBlank(message = "独立密码不能为空")
|
||||
private String ctrlPass;
|
||||
|
||||
/**
|
||||
* max_hgt
|
||||
*/
|
||||
@TableField(value="max_hgt")
|
||||
@Schema(description="max_hgt")
|
||||
private BigDecimal maxHgt;
|
||||
|
||||
/**
|
||||
* min_hgt
|
||||
*/
|
||||
@TableField(value="min_hgt")
|
||||
@Schema(description="min_hgt")
|
||||
private BigDecimal minHgt;
|
||||
|
||||
/**
|
||||
* protocol
|
||||
*/
|
||||
@TableField(value="protocol")
|
||||
@Schema(description="protocol")
|
||||
@Size(max = 50,message = "protocol最大长度要小于 50")
|
||||
private String protocol;
|
||||
|
||||
/**
|
||||
* plc控制版本,1自动令,2手动令,空非plc
|
||||
*/
|
||||
@TableField(value="plc_type")
|
||||
@Schema(description="plc控制版本,1自动令,2手动令,空非plc")
|
||||
private Integer plcType;
|
||||
|
||||
/**
|
||||
* sort_order
|
||||
*/
|
||||
@TableField(value="sort_order")
|
||||
@Schema(description="sort_order")
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 楚禹rtu摄像头数量
|
||||
*/
|
||||
@TableField(value="camera_num")
|
||||
@Schema(description="楚禹rtu摄像头数量")
|
||||
private Integer cameraNum;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "文件集合")
|
||||
private List<FileAssociations> files;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,134 @@
|
|||
package com.gunshi.project.xyt.model;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 描述: 闸孔信息表
|
||||
* author: xusan
|
||||
* date: 2024-09-26 10:44:56
|
||||
*/
|
||||
@Schema(description="闸孔信息表")
|
||||
@Data
|
||||
@TableName("public.gate_pore")
|
||||
public class GatePore implements Serializable {
|
||||
|
||||
public final static String thisTableName = "GatePore";
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* stcd
|
||||
*/
|
||||
@TableId(value="stcd", type= IdType.AUTO)
|
||||
@Schema(description="stcd")
|
||||
@Size(max = 16,message = "stcd最大长度要小于 16")
|
||||
@NotBlank(message = "stcd不能为空")
|
||||
private String stcd;
|
||||
|
||||
/**
|
||||
* 第几个闸门
|
||||
*/
|
||||
@TableField(value="gate_number")
|
||||
@Schema(description="第几个闸门")
|
||||
private Integer gateNumber;
|
||||
|
||||
/**
|
||||
* 实际开度
|
||||
*/
|
||||
@TableField(value="real_aperture")
|
||||
@Schema(description="实际开度")
|
||||
private BigDecimal realAperture;
|
||||
|
||||
/**
|
||||
* 设定开度
|
||||
*/
|
||||
@TableField(value="set_aperture")
|
||||
@Schema(description="设定开度")
|
||||
private BigDecimal setAperture;
|
||||
|
||||
/**
|
||||
* 传感器水位
|
||||
*/
|
||||
@TableField(value="sensor_lever")
|
||||
@Schema(description="传感器水位")
|
||||
private BigDecimal sensorLever;
|
||||
|
||||
/**
|
||||
* 海拔水位
|
||||
*/
|
||||
@TableField(value="altitude_lever")
|
||||
@Schema(description="海拔水位")
|
||||
private BigDecimal altitudeLever;
|
||||
|
||||
/**
|
||||
* 闸门远控信号,如果是0,则不能通过指令控制
|
||||
*/
|
||||
@TableField(value="remote_signal")
|
||||
@Schema(description="闸门远控信号,如果是0,则不能通过指令控制")
|
||||
private Integer remoteSignal;
|
||||
|
||||
/**
|
||||
* 闸门电源故障信号
|
||||
*/
|
||||
@TableField(value="power_signal")
|
||||
@Schema(description="闸门电源故障信号")
|
||||
private Integer powerSignal;
|
||||
|
||||
/**
|
||||
* 闸门开闸中
|
||||
*/
|
||||
@TableField(value="opening_signal")
|
||||
@Schema(description="闸门开闸中")
|
||||
private Integer openingSignal;
|
||||
|
||||
/**
|
||||
* 闸门关闸中
|
||||
*/
|
||||
@TableField(value="closeing_signal")
|
||||
@Schema(description="闸门关闸中")
|
||||
private Integer closeingSignal;
|
||||
|
||||
/**
|
||||
* 闸门故障
|
||||
*/
|
||||
@TableField(value="error_signal")
|
||||
@Schema(description="闸门故障")
|
||||
private Integer errorSignal;
|
||||
|
||||
/**
|
||||
* 闸门全开
|
||||
*/
|
||||
@TableField(value="opened_signal")
|
||||
@Schema(description="闸门全开")
|
||||
private Integer openedSignal;
|
||||
|
||||
/**
|
||||
* 闸门全关
|
||||
*/
|
||||
@TableField(value="closed_signal")
|
||||
@Schema(description="闸门全关")
|
||||
private Integer closedSignal;
|
||||
|
||||
/**
|
||||
* tm
|
||||
*/
|
||||
@TableField(value="tm")
|
||||
@Schema(description="tm")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date tm;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package com.gunshi.project.xyt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gunshi.project.xyt.entity.vo.GateMonitorDataVo;
|
||||
import com.gunshi.project.xyt.mapper.AttGateBMapper;
|
||||
import com.gunshi.project.xyt.model.AttGateB;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 描述: 水闸基本情况调查表
|
||||
* author: xusan
|
||||
* date: 2024-09-26 10:44:06
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class AttGateBService extends ServiceImpl<AttGateBMapper, AttGateB>
|
||||
{
|
||||
@Autowired
|
||||
private FileAssociationsService fileService;
|
||||
|
||||
public List<AttGateB> queryList() {
|
||||
List<AttGateB> list = this.list();
|
||||
if(CollectionUtils.isNotEmpty(list)){
|
||||
fillAttach(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
private void fillAttach(List<AttGateB> list) {
|
||||
for (AttGateB record : list) {
|
||||
record.setFiles(fileService.getFiles(getGroupId(),record.getGateCode()));
|
||||
}
|
||||
}
|
||||
|
||||
private String getGroupId() {
|
||||
return "attGateB";
|
||||
}
|
||||
|
||||
public List<GateMonitorDataVo> dataList(String gateCode) {
|
||||
return this.baseMapper.dataList(gateCode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.gunshi.project.xyt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gunshi.project.xyt.mapper.GatePoreMapper;
|
||||
import com.gunshi.project.xyt.model.GatePore;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 描述: 闸孔信息表
|
||||
* author: xusan
|
||||
* date: 2024-09-26 10:44:57
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class GatePoreService extends ServiceImpl<GatePoreMapper, GatePore>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue