修改 不良率写死和一处报错的地方

master
wangh 2 years ago
parent 9a77855f7f
commit 4956ddfb63

@ -16,6 +16,7 @@ public class RuoYiApplication
{
// System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(RuoYiApplication.class, args);
System.out.println("一期看板-8012\t二期看板-8013");
System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" +
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +

@ -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;
}

@ -558,8 +558,8 @@
{
name: '不良率',
data: [
{value: 22, name: `3%`},
{value: 78, name: ''},
{value: flaw, name: rate.toFixed(2)+'%'},
{value: total-flaw, name: ''},
],
}
]

Loading…
Cancel
Save