Lius
2025-05-12 54bfeae64b0d4a85b8f3e146b0f261d35c45ddc0
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcBoardServiceImpl.java
@@ -22,12 +22,14 @@
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;
@@ -68,6 +70,9 @@
    @Resource
    private MdcBoardMapper mdcBoardMapper;
    @Resource
    private IMdcDeviceCalendarService mdcDeviceCalendarService;
    /**
     * 设备状态
@@ -311,8 +316,8 @@
        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("待机");
@@ -334,7 +339,7 @@
            }
        } else {
            mdcBoardEquRealTImeVo.setOporationDict("关机");
            mdcBoardEquRealTImeVo.setOporation(0);
            mdcBoardEquRealTImeVo.setOperation(0);
        }
        //设备运行数据
        Map<String, Object> mapData = equipmentWorkLineService.getDataList(mdcBoardEquRealTImeVo.getSaveTableName());
@@ -383,7 +388,12 @@
        } 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);