From c01dbf7eff7765f9fe39c6effc8fcbdb48271477 Mon Sep 17 00:00:00 2001 From: Leon <3066758958@qq.com> Date: Tue, 14 Sep 2021 13:26:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E4=B8=BB=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=A2=9E=E5=8A=A0=E6=96=B0=E5=BB=BA=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../foreverwin/mesnac/dataimport/handler/ItemHandler.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dataimport/src/main/java/com/foreverwin/mesnac/dataimport/handler/ItemHandler.java b/dataimport/src/main/java/com/foreverwin/mesnac/dataimport/handler/ItemHandler.java index b6c1d5a5..538e0b92 100644 --- a/dataimport/src/main/java/com/foreverwin/mesnac/dataimport/handler/ItemHandler.java +++ b/dataimport/src/main/java/com/foreverwin/mesnac/dataimport/handler/ItemHandler.java @@ -62,9 +62,10 @@ public class ItemHandler extends BaseHandler { jsonObject.put("site", site); ItemFullConfiguration itemFull = ItemWSClient.find(jsonObject); if (itemFull == null) { - resultMessage = ItemWSClient.insert(jsonObject); + resultMessage = "物料主数据不存在"; } else { ItemWSClient.update(jsonObject, itemFull); + return 1; } if (resultMessage != null) { @@ -73,8 +74,6 @@ public class ItemHandler extends BaseHandler { buffer.append("第" + index + "行:" + I18nUtil.getI18nText("MaterData.import.update.fail", params) + "\n"); return 0; } - - return 1; } return 0;