From b221e983d78f0dc04a755097185c3839bc55d928 Mon Sep 17 00:00:00 2001 From: yinq Date: Fri, 5 Jan 2024 15:33:56 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E8=B4=A8=E6=A3=80=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/controller/PdaApiController.java | 19 +++++++++++++++++- .../mapper/report/BoardReportMapper.xml | 20 +++++++++++++------ 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/aucma-api/src/main/java/com/aucma/api/controller/PdaApiController.java b/aucma-api/src/main/java/com/aucma/api/controller/PdaApiController.java index 31e9f7d..debd9f6 100644 --- a/aucma-api/src/main/java/com/aucma/api/controller/PdaApiController.java +++ b/aucma-api/src/main/java/com/aucma/api/controller/PdaApiController.java @@ -3,6 +3,8 @@ package com.aucma.api.controller; import com.aucma.api.domain.dto.CheckInfoDto; import com.aucma.api.domain.dto.RepairSubmitInfoDto; import com.aucma.api.service.IPdaBindingService; +import com.aucma.base.domain.BaseProcessStation; +import com.aucma.base.service.IBaseProcessStationService; import com.aucma.common.core.domain.AjaxResult; import com.aucma.common.utils.StringUtils; import com.aucma.report.domain.ReportQualityInspection; @@ -28,6 +30,9 @@ public class PdaApiController { @Autowired private IPdaBindingService service; + @Autowired + private IBaseProcessStationService baseProcessStationService; + //壳胆绑定-提交 @PostMapping("/boxBanding") public AjaxResult binding(String boxCode, String innerCode, String loginName) { @@ -84,6 +89,9 @@ public class PdaApiController { for (int i = 0; i < size; i++) { ReportQualityInspection inspection = new ReportQualityInspection(); inspection.setBarCode(checkInfo.getCode()); + //检验前一工位是否已完成质检 + + inspection.setMaterialName(checkInfo.getName()); String measure = checkInfo.getMeasure(); inspection.setTreatmentMeasure(measure); @@ -93,12 +101,21 @@ public class PdaApiController { inspection.setInspectorTime(new Date()); inspection.setStationCode(checkInfo.getStationCode()); inspection.setGroupCode(checkInfo.getTeamCode()); + + try { + BaseProcessStation processStation = new BaseProcessStation(); + processStation.setParentId(checkInfo.getStationCode()); + List processStations = baseProcessStationService.selectBaseProcessStationList(processStation); + inspection.setProcessCode(processStations.get(0).getProcessCode()); + } catch (Exception e) { + e.printStackTrace(); + } + assert list != null; if (!list.isEmpty()) { CheckInfoDto.DefectBeen defectBeen = list.get(i); inspection.setSubmitQualtyId(defectBeen.getObjId()); inspection.setTestItemCode(list.get(i).getStationCode()); - inspection.setQualityDefectCode(list.get(i).getQualityDefectCode()); inspection.setQualityDefectName(list.get(i).getQualityDefectName()); } diff --git a/aucma-report/src/main/resources/mapper/report/BoardReportMapper.xml b/aucma-report/src/main/resources/mapper/report/BoardReportMapper.xml index ca9cd7f..d618c21 100644 --- a/aucma-report/src/main/resources/mapper/report/BoardReportMapper.xml +++ b/aucma-report/src/main/resources/mapper/report/BoardReportMapper.xml @@ -62,11 +62,19 @@