diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/ChainStatusReportingUpInput.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/ChainStatusReportingUpInput.cs
new file mode 100644
index 00000000..2eac52e8
--- /dev/null
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Inputs/ChainStatusReportingUpInput.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tnb.WarehouseMgr.Entities.Dto.Inputs
+{
+ ///
+ /// 创建任务链输入参数
+ ///
+ public class ChainStatusReportingUpInput
+ {
+ ///
+ /// 任务链编号
+ ///
+ public string taskChainCode { get; set; }
+
+ ///
+ /// 任务链任务状态
+ ///
+ public string status { get; set; }
+ }
+}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Outputs/Result.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Outputs/Result.cs
index 1941562b..7e3012bd 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Outputs/Result.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Dto/Outputs/Result.cs
@@ -17,6 +17,10 @@ namespace Tnb.WarehouseMgr.Entities.Dto.Outputs
/// 响应信息
///
public string msg { get; set; }
+ ///
+ /// 错误提示消息
+ ///
+ public string error { get; set; }
public DateTime? timestamp { get; set; }
///
/// 响应数据
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs b/WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs
index fed69881..4929ba7d 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs
@@ -95,7 +95,6 @@ namespace Tnb.WarehouseMgr
///
/// 任务链状态上报
///
- ///
///
[HttpPost, NonUnify]
public async Task TaskChainCallBack(TaskChainCallBackInput input)
@@ -184,7 +183,7 @@ namespace Tnb.WarehouseMgr
return await ToApiResult(HttpStatusCode.InternalServerError, "请重试!");
throw;
}
- return await ToApiResult(HttpStatusCode.OK, "未启用");
+ return await ToApiResult(HttpStatusCode.InternalServerError, "未启用");
}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs
index 5882098a..1f6da2b4 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs
@@ -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;
@@ -214,6 +216,7 @@ namespace Tnb.WarehouseMgr
[HttpPost]
public async Task GenTaskExecute()
{
+ Stopwatch sw = Stopwatch.StartNew();
//获取所有未下发的预任务申请
var preTasks = await _db.Queryable().InnerJoin((a, b) => a.startlocation_id == b.location_id && a.carry_id == b.id)
.InnerJoin((a, b, c) => a.area_id == c.id)
@@ -317,6 +320,19 @@ namespace Tnb.WarehouseMgr
row = await _db.Updateable().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)