From cd00884c3db8fa6808b3b5949ab1a2b1459d6bdc Mon Sep 17 00:00:00 2001
From: cuilei <ray_tsu1@163.com>
Date: 星期三, 11 六月 2025 10:36:55 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentStatisticalInfoServiceImpl.java |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 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 5f89d3e..c149df2 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
@@ -4,6 +4,7 @@
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.apache.commons.lang.StringUtils;
 import org.jeecg.common.system.vo.DictModel;
+import org.jeecg.modules.mdc.dto.MdcEquipmentStatisticalDto;
 import org.jeecg.modules.mdc.entity.*;
 import org.jeecg.modules.mdc.mapper.MdcEquipmentStatisticalInfoMapper;
 import org.jeecg.modules.mdc.service.*;
@@ -14,6 +15,7 @@
 
 import javax.annotation.Resource;
 import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.util.*;
 
 /**
@@ -299,4 +301,36 @@
         }
         return equipmentStatisticalInfos;
     }
+
+    /**
+     * 鏌ヨ璁惧杩愯鏃堕棿
+     *
+     * @param equipmentId
+     * @param validDate
+     * @return
+     */
+    @Override
+    public Integer selectProcessLong(String equipmentId, String validDate) {
+        Integer processLong = this.baseMapper.selectProcessLong(equipmentId, validDate);
+        if (processLong == null) {
+            return 0;
+        } else {
+            return Integer.parseInt(new BigDecimal(processLong).divide(new BigDecimal("60"), 0, RoundingMode.HALF_UP).toString());
+        }
+    }
+
+    @Override
+    public MdcEquipmentStatisticalDto findByEquipmentAndMonth(String equipmentId, String date) {
+        return this.baseMapper.findByEquipmentAndMonth(equipmentId, date);
+    }
+
+    @Override
+    public MdcEquipmentStatisticalInfo findByEquIdsAndMonth(List<String> equipmentIdList, String month) {
+        return this.baseMapper.findByEquIdsAndMonth(equipmentIdList, month);
+    }
+
+    @Override
+    public List<MdcEquipmentStatisticalInfo> findByEquipmentAndDate(List<String> equipmentIdList, String date) {
+        return this.baseMapper.findByEquipmentAndDate(equipmentIdList, date);
+    }
 }

--
Gitblit v1.9.3