change - 设备故障

master
wenjy 2 years ago
parent b7b670c544
commit 82ddb529c1

@ -60,7 +60,7 @@ public class TankShellDeviceDataInformation implements Serializable {
private Date collectTime;
@TableField("COUNT")
private int alarmCount;
private int count;
@TableField("lossTime")
private String lossTime;

@ -19,6 +19,9 @@ public interface AluminumDeviceDataInformationMapper extends BaseMapper<Aluminum
* @param in_id
* @return
*/
@Select("select * from table ( scada_aluminum_device_t_new(#{in_id}) )")
@Select("select * from table ( scada_aluminum_dataInfo_t_new(#{in_id}) )")
List<AluminumDeviceDataInformation> getAluminumDeviceDataInformations(@Param("in_id") Integer in_id);
@Select("select * from table ( scada_aluminum_device_t_new(#{in_id}) )")
List<AluminumDeviceDataInformation> getAluminumDeviceRunParameters(@Param("in_id") Integer in_id);
}

@ -28,6 +28,6 @@ public interface TankShellDeviceDataInformationMapper extends BaseMapper<TankShe
* @param in_id
* @return
*/
@Select("select * from table ( scada_device_data_info_new(#{in_id}) )")
List<TankShellDeviceDataInformation> getDeviceDataInformations(@Param("in_id") Integer in_id);
@Select("select * from table ( scada_device_run_info_new(#{in_id}) )")
List<TankShellDeviceDataInformation> getTankShellDeviceRunParameters(@Param("in_id") Integer in_id);
}

@ -66,7 +66,7 @@ public class AluminumDeviceInfoServiceImpl implements IAluminumDeviceInfoService
result[1] = aluminumYesterdayEnergies.size() > 0 ? aluminumYesterdayEnergies.get(0).getEnergy():"0";
result[2] = aluminumThisMonthEnergies.size() > 0 ? aluminumThisMonthEnergies.get(0).getProduction():"0";
result[3] = aluminumThisMonthEnergies.size() > 0 ? aluminumThisMonthEnergies.get(0).getEnergy():"0";
List<AluminumDeviceDataInformation> aluminumDeviceDataInformations = dataInformationMapper.getAluminumDeviceDataInformations(in_id);
List<AluminumDeviceDataInformation> aluminumDeviceDataInformations = dataInformationMapper.getAluminumDeviceRunParameters(in_id);
// List<AluminumDeviceDataInformation> aluminumDeviceDataInformations = dataInformationMapper.selectList(null);
if(aluminumDeviceDataInformations.size() > 0){
AluminumDeviceDataInformation aluminumDeviceDataInformation = aluminumDeviceDataInformations.get(0);

@ -63,7 +63,7 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi
tankShellDeviceDataInformation.setDeviceStatus("0");
tankShellDeviceDataInformation.setDevicePower("0");
tankShellDeviceDataInformation.setDeviceEnergy("0");
tankShellDeviceDataInformation.setAlarmCount(0);
tankShellDeviceDataInformation.setCount(0);
tankShellDeviceDataInformations.add(tankShellDeviceDataInformation);
}else{
if(tankShellDeviceDataInformations.get(0) == null){
@ -71,7 +71,7 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi
tankShellDeviceDataInformation.setDeviceStatus("0");
tankShellDeviceDataInformation.setDevicePower("0");
tankShellDeviceDataInformation.setDeviceEnergy("0");
tankShellDeviceDataInformation.setAlarmCount(0);
tankShellDeviceDataInformation.setCount(0);
tankShellDeviceDataInformations.add(tankShellDeviceDataInformation);
}else{
for(TankShellDeviceDataInformation item : tankShellDeviceDataInformations){
@ -121,14 +121,14 @@ public class TankShellDeviceInfoServiceImpl implements ITankShellDeviceInfoServi
result[3] = tankShellThisMonthEnergies.size() > 0 ? tankShellThisMonthEnergies.get(0).getEnergy():"0";
// List<TankShellDeviceDataInformation> deviceDataInformations = tankShellDeviceDataInformationMapper.selectList(null);
List<TankShellDeviceDataInformation> deviceDataInformations = tankShellDeviceDataInformationMapper.getDeviceDataInformations(in_id);
List<TankShellDeviceDataInformation> deviceDataInformations = tankShellDeviceDataInformationMapper.getTankShellDeviceRunParameters(in_id);
if(deviceDataInformations.size() > 0){
TankShellDeviceDataInformation tankShellDeviceDataInformation = deviceDataInformations.get(0);
if(tankShellDeviceDataInformation != null){
result[4] = tankShellDeviceDataInformation.getRunTime();
result[5] = tankShellDeviceDataInformation.getStopTime();
result[6] = tankShellDeviceDataInformation.getDeviceOee();
result[7] = tankShellDeviceDataInformation.getAlarmCount()+"";
result[7] = tankShellDeviceDataInformation.getCount()+"";
result[8] = tankShellDeviceDataInformation.getLossTime();
result[9] = tankShellDeviceDataInformation.getDeviceTakt();

@ -12,6 +12,6 @@ mybatis-plus:
mapper-locations: classpath*:/mapper/**Mapper.xml
server:
port: 6069
port: 6070
in_id: 1
in_id: 2

@ -8,7 +8,7 @@ $(() => {
statusArray[0] = result[0].deviceStatus == "正常" ? "1" : "0";
statusArray[1] = test(result[0].devicePower,100);
statusArray[2] = test(result[0].deviceEnergy,1000);
//statusArray[3] = result[0].count;
statusArray[3] = result[0].count;
}
dataInformationFunction(statusArray);
});

@ -88,7 +88,7 @@ const dataInformationFunction = (statusArray) => {
<tr style="width: 100%; height: 50%;">
<td style="border:0px solid red;text-align:center;width: 50%;color: #59B2F6;"> ${test(res.deviceEnergy,100)}kW·h</td>
<td style="border:0px solid red;text-align:center;width: 50%;color: red;">0</td>
<td style="border:0px solid red;text-align:center;width: 50%;color: red;">${res.count}</td>
</tr>
</table>`;

@ -12,6 +12,6 @@ mybatis-plus:
mapper-locations: classpath*:/mapper/**Mapper.xml
server:
port: 6069
port: 6070
in_id: 1
in_id: 2

@ -8,7 +8,7 @@ $(() => {
statusArray[0] = result[0].deviceStatus == "正常" ? "1" : "0";
statusArray[1] = test(result[0].devicePower,100);
statusArray[2] = test(result[0].deviceEnergy,1000);
//statusArray[3] = result[0].count;
statusArray[3] = result[0].count;
}
dataInformationFunction(statusArray);
});

@ -88,7 +88,7 @@ const dataInformationFunction = (statusArray) => {
<tr style="width: 100%; height: 50%;">
<td style="border:0px solid red;text-align:center;width: 50%;color: #59B2F6;"> ${test(res.deviceEnergy,100)}kW·h</td>
<td style="border:0px solid red;text-align:center;width: 50%;color: red;">0</td>
<td style="border:0px solid red;text-align:center;width: 50%;color: red;">${res.count}</td>
</tr>
</table>`;
@ -124,5 +124,5 @@ const runParamStatisticsFunction = (statusArray) => {
<div style="font-size:175%;left: 87%;color:#FF696A">${statusArray[7]}</div>
`;
$("#runParamStatistics").append(info);
$("#runParamStatistics").html(info);
}
Loading…
Cancel
Save