using Masuit.Tools;
|
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
using Newtonsoft.Json;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using WIDESEA_Comm;
|
using WIDESEA_Comm.AGVInterface.Requset;
|
using WIDESEA_Common;
|
using WIDESEA_Core;
|
using WIDESEA_Model.Models;
|
|
namespace WIDESEA_StoragIntegrationServices
|
{
|
public partial class ToAGVService
|
{
|
/// <summary>
|
///
|
/// </summary>
|
/// <param name="taskinfo"></param>
|
/// <param name="operationType">操作类型(1-绑定 2-解绑)</param>
|
/// <returns></returns>
|
public static WebResponseContent UntieStation(Dt_Task taskinfo, string operationType)
|
{
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
bindCtnrAndBin bind = new bindCtnrAndBin()
|
{
|
reqCode = Guid.NewGuid().ToString().Replace("-", ""),
|
clientCode = "WMS",
|
ctnrTyp = "2",
|
indBind = operationType, // 1-绑定 2-解绑
|
stgBinCode = taskinfo.SourceAddress,
|
};
|
|
string ipaddress = AGV_Interface + "/getCLInfostring";
|
|
var requestBindInfo = bind.ToDictionary();
|
|
var strRespon = HttpsClient.PostAsync(ipaddress, requestBindInfo).Result;
|
|
var responBase = JsonConvert.DeserializeObject<AGVResponBase>(strRespon);
|
if (responBase.code != "0") throw new Exception(responBase.message);
|
|
//todo
|
|
return content.OK();
|
}
|
catch (Exception ex)
|
{
|
return content.Error(ex.Message);
|
}
|
}
|
}
|
|
}
|