| | |
| | | import org.jeecg.modules.eam.dto.EchartsDto; |
| | | import org.jeecg.modules.eam.entity.EamEquipment; |
| | | import org.jeecg.modules.eam.entity.EamEquipmentExtend; |
| | | import org.jeecg.modules.eam.entity.EamThirdMaintenanceWorkPlanSheet; |
| | | import org.jeecg.modules.eam.mapper.EamEquipmentMapper; |
| | | import org.jeecg.modules.eam.request.EamEquipmentQuery; |
| | | import org.jeecg.modules.eam.service.IEamEquipmentExtendService; |
| | | import org.jeecg.modules.eam.service.IEamEquipmentService; |
| | | import org.jeecg.modules.eam.service.IEamThirdMaintenanceWorkPlanSheetService; |
| | | import org.jeecg.modules.eam.tree.FindsEquipmentEamCenterUtil; |
| | | import org.jeecg.modules.eam.tree.FindsEquipmentProductionUtil; |
| | | import org.jeecg.modules.eam.vo.EamEquipmentTree; |
| | |
| | | private IBaseFactoryUserService baseFactoryUserService; |
| | | @Autowired |
| | | private IBaseFactoryService baseFactoryService; |
| | | @Autowired |
| | | private IEamThirdMaintenanceWorkPlanSheetService eamThirdMaintenanceWorkPlanSheetService; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | eamEquipmentExtend.setMaintenanceStatus(EquipmentMaintenanceStatus.NORMAL.name()); |
| | | eamEquipmentExtend.setRepairStatus(EquipmentRepairStatus.NORMAL.name()); |
| | | equipmentExtendService.save(eamEquipmentExtend); |
| | | |
| | | //三保 |
| | | EamThirdMaintenanceWorkPlanSheet eamThirdMaintenanceWorkPlanSheet=new EamThirdMaintenanceWorkPlanSheet(); |
| | | BeanUtils.copyProperties(eamEquipment,eamThirdMaintenanceWorkPlanSheet); |
| | | eamThirdMaintenanceWorkPlanSheet.setId(null); |
| | | eamThirdMaintenanceWorkPlanSheet.setMaintenanceDate(eamEquipment.getLatestThirdMaintenance()); |
| | | eamThirdMaintenanceWorkPlanSheetService.add(eamThirdMaintenanceWorkPlanSheet); |
| | | |
| | | //插入设备履历 @EquipmentHistoryLog |
| | | return eamEquipment; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取可生成二保工单的设备列表 |
| | | */ |
| | | @Override |
| | | public List<EamEquipment> selectSecondMaintenanceEquipmentList(){ |
| | | QueryWrapper<EamEquipment> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("e.del_flag", CommonConstant.DEL_FLAG_0); |
| | | queryWrapper.ne("ext.maintenance_status", MaintenanceStatusEnum.PROHIBITED.name()); |
| | | queryWrapper.isNotNull("ext.next_second_maintenance"); |
| | | return this.getBaseMapper().selectSecondMaintenanceEquipmentList(queryWrapper); |
| | | } |
| | | |
| | | /** |
| | | * 设备管理首页-技术状态 |
| | | * @return |
| | | */ |