From 9cbcb25e9b912f2c60f8d4512b02beb03bbec4ba Mon Sep 17 00:00:00 2001 From: zhangjunwen Date: Sat, 12 Oct 2024 15:47:42 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=BD=91=E5=85=B3?= =?UTF-8?q?=E7=BD=91=E5=8D=A1=E5=8A=9F=E8=83=BD=E5=A2=9E=E5=8A=A0=E5=92=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=8E=E4=B8=8D=E5=88=B7=E6=96=B0=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- imt-ui/src/views/system/gatewayinfo/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imt-ui/src/views/system/gatewayinfo/index.vue b/imt-ui/src/views/system/gatewayinfo/index.vue index 61a9f8a..240627a 100644 --- a/imt-ui/src/views/system/gatewayinfo/index.vue +++ b/imt-ui/src/views/system/gatewayinfo/index.vue @@ -316,7 +316,7 @@ From f19ae260204517279c7c8d47d36f71d6de6bbc36 Mon Sep 17 00:00:00 2001 From: zhangjunwen Date: Mon, 14 Oct 2024 08:39:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=B1=95=E7=A4=BAfanuc?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=97=B6=EF=BC=8C=E6=96=B0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=AF=94=E6=97=A7=E6=95=B0=E6=8D=AE=E6=95=B0=E6=8D=AE=E5=B0=8F?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/service/equip/EquipDashboardServiceImpl.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/EquipDashboardServiceImpl.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/EquipDashboardServiceImpl.java index 061c121..b741b9f 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/EquipDashboardServiceImpl.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/EquipDashboardServiceImpl.java @@ -67,15 +67,17 @@ public class EquipDashboardServiceImpl implements EquipDashboardService{ vo.setAlarmNum(alarmNum); if(Objects.nonNull(equipInfoDO.getRunStatus()) && equipInfoDO.getRunStatus() != 2) { - //获取工作数据、 + //获取工作数据 Map latestDataMap = dataQueryApi.getLatestFanucData(vo.getEquipId()); Map oldestDataMap = dataQueryApi.getOldestFanucData(vo.getEquipId()); if (CollUtil.isNotEmpty(latestDataMap) && CollUtil.isNotEmpty(oldestDataMap)) { vo.setPowerTime(Double.parseDouble(latestDataMap.get("power_time").toString()) / 60.0); vo.setWorkTime(Double.parseDouble(latestDataMap.get("work_time").toString()) / 60.0); vo.setProcessNum((int) Double.parseDouble(latestDataMap.get("process_num").toString())); - vo.setTodayWorkTime((Double.parseDouble(latestDataMap.get("work_time").toString()) - Double.parseDouble(oldestDataMap.get("work_time").toString())) / 60.0); - vo.setTodayProcessNum((int) (Double.parseDouble(latestDataMap.get("process_num").toString()) - Double.parseDouble(oldestDataMap.get("process_num").toString()))); + double todayWorkTime = (Double.parseDouble(latestDataMap.get("work_time").toString()) - Double.parseDouble(oldestDataMap.get("work_time").toString())) / 60.0; + int todayProcessNum = (int) (Double.parseDouble(latestDataMap.get("process_num").toString()) - Double.parseDouble(oldestDataMap.get("process_num").toString())); + vo.setTodayWorkTime(todayWorkTime < 0 ? Double.parseDouble(latestDataMap.get("work_time").toString()) : todayWorkTime); + vo.setTodayProcessNum(todayProcessNum < 0 ? (int) Double.parseDouble(latestDataMap.get("process_num").toString()) : todayProcessNum); vo.setTodayEfficiency(vo.getTodayProcessNum() / vo.getTodayWorkTime()); } }else{//维修状态