更新到23年版本
parent
a5e796658c
commit
1712a607a7
@ -0,0 +1,29 @@
|
|||||||
|
package com.chenxuan.bean.config;
|
||||||
|
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||||
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跨域配置
|
||||||
|
* @author: newzhong
|
||||||
|
* @create: 2020-2
|
||||||
|
**/
|
||||||
|
@Configuration
|
||||||
|
public class CORSConfig {
|
||||||
|
@Bean
|
||||||
|
public WebMvcConfigurer corsConfigurer() {
|
||||||
|
return new WebMvcConfigurerAdapter() {
|
||||||
|
@Override
|
||||||
|
public void addCorsMappings(CorsRegistry registry) {
|
||||||
|
registry.addMapping("/**")
|
||||||
|
.allowedOrigins("*")
|
||||||
|
.allowedMethods("GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "TRACE");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,97 @@
|
|||||||
|
package com.chenxuan.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.chenxuan.base.controller.BaseController;
|
||||||
|
import com.chenxuan.base.entity.AjaxResult;
|
||||||
|
import com.chenxuan.bean.annotation.LogAnnotation;
|
||||||
|
import com.chenxuan.constants.BusiUrlConstants;
|
||||||
|
import com.chenxuan.entity.dto.BusiEnvironmentRealDto;
|
||||||
|
import com.chenxuan.entity.model.BusiEnvironmentReal;
|
||||||
|
import com.chenxuan.entity.vo.BusiEnvironmentRealDetailsVo;
|
||||||
|
import com.chenxuan.entity.vo.BusiEnvironmentRealVo;
|
||||||
|
import com.chenxuan.enums.OperateType;
|
||||||
|
import com.chenxuan.service.BusiEnvironmentRealService;
|
||||||
|
import com.chenxuan.service.BusiExportDataService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Api(tags = "环境监测实时数据")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(value = BusiUrlConstants.BUSI_ENVIRONMENT_REAL)
|
||||||
|
public class BusiEnvironmentRealController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BusiEnvironmentRealService busiEnvironmentRealService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BusiExportDataService busiExportDataService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增环境监测实时数据信息
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "新增环境监测实时数据信息")
|
||||||
|
@LogAnnotation(module = "环境监测实时数据", operateType = OperateType.INSERT)
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public AjaxResult add(@RequestBody List<BusiEnvironmentReal> busiEnvironmentRealList) {
|
||||||
|
return returnAjax(busiEnvironmentRealService.insertEnvironmentReal(busiEnvironmentRealList));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主变id加载环境监测实时数据信息
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "根据主变id加载环境监测实时数据信息")
|
||||||
|
@GetMapping(value = "/getEnvironmentRealByMainId/{mainId}")
|
||||||
|
public AjaxResult getEnvironmentRealByMainId(@PathVariable("mainId") String mainId) {
|
||||||
|
return AjaxResult.success(busiEnvironmentRealService.selectEnvironmentRealByMainId(mainId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主变id及当天时间加载环境监测谱图信息
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "根据主变id及当天时间加载环境监测谱图信息")
|
||||||
|
@PostMapping(value = "/queryEnvironmentRealChartByInfo")
|
||||||
|
public AjaxResult queryEnvironmentRealChartByInfo(@RequestBody BusiEnvironmentRealDto busiEnvironmentRealDto) {
|
||||||
|
return AjaxResult.success(busiEnvironmentRealService.findEnvironmentRealChartByInfo(busiEnvironmentRealDto));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主变id和时间加载环境监测实时数据信息
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "根据主变id和时间加载环境监测实时数据信息")
|
||||||
|
@PostMapping(value = "/getEnvironmentRealByMainIdAndCreateTime")
|
||||||
|
public AjaxResult getEnvironmentRealByMainIdAndCreateTime(@RequestBody BusiEnvironmentRealVo busiEnvironmentRealVo) {
|
||||||
|
return AjaxResult.success(busiEnvironmentRealService.selectEnvironmentRealByMainIdAndCreateTime(busiEnvironmentRealVo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主变id加载环境监测实时数据详细信息
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "根据主变id加载环境监测实时数据详细信息")
|
||||||
|
@PostMapping(value = "/getEnvironmentRealDetailsByMainId")
|
||||||
|
public AjaxResult getEnvironmentRealDetailsByMainId(@RequestBody BusiEnvironmentRealDto dto) {
|
||||||
|
Page<BusiEnvironmentRealDetailsVo> EnvironmentRealDetailsByMainId = busiEnvironmentRealService.getEnvironmentRealDetailsByMainId(dto);
|
||||||
|
return AjaxResult.success(EnvironmentRealDetailsByMainId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出环境监测实时数据详细信息Excel
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "导出环境监测实时数据详细信息Excel")
|
||||||
|
@PostMapping(value = "/exportEnvironmentRealDetails")
|
||||||
|
public AjaxResult exportEnvironmentRealDetails(@RequestBody BusiEnvironmentRealDto dto) {
|
||||||
|
return busiExportDataService.exportEnvironmentRealDetails(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出环境监测实时数据
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "导出环境监测实时数据")
|
||||||
|
@PostMapping(value = "/exportEnvironmentRealByMainId")
|
||||||
|
public AjaxResult exportEnvironmentRealByMainId(@RequestBody BusiEnvironmentRealDto dto) {
|
||||||
|
return busiExportDataService.exportEnvironmentReal(dto);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,86 @@
|
|||||||
|
package com.chenxuan.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.chenxuan.base.controller.BaseController;
|
||||||
|
import com.chenxuan.base.entity.AjaxResult;
|
||||||
|
import com.chenxuan.bean.annotation.LogAnnotation;
|
||||||
|
import com.chenxuan.constants.BusiUrlConstants;
|
||||||
|
import com.chenxuan.entity.dto.BusiEnvironmentThresholdConfDto;
|
||||||
|
import com.chenxuan.entity.model.BusiEnvironmentThresholdConf;
|
||||||
|
import com.chenxuan.entity.vo.BusiEnvironmentThresholdConfVo;
|
||||||
|
import com.chenxuan.enums.OperateType;
|
||||||
|
import com.chenxuan.service.BusiEnvironmentThresholdConfService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@Api(tags = "环境监测阈值配置")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(value = BusiUrlConstants.BUSI_ENVIRONMENT_THRESHOLD_CONF)
|
||||||
|
public class BusiEnvironmentThresholdConfController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BusiEnvironmentThresholdConfService busiEnvironmentThresholdConfService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 获取环境阈值配置列表
|
||||||
|
* @Param:
|
||||||
|
* @Return: TableDataInfo
|
||||||
|
**/
|
||||||
|
@ApiOperation(value = "获取环境阈值配置列表")
|
||||||
|
@PostMapping(value = "/page")
|
||||||
|
public AjaxResult page(@RequestBody BusiEnvironmentThresholdConfDto busiEnvironmentThresholdConfDto) {
|
||||||
|
Page<BusiEnvironmentThresholdConfVo> page = busiEnvironmentThresholdConfService.page(busiEnvironmentThresholdConfDto);
|
||||||
|
return AjaxResult.success(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增环境阈值配置信息
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "新增环境阈值配置信息")
|
||||||
|
@LogAnnotation(module = "环境阈值配置", operateType = OperateType.INSERT)
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public AjaxResult add(@RequestBody BusiEnvironmentThresholdConf busiEnvironmentThresholdConf) {
|
||||||
|
return busiEnvironmentThresholdConfService.insertThresholdConf(busiEnvironmentThresholdConf);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改环境阈值配置信息
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "修改环境阈值配置信息")
|
||||||
|
@LogAnnotation(module = "环境阈值配置", operateType = OperateType.UPDATE)
|
||||||
|
@PutMapping(value = "/update")
|
||||||
|
public AjaxResult update(@RequestBody BusiEnvironmentThresholdConf busiEnvironmentThresholdConf) {
|
||||||
|
return busiEnvironmentThresholdConfService.updateThresholdConf(busiEnvironmentThresholdConf);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主变id加载环境阈值配置信息
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "根据主变id加载环境阈值配置信息")
|
||||||
|
@GetMapping(value = "/getEnvironmentThresholdConfByMainId/{mainId}")
|
||||||
|
public AjaxResult getEnvironmentThresholdConfByMainId(@PathVariable("mainId") String mainId) {
|
||||||
|
return AjaxResult.success(busiEnvironmentThresholdConfService.selectEnvironmentThresholdConfByMainId(mainId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主变id删除环境阈值配置信息
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "根据主变id删除环境阈值配置信息")
|
||||||
|
@LogAnnotation(module = "环境阈值配置", operateType = OperateType.DELETE)
|
||||||
|
@DeleteMapping(value = "/deleteByMainId/{mainId}")
|
||||||
|
public AjaxResult remove(@RequestParam("mainId") String mainId) {
|
||||||
|
return returnAjax(busiEnvironmentThresholdConfService.deleteThresholdConfByMainId(mainId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据环境阈值配置id删除其配置信息
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "根据环境阈值配置id删除其配置信息")
|
||||||
|
@LogAnnotation(module = "环境阈值配置", operateType = OperateType.DELETE)
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public AjaxResult delete(@RequestParam("id") String id) {
|
||||||
|
return returnAjax(busiEnvironmentThresholdConfService.delete(id));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
package com.chenxuan.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.chenxuan.base.controller.BaseController;
|
||||||
|
import com.chenxuan.base.entity.AjaxResult;
|
||||||
|
import com.chenxuan.bean.annotation.LogAnnotation;
|
||||||
|
import com.chenxuan.constants.BusiUrlConstants;
|
||||||
|
import com.chenxuan.entity.dto.BusiModbusParamBindDto;
|
||||||
|
import com.chenxuan.entity.model.BusiModbusParamBind;
|
||||||
|
import com.chenxuan.entity.vo.BusiModbusParamBindVo;
|
||||||
|
import com.chenxuan.enums.OperateType;
|
||||||
|
import com.chenxuan.service.ModbusAndBindService;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(value = BusiUrlConstants.MODBUS_BIND)
|
||||||
|
public class ModbusAndBindController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ModbusAndBindService modbusAndBindService;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "根据类型查询模板")
|
||||||
|
@GetMapping(value = "/queryModbusTemplateByDeviceType")
|
||||||
|
public AjaxResult queryModbusTemplateByDeviceType(String deviceType) {
|
||||||
|
return AjaxResult.success(modbusAndBindService.queryModbusTemplateByDeviceType(deviceType));
|
||||||
|
}
|
||||||
|
@ApiOperation(value = "新增修改modbus参数绑定")
|
||||||
|
@LogAnnotation(module = "新增修改modbus参数绑定", operateType = OperateType.INSERT)
|
||||||
|
@PostMapping(value = "/addModbusParamBind")
|
||||||
|
public AjaxResult addModbusParamBind(@RequestBody BusiModbusParamBind busiModbusParamBind) {
|
||||||
|
return AjaxResult.success(modbusAndBindService.addModbusParamBind(busiModbusParamBind));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "分页查询")
|
||||||
|
@PostMapping(value = "/queryModbusParamBind")
|
||||||
|
public AjaxResult queryModbusParamBind(@RequestBody BusiModbusParamBindDto busiModbusParamBindDto) {
|
||||||
|
Page<BusiModbusParamBindVo> page = modbusAndBindService.queryModbusParamBind(busiModbusParamBindDto);
|
||||||
|
return AjaxResult.success(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除绑定关系
|
||||||
|
*/
|
||||||
|
@LogAnnotation(module = "删除绑定关系", operateType = OperateType.DELETE)
|
||||||
|
@DeleteMapping(value = "/delBusiModbusParamBind")
|
||||||
|
public AjaxResult delBusiModbusParamBind(@RequestParam("modbusIds") int[] modbusIds) {
|
||||||
|
return returnAjax(modbusAndBindService.delBusiModbusParamBind(modbusIds) > 0 ? true : false);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,82 @@
|
|||||||
|
package com.chenxuan.entity.dto;
|
||||||
|
|
||||||
|
import com.chenxuan.base.entity.Query;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Carrey Zheng
|
||||||
|
* @create 2020-06-22 3:01 PM
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class BusiEnvironmentRealDto extends Query implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "id", value = "主键id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主变id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "mainId", value = "主变id")
|
||||||
|
private String mainId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "deviceName", value = "设备名称")
|
||||||
|
private String deviceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*温度
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "temp", value = "温度")
|
||||||
|
private String temp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 湿度
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "humidity", value = "湿度")
|
||||||
|
private String humidity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负载类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "loadType", value = "负载类型")
|
||||||
|
private String loadType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "insTime", value = "创建时间")
|
||||||
|
private String insTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hbase中的rowkey
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "hbaseRowkey", value = "hbase中的rowkey")
|
||||||
|
private String hbaseRowkey;
|
||||||
|
/**
|
||||||
|
* 统计时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "createTime", value = "统计时间")
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "startTime", value = "开始日期")
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "endTime", value = "结束日期")
|
||||||
|
private String endTime;
|
||||||
|
}
|
@ -0,0 +1,102 @@
|
|||||||
|
package com.chenxuan.entity.dto;
|
||||||
|
|
||||||
|
import com.chenxuan.base.entity.Query;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
@Data
|
||||||
|
public class BusiModbusParamBindDto extends Query implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "id", value = "主键id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 Y:启用 N:禁用/预留
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "状态 Y:启用 N:禁用/预留", name = "state")
|
||||||
|
private String state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主变ID
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "主变ID", name = "mainId")
|
||||||
|
private String mainId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主变名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "主变ID", name = "mainName")
|
||||||
|
private String mainName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装置ID
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "主变ID", name = "subId")
|
||||||
|
private String subId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装置名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "主变ID", name = "subName")
|
||||||
|
private String subName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sensor编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "Sensor编码", name = "sensorCode")
|
||||||
|
private String sensorCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* P:原边 S:副边
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "P:原边 S:副边", name = "side")
|
||||||
|
private String side;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 相位 A:B:C:O:全相
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "相位 A:B:C:O:全相", name = "phase")
|
||||||
|
private String phase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上下侧 U:上侧 D:下侧
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "上下侧 U:上侧 D:下侧", name = "inOut")
|
||||||
|
private String inOut;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上下侧 U:上侧 D:下侧
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "上下侧 U:上侧 D:下侧", name = "frequency")
|
||||||
|
private String frequency;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装置类别 1:振动装置 2:噪声装置 3:中心点装置 4:其他
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "装置类别 1:振动装置 2:噪声装置 3:中心点装置 4:其他", name = "deviceType")
|
||||||
|
private String deviceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 寄存器地址
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "寄存器地址", name = "addr")
|
||||||
|
private int addr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 寄存器类型 EX:异常检测 ST:状态量YX; MX:模拟量YC; SE:控制量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "寄存器类型 EX:异常检测 ST:状态量YX; MX:模拟量YC; SE:控制量", name = "addrType")
|
||||||
|
private String addrType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 寄存器类型 EX:异常检测 ST:状态量YX; MX:模拟量YC; SE:控制量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "寄存器描述", name = "adrdesc")
|
||||||
|
private String adrdesc;
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
package com.chenxuan.entity.model;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Carrey Zheng
|
||||||
|
* @create 2020-07-06 5:38 PM
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@TableName("busi_environment_real_statistics")
|
||||||
|
public class BusiEnvironmentRealStatistics extends Model<BusiEnvironmentRealStatistics> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "主键", name = "id")
|
||||||
|
@TableId(value = "id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主变id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "主设备ID,源自表busi_main_device.id", name = "mainId")
|
||||||
|
@TableField("main_id")
|
||||||
|
private String mainId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 温度
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "温度", name = "temp")
|
||||||
|
@TableField("temp")
|
||||||
|
private String temp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 湿度
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "湿度", name = "humidity")
|
||||||
|
@TableField("humidity")
|
||||||
|
private String humidity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间", name = "insTime")
|
||||||
|
@TableField("ins_time")
|
||||||
|
private Date insTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hbase中的rowkey
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "hbase中的rowkey", name = "hbaseRowkey")
|
||||||
|
@TableField("hbase_rowkey")
|
||||||
|
private String hbaseRowkey;
|
||||||
|
}
|
@ -0,0 +1,106 @@
|
|||||||
|
package com.chenxuan.entity.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 io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
@Data
|
||||||
|
@TableName("busi_modbus_param_bind")
|
||||||
|
public class BusiModbusParamBind implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "id", value = "主键id")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 Y:启用 N:禁用/预留
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "状态 Y:启用 N:禁用/预留", name = "state")
|
||||||
|
@TableField("state")
|
||||||
|
private String state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主变ID
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "主变ID", name = "mainId")
|
||||||
|
@TableField("main_id")
|
||||||
|
private String mainId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装置ID
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "主变ID", name = "subId")
|
||||||
|
@TableField("sub_id")
|
||||||
|
private String subId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sensor编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "Sensor编码", name = "sensorCode")
|
||||||
|
@TableField("sensor_code")
|
||||||
|
private String sensorCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* P:原边 S:副边
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "P:原边 S:副边", name = "side")
|
||||||
|
@TableField("side")
|
||||||
|
private String side;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 相位 A:B:C:O:全相
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "相位 A:B:C:O:全相", name = "phase")
|
||||||
|
@TableField("phase")
|
||||||
|
private String phase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上下侧 U:上侧 D:下侧
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "上下侧 U:上侧 D:下侧", name = "inOut")
|
||||||
|
@TableField("in_out")
|
||||||
|
private String inOut;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上下侧 U:上侧 D:下侧
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "上下侧 U:上侧 D:下侧", name = "frequency")
|
||||||
|
@TableField("frequency")
|
||||||
|
private String frequency;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装置类别 1:振动装置 2:噪声装置 3:中心点装置 4:其他
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "装置类别 1:振动装置 2:噪声装置 3:中心点装置 4:其他", name = "deviceType")
|
||||||
|
@TableField("device_type")
|
||||||
|
private String deviceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 寄存器地址
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "寄存器地址", name = "addr")
|
||||||
|
@TableField("addr")
|
||||||
|
private int addr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 寄存器类型 EX:异常检测 ST:状态量YX; MX:模拟量YC; SE:控制量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "寄存器类型 EX:异常检测 ST:状态量YX; MX:模拟量YC; SE:控制量", name = "addrType")
|
||||||
|
@TableField("addr_type")
|
||||||
|
private String addrType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 寄存器类型 EX:异常检测 ST:状态量YX; MX:模拟量YC; SE:控制量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "寄存器描述", name = "adrdesc")
|
||||||
|
@TableField("adrdesc")
|
||||||
|
private String adrdesc;
|
||||||
|
}
|
@ -1,34 +1,14 @@
|
|||||||
package com.chenxuan.entity.model;
|
package com.chenxuan.entity.model;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author buck_guo
|
* @author buck_guo
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
public class DeviceInfo {
|
public class DeviceInfo {
|
||||||
private String device;
|
private String device;
|
||||||
private String ip;
|
private String ip;
|
||||||
private String port;
|
private String port;
|
||||||
|
private String iedChannel;
|
||||||
public String getDevice() {
|
|
||||||
return device;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDevice(String device) {
|
|
||||||
this.device = device;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIp() {
|
|
||||||
return ip;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIp(String ip) {
|
|
||||||
this.ip = ip;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPort() {
|
|
||||||
return port;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPort(String port) {
|
|
||||||
this.port = port;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,103 @@
|
|||||||
|
package com.chenxuan.entity.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BusiAmpliDayIncreaseRateVo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="主键id", name="id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 录播文件记录id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="录播文件记录id", name="fileId")
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主变id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="主变id", name="mainId")
|
||||||
|
private String mainId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装置id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="装置id", name="subId")
|
||||||
|
private String subId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 频率
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="频率", name="frequency")
|
||||||
|
private String frequency;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 振幅阈值(mm/s2)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="振幅阈值(mm/s2)", name="amplitude")
|
||||||
|
private String amplitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日增长率(%)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="日增长率(%)", name="dayRate")
|
||||||
|
private String dayRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 振动幅值月增长率(%)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="振动幅值月增长率(%)", name="monthRate")
|
||||||
|
private String monthRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 振动幅值月偏差率(%)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="振动幅值月偏差率(%)", name="deviationRate")
|
||||||
|
private String deviationRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="创建时间", name="dTime")
|
||||||
|
private String dTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负载类型 1:空载 2:负载
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="负载类型", name="loadType")
|
||||||
|
private String loadType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 频率集合
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="频率集合", name="frequencyList")
|
||||||
|
private List<String> frequencyList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日增长率集合
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="日增长率集合", name="dayRateList")
|
||||||
|
private List<String> dayRateList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 振动幅值月增长率集合
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="振动幅值月增长率集合", name="monthRateList")
|
||||||
|
private List<String> monthRateList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 振动幅值月偏差率集合
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="振动幅值月偏差率集合", name="deviationRateList")
|
||||||
|
private List<String> deviationRateList;
|
||||||
|
}
|
@ -0,0 +1,101 @@
|
|||||||
|
package com.chenxuan.entity.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
@Data
|
||||||
|
public class BusiModbusParamBindVo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "id", value = "主键id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 Y:启用 N:禁用/预留
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "状态 Y:启用 N:禁用/预留", name = "state")
|
||||||
|
private String state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主变ID
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "主变ID", name = "mainId")
|
||||||
|
private String mainId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主变名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "主变ID", name = "mainName")
|
||||||
|
private String mainName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装置ID
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "主变ID", name = "subId")
|
||||||
|
private String subId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装置名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "主变ID", name = "subName")
|
||||||
|
private String subName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sensor编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "Sensor编码", name = "sensorCode")
|
||||||
|
private String sensorCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* P:原边 S:副边
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "P:原边 S:副边", name = "side")
|
||||||
|
private String side;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 相位 A:B:C:O:全相
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "相位 A:B:C:O:全相", name = "phase")
|
||||||
|
private String phase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上下侧 U:上侧 D:下侧
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "上下侧 U:上侧 D:下侧", name = "inOut")
|
||||||
|
private String inOut;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上下侧 U:上侧 D:下侧
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "上下侧 U:上侧 D:下侧", name = "frequency")
|
||||||
|
private String frequency;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装置类别 1:振动装置 2:噪声装置 3:中心点装置 4:其他
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "装置类别 1:振动装置 2:噪声装置 3:中心点装置 4:其他", name = "deviceType")
|
||||||
|
private String deviceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 寄存器地址
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "寄存器地址", name = "addr")
|
||||||
|
private int addr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 寄存器类型 EX:异常检测 ST:状态量YX; MX:模拟量YC; SE:控制量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "寄存器类型 EX:异常检测 ST:状态量YX; MX:模拟量YC; SE:控制量", name = "addrType")
|
||||||
|
private String addrType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 寄存器类型 EX:异常检测 ST:状态量YX; MX:模拟量YC; SE:控制量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "寄存器描述", name = "adrdesc")
|
||||||
|
private String adrdesc;
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
package com.chenxuan.entity.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author plus wang
|
||||||
|
* @create 2021-11-18 3:24 PM
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class DeviceNumVo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "total", value = "总数")
|
||||||
|
private int total;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 正常数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "normal", value = "正常数")
|
||||||
|
private int normal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 故障数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "gzNum", value = "故障数")
|
||||||
|
private int gzNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 历史故障数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "totalGZNum", value = "历史故障数")
|
||||||
|
private int totalGZNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异常数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "ycNum", value = "异常数")
|
||||||
|
private int ycNum;
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.chenxuan.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.chenxuan.entity.dto.BusiModbusParamBindDto;
|
||||||
|
import com.chenxuan.entity.model.BusiModbusParamBind;
|
||||||
|
import com.chenxuan.entity.vo.BusiModbusParamBindVo;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface BusiModbusParamBindMapper extends BaseMapper<BusiModbusParamBind> {
|
||||||
|
int addModbusParamBind(BusiModbusParamBind busiModbusParamBind);
|
||||||
|
List<BusiModbusParamBindVo> queryModbusParamBind(Page<BusiModbusParamBindVo> page, @Param("params") BusiModbusParamBindDto dto);
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.chenxuan.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.chenxuan.entity.dto.BusiModbusTemplateDto;
|
||||||
|
import com.chenxuan.entity.model.BusiModbusTemplate;
|
||||||
|
import com.chenxuan.entity.vo.BusiModbusTemplateVo;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface BusiModbusTemplateMapper extends BaseMapper<BusiModbusTemplate> {
|
||||||
|
List<BusiModbusTemplateVo> queryModbusTemplate(@Param("param") BusiModbusTemplateDto param);
|
||||||
|
public int delBusiModbusParamBind(int[] ids);
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.chenxuan.runner;
|
||||||
|
|
||||||
|
import com.chenxuan.service.ScheduleJobService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.CommandLineRunner;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: ScheduleJobInitRunner
|
||||||
|
* @Description: 监听容器启动,并开始从数据库加在定时任务.
|
||||||
|
* @Author: Arno
|
||||||
|
* @Date: 2023/8/12 19:29
|
||||||
|
* @version V1.0
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class ScheduleJobInitRunner implements CommandLineRunner {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ScheduleJobService scheduleJobService ;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run(String... args) throws Exception {
|
||||||
|
log.info("--------加载定时任务--------");
|
||||||
|
scheduleJobService.timingTask();
|
||||||
|
}
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue