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

master
wangh 2 years ago
parent 9a77855f7f
commit 4956ddfb63

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

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

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

Loading…
Cancel
Save