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 { // 查到多个基础资料数据 // 业务场景,应根据需求剔除不合法的基础资料数据(最终保留一个)