更新物料导入
parent
d36ab45654
commit
30b8661f3e
|
|
@ -81,7 +81,6 @@ public class ImportDataServiceImpl implements ImportDataService {
|
|||
private final BigItemService bigItemService;
|
||||
private final BomAccountService bomAccountService;
|
||||
private final BomAccountLogService bomAccountLogService;
|
||||
private final BatchCreateOrUpdate batchCreateOrUpdate;
|
||||
|
||||
@Override
|
||||
public void importBomAccount(int row, Map<String, Object> readAll) {
|
||||
|
|
@ -215,19 +214,19 @@ public class ImportDataServiceImpl implements ImportDataService {
|
|||
//更新物料
|
||||
itemsToUpdate.add(updateItems(item, dept, record));
|
||||
} else {
|
||||
//新增点位
|
||||
//新增物料
|
||||
itemsToInsert.add(createItem(dept, record));
|
||||
}
|
||||
}
|
||||
|
||||
//批量新增物料
|
||||
if (!itemsToInsert.isEmpty()) {
|
||||
batchCreateOrUpdate.batchInsert(itemsToInsert);
|
||||
itemRepository.saveAll(itemsToInsert);
|
||||
}
|
||||
|
||||
//批量更新物料
|
||||
if (!itemsToUpdate.isEmpty()) {
|
||||
batchCreateOrUpdate.batchUpdate(itemsToUpdate);
|
||||
itemRepository.saveAll(itemsToUpdate);
|
||||
}
|
||||
|
||||
return ("导入成功:" + " 新增(" + itemsToInsert.size() + ")修改(" + itemsToUpdate.size() + ")");
|
||||
|
|
|
|||
Loading…
Reference in New Issue