|
|
|
@ -333,7 +333,7 @@ public class FoamerMesController {
|
|
|
|
|
@PostMapping("/getDeviceInfo")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public DeviceInfo getDeviceInfo() {
|
|
|
|
|
Optional<ScadaFoamHourDatum> hourDataOptional = scadaFoamDeviceinfoService.getHourData();
|
|
|
|
|
// Optional<ScadaFoamHourDatum> hourDataOptional = scadaFoamDeviceinfoService.getHourData();
|
|
|
|
|
|
|
|
|
|
List<String> deviceIdList = new ArrayList<String>(){
|
|
|
|
|
{
|
|
|
|
@ -362,18 +362,18 @@ public class FoamerMesController {
|
|
|
|
|
info.status3 = Convert.toInt(deviceStatusList.get(2));;
|
|
|
|
|
info.status4 = Convert.toInt(deviceStatusList.get(3));;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (hourDataOptional.isPresent()) {
|
|
|
|
|
ScadaFoamHourDatum hourData = hourDataOptional.get();
|
|
|
|
|
try {
|
|
|
|
|
info.oee = hourData.getOee();
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
info.oee = 0;
|
|
|
|
|
}
|
|
|
|
|
info.production = hourData.getTongsOutput();
|
|
|
|
|
info.idealPace = hourData.getDevicePlantakt();
|
|
|
|
|
info.actualPace = hourData.getDeviceRealtakt();
|
|
|
|
|
}
|
|
|
|
|
//在第一行报错的情况下没太看懂这部分要干啥
|
|
|
|
|
// if (hourDataOptional.isPresent()) {
|
|
|
|
|
// ScadaFoamHourDatum hourData = hourDataOptional.get();
|
|
|
|
|
// try {
|
|
|
|
|
// info.oee = hourData.getOee();
|
|
|
|
|
// } catch (Exception e) {
|
|
|
|
|
// info.oee = 0;
|
|
|
|
|
// }
|
|
|
|
|
// info.production = hourData.getTongsOutput();
|
|
|
|
|
// info.idealPace = hourData.getDevicePlantakt();
|
|
|
|
|
// info.actualPace = hourData.getDeviceRealtakt();
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
return info;
|
|
|
|
|
}
|
|
|
|
|