| | |
| | | package org.jeecg.modules.board.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import liquibase.pro.packaged.I; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringPool; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.constant.WebsocketConst; |
| | | import org.jeecg.common.system.vo.DictModel; |
| | | import org.jeecg.modules.board.mapper.DtBoardMapper; |
| | | import org.jeecg.modules.board.service.IDtBoardService; |
| | | import org.jeecg.modules.board.vo.*; |
| | | import org.jeecg.modules.eam.service.IEamRepairOrderService; |
| | | import org.jeecg.modules.mdc.constant.MdcConstant; |
| | | import org.jeecg.modules.mdc.entity.*; |
| | | import org.jeecg.modules.mdc.service.*; |
| | | import org.jeecg.modules.mdc.util.DateUtils; |
| | | import org.jeecg.modules.mdc.vo.AndonOrderWebSocketVo; |
| | | import org.jeecg.modules.system.entity.MdcProduction; |
| | | import org.jeecg.modules.system.service.IMdcProductionService; |
| | | import org.jeecg.modules.system.service.ISysDictService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public List<AndonOrderWebSocketVo> untreatedAndonList() { |
| | | List<AndonOrderWebSocketVo> result = andonOrderService.untreatedAndonList(); |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public List<EquStatus> getAllEquipmentStatus() { |
| | | List<Equipment> equipmentList = equipmentService.list(); |
| | | List<EquStatus> equStatusList = new ArrayList<>(); |
| | | if (equipmentList != null && !equipmentList.isEmpty()) { |
| | | for (Equipment equipment : equipmentList) { |
| | | if (equipment.getOporation() == null) { |
| | | equipment.setOporation(0); |
| | | } |
| | | EquStatus equStatus = new EquStatus(); |
| | | equStatus.setEquipmentId(equipment.getEquipmentid()); |
| | | equStatus.setState(equipment.getOporation()); |
| | | // 通过equipmentId获取设备车间名称 |
| | | String productionName = mdcProductionService.findProName(equipment.getEquipmentid()); |
| | | equStatus.setPlantName(StringUtils.isNotBlank(productionName) ? productionName : StringPool.EMPTY); |
| | | equStatusList.add(equStatus); |
| | | } |
| | | } |
| | | return equStatusList; |
| | | } |
| | | } |