Lius
2025-03-18 423c836f9a0b15033b048c9d2666d3440fecdca0
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcDowntimeServiceImpl.java
@@ -9,6 +9,7 @@
import org.jeecg.modules.mdc.mapper.MdcDowntimeMapper;
import org.jeecg.modules.mdc.service.IMdcDowntimeService;
import org.jeecg.modules.mdc.service.IMdcEquipmentService;
import org.jeecg.modules.mdc.util.DateUtils;
import org.jeecg.modules.mdc.vo.MdcDowntimeVo;
import org.springframework.stereotype.Service;
@@ -55,6 +56,18 @@
        return this.baseMapper.pageList(page, mdcDowntimeVo);
    }
    @Override
    public Integer findPlanTimeDuration(String equipmentId, String validDate, String closeType) {
        int result = 0;
        List<MdcDowntime> mdcDowntimeList = this.baseMapper.findPlanTimeDuration(equipmentId, validDate, closeType);
        if (mdcDowntimeList != null && !mdcDowntimeList.isEmpty()) {
            for (MdcDowntime mdcDowntime : mdcDowntimeList) {
                result = DateUtils.differentMinutes(mdcDowntime.getStartDate(), mdcDowntime.getEndDate()) + result;
            }
        }
        return result;
    }
    private List<String> getEquipmentIds(String userId, MdcDowntimeVo mdcDowntimeVo) {
        if (StringUtils.isNotEmpty(mdcDowntimeVo.getEquipmentId())) {
            return Collections.singletonList(mdcDowntimeVo.getEquipmentId());