From 4956ddfb63eda613ff38568cca727af49eb81afb Mon Sep 17 00:00:00 2001 From: wangh <123456> Date: Wed, 26 Oct 2022 16:10:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E4=B8=8D=E8=89=AF?= =?UTF-8?q?=E7=8E=87=E5=86=99=E6=AD=BB=E5=92=8C=E4=B8=80=E5=A4=84=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E7=9A=84=E5=9C=B0=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/RuoYiApplication.java | 1 + .../controller/scada/FoamerMesController.java | 26 +++++++++---------- .../templates/scada/SouthFoamerMesPlan.html | 4 +-- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java index 0e890c1..fb96342 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java @@ -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" + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/scada/FoamerMesController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/scada/FoamerMesController.java index edee19f..16ebe22 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/scada/FoamerMesController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/scada/FoamerMesController.java @@ -333,7 +333,7 @@ public class FoamerMesController { @PostMapping("/getDeviceInfo") @ResponseBody public DeviceInfo getDeviceInfo() { - Optional hourDataOptional = scadaFoamDeviceinfoService.getHourData(); +// Optional hourDataOptional = scadaFoamDeviceinfoService.getHourData(); List deviceIdList = new ArrayList(){ { @@ -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; } diff --git a/ruoyi-admin/src/main/resources/templates/scada/SouthFoamerMesPlan.html b/ruoyi-admin/src/main/resources/templates/scada/SouthFoamerMesPlan.html index b10964d..8cc94dc 100644 --- a/ruoyi-admin/src/main/resources/templates/scada/SouthFoamerMesPlan.html +++ b/ruoyi-admin/src/main/resources/templates/scada/SouthFoamerMesPlan.html @@ -558,8 +558,8 @@ { name: '不良率', data: [ - {value: 22, name: `3%`}, - {value: 78, name: ''}, + {value: flaw, name: rate.toFixed(2)+'%'}, + {value: total-flaw, name: ''}, ], } ]