| | |
| | | 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.setActualEndTime(new Date()); |
| | | inspectionOrder.setInspectionOrderUda2(sysUser.getRealname()); |
| | | boolean b = inspectionOrderService.updateById(inspectionOrder); |
| | | if (!b) { |
| | | return Result.error("报工失败!"); |