From 373254447499c6236536d99869259c5cd5bc5602 Mon Sep 17 00:00:00 2001 From: LJW Date: Tue, 19 Nov 2024 08:40:44 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E5=8F=B0=E8=B4=A6):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20=E9=AA=8C=E8=AF=81rfid=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ktg/mes/md/controller/BaseKnifeController.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java b/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java index a55e8f9..0d0b94c 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java @@ -321,7 +321,7 @@ public class BaseKnifeController extends BaseController { // 齐套性检查 AjaxResult ajaxResult = this.checkForAlignment(processCodeList); - if (Integer.parseInt(String.valueOf(ajaxResult.get("code"))) != 200){ + if (Integer.parseInt(String.valueOf(ajaxResult.get("code"))) != 200) { return AjaxResult.error(ajaxResult.get("msg").toString(), ajaxResult.get("data")); } @@ -988,7 +988,15 @@ public class BaseKnifeController extends BaseController { @PreAuthorize("@ss.hasPermi('md:baseKnife:query')") @GetMapping(value = "/isDuplicateRfid/{rfid}") public AjaxResult isDuplicateRfid(@PathVariable("rfid") String rfid) { - return AjaxResult.success(baseKnifeService.isDuplicateRfid(rfid)); + String[] split = rfid.split(","); + // 验证失败的rfid + ArrayList errorList = new ArrayList<>(); + for (String s : split) { + if (baseKnifeService.isDuplicateRfid(rfid)) { + errorList.add(s); + } + } + return AjaxResult.success(errorList); } /**