diff --git a/aucma-api/src/main/java/com/aucma/api/controller/PdaBindingController.java b/aucma-api/src/main/java/com/aucma/api/controller/PdaApiController.java similarity index 79% rename from aucma-api/src/main/java/com/aucma/api/controller/PdaBindingController.java rename to aucma-api/src/main/java/com/aucma/api/controller/PdaApiController.java index 7b15936..a95cf74 100644 --- a/aucma-api/src/main/java/com/aucma/api/controller/PdaBindingController.java +++ b/aucma-api/src/main/java/com/aucma/api/controller/PdaApiController.java @@ -22,7 +22,7 @@ import static com.aucma.common.core.domain.AjaxResult.success; */ @RestController @RequestMapping(("/api")) -public class PdaBindingController { +public class PdaApiController { @Autowired private IPdaBindingService service; @@ -37,8 +37,12 @@ public class PdaBindingController { } return error("箱壳条码扫描错误"); } - //条码绑定 + //条码绑定 + @PostMapping("/barCodeBanding") + public AjaxResult barCodeBanding(String boxCode, String innerCode, String loginName) { + return success(); + } @Autowired private IReportQualityInspectionService qualityService; @@ -51,7 +55,7 @@ public class PdaBindingController { for (int i = 0; i < size; i++) { ReportQualityInspection inspection = new ReportQualityInspection(); inspection.setBarCode(checkInfo.getCode()); - inspection.setProcessResult(checkInfo.getMeasure()); + inspection.setTreatmentMeasure(checkInfo.getMeasure()); inspection.setIsLowerLine(checkInfo.getOffline()); inspection.setInspectorCode(checkInfo.getUserName()); inspection.setInspectorTime(new Date()); @@ -67,4 +71,14 @@ public class PdaBindingController { return success(); } + //返修查询质检信息 + @PostMapping("/findCheckInfoByCode") + public AjaxResult findCheckInfoByCode(String code) { + List list= qualityService.findCheckInfoByCode(code); + if (list==null || list.isEmpty()){ + return error("扫描条码不正确"); + } + return success(list); + } + } diff --git a/aucma-api/src/main/resources/mapper/PdaBindingMapper.xml b/aucma-api/src/main/resources/mapper/PdaBindingMapper.xml index 401c0d1..9301035 100644 --- a/aucma-api/src/main/resources/mapper/PdaBindingMapper.xml +++ b/aucma-api/src/main/resources/mapper/PdaBindingMapper.xml @@ -14,7 +14,7 @@ INSERT INTO AUCMA_SCADA.CODE_BINDING (OBJ_ID, BOX_CODE, BOX_NAME, PRODUCT_CODE, BINDING_RESULT, RECORD_TIME1, RECORD_TIME2) - VALUES (SEQ_CODE_BINDING.nextval, #{boxCode}, #{boxName}, #{innerCode}, '成功', SYSDATE, SYSDATE) + VALUES (AUCMA_SCADA.SEQ_CODE_BINDING.nextval, #{boxCode}, #{boxName}, #{innerCode}, '成功', SYSDATE, SYSDATE) \ 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 2492b16..f2aa040 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 @@ -58,4 +58,6 @@ public interface ReportQualityInspectionMapper * @return 结果 */ 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 28ace91..fe93171 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 @@ -58,4 +58,6 @@ public interface IReportQualityInspectionService * @return 结果 */ 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 3fe4a56..31f375b 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 @@ -90,4 +90,11 @@ 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 fab4a47..cf261aa 100644 --- a/aucma-report/src/main/resources/mapper/report/ReportQualityInspectionMapper.xml +++ b/aucma-report/src/main/resources/mapper/report/ReportQualityInspectionMapper.xml @@ -167,4 +167,13 @@ #{objId} + + \ No newline at end of file