| | |
| | | List<Map<String, Object>> records = inspectionOrderList.getRecords(); |
| | | for (Map<String, Object> record : records) { |
| | | String id = (String)record.get("id"); |
| | | String equipmentId = (String)record.get("equipmentId"); |
| | | String status = (String)record.get("status"); |
| | | String inspectionStandardId = (String)record.get("inspectionStandardId"); |
| | | List<InspectionCycleVo> inspectionCycles = inspectionOrderService.getInspectionCycleByEqId(inspectionStandardId); |
| | | record.put("inspectionCycles",inspectionCycles); |
| | | // String equipmentId = (String)record.get("equipmentId"); |
| | | // String status = (String)record.get("status"); |
| | | // String inspectionStandardId = (String)record.get("inspectionStandardId"); |
| | | // List<InspectionCycleVo> inspectionCycles = inspectionOrderService.getInspectionCycleByEqId(inspectionStandardId); |
| | | // record.put("inspectionCycles",inspectionCycles); |
| | | |
| | | List<Map<String, Object>> inspectionOrderDetails = inspectionOrderService.getInspectionOrderDetailByOrderId(id); |
| | | record.put("inspectionOrderDetails",inspectionOrderDetails); |
| | | |
| | | |
| | | List<InspectionOrderDetail> failCount = inspectionOrderDetailService.lambdaQuery() |
| | | .eq(InspectionOrderDetail::getInspectionOrderId, id) |
| | | .eq(InspectionOrderDetail::getJudgmentResult, "fail") |
| | | .eq(InspectionOrderDetail::getDelFlag, 0).list(); |
| | | // List<InspectionOrderDetail> failCount = inspectionOrderDetailService.lambdaQuery() |
| | | // .eq(InspectionOrderDetail::getInspectionOrderId, id) |
| | | // .eq(InspectionOrderDetail::getJudgmentResult, "fail") |
| | | // .eq(InspectionOrderDetail::getDelFlag, 0).list(); |
| | | // |
| | | // List<InspectionOrderDetail> passCount = inspectionOrderDetailService.lambdaQuery() |
| | | // .eq(InspectionOrderDetail::getInspectionOrderId, id) |
| | | // .eq(InspectionOrderDetail::getJudgmentResult,"pass") |
| | | // .eq(InspectionOrderDetail::getDelFlag, 0).list(); |
| | | // record.put("result","正常:"+passCount.size()+","+"异常:"+failCount.size()); |
| | | |
| | | List<InspectionOrderDetail> passCount = inspectionOrderDetailService.lambdaQuery() |
| | | .eq(InspectionOrderDetail::getInspectionOrderId, id) |
| | | .eq(InspectionOrderDetail::getJudgmentResult,"pass") |
| | | .eq(InspectionOrderDetail::getDelFlag, 0).list(); |
| | | record.put("result","正常:"+passCount.size()+","+"异常:"+failCount.size()); |
| | | |
| | | if("5".equals(status) ){ |
| | | record.put("distable",true); |
| | | }else{ |
| | | record.put("distable",false); |
| | | } |
| | | // if("5".equals(status) ){ |
| | | // record.put("distable",true); |
| | | // }else{ |
| | | // record.put("distable",false); |
| | | // } |
| | | } |
| | | return Result.ok(inspectionOrderList); |
| | | } |
| | |
| | | } |
| | | inspectionOrder.setInspectionDeadline(date); |
| | | inspectionOrder.setInspectionStandardType("1"); |
| | | inspectionOrder.setStatus("3");//3:未开始 |
| | | inspectionOrderService.save(inspectionOrder); |
| | | |
| | | String equipmentId = inspectionOrder.getEquipmentId(); |
| | |
| | | equipmentReportRepair.setNum(num); |
| | | equipmentReportRepair.setStatus("1"); |
| | | equipmentReportRepair.setSource("2"); |
| | | equipmentReportRepair.setType("2");//类型(1被动报修,2主动报修) |
| | | equipmentReportRepair.setIsCreateOrder(0); |
| | | equipmentReportRepair.setEquipmentId(inspectionOrder.getEquipmentId()); |
| | | equipmentReportRepair.setFaultDescription(orderDetail.getAbnormalDesc()); |
| | |
| | | } |
| | | } |
| | | inspectionOrder.setActualEndTime(new Date()); |
| | | inspectionOrder.setInspectionOrderUda2(sysUser.getRealname()); |
| | | boolean b = inspectionOrderService.updateById(inspectionOrder); |
| | | if (!b) { |
| | | return Result.error("报工失败!"); |