From dfd864b4fa92efdb8b75c52ee367fda7fc2d39fa Mon Sep 17 00:00:00 2001 From: yinq Date: Mon, 1 Jul 2024 15:12:29 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E8=B4=A8=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=98=BE=E7=A4=BA=E6=88=90=E5=93=81=E5=9E=8B=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/aucma/api/controller/PdaApiController.java | 4 +++- .../java/com/aucma/api/mapper/PdaBindingMapper.java | 1 + .../com/aucma/api/service/IPdaBindingService.java | 13 +++++++++++++ .../com/aucma/api/service/impl/PdaServiceImpl.java | 8 +++++++- .../src/main/resources/mapper/PdaBindingMapper.xml | 8 ++++++++ 5 files changed, 32 insertions(+), 2 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 2826327..880504c 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 @@ -120,7 +120,9 @@ public class PdaApiController { ReportQualityInspection inspection = new ReportQualityInspection(); inspection.setBarCode(checkInfo.getCode()); - inspection.setMaterialName(checkInfo.getName()); + String boxName = service.selectBoxNameBarCode(checkInfo.getCode()); + inspection.setMaterialName(boxName); + String measure = checkInfo.getMeasure(); inspection.setTreatmentMeasure(measure); if (measure.equals("3")) { 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 d1071d5..ba413a9 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 @@ -72,4 +72,5 @@ public interface PdaBindingMapper { List> messageNotifications(@Param("userName") String userName); + String selectBoxNameBarCode(String boxCode); } 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 c2d40a7..9455eb2 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 @@ -11,8 +11,21 @@ import java.util.List; * @date 2023/11/14 9:56 */ public interface IPdaBindingService { + + /** + * 获取成品码 + * @param boxCode + * @return + */ String selectBoxNameByCode(String boxCode); + /** + * 获取箱体码 + * @param boxCode + * @return + */ + String selectBoxNameBarCode(String boxCode); + int insertBindingInfo(String boxCode, String boxName, String innerCode); int countQualityRecordByCode(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 61f1a41..89d044d 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 @@ -37,8 +37,14 @@ public class PdaServiceImpl implements IPdaBindingService { @Override public String selectBoxNameByCode(String boxCode) { +// mapper.selectBoxNameByCode(boxCode.substring(7,17)); +// select MATERIAL_NAME from BASE_MATERIALINFO where MATERIAL_CODE = #{boxCode} + return mapper.selectBoxNameByCode(boxCode); + } - return mapper.selectBoxNameByCode(boxCode.substring(7,17)); + @Override + public String selectBoxNameBarCode(String boxCode) { + return mapper.selectBoxNameBarCode(boxCode.substring(7,17)); } @Override diff --git a/aucma-api/src/main/resources/mapper/PdaBindingMapper.xml b/aucma-api/src/main/resources/mapper/PdaBindingMapper.xml index 07e7599..ff40d7e 100644 --- a/aucma-api/src/main/resources/mapper/PdaBindingMapper.xml +++ b/aucma-api/src/main/resources/mapper/PdaBindingMapper.xml @@ -6,6 +6,13 @@ + + @@ -108,6 +115,7 @@ AND (rep.INSPECTION_USER_CODE IS NULL OR rep.INSPECTION_USER_CODE NOT LIKE '%' || #{userName} || '%') + UPDATE CODE_BINDING SET PRODUCT_CODE = NULL, RECORD_TIME2 = NULL