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 7186568..221f300 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 @@ -48,7 +48,7 @@ public class PdaApiController { return error("返修中" + countQa + "条未处理,不允许绑定"); } // 查询插入 - return toAjax(service.updateCodeBinding(boxCode,innerCode)); + return toAjax(service.updateCodeBinding(boxCode, innerCode)); } @PostMapping("/selectGoodsName") @@ -63,14 +63,23 @@ public class PdaApiController { @Autowired private IReportQualityInspectionService qualityService; + // 质检查询名称、前工位返修数据 + @PostMapping("/check/select") + public AjaxResult checkSelect(String code) { + String boxName = service.selectBoxNameByCode(code); + if (boxName == null) { + boxName = "固定数据"; +// return error("箱壳条码扫描错误"); + } + List list = service.checkSelectRepairInfo(code); + return success(boxName, list); + + } + // 质检提交 @PostMapping("/checkSubmit") public AjaxResult checkSubmit(@RequestBody CheckInfoDto checkInfo) { List list = checkInfo.getList(); - String boxName = service.selectBoxNameByCode(checkInfo.getCode()); - if (boxName==null) { - return error("箱壳条码扫描错误"); - } int size = (list == null || list.isEmpty()) ? 1 : list.size(); for (int i = 0; i < size; i++) { ReportQualityInspection inspection = new ReportQualityInspection(); @@ -78,7 +87,7 @@ public class PdaApiController { // inspection.setMaterialName(boxName); inspection.setTreatmentMeasure(checkInfo.getMeasure()); inspection.setProcessResult(checkInfo.getMeasureName()); - inspection.setIsLowerLine(checkInfo.getOffline()); + inspection.setInspectorCode(checkInfo.getUserName()); inspection.setInspectorTime(new Date()); assert list != null; @@ -96,21 +105,20 @@ public class PdaApiController { //返修查询质检信息 @PostMapping("/findCheckInfoByCode") public AjaxResult findCheckInfoByCode(String code) { - List list = qualityService.findCheckInfoByCode(code); + List list = service.findCheckInfoByCode(code); if (list == null || list.isEmpty()) { return error("扫描条码不正确"); } return success(list); } - //返修提交质检信息 + //返修提交质检信息 @PostMapping("/submitRepair") public AjaxResult submitRepair(@RequestBody RepairSubmitInfoDto info) { return toAjax(service.submitRepair(info)); } - private AjaxResult toAjax(int rows) { return rows > 0 ? AjaxResult.success() : AjaxResult.error(); } diff --git a/aucma-api/src/main/java/com/aucma/api/mapper/PdaBindingMapper.java b/aucma-api/src/main/java/com/aucma/api/mapper/PdaBindingMapper.java index 40a2b6c..16a9732 100644 --- a/aucma-api/src/main/java/com/aucma/api/mapper/PdaBindingMapper.java +++ b/aucma-api/src/main/java/com/aucma/api/mapper/PdaBindingMapper.java @@ -1,9 +1,12 @@ package com.aucma.api.mapper; import com.aucma.api.domain.dto.RepairSubmitInfoDto; +import com.aucma.report.domain.ReportQualityInspection; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; +import java.util.List; + /** * @author wanghao * @date 2023/11/14 10:16 @@ -21,4 +24,8 @@ public interface PdaBindingMapper { int updateCodeBinding(@Param("boxCode") String boxCode, @Param("innerCode")String innerCode); int submitRepair(@Param("info")RepairSubmitInfoDto info); + + List findCheckInfoByCode(String code); + + List checkSelectRepairInfo(String code); } diff --git a/aucma-api/src/main/java/com/aucma/api/service/IPdaBindingService.java b/aucma-api/src/main/java/com/aucma/api/service/IPdaBindingService.java index 1aa698d..8aca7bc 100644 --- a/aucma-api/src/main/java/com/aucma/api/service/IPdaBindingService.java +++ b/aucma-api/src/main/java/com/aucma/api/service/IPdaBindingService.java @@ -1,6 +1,9 @@ package com.aucma.api.service; import com.aucma.api.domain.dto.RepairSubmitInfoDto; +import com.aucma.report.domain.ReportQualityInspection; + +import java.util.List; /** * @author wanghao @@ -16,4 +19,8 @@ public interface IPdaBindingService { int updateCodeBinding(String boxCode, String innerCode); int submitRepair(RepairSubmitInfoDto info); + + List findCheckInfoByCode(String code); + + List checkSelectRepairInfo(String code); } diff --git a/aucma-api/src/main/java/com/aucma/api/service/impl/PdaServiceImpl.java b/aucma-api/src/main/java/com/aucma/api/service/impl/PdaServiceImpl.java index edd53f6..e1ecd95 100644 --- a/aucma-api/src/main/java/com/aucma/api/service/impl/PdaServiceImpl.java +++ b/aucma-api/src/main/java/com/aucma/api/service/impl/PdaServiceImpl.java @@ -3,9 +3,12 @@ package com.aucma.api.service.impl; import com.aucma.api.domain.dto.RepairSubmitInfoDto; import com.aucma.api.mapper.PdaBindingMapper; import com.aucma.api.service.IPdaBindingService; +import com.aucma.report.domain.ReportQualityInspection; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; + /** * @author wanghao * @date 2023/11/14 9:56 @@ -40,4 +43,14 @@ public class PdaServiceImpl implements IPdaBindingService { public int submitRepair(RepairSubmitInfoDto info) { return mapper.submitRepair(info); } + + @Override + public List findCheckInfoByCode(String code) { + return mapper.findCheckInfoByCode(code); + } + + @Override + public List checkSelectRepairInfo(String code) { + return mapper.checkSelectRepairInfo(code); + } } diff --git a/aucma-api/src/main/resources/mapper/PdaBindingMapper.xml b/aucma-api/src/main/resources/mapper/PdaBindingMapper.xml index 2d2d825..1e1b7c8 100644 --- a/aucma-api/src/main/resources/mapper/PdaBindingMapper.xml +++ b/aucma-api/src/main/resources/mapper/PdaBindingMapper.xml @@ -38,4 +38,24 @@ #{objId} + + + + \ No newline at end of file diff --git a/aucma-report/src/main/java/com/aucma/report/mapper/ReportQualityInspectionMapper.java b/aucma-report/src/main/java/com/aucma/report/mapper/ReportQualityInspectionMapper.java index f2aa040..5acf567 100644 --- a/aucma-report/src/main/java/com/aucma/report/mapper/ReportQualityInspectionMapper.java +++ b/aucma-report/src/main/java/com/aucma/report/mapper/ReportQualityInspectionMapper.java @@ -59,5 +59,5 @@ public interface ReportQualityInspectionMapper */ public int deleteReportQualityInspectionByObjIds(Long[] objIds); - List findCheckInfoByCode(String code); + } diff --git a/aucma-report/src/main/java/com/aucma/report/service/IReportQualityInspectionService.java b/aucma-report/src/main/java/com/aucma/report/service/IReportQualityInspectionService.java index fe93171..fb272e6 100644 --- a/aucma-report/src/main/java/com/aucma/report/service/IReportQualityInspectionService.java +++ b/aucma-report/src/main/java/com/aucma/report/service/IReportQualityInspectionService.java @@ -59,5 +59,5 @@ public interface IReportQualityInspectionService */ public int deleteReportQualityInspectionByObjId(Long objId); - List findCheckInfoByCode(String code); + } diff --git a/aucma-report/src/main/java/com/aucma/report/service/impl/ReportQualityInspectionServiceImpl.java b/aucma-report/src/main/java/com/aucma/report/service/impl/ReportQualityInspectionServiceImpl.java index 31f375b..67937cf 100644 --- a/aucma-report/src/main/java/com/aucma/report/service/impl/ReportQualityInspectionServiceImpl.java +++ b/aucma-report/src/main/java/com/aucma/report/service/impl/ReportQualityInspectionServiceImpl.java @@ -91,10 +91,6 @@ public class ReportQualityInspectionServiceImpl implements IReportQualityInspect return reportQualityInspectionMapper.deleteReportQualityInspectionByObjId(objId); } - @Override - public List findCheckInfoByCode(String code) { - return reportQualityInspectionMapper.findCheckInfoByCode(code); - } } diff --git a/aucma-report/src/main/resources/mapper/report/ReportQualityInspectionMapper.xml b/aucma-report/src/main/resources/mapper/report/ReportQualityInspectionMapper.xml index b7534a3..e46d708 100644 --- a/aucma-report/src/main/resources/mapper/report/ReportQualityInspectionMapper.xml +++ b/aucma-report/src/main/resources/mapper/report/ReportQualityInspectionMapper.xml @@ -168,14 +168,6 @@ - + \ No newline at end of file