|
|
@ -64,6 +64,22 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase |
|
|
|
int wmsoutm_count = 0; //wmsoutm插入条数
|
|
|
|
int mesout_asd_count = 0; //mesout_asd插入条数
|
|
|
|
|
|
|
|
#region 缴库单 ProductReceipt mesout
|
|
|
|
Logger.LogInformation($"传出缴库单 ProductReceiptNote");//缴库单
|
|
|
|
var productReceiptNoteConvert = workerContext.ServiceProvider.GetRequiredService<ProductReceiptNoteConverter>(); |
|
|
|
var productReceiptNoteList = await productReceiptNoteConvert.ConvertAsync().ConfigureAwait(false); |
|
|
|
var productReceiptNoteWriter = workerContext.ServiceProvider.GetRequiredService<ProductReceiptNoteWriter>();//mesout中间表的服务
|
|
|
|
await productReceiptNoteWriter.WriteAsync(productReceiptNoteList).ConfigureAwait(false); |
|
|
|
Logger.LogInformation($"缴库单-ProductReceipt处理{productReceiptNoteList.Count}条"); |
|
|
|
|
|
|
|
#endregion
|
|
|
|
if (productReceiptNoteList.Count > 0)//如果mesout中有插入数据下边接口不执行
|
|
|
|
{ |
|
|
|
Logger.LogInformation($"mesout处理{productReceiptNoteList.Count}条"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#region 采购单 PurchaseOrder scontrol
|
|
|
|
Logger.LogInformation($"传出采购单 PurchaseOrder");//采购单
|
|
|
|
var purchaseOrderConvert = workerContext.ServiceProvider.GetRequiredService<PurchaseOrderConverter>(); |
|
|
@ -254,10 +270,6 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase |
|
|
|
var wipAdjustNoteList = await wipAdjustNoteConvert.ConvertAsync().ConfigureAwait(false); |
|
|
|
await countadjustWriter.WriteAsync(wipAdjustNoteList).ConfigureAwait(false); |
|
|
|
Logger.LogInformation($"线边仓调整单-WIPAdjust处理{wipAdjustNoteList.Count}条"); |
|
|
|
if (wipAdjustNoteList.Count > 0) |
|
|
|
{ |
|
|
|
mesout_asd_count += wipAdjustNoteList.Count; |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region 回收料调整单 Item_Transform mesout_asd
|
|
|
@ -266,10 +278,6 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase |
|
|
|
var ItemTransformNoteList = await ItemTransformNoteConvert.ConvertAsync().ConfigureAwait(false); |
|
|
|
await countadjustWriter.WriteAsync(ItemTransformNoteList).ConfigureAwait(false); |
|
|
|
Logger.LogInformation($"回收料调整单-Item_Transform处理{ItemTransformNoteList.Count}条"); |
|
|
|
if (ItemTransformNoteList.Count > 0) |
|
|
|
{ |
|
|
|
mesout_asd_count += ItemTransformNoteList.Count; |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region 报废单、线边仓报废单 Scrap mesout_asd
|
|
|
@ -278,27 +286,11 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase |
|
|
|
var scrapNoteList = await scrapNoteConvert.ConvertAsync().ConfigureAwait(false); |
|
|
|
await countadjustWriter.WriteAsync(scrapNoteList).ConfigureAwait(false); |
|
|
|
Logger.LogInformation($"报废单、线边仓报废单-Scrap处理{scrapNoteList.Count}条"); |
|
|
|
if (scrapNoteList.Count > 0) |
|
|
|
{ |
|
|
|
mesout_asd_count += scrapNoteList.Count; |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
|
|
|
|
if (mesout_asd_count > 0)//如果mesout_asd中有插入数据下边接口不执行
|
|
|
|
{ |
|
|
|
Logger.LogInformation($"mesout_asd处理{mesout_asd_count}条"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
#region 缴库单 ProductReceipt mesout
|
|
|
|
Logger.LogInformation($"传出缴库单 ProductReceiptNote");//缴库单
|
|
|
|
var productReceiptNoteConvert = workerContext.ServiceProvider.GetRequiredService<ProductReceiptNoteConverter>(); |
|
|
|
var productReceiptNoteList = await productReceiptNoteConvert.ConvertAsync().ConfigureAwait(false); |
|
|
|
var productReceiptNoteWriter = workerContext.ServiceProvider.GetRequiredService<ProductReceiptNoteWriter>();//mesout中间表的服务
|
|
|
|
await productReceiptNoteWriter.WriteAsync(productReceiptNoteList).ConfigureAwait(false); |
|
|
|
Logger.LogInformation($"缴库单-ProductReceipt处理{productReceiptNoteList.Count}条"); |
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
Logger.LogInformation($"提交: 执行 {Outgoing}"); |
|
|
|
} |
|
|
|