| | |
| | | package org.jeecg.modules.eam.service.impl; |
| | | |
| | | import org.jeecg.modules.eam.constant.EquipmentMaintenanceStatus; |
| | | import org.jeecg.modules.eam.entity.EamEquipmentExtend; |
| | | import org.jeecg.modules.eam.mapper.EamEquipmentExtendMapper; |
| | | import org.jeecg.modules.eam.service.IEamEquipmentExtendService; |
| | |
| | | eamEquipmentExtendMapper.updateById(entity); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean updateEquipmentInspectionStatus(String equipmentId, String status) { |
| | | EamEquipmentExtend entity = eamEquipmentExtendMapper.selectById(equipmentId); |
| | | if (entity == null) { |
| | | return false; |
| | | } |
| | | //保养优先点检状态 如果正在保养中,则点检状态不覆盖保养状态,反之 保养状态可以覆盖点检状态 |
| | | if (EquipmentMaintenanceStatus.NORMAL.name().equals(entity.getMaintenanceStatus()) |
| | | || EquipmentMaintenanceStatus.UNDER_INSPECTION.name().equals(entity.getMaintenanceStatus()) |
| | | || EquipmentMaintenanceStatus.INSPECTION_CONFIRM.name().equals(entity.getMaintenanceStatus())) { |
| | | entity.setMaintenanceStatus(status); |
| | | eamEquipmentExtendMapper.updateById(entity); |
| | | } |
| | | return true; |
| | | } |
| | | } |