|
|
@@ -27,7 +27,7 @@ using Volo.Abp.Application.Services;
|
|
|
using Volo.Abp.DependencyInjection;
|
|
|
using Volo.Abp.Domain.Repositories;
|
|
|
using Volo.Abp.MultiTenancy;
|
|
|
-using Z.EntityFramework.Plus;
|
|
|
+using EFCore.BulkExtensions;
|
|
|
using Business.Quartz;
|
|
|
|
|
|
namespace Business.ResourceExamineManagement
|
|
|
@@ -531,7 +531,7 @@ namespace Business.ResourceExamineManagement
|
|
|
{
|
|
|
await _mes_morder.InsertMany(_CalcBomViewAppService.mordersInsertList);
|
|
|
var mesorders = ObjectMapper.Map<List<mo_mes_morder>, List<mes_morder>>(_CalcBomViewAppService.mordersInsertList);
|
|
|
- await _businessDbContext.mes_morder.BulkInsertAsync(mesorders, options => options.InsertKeepIdentity = true);
|
|
|
+ _businessDbContext.BulkInsert(mesorders);
|
|
|
rtn.mordersList = _CalcBomViewAppService.mordersInsertList;
|
|
|
}
|
|
|
if (_CalcBomViewAppService.mooccupyAllInsertList.Any())
|
|
|
@@ -543,13 +543,13 @@ namespace Business.ResourceExamineManagement
|
|
|
{
|
|
|
await _mes_moentry.InsertMany(_CalcBomViewAppService.moentriesList);
|
|
|
var mesmoentrys = ObjectMapper.Map<List<mo_mes_moentry>, List<mes_moentry>>(_CalcBomViewAppService.moentriesList);
|
|
|
- await _businessDbContext.mes_moentry.BulkInsertAsync(mesmoentrys, options => options.InsertKeepIdentity = true);
|
|
|
+ _businessDbContext.BulkInsert(mesmoentrys);
|
|
|
}
|
|
|
if (_CalcBomViewAppService.orderList.Any())
|
|
|
{
|
|
|
await _mes_oorder.InsertMany(_CalcBomViewAppService.orderList);
|
|
|
var ooders = ObjectMapper.Map<List<mo_mes_oorder>, List<mes_oorder>>(_CalcBomViewAppService.orderList);
|
|
|
- await _businessDbContext.mes_oorder.BulkInsertAsync(ooders, options => options.InsertKeepIdentity = true);
|
|
|
+ _businessDbContext.BulkInsert(ooders);
|
|
|
rtn.order_list = _CalcBomViewAppService.orderList;
|
|
|
}
|
|
|
if (sklist.Any())
|
|
|
@@ -576,7 +576,7 @@ namespace Business.ResourceExamineManagement
|
|
|
{
|
|
|
await _srm_pr_main.InsertMany(list);
|
|
|
var pr_mainlist = ObjectMapper.Map<List<mo_srm_pr_main>, List<srm_pr_main>>(list);
|
|
|
- await _businessDbContext.srm_pr_main.BulkInsertAsync(pr_mainlist, options => options.InsertKeepIdentity = true);
|
|
|
+ _businessDbContext.BulkInsert(pr_mainlist);
|
|
|
}
|
|
|
rtn.srm_pr_list = _CalcBomViewAppService.SRMPRDtoList;
|
|
|
}
|
|
|
@@ -654,31 +654,31 @@ namespace Business.ResourceExamineManagement
|
|
|
}
|
|
|
if (examineList.Any())
|
|
|
{
|
|
|
- await _businessBangDbContext.b_examine_result.BulkInsertAsync(examineList, options => options.InsertKeepIdentity = true);
|
|
|
+ _businessBangDbContext.BulkInsert(examineList);
|
|
|
}
|
|
|
if (bomExamineList.Any())
|
|
|
{
|
|
|
- await _businessBangDbContext.b_bom_child_examine.BulkInsertAsync(bomExamineList.OrderBy(s => s.num_order).ToList(), options => options.InsertKeepIdentity = true);
|
|
|
+ _businessBangDbContext.BulkInsert(bomExamineList.OrderBy(s => s.num_order).ToList());
|
|
|
}
|
|
|
if (mooccupyList.Any())
|
|
|
{
|
|
|
- await _businessBangDbContext.b_mo_occupy.BulkInsertAsync(mooccupyList, options => options.InsertKeepIdentity = true);
|
|
|
+ _businessBangDbContext.BulkInsert(mooccupyList);
|
|
|
}
|
|
|
if (moorderList.Any())
|
|
|
{
|
|
|
- await _businessBangDbContext.b_mo_order.BulkInsertAsync(moorderList, options => options.InsertKeepIdentity = true);
|
|
|
+ _businessBangDbContext.BulkInsert(moorderList);
|
|
|
}
|
|
|
if (ooderList.Any())
|
|
|
{
|
|
|
- await _businessBangDbContext.b_ooder.BulkInsertAsync(ooderList, options => options.InsertKeepIdentity = true);
|
|
|
+ _businessBangDbContext.BulkInsert(ooderList);
|
|
|
}
|
|
|
if (purchaseList.Any())
|
|
|
{
|
|
|
- await _businessBangDbContext.b_purchase.BulkInsertAsync(purchaseList, options => options.InsertKeepIdentity = true);
|
|
|
+ _businessBangDbContext.BulkInsert(purchaseList);
|
|
|
}
|
|
|
if (purchaseoccupyList.Any())
|
|
|
{
|
|
|
- await _businessBangDbContext.b_purchase_occupy.BulkInsertAsync(purchaseoccupyList, options => options.InsertKeepIdentity = true);
|
|
|
+ _businessBangDbContext.BulkInsert(purchaseoccupyList);
|
|
|
}
|
|
|
//清空快照数据
|
|
|
await ClearSnapShot(bangid);
|
|
|
@@ -1333,15 +1333,15 @@ namespace Business.ResourceExamineManagement
|
|
|
}
|
|
|
if (examineList.Any())
|
|
|
{
|
|
|
- await _businessBangDbContext.b_order_examine_result.BulkInsertAsync(examineList, options => options.InsertKeepIdentity = true);
|
|
|
+ _businessBangDbContext.BulkInsert(examineList);
|
|
|
}
|
|
|
if (daybulletinboards.Any())
|
|
|
{
|
|
|
- await _businessBangDbContext.b_day_bulletin_board.BulkInsertAsync(daybulletinboards, options => options.InsertKeepIdentity = true);
|
|
|
+ _businessBangDbContext.BulkInsert(daybulletinboards);
|
|
|
}
|
|
|
if (orderDetails.Any())
|
|
|
{
|
|
|
- await _businessBangDbContext.b_order_detail.BulkInsertAsync(orderDetails, options => options.InsertKeepIdentity = true);
|
|
|
+ _businessBangDbContext.BulkInsert(orderDetails);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -1751,11 +1751,12 @@ namespace Business.ResourceExamineManagement
|
|
|
}
|
|
|
if (deleteList.Any())
|
|
|
{
|
|
|
- _businessDbContext.b_bom_pretreatment.BulkDelete(deleteList);
|
|
|
+ _businessDbContext.BulkDelete(deleteList);
|
|
|
}
|
|
|
if (addList.Any())
|
|
|
{
|
|
|
- _businessDbContext.b_bom_pretreatment.BulkInsert(addList, options => options.InsertKeepIdentity = true);
|
|
|
+ _businessDbContext.BulkInsert(addList);
|
|
|
+
|
|
|
//await _mysql_b_bom_pretreatment.InsertManyAsync(addList);
|
|
|
}
|
|
|
}
|