| | |
| | | this.baseMapper.updateById(eamReportRepair); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @EquipmentHistoryLog(operationTag = EquipmentOperationTagEnum.REPORT_REPAIR, businessTable = "eam_report_repair") |
| | | public EamReportRepair reportRepairFromSecondMaintenance(String equipmentId, String reportUser, List<EamSecondMaintenanceOrderDetail> detailList) { |
| | | StringBuilder sb = new StringBuilder(); |
| | | detailList.forEach(detail -> { |
| | | sb.append(detail.getItemCode()).append("、"); |
| | | sb.append(detail.getExceptionDescription()).append(";"); |
| | | }); |
| | | EamReportRepair entity = new EamReportRepair(); |
| | | entity.setEquipmentId(equipmentId); |
| | | entity.setCreateBy(reportUser); |
| | | entity.setFaultStartTime(new Date()); |
| | | entity.setBreakdownFlag(CommonConstant.DEFAULT_0); |
| | | entity.setDelFlag(CommonConstant.DEL_FLAG_0); |
| | | entity.setFaultName("二保执行报修处理"); |
| | | entity.setFaultDescription(sb.toString()); |
| | | entity.setFaultType(CommonConstant.DEFAULT_1); |
| | | entity.setReportStatus(ReportRepairEnum.WAIT_REPAIR.name()); |
| | | this.baseMapper.insert(entity); |
| | | //更新设备维修状态 |
| | | eamEquipmentExtendService.updateEquipmentRepairStatus(entity.getEquipmentId(), EquipmentRepairStatus.WAIT_REPAIR.name()); |
| | | return entity; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @EquipmentHistoryLog(operationTag = EquipmentOperationTagEnum.REPORT_REPAIR, businessTable = "eam_report_repair") |
| | | public EamReportRepair reportRepairFromThirdMaintenance(String equipmentId, String reportUser, List<EamThirdMaintenanceOrderDetail> detailList) { |
| | | StringBuilder sb = new StringBuilder(); |
| | | detailList.forEach(detail -> { |
| | | sb.append(detail.getItemCode()).append("、"); |
| | | sb.append(detail.getExceptionDescription()).append(";"); |
| | | }); |
| | | EamReportRepair entity = new EamReportRepair(); |
| | | entity.setEquipmentId(equipmentId); |
| | | entity.setCreateBy(reportUser); |
| | | entity.setFaultStartTime(new Date()); |
| | | entity.setBreakdownFlag(CommonConstant.DEFAULT_0); |
| | | entity.setDelFlag(CommonConstant.DEL_FLAG_0); |
| | | entity.setFaultName("三保执行报修处理"); |
| | | entity.setFaultDescription(sb.toString()); |
| | | entity.setFaultType(CommonConstant.DEFAULT_1); |
| | | entity.setReportStatus(ReportRepairEnum.WAIT_REPAIR.name()); |
| | | this.baseMapper.insert(entity); |
| | | //更新设备维修状态 |
| | | eamEquipmentExtendService.updateEquipmentRepairStatus(entity.getEquipmentId(), EquipmentRepairStatus.WAIT_REPAIR.name()); |
| | | return entity; |
| | | } |
| | | } |