From b97e72db72c3f6b3750197ce697094f4b1c5d5fc Mon Sep 17 00:00:00 2001 From: wangh <123456> Date: Fri, 24 Nov 2023 16:48:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20-=20=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E6=8F=92=E5=85=A5=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/aucma/api/controller/PdaApiController.java | 9 +++++++++ .../java/com/aucma/api/domain/dto/CheckInfoDto.java | 7 +++++++ .../com/aucma/api/service/impl/PdaServiceImpl.java | 3 ++- .../src/main/resources/mapper/PdaBindingMapper.xml | 10 ++++------ 4 files changed, 22 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 a95cf74..2a8908c 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 @@ -41,6 +41,9 @@ public class PdaApiController { //条码绑定 @PostMapping("/barCodeBanding") public AjaxResult barCodeBanding(String boxCode, String innerCode, String loginName) { +// 查询质检缺陷有没有修复 还没做 +// 查询插入 +// Long objid=service.select return success(); } @@ -51,11 +54,17 @@ public class PdaApiController { @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(); inspection.setBarCode(checkInfo.getCode()); + inspection.setMaterialName(boxName); inspection.setTreatmentMeasure(checkInfo.getMeasure()); + inspection.setProcessResult(checkInfo.getMeasureName()); inspection.setIsLowerLine(checkInfo.getOffline()); inspection.setInspectorCode(checkInfo.getUserName()); inspection.setInspectorTime(new Date()); diff --git a/aucma-api/src/main/java/com/aucma/api/domain/dto/CheckInfoDto.java b/aucma-api/src/main/java/com/aucma/api/domain/dto/CheckInfoDto.java index 6cb1b17..037f77d 100644 --- a/aucma-api/src/main/java/com/aucma/api/domain/dto/CheckInfoDto.java +++ b/aucma-api/src/main/java/com/aucma/api/domain/dto/CheckInfoDto.java @@ -11,6 +11,7 @@ public class CheckInfoDto { private List list;//缺陷列表 private String measure;//处理措施TREATMENT_MEASURE + private String measureName;//处理措施TREATMENT_MEASURE private String offline; private String processCode; private String userName; @@ -39,7 +40,13 @@ public class CheckInfoDto { this.code = code; } + public String getMeasureName() { + return measureName; + } + public void setMeasureName(String measureName) { + this.measureName = measureName; + } public List getList() { return list; 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 3d0ae16..a3b9e50 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 @@ -16,7 +16,8 @@ public class PdaServiceImpl implements IPdaBindingService { @Override public String selectBoxNameByCode(String boxCode) { - return mapper.selectBoxNameByCode(boxCode); + + return mapper.selectBoxNameByCode(boxCode.substring(2,12)); } @Override diff --git a/aucma-api/src/main/resources/mapper/PdaBindingMapper.xml b/aucma-api/src/main/resources/mapper/PdaBindingMapper.xml index 9301035..065365e 100644 --- a/aucma-api/src/main/resources/mapper/PdaBindingMapper.xml +++ b/aucma-api/src/main/resources/mapper/PdaBindingMapper.xml @@ -6,15 +6,13 @@ - INSERT INTO AUCMA_SCADA.CODE_BINDING (OBJ_ID, BOX_CODE, BOX_NAME, PRODUCT_CODE, BINDING_RESULT, RECORD_TIME1, - RECORD_TIME2) - VALUES (AUCMA_SCADA.SEQ_CODE_BINDING.nextval, #{boxCode}, #{boxName}, #{innerCode}, '成功', SYSDATE, SYSDATE) + INSERT INTO AUCMA_SCADA.CODE_BINDING + (OBJ_ID, BOX_CODE, BOX_NAME, LINER_CODE, BINDING_RESULT, RECORD_TIME1) + VALUES (AUCMA_SCADA.SEQ_CODE_BINDING.nextval, #{boxCode}, #{boxName}, #{innerCode}, '成功', SYSDATE) \ No newline at end of file