|
|
|
|
@ -2392,7 +2392,6 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
// 子件订单信息
|
|
|
|
|
WorkOrder prWorkOrder = workOrderMapper.selectById(woId); |
|
|
|
|
YieldOrder yieldOrder = yieldOrderMapper.selectById(prWorkOrder.getYoId()); |
|
|
|
|
// DsPartEntity dsPart = dsPartService.getByPartCode(prWorkOrder.getPjYieldOrder().getPartCode());
|
|
|
|
|
QueryWrapper<DsPartEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("part_code", yieldOrder.getPartCode()); |
|
|
|
|
List<DsPartEntity> dsPartList = partService.list(queryWrapper); |
|
|
|
|
@ -2400,53 +2399,13 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
if (null != dsPartList && dsPartList.size() > 0) { |
|
|
|
|
dsPart = dsPartList.get(0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
obj.put("prWorkOrder", buildWorkOrder(prWorkOrder, yieldOrder)); |
|
|
|
|
obj.put("dsPart", buildDsPart(dsPart)); |
|
|
|
|
// 获取工序
|
|
|
|
|
List<WorkPlan> prWorkPlanList = workPlanMapper.listByWoIdAllMes(prWorkOrder.getId()); |
|
|
|
|
obj.put("prWorkOrder", prWorkOrder); |
|
|
|
|
obj.put("dsPart", dsPart); |
|
|
|
|
List<WorkPlanItem> prWorkPlanItems; |
|
|
|
|
List<PrintChildCheck> printChildCheckList = new ArrayList<>(); |
|
|
|
|
for (WorkPlan prWorkPlan : prWorkPlanList) { |
|
|
|
|
|
|
|
|
|
// // 同槽信息
|
|
|
|
|
// List<QcSlotInfo> slotList = prMacToolUseService.listSjSlotInfo(prWorkPlan.getWpId(), Boolean.FALSE);
|
|
|
|
|
// prWorkPlan.setSlotList(slotList);
|
|
|
|
|
//
|
|
|
|
|
// // 设备绑定记录
|
|
|
|
|
// List<QcProduceRun> prList = qcProduceRunService.listPrByWpId(prWorkPlan.getWpId());
|
|
|
|
|
// prWorkPlan.setPrList(prList);
|
|
|
|
|
|
|
|
|
|
this.getProcessByWp(prWorkPlan); |
|
|
|
|
prWorkPlanItems = workPlanMapper.listByWpIdMes(prWorkPlan.getId()); |
|
|
|
|
if (prWorkPlanItems != null && prWorkPlanItems.size() > 0) { |
|
|
|
|
PrintChildCheck printChildCheck; |
|
|
|
|
for (WorkPlanItem prWorkPlanItem : prWorkPlanItems) { |
|
|
|
|
printChildCheck = new PrintChildCheck(); |
|
|
|
|
// printChildCheck.setTestOrders(prWorkPlanItem.getTrialNo());
|
|
|
|
|
// printChildCheck.setTestName(prWorkPlanItem.getTrialItem());
|
|
|
|
|
// printChildCheck.setTrialStandard(prWorkPlanItem.getTrialStandard());
|
|
|
|
|
printChildCheck.setTestOrders(prWorkPlanItem.getItemCode()); |
|
|
|
|
printChildCheck.setTestName(prWorkPlanItem.getItemName()); |
|
|
|
|
printChildCheck.setTrialStandard(prWorkPlanItem.getStandardName()); |
|
|
|
|
printChildCheck.setCheckResult(prWorkPlanItem.getCheckResult() == -1 ? "未检验" : prWorkPlanItem.getCheckResult() == 1 ? "合格" : |
|
|
|
|
prWorkPlanItem.getCheckResult() == 2 ? "不合格" : prWorkPlanItem.getCheckResult() == 3 ? "NA" : ""); |
|
|
|
|
if (prWorkPlanItem.getCheckUserId() != null) { |
|
|
|
|
R<User> user = userClient.userInfoById(prWorkPlanItem.getCheckUserId()); |
|
|
|
|
if (null != user && null != user.getData()) { |
|
|
|
|
printChildCheck.setCheckName(user.getData().getRealName()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (prWorkPlanItem.getCheckDate() != null) { |
|
|
|
|
printChildCheck.setCheckDate(prWorkPlanItem.getCheckDate().toString()); |
|
|
|
|
} |
|
|
|
|
printChildCheckList.add(printChildCheck); |
|
|
|
|
} |
|
|
|
|
prWorkPlan.setPrintChildCheck(printChildCheckList); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
obj.put("prWorkPlanList", prWorkPlanList); |
|
|
|
|
List<WorkPlanExpandVO> wpList = workPlanMapper.selectExpandByWoId(woId); |
|
|
|
|
obj.put("prWorkPlanList", buildPrWorkPlanList(wpList, prWorkOrder, yieldOrder, dsPart)); |
|
|
|
|
List<JSONObject> checkList = this.getCheckListNotNG(woId, wpList, true); |
|
|
|
|
obj.put("checkList", checkList); |
|
|
|
|
return obj; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -2489,10 +2448,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
JSONObject obj = new JSONObject(); |
|
|
|
|
// 订单信息
|
|
|
|
|
WorkOrder prWorkOrder = workOrderMapper.selectById(woId); |
|
|
|
|
|
|
|
|
|
List<WorkOrder> subPrWorkOrderList = this.checkOrderSj(prWorkOrder); |
|
|
|
|
YieldOrder yieldOrder = yieldOrderMapper.selectById(prWorkOrder.getYoId()); |
|
|
|
|
// DsPartEntity dsPart = dsPartService.getByPartCode(prWorkOrder.getPjYieldOrder().getPartCode());
|
|
|
|
|
QueryWrapper<DsPartEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("part_code", yieldOrder.getPartCode()); |
|
|
|
|
List<DsPartEntity> dsPartList = partService.list(queryWrapper); |
|
|
|
|
@ -2500,13 +2456,56 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
if (null != dsPartList && dsPartList.size() > 0) { |
|
|
|
|
dsPart = dsPartList.get(0); |
|
|
|
|
} |
|
|
|
|
obj.put("prWorkOrder", prWorkOrder); |
|
|
|
|
obj.put("dsPart", dsPart); |
|
|
|
|
obj.put("prWorkOrder", buildWorkOrder(prWorkOrder, yieldOrder)); |
|
|
|
|
obj.put("dsPart", buildDsPart(dsPart)); |
|
|
|
|
List<WorkOrder> subPrWorkOrderList = this.checkOrderSj(prWorkOrder); |
|
|
|
|
obj.put("sunPrWorkOrderList", buildSunPrWorkOrderList(subPrWorkOrderList, dsPart)); |
|
|
|
|
List<WorkPlanExpandVO> wpList = workPlanMapper.selectExpandByWoId(woId); |
|
|
|
|
// 获取工序
|
|
|
|
|
obj.put("prWorkPlanList", buildPrWorkPlanList(wpList, prWorkOrder, yieldOrder, dsPart)); |
|
|
|
|
if (moduleList.get(0)) { |
|
|
|
|
// 审理单记录
|
|
|
|
|
obj.put("qcReviewSheetList", workPlanMapper.getQcReviewSheetListMes(yieldOrder.getPartCode(), yieldOrder.getBatchNo())); |
|
|
|
|
} |
|
|
|
|
List<JSONObject> checkList = this.getCheckListNotNG(woId, wpList, true); |
|
|
|
|
obj.put("checkList", checkList); |
|
|
|
|
return obj; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JSONObject buildDsPart(DsPartEntity dsPart) { |
|
|
|
|
JSONObject dsPartJson = new JSONObject(); |
|
|
|
|
dsPartJson.put("partCode", dsPart.getPartCode()); |
|
|
|
|
dsPartJson.put("partName", dsPart.getPartName()); |
|
|
|
|
dsPartJson.put("lettering", dsPart.getIsPrint()); |
|
|
|
|
dsPartJson.put("cruxMemo", dsPart.getKeyInfo()); |
|
|
|
|
dsPartJson.put("memo", dsPart.getRemarks()); |
|
|
|
|
dsPartJson.put("formingThickness", dsPart.getFormingThickness()); |
|
|
|
|
dsPartJson.put("powderWeight", dsPart.getPowderWeight()); |
|
|
|
|
return dsPartJson; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JSONObject buildWorkOrder(WorkOrder wo, YieldOrder yo) { |
|
|
|
|
JSONObject woJson = new JSONObject(); |
|
|
|
|
JSONObject yoJson = new JSONObject(); |
|
|
|
|
woJson.put("batchNo", wo.getBatchNo()); |
|
|
|
|
woJson.put("woCode", wo.getWoCode()); |
|
|
|
|
woJson.put("makeQty", yo.getYpQty()); |
|
|
|
|
yoJson.put("productType", yo.getProductType()); |
|
|
|
|
yoJson.put("prodIdent", yo.getProductIdent()); |
|
|
|
|
yoJson.put("poQty", wo.getMakeQty()); |
|
|
|
|
yoJson.put("primaryCraft", yo.getPrimaryCraft()); |
|
|
|
|
woJson.put("pjYieldOrder", yoJson); |
|
|
|
|
return woJson; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JSONArray buildSunPrWorkOrderList(List<WorkOrder> subPrWorkOrderList, DsPartEntity dsPart) { |
|
|
|
|
JSONArray sunPrWorkOrderList = new JSONArray(); |
|
|
|
|
DsPartSub dsPartSub; |
|
|
|
|
if (subPrWorkOrderList != null && subPrWorkOrderList.size() > 0) { |
|
|
|
|
for (WorkOrder workOrder : subPrWorkOrderList) { |
|
|
|
|
JSONObject sub = new JSONObject(); |
|
|
|
|
YieldOrder yieldOrder = yieldOrderMapper.selectById(workOrder.getYoId()); |
|
|
|
|
dsPartSub = workPlanMapper.getByPartCodeAndSubCodeMes(dsPart.getPartCode(), yieldOrder.getPartCode()); |
|
|
|
|
if (dsPartSub != null) { |
|
|
|
|
sub.put("batchNo", workOrder.getBatchNo());//批次号
|
|
|
|
|
@ -2522,33 +2521,87 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
sunPrWorkOrderList.add(sub); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
obj.put("sunPrWorkOrderList", sunPrWorkOrderList); |
|
|
|
|
return sunPrWorkOrderList; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 获取工序
|
|
|
|
|
List<WorkPlan> prWorkPlanList = workPlanMapper.listByWoIdAllMes(prWorkOrder.getId()); |
|
|
|
|
List<WorkPlan> newPrWorkPlanList = new ArrayList<>(); |
|
|
|
|
List<WorkPlanItem> prWorkPlanItems; |
|
|
|
|
private JSONArray buildPrWorkPlanList(List<WorkPlanExpandVO> wpList, WorkOrder wo, YieldOrder yo, DsPartEntity dsPart) { |
|
|
|
|
JSONArray prWorkPlanList = new JSONArray(); |
|
|
|
|
List<PrintChildCheck> printChildCheckList; |
|
|
|
|
for (int i = 0; i < prWorkPlanList.size(); i++) { |
|
|
|
|
if (planList.get(i)) { |
|
|
|
|
WorkPlan prWorkPlan = prWorkPlanList.get(i); |
|
|
|
|
this.getProcessByWp(prWorkPlan); |
|
|
|
|
|
|
|
|
|
prWorkPlanItems = workPlanMapper.listByWpIdMes(prWorkPlan.getId()); |
|
|
|
|
|
|
|
|
|
printChildCheckList = new ArrayList<>(); |
|
|
|
|
this.getCheckListDetail(printChildCheckList, prWorkPlanItems, true); |
|
|
|
|
prWorkPlan.setPrintChildCheck(printChildCheckList); |
|
|
|
|
newPrWorkPlanList.add(prWorkPlan); |
|
|
|
|
for (WorkPlanExpandVO workPlan : wpList) { |
|
|
|
|
JSONObject workPlanJson = new JSONObject(); |
|
|
|
|
JSONObject procedureSet = new JSONObject(); |
|
|
|
|
JSONObject receiveMan = new JSONObject(); |
|
|
|
|
procedureSet.put("ppsName", workPlan.getPpsName()); |
|
|
|
|
receiveMan.put("userName", workPlan.getReceiveManName()); |
|
|
|
|
workPlanJson.put("orders", workPlan.getOrders()); |
|
|
|
|
workPlanJson.put("procedureSet", procedureSet); |
|
|
|
|
workPlanJson.put("qualifiedQty", workPlan.getQualifiedQty()); |
|
|
|
|
workPlanJson.put("papers", workPlan.getPapers()); |
|
|
|
|
workPlanJson.put("referenceFile", workPlan.getReferenceFile()); |
|
|
|
|
workPlanJson.put("receiveMan", receiveMan); |
|
|
|
|
if (StringUtils.isEmpty(workPlan.getPapers()) || StringUtils.isEmpty(workPlan.getReferenceFile())) { |
|
|
|
|
AuditFile auditFile = null; |
|
|
|
|
if ("涂色标".equals(workPlan.getPpsName()) || "喷砂".equals(workPlan.getPpsName())) { |
|
|
|
|
auditFile = auditFileMapper.getByPpsId(workPlan.getPpsId()); |
|
|
|
|
} else { |
|
|
|
|
if (wo.getTsId() != null) { |
|
|
|
|
TeamSet teamSet = teamSetService.getById(wo.getTsId()); |
|
|
|
|
String productApplicationArea = null; |
|
|
|
|
if (teamSet != null) { |
|
|
|
|
if (dsPart != null) { |
|
|
|
|
productApplicationArea = dsPart.getProductApplicationArea(); |
|
|
|
|
} |
|
|
|
|
String productIdent = yo.getProductIdent(); |
|
|
|
|
if (StringUtils.isNotEmpty(productApplicationArea) && StringUtils.isNotEmpty(productIdent)) { |
|
|
|
|
auditFile = auditFileMapper.getDataByPpsIdAndApplyArea(workPlan.getPpsId(), teamSet.getWcId(), productApplicationArea, productIdent, workPlan.getCaId()); |
|
|
|
|
} |
|
|
|
|
if (StringUtils.isNotEmpty(productIdent) && auditFile == null) { |
|
|
|
|
auditFile = auditFileMapper.getDataByPpsIdAndPqName(workPlan.getPpsId(), teamSet.getWcId(), productIdent, workPlan.getCaId()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (auditFile != null) { |
|
|
|
|
workPlanJson.put("papers", auditFile.getPapers()); |
|
|
|
|
workPlanJson.put("referenceFile", auditFile.getReferenceFile()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
obj.put("prWorkPlanList", newPrWorkPlanList); |
|
|
|
|
if (moduleList.get(0)) { |
|
|
|
|
// 审理单记录
|
|
|
|
|
// YieldOrder yo = prWorkOrder.getPjYieldOrder();
|
|
|
|
|
obj.put("qcReviewSheetList", workPlanMapper.getQcReviewSheetListMes(yieldOrder.getPartCode(), yieldOrder.getBatchNo())); |
|
|
|
|
} |
|
|
|
|
return obj; |
|
|
|
|
List<MacToolUse> mtuList = workPlanMapper.listMacToolUse(workPlan.getId(), Boolean.FALSE); |
|
|
|
|
if (CollectionUtils.isNotEmpty(mtuList)) { |
|
|
|
|
List<Long> bas = mtuList.stream().map(MacToolUse::getBsFeiBaSet).collect(Collectors.toList()); |
|
|
|
|
List<Long> cards = mtuList.stream().map(MacToolUse::getEquipmentCard).collect(Collectors.toList()); |
|
|
|
|
List<FeiBaSetEntity> basList = feiBaSetService.listByIds(bas); |
|
|
|
|
List<EquipmentEntity> cardList = mesEquipmentCardService.listByIds(cards); |
|
|
|
|
// 设备编号
|
|
|
|
|
String fb = StringUtils.join(basList.stream().filter(j -> j.getFsCode() != null).map(j -> j.getFsCode()).collect(Collectors.toList()), "、"); |
|
|
|
|
String eq = StringUtils.join(cardList.stream().filter(j -> j.getDeviceCode() != null).map(j -> j.getDeviceCode()).collect(Collectors.toList()), "、"); |
|
|
|
|
workPlanJson.put("fbCode", fb); |
|
|
|
|
workPlanJson.put("deviceCode", eq); |
|
|
|
|
} |
|
|
|
|
List<ProduceMonitorSlotListVO> slotList = new ArrayList<>(); |
|
|
|
|
List<MesQcProduceRunEntity> prList = new ArrayList<>(); |
|
|
|
|
workPlanJson.put("totalPrList", prList.size()); |
|
|
|
|
JSONObject tankInfo = new JSONObject(); |
|
|
|
|
workPlanJson.put("slotList", slotList); |
|
|
|
|
workPlanJson.put("prList", prList); |
|
|
|
|
workPlanJson.put("tankInfo", tankInfo); |
|
|
|
|
List<ProduceMonitorFileSlotVO> dsRbFilePreserveSlotList = new ArrayList<>(); |
|
|
|
|
if (WorkPlan.PRINT_TYPE_PROCESS.equals(workPlan.getPrintType())) { |
|
|
|
|
prList = qcProduceRunService.listPrByWpId(workPlan.getId()); |
|
|
|
|
workPlanJson.put("prList", prList); |
|
|
|
|
workPlanJson.put("totalPrList", prList.size()); |
|
|
|
|
slotList = macToolUseService.listSlotInfo(workPlan); |
|
|
|
|
workPlanJson.put("slotList", slotList); |
|
|
|
|
dsRbFilePreserveSlotList = buildDsRbFilePreserveSlotList(workPlan); |
|
|
|
|
} |
|
|
|
|
workPlanJson.put("dsRbFilePreserveSlotList", dsRbFilePreserveSlotList); |
|
|
|
|
List<WorkPlanItem> prWorkPlanItems = workPlanMapper.listByWpIdMes(workPlan.getId()); |
|
|
|
|
printChildCheckList = new ArrayList<>(); |
|
|
|
|
this.getCheckListDetail(printChildCheckList, prWorkPlanItems, true); |
|
|
|
|
workPlanJson.put("printChildCheck", printChildCheckList); |
|
|
|
|
prWorkPlanList.add(workPlanJson); |
|
|
|
|
} |
|
|
|
|
return prWorkPlanList; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public List<PrintChildCheck> getCheckListDetail(List<PrintChildCheck> checkList, List<WorkPlanItem> piLst, Boolean eleOrPrint) { |
|
|
|
|
@ -2684,7 +2737,6 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
if (yieldType == YieldOrderEnum.YIELD_TYPE_4.getCode() || yieldType == YieldOrderEnum.YIELD_TYPE_5.getCode()) { |
|
|
|
|
return this.metalParts(woId); |
|
|
|
|
} else if (yieldType == YieldOrderEnum.YIELD_TYPE_6.getCode()) { // 石墨模
|
|
|
|
|
// return this.graphiteMold(woId);
|
|
|
|
|
return this.metalParts(woId); |
|
|
|
|
} else if (yieldType == YieldOrderEnum.YIELD_TYPE_3.getCode()) { // 玻璃饼
|
|
|
|
|
return this.glassCake(woId); |
|
|
|
|
@ -2822,71 +2874,29 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
|
|
|
|
|
private JSONObject metalParts(Long woId) { |
|
|
|
|
JSONObject obj = new JSONObject(); |
|
|
|
|
// 子件订单信息
|
|
|
|
|
// 订单信息
|
|
|
|
|
WorkOrder prWorkOrder = workOrderMapper.selectById(woId); |
|
|
|
|
// 获取部件订单
|
|
|
|
|
List<WorkOrder> workOrderList = workPlanMapper.findFatherByYoIdMes(prWorkOrder.getYoId()); |
|
|
|
|
|
|
|
|
|
YieldOrder yieldOrder = yieldOrderMapper.selectById(prWorkOrder.getYoId()); |
|
|
|
|
QueryWrapper<DsPartEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("part_code", yieldOrder.getPartCode()); |
|
|
|
|
List<DsPartEntity> dsPartList = partService.list(queryWrapper); |
|
|
|
|
DsPartEntity dsPart = new DsPartEntity(); |
|
|
|
|
if (null != dsPartList && dsPartList.size() > 0) { |
|
|
|
|
dsPart = dsPartList.get(0); |
|
|
|
|
} |
|
|
|
|
obj.put("prWorkOrder", buildWorkOrder(prWorkOrder, yieldOrder)); |
|
|
|
|
// 获取工序
|
|
|
|
|
List<WorkPlan> prWorkPlanList = workPlanMapper.listByWoIdAllMes(prWorkOrder.getId()); |
|
|
|
|
obj.put("prWorkOrder", prWorkOrder); |
|
|
|
|
obj.put("workOrderList", workOrderList); |
|
|
|
|
List<WorkPlanItem> prWorkPlanItems; |
|
|
|
|
List<PrintChildCheck> printChildCheckList = new ArrayList<>(); |
|
|
|
|
for (WorkPlan prWorkPlan : prWorkPlanList) { |
|
|
|
|
QueryWrapper<AuditFile> qw = new QueryWrapper<>(); |
|
|
|
|
qw.eq("WC_ID", prWorkPlan.getId()); |
|
|
|
|
List<AuditFile> auditFileList = auditFileService.list(qw); |
|
|
|
|
if (auditFileList != null && auditFileList.size() > 0) { |
|
|
|
|
prWorkPlan.setAuditFile(auditFileList.get(0)); |
|
|
|
|
} |
|
|
|
|
// 同槽信息
|
|
|
|
|
List<ProduceMonitorSlotListVO> slotList = workPlanMapper.listSjSlotInfoMes(prWorkPlan.getId(), Boolean.FALSE); |
|
|
|
|
|
|
|
|
|
// prWorkPlan.setSlotList(slotList);
|
|
|
|
|
TaskDataDto dto = new TaskDataDto(); |
|
|
|
|
//未取得数据
|
|
|
|
|
// dto.setGjArea();
|
|
|
|
|
// dto.setCdjArea();
|
|
|
|
|
// dto.setPdjArea();
|
|
|
|
|
dto.setSlotList(slotList); |
|
|
|
|
// 2025-07-23 线上迁移修改 删除了prMacToolUseService.listSlotInfo方法调用
|
|
|
|
|
prWorkPlan.setTaskData(dto); |
|
|
|
|
|
|
|
|
|
// 设备绑定记录
|
|
|
|
|
List<MesQcProduceRunEntity> qcProduceRunsList = workPlanMapper.listPrByWpId(prWorkPlan.getId()); |
|
|
|
|
prWorkPlan.setQcProduceRunsList(qcProduceRunsList); |
|
|
|
|
|
|
|
|
|
prWorkPlanItems = workPlanMapper.listByWpIdMes(prWorkPlan.getId()); |
|
|
|
|
if (prWorkPlanItems != null && prWorkPlanItems.size() > 0) { |
|
|
|
|
PrintChildCheck printChildCheck; |
|
|
|
|
for (WorkPlanItem prWorkPlanItem : prWorkPlanItems) { |
|
|
|
|
printChildCheck = new PrintChildCheck(); |
|
|
|
|
// printChildCheck.setTestOrders(prWorkPlanItem.getTrialNo());
|
|
|
|
|
// printChildCheck.setTestName(prWorkPlanItem.getTrialItem());
|
|
|
|
|
// printChildCheck.setTrialStandard(prWorkPlanItem.getTrialStandard());
|
|
|
|
|
|
|
|
|
|
printChildCheck.setTestOrders(prWorkPlanItem.getItemCode()); |
|
|
|
|
printChildCheck.setTestName(prWorkPlanItem.getItemName()); |
|
|
|
|
printChildCheck.setTrialStandard(prWorkPlanItem.getStandardName()); |
|
|
|
|
|
|
|
|
|
printChildCheck.setCheckResult(prWorkPlanItem.getCheckResult() == -1 ? "未检验" : prWorkPlanItem.getCheckResult() == 1 ? "合格" : |
|
|
|
|
prWorkPlanItem.getCheckResult() == 2 ? "不合格" : prWorkPlanItem.getCheckResult() == 3 ? "NA" : ""); |
|
|
|
|
if (prWorkPlanItem.getCheckUserId() != null) { |
|
|
|
|
R<User> user = userClient.userInfoById(prWorkPlanItem.getCheckUserId()); |
|
|
|
|
if (null != user && null != user.getData()) { |
|
|
|
|
printChildCheck.setCheckName(user.getData().getRealName()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (prWorkPlanItem.getCheckDate() != null) { |
|
|
|
|
printChildCheck.setCheckDate(prWorkPlanItem.getCheckDate().toString()); |
|
|
|
|
} |
|
|
|
|
printChildCheckList.add(printChildCheck); |
|
|
|
|
} |
|
|
|
|
prWorkPlan.setPrintChildCheck(printChildCheckList); |
|
|
|
|
} |
|
|
|
|
List<WorkPlanExpandVO> wpList = workPlanMapper.selectExpandByWoId(woId); |
|
|
|
|
obj.put("prWorkPlanList", buildPrWorkPlanList(wpList, prWorkOrder, yieldOrder, dsPart)); |
|
|
|
|
List<JSONObject> checkList = this.getCheckListNotNG(woId, wpList, true); |
|
|
|
|
obj.put("checkList", checkList); |
|
|
|
|
// 获取部件订单
|
|
|
|
|
List<WorkOrder> workOrders = workPlanMapper.findFatherByYoIdMes(prWorkOrder.getYoId()); |
|
|
|
|
JSONArray workOrderList = new JSONArray(); |
|
|
|
|
for (WorkOrder workOrder : workOrders) { |
|
|
|
|
workOrderList.add(buildWorkOrder(workOrder, yieldOrder)); |
|
|
|
|
} |
|
|
|
|
obj.put("prWorkPlanList", prWorkPlanList); |
|
|
|
|
obj.put("workOrderList", workOrderList); |
|
|
|
|
return obj; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -2963,5 +2973,4 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|