From d88b7402ecf5f6b3dd14636db5bcde3b847d8f0a Mon Sep 17 00:00:00 2001
From: hyingbo <1363390067@qq.com>
Date: 星期三, 28 五月 2025 17:48:23 +0800
Subject: [PATCH] 设备添加安装位置,调整设备利用率中开始时间加关机时间不等于24的问题

---
 lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentStatisticalInfoServiceImpl.java |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentStatisticalInfoServiceImpl.java b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentStatisticalInfoServiceImpl.java
index 87b92ae..02efd34 100644
--- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentStatisticalInfoServiceImpl.java
+++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentStatisticalInfoServiceImpl.java
@@ -287,6 +287,18 @@
                         errorLong += du;
                     }
                 }
+
+                //濡傚緟鏈烘椂闂�+鍔犲伐鏃堕棿+鍏虫満鏃堕棿涓嶇瓑浜�86400锛岄渶灏嗗浣欐椂闂磋繘琛岃ˉ鍏�
+                long remainingDate = 86400 - waitingLong - processingLong - closedLong;
+                if (remainingDate != 0L) {
+                    //濡傛灉鍏虫満鏃堕棿澶т簬寰呮満鏃堕棿+鍔犲伐鏃堕棿锛屽皢澶氫綑鏃堕棿鍔犺嚦鍏虫満鏃堕棿锛屽惁鍒欙紝鍔犲叆寰呮満鏃堕棿
+                    if (waitingLong + processingLong < closedLong) {
+                        closedLong += remainingDate;
+                    }else {
+                        waitingLong += remainingDate;
+                    }
+                }
+
                 equipmentStatisticalInfo.setWaitLong(new BigDecimal(waitingLong));
                 equipmentStatisticalInfo.setProcessLong(new BigDecimal(processingLong));
                 equipmentStatisticalInfo.setCloseLong(new BigDecimal(closedLong));
@@ -323,4 +335,19 @@
     public MdcEquipmentStatisticalDto findByEquipmentAndMonth(String equipmentId, String date) {
         return this.baseMapper.findByEquipmentAndMonth(equipmentId, date);
     }
+
+    @Override
+    public List<MdcEquipmentStatisticalInfo> findByEquipmentAndDate(List<String> equipmentList, String start, String end) {
+        return this.baseMapper.findByEquipmentAndDate(equipmentList, start, end);
+    }
+
+    @Override
+    public List<MdcEquipmentStatisticalInfo> findByEquIdAndDate(String equipmentId, String start, String end) {
+        return this.baseMapper.findByEquIdAndDate(equipmentId, start, end);
+    }
+
+    @Override
+    public MdcEquipmentStatisticalInfo findByEquIdAndMonth(String equipmentId, String month) {
+        return this.baseMapper.findByEquIdAndMonth(equipmentId, month);
+    }
 }

--
Gitblit v1.9.3