物料导入优化
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();
|
Map<BasedataItem, List<Object>> searchResult = e.getSearchResult();
|
||||||
for (Map.Entry<BasedataItem, List<Object>> entry : searchResult.entrySet()) {
|
for (Map.Entry<BasedataItem, List<Object>> entry : searchResult.entrySet()) {
|
||||||
List<Object> basedata = entry.getValue();
|
List<Object> basedata = entry.getValue();
|
||||||
if (basedata.isEmpty()) { // 查不到基础资料数据
|
// 查不到基础资料数据(导入基础资料类型会自动查找)
|
||||||
Long materialId = newMaterial(entry.getKey().getSearchValue(),materialList);
|
if (basedata.isEmpty()) {
|
||||||
basedata.add(materialId);
|
String entityNumber = entry.getKey().getEntityNumber();
|
||||||
|
//只针对物料
|
||||||
|
if ("bd_material".equals(entityNumber)){
|
||||||
|
Long materialId = newMaterial(entry.getKey().getSearchValue(),materialList);
|
||||||
|
basedata.add(materialId);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// 查到多个基础资料数据
|
// 查到多个基础资料数据
|
||||||
// 业务场景,应根据需求剔除不合法的基础资料数据(最终保留一个)
|
// 业务场景,应根据需求剔除不合法的基础资料数据(最终保留一个)
|
||||||
|
|
Loading…
Reference in New Issue