| | |
| | | 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; |
| | | |
| | |
| | | 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()); |