|
@@ -4,6 +4,8 @@ using ServiceCenter.WebApi;
|
|
|
using WCS.WorkEngineering.WebApi.Models.AGV;
|
|
|
using WCS.WorkEngineering.WebApi.Models.AGV.Request;
|
|
|
using WCS.WorkEngineering.WebApi.Models.AGV.Response;
|
|
|
+using WCS.WorkEngineering.WebApi.Models.WMS.Request;
|
|
|
+using WCS.WorkEngineering.WebApi.Models.WMS.Response;
|
|
|
|
|
|
namespace WCS.WorkEngineering.WebApi.Controllers
|
|
|
{
|
|
@@ -183,22 +185,18 @@ namespace WCS.WorkEngineering.WebApi.Controllers
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
-
|
|
|
- public static GenAgvSchedulingTaskResponse GenAgvSchedulingTask()
|
|
|
+ /// <summary>
|
|
|
+ /// 取消任务
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="taskCode">AGV任务号</param>
|
|
|
+ /// <returns></returns>
|
|
|
+ /// <exception cref="KnownException"></exception>
|
|
|
+ public static CancelTaskResponse CancelAgvTask(string taskCode)
|
|
|
{
|
|
|
- var res = APICaller.CallApi2<GenAgvSchedulingTaskResponse>(AgvUrl + "/rcms/services/rest/hikRpcService/CancelTaskRequest", new GenAgvSchedulingTaskRequest
|
|
|
+ var res = APICaller.CallApi2<CancelTaskResponse>(AgvUrl + "/rcms/services/rest/hikRpcService/CancelTaskRequest", new CancelTaskRequest
|
|
|
{
|
|
|
- //clientCode = clienCode,
|
|
|
- //ctnrCode = ctnrCode,
|
|
|
- //ctnrTyp = ctnrTyp,
|
|
|
- //interfaceName = "genAgvSchedulingTask",
|
|
|
- //positionCodePath = positionCodePath,
|
|
|
- //priority = priority,
|
|
|
- //reqCode = Guid.NewGuid().ToString().Replace("-", ""),
|
|
|
- //taskCode = taskCode,
|
|
|
- //taskTyp = taskType,
|
|
|
- //hjTaskTy = hjTaskTy,
|
|
|
- //tokenCode = "56898661ea976b748f328cefa6960434",
|
|
|
+ reqCode = Guid.NewGuid().ToString().Replace("-", ""),
|
|
|
+ taskCode = taskCode,
|
|
|
});
|
|
|
if (res.code != AgvResponseCode.Success)
|
|
|
{
|
|
@@ -207,5 +205,19 @@ namespace WCS.WorkEngineering.WebApi.Controllers
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
+ public static SRes CancelAgvTask(List<int> taskNo, int state)
|
|
|
+ {
|
|
|
+ var res = APICaller.CallApi2<SRes>(AgvUrl + "/rcms/services/rest/hikRpcService/CancelTaskRequest", new CancelTaskRequest
|
|
|
+ {
|
|
|
+ //TaskNo = taskNo,
|
|
|
+ //State = state
|
|
|
+ });
|
|
|
+ if (res.ResCode != ResponseStatusCodeEnum.Sucess)
|
|
|
+ {
|
|
|
+ throw new KnownException(res.ResMsg, LogLevelEnum.High);
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|