| | |
| | | import org.jeecg.common.api.vo.FileUploadResult; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.constant.DataBaseConstant; |
| | | import org.jeecg.common.exception.JeecgBootException; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.eam.aspect.annotation.EquipmentHistoryLog; |
| | |
| | | StringBuilder sb = new StringBuilder(); |
| | | detailList.forEach(detail -> { |
| | | sb.append(detail.getItemCode()).append("、"); |
| | | sb.append(detail.getExceptionDescription()).append(";"); |
| | | sb.append(detail.getExceptionDescription()).append("; "); |
| | | }); |
| | | EamEquipmentFaultReason reason = eamEquipmentFaultReasonService.selectByFaultCode(BusinessCodeConst.EFR20250010); |
| | | EamReportRepair entity = new EamReportRepair(); |
| | |
| | | entity.setFaultStartTime(new Date()); |
| | | entity.setBreakdownFlag(CommonConstant.DEFAULT_0); |
| | | entity.setDelFlag(CommonConstant.DEL_FLAG_0); |
| | | entity.setFaultDescription(sb.toString()); |
| | | if(reason == null){ |
| | | entity.setFaultName("周保执行报修处理"); |
| | | entity.setFaultDescription(sb.toString()); |
| | | }else { |
| | | entity.setFaultName(reason.getFaultName()); |
| | | entity.setFaultType(reason.getFaultCategory()); |
| | |
| | | StringBuilder sb = new StringBuilder(); |
| | | detailList.forEach(detail -> { |
| | | sb.append(detail.getItemCode()).append("、"); |
| | | sb.append(detail.getExceptionDescription()).append(";"); |
| | | sb.append(detail.getExceptionDescription()).append("; "); |
| | | }); |
| | | EamEquipmentFaultReason reason = eamEquipmentFaultReasonService.selectByFaultCode(BusinessCodeConst.EFR20250009); |
| | | EamReportRepair entity = new EamReportRepair(); |
| | |
| | | entity.setFaultStartTime(new Date()); |
| | | entity.setBreakdownFlag(CommonConstant.DEFAULT_0); |
| | | entity.setDelFlag(CommonConstant.DEL_FLAG_0); |
| | | entity.setFaultDescription(sb.toString()); |
| | | if(reason == null){ |
| | | entity.setFaultName("点检执行报修处理"); |
| | | entity.setFaultDescription(sb.toString()); |
| | | }else { |
| | | entity.setFaultName(reason.getFaultName()); |
| | | entity.setFaultType(reason.getFaultCategory()); |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @EquipmentHistoryLog(operationTag = EquipmentOperationTagEnum.REPORT_REPAIR, businessTable = "eam_report_repair") |
| | | public EamReportRepair add(EamReportRepair eamReportRepair) { |
| | | EamEquipment equipment = eamEquipmentService.getById(eamReportRepair.getEquipmentId()); |
| | | if (equipment == null) { |
| | | throw new JeecgBootException("设备不存在,请检查!"); |
| | | } |
| | | eamReportRepair.setReportStatus(ReportRepairEnum.WAIT_REPAIR.name()); |
| | | eamReportRepair.setDelFlag(CommonConstant.DEL_FLAG_0); |
| | | // 附件处理 |