diff --git a/src/main/java/com/xydl/cac/old/ArrVo.java b/src/main/java/com/xydl/cac/old/ArrVo.java new file mode 100644 index 0000000..1416caa --- /dev/null +++ b/src/main/java/com/xydl/cac/old/ArrVo.java @@ -0,0 +1,35 @@ +package com.xydl.cac.old; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @author Leo_Feng + * @date 2021-09-17 + */ +@Data +public class ArrVo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 观测字段 + */ + @ApiModelProperty(value="观测字段", name="equipment") + private String equipment; + + /** + * 值集合 + */ + @ApiModelProperty(value="值集合", name="currentVals") + private List currentVals; + + /** + * 时间集合 + */ + @ApiModelProperty(value="时间集合", name="dTimes") + private List dTimes; +} diff --git a/src/main/java/com/xydl/cac/old/ArresterController.java b/src/main/java/com/xydl/cac/old/ArresterController.java new file mode 100644 index 0000000..5ba7aed --- /dev/null +++ b/src/main/java/com/xydl/cac/old/ArresterController.java @@ -0,0 +1,43 @@ +package com.xydl.cac.old; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +@Api(tags = "旧接口") +@RestController +@RequestMapping("BlqController") +public class ArresterController { + + @Resource + OldService service; + + /** + * 查询避雷器表格数据 + * + * @param eqmid + * @return + */ + @ApiOperation(value = "查询避雷器表格数据") + @GetMapping(value = "/queryTableData/{eqmid}") + public AjaxResult queryTableData(@PathVariable Integer eqmid) { + return AjaxResult.success(service.queryTableDataList2(eqmid)); + } + + /** + * 查询避雷器趋势图数据 + * + * @param eqmid + * @return + */ + @ApiOperation(value = "查询避雷器趋势图数据") + @GetMapping(value = "/queryLineData/{eqmid}") + public AjaxResult queryLineData(@PathVariable Integer eqmid) { + return AjaxResult.success(service.queryLineDataList2(eqmid)); + } +} diff --git a/src/main/java/com/xydl/cac/old/ArresterVo.java b/src/main/java/com/xydl/cac/old/ArresterVo.java new file mode 100644 index 0000000..60e431d --- /dev/null +++ b/src/main/java/com/xydl/cac/old/ArresterVo.java @@ -0,0 +1,190 @@ +package com.xydl.cac.old; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * @author Bobi_huo + * @date 2020-12-25 18:31 + */ +@Data +public class ArresterVo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * @Fields 设备id + */ + @ApiModelProperty(value="设备id", name="eqmId") + private Integer eqmId; + + /** + * @Fields 创建时间 + */ + @ApiModelProperty(value="创建时间", name="dTime") + private String dTime; + + /** + * @Fields A相系统电压 + */ + @ApiModelProperty(value="A相系统电压", name="ptA") + private String ptA; + + /** + * @Fields A相全电流 + */ + @ApiModelProperty(value="A相全电流", name="lcA") + private String lcA; + + /** + * @Fields A相阻性电流 + */ + @ApiModelProperty(value="A相阻性电流", name="rcA") + private String rcA; + + /** + * @Fields B相系统电压 + */ + @ApiModelProperty(value="B相系统电压", name="ptB") + private String ptB; + + /** + * @Fields B相全电流 + */ + @ApiModelProperty(value="B相全电流", name="lcB") + private String lcB; + + /** + * @Fields B相阻性电流 + */ + @ApiModelProperty(value="B相阻性电流", name="rcB") + private String rcB; + + /** + * @Fields C相系统电压 + */ + @ApiModelProperty(value="C相系统电压", name="ptC") + private String ptC; + + /** + * @Fields C相全电流 + */ + @ApiModelProperty(value="C相全电流", name="lcC") + private String lcC; + + /** + * @Fields C相阻性电流 + */ + @ApiModelProperty(value="C相阻性电流", name="rcC") + private String rcC; + + /** + * @Fields A相最近落雷时间 + */ + @ApiModelProperty(value="A相最近落雷时间", name="lastLigtmA") + private String lastLigtmA; + + /** + * @Fields A相累计落雷次数 + */ + @ApiModelProperty(value="A相累计落雷次数", name="ligcntA") + private String ligcntA; + + /** + * @Fields A相容性电流 + */ + @ApiModelProperty(value="A相容性电流", name="cacUrA") + private String cacUrA; + + /** + * @Fields A相阻容比 + */ + @ApiModelProperty(value="A相阻容比", name="riScarteA") + private String riScarteA; + + /** + * @Fields A相IED与监测设备通讯异常 + */ + @ApiModelProperty(value="A相IED与监测设备通讯异常", name="modeVconfA") + private String modeVconfA; + + /** + * @Fields A相设备运行异常 + */ + @ApiModelProperty(value="A相设备运行异常", name="supDevRunA") + private String supDevRunA; + + /** + * @Fields B相最近落雷时间 + */ + @ApiModelProperty(value="B相最近落雷时间", name="lastLigtmB") + private String lastLigtmB; + + /** + * @Fields B相累计落雷次数 + */ + @ApiModelProperty(value="B相累计落雷次数", name="ligcntB") + private String ligcntB; + + /** + * @Fields B相容性电流 + */ + @ApiModelProperty(value="B相容性电流", name="cacUrB") + private String cacUrB; + + /** + * @Fields B相阻容比 + */ + @ApiModelProperty(value="B相阻容比", name="riScarteB") + private String riScarteB; + + /** + * @Fields B相IED与监测设备通讯异常 + */ + @ApiModelProperty(value="B相IED与监测设备通讯异常", name="modeVconfB") + private String modeVconfB; + + /** + * @Fields B相设备运行异常 + */ + @ApiModelProperty(value="B相设备运行异常", name="supDevRunB") + private String supDevRunB; + + /** + * @Fields C相最近落雷时间 + */ + @ApiModelProperty(value="C相最近落雷时间", name="lastLigtmC") + private String lastLigtmC; + + /** + * @Fields C相累计落雷次数 + */ + @ApiModelProperty(value="C相累计落雷次数", name="ligcntC") + private String ligcntC; + + /** + * @Fields C相容性电流 + */ + @ApiModelProperty(value="C相容性电流", name="cacUrC") + private String cacUrC; + + /** + * @Fields C相阻容比 + */ + @ApiModelProperty(value="C相阻容比", name="riScarteC") + private String riScarteC; + + /** + * @Fields C相IED与监测设备通讯异常 + */ + @ApiModelProperty(value="C相IED与监测设备通讯异常", name="modeVconfC") + private String modeVconfC; + + /** + * @Fields C相设备运行异常 + */ + @ApiModelProperty(value="C相设备运行异常", name="supDevRunC") + private String supDevRunC; +} diff --git a/src/main/java/com/xydl/cac/old/CableCirculationController.java b/src/main/java/com/xydl/cac/old/CableCirculationController.java new file mode 100644 index 0000000..c83b708 --- /dev/null +++ b/src/main/java/com/xydl/cac/old/CableCirculationController.java @@ -0,0 +1,169 @@ +package com.xydl.cac.old; + + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +@Api(tags = "旧接口") +@RestController +@RequestMapping("cableCirculationController") +public class CableCirculationController { + + @Resource + OldService service; + +// /** +// * 获取电缆环流设备 +// * +// * @return +// */ +// @ApiOperation(value = "获取电缆环流设备") +// @GetMapping(value = "/getDevice") +// public AjaxResult getDeviceInfo() { +// return AjaxResult.success(circulationService.getDeviceInfo()); +// } +// +// /** +// * 查询电缆环流历史数据 +// * +// * @return +// */ +// @ApiOperation(value = "查询电缆环流历史数据") +// @PostMapping(value = "/queryHistoryData") +// public AjaxResult queryHistoryDataList(@RequestBody CableCirculationDto dto) { +// return AjaxResult.success(circulationService.queryHistoryDataList(dto)); +// } +// +// /** +// * 查询不同相位最近时间的数据 +// * +// * @param zid +// * @returnqueryDataByTime +// */ +// @ApiOperation(value = "查询不同相位最近时间的数据") +// @GetMapping(value = "/query/{zid}") +// public AjaxResult queryLastTime(@PathVariable("zid") String zid) { +// return AjaxResult.success(circulationService.queryLastTime(zid)); +// } +// +// /** +// * 根据时间查询统计数据(默认查询15天) +// * +// * @param dto +// * @return +// */ +// @ApiOperation(value = "根据时间查询统计数据(默认查询15天)") +// @PostMapping(value = "/queryDataByTime") +// public AjaxResult queryDataByTime(@RequestBody CableCirculationStatisticsDto dto) { +// return AjaxResult.success(circulationService.queryDataByTime(dto)); +// } + + /** + * 获取告警信息列表 + * + * @param dto + * @return + */ + @ApiOperation(value = "获取告警信息列表") + @PostMapping(value = "/page") + public AjaxResult page(@RequestBody CableWarningDto dto) { + return AjaxResult.success(service.selectPages(dto)); + } + +// /** +// * 获取二级告警信息 +// * +// * @param dto +// * @return +// */ +// @ApiOperation(value = "获取二级告警信息") +// @PostMapping(value = "/secondPage") +// public AjaxResult getSecondPage(@RequestBody CableWarningDto dto) { +// return AjaxResult.success(circulationService.getWarningPage(dto)); +// } +// +// /** +// * 处理告警信息 +// */ +// @ApiOperation(value = "修改告警信息") +// @PostMapping(value = "/deal") +// public AjaxResult deal(@RequestBody CableWarningDto dto) { +// return returnAjax(circulationService.alarmHandling(dto)); +// } +// +// /** +// * 导出电缆环流实时数据 +// * +// * @param dto +// * @return +// */ +// @ApiOperation(value = "导出电缆环流实时数据") +// @PostMapping(value = "/exportCableByCondition") +// public AjaxResult exportCableByCondition(@RequestBody CableCirculationDto dto) { +// return circulationService.exportCableData(dto); +// } +// +// /** +// * 新增电缆环流阈值 +// * +// * @param dto +// * @return +// */ +// @ApiOperation(value = "设置电缆环流阈值") +// @PostMapping(value = "/setThreshold") +// public AjaxResult setThreshold(@RequestBody CableThresholdDto dto) { +// return circulationService.setThreshold(dto); +// } +// +// +// /** +// * 新增电缆环流阈值 +// * +// * @param dto +// * @return +// */ +// @ApiOperation(value = "新增电缆环流阈值") +// @PostMapping(value = "/add") +// public AjaxResult saveThreshold(@RequestBody CableThresholdDto dto) { +// return circulationService.saveThreshold(dto); +// } +// +// /** +// * 修改电缆环流阈值 +// * +// * @param dto +// * @return +// */ +// @ApiOperation(value = "修改电缆环流阈值") +// @PostMapping(value = "/update") +// public AjaxResult updateThreshold(@RequestBody CableThresholdDto dto) { +// return circulationService.updateThreshold(dto); +// } +// +// /** +// * 获取电缆环流阈值信息 +// * +// * @param eqmId +// * @return +// */ +// @ApiOperation(value = "获取电缆环流阈值信息") +// @GetMapping(value = "/getThreshold/{eqmId}") +// public AjaxResult getThreshold(@PathVariable("eqmId") String eqmId) { +// return AjaxResult.success(circulationService.getThreshold(eqmId)); +// } +// +// /** +// * 获取当前设备的相位 +// * +// * @param zid +// * @return +// */ +// @ApiOperation(value = "获取电缆环流阈值信息") +// @GetMapping(value = "/getPhase/{zid}") +// public AjaxResult getPhase(@PathVariable("zid") String zid) { +// return AjaxResult.success(circulationService.getPhase(zid)); +// } +} diff --git a/src/main/java/com/xydl/cac/old/CableWarningDto.java b/src/main/java/com/xydl/cac/old/CableWarningDto.java new file mode 100644 index 0000000..0dab947 --- /dev/null +++ b/src/main/java/com/xydl/cac/old/CableWarningDto.java @@ -0,0 +1,112 @@ +package com.xydl.cac.old; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * @author Bobi_huo + * @date 2020-12-22 13:50 + */ +@Data +public class CableWarningDto extends Query implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * @Fields id + */ + @ApiModelProperty(value="主键", name="id") + private String id; + + /** + * @Fields 设备id + */ + @ApiModelProperty(value="设备id", name="eqmId") + private String eqmId; + + /** + * @Fields 类型id + */ + @ApiModelProperty(value="类型id", name="lxid") + private String lxid; + + /** + * @Fields 间隔id + */ + @ApiModelProperty(value="间隔id", name="jgid") + private String jgid; + + /** + * @Fields 监测设备类型id + */ + @ApiModelProperty(value="监测设备类型id", name="mtid") + private String mtid; + + /** + * @Fields 告警时间 + */ + @ApiModelProperty(value="告警时间", name="warnTime") + private String warnTime; + + /** + * @Fields 告警值 + */ + @ApiModelProperty(value="告警值", name="warningValue") + private String warningValue; + + /** + * 告警阈值 + */ + @ApiModelProperty(value="告警阈值", name="threadval") + private String threadval; + + /** + * 告警信息/设备名称/设备安装位置 + */ + @ApiModelProperty(value="告警信息/设备名称/设备安装位置", name="warnDesc") + private String warnDesc; + + /** + * 告警级别 0:高 1:中 2:低 + */ + @ApiModelProperty(value="告警级别 0:高 1:中 2:低", name="warnLevel") + private String warnLevel; + + /** + * 处理状态 0:已处理 1:未处理 + */ + @ApiModelProperty(value="处理状态 0:已处理 1:未处理", name="state") + private String state; + + /** + * 处理结果描述 + */ + @ApiModelProperty(value="处理结果描述", name="process") + private String process; + + /** + * 处理人id + */ + @ApiModelProperty(value="处理人id", name="processUser") + private String processUser; + + /** + * 处理时间 + */ + @ApiModelProperty(value="处理时间", name="processTime") + private String processTime; + + /** + * 开始时间 + */ + @ApiModelProperty(value="开始时间", name="startTime") + private String startTime; + + /** + * 结束时间 + */ + @ApiModelProperty(value="结束时间", name="endTime") + private String endTime; +} diff --git a/src/main/java/com/xydl/cac/old/CableWarningVo.java b/src/main/java/com/xydl/cac/old/CableWarningVo.java new file mode 100644 index 0000000..0ff0e18 --- /dev/null +++ b/src/main/java/com/xydl/cac/old/CableWarningVo.java @@ -0,0 +1,94 @@ +package com.xydl.cac.old; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * @author Bobi_huo + * @date 2020-12-22 13:50 + */ +@Data +public class CableWarningVo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * @Fields id + */ + @ApiModelProperty(value="主键", name="id") + private String id; + + /** + * @Fields 设备id + */ + @ApiModelProperty(value="设备id", name="eqmId") + private String eqmId; + + /** + * 设备名称 + */ + @ApiModelProperty(value="设备名称", name="deviceName") + private String deviceName; + + /** + * 告警次数 + */ + @ApiModelProperty(value="告警次数", name="warningCount") + private String warningCount; + + /** + * @Fields 告警时间 + */ + @ApiModelProperty(value="告警时间", name="warnTime") + private String warnTime; + + /** + * @Fields 告警值 + */ + @ApiModelProperty(value="告警值", name="warningValue") + private String warningValue; + + /** + * 告警阈值 + */ + @ApiModelProperty(value="告警阈值", name="threadval") + private String threadval; + + /** + * 告警信息/设备名称/设备安装位置 + */ + @ApiModelProperty(value="告警信息/设备名称/设备安装位置", name="warnDesc") + private String warnDesc; + + /** + * 告警级别 0:高 1:中 2:低 + */ + @ApiModelProperty(value="告警级别 0:高 1:中 2:低", name="warnLevel") + private String warnLevel; + + /** + * 处理状态 0:已处理 1:未处理 + */ + @ApiModelProperty(value="处理状态 0:已处理 1:未处理", name="state") + private String state; + + /** + * 处理结果描述 + */ + @ApiModelProperty(value="处理结果描述", name="process") + private String process; + + /** + * 处理人id + */ + @ApiModelProperty(value="处理人id", name="processUser") + private String processUser; + + /** + * 处理时间 + */ + @ApiModelProperty(value="处理时间", name="processTime") + private String processTime; +} diff --git a/src/main/java/com/xydl/cac/old/IronCoreJoinClampController.java b/src/main/java/com/xydl/cac/old/IronCoreJoinClampController.java new file mode 100644 index 0000000..f84cb65 --- /dev/null +++ b/src/main/java/com/xydl/cac/old/IronCoreJoinClampController.java @@ -0,0 +1,53 @@ +package com.xydl.cac.old; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +@Api(tags = "旧接口") +@RestController +@RequestMapping("ironCoreJoinClampController") +public class IronCoreJoinClampController { + + @Resource + OldService service; + + /** + * 查询铁芯/夹件表格数据 + * + * @param ironCoreId + * @param clampId + * @return + */ + @ApiOperation(value = "查询铁芯/夹件表格数据") + @GetMapping(value = "/queryTableData/{ironCoreId}/{clampId}") + public AjaxResult queryTableData(@PathVariable("ironCoreId") Integer ironCoreId, + @PathVariable("clampId") Integer clampId) { + IronCoreJoinClampDto dto = new IronCoreJoinClampDto(); + dto.setIronCoreId(ironCoreId); + dto.setClampId(clampId); + // 铁芯/夹件表格取5条进行展示 + return AjaxResult.success(service.queryTableDataList(dto)); + } + + /** + * 查询铁芯/夹件趋势图数据 + * @param ironCoreId + * @param clampId + * @return + */ + @ApiOperation(value = "查询铁芯/夹件趋势图数据") + @GetMapping(value = "/queryLineData/{ironCoreId}/{clampId}") + public AjaxResult queryLineData(@PathVariable("ironCoreId") Integer ironCoreId, + @PathVariable("clampId") Integer clampId) { + IronCoreJoinClampDto dto = new IronCoreJoinClampDto(); + dto.setIronCoreId(ironCoreId); + dto.setClampId(clampId); + return AjaxResult.success(service.queryLineDataList(dto)); + } +} diff --git a/src/main/java/com/xydl/cac/old/IronCoreJoinClampDto.java b/src/main/java/com/xydl/cac/old/IronCoreJoinClampDto.java new file mode 100644 index 0000000..901ceca --- /dev/null +++ b/src/main/java/com/xydl/cac/old/IronCoreJoinClampDto.java @@ -0,0 +1,39 @@ +package com.xydl.cac.old; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class IronCoreJoinClampDto { + private static final long serialVersionUID = 1L; + + /** + * @Fields 铁芯设备id + */ + @ApiModelProperty(value="铁芯设备id", name="ironCoreId") + private Integer ironCoreId; + + /** + * @Fields 夹件设备id + */ + @ApiModelProperty(value="夹件设备id", name="clampId") + private Integer clampId; + + /** + * @Fields 创建时间 + */ + @ApiModelProperty(value="创建时间", name="dTime") + private String dTime; + + /** + * @Fields 铁芯A相泄露电流 + */ + @ApiModelProperty(value="铁芯A相泄露电流", name="ironCoreValue") + private String ironCoreValue; + + /** + * @Fields 夹件A相泄露电流 + */ + @ApiModelProperty(value="夹件A相泄露电流", name="clampValue") + private String clampValue; +} diff --git a/src/main/java/com/xydl/cac/old/IronVo.java b/src/main/java/com/xydl/cac/old/IronVo.java new file mode 100644 index 0000000..828d28a --- /dev/null +++ b/src/main/java/com/xydl/cac/old/IronVo.java @@ -0,0 +1,35 @@ +package com.xydl.cac.old; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @author Leo_Feng + * @date 2021-09-17 + */ +@Data +public class IronVo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 气体 + */ + @ApiModelProperty(value="观测字段", name="equipment") + private String equipment; + + /** + * 值集合 + */ + @ApiModelProperty(value="值集合", name="currentVals") + private List currentVals; + + /** + * 时间集合 + */ + @ApiModelProperty(value="时间集合", name="dTimes") + private List dTimes; +} diff --git a/src/main/java/com/xydl/cac/old/OilChromaController.java b/src/main/java/com/xydl/cac/old/OilChromaController.java new file mode 100644 index 0000000..1915621 --- /dev/null +++ b/src/main/java/com/xydl/cac/old/OilChromaController.java @@ -0,0 +1,52 @@ +package com.xydl.cac.old; + + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +@Api(tags = "旧接口") +@RestController +@RequestMapping("oilChromaController") +public class OilChromaController { + + @Resource + OldService service; + + /** + * 查询油色谱表格数据 + * + * @param eqmid + * @return + */ + @ApiOperation(value = "查询油色谱表格数据") + @GetMapping(value = "/queryTableData/{eqmid}") + public AjaxResult queryTableData(@PathVariable Integer eqmid) { + List oilChromaVoList = service.queryTableDataList(eqmid); + // 油色谱表格只取一条进行展示 + if (oilChromaVoList.size() != 0) { + return AjaxResult.success(oilChromaVoList.get(0)); + } else { + return AjaxResult.success("操作成功", null); + } + } + + /** + * 查询油色谱趋势图数据 + * + * @param eqmid + * @return + */ + @ApiOperation(value = "查询油色谱趋势图数据") + @GetMapping(value = "/queryLineData/{eqmid}") + public AjaxResult queryLineData(@PathVariable Integer eqmid) { + return AjaxResult.success(service.queryLineDataList(eqmid)); + } +} diff --git a/src/main/java/com/xydl/cac/old/OilChromaVo.java b/src/main/java/com/xydl/cac/old/OilChromaVo.java new file mode 100644 index 0000000..f3c0396 --- /dev/null +++ b/src/main/java/com/xydl/cac/old/OilChromaVo.java @@ -0,0 +1,114 @@ +package com.xydl.cac.old; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * @author Bobi_huo + * @date 2020-12-24 11:12 + */ +@Data +@ApiModel("油色谱") +public class OilChromaVo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * @Fields 主键 + */ + @ApiModelProperty(value="主键", name="eqmId") + private String eqmId; + + /** + * @Fields 甲烷含量 + */ + @ApiModelProperty(value="甲烷含量", name="ch4ppm") + private String ch4ppm; + + /** + * @Fields 乙烯含量 + */ + @ApiModelProperty(value="乙烯含量", name="c2h4ppm") + private String c2h4ppm; + + /** + * @Fields 乙烷含量 + */ + @ApiModelProperty(value="乙烷含量", name="c2h6ppm") + private String c2h6ppm; + + /** + * @Fields 乙炔含量 + */ + @ApiModelProperty(value="乙炔含量", name="c2h2ppm") + private String c2h2ppm; + + /** + * @Fields 氢气含量 + */ + @ApiModelProperty(value="氢气含量", name="h2ppm") + private String h2ppm; + + /** + * @Fields 一氧化碳含量 + */ + @ApiModelProperty(value="一氧化碳含量", name="coppm") + private String coppm; + + /** + * @Fields 二氧化碳含量 + */ + @ApiModelProperty(value="二氧化碳含量", name="co2ppm") + private String co2ppm; + + /** + * @Fields 氧气含量 + */ + @ApiModelProperty(value="氧气含量", name="o2ppm") + private String o2ppm; + + /** + * @Fields 氮气含量 + */ + @ApiModelProperty(value="氮气含量", name="n2ppm") + private String n2ppm; + + /** + * @Fields 水含量 + */ + @ApiModelProperty(value="水含量", name="h2oppm") + private String h2oppm; + + /** + * @Fields 载气压力 + */ + @ApiModelProperty(value="载气压力", name="gaspress") + private String gaspress; + + /** + * @Fields 瓦斯继电器中故障气 + */ + @ApiModelProperty(value="瓦斯继电器中故障气", name="flatgas") + private String flatgas; + + /** + * @Fields 总烃 + */ + @ApiModelProperty(value="总烃", name="totalhydrocarbon") + private String totalhydrocarbon; + + /** + * @Fields 总可燃气体 + */ + @ApiModelProperty(value="总可燃气体", name="cmbugas") + private String cmbugas; + + /** + * @Fields 创建时间 + */ + @ApiModelProperty(value="创建时间", name="dTime") + private String dTime; +} diff --git a/src/main/java/com/xydl/cac/old/OilVo.java b/src/main/java/com/xydl/cac/old/OilVo.java new file mode 100644 index 0000000..73ad45d --- /dev/null +++ b/src/main/java/com/xydl/cac/old/OilVo.java @@ -0,0 +1,35 @@ +package com.xydl.cac.old; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @author Bobi_huo + * @date 2020-12-24 11:12 + */ +@Data +public class OilVo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 气体 + */ + @ApiModelProperty(value="观测字段", name="gas") + private String gas; + + /** + * 值集合 + */ + @ApiModelProperty(value="值集合", name="currentVals") + private List currentVals; + + /** + * 时间集合 + */ + @ApiModelProperty(value="时间集合", name="dTimes") + private List dTimes; +} diff --git a/src/main/java/com/xydl/cac/old/OldService.java b/src/main/java/com/xydl/cac/old/OldService.java index 45083d1..28493ac 100644 --- a/src/main/java/com/xydl/cac/old/OldService.java +++ b/src/main/java/com/xydl/cac/old/OldService.java @@ -6,6 +6,9 @@ import com.xydl.cac.repository.NSensorRepository; import com.xydl.cac.repository.ZsbRepository; import com.xydl.cac.service.ZsbService; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.jdbc.core.BeanPropertyRowMapper; +import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -25,6 +28,8 @@ public class OldService { ZsbRepository zsbRepository; @Resource NSensorRepository sensorRepository; + @Resource + private JdbcTemplate jdbcTemplate; public List getLxDevice(Integer jgid, List mtid) throws Exception { List result = new ArrayList<>(); @@ -130,4 +135,350 @@ public class OldService { equipment.setOtherNum(otherNum); return equipment; } + + List queryTableDataList(Integer eqmid) { + String sql = "SELECT * FROM data_epa_h WHERE eqmid=" + eqmid + " ORDER BY d_time DESC LIMIT 1"; + List list = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(OilChromaVo.class)); + return list; + } + + List queryLineDataList(Integer eqmid) { + String sql = "SELECT * FROM data_epa_h WHERE eqmid=" + eqmid + " ORDER BY d_time DESC LIMIT 15"; + List oilDataList = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(OilChromaVo.class)); + OilVo ch4 = new OilVo(); + List ch4Values = new ArrayList<>(); + ch4.setCurrentVals(ch4Values); + + OilVo c2h4 = new OilVo(); + List c2h4Values = new ArrayList<>(); + c2h4.setCurrentVals(c2h4Values); + + OilVo c2h6 = new OilVo(); + List c2h6Values = new ArrayList<>(); + c2h6.setCurrentVals(c2h6Values); + + OilVo c2h2 = new OilVo(); + List c2h2Values = new ArrayList<>(); + c2h2.setCurrentVals(c2h2Values); + + OilVo h2 = new OilVo(); + List h2Values = new ArrayList<>(); + h2.setCurrentVals(h2Values); + + OilVo co = new OilVo(); + List coValues = new ArrayList<>(); + co.setCurrentVals(coValues); + + OilVo co2 = new OilVo(); + List co2Values = new ArrayList<>(); + co2.setCurrentVals(co2Values); + + OilVo totalhydrocarbon = new OilVo(); + List totalhydrocarbonValues = new ArrayList<>(); + totalhydrocarbon.setCurrentVals(totalhydrocarbonValues); + + List times = new ArrayList<>(); + for (OilChromaVo vo : oilDataList) { + ch4.getCurrentVals().add(vo.getCh4ppm()); + c2h4.getCurrentVals().add(vo.getC2h4ppm()); + c2h6.getCurrentVals().add(vo.getC2h6ppm()); + c2h2.getCurrentVals().add(vo.getC2h2ppm()); + h2.getCurrentVals().add(vo.getH2ppm()); + co.getCurrentVals().add(vo.getCoppm()); + co2.getCurrentVals().add(vo.getCo2ppm()); + totalhydrocarbon.getCurrentVals().add(vo.getTotalhydrocarbon()); + times.add(vo.getDTime()); + } + + ch4.setDTimes(times); + c2h4.setDTimes(times); + c2h6.setDTimes(times); + c2h2.setDTimes(times); + h2.setDTimes(times); + co.setDTimes(times); + co2.setDTimes(times); + totalhydrocarbon.setDTimes(times); + + ch4.setGas("甲烷(μL/L)"); + c2h4.setGas("乙烯(μL/L)"); + c2h6.setGas("乙烷(μL/L)"); + c2h2.setGas("乙炔(μL/L)"); + h2.setGas("氢气(μL/L)"); + co.setGas("一氧化碳(μL/L)"); + co2.setGas("二氧化碳(μL/L)"); + totalhydrocarbon.setGas("总烃(μL/L)"); + + List lineDataList = new ArrayList<>(); + lineDataList.add(ch4); + lineDataList.add(c2h4); + lineDataList.add(c2h6); + lineDataList.add(c2h2); + lineDataList.add(h2); + lineDataList.add(co); + lineDataList.add(co2); + lineDataList.add(totalhydrocarbon); + return lineDataList; + } + + List queryTableDataList(IronCoreJoinClampDto dto) { + String sql = "select t1.d_time, t1.d_ct_1 iron_core_value, t2.d_ct_1 clamp_value" + + " from (select eqmid, d_time, d_ct_1 from data_eia_h where eqmid = " + dto.getIronCoreId() + " order by d_time desc limit 5) t1" + + " left join" + + " (select eqmid, d_time, d_ct_1 from data_eia_h where eqmid = " + dto.getClampId() + " order by d_time desc limit 5) t2" + + " on t1.d_time = t2.d_time" + + " order by d_time desc"; + List list = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(IronCoreJoinClampDto.class)); + return list; + } + + List queryLineDataList(IronCoreJoinClampDto dto) { + String sql = "select t1.d_time, t1.d_ct_1 iron_core_value, t2.d_ct_1 clamp_value" + + " from (select eqmid, d_time, d_ct_1 from data_eia_h where eqmid = " + dto.getIronCoreId() + " order by d_time desc limit 15) t1" + + " left join" + + " (select eqmid, d_time, d_ct_1 from data_eia_h where eqmid = " + dto.getClampId() + " order by d_time desc limit 15) t2" + + " on t1.d_time = t2.d_time" + + " order by d_time desc"; + List IronDataList = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(IronCoreJoinClampDto.class)); + IronVo ironCore = new IronVo(); + List ironCoreValues = new ArrayList<>(); + ironCore.setCurrentVals(ironCoreValues); + + IronVo clamp = new IronVo(); + List clampValues = new ArrayList<>(); + clamp.setCurrentVals(clampValues); + + List times = new ArrayList<>(); + for (IronCoreJoinClampDto vo : IronDataList) { + ironCore.getCurrentVals().add(vo.getIronCoreValue()); + clamp.getCurrentVals().add(vo.getClampValue()); + times.add(vo.getDTime()); + } + + ironCore.setDTimes(times); + clamp.setDTimes(times); + + ironCore.setEquipment("铁芯泄露电流(mA)"); + clamp.setEquipment("夹件泄露电流(mA)"); + + List lineDataList = new ArrayList<>(); + lineDataList.add(ironCore); + lineDataList.add(clamp); + return lineDataList; + } + + List queryTableDataList2(Integer eqmid) { + String sql = "SELECT * FROM data_moa_h WHERE eqmid=" + eqmid + " ORDER BY d_time DESC LIMIT 2"; + List list = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(ArresterVo.class)); + return list; + } + + List queryLineDataList2(Integer eqmid) { + String sql = "SELECT * FROM data_moa_h WHERE eqmid=" + eqmid + " ORDER BY d_time DESC LIMIT 15"; + List arresterDataList = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(ArresterVo.class)); + // A相系统电压 + ArrVo a1 = new ArrVo(); + List a1Values = new ArrayList<>(); + a1.setCurrentVals(a1Values); + // A相全电流 + ArrVo a2 = new ArrVo(); + List a2Values = new ArrayList<>(); + a2.setCurrentVals(a2Values); + // A相阻性电流 + ArrVo a3 = new ArrVo(); + List a3Values = new ArrayList<>(); + a3.setCurrentVals(a3Values); + + ArrVo b1 = new ArrVo(); + List b1Values = new ArrayList<>(); + b1.setCurrentVals(b1Values); + + ArrVo b2 = new ArrVo(); + List b2Values = new ArrayList<>(); + b2.setCurrentVals(b2Values); + + ArrVo b3 = new ArrVo(); + List b3Values = new ArrayList<>(); + b3.setCurrentVals(b3Values); + + ArrVo c1 = new ArrVo(); + List c1Values = new ArrayList<>(); + c1.setCurrentVals(c1Values); + + ArrVo c2 = new ArrVo(); + List c2Values = new ArrayList<>(); + c2.setCurrentVals(c2Values); + + ArrVo c3 = new ArrVo(); + List c3Values = new ArrayList<>(); + c3.setCurrentVals(c3Values); + + List times = new ArrayList<>(); + for (ArresterVo vo : arresterDataList) { + a1.getCurrentVals().add(vo.getPtA()); + a2.getCurrentVals().add(vo.getLcA()); + a3.getCurrentVals().add(vo.getRcA()); + b1.getCurrentVals().add(vo.getPtB()); + b2.getCurrentVals().add(vo.getLcB()); + b3.getCurrentVals().add(vo.getRcB()); + c1.getCurrentVals().add(vo.getPtC()); + c2.getCurrentVals().add(vo.getLcC()); + c3.getCurrentVals().add(vo.getRcC()); + times.add(vo.getDTime()); + } + + a1.setDTimes(times); + a2.setDTimes(times); + a3.setDTimes(times); + b1.setDTimes(times); + b2.setDTimes(times); + b3.setDTimes(times); + c1.setDTimes(times); + c2.setDTimes(times); + c3.setDTimes(times); + + a1.setEquipment("A相系统电压(V)"); + a2.setEquipment("A相全电流(mA)"); + a3.setEquipment("A相阻性电流(mA)"); + b1.setEquipment("B相系统电压(V)"); + b2.setEquipment("B相全电流(mA)"); + b3.setEquipment("B相阻性电流(mA)"); + c1.setEquipment("C相系统电压(V)"); + c2.setEquipment("C相全电流(mA)"); + c3.setEquipment("C相阻性电流(mA)"); + + List lineDataList = new ArrayList<>(); + lineDataList.add(a1); + lineDataList.add(a2); + lineDataList.add(a3); + lineDataList.add(b1); + lineDataList.add(b2); + lineDataList.add(b3); + lineDataList.add(c1); + lineDataList.add(c2); + lineDataList.add(c3); + return lineDataList; + } + + List queryTableDataList3(Integer eqmid) { + String sql = "SELECT * FROM data_sf6_h WHERE eqmid=" + eqmid + " ORDER BY d_time DESC LIMIT 2"; + List list = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(SF6Vo.class)); + return list; + } + + List queryLineDataList3(Integer eqmid) { + String sql = "SELECT * FROM data_sf6_h WHERE eqmid=" + eqmid + " ORDER BY d_time DESC LIMIT 15"; + List sf6DataList = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(SF6Vo.class)); + + // A相温度 + SF6LineVo aTemp = new SF6LineVo(); + List aTempValues = new ArrayList<>(); + aTemp.setCurrentVals(aTempValues); + + // A相压力 + SF6LineVo aPressure = new SF6LineVo(); + List aPressureValues = new ArrayList<>(); + aPressure.setCurrentVals(aPressureValues); + + // A相微水 + SF6LineVo aWater = new SF6LineVo(); + List aWaterValues = new ArrayList<>(); + aWater.setCurrentVals(aWaterValues); + + // B相温度 + SF6LineVo bTemp = new SF6LineVo(); + List bTempValues = new ArrayList<>(); + bTemp.setCurrentVals(bTempValues); + + // B相压力 + SF6LineVo bPressure = new SF6LineVo(); + List bPressureValues = new ArrayList<>(); + bPressure.setCurrentVals(bPressureValues); + + // B相微水 + SF6LineVo bWater = new SF6LineVo(); + List bWaterValues = new ArrayList<>(); + bWater.setCurrentVals(bWaterValues); + + // C相温度 + SF6LineVo cTemp = new SF6LineVo(); + List cTempValues = new ArrayList<>(); + cTemp.setCurrentVals(cTempValues); + + // C相压力 + SF6LineVo cPressure = new SF6LineVo(); + List cPressureValues = new ArrayList<>(); + cPressure.setCurrentVals(cPressureValues); + + // C相微水 + SF6LineVo cWater = new SF6LineVo(); + List cWaterValues = new ArrayList<>(); + cWater.setCurrentVals(cWaterValues); + + List times = new ArrayList<>(); + for (SF6Vo vo : sf6DataList) { + aTemp.getCurrentVals().add(vo.getTempA()); + aPressure.getCurrentVals().add(vo.getPressureA()); + aWater.getCurrentVals().add(vo.getPmA()); + bTemp.getCurrentVals().add(vo.getTempB()); + bPressure.getCurrentVals().add(vo.getPressureB()); + bWater.getCurrentVals().add(vo.getPmB()); + cTemp.getCurrentVals().add(vo.getTempC()); + cPressure.getCurrentVals().add(vo.getPressureC()); + cWater.getCurrentVals().add(vo.getPmC()); + times.add(vo.getDTime()); + } + + aTemp.setDTimes(times); + aPressure.setDTimes(times); + aWater.setDTimes(times); + bTemp.setDTimes(times); + bPressure.setDTimes(times); + bWater.setDTimes(times); + cTemp.setDTimes(times); + cPressure.setDTimes(times); + cWater.setDTimes(times); + + aTemp.setEquipment("A相温度(℃)"); + aPressure.setEquipment("A相压力(kPa)"); + aWater.setEquipment("A相微水(μL/L)"); + bTemp.setEquipment("B相温度(℃)"); + bPressure.setEquipment("B相压力(kPa)"); + bWater.setEquipment("B相微水(μL/L)"); + cTemp.setEquipment("C相温度(℃)"); + cPressure.setEquipment("C相压力(kPa)"); + cWater.setEquipment("C相微水(μL/L)"); + + List lineDataList = new ArrayList<>(); + lineDataList.add(aTemp); + lineDataList.add(aPressure); + lineDataList.add(aWater); + lineDataList.add(bTemp); + lineDataList.add(bPressure); + lineDataList.add(bWater); + lineDataList.add(cTemp); + lineDataList.add(cPressure); + lineDataList.add(cWater); + return lineDataList; + } + + List selectPages(CableWarningDto dto) { + String sql = "SELECT w.id,w.eqmid,w.warn_time,w.warning_value,w.threadval,w.warn_desc,w.warn_level," + + " w.state,w.process,w.process_user,w.process_time,COUNT(w.id) AS warningCount,v.NAME" + + " FROM warning w" + + " LEFT JOIN vw_sb v ON v.id = w.eqmid" + + " LEFT JOIN vw_jg j ON j.id = v.jgid" + + " LEFT JOIN i2relation i ON v.id = i.eqmid WHERE 1=1 "; + if (StringUtils.isNotBlank(dto.getState())) { + sql = sql + " AND w.state=" + dto.getState(); + } + if (StringUtils.isNotBlank(dto.getStartTime())) { + sql = sql + " AND w.warn_time>='" + dto.getStartTime() + " 00:00:00'"; + } + if (StringUtils.isNotBlank(dto.getEndTime())) { + sql = sql + " AND w.warn_time<='" + dto.getEndTime() + " 23:59:59'"; + } + sql = sql + " GROUP BY w.eqmid"; + List list = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(CableWarningVo.class)); + return list; + } } diff --git a/src/main/java/com/xydl/cac/old/Query.java b/src/main/java/com/xydl/cac/old/Query.java new file mode 100644 index 0000000..0c4af9b --- /dev/null +++ b/src/main/java/com/xydl/cac/old/Query.java @@ -0,0 +1,58 @@ +package com.xydl.cac.old; + + + +import java.io.Serializable; +import java.util.HashMap; +import java.util.Map; + +public class Query implements Serializable { + + public String page = "1"; + public String limit = "10"; + public String orderByField = ""; + public String isAsc = ""; + + /** + * 请求参数 + */ + private String params; + + public Integer getPage() { + return Integer.parseInt( page ); + } + + public void setPage(String page) { + this.page = page; + } + + public Integer getLimit() { + return Integer.parseInt( limit ); + } + + public void setLimit(String limit) { + this.limit = limit; + } + + public String getOrderByField() { + return orderByField; + } + + public void setOrderByField(String orderByField) { + this.orderByField = orderByField; + } + + public String getIsAsc() { + return isAsc; + } + + public void setIsAsc(String isAsc) { + this.isAsc = isAsc; + } + + + public void setParams(String params) { + this.params = params; + } + +} diff --git a/src/main/java/com/xydl/cac/old/SF6Controller.java b/src/main/java/com/xydl/cac/old/SF6Controller.java new file mode 100644 index 0000000..2ca01e0 --- /dev/null +++ b/src/main/java/com/xydl/cac/old/SF6Controller.java @@ -0,0 +1,43 @@ +package com.xydl.cac.old; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +@Api(tags = "旧接口") +@RestController +@RequestMapping("SF6Controller") +public class SF6Controller{ + + @Resource + OldService service; + + /** + * 查询母线侧隔离开关50511表格数据 + * + * @param eqmid + * @return + */ + @ApiOperation(value = "查询GIS-SF6表格数据") + @GetMapping(value = "/queryTableData/{eqmid}") + public AjaxResult queryTableData(@PathVariable Integer eqmid) { + return AjaxResult.success(service.queryTableDataList3(eqmid)); + } + + /** + * 查询母线侧隔离开关50511趋势图数据 + * + * @param eqmid + * @return + */ + @ApiOperation(value = "查询GIS-SF6趋势图数据") + @GetMapping(value = "/queryLineData/{eqmid}") + public AjaxResult queryLineData(@PathVariable Integer eqmid) { + return AjaxResult.success(service.queryLineDataList3(eqmid)); + } +} diff --git a/src/main/java/com/xydl/cac/old/SF6LineVo.java b/src/main/java/com/xydl/cac/old/SF6LineVo.java new file mode 100644 index 0000000..08b7b17 --- /dev/null +++ b/src/main/java/com/xydl/cac/old/SF6LineVo.java @@ -0,0 +1,36 @@ +package com.xydl.cac.old; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @author + * @date + */ +@Data +public class SF6LineVo implements Serializable { + + + private static final long serialVersionUID = 1L; + + /** + * 观测字段 + */ + @ApiModelProperty(value = "观测字段", name = "equipment") + private String equipment; + + /** + * 值集合 + */ + @ApiModelProperty(value = "值集合", name = "currentVals") + private List currentVals; + + /** + * 时间集合 + */ + @ApiModelProperty(value = "时间集合", name = "dTimes") + private List dTimes; +} diff --git a/src/main/java/com/xydl/cac/old/SF6Vo.java b/src/main/java/com/xydl/cac/old/SF6Vo.java new file mode 100644 index 0000000..63d171b --- /dev/null +++ b/src/main/java/com/xydl/cac/old/SF6Vo.java @@ -0,0 +1,118 @@ +package com.xydl.cac.old; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * @author Bobi_huo + * @date 2020-12-25 20:13 + */ +@Data +public class SF6Vo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * @Fields 设备id + */ + @ApiModelProperty(value="设备id", name="eqmId") + private Integer eqmId; + + /** + * @Fields 创建时间 + */ + @ApiModelProperty(value="创建时间", name="dTime") + private String dTime; + + /** + * @Fields A相温度 + */ + @ApiModelProperty(value="A相温度", name="tempA") + private String tempA; + + /** + * @Fields A相压力 + */ + @ApiModelProperty(value="A相压力", name="pressureA") + private String pressureA; + + /** + * @Fields A相密度 + */ + @ApiModelProperty(value="A相密度", name="mdA") + private String mdA; + + /** + * @Fields A相微水 + */ + @ApiModelProperty(value="A相微水", name="pmA") + private String pmA; + + /** + * @Fields A相露点 + */ + @ApiModelProperty(value="A相露点", name="dDtA") + private String dDtA; + + /** + * @Fields B相温度 + */ + @ApiModelProperty(value="B相温度", name="tempB") + private String tempB; + + /** + * @Fields B相压力 + */ + @ApiModelProperty(value="B相压力", name="pressureB") + private String pressureB; + + /** + * @Fields B相密度 + */ + @ApiModelProperty(value="B相密度", name="mdB") + private String mdB; + + /** + * @Fields B相微水 + */ + @ApiModelProperty(value="B相微水", name="pmB") + private String pmB; + + /** + * @Fields B相露点 + */ + @ApiModelProperty(value="B相露点", name="dDtB") + private String dDtB; + + /** + * @Fields C相温度 + */ + @ApiModelProperty(value="C相温度", name="tempC") + private String tempC; + + /** + * @Fields C相压力 + */ + @ApiModelProperty(value="C相压力", name="pressureC") + private String pressureC; + + /** + * @Fields C相密度 + */ + @ApiModelProperty(value="C相密度", name="mdC") + private String mdC; + + /** + * @Fields C相微水 + */ + @ApiModelProperty(value="C相微水", name="pmC") + private String pmC; + + /** + * @Fields C相露点 + */ + @ApiModelProperty(value="C相露点", name="dDtC") + private String dDtC; +}