大屏首页更新
This commit is contained in:
parent
8023ed1000
commit
13fe176a92
@ -45,9 +45,9 @@ public class IpcSysStatusController extends BaseController
|
|||||||
* 系统信息
|
* 系统信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getSysStatus")
|
@GetMapping("/getSysStatus")
|
||||||
public AjaxResult getSysStatus(@RequestParam("equipName")String equipName)
|
public AjaxResult getSysStatus()
|
||||||
{
|
{
|
||||||
return AjaxResult.success(ipcSysStatusService.selectLatestIpcSysStatusByEquipName(equipName));
|
return AjaxResult.success(ipcSysStatusService.selectLatestIpcSysStatus());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -314,7 +314,7 @@ public class IpcDataProcess implements Runnable {
|
|||||||
ipcRunningStatusRecordService.insertIpcRunningStatusRecord(ipcRunningStatusRecord);
|
ipcRunningStatusRecordService.insertIpcRunningStatusRecord(ipcRunningStatusRecord);
|
||||||
//修改系统状态时间
|
//修改系统状态时间
|
||||||
IIpcSysStatusService ipcSysStatusService = SpringUtils.getBean(IIpcSysStatusService.class);
|
IIpcSysStatusService ipcSysStatusService = SpringUtils.getBean(IIpcSysStatusService.class);
|
||||||
IpcSysStatus sysStatus = ipcSysStatusService.selectIpcSysStatusList(null).get(0);
|
IpcSysStatus sysStatus = ipcSysStatusService.selectLatestIpcSysStatus();
|
||||||
//0:停机维护,1:运行,2:待机,3:试运行
|
//0:停机维护,1:运行,2:待机,3:试运行
|
||||||
switch(status) {
|
switch(status) {
|
||||||
case "0" :
|
case "0" :
|
||||||
|
@ -7,6 +7,10 @@ package com.inspur.industrial.domain;
|
|||||||
*/
|
*/
|
||||||
public class MonitorInfo {
|
public class MonitorInfo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备id
|
||||||
|
*/
|
||||||
|
String equipId;
|
||||||
/**
|
/**
|
||||||
* 设备名
|
* 设备名
|
||||||
*/
|
*/
|
||||||
@ -32,6 +36,14 @@ public class MonitorInfo {
|
|||||||
*/
|
*/
|
||||||
String onlineTime;
|
String onlineTime;
|
||||||
|
|
||||||
|
public String getEquipId() {
|
||||||
|
return equipId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEquipId(String equipId) {
|
||||||
|
this.equipId = equipId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getEquipName() {
|
public String getEquipName() {
|
||||||
return equipName;
|
return equipName;
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ public interface IpcSysStatusMapper
|
|||||||
* @param equipId 设备id
|
* @param equipId 设备id
|
||||||
* @return 最新一条状态信息
|
* @return 最新一条状态信息
|
||||||
*/
|
*/
|
||||||
public IpcSysStatus selectLatestIpcSysStatusByEquipId(String equipId);
|
public IpcSysStatus selectLatestIpcSysStatus();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增系统状态
|
* 新增系统状态
|
||||||
|
@ -33,7 +33,7 @@ public interface IIpcSysStatusService
|
|||||||
* @param equipName 设备名
|
* @param equipName 设备名
|
||||||
* @return 最新一条状态信息
|
* @return 最新一条状态信息
|
||||||
*/
|
*/
|
||||||
public IpcSysStatus selectLatestIpcSysStatusByEquipName(String equipName);
|
public IpcSysStatus selectLatestIpcSysStatus();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据设备名查询监控信息
|
* 根据设备名查询监控信息
|
||||||
|
@ -60,16 +60,8 @@ public class IpcSysStatusServiceImpl implements IIpcSysStatusService
|
|||||||
* @param equipId 设备id
|
* @param equipId 设备id
|
||||||
* @return 最新一条状态信息
|
* @return 最新一条状态信息
|
||||||
*/
|
*/
|
||||||
public IpcSysStatus selectLatestIpcSysStatusByEquipName(String equipName){
|
public IpcSysStatus selectLatestIpcSysStatus(){
|
||||||
|
return ipcSysStatusMapper.selectLatestIpcSysStatus();
|
||||||
IpcEquipInfo queryEquipInfo = new IpcEquipInfo();
|
|
||||||
queryEquipInfo.setEquipName(equipName);
|
|
||||||
List<IpcEquipInfo> equipInfoList = ipcEquipInfoService.selectIpcEquipInfoList(queryEquipInfo);
|
|
||||||
if (equipInfoList.size() == 0){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
String equipId = equipInfoList.get(0).getId();
|
|
||||||
return ipcSysStatusMapper.selectLatestIpcSysStatusByEquipId(equipId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -83,12 +75,13 @@ public class IpcSysStatusServiceImpl implements IIpcSysStatusService
|
|||||||
if (equipInfo == null){
|
if (equipInfo == null){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
monitorInfo.setEquipId(equipInfo.getId());
|
||||||
monitorInfo.setEquipName(equipInfo.getEquipName());
|
monitorInfo.setEquipName(equipInfo.getEquipName());
|
||||||
monitorInfo.setEquipNum(equipInfo.getEquipNum());
|
monitorInfo.setEquipNum(equipInfo.getEquipNum());
|
||||||
LocalDateTime now = LocalDateTime.now();
|
LocalDateTime now = LocalDateTime.now();
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||||
monitorInfo.setNowTime(now.format(formatter));
|
monitorInfo.setNowTime(now.format(formatter));
|
||||||
IpcSysStatus sysStatus = selectLatestIpcSysStatusByEquipName(equipName);
|
IpcSysStatus sysStatus = selectLatestIpcSysStatus();
|
||||||
monitorInfo.setStartTime(sysStatus == null ? null : sysStatus.getTrialTime().format(formatter));
|
monitorInfo.setStartTime(sysStatus == null ? null : sysStatus.getTrialTime().format(formatter));
|
||||||
//运行时间
|
//运行时间
|
||||||
if(sysStatus != null && sysStatus.getTrialTime() != null) {
|
if(sysStatus != null && sysStatus.getTrialTime() != null) {
|
||||||
|
@ -29,10 +29,10 @@
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 根据设备查询最新一条系统状态 selectLatestIpcSysStatusByEquipId-->
|
<!-- 查询最新一条系统状态 selectLatestIpcSysStatus-->
|
||||||
<select id="selectLatestIpcSysStatusByEquipId" parameterType="String" resultMap="IpcSysStatusResult">
|
<select id="selectLatestIpcSysStatus" parameterType="String" resultMap="IpcSysStatusResult">
|
||||||
<include refid="selectIpcSysStatusVo"/>
|
<include refid="selectIpcSysStatusVo"/>
|
||||||
where equip_id = #{equipId} order by id desc limit 1
|
order by id desc limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectIpcSysStatusById" parameterType="Long" resultMap="IpcSysStatusResult">
|
<select id="selectIpcSysStatusById" parameterType="Long" resultMap="IpcSysStatusResult">
|
||||||
|
@ -2536,7 +2536,7 @@ import {
|
|||||||
getBottomScollerDataByDate,
|
getBottomScollerDataByDate,
|
||||||
} from "@/api/data/query.js";
|
} from "@/api/data/query.js";
|
||||||
import {
|
import {
|
||||||
getStatusByEquipName,
|
getSysStatus,
|
||||||
getMonitorInfoByEquipName,
|
getMonitorInfoByEquipName,
|
||||||
} from "@/api/industrial/sysStatus.js";
|
} from "@/api/industrial/sysStatus.js";
|
||||||
import { listAllRecord } from "@/api/industrial/record";
|
import { listAllRecord } from "@/api/industrial/record";
|
||||||
@ -2758,7 +2758,7 @@ export default {
|
|||||||
let query = {
|
let query = {
|
||||||
equipName: "超压底缸",
|
equipName: "超压底缸",
|
||||||
};
|
};
|
||||||
this.getSysStatusData(query);
|
this.getSysStatusData();
|
||||||
this.getMonitorData(query);
|
this.getMonitorData(query);
|
||||||
this.queryBottomCylDataInit();
|
this.queryBottomCylDataInit();
|
||||||
this.intervalTask = setInterval(() => {
|
this.intervalTask = setInterval(() => {
|
||||||
@ -2778,7 +2778,7 @@ export default {
|
|||||||
let query = {
|
let query = {
|
||||||
equipName: "超压底缸",
|
equipName: "超压底缸",
|
||||||
};
|
};
|
||||||
this.getSysStatusData(query);
|
this.getSysStatusData();
|
||||||
this.getMonitorData(query);
|
this.getMonitorData(query);
|
||||||
this.queryBottomCylDataInit();
|
this.queryBottomCylDataInit();
|
||||||
this.intervalTask = setInterval(() => {
|
this.intervalTask = setInterval(() => {
|
||||||
@ -2789,7 +2789,7 @@ export default {
|
|||||||
let query = {
|
let query = {
|
||||||
equipName: "可控中高辊顶辊",
|
equipName: "可控中高辊顶辊",
|
||||||
};
|
};
|
||||||
this.getSysStatusData(query);
|
this.getSysStatusData();
|
||||||
this.getMonitorData(query);
|
this.getMonitorData(query);
|
||||||
this.queryTopScollerDataInit();
|
this.queryTopScollerDataInit();
|
||||||
this.intervalTask = setInterval(() => {
|
this.intervalTask = setInterval(() => {
|
||||||
@ -2800,7 +2800,7 @@ export default {
|
|||||||
let query = {
|
let query = {
|
||||||
equipName: "可控中高辊底辊",
|
equipName: "可控中高辊底辊",
|
||||||
};
|
};
|
||||||
this.getSysStatusData(query);
|
this.getSysStatusData();
|
||||||
this.getMonitorData(query);
|
this.getMonitorData(query);
|
||||||
this.queryBottomScollerDataInit();
|
this.queryBottomScollerDataInit();
|
||||||
this.intervalTask = setInterval(() => {
|
this.intervalTask = setInterval(() => {
|
||||||
@ -2810,14 +2810,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getSysStatusData(query) {
|
getSysStatusData(query) {
|
||||||
getStatusByEquipName(query).then((response) => {
|
getSysStatus(query).then((response) => {
|
||||||
this.sysStatus = response.data;
|
this.sysStatus = response.data;
|
||||||
this.queryAlarmRecordData(this.sysStatus.equipId);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getMonitorData(query) {
|
getMonitorData(query) {
|
||||||
getMonitorInfoByEquipName(query).then((response) => {
|
getMonitorInfoByEquipName(query).then((response) => {
|
||||||
this.monitorInfo = response.data;
|
this.monitorInfo = response.data;
|
||||||
|
this.queryAlarmRecordData(this.monitorInfo.equipId);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getDefaultTimeRange() {
|
getDefaultTimeRange() {
|
||||||
|
Loading…
Reference in New Issue
Block a user