调整调用第三方接口代码
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Dynamic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
@@ -19,6 +20,7 @@ using JNPF.DependencyInjection;
|
||||
using JNPF.DynamicApiController;
|
||||
using JNPF.Extras.CollectiveOAuth.Config;
|
||||
using JNPF.FriendlyException;
|
||||
using JNPF.Logging;
|
||||
using JNPF.Systems.Entitys.Dto.Module;
|
||||
using JNPF.Systems.Interfaces.System;
|
||||
using Mapster;
|
||||
@@ -213,6 +215,7 @@ namespace Tnb.WarehouseMgr
|
||||
[HttpPost]
|
||||
public async Task GenTaskExecute()
|
||||
{
|
||||
Stopwatch sw = Stopwatch.StartNew();
|
||||
//获取所有未下发的预任务申请
|
||||
var preTasks = await _db.Queryable<WmsPretaskH>().InnerJoin<WmsCarryH>((a, b) => a.startlocation_id == b.location_id && a.carry_id == b.id)
|
||||
.InnerJoin<WmsAreaH>((a, b, c) => a.area_id == c.id)
|
||||
@@ -316,6 +319,19 @@ namespace Tnb.WarehouseMgr
|
||||
row = await _db.Updateable<WmsPretaskH>().SetColumns(it => new WmsPretaskH { status = WmsWareHouseConst.PRETASK_BILL_STATUS_YXF_ID }).Where(it => preTaskIds.Contains(it.id)).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
//调用AGV创建任务链接口
|
||||
var taskChainCodeDic = disTasks.Where(t => !t.groups.IsNullOrWhiteSpace()).GroupBy(g => g.groups!)
|
||||
.ToDictionary(x => x.Key, x => x.Select(it => new
|
||||
{
|
||||
taskCode = it.bill_code,
|
||||
sourceName = it.startlocation_code,
|
||||
targetName = it.endlocation_code
|
||||
}));
|
||||
|
||||
dynamic reqBody = new ExpandoObject();
|
||||
|
||||
sw.Stop();
|
||||
Log.Information($"程序运行耗时{sw.ElapsedMilliseconds}ms");
|
||||
await _db.Ado.CommitTranAsync();
|
||||
}
|
||||
catch (Exception)
|
||||
|
||||
Reference in New Issue
Block a user