|
@@ -245,7 +245,7 @@ namespace Business.ResourceExamineManagement
|
|
|
public async Task<PschedDto> ReceiveResult(SeorderentryDto input)
|
|
public async Task<PschedDto> ReceiveResult(SeorderentryDto input)
|
|
|
{
|
|
{
|
|
|
//数据库快照-同步mysql库数据到mongoDB中
|
|
//数据库快照-同步mysql库数据到mongoDB中
|
|
|
- await SyncData(769202);
|
|
|
|
|
|
|
+ await SyncData(input.factoryId);
|
|
|
//生成当前计算bangid
|
|
//生成当前计算bangid
|
|
|
//SnowFlake snow = new SnowFlake();
|
|
//SnowFlake snow = new SnowFlake();
|
|
|
//long bangid = snow.NextId();
|
|
//long bangid = snow.NextId();
|
|
@@ -263,7 +263,7 @@ namespace Business.ResourceExamineManagement
|
|
|
public async Task SyncData(long factoryId)
|
|
public async Task SyncData(long factoryId)
|
|
|
{
|
|
{
|
|
|
//同步物料库存数据
|
|
//同步物料库存数据
|
|
|
- var icitemStokc = _mysql_ic_item_stock.WithDetailsAsync( p => p.factory_id == factoryId).Result.ToListAsync().Result;
|
|
|
|
|
|
|
+ var icitemStokc = _mysql_ic_item_stock.GetListAsync(p => p.factory_id == factoryId).Result;
|
|
|
if (icitemStokc.Count > 0)
|
|
if (icitemStokc.Count > 0)
|
|
|
{
|
|
{
|
|
|
await _ic_item_stock.InsertMany(icitemStokc);
|
|
await _ic_item_stock.InsertMany(icitemStokc);
|