using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
using WIDESEA_Common;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Services;
using WIDESEA_Core.Utilities;
using WIDESEA_Entity.CustomModels.RGVModel;
namespace WIDESEA_Services.Services.APIInvoke.RGV
{
public class RGVAPIInvokeSendTask
{
///
/// 给RGV下发任务
///
///
///
public static WebResponseContent SendTaskToRGV(List model)
{
WebResponseContent content = new WebResponseContent();
try
{
content = HttpHelper>.PostHttpRequestDataToRGV(model, APIAddress.RgvIPAddress + APIAddress.SendTaskToRGV);
WIDESEA_Common.Tools.WriteLog.Info("RGV").Write(JsonConvert.SerializeObject(model), "RGV");
if (!content.Status)
throw new Exception($"给RGV下发任务调用失败:" + content.Message);
content.OK(data:content.Data);
}
catch (Exception ex)
{
content.Error(ex.Message);
}
return content;
}
}
}