终端一体化运控平台
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

AGVHelper.cs 50 KiB

2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
2 anos atrás
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Net;
  7. using System.Web;
  8. using Newtonsoft.Json;
  9. using System.Net.Http;
  10. using System.Configuration;
  11. using System.Security.Cryptography;
  12. namespace BPASmartClient.AGV
  13. {
  14. public class AGVHelper
  15. {
  16. public static AGVHelper _Instance { get; set; }
  17. public static AGVHelper GetInstance => _Instance ?? (_Instance = new AGVHelper());
  18. public AGVHelper()
  19. {
  20. }
  21. /// <summary>
  22. /// 获取配置文件信息
  23. /// </summary>
  24. /// <param name="strKey"></param>
  25. /// <returns></returns>
  26. public string GetAppSettingValue(string strKey)
  27. {
  28. string file = System.Environment.CurrentDirectory;
  29. Configuration config = ConfigurationManager.OpenExeConfiguration(file);
  30. foreach (string key in config.AppSettings.Settings.AllKeys)
  31. {
  32. if (key == strKey)
  33. {
  34. return config.AppSettings.Settings[strKey].Value.ToString();
  35. }
  36. }
  37. return null;
  38. }
  39. public string HttpRequest(string url, string head, string body)
  40. {
  41. return PostData(url, head, body);
  42. }
  43. public string PostData(string url, string head, string body)
  44. {
  45. HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
  46. request.Method = "POST";
  47. request.Headers["header"] = head;
  48. request.Proxy = null;
  49. byte[] bytes = Encoding.UTF8.GetBytes(body);
  50. request.ContentType = "application/json; charset=UTF-8"; ;//窗体数据被编码为名称/值对形式
  51. //request.ContentType = "application/json";
  52. request.ContentLength = bytes.Length;
  53. Stream myResponseStream = request.GetRequestStream();
  54. myResponseStream.Write(bytes, 0, bytes.Length);
  55. HttpWebResponse response = (HttpWebResponse)request.GetResponse();
  56. StreamReader myStreamReader = new StreamReader(response.GetResponseStream(), Encoding.UTF8);//解码
  57. string retString = myStreamReader.ReadToEnd();
  58. myStreamReader.Close();
  59. myResponseStream.Close();
  60. if (response != null)
  61. {
  62. response.Close();
  63. }
  64. if (request != null)
  65. {
  66. request.Abort();
  67. }
  68. return retString;//返回响应报文
  69. }
  70. /// <summary>
  71. /// MD5哈希摘要转16进制
  72. /// </summary>
  73. /// <param name="body"></param>
  74. /// <returns></returns>
  75. public string MD5Deal(string body)
  76. {
  77. //如果启用签名 用MD5 哈希摘要 再转16进制
  78. MD5 md5 = MD5.Create();
  79. byte[] bte = md5.ComputeHash(Encoding.UTF8.GetBytes(body));
  80. StringBuilder build = new StringBuilder();
  81. for (int i = 0; i < bte.Length; i++)
  82. {
  83. build.Append(bte[i].ToString("X"));
  84. }
  85. return build.ToString();
  86. }
  87. /// <summary>
  88. /// AGV去1号线体装桶
  89. /// </summary>
  90. /// <returns></returns>
  91. public string AgvToLineOneLoadRoller(string robotJobId)
  92. {
  93. //string url = AGVRequestUrl.GetInstance.TaskSendUrl;
  94. ////请求报文头
  95. //HttpRequestHeaderModel.GetInstance.appKey = "";
  96. //HttpRequestHeaderModel.GetInstance.appSecret = "";
  97. //HttpRequestHeaderModel.GetInstance.requestId = "";
  98. //HttpRequestHeaderModel.GetInstance.timestamp = "";
  99. //HttpRequestHeaderModel.GetInstance.version = "2.8";
  100. //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance);
  101. ////请求报文体
  102. //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供
  103. //AGVModel.GetInstance.warehouseId = 123; //仓库编号
  104. //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级
  105. //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行
  106. //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
  107. ////详细任务数据
  108. ////点到点
  109. //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位
  110. //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位
  111. //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  112. //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互
  113. //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  114. //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互
  115. //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance;
  116. //string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  117. //// string newBody = String.Join(",\r\n", body.Split(','));//格式处理,看需求
  118. ////货位到货位
  119. ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号
  120. ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号
  121. ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  122. ////AGV_SlotRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互
  123. ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  124. ////AGV_SlotRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互
  125. ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance;
  126. ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  127. ////启用签名
  128. ////url = url + "?sign=" + MD5Deal(body);
  129. //string data = HttpRequest(url, head, body);
  130. //object objData = JsonConvert.DeserializeObject(data);
  131. //if (objData != null && objData is HttpResponseBodyModel response)
  132. //{
  133. // return response.code;
  134. //}
  135. return "Analysis Error";
  136. }
  137. /// <summary>
  138. /// AGV去2号线体装桶
  139. /// </summary>
  140. /// <returns></returns>
  141. public string AgvToLineTwoLoadRoller(string robotJobId)
  142. {
  143. //string url = AGVRequestUrl.GetInstance.TaskSendUrl;
  144. ////请求报文头
  145. //HttpRequestHeaderModel.GetInstance.appKey = "";
  146. //HttpRequestHeaderModel.GetInstance.appSecret = "";
  147. //HttpRequestHeaderModel.GetInstance.requestId = "";
  148. //HttpRequestHeaderModel.GetInstance.timestamp = "";
  149. //HttpRequestHeaderModel.GetInstance.version = "2.8";
  150. //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance);
  151. ////请求报文体
  152. //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供
  153. //AGVModel.GetInstance.warehouseId = 123; //仓库编号
  154. //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级
  155. //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行
  156. //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
  157. ////详细任务数据
  158. ////点到点
  159. //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位
  160. //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位
  161. //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  162. //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互
  163. //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  164. //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互
  165. //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance;
  166. //string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  167. ////货位到货位
  168. ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号
  169. ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号
  170. ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  171. ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互
  172. ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  173. ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互
  174. ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance;
  175. ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  176. ////启用签名
  177. ////url = url + "?sign=" + MD5Deal(body);
  178. //string data= HttpRequest(url, head, body);
  179. //object objData = JsonConvert.DeserializeObject(data);
  180. //if (objData != null && objData is HttpResponseBodyModel response)
  181. //{
  182. // return response.code;
  183. //}
  184. return "Analysis Error";
  185. }
  186. /// <summary>
  187. /// AGV去3号线体装桶
  188. /// </summary>
  189. /// <returns></returns>
  190. public string AgvToLineThreeLoadRoller(string robotJobId)
  191. {
  192. //string url = AGVRequestUrl.GetInstance.TaskSendUrl;
  193. ////请求报文头
  194. //HttpRequestHeaderModel.GetInstance.appKey = "";
  195. //HttpRequestHeaderModel.GetInstance.appSecret = "";
  196. //HttpRequestHeaderModel.GetInstance.requestId = "";
  197. //HttpRequestHeaderModel.GetInstance.timestamp = "";
  198. //HttpRequestHeaderModel.GetInstance.version = "2.8";
  199. //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance);
  200. ////请求报文体
  201. //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供
  202. //AGVModel.GetInstance.warehouseId = 123; //仓库编号
  203. //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级
  204. //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行
  205. //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
  206. ////详细任务数据
  207. ////点到点
  208. //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位
  209. //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位
  210. //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  211. //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互
  212. //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  213. //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互
  214. //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance;
  215. //string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  216. ////货位到货位
  217. ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号
  218. ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号
  219. ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  220. ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互
  221. ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  222. ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互
  223. ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance;
  224. ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  225. ////启用签名
  226. ////url = url + "?sign=" + MD5Deal(body);
  227. //string data = HttpRequest(url, head, body);
  228. //object objData = JsonConvert.DeserializeObject(data);
  229. //if (objData != null && objData is HttpResponseBodyModel response)
  230. //{
  231. // return response.code;
  232. //}
  233. return "Analysis Error";
  234. }
  235. /// <summary>
  236. /// AGV从清洗台到4号线体卸桶
  237. /// </summary>
  238. /// <returns></returns>
  239. public string AgvFromCleanToLineFourUnLoadRoller(string robotJobId)
  240. {
  241. //string url = AGVRequestUrl.GetInstance.TaskSendUrl;
  242. ////请求报文头
  243. //HttpRequestHeaderModel.GetInstance.appKey = "";
  244. //HttpRequestHeaderModel.GetInstance.appSecret = "";
  245. //HttpRequestHeaderModel.GetInstance.requestId = "";
  246. //HttpRequestHeaderModel.GetInstance.timestamp = "";
  247. //HttpRequestHeaderModel.GetInstance.version = "2.8";
  248. //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance);
  249. ////请求报文体
  250. //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供
  251. //AGVModel.GetInstance.warehouseId = 123; //仓库编号
  252. //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级
  253. //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行
  254. //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
  255. ////详细任务数据
  256. ////点到点
  257. //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位
  258. //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位
  259. //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  260. //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互
  261. //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  262. //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互
  263. //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance;
  264. //string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  265. ////货位到货位
  266. ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号
  267. ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号
  268. ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  269. ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互
  270. ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  271. ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互
  272. ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance;
  273. ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  274. ////启用签名
  275. ////url = url + "?sign=" + MD5Deal(body);
  276. //string data = HttpRequest(url, head, body);
  277. //object objData = JsonConvert.DeserializeObject(data);
  278. //if (objData != null && objData is HttpResponseBodyModel response)
  279. //{
  280. // return response.code;
  281. //}
  282. return "Analysis Error";
  283. }
  284. /// <summary>
  285. /// AGV离开炒锅1
  286. /// </summary>
  287. /// <returns></returns>
  288. public string AgvLeaveFryPotOne(string robotJobId)
  289. {
  290. //string url = AGVRequestUrl.GetInstance.TaskSendUrl;
  291. ////请求报文头
  292. //HttpRequestHeaderModel.GetInstance.appKey = "";
  293. //HttpRequestHeaderModel.GetInstance.appSecret = "";
  294. //HttpRequestHeaderModel.GetInstance.requestId = "";
  295. //HttpRequestHeaderModel.GetInstance.timestamp = "";
  296. //HttpRequestHeaderModel.GetInstance.version = "2.8";
  297. //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance);
  298. ////请求报文体
  299. //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供
  300. //AGVModel.GetInstance.warehouseId = 123; //仓库编号
  301. //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级
  302. //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行
  303. //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
  304. ////详细任务数据
  305. ////点到点
  306. //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位
  307. //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位
  308. //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  309. //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互
  310. //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  311. //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互
  312. //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance;
  313. //string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  314. ////货位到货位
  315. ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号
  316. ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号
  317. ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  318. ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互
  319. ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  320. ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互
  321. ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance;
  322. ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  323. ////启用签名
  324. ////url = url + "?sign=" + MD5Deal(body);
  325. //string data = HttpRequest(url, head, body);
  326. //object objData = JsonConvert.DeserializeObject(data);
  327. //if (objData != null && objData is HttpResponseBodyModel response)
  328. //{
  329. // return response.code;
  330. //}
  331. return "Analysis Error";
  332. }
  333. /// <summary>
  334. /// AGV离开炒锅2
  335. /// </summary>
  336. /// <returns></returns>
  337. public string AgvLeaveFryPotTwo(string robotJobId)
  338. {
  339. //string url = AGVRequestUrl.GetInstance.TaskSendUrl;
  340. ////请求报文头
  341. //HttpRequestHeaderModel.GetInstance.appKey = "";
  342. //HttpRequestHeaderModel.GetInstance.appSecret = "";
  343. //HttpRequestHeaderModel.GetInstance.requestId = "";
  344. //HttpRequestHeaderModel.GetInstance.timestamp = "";
  345. //HttpRequestHeaderModel.GetInstance.version = "2.8";
  346. //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance);
  347. ////请求报文体
  348. //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供
  349. //AGVModel.GetInstance.warehouseId = 123; //仓库编号
  350. //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级
  351. //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行
  352. //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
  353. ////详细任务数据
  354. ////点到点
  355. //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位
  356. //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位
  357. //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  358. //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互
  359. //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  360. //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互
  361. //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance;
  362. //string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  363. ////货位到货位
  364. ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号
  365. ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号
  366. ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  367. ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互
  368. ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  369. ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互
  370. ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance;
  371. ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  372. ////启用签名
  373. ////url = url + "?sign=" + MD5Deal(body);
  374. //string data = HttpRequest(url, head, body);
  375. //object objData = JsonConvert.DeserializeObject(data);
  376. //if (objData != null && objData is HttpResponseBodyModel response)
  377. //{
  378. // return response.code;
  379. //}
  380. return "Analysis Error";
  381. }
  382. /// <summary>
  383. /// AGV离开炒锅3
  384. /// </summary>
  385. /// <returns></returns>
  386. public string AgvLeaveFryPotThree(string robotJobId)
  387. {
  388. //string url = AGVRequestUrl.GetInstance.TaskSendUrl;
  389. ////请求报文头
  390. //HttpRequestHeaderModel.GetInstance.appKey = "";
  391. //HttpRequestHeaderModel.GetInstance.appSecret = "";
  392. //HttpRequestHeaderModel.GetInstance.requestId = "";
  393. //HttpRequestHeaderModel.GetInstance.timestamp = "";
  394. //HttpRequestHeaderModel.GetInstance.version = "2.8";
  395. //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance);
  396. ////请求报文体
  397. //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供
  398. //AGVModel.GetInstance.warehouseId = 123; //仓库编号
  399. //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级
  400. //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行
  401. //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
  402. ////详细任务数据
  403. ////点到点
  404. //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位
  405. //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位
  406. //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  407. //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互
  408. //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  409. //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互
  410. //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance;
  411. //string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  412. ////货位到货位
  413. ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号
  414. ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号
  415. ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  416. ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互
  417. ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  418. ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互
  419. ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance;
  420. ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  421. ////启用签名
  422. ////url = url + "?sign=" + MD5Deal(body);
  423. //string data = HttpRequest(url, head, body);
  424. //object objData = JsonConvert.DeserializeObject(data);
  425. //if (objData != null && objData is HttpResponseBodyModel response)
  426. //{
  427. // return response.code;
  428. //}
  429. return "Analysis Error";
  430. }
  431. /// <summary>
  432. /// AGV离开炒锅4
  433. /// </summary>
  434. /// <returns></returns>
  435. public string AgvLeaveFryPotFour(string robotJobId)
  436. {
  437. //string url = AGVRequestUrl.GetInstance.TaskSendUrl;
  438. ////请求报文头
  439. //HttpRequestHeaderModel.GetInstance.appKey = "";
  440. //HttpRequestHeaderModel.GetInstance.appSecret = "";
  441. //HttpRequestHeaderModel.GetInstance.requestId = "";
  442. //HttpRequestHeaderModel.GetInstance.timestamp = "";
  443. //HttpRequestHeaderModel.GetInstance.version = "2.8";
  444. //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance);
  445. ////请求报文体
  446. //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供
  447. //AGVModel.GetInstance.warehouseId = 123; //仓库编号
  448. //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级
  449. //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行
  450. //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
  451. ////详细任务数据
  452. ////点到点
  453. //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位
  454. //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位
  455. //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  456. //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互
  457. //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  458. //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互
  459. //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance;
  460. //string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  461. ////货位到货位
  462. ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号
  463. ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号
  464. ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  465. ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互
  466. ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  467. ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互
  468. ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance;
  469. ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  470. ////启用签名
  471. ////url = url + "?sign=" + MD5Deal(body);
  472. //string data = HttpRequest(url, head, body);
  473. //object objData = JsonConvert.DeserializeObject(data);
  474. //if (objData != null && objData is HttpResponseBodyModel response)
  475. //{
  476. // return response.code;
  477. //}
  478. return "Analysis Error";
  479. }
  480. /// <summary>
  481. /// AGV离开炒锅5
  482. /// </summary>
  483. /// <returns></returns>
  484. public string AgvLeaveFryPotFive(string robotJobId)
  485. {
  486. //string url = AGVRequestUrl.GetInstance.TaskSendUrl;
  487. ////请求报文头
  488. //HttpRequestHeaderModel.GetInstance.appKey = "";
  489. //HttpRequestHeaderModel.GetInstance.appSecret = "";
  490. //HttpRequestHeaderModel.GetInstance.requestId = "";
  491. //HttpRequestHeaderModel.GetInstance.timestamp = "";
  492. //HttpRequestHeaderModel.GetInstance.version = "2.8";
  493. //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance);
  494. ////请求报文体
  495. //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供
  496. //AGVModel.GetInstance.warehouseId = 123; //仓库编号
  497. //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级
  498. //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行
  499. //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
  500. ////详细任务数据
  501. ////点到点
  502. //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位
  503. //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位
  504. //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  505. //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互
  506. //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  507. //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互
  508. //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance;
  509. //string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  510. ////货位到货位
  511. ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号
  512. ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号
  513. ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  514. ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互
  515. ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  516. ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互
  517. ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance;
  518. ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  519. ////启用签名
  520. ////url = url + "?sign=" + MD5Deal(body);
  521. //string data = HttpRequest(url, head, body);
  522. //object objData = JsonConvert.DeserializeObject(data);
  523. //if (objData != null && objData is HttpResponseBodyModel response)
  524. //{
  525. // return response.code;
  526. //}
  527. return "Analysis Error";
  528. }
  529. /// <summary>
  530. /// AGV从1号线运空桶洗桶
  531. /// </summary>
  532. /// <returns></returns>
  533. public string AgvLeaveLOneToClean(string robotJobId)
  534. {
  535. //string url = AGVRequestUrl.GetInstance.TaskSendUrl;
  536. ////请求报文头
  537. //HttpRequestHeaderModel.GetInstance.appKey = "";
  538. //HttpRequestHeaderModel.GetInstance.appSecret = "";
  539. //HttpRequestHeaderModel.GetInstance.requestId = "";
  540. //HttpRequestHeaderModel.GetInstance.timestamp = "";
  541. //HttpRequestHeaderModel.GetInstance.version = "2.8";
  542. //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance);
  543. ////请求报文体
  544. //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供
  545. //AGVModel.GetInstance.warehouseId = 123; //仓库编号
  546. //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级
  547. //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行
  548. //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
  549. ////详细任务数据
  550. ////点到点
  551. //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位
  552. //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位
  553. //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  554. //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互
  555. //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  556. //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互
  557. //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance;
  558. //string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  559. ////货位到货位
  560. ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号
  561. ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号
  562. ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  563. ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互
  564. ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  565. ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互
  566. ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance;
  567. ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  568. ////启用签名
  569. ////url = url + "?sign=" + MD5Deal(body);
  570. //string data = HttpRequest(url, head, body);
  571. //object objData = JsonConvert.DeserializeObject(data);
  572. //if (objData != null && objData is HttpResponseBodyModel response)
  573. //{
  574. // return response.code;
  575. //}
  576. return "Analysis Error";
  577. }
  578. /// <summary>
  579. /// AGV从2号线运空桶洗桶
  580. /// </summary>
  581. /// <returns></returns>
  582. public string AgvLeaveLTwoToClean(string robotJobId)
  583. {
  584. //string url = AGVRequestUrl.GetInstance.TaskSendUrl;
  585. ////请求报文头
  586. //HttpRequestHeaderModel.GetInstance.appKey = "";
  587. //HttpRequestHeaderModel.GetInstance.appSecret = "";
  588. //HttpRequestHeaderModel.GetInstance.requestId = "";
  589. //HttpRequestHeaderModel.GetInstance.timestamp = "";
  590. //HttpRequestHeaderModel.GetInstance.version = "2.8";
  591. //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance);
  592. ////请求报文体
  593. //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供
  594. //AGVModel.GetInstance.warehouseId = 123; //仓库编号
  595. //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级
  596. //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行
  597. //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
  598. ////详细任务数据
  599. ////点到点
  600. //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位
  601. //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位
  602. //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  603. //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互
  604. //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  605. //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互
  606. //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance;
  607. //string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  608. ////货位到货位
  609. ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号
  610. ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号
  611. ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  612. ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互
  613. ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  614. ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互
  615. ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance;
  616. ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  617. ////启用签名
  618. ////url = url + "?sign=" + MD5Deal(body);
  619. //string data = HttpRequest(url, head, body);
  620. //object objData = JsonConvert.DeserializeObject(data);
  621. //if (objData != null && objData is HttpResponseBodyModel response)
  622. //{
  623. // return response.code;
  624. //}
  625. return "Analysis Error";
  626. }
  627. /// <summary>
  628. /// AGV从3号线运空桶洗桶
  629. /// </summary>
  630. /// <returns></returns>
  631. public string AgvLeaveLThreeToClean(string robotJobId)
  632. {
  633. //string url = AGVRequestUrl.GetInstance.TaskSendUrl;
  634. ////请求报文头
  635. //HttpRequestHeaderModel.GetInstance.appKey = "";
  636. //HttpRequestHeaderModel.GetInstance.appSecret = "";
  637. //HttpRequestHeaderModel.GetInstance.requestId = "";
  638. //HttpRequestHeaderModel.GetInstance.timestamp = "";
  639. //HttpRequestHeaderModel.GetInstance.version = "2.8";
  640. //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance);
  641. ////请求报文体
  642. //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供
  643. //AGVModel.GetInstance.warehouseId = 123; //仓库编号
  644. //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级
  645. //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行
  646. //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
  647. ////详细任务数据
  648. ////点到点
  649. //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位
  650. //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位
  651. //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  652. //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互
  653. //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  654. //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互
  655. //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance;
  656. //string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  657. ////货位到货位
  658. ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号
  659. ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号
  660. ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  661. ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互
  662. ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  663. ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互
  664. ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance;
  665. ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  666. ////启用签名
  667. ////url = url + "?sign=" + MD5Deal(body);
  668. //string data = HttpRequest(url, head, body);
  669. //object objData = JsonConvert.DeserializeObject(data);
  670. //if (objData != null && objData is HttpResponseBodyModel response)
  671. //{
  672. // return response.code;
  673. //}
  674. return "Analysis Error";
  675. }
  676. /// <summary>
  677. /// AGV从洗桶处运桶到4号洗桶线
  678. /// </summary>
  679. /// <returns></returns>
  680. public string AgvLeaveCleanToLFour(string robotJobId)
  681. {
  682. //string url = AGVRequestUrl.GetInstance.TaskSendUrl;
  683. ////请求报文头
  684. //HttpRequestHeaderModel.GetInstance.appKey = "";
  685. //HttpRequestHeaderModel.GetInstance.appSecret = "";
  686. //HttpRequestHeaderModel.GetInstance.requestId = "";
  687. //HttpRequestHeaderModel.GetInstance.timestamp = "";
  688. //HttpRequestHeaderModel.GetInstance.version = "2.8";
  689. //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance);
  690. ////请求报文体
  691. //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供
  692. //AGVModel.GetInstance.warehouseId = 123; //仓库编号
  693. //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级
  694. //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行
  695. //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE
  696. ////详细任务数据
  697. ////点到点
  698. //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位
  699. //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位
  700. //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  701. //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互
  702. //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  703. //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互
  704. //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance;
  705. //string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  706. ////货位到货位
  707. ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号
  708. ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号
  709. ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料
  710. ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互
  711. ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料
  712. ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互
  713. ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance;
  714. ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance);
  715. ////启用签名
  716. ////url = url + "?sign=" + MD5Deal(body);
  717. //string data = HttpRequest(url, head, body);
  718. //object objData = JsonConvert.DeserializeObject(data);
  719. //if (objData != null && objData is HttpResponseBodyModel response)
  720. //{
  721. // return response.code;
  722. //}
  723. return "Analysis Error";
  724. }
  725. /// <summary>
  726. /// 任务取消
  727. /// </summary>
  728. /// <param name="robotJobId">上游系统任务号,全局唯一</param>
  729. public string CancelJobTask(string robotJobId)
  730. {
  731. string url = AGVRequestUrl.GetInstance.TaskCancelUrl;
  732. //请求报文头
  733. HttpRequestHeaderModel.GetInstance.appKey = "";
  734. HttpRequestHeaderModel.GetInstance.appSecret = "";
  735. HttpRequestHeaderModel.GetInstance.requestId = "";
  736. HttpRequestHeaderModel.GetInstance.timestamp = "";
  737. HttpRequestHeaderModel.GetInstance.version = "2.8";
  738. string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance);
  739. //请求报文体
  740. AGVTaskCancelModel.GetInstance.robotJobId = robotJobId;
  741. AGVTaskCancelModel.GetInstance.warehouseId = 123;//仓库编号
  742. string body = JsonConvert.SerializeObject(AGVTaskCancelModel.GetInstance);
  743. //启用签名
  744. //url = url + "?sign=" + MD5Deal(body);
  745. string data = HttpRequest(url, head, body);
  746. object objData = JsonConvert.DeserializeObject(data);
  747. if (objData != null && objData is HttpResponseBodyModel response)
  748. {
  749. return response.code;
  750. }
  751. return "Analysis Error";
  752. }
  753. /// <summary>
  754. /// 实操任务完成通知
  755. /// </summary>
  756. /// <returns></returns>
  757. public string TaskCompleteNotify(string robotJobId)
  758. {
  759. string url = AGVRequestUrl.GetInstance.TaskCompleteUrl;
  760. //请求报文头
  761. HttpRequestHeaderModel.GetInstance.appKey = "";
  762. HttpRequestHeaderModel.GetInstance.appSecret = "";
  763. HttpRequestHeaderModel.GetInstance.requestId = "";
  764. HttpRequestHeaderModel.GetInstance.timestamp = "";
  765. HttpRequestHeaderModel.GetInstance.version = "2.8";
  766. string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance);
  767. //请求报文体
  768. AGVTaskCompleteNotifyModel.GetInstance.robotJobId = robotJobId;
  769. AGVTaskCompleteNotifyModel.GetInstance.warehouseId = 123;//仓库编号
  770. string body = JsonConvert.SerializeObject(AGVTaskCompleteNotifyModel.GetInstance);
  771. //启用签名
  772. //url = url + "?sign=" + MD5Deal(body);
  773. string data = HttpRequest(url, head, body);
  774. object objData = JsonConvert.DeserializeObject(data);
  775. if (objData != null && objData is HttpResponseBodyModel response)
  776. {
  777. return response.code;
  778. }
  779. return "Analysis Error";
  780. }
  781. /// <summary>
  782. /// AGV上下料交互反馈
  783. /// </summary>
  784. /// <param name="agvCode">AGV编号</param>
  785. /// <param name="jobId">任务编号</param>
  786. /// <param name="msgId">消息编号</param>
  787. /// <returns></returns>
  788. public string UpDownFeedBack(string agvCode, string jobId, string msgId)
  789. {
  790. string url = AGVRequestUrl.GetInstance.TaskCompleteUrl;
  791. //请求报文头
  792. HttpRequestHeaderModel.GetInstance.appKey = "";
  793. HttpRequestHeaderModel.GetInstance.appSecret = "";
  794. HttpRequestHeaderModel.GetInstance.requestId = "";
  795. HttpRequestHeaderModel.GetInstance.timestamp = "";
  796. HttpRequestHeaderModel.GetInstance.version = "2.8";
  797. string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance);
  798. //请求报文体
  799. AGVLoadInteracteModel.GetInstance.agvCode = agvCode;
  800. AGVLoadInteracteModel.GetInstance.jobId = jobId;
  801. AGVLoadInteracteModel.GetInstance.msgId = msgId;
  802. string body = JsonConvert.SerializeObject(AGVLoadInteracteModel.GetInstance);
  803. //启用签名
  804. //url = url + "?sign=" + MD5Deal(body);
  805. string data = HttpRequest(url, head, body);
  806. object objData = JsonConvert.DeserializeObject(data);
  807. if (objData != null && objData is HttpResponseBodyModel response)
  808. {
  809. return response.code;
  810. }
  811. return "Analysis Error";
  812. }
  813. }
  814. }