From e7e7682a236372cd5c2a18f86ac5d144b04e39da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=B4=B5=E5=BC=BA?= Date: Tue, 4 Mar 2025 13:24:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E5=AF=BC=E5=85=A5=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../formplugin/ContractMaterialImportPlugin.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/main/java/shkd/repc/recon/formplugin/ContractMaterialImportPlugin.java b/main/java/shkd/repc/recon/formplugin/ContractMaterialImportPlugin.java index fbef665..7b844b7 100644 --- a/main/java/shkd/repc/recon/formplugin/ContractMaterialImportPlugin.java +++ b/main/java/shkd/repc/recon/formplugin/ContractMaterialImportPlugin.java @@ -46,9 +46,14 @@ public class ContractMaterialImportPlugin extends AbstractFormPlugin { Map> searchResult = e.getSearchResult(); for (Map.Entry> entry : searchResult.entrySet()) { List basedata = entry.getValue(); - if (basedata.isEmpty()) { // 查不到基础资料数据 - Long materialId = newMaterial(entry.getKey().getSearchValue(),materialList); - basedata.add(materialId); + // 查不到基础资料数据(导入基础资料类型会自动查找) + if (basedata.isEmpty()) { + String entityNumber = entry.getKey().getEntityNumber(); + //只针对物料 + if ("bd_material".equals(entityNumber)){ + Long materialId = newMaterial(entry.getKey().getSearchValue(),materialList); + basedata.add(materialId); + } } else { // 查到多个基础资料数据 // 业务场景,应根据需求剔除不合法的基础资料数据(最终保留一个)