From 90dd2b9a2338f1d8fd3652b64299a7f7f2be1d15 Mon Sep 17 00:00:00 2001 From: lty <876263681@qq.com> Date: 星期六, 24 五月 2025 14:26:26 +0800 Subject: [PATCH] # --- src/main/java/com/zy/third/erp/task/ERPItemService.java | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/zy/third/erp/task/ERPItemService.java b/src/main/java/com/zy/third/erp/task/ERPItemService.java index 58d4f88..945d87c 100644 --- a/src/main/java/com/zy/third/erp/task/ERPItemService.java +++ b/src/main/java/com/zy/third/erp/task/ERPItemService.java @@ -77,10 +77,14 @@ } } } - priTag = tagService.selectByName(itemTB.getItemKind(), 2); - mat = sync(mat, itemTB); + if (!Cools.isEmpty(itemTB.getItemKind())) { + priTag = tagService.selectByName(itemTB.getItemKind(), 2); + } - mat.setTagId(priTag.getId()); + mat = sync(mat, itemTB); + if (priTag!=null){ + mat.setTagId(priTag.getId()); + } mat.setStatus(1); mat.setCreateTime(now); mat.setUpdateTime(now); @@ -98,11 +102,13 @@ } private Mat sync(Mat mat, ItemTB itemTB) { - mat.setUuid(itemTB.getItemId()); - mat.setMatnr(itemTB.getItemCode()); + mat.setModel(itemTB.getItemCode()); + mat.setThreeCode(itemTB.getItemCode()); + mat.setMatnr(itemTB.getItemId()); mat.setMaktx(itemTB.getItemName()); mat.setSpecs(itemTB.getItemSpc()); mat.setUnit(itemTB.getItemUnit()); + mat.setSku(itemTB.getItemPic()); mat.setMemo(itemTB.getRemark()); mat.setCreateTime(itemTB.getMakeDate()); mat.setTemp1(itemTB.getTemp1()); @@ -118,7 +124,7 @@ */ protected void deleteFromMainDatabase(ItemTB itemTB) { EntityWrapper<Mat> matCodeEntityWrapper = new EntityWrapper<>(); - matCodeEntityWrapper.eq("matnr", itemTB.getItemCode()); + matCodeEntityWrapper.eq("matnr", itemTB.getItemId()); matMapper.delete(matCodeEntityWrapper); } -- Gitblit v1.9.1