diff --git a/tzipc-server/tzipc-admin/src/main/java/com/inspur/web/controller/industrial/DataLogController.java b/tzipc-server/tzipc-admin/src/main/java/com/inspur/web/controller/industrial/DataLogController.java deleted file mode 100644 index e90e029..0000000 --- a/tzipc-server/tzipc-admin/src/main/java/com/inspur/web/controller/industrial/DataLogController.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.inspur.web.controller.industrial; - -import com.inspur.common.core.controller.BaseController; -import com.inspur.common.core.domain.AjaxResult; -import com.inspur.industrial.service.IDataLogService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -/** - * 测试界面 - * - * @author inspur - */ -@RestController -@RequestMapping("/dataLog") -public class DataLogController extends BaseController -{ - @Autowired - private IDataLogService iDataLogService; - - /** - * 获取测试界面数据 - */ - @GetMapping("/list") - public AjaxResult list() - { - return AjaxResult.success(iDataLogService.queryDataLog()); - } - -} diff --git a/tzipc-server/tzipc-admin/src/main/java/com/inspur/web/controller/industrial/MalConfigController.java b/tzipc-server/tzipc-admin/src/main/java/com/inspur/web/controller/industrial/MalConfigController.java deleted file mode 100644 index 50de593..0000000 --- a/tzipc-server/tzipc-admin/src/main/java/com/inspur/web/controller/industrial/MalConfigController.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.inspur.web.controller.industrial; - -import com.inspur.common.core.controller.BaseController; -import com.inspur.common.core.domain.AjaxResult; -import com.inspur.common.core.domain.entity.MalConfig; -import com.inspur.industrial.service.IMalConfigService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * 故障树 - * - * @author inspur - */ -@RestController -@RequestMapping("/mal") -public class MalConfigController extends BaseController { - - @Autowired - private IMalConfigService iMalConfigService; - - /** - * 获取故障树列表 - */ - @GetMapping("/tree") - public AjaxResult list(MalConfig malConfig) - { - return AjaxResult.success(iMalConfigService.queryMalConfigList(malConfig)); - } -} diff --git a/tzipc-server/tzipc-admin/src/main/java/com/inspur/web/controller/industrial/PhmEquParaConfigController.java b/tzipc-server/tzipc-admin/src/main/java/com/inspur/web/controller/industrial/PhmEquParaConfigController.java deleted file mode 100644 index 1e95a27..0000000 --- a/tzipc-server/tzipc-admin/src/main/java/com/inspur/web/controller/industrial/PhmEquParaConfigController.java +++ /dev/null @@ -1,111 +0,0 @@ -package com.inspur.web.controller.industrial; - -import java.util.List; -import javax.servlet.http.HttpServletResponse; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.inspur.common.annotation.Log; -import com.inspur.common.core.controller.BaseController; -import com.inspur.common.core.domain.AjaxResult; -import com.inspur.common.enums.BusinessType; -import com.inspur.industrial.domain.PhmEquParaConfig; -import com.inspur.industrial.service.IPhmEquParaConfigService; -import com.inspur.common.utils.poi.ExcelUtil; -import com.inspur.common.core.page.TableDataInfo; - -/** - * 参数值配置表Controller - * - * @author zhaofie - * @date 2023-08-17 - */ -@RestController -@RequestMapping("/paraConfig") -public class PhmEquParaConfigController extends BaseController -{ - @Autowired - private IPhmEquParaConfigService phmEquParaConfigService; - - /** - * 查询参数值配置表列表 - */ - @PreAuthorize("@ss.hasPermi('paraConfig:paraConfig:list')") - @GetMapping("/list") - public TableDataInfo list(PhmEquParaConfig phmEquParaConfig) - { - startPage(); - List list = phmEquParaConfigService.selectPhmEquParaConfigList(phmEquParaConfig); - return getDataTable(list); - } - - - @GetMapping("/listAll") - public AjaxResult listAll(PhmEquParaConfig phmEquParaConfig) - { - return AjaxResult.success(phmEquParaConfigService.selectPhmEquParaConfigList(phmEquParaConfig)); - } - - /** - * 导出参数值配置表列表 - */ - @PreAuthorize("@ss.hasPermi('paraConfig:paraConfig:export')") - @Log(title = "参数值配置表", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, PhmEquParaConfig phmEquParaConfig) - { - List list = phmEquParaConfigService.selectPhmEquParaConfigList(phmEquParaConfig); - ExcelUtil util = new ExcelUtil(PhmEquParaConfig.class); - util.exportExcel(response, list, "参数值配置表数据"); - } - - /** - * 获取参数值配置表详细信息 - */ - @PreAuthorize("@ss.hasPermi('paraConfig:paraConfig:query')") - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { - return AjaxResult.success(phmEquParaConfigService.selectPhmEquParaConfigById(id)); - } - - /** - * 新增参数值配置表 - */ - @PreAuthorize("@ss.hasPermi('paraConfig:paraConfig:add')") - @Log(title = "参数值配置表", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody PhmEquParaConfig phmEquParaConfig) - { - return toAjax(phmEquParaConfigService.insertPhmEquParaConfig(phmEquParaConfig)); - } - - /** - * 修改参数值配置表 - */ - @PreAuthorize("@ss.hasPermi('paraConfig:paraConfig:edit')") - @Log(title = "参数值配置表", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody PhmEquParaConfig phmEquParaConfig) - { - return toAjax(phmEquParaConfigService.updatePhmEquParaConfig(phmEquParaConfig)); - } - - /** - * 删除参数值配置表 - */ - @PreAuthorize("@ss.hasPermi('paraConfig:paraConfig:remove')") - @Log(title = "参数值配置表", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { - return toAjax(phmEquParaConfigService.deletePhmEquParaConfigByIds(ids)); - } -} diff --git a/tzipc-server/tzipc-admin/src/main/java/com/inspur/web/controller/industrial/TestScreenController.java b/tzipc-server/tzipc-admin/src/main/java/com/inspur/web/controller/industrial/TestScreenController.java deleted file mode 100644 index 2365619..0000000 --- a/tzipc-server/tzipc-admin/src/main/java/com/inspur/web/controller/industrial/TestScreenController.java +++ /dev/null @@ -1,111 +0,0 @@ -package com.inspur.web.controller.industrial; - -import com.inspur.common.core.controller.BaseController; -import com.inspur.common.core.domain.AjaxResult; -import com.inspur.industrial.service.IPhmEquAlarmRecordService; -import com.inspur.industrial.service.ITestScreenService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -/** - * 测试界面 - * - * @author inspur - */ -@RestController -@RequestMapping("/test/screen") -public class TestScreenController extends BaseController { - @Autowired - private ITestScreenService iTestScreenService; - - @Autowired - private IPhmEquAlarmRecordService iPhmEquAlarmRecordService; - - /** - * 获取ipc运行监控界面数据 - */ - @GetMapping("/data") - public AjaxResult list() { - return AjaxResult.success(iTestScreenService.queryScreenData()); - } - - /** - * 获取tzipc超压底缸运行监控界面数据 - */ - @GetMapping("/cydgdata") - public AjaxResult cydgdata() { - return AjaxResult.success(iTestScreenService.querycydgdata()); - } - - /** - * 获取tzipc中高顶辊运行监控界面数据 - */ - @GetMapping("/zgdgTopdata") - public AjaxResult zgdgTopdata() { - return AjaxResult.success(iTestScreenService.zgdgTopdata()); - } - - /** - * 获取tzipc中高底辊运行监控界面数据 - */ - @GetMapping("/zgdgBottomdata") - public AjaxResult zgdgBottomdata() { - return AjaxResult.success(iTestScreenService.zgdgBottomdata()); - } - - /** - * 获取ipc运行监控界面数据 - */ - @GetMapping("/zgdkdata") - public AjaxResult zgdkdata() { - return AjaxResult.success(iTestScreenService.queryzgdkdata()); - } - - - /** - * 获取tzipc中高顶辊实时数据 - */ - @GetMapping("/zgdgTopdataRealTime") - public AjaxResult zgdgTopdataRealTime() { - return AjaxResult.success(iTestScreenService.zgdgTopdataRealTime()); - } - - /** - * 获取tzipc中高底辊实时数据 - */ - @GetMapping("/zgdgBottodataRealTime") - public AjaxResult zgdgBottodataRealTime() { - return AjaxResult.success(iTestScreenService.zgdgBottomdataRealTime()); - } - - /** - * 获取tzipc超压底缸实时数据 - */ - @GetMapping("/cydgdataRealTime") - public AjaxResult cydgdataRealTime() { - return AjaxResult.success(iTestScreenService.querycydgdataRealTime()); - } - - /** - * 获取tzipc超压底缸历史报警数据 - */ - @GetMapping("/cydgdataHistory") - public AjaxResult cydgdataHistory() { - return AjaxResult.success(iPhmEquAlarmRecordService.selectPhmEquAlarmRecordList(null)); - } - /** - * 获取tzipc中高顶辊历史报警数据 - */ - @GetMapping("/zgdgTopdataHistory") - public AjaxResult zgdgTopdataHistory() { - return AjaxResult.success(iPhmEquAlarmRecordService.selectPhmEquAlarmRecordList1(null)); - } - /** - * 获取tzipc中高底辊历史报警数据 - */ - @GetMapping("/zgdgBottomdataHistory") - public AjaxResult zgdgBottomdataHistory() { - return AjaxResult.success(iPhmEquAlarmRecordService.selectPhmEquAlarmRecordList2(null)); - } - -} diff --git a/tzipc-server/tzipc-datasyn/src/main/java/com/inspur/datasyn/modbus/timer/IPCDataTimerThread.java b/tzipc-server/tzipc-datasyn/src/main/java/com/inspur/datasyn/modbus/timer/IPCDataTimerThread.java deleted file mode 100644 index 17eb8bd..0000000 --- a/tzipc-server/tzipc-datasyn/src/main/java/com/inspur/datasyn/modbus/timer/IPCDataTimerThread.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.inspur.datasyn.modbus.timer; - -import com.inspur.common.core.redis.RedisCache; -import com.inspur.datasyn.modbus.Modbus4jUtils; -import com.inspur.datasyn.mqtt.BeanUtils; -import com.inspur.industrial.domain.PhmEquParaConfig; -import com.inspur.industrial.mapper.PhmEquParaConfigMapper; -import com.inspur.system.service.influx.InfluxDBService; -import com.serotonin.modbus4j.code.DataType; -import com.serotonin.modbus4j.exception.ErrorResponseException; -import com.serotonin.modbus4j.exception.ModbusInitException; -import com.serotonin.modbus4j.exception.ModbusTransportException; -import org.influxdb.dto.QueryResult; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; - -import java.util.List; -import java.util.Map; - -public class IPCDataTimerThread implements Runnable { - private static final Logger logger = LoggerFactory.getLogger(IPCDataTimerThread.class); - - - private Modbus4jUtils modbus4jUtils; - private RedisCache redisCache; - - public IPCDataTimerThread(Modbus4jUtils modbus4jUtils,RedisCache redisCache){ - this.modbus4jUtils = modbus4jUtils; - this.redisCache = redisCache; - } - - @Override - public void run() { - PhmEquParaConfigMapper phmEquParaConfigMapper = BeanUtils.getBean(PhmEquParaConfigMapper.class); - InfluxDBService influxDBService = BeanUtils.getBean(InfluxDBService.class); -// Modbus4jUtils modbus4jUtils = BeanUtils.getBean(Modbus4jUtils.class); - - List phmEquParaConfigs = phmEquParaConfigMapper.selectPhmEquParaConfigList(new PhmEquParaConfig()); - QueryResult query = influxDBService.query("select * from phm_monitor_data_list order by time desc limit 1"); - List> maps = influxDBService.queryResultProcess(query); - Integer comResult = 1; - if (maps.size() > 0) { - for (Map object : maps) { - for (int i = 0; i < phmEquParaConfigs.size(); i ++) { - PhmEquParaConfig config = phmEquParaConfigs.get(i); - //获取实际值 - Double value = Double.parseDouble((object.get(config.getNameKey()) == null || object.get(config.getNameKey()) == "" ? 0.0 : object.get(config.getNameKey())).toString()); - //根据比较条件比较实际值和参考值 - if (config.getReferenceCon().equals("小于")) { - if (!(value.compareTo(new Double(config.getReference())) < 0)) { - comResult = 2; - break; - } - } else if (config.getReferenceCon().equals("大于")) { - if (!(value.compareTo(new Double(config.getReference())) > 0)) { - comResult = 2; - break; - } - } else if (config.getReferenceCon().equals("等于")) { - if (!(value.compareTo(new Double(config.getReference())) == 0)) { - comResult = 2; - break; - } - } - } - } - } - try { - if(comResult.equals(redisCache.getCacheObject("lightStatus"))){ - modbus4jUtils.writeHoldingRegister(1, 100, comResult, DataType.FOUR_BYTE_INT_UNSIGNED_SWAPPED); - logger.info("三色等状态控制,三色灯在状态修改为:"+comResult); - } - - } catch (Exception e) { - e.printStackTrace(); - } - } -} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/domain/EquConfig.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/domain/EquConfig.java deleted file mode 100644 index e34df8c..0000000 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/domain/EquConfig.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.inspur.industrial.domain; - -import org.apache.commons.lang3.builder.ToStringBuilder; - -/** - * 设备参数表 phm_equ_config - * - * @author zhaofei - */ -public class EquConfig -{ - private static final long serialVersionUID = 1L; - - /** 设备主键 */ - private Long equId; - - /** 设备名称 */ - private String equName; - - /** 设备型号 */ - private String equMode; - - /** 设备状态 */ - private String equStatus; - - /** 设备安装位置 */ - private String equPlace; - - /** 维修记录 */ - private String equDate; - - public Long getEquId() { - return equId; - } - - public void setEquId(Long equId) { - this.equId = equId; - } - - public String getEquName() { - return equName; - } - - public void setEquName(String equName) { - this.equName = equName; - } - - public String getEquMode() { - return equMode; - } - - public void setEquMode(String equMode) { - this.equMode = equMode; - } - - public String getEquStatus() { - return equStatus; - } - - public void setEquStatus(String equStatus) { - this.equStatus = equStatus; - } - - public String getEquPlace() { - return equPlace; - } - - public void setEquPlace(String equPlace) { - this.equPlace = equPlace; - } - - public String getEquDate() { - return equDate; - } - - public void setEquDate(String equDate) { - this.equDate = equDate; - } - - @Override - public String toString() { - return new ToStringBuilder(this) - .append("equId", equId) - .append("equName", equName) - .append("equMode", equMode) - .append("equStatus", equStatus) - .append("equPlace", equPlace) - .append("equDate", equDate) - .toString(); - } -} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/domain/PhmEquAlarmRecord.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/domain/PhmEquAlarmRecord.java deleted file mode 100644 index e87c1e6..0000000 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/domain/PhmEquAlarmRecord.java +++ /dev/null @@ -1,159 +0,0 @@ -package com.inspur.industrial.domain; - -import java.util.Date; - -import com.fasterxml.jackson.annotation.JsonFormat; -import com.inspur.common.annotation.Excel; -import com.inspur.common.core.domain.BaseEntity; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * 报警记录 - * - * @author zhanghan - * @date 2023-10-12 - */ -public class PhmEquAlarmRecord extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 主键 - */ - private Long id; - - /** - * 业务id - */ - @Excel(name = "业务id") - private Long businessId; - - /** - * 报警项key - */ - @Excel(name = "报警项key") - private String alarmNameKey; - - /** - * 报警项 - */ - @Excel(name = "报警项") - private String alarmName; - - /** - * 报警数据 - */ - @Excel(name = "报警数据") - private String alarmData; - - /** - * 报警内容 - */ - @Excel(name = "报警内容") - private String alarmDetail; - - /** - * 报警时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @Excel(name = "报警时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") - private Date alarmTime; - - private String type; - - public void setId(Long id) { - this.id = id; - } - - public Long getId() { - return id; - } - - public void setBusinessId(Long businessId) { - this.businessId = businessId; - } - - public Long getBusinessId() { - return businessId; - } - - public void setAlarmNameKey(String alarmNameKey) { - this.alarmNameKey = alarmNameKey; - } - - public String getAlarmNameKey() { - return alarmNameKey; - } - - public void setAlarmName(String alarmName) { - this.alarmName = alarmName; - } - - public String getAlarmName() { - return alarmName; - } - - public void setAlarmData(String alarmData) { - this.alarmData = alarmData; - } - - public String getAlarmData() { - return alarmData; - } - - public void setAlarmDetail(String alarmDetail) { - this.alarmDetail = alarmDetail; - } - - public String getAlarmDetail() { - return alarmDetail; - } - - public void setAlarmTime(Date alarmTime) { - this.alarmTime = alarmTime; - } - - public Date getAlarmTime() { - return alarmTime; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("businessId", getBusinessId()) - .append("alarmNameKey", getAlarmNameKey()) - .append("alarmName", getAlarmName()) - .append("alarmData", getAlarmData()) - .append("alarmDetail", getAlarmDetail()) - .append("alarmTime", getAlarmTime()) - .toString(); - } - - public PhmEquAlarmRecord() { - } - - public PhmEquAlarmRecord(Long businessId, String alarmNameKey, String alarmName, String alarmData, String alarmDetail, Date alarmTime, String type) { - this.businessId = businessId; - this.alarmNameKey = alarmNameKey; - this.alarmName = alarmName; - this.alarmData = alarmData; - this.alarmDetail = alarmDetail; - this.alarmTime = alarmTime; - this.type = type; - } - - public PhmEquAlarmRecord(Long businessId, String alarmData, Date alarmTime) { - this.businessId = businessId; - this.alarmData = alarmData; - this.alarmTime = alarmTime; - } -} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/domain/PhmEquParaConfig.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/domain/PhmEquParaConfig.java deleted file mode 100644 index fcd0c0f..0000000 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/domain/PhmEquParaConfig.java +++ /dev/null @@ -1,183 +0,0 @@ -package com.inspur.industrial.domain; - -import com.inspur.common.annotation.Excel; -import com.inspur.common.core.domain.BaseEntity; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * 参数值配置表对象 phm_equ_para_config - * - * @author zhaofie - * @date 2023-08-17 - */ -public class PhmEquParaConfig extends BaseEntity implements Cloneable -{ - private static final long serialVersionUID = 1L; - - /** id */ - private Long id; - - /** 名称对应key */ - private String nameKey; - - /** 名称 */ - private String name; - - /** 单位 */ - private String unit; - - /** 参考值 */ - private String reference; - - /** 参考值显示 */ - private String referenceName; - - /** 参考值比较标准 */ - private String referenceCon; - - /** 故障显示 */ - private String alarmDetail; - - /** 类型 */ - private String type; - - /** alarmId */ - private Long alarmId; - /** - * 实际值 - */ - private Double realityValue; - /** - * 数据状态 - */ - private Boolean comResult; - - - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setNameKey(String nameKey) - { - this.nameKey = nameKey; - } - - public String getNameKey() - { - return nameKey; - } - public void setName(String name) - { - this.name = name; - } - - public String getName() - { - return name; - } - public void setUnit(String unit) - { - this.unit = unit; - } - - public String getUnit() - { - return unit; - } - public void setReference(String reference) - { - this.reference = reference; - } - - public String getReference() - { - return reference; - } - public void setReferenceName(String referenceName) - { - this.referenceName = referenceName; - } - - public String getReferenceName() - { - return referenceName; - } - public void setReferenceCon(String referenceCon) - { - this.referenceCon = referenceCon; - } - - public String getReferenceCon() - { - return referenceCon; - } - - public Double getRealityValue() { - return realityValue; - } - - public void setRealityValue(Double realityValue) { - this.realityValue = realityValue; - } - - public Boolean getComResult() { - return comResult; - } - - public void setComResult(Boolean comResult) { - this.comResult = comResult; - } - - public String getAlarmDetail() { - return alarmDetail; - } - - public void setAlarmDetail(String alarmDetail) { - this.alarmDetail = alarmDetail; - } - - public Long getAlarmId() { - return alarmId; - } - - public void setAlarmId(Long alarmId) { - this.alarmId = alarmId; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("nameKey", getNameKey()) - .append("name", getName()) - .append("unit", getUnit()) - .append("reference", getReference()) - .append("referenceName", getReferenceName()) - .append("referenceCon", getReferenceCon()) - .toString(); - } - - @Override - public PhmEquParaConfig clone() { - try { - return (PhmEquParaConfig) super.clone(); - } catch (CloneNotSupportedException e) { - e.printStackTrace(); - return null; - } - } -} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/mapper/EquConfigMapper.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/mapper/EquConfigMapper.java deleted file mode 100644 index 2a62215..0000000 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/mapper/EquConfigMapper.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.inspur.industrial.mapper; - -import com.inspur.industrial.domain.EquConfig; -import com.inspur.system.domain.SysConfig; - -import java.util.List; - -/** - * 设备参数配置 数据层 - * - * @author zhaofei - */ -public interface EquConfigMapper -{ - /** - * 查询设备参数配置信息 - * - * @return 参数配置信息 - */ - public EquConfig selectConfig(); - -} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/mapper/MalConfigMapper.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/mapper/MalConfigMapper.java deleted file mode 100644 index 3c459ee..0000000 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/mapper/MalConfigMapper.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.inspur.industrial.mapper; - -import com.inspur.common.core.domain.entity.MalConfig; - -import java.util.List; - -/** - * 故障树 数据层 - * - * @author inspur - */ -public interface MalConfigMapper { - - /** - * 查询故障列表 - * - * @param malConfig - * @return 故障集合 - */ - public List queryMalConfigList(MalConfig malConfig); -} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/mapper/PhmEquAlarmRecordMapper.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/mapper/PhmEquAlarmRecordMapper.java deleted file mode 100644 index 702789a..0000000 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/mapper/PhmEquAlarmRecordMapper.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.inspur.industrial.mapper; - -import com.inspur.industrial.domain.PhmEquAlarmRecord; - -import java.util.List; - -public interface PhmEquAlarmRecordMapper { - /** - * 查询超压顶缸报警记录列表 - */ - List selectPhmEquAlarmRecordList(PhmEquAlarmRecord phmEquAlarmRecord); - - /** - * 查询中高顶辊报警记录列表 - */ - List selectPhmEquAlarmRecordList1(PhmEquAlarmRecord phmEquAlarmRecord); - - /** - * 查询中高底辊报警记录列表 - */ - List selectPhmEquAlarmRecordList2(PhmEquAlarmRecord phmEquAlarmRecord); - - /** - * 批量新增超压顶缸报警记录 - */ - int batchPhmEquAlarmRecord(List list); - - /** - * 批量新增中高顶辊报警记录 - */ - int batchPhmEquAlarmRecord1(List list); - - /** - * 批量新增中高底辊报警记录 - */ - int batchPhmEquAlarmRecord2(List list); - -} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/mapper/PhmEquParaConfigMapper.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/mapper/PhmEquParaConfigMapper.java deleted file mode 100644 index 694c28d..0000000 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/mapper/PhmEquParaConfigMapper.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.inspur.industrial.mapper; - -import java.util.List; - -import com.inspur.industrial.domain.EquConfig; -import com.inspur.industrial.domain.PhmEquParaConfig; - -/** - * 参数值配置表Mapper接口 - * - * @author zhaofie - * @date 2023-08-17 - */ -public interface PhmEquParaConfigMapper -{ - /** - * 查询参数值配置表 - * - * @param id 参数值配置表主键 - * @return 参数值配置表 - */ - public PhmEquParaConfig selectPhmEquParaConfigById(Long id); - - /** - * 查询超压底缸参数值配置表列表 - * - * @param phmEquParaConfig 参数值配置表 - * @return 参数值配置表集合 - */ - public List selectPhmEquParaConfigList(PhmEquParaConfig phmEquParaConfig); - - /** - * 查询中高顶辊参数值配置表列表 - * - * @param phmEquParaConfig 参数值配置表 - * @return 参数值配置表集合 - */ - public List selectPhmEquParaConfigList1(PhmEquParaConfig phmEquParaConfig); - - /** - * 查询中高底辊参数值配置表列表 - * - * @param phmEquParaConfig 参数值配置表 - * @return 参数值配置表集合 - */ - public List selectPhmEquParaConfigList2(PhmEquParaConfig phmEquParaConfig); - - /** - * 新增参数值配置表 - * - * @param phmEquParaConfig 参数值配置表 - * @return 结果 - */ - public int insertPhmEquParaConfig(PhmEquParaConfig phmEquParaConfig); - - /** - * 修改参数值配置表 - * - * @param phmEquParaConfig 参数值配置表 - * @return 结果 - */ - public int updatePhmEquParaConfig(PhmEquParaConfig phmEquParaConfig); - - /** - * 删除参数值配置表 - * - * @param id 参数值配置表主键 - * @return 结果 - */ - public int deletePhmEquParaConfigById(Long id); - - /** - * 批量删除参数值配置表 - * - * @param ids 需要删除的数据主键集合 - * @return 结果 - */ - public int deletePhmEquParaConfigByIds(Long[] ids); -} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/IDataLogService.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/IDataLogService.java deleted file mode 100644 index 45c6f7f..0000000 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/IDataLogService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.inspur.industrial.service; - -import java.util.List; -import java.util.Map; - -/** - * 数据记录 服务层 - * - * @author zhaofei - */ -public interface IDataLogService { - /** - * 数据记录接口 - */ - public List> queryDataLog(); -} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/IMalConfigService.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/IMalConfigService.java deleted file mode 100644 index 51976cc..0000000 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/IMalConfigService.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.inspur.industrial.service; - -import com.inspur.common.core.domain.TreeSelect; -import com.inspur.common.core.domain.entity.MalConfig; - -import java.util.List; - -/** - * 故障树 服务层 - * - * @author inspur - */ -public interface IMalConfigService { - - /** - * 查询故障列表 - * - * @param malConfig - * @return 故障集合 - */ - public List queryMalConfigList(MalConfig malConfig); - - /** - * 构建前端所需要树结构 - * - * @param malConfigs - * @return 树结构列表 - */ - public List buildMalConfig(List malConfigs); - - /** - * 构建前端所需要下拉树结构 - * - * @param malConfigs - * @return 下拉树结构列表 - */ - public List buildMalConfigSelect(List malConfigs); -} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/IPhmEquAlarmRecordService.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/IPhmEquAlarmRecordService.java deleted file mode 100644 index 57db5ea..0000000 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/IPhmEquAlarmRecordService.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.inspur.industrial.service; - -import com.inspur.industrial.domain.PhmEquAlarmRecord; -import com.inspur.industrial.domain.PhmEquParaConfig; - -import java.util.List; - -/** - * 参数值配置表Service接口 - * - * @author zhaofie - * @date 2023-08-17 - */ -public interface IPhmEquAlarmRecordService -{ - /** - * 查询超压顶缸报警记录列表 - */ - List selectPhmEquAlarmRecordList(PhmEquAlarmRecord phmEquAlarmRecord); - - /** - * 查询中高顶辊报警记录列表 - */ - List selectPhmEquAlarmRecordList1(PhmEquAlarmRecord phmEquAlarmRecord); - - /** - * 查询中高底辊报警记录列表 - */ - List selectPhmEquAlarmRecordList2(PhmEquAlarmRecord phmEquAlarmRecord); - - /** - * 批量新增超压顶缸报警记录 - */ - int batchPhmEquAlarmRecord(List list); - - /** - * 批量新增中高顶辊报警记录 - */ - int batchPhmEquAlarmRecord1(List list); - - /** - * 批量新增中高底辊报警记录 - */ - int batchPhmEquAlarmRecord2(List list); -} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/IPhmEquParaConfigService.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/IPhmEquParaConfigService.java deleted file mode 100644 index 3615b1b..0000000 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/IPhmEquParaConfigService.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.inspur.industrial.service; - -import java.util.List; -import com.inspur.industrial.domain.PhmEquParaConfig; - -/** - * 参数值配置表Service接口 - * - * @author zhaofie - * @date 2023-08-17 - */ -public interface IPhmEquParaConfigService -{ - /** - * 查询参数值配置表 - * - * @param id 参数值配置表主键 - * @return 参数值配置表 - */ - public PhmEquParaConfig selectPhmEquParaConfigById(Long id); - - /** - * 查询参数值配置表列表 - * - * @param phmEquParaConfig 参数值配置表 - * @return 参数值配置表集合 - */ - public List selectPhmEquParaConfigList(PhmEquParaConfig phmEquParaConfig); - - /** - * 新增参数值配置表 - * - * @param phmEquParaConfig 参数值配置表 - * @return 结果 - */ - public int insertPhmEquParaConfig(PhmEquParaConfig phmEquParaConfig); - - /** - * 修改参数值配置表 - * - * @param phmEquParaConfig 参数值配置表 - * @return 结果 - */ - public int updatePhmEquParaConfig(PhmEquParaConfig phmEquParaConfig); - - /** - * 批量删除参数值配置表 - * - * @param ids 需要删除的参数值配置表主键集合 - * @return 结果 - */ - public int deletePhmEquParaConfigByIds(Long[] ids); - - /** - * 删除参数值配置表信息 - * - * @param id 参数值配置表主键 - * @return 结果 - */ - public int deletePhmEquParaConfigById(Long id); -} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/ITestScreenService.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/ITestScreenService.java deleted file mode 100644 index 637e1f6..0000000 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/ITestScreenService.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.inspur.industrial.service; - -import com.inspur.industrial.domain.PhmEquParaConfig; - -import java.util.List; -import java.util.Map; - -/** - * 参数配置 服务层 - * - * @author zhaofei - */ -public interface ITestScreenService { - /** - * 大屏数据接口 - */ - Map queryScreenData(); - - Map querycydgdata(); - - Map zgdgBottomdata(); - - Map zgdgTopdata(); - - Map queryzgdkdata(); - - /** - * 实时数据 - * - * @return - */ - List querycydgdataRealTime(); - - List zgdgBottomdataRealTime(); - - List zgdgTopdataRealTime(); -} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/impl/DataLogServicempl.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/impl/DataLogServicempl.java deleted file mode 100644 index 2c53391..0000000 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/impl/DataLogServicempl.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.inspur.industrial.service.impl; - -import com.inspur.industrial.service.IDataLogService; -import com.inspur.system.service.influx.InfluxDBService; -import org.influxdb.dto.QueryResult; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.*; - -@Service -public class DataLogServicempl implements IDataLogService { - - @Autowired - private InfluxDBService influxDBService; - - @Override - public List> queryDataLog() { - QueryResult query = influxDBService.query("select * from phm_monitor_data_list order by time desc limit 18"); - List> maps = influxDBService.queryResultProcess(query); - return maps; - } - - public static void main(String[] args) { - String s = "2015-07-17T20:32:58.662703915Z"; - System.out.println(s); - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - try { - Date time = simpleDateFormat.parse(s); - Calendar calendar = Calendar.getInstance(); - calendar.setTime(time); - int m = calendar.get(Calendar.MINUTE); - int ss = calendar.get(Calendar.SECOND); - System.out.println(m + ":" + ss); - } catch (ParseException e) { - e.printStackTrace(); - } - } - - -} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/impl/MalConfigServicempl.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/impl/MalConfigServicempl.java deleted file mode 100644 index ba19fb8..0000000 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/impl/MalConfigServicempl.java +++ /dev/null @@ -1,112 +0,0 @@ -package com.inspur.industrial.service.impl; - -import com.inspur.common.core.domain.TreeSelect; -import com.inspur.common.utils.StringUtils; -import com.inspur.common.core.domain.entity.MalConfig; -import com.inspur.industrial.mapper.MalConfigMapper; -import com.inspur.industrial.service.IMalConfigService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.stream.Collectors; - -/** - * 故障树 服务实现 - * - * @author inspur - */ -@Service -public class MalConfigServicempl implements IMalConfigService { - - @Autowired - private MalConfigMapper malConfigMapper; - - /** - * 查询故障列表 - * - * @param malConfig - * @return 故障集合 - */ - @Override - public List queryMalConfigList(MalConfig malConfig) { - List malTrees = malConfigMapper.queryMalConfigList(malConfig); - return buildMalConfigSelect(malTrees); - } - - /** - * 构建前端所需要树结构 - * - * @param malConfigs - * @return 树结构列表 - */ - @Override - public List buildMalConfig(List malConfigs) { - List returnList = new ArrayList(); - List tempList = new ArrayList(); - for (MalConfig malConfig : malConfigs) { - tempList.add(malConfig.getId()); - } - for (MalConfig malConfig : malConfigs) { - // 如果是顶级节点, 遍历该父节点的所有子节点 - if (!tempList.contains(malConfig.getParentId())) { - recursionFn(malConfigs, malConfig); - returnList.add(malConfig); - } - } - if (returnList.isEmpty()) { - returnList = malConfigs; - } - return returnList; - } - - /** - * 构建前端所需要下拉树结构 - * - * @param malConfigs - * @return 下拉树结构列表 - */ - @Override - public List buildMalConfigSelect(List malConfigs) { - List malConfig = buildMalConfig(malConfigs); - return malConfig.stream().map(TreeSelect::new).collect(Collectors.toList()); - } - - /** - * 递归列表 - */ - private void recursionFn(List list, MalConfig t) { - // 得到子节点列表 - List childList = getChildList(list, t); - t.setChildren(childList); - for (MalConfig tChild : childList) { - if (hasChild(list, tChild)) { - recursionFn(list, tChild); - } - } - } - - /** - * 得到子节点列表 - */ - private List getChildList(List list, MalConfig t) { - List tlist = new ArrayList(); - Iterator it = list.iterator(); - while (it.hasNext()) { - MalConfig n = (MalConfig) it.next(); - if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getId().longValue()) { - tlist.add(n); - } - } - return tlist; - } - - /** - * 判断是否有子节点 - */ - private boolean hasChild(List list, MalConfig t) { - return getChildList(list, t).size() > 0; - } -} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/impl/PhmEquAlarmRecordServiceImpl.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/impl/PhmEquAlarmRecordServiceImpl.java deleted file mode 100644 index 9b0efee..0000000 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/impl/PhmEquAlarmRecordServiceImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.inspur.industrial.service.impl; - -import com.inspur.industrial.domain.PhmEquAlarmRecord; -import com.inspur.industrial.mapper.PhmEquAlarmRecordMapper; -import com.inspur.industrial.service.IPhmEquAlarmRecordService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -@Service -public class PhmEquAlarmRecordServiceImpl implements IPhmEquAlarmRecordService { - @Autowired - private PhmEquAlarmRecordMapper phmEquAlarmRecordMapper; - - @Override - public List selectPhmEquAlarmRecordList(PhmEquAlarmRecord phmEquAlarmRecord) { - return phmEquAlarmRecordMapper.selectPhmEquAlarmRecordList(phmEquAlarmRecord); - } - - @Override - public List selectPhmEquAlarmRecordList1(PhmEquAlarmRecord phmEquAlarmRecord) { - return phmEquAlarmRecordMapper.selectPhmEquAlarmRecordList1(phmEquAlarmRecord); - } - - @Override - public List selectPhmEquAlarmRecordList2(PhmEquAlarmRecord phmEquAlarmRecord) { - return phmEquAlarmRecordMapper.selectPhmEquAlarmRecordList2(phmEquAlarmRecord); - } - - @Override - public int batchPhmEquAlarmRecord(List list) { - return phmEquAlarmRecordMapper.batchPhmEquAlarmRecord(list); - } - - @Override - public int batchPhmEquAlarmRecord1(List list) { - return phmEquAlarmRecordMapper.batchPhmEquAlarmRecord1(list); - } - - @Override - public int batchPhmEquAlarmRecord2(List list) { - return phmEquAlarmRecordMapper.batchPhmEquAlarmRecord2(list); - } -} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/impl/PhmEquParaConfigServiceImpl.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/impl/PhmEquParaConfigServiceImpl.java deleted file mode 100644 index c2c05db..0000000 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/impl/PhmEquParaConfigServiceImpl.java +++ /dev/null @@ -1,130 +0,0 @@ -package com.inspur.industrial.service.impl; - -import java.util.List; -import java.util.Map; - -import com.inspur.system.service.influx.InfluxDBService; -import org.influxdb.dto.QueryResult; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.inspur.industrial.mapper.PhmEquParaConfigMapper; -import com.inspur.industrial.domain.PhmEquParaConfig; -import com.inspur.industrial.service.IPhmEquParaConfigService; - -/** - * 参数值配置表Service业务层处理 - * - * @author zhaofie - * @date 2023-08-17 - */ -@Service -public class PhmEquParaConfigServiceImpl implements IPhmEquParaConfigService -{ - @Autowired - private PhmEquParaConfigMapper phmEquParaConfigMapper; - - @Autowired - private InfluxDBService influxDBService; - - /** - * 查询参数值配置表 - * - * @param id 参数值配置表主键 - * @return 参数值配置表 - */ - @Override - public PhmEquParaConfig selectPhmEquParaConfigById(Long id) - { - return phmEquParaConfigMapper.selectPhmEquParaConfigById(id); - } - - /** - * 查询参数值配置表列表 - * - * @param phmEquParaConfig 参数值配置表 - * @return 参数值配置表 - */ - @Override - public List selectPhmEquParaConfigList(PhmEquParaConfig phmEquParaConfig) - { - List phmEquParaConfigs = phmEquParaConfigMapper.selectPhmEquParaConfigList(phmEquParaConfig); - QueryResult query = influxDBService.query("select * from phm_monitor_data_list order by time desc limit 1"); - List> maps = influxDBService.queryResultProcess(query); - if (maps.size() > 0) { - for (Map object : maps) { - for (int i = 0; i < phmEquParaConfigs.size(); i ++) { - PhmEquParaConfig config = phmEquParaConfigs.get(i); - //获取实际值 - Double value = Double.parseDouble((object.get(config.getNameKey()) == null || object.get(config.getNameKey()) == "" ? 0.0 : object.get(config.getNameKey())).toString()); - phmEquParaConfigs.get(i).setRealityValue(value); - //根据比较条件比较实际值和参考值 - Boolean comResult = true; - if (config.getReferenceCon().equals("小于")) { - if (!(value.compareTo(new Double(config.getReference())) < 0)) { - comResult = false; - } - } else if (config.getReferenceCon().equals("大于")) { - if (!(value.compareTo(new Double(config.getReference())) > 0)) { - comResult = false; - } - } else if (config.getReferenceCon().equals("等于")) { - if (!(value.compareTo(new Double(config.getReference())) == 0)) { - comResult = false; - } - } - phmEquParaConfigs.get(i).setComResult(comResult); - } - } - } - return phmEquParaConfigs; - } - - /** - * 新增参数值配置表 - * - * @param phmEquParaConfig 参数值配置表 - * @return 结果 - */ - @Override - public int insertPhmEquParaConfig(PhmEquParaConfig phmEquParaConfig) - { - return phmEquParaConfigMapper.insertPhmEquParaConfig(phmEquParaConfig); - } - - /** - * 修改参数值配置表 - * - * @param phmEquParaConfig 参数值配置表 - * @return 结果 - */ - @Override - public int updatePhmEquParaConfig(PhmEquParaConfig phmEquParaConfig) - { - return phmEquParaConfigMapper.updatePhmEquParaConfig(phmEquParaConfig); - } - - /** - * 批量删除参数值配置表 - * - * @param ids 需要删除的参数值配置表主键 - * @return 结果 - */ - @Override - public int deletePhmEquParaConfigByIds(Long[] ids) - { - return phmEquParaConfigMapper.deletePhmEquParaConfigByIds(ids); - } - - /** - * 删除参数值配置表信息 - * - * @param id 参数值配置表主键 - * @return 结果 - */ - @Override - public int deletePhmEquParaConfigById(Long id) - { - return phmEquParaConfigMapper.deletePhmEquParaConfigById(id); - } - -} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/impl/TestScreenServicempl.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/impl/TestScreenServicempl.java deleted file mode 100644 index 7dc258b..0000000 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/service/impl/TestScreenServicempl.java +++ /dev/null @@ -1,867 +0,0 @@ -package com.inspur.industrial.service.impl; - -import com.inspur.industrial.domain.EquConfig; -import com.inspur.industrial.domain.PhmEquParaConfig; -import com.inspur.industrial.mapper.EquConfigMapper; -import com.inspur.industrial.mapper.PhmEquParaConfigMapper; -import com.inspur.industrial.service.ITestScreenService; -import com.inspur.industrial.utils.Constant; -import com.inspur.industrial.utils.JudgeUtil; -import com.inspur.system.service.influx.InfluxDBService; -import org.influxdb.dto.QueryResult; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Service; - -import javax.xml.crypto.Data; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.*; - -@Service -public class TestScreenServicempl implements ITestScreenService { - - @Autowired - private InfluxDBService influxDBService; - - @Autowired - private EquConfigMapper equConfigMapper; - - @Override - public Map queryScreenData() { - Map screenData = new HashMap<>(); - QueryResult query = influxDBService.query("select * from phm_monitor_data_list order by time desc limit 60"); - List> maps = influxDBService.queryResultProcess(query); - List xData = new ArrayList<>(); - //rX1:X1轴震动传感器,rX2:X2轴震动传感器,rY1:Y1轴震动传感器,rY2:Y2轴震动传感器,z:Z轴震动传感器 - //iPM4:4um颗粒度,iPM6:6um颗粒度,iPM14:14um颗粒度,iPM21:21um颗粒度,rPT1:进油温度,rPT2:回油温度,rRH:相对湿度,rU:粘度 - List rX1 = new ArrayList<>(); - List rX2 = new ArrayList<>(); - List rY1 = new ArrayList<>(); - List rY2 = new ArrayList<>(); - List rZ = new ArrayList<>(); - List iPM4 = new ArrayList<>(); - List iPM6 = new ArrayList<>(); - List iPM14 = new ArrayList<>(); - List iPM21 = new ArrayList<>(); - List rPT1 = new ArrayList<>(); - List rPT2 = new ArrayList<>(); - List rRH = new ArrayList<>(); - List rU = new ArrayList<>(); - Map oil = new HashMap<>(); - for (int i = maps.size() - 1; i > -1; i--) { - Map object = maps.get(i); - rX1.add(object.get("rX1") == null ? 0 : object.get("rX1")); - rX2.add(object.get("rX2") == null ? 0 : object.get("rX2")); - rY1.add(object.get("rY1") == null ? 0 : object.get("rY1")); - rY2.add(object.get("rY2") == null ? 0 : object.get("rY2")); - rZ.add(object.get("rZ") == null ? 0 : object.get("rZ")); - iPM4.add(object.get("iPM4") == null ? 0 : object.get("iPM4")); - iPM6.add(object.get("iPM6") == null ? 0 : object.get("iPM6")); - iPM14.add(object.get("iPM14") == null ? 0 : object.get("iPM14")); - iPM21.add(object.get("iPM21") == null ? 0 : object.get("iPM21")); - rPT1.add(object.get("rPT1") == null ? 0 : object.get("rPT1")); - rPT2.add(object.get("rPT2") == null ? 0 : object.get("rPT2")); - rRH.add(object.get("rRH") == null ? 0 : object.get("rRH")); - rU.add(object.get("rU") == null ? 0 : object.get("rU")); - //处理时间 - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - try { - Date time = new Date(); - if (object.containsKey("insertTime") && null != object.get("insertTime")) { - time = simpleDateFormat.parse((String) object.get("insertTime")); - } - Calendar calendar = Calendar.getInstance(); - calendar.setTime(time); - int m = calendar.get(Calendar.MINUTE); - int s = calendar.get(Calendar.SECOND); - xData.add(m + ":" + s); - } catch (ParseException e) { - e.printStackTrace(); - } - if (i == 0) { - oil.put("rPT1", object.get("rPT1")); - oil.put("rPT2", object.get("rPT2")); - oil.put("rSP1", object.get("rSP1")); - } - } - screenData.put("xData", xData); - screenData.put("rX1", rX1); - screenData.put("rX2", rX2); - screenData.put("rY1", rY1); - screenData.put("rY2", rY2); - screenData.put("rZ", rZ); - screenData.put("iPM4", iPM4); - screenData.put("iPM6", iPM6); - screenData.put("iPM14", iPM14); - screenData.put("iPM21", iPM21); - screenData.put("rPT1", rPT1); - screenData.put("rPT2", rPT2); - screenData.put("rRH", rRH); - screenData.put("rU", rU); - screenData.put("oil", oil); - //查询设备资料 - EquConfig equConfig = equConfigMapper.selectConfig(); - screenData.put("equConfig", equConfig); - return screenData; - } - - @Override - public Map querycydgdata() { - Map screenData = new HashMap<>(); - QueryResult query = influxDBService.query("select * from tzipc_monitor_data1_list order by time desc limit 60"); - List> maps = influxDBService.queryResultProcess(query); - List xData = new ArrayList<>(); - // 主电机电流 - List zdjdl = new ArrayList<>(); - // 泵输出流量 - List bscll = new ArrayList<>(); - // 系统压力 - List xtyl = new ArrayList<>(); - // 液位 - List yw = new ArrayList<>(); - List ywcsz = new ArrayList<>(); - List ywmin = new ArrayList<>(); - List ywmax = new ArrayList<>(); - // 液温 - List ywe = new ArrayList<>(); - // 油液颗粒度 - List yykld4 = new ArrayList<>(); - List yykld6 = new ArrayList<>(); - List yykld14 = new ArrayList<>(); - List yykld21 = new ArrayList<>(); - // 油水检测 - List ysjc = new ArrayList<>(); - // 油品粘度 - List ypnd = new ArrayList<>(); - // 操作侧软辊流量 - List czcrgll = new ArrayList<>(); - // 操作侧热辊流量 - List czcregll = new ArrayList<>(); - // 传动侧软辊流量 - List cdcrgll = new ArrayList<>(); - // 传动侧热辊流量 - List cdcregll = new ArrayList<>(); - // 车速 - List cs = new ArrayList<>(); - // 底缸操作侧油缸位移 - List dgczcygwy = new ArrayList<>(); - // 底缸传动侧油缸位移 - List dgcdcygwy = new ArrayList<>(); - // 底缸操作侧比例伺服阀 - List dgczcblsff = new ArrayList<>(); - // 底缸操作侧比例减压阀 - List dgczcbljyf = new ArrayList<>(); - // 底缸传动侧比例伺服阀 - List dgcdcblsff = new ArrayList<>(); - // 底缸传动侧比例减压阀 - List dgcdcbljyf = new ArrayList<>(); - // TS软辊比例减压阀(TS软辊实际压力) - List tsrgsjyl = new ArrayList<>(); - // TS热辊比例减压阀(TS热辊实际压力) - List tsregsjyl = new ArrayList<>(); - // TS热辊合辊压力 - List tsreghgyl = new ArrayList<>(); - // TS热辊加压压力 - List tsregjyyl = new ArrayList<>(); - // TS软辊辊合辊压力 - List tsrghgyl = new ArrayList<>(); - // TS软辊加压压力 - List tsrgjyyl = new ArrayList<>(); - // DS软辊比例减压阀(DS软辊实际压力) - List dsrgsjyl = new ArrayList<>(); - // DS热辊比例减压阀(DS热辊实际压力) - List dsregsjyl = new ArrayList<>(); - // DS热辊合辊压力 - List dsreghgyl = new ArrayList<>(); - // DS热辊加压压力 - List dsregjyyl = new ArrayList<>(); - // DS软辊辊合辊压力 - List dsrghgyl = new ArrayList<>(); - // DS软辊加压压力 - List dsrgjyyl = new ArrayList<>(); - - for (int i = maps.size() - 1; i > -1; i--) { - Map object = maps.get(i); - zdjdl.add(object.get("zdjdl") == null ? 0 : object.get("zdjdl")); - bscll.add(object.get("bscll") == null ? 0 : object.get("bscll")); - xtyl.add(object.get("xtyl") == null ? 0 : object.get("xtyl")); - yw.add(object.get("yw") == null ? 0 : object.get("yw")); - ywcsz.add(object.get("ywcsz") == null ? 0 : object.get("ywcsz")); - ywmin.add(object.get("ywmin") == null ? 0 : object.get("ywmin")); - ywmax.add(object.get("ywmax") == null ? 0 : object.get("ywmax")); - ywe.add(object.get("ywe") == null ? 0 : object.get("ywe")); - yykld4.add(object.get("yykld4") == null ? 0 : object.get("yykld4")); - yykld6.add(object.get("yykld6") == null ? 0 : object.get("yykld6")); - yykld14.add(object.get("yykld14") == null ? 0 : object.get("yykld14")); - yykld21.add(object.get("yykld21") == null ? 0 : object.get("yykld21")); - ysjc.add(object.get("ysjc") == null ? 0 : object.get("ysjc")); - ypnd.add(object.get("ypnd") == null ? 0 : object.get("ypnd")); - czcrgll.add(object.get("czcrgll") == null ? 0 : object.get("czcrgll")); - czcregll.add(object.get("czcregll") == null ? 0 : object.get("czcregll")); - cdcrgll.add(object.get("cdcrgll") == null ? 0 : object.get("cdcrgll")); - cdcregll.add(object.get("cdcregll") == null ? 0 : object.get("cdcregll")); - cs.add(object.get("cs") == null ? 0 : object.get("cs")); - dgczcygwy.add(object.get("dgczcygwy") == null ? 0 : object.get("dgczcygwy")); - dgcdcygwy.add(object.get("dgcdcygwy") == null ? 0 : object.get("dgcdcygwy")); - dgczcblsff.add(object.get("dgczcblsff") == null ? 0 : object.get("dgczcblsff")); - dgczcbljyf.add(object.get("dgczcbljyf") == null ? 0 : object.get("dgczcbljyf")); - dgcdcblsff.add(object.get("dgcdcblsff") == null ? 0 : object.get("dgcdcblsff")); - dgcdcbljyf.add(object.get("dgcdcbljyf") == null ? 0 : object.get("dgcdcbljyf")); - tsrgsjyl.add(object.get("tsrgsjyl") == null ? 0 : object.get("tsrgsjyl")); - tsregsjyl.add(object.get("tsregsjyl") == null ? 0 : object.get("tsregsjyl")); - tsreghgyl.add(object.get("tsreghgyl") == null ? 0 : object.get("tsreghgyl")); - tsregjyyl.add(object.get("tsregjyyl") == null ? 0 : object.get("tsregjyyl")); - tsrghgyl.add(object.get("tsrghgyl") == null ? 0 : object.get("tsrghgyl")); - tsrgjyyl.add(object.get("tsrgjyyl") == null ? 0 : object.get("tsrgjyyl")); - dsrgsjyl.add(object.get("dsrgsjyl") == null ? 0 : object.get("dsrgsjyl")); - dsregsjyl.add(object.get("dsregsjyl") == null ? 0 : object.get("dsregsjyl")); - dsreghgyl.add(object.get("dsreghgyl") == null ? 0 : object.get("dsreghgyl")); - dsregjyyl.add(object.get("dsregjyyl") == null ? 0 : object.get("dsregjyyl")); - dsrghgyl.add(object.get("dsrghgyl") == null ? 0 : object.get("dsrghgyl")); - dsrgjyyl.add(object.get("dsrgjyyl") == null ? 0 : object.get("dsrgjyyl")); - //处理时间 - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - try { - Date time = new Date(); - if (object.containsKey("insertTime") && null != object.get("insertTime")) { - time = simpleDateFormat.parse((String) object.get("insertTime")); - } - Calendar calendar = Calendar.getInstance(); - calendar.setTime(time); - int m = calendar.get(Calendar.MINUTE); - int s = calendar.get(Calendar.SECOND); - xData.add((m < 10 ? "0" + m : m) + ":" + (s < 10 ? "0" + s : s)); - } catch (ParseException e) { - e.printStackTrace(); - } - - } - screenData.put("xData", xData); - screenData.put("zdjdl", zdjdl); - screenData.put("bscll", bscll); - screenData.put("xtyl", xtyl); - screenData.put("yw", yw); - screenData.put("ywcsz", ywcsz); - screenData.put("ywmin", ywmin); - screenData.put("ywmax", ywmax); - screenData.put("ywe", ywe); - screenData.put("yykld4", yykld4); - screenData.put("yykld6", yykld6); - screenData.put("yykld14", yykld14); - screenData.put("yykld21", yykld21); - screenData.put("ysjc", ysjc); - screenData.put("ypnd", ypnd); - screenData.put("czcrgll", czcrgll); - screenData.put("czcregll", czcregll); - screenData.put("cdcrgll", cdcrgll); - screenData.put("cdcregll", cdcregll); - screenData.put("cs", cs); - screenData.put("dgczcygwy", dgczcygwy); - screenData.put("dgcdcygwy", dgcdcygwy); - screenData.put("dgczcblsff", dgczcblsff); - screenData.put("dgczcbljyf", dgczcbljyf); - screenData.put("dgcdcblsff", dgcdcblsff); - screenData.put("dgcdcbljyf", dgcdcbljyf); - screenData.put("tsrgsjyl", tsrgsjyl); - screenData.put("tsregsjyl", tsregsjyl); - screenData.put("tsreghgyl", tsreghgyl); - screenData.put("tsregjyyl", tsregjyyl); - screenData.put("tsrghgyl", tsrghgyl); - screenData.put("tsrgjyyl", tsrgjyyl); - screenData.put("dsrgsjyl", dsrgsjyl); - screenData.put("dsregsjyl", dsregsjyl); - screenData.put("dsreghgyl", dsreghgyl); - screenData.put("dsregjyyl", dsregjyyl); - screenData.put("dsrghgyl", dsrghgyl); - screenData.put("dsrgjyyl", dsrgjyyl); - //查询设备资料 - EquConfig equConfig = equConfigMapper.selectConfig(); - // 查询实时报警 -// screenData.put("alarmData", JudgeUtil.dealRealTimeData(maps.get(0), "1")); - screenData.put("equConfig", equConfig); - return screenData; - } - - @Override - public Map zgdgTopdata() { - Map screenData = new HashMap<>(); - QueryResult query = influxDBService.query("select * from tzipc_monitor_data2_list order by time desc limit 60"); - List> maps = influxDBService.queryResultProcess(query); - List xData = new ArrayList<>(); - // 主电机电流 - List zdjdl = new ArrayList<>(); - // 主泵输出流量 - List zbscll = new ArrayList<>(); - // 冷却循环电机电流 - List lqxhdjdl = new ArrayList<>(); - // 系统压力 - List xtyl = new ArrayList<>(); - // 液位 - List yw = new ArrayList<>(); - List ywcsz = new ArrayList<>(); - List ywmin = new ArrayList<>(); - List ywmax = new ArrayList<>(); - // 液温 - List ywen = new ArrayList<>(); - // 油液颗粒度 - List yykld4 = new ArrayList<>(); - List yykld6 = new ArrayList<>(); - List yykld14 = new ArrayList<>(); - List yykld21 = new ArrayList<>(); - // 油水检测 - List ysjc = new ArrayList<>(); - // 油品粘度 - List ypnd = new ArrayList<>(); - // 铁磁检测 - List tcjc = new ArrayList<>(); - // 一压区比例减压阀 - List yqbljyf1 = new ArrayList<>(); - // 二压区比例减压阀 - List yqbljyf2 = new ArrayList<>(); - // 三压区比例减压阀 - List yqbljyf3 = new ArrayList<>(); - // 四压区比例减压阀 - List yqbljyf4 = new ArrayList<>(); - // 五压区比例减压阀 - List yqbljyf5 = new ArrayList<>(); - // 六压区比例减压阀 - List yqbljyf6 = new ArrayList<>(); - // 七压区比例减压阀 - List yqbljyf7 = new ArrayList<>(); - // 八压区比例减压阀 - List yqbljyf8 = new ArrayList<>(); - // 九压区比例减压阀 - List yqbljyf9 = new ArrayList<>(); - // 十压区比例减压阀 - List yqbljyf10 = new ArrayList<>(); - // 十一压区比例减压阀 - List yqbljyf11 = new ArrayList<>(); - // 一压区流量 - List yqll1 = new ArrayList<>(); - // 二压区流量 - List yqll2 = new ArrayList<>(); - // 三压区流量 - List yqll3 = new ArrayList<>(); - // 四压区流量 - List yqll4 = new ArrayList<>(); - // 五压区流量 - List yqll5 = new ArrayList<>(); - // 六压区流量 - List yqll6 = new ArrayList<>(); - // 七压区流量 - List yqll7 = new ArrayList<>(); - // 八压区流量 - List yqll8 = new ArrayList<>(); - // 九压区流量 - List yqll9 = new ArrayList<>(); - // 十压区流量 - List yqll10 = new ArrayList<>(); - // 十一压区流量 - List yqll11 = new ArrayList<>(); - - for (int i = maps.size() - 1; i > -1; i--) { - Map object = maps.get(i); - zdjdl.add(object.get("zdjdl") == null ? 0 : object.get("zdjdl")); - zbscll.add(object.get("zbscll") == null ? 0 : object.get("zbscll")); - lqxhdjdl.add(object.get("lqxhdjdl") == null ? 0 : object.get("lqxhdjdl")); - xtyl.add(object.get("xtyl") == null ? 0 : object.get("xtyl")); - yw.add(object.get("yw") == null ? 0 : object.get("yw")); - ywcsz.add(object.get("ywcsz") == null ? 0 : object.get("ywcsz")); - ywmin.add(object.get("ywmin") == null ? 0 : object.get("ywmin")); - ywmax.add(object.get("ywmax") == null ? 0 : object.get("ywmax")); - ywen.add(object.get("ywen") == null ? 0 : object.get("ywen")); - yykld4.add(object.get("yykld4") == null ? 0 : object.get("yykld4")); - yykld6.add(object.get("yykld6") == null ? 0 : object.get("yykld6")); - yykld14.add(object.get("yykld14") == null ? 0 : object.get("yykld14")); - yykld21.add(object.get("yykld21") == null ? 0 : object.get("yykld21")); - ysjc.add(object.get("ysjc") == null ? 0 : object.get("ysjc")); - ypnd.add(object.get("ypnd") == null ? 0 : object.get("ypnd")); - tcjc.add(object.get("tcjc") == null ? 0 : object.get("tcjc")); - yqbljyf1.add(object.get("yqbljyf1") == null ? 0 : object.get("yqbljyf1")); - yqbljyf2.add(object.get("yqbljyf2") == null ? 0 : object.get("yqbljyf2")); - yqbljyf3.add(object.get("yqbljyf3") == null ? 0 : object.get("yqbljyf3")); - yqbljyf4.add(object.get("yqbljyf4") == null ? 0 : object.get("yqbljyf4")); - yqbljyf5.add(object.get("yqbljyf5") == null ? 0 : object.get("yqbljyf5")); - yqbljyf6.add(object.get("yqbljyf6") == null ? 0 : object.get("yqbljyf6")); - yqbljyf7.add(object.get("yqbljyf7") == null ? 0 : object.get("yqbljyf7")); - yqbljyf8.add(object.get("yqbljyf8") == null ? 0 : object.get("yqbljyf8")); - yqbljyf9.add(object.get("yqbljyf9") == null ? 0 : object.get("yqbljyf9")); - yqbljyf10.add(object.get("yqbljyf10") == null ? 0 : object.get("yqbljyf10")); - yqbljyf11.add(object.get("yqbljyf11") == null ? 0 : object.get("yqbljyf11")); - yqll1.add(object.get("yqll1") == null ? 0 : object.get("yqll1")); - yqll2.add(object.get("yqll2") == null ? 0 : object.get("yqll2")); - yqll3.add(object.get("yqll3") == null ? 0 : object.get("yqll3")); - yqll4.add(object.get("yqll4") == null ? 0 : object.get("yqll4")); - yqll5.add(object.get("yqll5") == null ? 0 : object.get("yqll5")); - yqll6.add(object.get("yqll6") == null ? 0 : object.get("yqll6")); - yqll7.add(object.get("yqll7") == null ? 0 : object.get("yqll7")); - yqll8.add(object.get("yqll8") == null ? 0 : object.get("yqll8")); - yqll9.add(object.get("yqll9") == null ? 0 : object.get("yqll9")); - yqll10.add(object.get("yqll10") == null ? 0 : object.get("yqll10")); - yqll11.add(object.get("yqll11") == null ? 0 : object.get("yqll11")); - //处理时间 - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - try { - Date time = new Date(); - if (object.containsKey("insertTime") && null != object.get("insertTime")) { - time = simpleDateFormat.parse((String) object.get("insertTime")); - } - Calendar calendar = Calendar.getInstance(); - calendar.setTime(time); - int m = calendar.get(Calendar.MINUTE); - int s = calendar.get(Calendar.SECOND); - xData.add((m < 10 ? "0" + m : m) + ":" + (s < 10 ? "0" + s : s)); - } catch (ParseException e) { - e.printStackTrace(); - } - - } - screenData.put("xData", xData); - screenData.put("zdjdl", zdjdl); - screenData.put("zbscll", zbscll); - screenData.put("lqxhdjdl", lqxhdjdl); - screenData.put("xtyl", xtyl); - screenData.put("yw", yw); - screenData.put("ywcsz", ywcsz); - screenData.put("ywmin", ywmin); - screenData.put("ywmax", ywmax); - screenData.put("ywen", ywen); - screenData.put("yykld4", yykld4); - screenData.put("yykld6", yykld6); - screenData.put("yykld14", yykld14); - screenData.put("yykld21", yykld21); - screenData.put("ysjc", ysjc); - screenData.put("ypnd", ypnd); - screenData.put("tcjc", tcjc); - screenData.put("yqbljyf1", yqbljyf1); - screenData.put("yqbljyf2", yqbljyf2); - screenData.put("yqbljyf3", yqbljyf3); - screenData.put("yqbljyf4", yqbljyf4); - screenData.put("yqbljyf5", yqbljyf5); - screenData.put("yqbljyf6", yqbljyf6); - screenData.put("yqbljyf7", yqbljyf7); - screenData.put("yqbljyf8", yqbljyf8); - screenData.put("yqbljyf9", yqbljyf9); - screenData.put("yqbljyf10", yqbljyf10); - screenData.put("yqbljyf11", yqbljyf11); - screenData.put("yqll1", yqll1); - screenData.put("yqll2", yqll2); - screenData.put("yqll3", yqll3); - screenData.put("yqll4", yqll4); - screenData.put("yqll5", yqll5); - screenData.put("yqll6", yqll6); - screenData.put("yqll7", yqll7); - screenData.put("yqll8", yqll8); - screenData.put("yqll9", yqll9); - screenData.put("yqll10", yqll10); - screenData.put("yqll11", yqll11); - //查询设备资料 - EquConfig equConfig = equConfigMapper.selectConfig(); - // 查询实时报警 -// screenData.put("alarmData", JudgeUtil.dealRealTimeData(maps.get(0), "2")); - screenData.put("equConfig", equConfig); - return screenData; - } - - @Override - public Map zgdgBottomdata() { - Map screenData = new HashMap<>(); - QueryResult query = influxDBService.query("select * from tzipc_monitor_data3_list order by time desc limit 60"); - List> maps = influxDBService.queryResultProcess(query); - List xData = new ArrayList<>(); - // 主电机电流 - List zdjdl = new ArrayList<>(); - // 主泵输出流量 - List zbscll = new ArrayList<>(); - // 冷却循环电机电流 - List lqxhdjdl = new ArrayList<>(); - // 系统压力 - List xtyl = new ArrayList<>(); - // 液位 - List yw = new ArrayList<>(); - List ywcsz = new ArrayList<>(); - List ywmin = new ArrayList<>(); - List ywmax = new ArrayList<>(); - // 液温 - List ywen = new ArrayList<>(); - // 油液颗粒度 - List yykld4 = new ArrayList<>(); - List yykld6 = new ArrayList<>(); - List yykld14 = new ArrayList<>(); - List yykld21 = new ArrayList<>(); - // 油水检测 - List ysjc = new ArrayList<>(); - // 油品粘度 - List ypnd = new ArrayList<>(); - // 铁磁检测 - List tcjc = new ArrayList<>(); - // 一压区比例减压阀 - List yqbljyf1 = new ArrayList<>(); - // 二压区比例减压阀 - List yqbljyf2 = new ArrayList<>(); - // 三压区比例减压阀 - List yqbljyf3 = new ArrayList<>(); - // 四压区比例减压阀 - List yqbljyf4 = new ArrayList<>(); - // 五压区比例减压阀 - List yqbljyf5 = new ArrayList<>(); - // 六压区比例减压阀 - List yqbljyf6 = new ArrayList<>(); - // 七压区比例减压阀 - List yqbljyf7 = new ArrayList<>(); - // 八压区比例减压阀 - List yqbljyf8 = new ArrayList<>(); - // 九压区比例减压阀 - List yqbljyf9 = new ArrayList<>(); - // 十压区比例减压阀 - List yqbljyf10 = new ArrayList<>(); - // 十一压区比例减压阀 - List yqbljyf11 = new ArrayList<>(); - // 一压区流量 - List yqll1 = new ArrayList<>(); - // 二压区流量 - List yqll2 = new ArrayList<>(); - // 三压区流量 - List yqll3 = new ArrayList<>(); - // 四压区流量 - List yqll4 = new ArrayList<>(); - // 五压区流量 - List yqll5 = new ArrayList<>(); - // 六压区流量 - List yqll6 = new ArrayList<>(); - // 七压区流量 - List yqll7 = new ArrayList<>(); - // 八压区流量 - List yqll8 = new ArrayList<>(); - // 九压区流量 - List yqll9 = new ArrayList<>(); - // 十压区流量 - List yqll10 = new ArrayList<>(); - // 十一压区流量 - List yqll11 = new ArrayList<>(); - - for (int i = maps.size() - 1; i > -1; i--) { - Map object = maps.get(i); - zdjdl.add(object.get("zdjdl") == null ? 0 : object.get("zdjdl")); - zbscll.add(object.get("zbscll") == null ? 0 : object.get("zbscll")); - lqxhdjdl.add(object.get("lqxhdjdl") == null ? 0 : object.get("lqxhdjdl")); - xtyl.add(object.get("xtyl") == null ? 0 : object.get("xtyl")); - yw.add(object.get("yw") == null ? 0 : object.get("yw")); - ywcsz.add(object.get("ywcsz") == null ? 0 : object.get("ywcsz")); - ywmin.add(object.get("ywmin") == null ? 0 : object.get("ywmin")); - ywmax.add(object.get("ywmax") == null ? 0 : object.get("ywmax")); - ywen.add(object.get("ywen") == null ? 0 : object.get("ywen")); - yykld4.add(object.get("yykld4") == null ? 0 : object.get("yykld4")); - yykld6.add(object.get("yykld6") == null ? 0 : object.get("yykld6")); - yykld14.add(object.get("yykld14") == null ? 0 : object.get("yykld14")); - yykld21.add(object.get("yykld21") == null ? 0 : object.get("yykld21")); - ysjc.add(object.get("ysjc") == null ? 0 : object.get("ysjc")); - ypnd.add(object.get("ypnd") == null ? 0 : object.get("ypnd")); - tcjc.add(object.get("tcjc") == null ? 0 : object.get("tcjc")); - yqbljyf1.add(object.get("yqbljyf1") == null ? 0 : object.get("yqbljyf1")); - yqbljyf2.add(object.get("yqbljyf2") == null ? 0 : object.get("yqbljyf2")); - yqbljyf3.add(object.get("yqbljyf3") == null ? 0 : object.get("yqbljyf3")); - yqbljyf4.add(object.get("yqbljyf4") == null ? 0 : object.get("yqbljyf4")); - yqbljyf5.add(object.get("yqbljyf5") == null ? 0 : object.get("yqbljyf5")); - yqbljyf6.add(object.get("yqbljyf6") == null ? 0 : object.get("yqbljyf6")); - yqbljyf7.add(object.get("yqbljyf7") == null ? 0 : object.get("yqbljyf7")); - yqbljyf8.add(object.get("yqbljyf8") == null ? 0 : object.get("yqbljyf8")); - yqbljyf9.add(object.get("yqbljyf9") == null ? 0 : object.get("yqbljyf9")); - yqbljyf10.add(object.get("yqbljyf10") == null ? 0 : object.get("yqbljyf10")); - yqbljyf11.add(object.get("yqbljyf11") == null ? 0 : object.get("yqbljyf11")); - yqll1.add(object.get("yqll1") == null ? 0 : object.get("yqll1")); - yqll2.add(object.get("yqll2") == null ? 0 : object.get("yqll2")); - yqll3.add(object.get("yqll3") == null ? 0 : object.get("yqll3")); - yqll4.add(object.get("yqll4") == null ? 0 : object.get("yqll4")); - yqll5.add(object.get("yqll5") == null ? 0 : object.get("yqll5")); - yqll6.add(object.get("yqll6") == null ? 0 : object.get("yqll6")); - yqll7.add(object.get("yqll7") == null ? 0 : object.get("yqll7")); - yqll8.add(object.get("yqll8") == null ? 0 : object.get("yqll8")); - yqll9.add(object.get("yqll9") == null ? 0 : object.get("yqll9")); - yqll10.add(object.get("yqll10") == null ? 0 : object.get("yqll10")); - yqll11.add(object.get("yqll11") == null ? 0 : object.get("yqll11")); - //处理时间 - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - try { - Date time = new Date(); - if (object.containsKey("insertTime") && null != object.get("insertTime")) { - time = simpleDateFormat.parse((String) object.get("insertTime")); - } - Calendar calendar = Calendar.getInstance(); - calendar.setTime(time); - int m = calendar.get(Calendar.MINUTE); - int s = calendar.get(Calendar.SECOND); - xData.add((m < 10 ? "0" + m : m) + ":" + (s < 10 ? "0" + s : s)); - } catch (ParseException e) { - e.printStackTrace(); - } - - } - screenData.put("xData", xData); - screenData.put("zdjdl", zdjdl); - screenData.put("zbscll", zbscll); - screenData.put("lqxhdjdl", lqxhdjdl); - screenData.put("xtyl", xtyl); - screenData.put("yw", yw); - screenData.put("ywcsz", ywcsz); - screenData.put("ywmin", ywmin); - screenData.put("ywmax", ywmax); - screenData.put("ywen", ywen); - screenData.put("yykld4", yykld4); - screenData.put("yykld6", yykld6); - screenData.put("yykld14", yykld14); - screenData.put("yykld21", yykld21); - screenData.put("ysjc", ysjc); - screenData.put("ypnd", ypnd); - screenData.put("tcjc", tcjc); - screenData.put("yqbljyf1", yqbljyf1); - screenData.put("yqbljyf2", yqbljyf2); - screenData.put("yqbljyf3", yqbljyf3); - screenData.put("yqbljyf4", yqbljyf4); - screenData.put("yqbljyf5", yqbljyf5); - screenData.put("yqbljyf6", yqbljyf6); - screenData.put("yqbljyf7", yqbljyf7); - screenData.put("yqbljyf8", yqbljyf8); - screenData.put("yqbljyf9", yqbljyf9); - screenData.put("yqbljyf10", yqbljyf10); - screenData.put("yqbljyf11", yqbljyf11); - screenData.put("yqll1", yqll1); - screenData.put("yqll2", yqll2); - screenData.put("yqll3", yqll3); - screenData.put("yqll4", yqll4); - screenData.put("yqll5", yqll5); - screenData.put("yqll6", yqll6); - screenData.put("yqll7", yqll7); - screenData.put("yqll8", yqll8); - screenData.put("yqll9", yqll9); - screenData.put("yqll10", yqll10); - screenData.put("yqll11", yqll11); - //查询设备资料 - EquConfig equConfig = equConfigMapper.selectConfig(); - // 查询实时报警 -// screenData.put("alarmData", JudgeUtil.dealRealTimeData(maps.get(0), "3")); - screenData.put("equConfig", equConfig); - return screenData; - } - - @Override - public Map queryzgdkdata() { - Map screenData = new HashMap<>(); - QueryResult query = influxDBService.query("select * from tzipc_monitor_data2_list order by time desc limit 60"); - List> maps = influxDBService.queryResultProcess(query); - List xData = new ArrayList<>(); - // 主电机电流 - List zdjdl = new ArrayList<>(); - // 主泵输出流量 - List zbscll = new ArrayList<>(); - // 冷却循环电机电流 - List lqxhdjdl = new ArrayList<>(); - // 系统压力 - List xtyl = new ArrayList<>(); - // 液位 - List yw = new ArrayList<>(); - List ywcsz = new ArrayList<>(); - List ywmin = new ArrayList<>(); - List ywmax = new ArrayList<>(); - // 液温 - List ywen = new ArrayList<>(); - // 油液颗粒度 - List yykld4 = new ArrayList<>(); - List yykld6 = new ArrayList<>(); - List yykld14 = new ArrayList<>(); - List yykld21 = new ArrayList<>(); - // 油水检测 - List ysjc = new ArrayList<>(); - // 油品粘度 - List ypnd = new ArrayList<>(); - // 铁磁检测 - List tcjc = new ArrayList<>(); - // 一压区比例减压阀 - List yqbljyf1 = new ArrayList<>(); - // 二压区比例减压阀 - List yqbljyf2 = new ArrayList<>(); - // 三压区比例减压阀 - List yqbljyf3 = new ArrayList<>(); - // 四压区比例减压阀 - List yqbljyf4 = new ArrayList<>(); - // 五压区比例减乐阀 - List yqbljyf5 = new ArrayList<>(); - // 六压区比例减压阀 - List yqbljyf6 = new ArrayList<>(); - // 七压区比例减压阀 - List yqbljyf7 = new ArrayList<>(); - // 八压区比例减压阀 - List yqbljyf8 = new ArrayList<>(); - // 九压区比例减压阀 - List yqbljyf9 = new ArrayList<>(); - // 十压区比例减乐阀 - List yqbljyf10 = new ArrayList<>(); - // 十一压区比例减压阀 - List yqbljyf11 = new ArrayList<>(); - // 一压区流量 - List yqll1 = new ArrayList<>(); - // 二压区流量 - List yqll2 = new ArrayList<>(); - // 三压区流量 - List yqll3 = new ArrayList<>(); - // 四压区流量 - List yqll4 = new ArrayList<>(); - // 五压区流量 - List yqll5 = new ArrayList<>(); - // 六压区流量 - List yqll6 = new ArrayList<>(); - // 七压区流量 - List yqll7 = new ArrayList<>(); - // 八压区流量 - List yqll8 = new ArrayList<>(); - // 九压区流量 - List yqll9 = new ArrayList<>(); - // 十压区流量 - List yqll10 = new ArrayList<>(); - // 十一压区流量 - List yqll11 = new ArrayList<>(); - - for (int i = maps.size() - 1; i > -1; i--) { - Map object = maps.get(i); - zdjdl.add(object.get("zdjdl") == null ? 0 : object.get("zdjdl")); - zbscll.add(object.get("zbscll") == null ? 0 : object.get("zbscll")); - lqxhdjdl.add(object.get("lqxhdjdl") == null ? 0 : object.get("lqxhdjdl")); - xtyl.add(object.get("xtyl") == null ? 0 : object.get("xtyl")); - yw.add(object.get("yw") == null ? 0 : object.get("yw")); - ywcsz.add(object.get("ywcsz") == null ? 0 : object.get("ywcsz")); - ywmin.add(object.get("ywmin") == null ? 0 : object.get("ywmin")); - ywmax.add(object.get("ywmax") == null ? 0 : object.get("ywmax")); - ywen.add(object.get("ywen") == null ? 0 : object.get("ywen")); - yykld4.add(object.get("yykld4") == null ? 0 : object.get("yykld4")); - yykld6.add(object.get("yykld6") == null ? 0 : object.get("yykld6")); - yykld14.add(object.get("yykld14") == null ? 0 : object.get("yykld14")); - yykld21.add(object.get("yykld21") == null ? 0 : object.get("yykld21")); - ysjc.add(object.get("ysjc") == null ? 0 : object.get("ysjc")); - ypnd.add(object.get("ypnd") == null ? 0 : object.get("ypnd")); - tcjc.add(object.get("tcjc") == null ? 0 : object.get("tcjc")); - yqbljyf1.add(object.get("yqbljyf1") == null ? 0 : object.get("yqbljyf1")); - yqbljyf2.add(object.get("yqbljyf2") == null ? 0 : object.get("yqbljyf2")); - yqbljyf3.add(object.get("yqbljyf3") == null ? 0 : object.get("yqbljyf3")); - yqbljyf4.add(object.get("yqbljyf4") == null ? 0 : object.get("yqbljyf4")); - yqbljyf5.add(object.get("yqbljyf5") == null ? 0 : object.get("yqbljyf5")); - yqbljyf6.add(object.get("yqbljyf6") == null ? 0 : object.get("yqbljyf6")); - yqbljyf7.add(object.get("yqbljyf7") == null ? 0 : object.get("yqbljyf7")); - yqbljyf8.add(object.get("yqbljyf8") == null ? 0 : object.get("yqbljyf8")); - yqbljyf9.add(object.get("yqbljyf9") == null ? 0 : object.get("yqbljyf9")); - yqbljyf10.add(object.get("yqbljyf10") == null ? 0 : object.get("yqbljyf10")); - yqbljyf11.add(object.get("yqbljyf11") == null ? 0 : object.get("yqbljyf11")); - yqll1.add(object.get("yqll1") == null ? 0 : object.get("yqll1")); - yqll2.add(object.get("yqll2") == null ? 0 : object.get("yqll2")); - yqll3.add(object.get("yqll3") == null ? 0 : object.get("yqll3")); - yqll4.add(object.get("yqll4") == null ? 0 : object.get("yqll4")); - yqll5.add(object.get("yqll5") == null ? 0 : object.get("yqll5")); - yqll6.add(object.get("yqll6") == null ? 0 : object.get("yqll6")); - yqll7.add(object.get("yqll7") == null ? 0 : object.get("yqll7")); - yqll8.add(object.get("yqll8") == null ? 0 : object.get("yqll8")); - yqll9.add(object.get("yqll9") == null ? 0 : object.get("yqll9")); - yqll10.add(object.get("yqll10") == null ? 0 : object.get("yqll10")); - yqll11.add(object.get("yqll11") == null ? 0 : object.get("yqll11")); - //处理时间 - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - try { - Date time = new Date(); - if (object.containsKey("insertTime") && null != object.get("insertTime")) { - time = simpleDateFormat.parse((String) object.get("insertTime")); - } - Calendar calendar = Calendar.getInstance(); - calendar.setTime(time); - int m = calendar.get(Calendar.MINUTE); - int s = calendar.get(Calendar.SECOND); - xData.add(m + ":" + s); - } catch (ParseException e) { - e.printStackTrace(); - } - - } - screenData.put("xData", xData); - screenData.put("zdjdl", zdjdl); - screenData.put("zbscll", zbscll); - screenData.put("lqxhdjdl", lqxhdjdl); - screenData.put("xtyl", xtyl); - screenData.put("yw", yw); - screenData.put("ywcsz", ywcsz); - screenData.put("ywmin", ywmin); - screenData.put("ywmax", ywmax); - screenData.put("ywen", ywen); - screenData.put("yykld4", yykld4); - screenData.put("yykld6", yykld6); - screenData.put("yykld14", yykld14); - screenData.put("yykld21", yykld21); - screenData.put("ysjc", ysjc); - screenData.put("ypnd", ypnd); - screenData.put("tcjc", tcjc); - screenData.put("yqbljyf1", yqbljyf1); - screenData.put("yqbljyf2", yqbljyf2); - screenData.put("yqbljyf3", yqbljyf3); - screenData.put("yqbljyf4", yqbljyf4); - screenData.put("yqbljyf5", yqbljyf5); - screenData.put("yqbljyf6", yqbljyf6); - screenData.put("yqbljyf7", yqbljyf7); - screenData.put("yqbljyf8", yqbljyf8); - screenData.put("yqbljyf9", yqbljyf9); - screenData.put("yqbljyf10", yqbljyf10); - screenData.put("yqbljyf11", yqbljyf11); - screenData.put("yqll1", yqll1); - screenData.put("yqll2", yqll2); - screenData.put("yqll3", yqll3); - screenData.put("yqll4", yqll4); - screenData.put("yqll5", yqll5); - screenData.put("yqll6", yqll6); - screenData.put("yqll7", yqll7); - screenData.put("yqll8", yqll8); - screenData.put("yqll9", yqll9); - screenData.put("yqll10", yqll10); - screenData.put("yqll11", yqll11); - //查询设备资料 - EquConfig equConfig = equConfigMapper.selectConfig(); - screenData.put("equConfig", equConfig); - return screenData; - } - - @Override - public List querycydgdataRealTime() { - List returnList = new ArrayList<>(); - QueryResult query = influxDBService.query("select * from tzipc_monitor_data1_list order by time desc limit 1"); - Map map = influxDBService.queryResultProcess(query).get(0); - return JudgeUtil.dealRealTimeData(map, "1"); - } - - @Override - public List zgdgTopdataRealTime() { - List returnList = new ArrayList<>(); - QueryResult query = influxDBService.query("select * from tzipc_monitor_data2_list order by time desc limit 1"); - Map map = influxDBService.queryResultProcess(query).get(0); - return JudgeUtil.dealRealTimeData(map, "2"); - } - - @Override - public List zgdgBottomdataRealTime() { - List returnList = new ArrayList<>(); - QueryResult query = influxDBService.query("select * from tzipc_monitor_data3_list order by time desc limit 1"); - Map map = influxDBService.queryResultProcess(query).get(0); - return JudgeUtil.dealRealTimeData(map, "3"); - } - - - public static void main(String[] args) { - String s = "2015-07-17T20:32:58.662703915Z"; - System.out.println(s); - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - try { - Date time = simpleDateFormat.parse(s); - Calendar calendar = Calendar.getInstance(); - calendar.setTime(time); - int m = calendar.get(Calendar.MINUTE); - int ss = calendar.get(Calendar.SECOND); - System.out.println(m + ":" + ss); - } catch (ParseException e) { - e.printStackTrace(); - } - } -} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/utils/Constant.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/utils/Constant.java deleted file mode 100644 index 6bcd2e3..0000000 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/utils/Constant.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.inspur.industrial.utils; - -public class Constant { - - /** - * 大于 - */ - public static final String GREATER = "大于"; - - /** - * 小于 - */ - public static final String LESS = "小于"; - - /** - * 大于等于 - */ - public static final String GREATER_EQUAL = "大于等于"; - - /** - * 小于等于 - */ - public static final String LESS_EQUAL = "小于等于"; - - /** - * 等于 - */ - public static final String EQUAL = "等于"; - - /** - * 区间内 - */ - public static final String WIDTHIN_INTERVAL = "区间内"; - - /** - * 区间外 - */ - public static final String OUTSIDE_INTERVAL = "区间外"; -} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/utils/JudgeUtil.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/utils/JudgeUtil.java deleted file mode 100644 index 0cdd20e..0000000 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/industrial/utils/JudgeUtil.java +++ /dev/null @@ -1,164 +0,0 @@ -package com.inspur.industrial.utils; - - -import com.inspur.industrial.domain.PhmEquParaConfig; -import com.inspur.industrial.mapper.PhmEquParaConfigMapper; -import com.inspur.industrial.service.IPhmEquAlarmRecordService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Component; - -import javax.annotation.PostConstruct; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; - -@Component -public class JudgeUtil { - - @Autowired - private IPhmEquAlarmRecordService phmEquAlarmRecordService; - - @Autowired - private PhmEquParaConfigMapper phmEquParaConfigMapper; - - private static List PhmEquParaConfigList; - private static List PhmEquParaConfigList1; - private static List PhmEquParaConfigList2; - - private static JudgeUtil judgeUtil; - - @PostConstruct - public void init() { - judgeUtil = this; - judgeUtil.phmEquAlarmRecordService = this.phmEquAlarmRecordService; - } - - /** - * 定时获取报警规则 - * 每30分钟执行执行 - */ -// @Scheduled(cron = "0 */30 * * * ?") 无法启动时执行 - @Scheduled(fixedRate = 1800000) // 每隔半个小时执行一次 - public void task() { - System.out.println("查询最新规则配置"); - PhmEquParaConfigList = phmEquParaConfigMapper.selectPhmEquParaConfigList(new PhmEquParaConfig()); - PhmEquParaConfigList1 = phmEquParaConfigMapper.selectPhmEquParaConfigList1(new PhmEquParaConfig()); - PhmEquParaConfigList2 = phmEquParaConfigMapper.selectPhmEquParaConfigList2(new PhmEquParaConfig()); - } - - /** - * 根据报警规则判断是否正常 - * - * @param realValue 实际值 - * @param referenceValue 参考值 - * @param referenceCon 比较标准 - * @return - */ - public static Boolean judgeAlarm(double realValue, String referenceValue, String referenceCon) { - Boolean flag = true; - if (Constant.GREATER.equals(referenceCon)) { - flag = realValue > Double.parseDouble(referenceValue); - } else if (Constant.GREATER_EQUAL.equals(referenceCon)) { - flag = realValue >= Double.parseDouble(referenceValue); - } else if (Constant.LESS.equals(referenceCon)) { - flag = realValue < Double.parseDouble(referenceValue); - } else if (Constant.LESS_EQUAL.equals(referenceCon)) { - flag = realValue <= Double.parseDouble(referenceValue); - } else if (Constant.EQUAL.equals(referenceCon)) { - flag = realValue == Double.parseDouble(referenceValue); - } else if (Constant.WIDTHIN_INTERVAL.equals(referenceCon)) { - String[] arr = referenceValue.split(","); - flag = realValue >= Double.parseDouble(arr[0]) && realValue <= Double.parseDouble(arr[1]); - } else if (Constant.OUTSIDE_INTERVAL.equals(referenceCon)) { - String[] arr = referenceValue.split(","); - flag = realValue < Double.parseDouble(arr[0]) || realValue > Double.parseDouble(arr[1]); - } else { - flag = true; - } - - return flag; - } - - /** - * 批量处理实时数据 - */ - public static List dealRealTimeData(Map map, String type) { - List list = new ArrayList<>(); - switch (type) { - case "1": - list = PhmEquParaConfigList; - break; - case "2": - list = PhmEquParaConfigList1; - break; - case "3": - list = PhmEquParaConfigList2; - break; - default: - break; - } - List returnList = new ArrayList<>(); - for (PhmEquParaConfig phmEquParaConfig : list) { - PhmEquParaConfig newPhmEquParaConfig = phmEquParaConfig.clone(); - if (map.get(newPhmEquParaConfig.getNameKey()) == null) { - newPhmEquParaConfig.setRealityValue(0.0); - newPhmEquParaConfig.setComResult(false); - } else { - double realityValue = Double.parseDouble(map.get(newPhmEquParaConfig.getNameKey()).toString()); - newPhmEquParaConfig.setRealityValue(realityValue); - newPhmEquParaConfig.setComResult(judgeAlarm(realityValue, newPhmEquParaConfig.getReference(), newPhmEquParaConfig.getReferenceCon())); - } - returnList.add(newPhmEquParaConfig); - } - return returnList; - } - - /** - * 判断并记录报警数据 - */ - public static void judgeAndSaveAlarmData(Map map, String type) { -// List recordList = new ArrayList<>(); -// List list = new ArrayList<>(); -// switch (type) { -// case "1": -// list = PhmEquParaConfigList; -// break; -// case "2": -// list = PhmEquParaConfigList1; -// break; -// case "3": -// list = PhmEquParaConfigList2; -// break; -// default: -// break; -// } -// for (PhmEquParaConfig phmEquParaConfig : list) { -// PhmEquAlarmRecord phmEquAlarmRecord = null; -// if (map.get(phmEquParaConfig.getNameKey()) == null) { -// phmEquAlarmRecord = new PhmEquAlarmRecord(phmEquParaConfig.getId(),"0",new Date()); -// } else if (!judgeAlarm(Double.parseDouble(map.get(phmEquParaConfig.getNameKey()).toString()), phmEquParaConfig.getReference(), phmEquParaConfig.getReferenceCon())) { -// phmEquAlarmRecord = new PhmEquAlarmRecord(phmEquParaConfig.getId(),map.get(phmEquParaConfig.getNameKey()).toString(),new Date()); -// } -// if (phmEquAlarmRecord!=null){ -// recordList.add(phmEquAlarmRecord); -// } -// } -// if(!recordList.isEmpty()) { -// switch (type) { -// case "1": -// judgeUtil.phmEquAlarmRecordService.batchPhmEquAlarmRecord(recordList); -// break; -// case "2": -// judgeUtil.phmEquAlarmRecordService.batchPhmEquAlarmRecord1(recordList); -// break; -// case "3": -// judgeUtil.phmEquAlarmRecordService.batchPhmEquAlarmRecord2(recordList); -// break; -// default: -// break; -// } -// } - } -} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/utils/IpcUtil.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/utils/IpcUtil.java index b1f6af7..ae6badf 100644 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/utils/IpcUtil.java +++ b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/utils/IpcUtil.java @@ -1,16 +1,8 @@ package com.inspur.ipc.utils; -import com.inspur.common.constant.CacheConstants; import com.inspur.common.utils.uuid.IdUtils; -import com.inspur.industrial.domain.PhmEquParaConfig; -import com.inspur.industrial.utils.Constant; import com.inspur.ipc.domain.IpcAlarmRecord; import com.inspur.ipc.domain.IpcAlarmRulesConfig; -import com.inspur.ipc.domain.IpcMonitorField; -import com.inspur.ipc.service.IIpcAlarmRecordService; -import com.inspur.ipc.service.IIpcAlarmRulesConfigService; -import com.inspur.ipc.service.IIpcMonitorFieldService; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import javax.annotation.PostConstruct; @@ -48,19 +40,19 @@ public class IpcUtil { flag = true; return flag; } - if (Constant.GREATER.equals(referenceCon)) { + if (IpcConstant.GREATER.equals(referenceCon)) { flag = realValue.compareTo(referenceValue1) > 0; - } else if (Constant.GREATER_EQUAL.equals(referenceCon)) { + } else if (IpcConstant.GREATER_EQUAL.equals(referenceCon)) { flag = realValue.compareTo(referenceValue1) >= 0; - } else if (Constant.LESS.equals(referenceCon)) { + } else if (IpcConstant.LESS.equals(referenceCon)) { flag = realValue.compareTo(referenceValue1) < 0; - } else if (Constant.LESS_EQUAL.equals(referenceCon)) { + } else if (IpcConstant.LESS_EQUAL.equals(referenceCon)) { flag = realValue.compareTo(referenceValue1) <= 0; - } else if (Constant.EQUAL.equals(referenceCon)) { + } else if (IpcConstant.EQUAL.equals(referenceCon)) { flag = realValue.compareTo(referenceValue1) == 0; - } else if (Constant.WIDTHIN_INTERVAL.equals(referenceCon)) { + } else if (IpcConstant.WIDTHIN_INTERVAL.equals(referenceCon)) { flag = realValue.compareTo(referenceValue1) >= 0 && realValue.compareTo(referenceValue2) <= 0; - } else if (Constant.OUTSIDE_INTERVAL.equals(referenceCon)) { + } else if (IpcConstant.OUTSIDE_INTERVAL.equals(referenceCon)) { flag = realValue.compareTo(referenceValue1) <= 0 || realValue.compareTo(referenceValue2) >= 0; } else { flag = true; diff --git a/tzipc-server/tzipc-system/src/main/resources/mapper/industrial/EquConfigMapper.xml b/tzipc-server/tzipc-system/src/main/resources/mapper/industrial/EquConfigMapper.xml deleted file mode 100644 index e83cfdd..0000000 --- a/tzipc-server/tzipc-system/src/main/resources/mapper/industrial/EquConfigMapper.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - select equ_id, equ_name, equ_mode, equ_status, equ_place, equ_date - from phm_equ_config - - - - \ No newline at end of file diff --git a/tzipc-server/tzipc-system/src/main/resources/mapper/industrial/MalCofigMapper.xml b/tzipc-server/tzipc-system/src/main/resources/mapper/industrial/MalCofigMapper.xml deleted file mode 100644 index b056399..0000000 --- a/tzipc-server/tzipc-system/src/main/resources/mapper/industrial/MalCofigMapper.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - select id, parent_id, name,is_use - from ipc_mal_config - - - - - \ No newline at end of file diff --git a/tzipc-server/tzipc-system/src/main/resources/mapper/industrial/PhmEquAlarmRecordMapper.xml b/tzipc-server/tzipc-system/src/main/resources/mapper/industrial/PhmEquAlarmRecordMapper.xml deleted file mode 100644 index f016df8..0000000 --- a/tzipc-server/tzipc-system/src/main/resources/mapper/industrial/PhmEquAlarmRecordMapper.xml +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - insert into phm_equ_alarm_record( business_id, alarm_data,alarm_time) values - - ( #{item.businessId}, #{item.alarmData},#{item.alarmTime}) - - - - insert into phm_equ_alarm_record1( business_id, alarm_data,alarm_time) values - - ( #{item.businessId}, #{item.alarmData},#{item.alarmTime}) - - - - insert into phm_equ_alarm_record2( business_id, alarm_data,alarm_time) values - - ( #{item.businessId}, #{item.alarmData},#{item.alarmTime}) - - - diff --git a/tzipc-server/tzipc-system/src/main/resources/mapper/industrial/PhmEquParaConfigMapper.xml b/tzipc-server/tzipc-system/src/main/resources/mapper/industrial/PhmEquParaConfigMapper.xml deleted file mode 100644 index 974d7e9..0000000 --- a/tzipc-server/tzipc-system/src/main/resources/mapper/industrial/PhmEquParaConfigMapper.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - select id, name_key, name, unit, reference, reference_name, reference_con,alarm_detail,alarm_id,type from phm_equ_para_config - - - - - - - - - - - - insert into phm_equ_para_config - - id, - name_key, - name, - unit, - reference, - reference_name, - reference_con, - - - #{id}, - #{nameKey}, - #{name}, - #{unit}, - #{reference}, - #{referenceName}, - #{referenceCon}, - - - - - update phm_equ_para_config - - name_key = #{nameKey}, - name = #{name}, - unit = #{unit}, - reference = #{reference}, - reference_name = #{referenceName}, - reference_con = #{referenceCon}, - - where id = #{id} - - - - delete from phm_equ_para_config where id = #{id} - - - - delete from phm_equ_para_config where id in - - #{id} - - - diff --git a/tzipc-ui/src/api/industrial/dataLog.js b/tzipc-ui/src/api/industrial/dataLog.js deleted file mode 100644 index 362b34a..0000000 --- a/tzipc-ui/src/api/industrial/dataLog.js +++ /dev/null @@ -1,10 +0,0 @@ -import request from "@/utils/request"; - -// 查询推送数据列表 -export function dataList(query) { - return request({ - url: "/dataLog/list", - method: "get", - params: query, - }); -} diff --git a/tzipc-ui/src/api/industrial/malConfig.js b/tzipc-ui/src/api/industrial/malConfig.js deleted file mode 100644 index 3a22938..0000000 --- a/tzipc-ui/src/api/industrial/malConfig.js +++ /dev/null @@ -1,10 +0,0 @@ -import request from "@/utils/request"; - -// 查询故障树列表 -export function queryTree(query) { - return request({ - url: "/mal/tree", - method: "get", - params: query, - }); -} diff --git a/tzipc-ui/src/api/industrial/paraConfig.js b/tzipc-ui/src/api/industrial/paraConfig.js deleted file mode 100644 index 81ad0fe..0000000 --- a/tzipc-ui/src/api/industrial/paraConfig.js +++ /dev/null @@ -1,77 +0,0 @@ -import request from "@/utils/request"; - -// 查询参数值配置表列表 -export function listParaConfig(query) { - return request({ - url: "/paraConfig/list", - method: "get", - params: query, - }); -} - -// 查询参数值配置表列表 -export function listParaConfigAll(query) { - return request({ - url: "/paraConfig/listAll", - method: "get", - params: query, - }); -} - -// 查询参数值配置表详细 -export function getParaConfig(id) { - return request({ - url: "/paraConfig/" + id, - method: "get", - }); -} - -// 新增参数值配置表 -export function addParaConfig(data) { - return request({ - url: "/paraConfig", - method: "post", - data: data, - }); -} - -// 修改参数值配置表 -export function updateParaConfig(data) { - return request({ - url: "/paraConfig", - method: "put", - data: data, - }); -} - -// 删除参数值配置表 -export function delParaConfig(id) { - return request({ - url: "/paraConfig/" + id, - method: "delete", - }); -} - -// 超压底缸 -export function cydgdataRealTime() { - return request({ - url: "/test/screen/cydgdataRealTime", - method: "get", - }); -} - -// 中高顶辊 -export function zgdgTopdataRealTime() { - return request({ - url: "/test/screen/zgdgTopdataRealTime", - method: "get", - }); -} - -// 中高底辊 -export function zgdgBottodataRealTime() { - return request({ - url: "/test/screen/zgdgBottodataRealTime", - method: "get", - }); -} diff --git a/tzipc-ui/src/api/testScreen/testScreen.js b/tzipc-ui/src/api/testScreen/testScreen.js deleted file mode 100644 index 9770ae5..0000000 --- a/tzipc-ui/src/api/testScreen/testScreen.js +++ /dev/null @@ -1,69 +0,0 @@ -import request from "@/utils/request"; - -// 查询测试界面数据 -//rX1:X1轴震动传感器,rX2:X2轴震动传感器,rY1:Y1轴震动传感器,rY2:Y2轴震动传感器,z:Z轴震动传感器 -//iPM4:4um颗粒度,iPM6:6um颗粒度,iPM14:14um颗粒度,iPM21:21um颗粒度,rPT1:进油温度,rPT2:回油温度,rRH:相对湿度,rU:粘度 -//oil:rPT1:进油温度,rPT2:回油温度,rSP1:进油压力 -//equConfig:equMode型号,equName名称,equStatus状态,equPlace安装位置,equDate维修记录 -export function listData() { - return request({ - url: "/test/screen/data", - method: "get", - }); -} - -// 超压底缸 -export function cydgdata() { - return request({ - url: "/test/screen/cydgdata", - method: "get", - }); -} - -// 中高顶辊 -export function zgdgTopdata() { - return request({ - url: "/test/screen/zgdgTopdata", - method: "get", - }); -} - -// 中高底辊 -export function zgdgBottomdata() { - return request({ - url: "/test/screen/zgdgBottomdata", - method: "get", - }); -} - -export function zgdkdata() { - return request({ - url: "/test/screen/zgdkdata", - method: "get", - }); -} - -// 历史报警数据 -// 超压底缸 -export function cydgdataHistory() { - return request({ - url: "/test/screen/cydgdataHistory", - method: "get", - }); -} - -// 中高顶辊 -export function zgdgTopdataHistory() { - return request({ - url: "/test/screen/zgdgTopdataHistory", - method: "get", - }); -} - -// 中高底辊 -export function zgdgBottomdataHistory() { - return request({ - url: "/test/screen/zgdgBottomdataHistory", - method: "get", - }); -} diff --git a/tzipc-ui/src/api/warn/alarm.js b/tzipc-ui/src/api/warn/alarm.js deleted file mode 100644 index a874a87..0000000 --- a/tzipc-ui/src/api/warn/alarm.js +++ /dev/null @@ -1,77 +0,0 @@ -import request from '@/utils/request' - -// 查询报警管理列表 -export function listAlarm(query) { - return request({ - url: '/measure/alarm/list', - method: 'get', - params: query - }) -} - -// 查询报警管理详细 -export function getAlarm(id) { - return request({ - url: '/measure/alarm/' + id, - method: 'get' - }) -} - -// 新增报警管理 -export function addAlarm(data) { - return request({ - url: '/measure/alarm', - method: 'post', - data: data - }) -} - -// 修改报警管理 -export function updateAlarm(data) { - return request({ - url: '/measure/alarm', - method: 'put', - data: data - }) -} - -// 删除报警管理 -export function delAlarm(id) { - return request({ - url: '/measure/alarm/' + id, - method: 'delete' - }) -} - -// 查询报警次数 -export function getAlarmTimes(id) { - return request({ - url: '/measure/alarm/times?equipId=' + id, - method: 'get' - }) -} - -// 查询设备状态变化数据详细 -export function getChange(id) { - return request({ - url: '/system/change/' + id, - method: 'get' - }) -} - -// 查询设备状态变化数据详细 -export function getRunDetail(id) { - return request({ - url: '/system/change/run/detail?equipId=' + id, - method: 'get' - }) -} - -// 查询设备的严重等级和最新状态 -////设备状态:0:正常,1:闲置,2:预警 3:维修 4:保养 5:报废 -export function getAlarmLevelStatus() { - return request({ - url: '/measure/alarm/levelinfo', - method: 'get' - }) -} diff --git a/tzipc-ui/src/api/warn/breakdown.js b/tzipc-ui/src/api/warn/breakdown.js deleted file mode 100644 index e4d5853..0000000 --- a/tzipc-ui/src/api/warn/breakdown.js +++ /dev/null @@ -1,60 +0,0 @@ -import request from '@/utils/request' - -// 查询故障信息管理列表 -export function listBreakdown(query) { - return request({ - url: '/observe/breakdown/list', - method: 'get', - params: query - }) -} - -// 查询故障信息管理详细 -export function getBreakdown(id) { - return request({ - url: '/observe/breakdown/' + id, - method: 'get' - }) -} - -// 新增故障信息管理 -export function addBreakdown(data) { - return request({ - url: '/observe/breakdown', - method: 'post', - data: data - }) -} - -// 修改故障信息管理 -export function updateBreakdown(data) { - return request({ - url: '/observe/breakdown', - method: 'put', - data: data - }) -} - -// 删除故障信息管理 -export function delBreakdown(id) { - return request({ - url: '/observe/breakdown/' + id, - method: 'delete' - }) -} - -// 查询故障次数 -export function getBreakdownTimes(id) { - return request({ - url: '/observe/breakdown/times?equipId=' + id, - method: 'get' - }) -} - -// 查询各种类型故障的数量 -export function getBreakdownTypes() { - return request({ - url: '/observe/breakdown/type/number' , - method: 'get' - }) -} diff --git a/tzipc-ui/src/api/warn/rules.js b/tzipc-ui/src/api/warn/rules.js deleted file mode 100644 index 7920ba1..0000000 --- a/tzipc-ui/src/api/warn/rules.js +++ /dev/null @@ -1,44 +0,0 @@ -import request from '@/utils/request' - -// 查询预警规则管理列表 -export function listRules(query) { - return request({ - url: '/system/rules/list', - method: 'get', - params: query - }) -} - -// 查询预警规则管理详细 -export function getRules(id) { - return request({ - url: '/system/rules/' + id, - method: 'get' - }) -} - -// 新增预警规则管理 -export function addRules(data) { - return request({ - url: '/system/rules', - method: 'post', - data: data - }) -} - -// 修改预警规则管理 -export function updateRules(data) { - return request({ - url: '/system/rules', - method: 'put', - data: data - }) -} - -// 删除预警规则管理 -export function delRules(id) { - return request({ - url: '/system/rules/' + id, - method: 'delete' - }) -} diff --git a/tzipc-ui/src/views/alarm/index.vue b/tzipc-ui/src/views/alarm/index.vue deleted file mode 100644 index e9505f2..0000000 --- a/tzipc-ui/src/views/alarm/index.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - - \ No newline at end of file diff --git a/tzipc-ui/src/views/alarm/indexEchart.vue b/tzipc-ui/src/views/alarm/indexEchart.vue deleted file mode 100644 index 492edb7..0000000 --- a/tzipc-ui/src/views/alarm/indexEchart.vue +++ /dev/null @@ -1,161 +0,0 @@ - - - - - \ No newline at end of file diff --git a/tzipc-ui/src/views/alarm/indexOkrTree.vue b/tzipc-ui/src/views/alarm/indexOkrTree.vue deleted file mode 100644 index 44ed956..0000000 --- a/tzipc-ui/src/views/alarm/indexOkrTree.vue +++ /dev/null @@ -1,164 +0,0 @@ - - - - - diff --git a/tzipc-ui/src/views/dataLog/index.vue b/tzipc-ui/src/views/dataLog/index.vue deleted file mode 100644 index 70f2d47..0000000 --- a/tzipc-ui/src/views/dataLog/index.vue +++ /dev/null @@ -1,301 +0,0 @@ - - - - - diff --git a/tzipc-ui/src/views/detection/cydg/icon/index.vue b/tzipc-ui/src/views/detection/cydg/icon/index.vue deleted file mode 100644 index 17028dd..0000000 --- a/tzipc-ui/src/views/detection/cydg/icon/index.vue +++ /dev/null @@ -1,234 +0,0 @@ - - - - \ No newline at end of file diff --git a/tzipc-ui/src/views/detection/cydg/list/index.vue b/tzipc-ui/src/views/detection/cydg/list/index.vue deleted file mode 100644 index a0a41a6..0000000 --- a/tzipc-ui/src/views/detection/cydg/list/index.vue +++ /dev/null @@ -1,191 +0,0 @@ - - - - - diff --git a/tzipc-ui/src/views/detection/zgdgBottom/icon/index.vue b/tzipc-ui/src/views/detection/zgdgBottom/icon/index.vue deleted file mode 100644 index 3390b6d..0000000 --- a/tzipc-ui/src/views/detection/zgdgBottom/icon/index.vue +++ /dev/null @@ -1,234 +0,0 @@ - - - - \ No newline at end of file diff --git a/tzipc-ui/src/views/detection/zgdgBottom/list/index.vue b/tzipc-ui/src/views/detection/zgdgBottom/list/index.vue deleted file mode 100644 index f33a9ec..0000000 --- a/tzipc-ui/src/views/detection/zgdgBottom/list/index.vue +++ /dev/null @@ -1,191 +0,0 @@ - - - - - diff --git a/tzipc-ui/src/views/detection/zgdgTop/icon/index.vue b/tzipc-ui/src/views/detection/zgdgTop/icon/index.vue deleted file mode 100644 index 3390b6d..0000000 --- a/tzipc-ui/src/views/detection/zgdgTop/icon/index.vue +++ /dev/null @@ -1,234 +0,0 @@ - - - - \ No newline at end of file diff --git a/tzipc-ui/src/views/detection/zgdgTop/list/index.vue b/tzipc-ui/src/views/detection/zgdgTop/list/index.vue deleted file mode 100644 index f33a9ec..0000000 --- a/tzipc-ui/src/views/detection/zgdgTop/list/index.vue +++ /dev/null @@ -1,191 +0,0 @@ - - - - - diff --git a/tzipc-ui/src/views/zf/bigscreen/index.vue b/tzipc-ui/src/views/ipc/bigscreen/index.vue similarity index 100% rename from tzipc-ui/src/views/zf/bigscreen/index.vue rename to tzipc-ui/src/views/ipc/bigscreen/index.vue diff --git a/tzipc-ui/src/views/testDemo/index.png b/tzipc-ui/src/views/testDemo/index.png deleted file mode 100644 index d9f5bfa..0000000 Binary files a/tzipc-ui/src/views/testDemo/index.png and /dev/null differ diff --git a/tzipc-ui/src/views/testDemo/index.vue b/tzipc-ui/src/views/testDemo/index.vue deleted file mode 100644 index 9c91360..0000000 --- a/tzipc-ui/src/views/testDemo/index.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - - \ No newline at end of file diff --git a/tzipc-ui/src/views/testScreen/bg.png b/tzipc-ui/src/views/testScreen/bg.png deleted file mode 100644 index cf8204d..0000000 Binary files a/tzipc-ui/src/views/testScreen/bg.png and /dev/null differ diff --git a/tzipc-ui/src/views/testScreen/cardItemTitle.png b/tzipc-ui/src/views/testScreen/cardItemTitle.png deleted file mode 100644 index e018047..0000000 Binary files a/tzipc-ui/src/views/testScreen/cardItemTitle.png and /dev/null differ diff --git a/tzipc-ui/src/views/testScreen/deviceCard.png b/tzipc-ui/src/views/testScreen/deviceCard.png deleted file mode 100644 index fc0841c..0000000 Binary files a/tzipc-ui/src/views/testScreen/deviceCard.png and /dev/null differ diff --git a/tzipc-ui/src/views/testScreen/empty.png b/tzipc-ui/src/views/testScreen/empty.png deleted file mode 100644 index 75b9220..0000000 Binary files a/tzipc-ui/src/views/testScreen/empty.png and /dev/null differ diff --git a/tzipc-ui/src/views/testScreen/empty_no.png b/tzipc-ui/src/views/testScreen/empty_no.png deleted file mode 100644 index f203560..0000000 Binary files a/tzipc-ui/src/views/testScreen/empty_no.png and /dev/null differ diff --git a/tzipc-ui/src/views/testScreen/index.vue b/tzipc-ui/src/views/testScreen/index.vue deleted file mode 100644 index 126aefe..0000000 --- a/tzipc-ui/src/views/testScreen/index.vue +++ /dev/null @@ -1,875 +0,0 @@ - - - diff --git a/tzipc-ui/src/views/testScreen/load.png b/tzipc-ui/src/views/testScreen/load.png deleted file mode 100644 index 88f6fec..0000000 Binary files a/tzipc-ui/src/views/testScreen/load.png and /dev/null differ diff --git a/tzipc-ui/src/views/testScreen/load_no.png b/tzipc-ui/src/views/testScreen/load_no.png deleted file mode 100644 index f0319a4..0000000 Binary files a/tzipc-ui/src/views/testScreen/load_no.png and /dev/null differ diff --git a/tzipc-ui/src/views/testScreen/product.png b/tzipc-ui/src/views/testScreen/product.png deleted file mode 100644 index 6b20cb7..0000000 Binary files a/tzipc-ui/src/views/testScreen/product.png and /dev/null differ diff --git a/tzipc-ui/src/views/testScreen/topTitleBg.png b/tzipc-ui/src/views/testScreen/topTitleBg.png deleted file mode 100644 index 1696593..0000000 Binary files a/tzipc-ui/src/views/testScreen/topTitleBg.png and /dev/null differ diff --git a/tzipc-ui/src/views/warn/alarm/index.vue b/tzipc-ui/src/views/warn/alarm/index.vue deleted file mode 100644 index 427ab65..0000000 --- a/tzipc-ui/src/views/warn/alarm/index.vue +++ /dev/null @@ -1,417 +0,0 @@ - - - diff --git a/tzipc-ui/src/views/warn/breakdown/index.vue b/tzipc-ui/src/views/warn/breakdown/index.vue deleted file mode 100644 index 393fd39..0000000 --- a/tzipc-ui/src/views/warn/breakdown/index.vue +++ /dev/null @@ -1,425 +0,0 @@ - - - diff --git a/tzipc-ui/src/views/warn/rules/index.vue b/tzipc-ui/src/views/warn/rules/index.vue deleted file mode 100644 index a176b12..0000000 --- a/tzipc-ui/src/views/warn/rules/index.vue +++ /dev/null @@ -1,488 +0,0 @@ - - - diff --git a/tzipc-ui/src/views/zf/cydg/yxjk.vue b/tzipc-ui/src/views/zf/cydg/yxjk.vue deleted file mode 100644 index a385723..0000000 --- a/tzipc-ui/src/views/zf/cydg/yxjk.vue +++ /dev/null @@ -1,2570 +0,0 @@ - - - - diff --git a/tzipc-ui/src/views/zf/lb.vue b/tzipc-ui/src/views/zf/lb.vue deleted file mode 100644 index 965eda5..0000000 --- a/tzipc-ui/src/views/zf/lb.vue +++ /dev/null @@ -1,110 +0,0 @@ - - - - - \ No newline at end of file diff --git a/tzipc-ui/src/views/zf/zgdgBottom/index.vue b/tzipc-ui/src/views/zf/zgdgBottom/index.vue deleted file mode 100644 index f184cc0..0000000 --- a/tzipc-ui/src/views/zf/zgdgBottom/index.vue +++ /dev/null @@ -1,2308 +0,0 @@ - - - - - diff --git a/tzipc-ui/src/views/zf/zgdgTop/index.vue b/tzipc-ui/src/views/zf/zgdgTop/index.vue deleted file mode 100644 index 856b25b..0000000 --- a/tzipc-ui/src/views/zf/zgdgTop/index.vue +++ /dev/null @@ -1,2307 +0,0 @@ - - - - -