| | |
| | | import org.jeecg.modules.mdcJc.service.IMdcJcRcJobreportService; |
| | | import org.jeecg.modules.system.entity.MdcProduction; |
| | | import org.jeecg.modules.system.service.IMdcProductionService; |
| | | import org.joda.time.LocalDateTime; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private MdcBoardMapper mdcBoardMapper; |
| | | |
| | | @Resource |
| | | private IMdcDeviceCalendarService mdcDeviceCalendarService; |
| | | |
| | | /** |
| | | * 设备状态 |
| | |
| | | mdcBoardRateVo.setOpenRate(equipmentStatisticalInfo.getOpenLong().divide(new BigDecimal("864"), 2, RoundingMode.HALF_UP)); |
| | | } |
| | | if (equipmentStatisticalInfo.getOpenLong().compareTo(BigDecimal.ZERO) > 0) { |
| | | mdcBoardRateVo.setStartRate(equipmentStatisticalInfo.getProcessLong().multiply(new BigDecimal("100").divide(equipmentStatisticalInfo.getOpenLong(), 2, RoundingMode.HALF_UP))); |
| | | mdcBoardRateVo.setStartRate(equipmentStatisticalInfo.getProcessLong().multiply(new BigDecimal("100")).divide(equipmentStatisticalInfo.getOpenLong(), 2, RoundingMode.HALF_UP)); |
| | | } |
| | | statisticsMap.put(date, mdcBoardRateVo); |
| | | } |
| | |
| | | String realName = commonAPI.translateDictFromTable("sys_user", "realname", "username", mdcBoardEquRealTImeVo.getEquipmentManager()); |
| | | mdcBoardEquRealTImeVo.setEquipmentManager(realName); |
| | | mdcBoardEquRealTImeVo.setAlarm("无"); |
| | | if (mdcBoardEquRealTImeVo.getOporation() != null) { |
| | | switch (mdcBoardEquRealTImeVo.getOporation()) { |
| | | if (mdcBoardEquRealTImeVo.getOperation() != null) { |
| | | switch (mdcBoardEquRealTImeVo.getOperation()) { |
| | | case 1: |
| | | case 2: |
| | | mdcBoardEquRealTImeVo.setOporationDict("待机"); |
| | |
| | | } |
| | | } else { |
| | | mdcBoardEquRealTImeVo.setOporationDict("关机"); |
| | | mdcBoardEquRealTImeVo.setOporation(0); |
| | | mdcBoardEquRealTImeVo.setOperation(0); |
| | | } |
| | | //设备运行数据 |
| | | Map<String, Object> mapData = equipmentWorkLineService.getDataList(mdcBoardEquRealTImeVo.getSaveTableName()); |
| | |
| | | } else { |
| | | mdcBoardEquRealTImeVo.setReportRepairStatus("无"); |
| | | } |
| | | // 下次点检下次保养 |
| | | // 班次 |
| | | String shift = mdcDeviceCalendarService.findShiftByEquId(equipmentId); |
| | | if (StringUtils.isNotBlank(shift)) { |
| | | mdcBoardEquRealTImeVo.setShift(shift); |
| | | } |
| | | // 点检 保养 |
| | | Date nextInspection = mdcBoardMapper.findInsOrMain(equipmentId, MaintenanceCategoryEnum.POINT_INSPECTION.name()); |
| | | if (nextInspection != null) { |
| | | mdcBoardEquRealTImeVo.setNextInspection(nextInspection); |