物料导入优化
This commit is contained in:
parent
dddd798ad0
commit
e7e7682a23
|
@ -46,9 +46,14 @@ public class ContractMaterialImportPlugin extends AbstractFormPlugin {
|
|||
Map<BasedataItem, List<Object>> searchResult = e.getSearchResult();
|
||||
for (Map.Entry<BasedataItem, List<Object>> entry : searchResult.entrySet()) {
|
||||
List<Object> 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 {
|
||||
// 查到多个基础资料数据
|
||||
// 业务场景,应根据需求剔除不合法的基础资料数据(最终保留一个)
|
||||
|
|
Loading…
Reference in New Issue