´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/AGV/GALAXIS/GALAXISTaskInfo.cs
@@ -13,7 +13,7 @@ { public string groupId { get; set; } public string msgTime { get; set; } public GALAXISTask tasks { get; set; } public List<GALAXISTask> tasks { get; set; } } public class GALAXISTask @@ -34,11 +34,11 @@ /// <summary> /// ä»»å¡åºåºï¼RCSå®ä¹ /// </summary> public string district { get; set; } public string district { get; set; } = "cy"; /// <summary> /// 容å¨ç±»åï¼å¾ å® /// </summary> public int containerType { get; set; } public int containerType { get; set; } = 1; /// <summary> /// 容å¨ç¼å· /// </summary> ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs
@@ -32,6 +32,7 @@ using Microsoft.AspNetCore.Mvc; using WIDESEAWCS_DTO.WMS; using WIDESEAWCS_Common; using WIDESEAWCS_Common.LocationEnum; namespace WIDESEAWCS_ITaskInfoService { @@ -199,5 +200,13 @@ /// <returns></returns> int GetTaskNum(string sequenceName); WebResponseContent UpdateTaskStatus(object TaskDTO, DeviceTypeEnum deviceTypeEnum); /// <summary> /// ä¿®æ¹è´§ä½ç¶æ /// </summary> /// <param name="LocationCode"></param> /// <param name="deviceTypeEnum"></param> /// <param name="locationStatusEnum"></param> /// <returns></returns> WebResponseContent UpdateLocationStatus(string LocationCode, DeviceTypeEnum deviceTypeEnum, LocationStatusEnum locationStatusEnum); } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
@@ -30,7 +30,7 @@ "ApiName": "WIDESEAWCS", "ExpMinutes": 120, "QuartzJobAutoStart": true, "DBSeedEnable": true, "DBSeedEnable": false, "QuartzDBSeedEnable": false, "LogDeubgEnable": true, //æ¯å¦è®°å½è°è¯æ¥å¿ "PrintSql": false, //æå°SQLè¯å¥ ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs
@@ -15,8 +15,9 @@ { public partial class TaskService { #region å¯ä¹å£«ä»»å¡å建 /// <summary> /// åå»ºå ¥åºä»»å¡ /// å建å¯ä¹å£«AGVå ¥åºä»»å¡ /// </summary> /// <param name="taskDTO"></param> /// <returns></returns> @@ -54,7 +55,12 @@ return WebResponseContent.Instance.Error(ex.Message); } } /// <summary> /// å建å¯ä¹å£«AGVåºåºä»»å¡ /// </summary> /// <param name="taskDTO"></param> /// <param name="taskType"></param> /// <returns></returns> public WebResponseContent CreateKLSNewOutTask(TaskDTO taskDTO, int taskType) { try @@ -88,5 +94,96 @@ return WebResponseContent.Instance.Error(ex.Message); } } #endregion #region RGVä»»å¡å建 /// <summary> /// å建ååè½¦å ¥åºä»»å¡ /// </summary> /// <param name="taskDTO"></param> /// <param name="taskType"></param> /// <returns></returns> public WebResponseContent CreateRGVNewInTask(TaskDTO taskDTO, int taskType) { try { Db.Ado.BeginTran(); Db.Ado.CommitTran(); return WebResponseContent.Instance.OK(); } catch (Exception ex) { Db.Ado.RollbackTran(); return WebResponseContent.Instance.Error(ex.Message); } } /// <summary> /// å建åå车åºåºä»»å¡ /// </summary> /// <param name="taskDTO"></param> /// <param name="taskType"></param> /// <returns></returns> public WebResponseContent CreateRGVNewOutTask(TaskDTO taskDTO, int taskType) { try { Db.Ado.BeginTran(); Db.Ado.CommitTran(); return WebResponseContent.Instance.OK(); } catch (Exception ex) { Db.Ado.RollbackTran(); return WebResponseContent.Instance.Error(ex.Message); } } #endregion #region 海康AGVä»»å¡å建 /// <summary> /// å建海康AGVå ¥åºä»»å¡ /// </summary> /// <param name="taskDTO"></param> /// <param name="taskType"></param> /// <returns></returns> public WebResponseContent CreateHKNewInTask(TaskDTO taskDTO, int taskType) { try { Db.Ado.BeginTran(); Db.Ado.CommitTran(); return WebResponseContent.Instance.OK(); } catch (Exception ex) { Db.Ado.RollbackTran(); return WebResponseContent.Instance.Error(ex.Message); } } /// <summary> /// å建海康AGVåºåºä»»å¡ /// </summary> /// <param name="taskDTO"></param> /// <param name="taskType"></param> /// <returns></returns> public WebResponseContent CreateHKNewOutTask(TaskDTO taskDTO, int taskType) { try { Db.Ado.BeginTran(); Db.Ado.CommitTran(); return WebResponseContent.Instance.OK(); } catch (Exception ex) { Db.Ado.RollbackTran(); return WebResponseContent.Instance.Error(ex.Message); } } #endregion } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs
@@ -66,7 +66,7 @@ { throw new Exception(ex.Message); } } } #endregion #region ä»»å¡ç¶æè½¬æ¢ @@ -85,6 +85,7 @@ 6 => TaskStatusEnum.TaskTypeError, 7 => TaskStatusEnum.ParameterError, 8 => TaskStatusEnum.RCSError, 10 => TaskStatusEnum.Takeing, 13 => TaskStatusEnum.Cancel, _ => throw new ArgumentOutOfRangeException( nameof(status), @@ -107,7 +108,7 @@ { throw new Exception(ex.Message); } } } #endregion #region ä»»å¡èµ·ç¹å®æ @@ -133,7 +134,7 @@ Db.Ado.RollbackTran(); throw new Exception(ex.Message); } } } #endregion #region ä»»å¡å®æ @@ -159,7 +160,7 @@ Db.Ado.RollbackTran(); throw new Exception(ex.Message); } } } #endregion #region æ´æ°è´§ä½ç¶æ @@ -211,7 +212,7 @@ { throw new Exception(ex.Message); } } } #endregion } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -86,10 +86,29 @@ { continue; } if (item.taskType == TaskTypeEnum.MLInbound.ObjToInt()) CreateKLSNewInTask(task, item.taskType); else if (item.taskType == TaskTypeEnum.MLOutbound.ObjToInt()) CreateKLSNewOutTask(task, item.taskType); switch (item.taskType) { case (int)TaskTypeEnum.MLInbound: CreateKLSNewInTask(task, item.taskType); break; case (int)TaskTypeEnum.MLOutbound: CreateKLSNewOutTask(task, item.taskType); break; case (int)TaskTypeEnum.CPInbound: CreateRGVNewInTask(task, item.taskType); break; case (int)TaskTypeEnum.CPOutbound: CreateRGVNewOutTask(task, item.taskType); break; case (int)TaskTypeEnum.CJInbound: CreateHKNewInTask(task, item.taskType); break; case (int)TaskTypeEnum.CJOutbound: CreateHKNewOutTask(task, item.taskType); break; default: break; } } } } ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskExtend.cs
@@ -1,10 +1,13 @@ using System; using OfficeOpenXml.FormulaParsing.Excel.Functions.Text; using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; using WIDESEAWCS_Common.TaskEnum; using WIDESEAWCS_Core.Helper; using WIDESEAWCS_DTO; using WIDESEAWCS_Model.Models; namespace WIDESEAWCS_Tasks @@ -19,10 +22,13 @@ { try { var newTask = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == TaskStatusEnum.New.ObjToInt()).ToList(); if (newTask.Count > 0) var newTasks = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == (int)TaskStatusEnum.New).ToList(); if (newTasks.Count > 0) { #region æ¥æ¾å¯ä¹å£«ä»»å¡ var Tasks = newTasks.Where(x => x.TaskType == (int)TaskTypeEnum.MLInbound || x.TaskType == (int)TaskTypeEnum.MLOutbound).ToList(); if (Tasks.Count > 0) SendGALAXISTask(Tasks); #endregion } } catch (Exception ex) @@ -52,7 +58,42 @@ #region ä¸åå¯ä¹å£«AGVä»»å¡ public void SendGALAXISTask(List<Dt_Task> tasks) { GALAXISTaskInfo gALAXISTaskInfo = new GALAXISTaskInfo(); try { gALAXISTaskInfo.groupId = DateTime.Now.ToString("yyMMddHHmmss"); gALAXISTaskInfo.msgTime = DateTime.Now.ToString(); foreach (var task in tasks) { GALAXISTask gALAXISTask = new GALAXISTask() { taskId = task.WMSTaskNum, taskType = task.TaskType == (int)TaskTypeEnum.MLInbound ? 0 : 1, barCode = task.PalletCode, endNode = task.TargetAddress, startNode = task.SourceAddress, priorityCode = task.Grade }; gALAXISTaskInfo.tasks.Add(gALAXISTask); } Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(GALAXISTaskInfo)); if (apiInfo == null) throw new Exception("æªæ¾å°å¯ä¹å£«AGVä»»å¡ä¸åæ¥å£é 置信æ¯ï¼è¯·æ£æ¥æ¥å£é ç½®"); string response = HttpHelper.Post(apiInfo.ApiAddress, gALAXISTaskInfo.Serialize()); GALAXISReturn agvContent = response.DeserializeObject<GALAXISReturn>(); if (agvContent.success) { if (agvContent.data.returnStatus != 0) throw new Exception(agvContent.data.returnInfo); tasks.ForEach(task => { task.TaskState = (int)TaskStatusEnum.Execut; }); _taskService.UpdateData(tasks); } } catch (Exception ex) { WriteError(nameof(TaskJob), ex.Message, ex); } } #endregion ÏîÄ¿×ÊÁÏ/ÓëÉÏÓÎϵͳ½Ó¿ÚÇåµ¥/~$S½Ó¿Ú¶Ô½ÓÎĵµ_V1.1.5.docxBinary files differ
ÏîÄ¿×ÊÁÏ/ÓëÉ豸½»»¥½Ó¿Ú/ËùÐè½Ó¿Ú¼°ÎÊÌâµã.xlsxBinary files differ
ÏîÄ¿×ÊÁÏ/ÍÐÅ̱àÂë/1Â¥ÍÐÅÌ.zipBinary files differ
ÏîÄ¿×ÊÁÏ/ÍÐÅ̱àÂë/´óÁÏÁý.zipBinary files differ
ÏîÄ¿×ÊÁÏ/ÍÐÅ̱àÂë/´óÁÏÏä.zipBinary files differ
ÏîÄ¿×ÊÁÏ/ÍÐÅ̱àÂë/СÁÏÁý.zipBinary files differ
ÏîÄ¿×ÊÁÏ/ÍÐÅ̱àÂë/СÁÏÏä.zipBinary files differ
ÏîÄ¿×ÊÁÏ/ÍÐÅ̱àÂë/ÍÐÅ̱àÂë¹æÔò.xlsxBinary files differ
ÏîÄ¿×ÊÁÏ/ÍÐÅ̱àÂë/תÔ˳µ.zipBinary files differ
ÏîÄ¿×ÊÁÏ/ÐéÄâ»úÕ˺ÅÃÜÂë/07b704884e00843828029c22fded7604.png