From 2d727903343feb01fedc988370091395c368faf2 Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期二, 17 十二月 2024 16:06:42 +0800 Subject: [PATCH] OEE功能及设备管理调整 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentStatisticalInfoServiceImpl.java | 19 +++++++++++++++++++ 1 files changed, 19 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..2a09c05 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 @@ -2,6 +2,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import io.swagger.models.auth.In; import org.apache.commons.lang.StringUtils; import org.jeecg.common.system.vo.DictModel; import org.jeecg.modules.mdc.entity.*; @@ -14,6 +15,7 @@ import javax.annotation.Resource; import java.math.BigDecimal; +import java.math.RoundingMode; import java.util.*; /** @@ -75,6 +77,23 @@ } } + /** + * 鏌ヨ璁惧杩愯鏃堕棿 + * + * @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()); + } + } + private List<EquipmentStatisticalInfo> dataHandle(List<MdcEquipmentStatisticalInfo> list) { List<EquipmentStatisticalInfo> result = new ArrayList<>(); list.forEach(item -> { -- Gitblit v1.9.3