|
|
@@ -539,17 +539,20 @@ namespace Business.ResourceExamineManagement
|
|
|
}
|
|
|
if (_CalcBomViewAppService.mooccupyAllInsertList.Any())
|
|
|
{
|
|
|
+ _CalcBomViewAppService.mooccupyAllInsertList.ForEach(s => { s.tenant_id = param.tenantId; s.factory_id = param.factoryId; });
|
|
|
await _mes_mooccupy.InsertMany(_CalcBomViewAppService.mooccupyAllInsertList);
|
|
|
rtn.mooccupyAllList = _CalcBomViewAppService.mooccupyAllInsertList;
|
|
|
}
|
|
|
if (_CalcBomViewAppService.moentriesInsertList.Any())
|
|
|
{
|
|
|
+ _CalcBomViewAppService.moentriesInsertList.ForEach(s => { s.tenant_id = param.tenantId; s.factory_id = param.factoryId; });
|
|
|
await _mes_moentry.InsertMany(_CalcBomViewAppService.moentriesInsertList);
|
|
|
var mesmoentrys = ObjectMapper.Map<List<mo_mes_moentry>, List<mes_moentry>>(_CalcBomViewAppService.moentriesInsertList);
|
|
|
_businessDbContext.BulkInsert(mesmoentrys);
|
|
|
}
|
|
|
if (_CalcBomViewAppService.orderList.Any())
|
|
|
{
|
|
|
+ _CalcBomViewAppService.orderList.ForEach(s => { s.tenant_id = param.tenantId; s.factory_id = param.factoryId; });
|
|
|
await _mes_oorder.InsertMany(_CalcBomViewAppService.orderList);
|
|
|
var ooders = ObjectMapper.Map<List<mo_mes_oorder>, List<mes_oorder>>(_CalcBomViewAppService.orderList);
|
|
|
_businessDbContext.BulkInsert(ooders);
|
|
|
@@ -557,11 +560,12 @@ namespace Business.ResourceExamineManagement
|
|
|
}
|
|
|
if (sklist.Any())
|
|
|
{
|
|
|
- sklist.ForEach(s => s.id = help.NextId());
|
|
|
+ sklist.ForEach(s => { s.id = help.NextId(); s.tenant_id = param.tenantId; s.factory_id = param.factoryId; });
|
|
|
await _ic_item_stockoccupy.InsertMany(sklist);
|
|
|
}
|
|
|
if (_CalcBomViewAppService.srm_Po_OccupiesInsert.Any())
|
|
|
{
|
|
|
+ _CalcBomViewAppService.srm_Po_OccupiesInsert.ForEach(s => { s.tenant_id = param.tenantId; s.factory_id = param.factoryId; });
|
|
|
await _srm_po_occupy.InsertMany(_CalcBomViewAppService.srm_Po_OccupiesInsert);
|
|
|
}
|
|
|
if (_CalcBomViewAppService.SRMPRDtoList.Any())
|
|
|
@@ -807,11 +811,11 @@ namespace Business.ResourceExamineManagement
|
|
|
{
|
|
|
await _mysql_mes_mooccupy.DeleteManyAsync(mysql_mes_mooccupy);
|
|
|
}
|
|
|
- var srm_pr_main = _mysql_srm_pr_main.GetListAsync(x => soentry_id.Select(p => p.Id).Contains(x.sentry_id.GetValueOrDefault())).Result;
|
|
|
+ /*var srm_pr_main = _mysql_srm_pr_main.GetListAsync(x => soentry_id.Select(p => p.Id).Contains(x.sentry_id.GetValueOrDefault())).Result;
|
|
|
if (srm_pr_main.Count > 0)
|
|
|
{
|
|
|
await _mysql_srm_pr_main.DeleteManyAsync(srm_pr_main);
|
|
|
- }
|
|
|
+ }*/
|
|
|
/*var mes_oorders = _mysql_mes_oorder.GetListAsync(x => soentry_id.Select(p => p.Id).Contains(x.sentry_id.GetValueOrDefault())).Result;
|
|
|
if (mes_oorders.Count > 0)
|
|
|
{
|