| 项目代码/WCSServices/WIDESEAWCS_DTO/Agv/AgvTaskFlowDTO.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| 项目代码/WCSServices/WIDESEAWCS_DTO/Agv/AgvTaskReqContent.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| 项目代码/WCSServices/WIDESEAWCS_DTO/Agv/AgvTaskRequestDTO.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| 项目代码/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| 项目代码/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| 项目代码/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| 项目代码/WCSServices/WIDESEAWCS_Tasks/一期线体/ConveyorLineJob1.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| 项目资料/AGV通信文档/WCS与RCS安全交互接口文档V1.6_11_13.pdf | 补丁 | 查看 | 原始文档 | blame | 历史 | |
| 项目资料/一期对接相关资料/哈尔滨一期输送线对接协议modbusTcp协议V1.1.xlsx | 补丁 | 查看 | 原始文档 | blame | 历史 |
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_DTO/Agv/AgvTaskFlowDTO.cs
@@ -6,6 +6,9 @@ namespace WIDESEAWCS_DTO.Agv { /// <summary> /// AGV任塿¾è¡ /// </summary> public class AgvTaskFlowDTO { /// <summary> ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_DTO/Agv/AgvTaskReqContent.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,65 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WIDESEAWCS_Core; namespace WIDESEAWCS_DTO.Agv { public class DataResult { /// <summary> /// 请æ±ç»æï¼0ãç¦æ¢ï¼1ãå è®¸ï¼ /// </summary> public string Result { get; set; } } /// <summary> /// AGVä»»å¡è¯·æ±è¿å(åæ¾) /// </summary> public class AgvTaskReqContent { /// <summary> /// 请æ±ç¼å· /// </summary> public string ReqCode { get; set; } /// <summary> /// è¿åç , æå 0ï¼å¤±è´¥ 1 /// </summary> public string Code { get; set; } /// <summary> /// success æè å¼å¸¸åå /// </summary> public string Message { get; set; } /// <summary> /// ç»æå¯¹è±¡ /// </summary> public DataResult Data { get; set; } public AgvTaskReqContent() { } public AgvTaskReqContent OK() { Code = "0"; Message = "success"; Data = new DataResult() { Result = "1" }; return this; } public AgvTaskReqContent Error(string message = "") { Code = "1"; Message = message; Data = new DataResult() { Result = "0" }; return this; } } } ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_DTO/Agv/AgvTaskRequestDTO.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,50 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WIDESEAWCS_DTO.Agv { /// <summary> /// AGVä»»å¡è¯·æ±(åæ¾) /// </summary> public class AgvTaskRequestDTO { /// <summary> /// 请æ±ç¼å· /// </summary> public string ReqCode { get; set; } /// <summary> /// è¯·æ±æ¶é´æª /// </summary> public string ReqTime { get; set; } /// <summary> /// ä»»å¡ç¼å· /// </summary> public string TaskId { get; set; } /// <summary> /// æºå¨äººç¼å· /// </summary> public string RobotId { get; set; } /// <summary> /// ä½ç½®ç¼å· /// </summary> public string PositionId { get; set; } /// <summary> /// æç®±ç¼å· /// </summary> public string ContainerCode { get; set; } /// <summary> /// 请æ±èç¹ /// 1ï¼å¸¦è½½è¯·æ±è¿å ¥ï¼èçæè½¦è¿å ¥ï¼ï¼<br/> /// 2ï¼ç©ºè½½è¯·æ±è¿å ¥ï¼ä¸å¸¦æè½¦è¿å ¥ï¼ï¼<br/> /// 3ï¼è¯·æ±ç¦»å¼ï¼<br/> /// 4ï¼è¯·æ±æ¾æï¼<br/> /// 5ï¼è¯·æ±åæï¼<br/> /// 6ï¼éç¥ PLC ææï¼<br/> /// 7ï¼éç¥ PLC æ¥æï¼<br/> /// </summary> public string Action { get; set; } } } ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs
@@ -15,6 +15,7 @@ using WIDESEAWCS_Core.LogHelper; using WIDESEAWCS_DTO; using WIDESEAWCS_DTO.Agv; using WIDESEAWCS_DTO.TaskInfo; using WIDESEAWCS_IBasicInfoRepository; using WIDESEAWCS_ITaskInfoRepository; using WIDESEAWCS_ITaskInfoService; @@ -86,6 +87,73 @@ } return content; } /// <summary> /// AGVä»»å¡è¯·æ± /// </summary> /// <returns></returns> [HttpPost, HttpGet, Route("WorkRequest"), AllowAnonymous] public AgvTaskReqContent WorkRequest([FromBody] AgvTaskRequestDTO agvTaskRequestDTO) { AgvTaskReqContent content = new AgvTaskReqContent(); try { //è·åä»»å¡ Dt_Task? taskExist = _taskRepository.QueryFirst(x=>x.PalletCode==agvTaskRequestDTO.ContainerCode) ?? throw new Exception($"æªæ¾å°æç®±{agvTaskRequestDTO.ContainerCode}ä»»å¡"); //è·åç«å° Dt_StationManger? stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == agvTaskRequestDTO.PositionId) ?? throw new Exception($"æªæ¾å°{agvTaskRequestDTO.PositionId}ç«å°ä½ç½®"); IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode) ?? throw new Exception($"æªæ¾å°å¯¹åºè®¾å¤{stationManger.StationDeviceCode}"); OtherDevice commonConveyorLine = (OtherDevice)device; if (stationManger.StationType==StationTypeEnum.StationType_OnlyOutbound.ObjToInt()) { short IsPut = commonConveyorLine.Communicator.Read<short>("0"); if (IsPut != 256) throw new Exception($"{agvTaskRequestDTO.PositionId}ç¦æ¢æ¾ç®±"); } else { short IsTake = commonConveyorLine.Communicator.Read<short>("11"); if (IsTake != 256) throw new Exception($"{agvTaskRequestDTO.PositionId}ç¦æ¢åç®±"); } content.OK(); } catch (Exception ex) { content.Error(ex.Message); } return content; } /// <summary> /// AGVä½ä¸å®æ /// </summary> /// <returns></returns> [HttpPost, HttpGet, Route("WorkFinish"), AllowAnonymous] public AgvTaskReqContent WorkFinish([FromBody] AgvTaskRequestDTO agvTaskRequestDTO) { AgvTaskReqContent content = new AgvTaskReqContent(); try { //è·åç«å° Dt_StationManger? stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == agvTaskRequestDTO.PositionId) ?? throw new Exception($"æªæ¾å°{agvTaskRequestDTO.PositionId}ç«å°ä½ç½®"); IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode) ?? throw new Exception($"æªæ¾å°å¯¹åºè®¾å¤{stationManger.StationDeviceCode}"); OtherDevice commonConveyorLine = (OtherDevice)device; if (stationManger.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt()) { commonConveyorLine.Communicator.Write("21", (short)256); } else { commonConveyorLine.Communicator.Write("23", (short)256); } content.OK(); } catch (Exception ex) { content.Error(ex.Message); } return content; } } } ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs
@@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using System.Text; using WIDESEAWCS_Common.TaskEnum; using WIDESEAWCS_Core; using WIDESEAWCS_Core.BaseController; @@ -71,6 +72,21 @@ { return WebResponseContent.Instance.Error($"æªæ¾å°å¯¹åºè®¾å¤{stationManger.StationDeviceCode}"); } if (stationManger.StationDeviceCode== "CL1" || stationManger.StationDeviceCode == "CL2") { OtherDevice commonConveyorLine = (OtherDevice)device; byte[] bytesPick = commonConveyorLine.Communicator.Read("12", 5); string PickBarCode = Encoding.UTF8.GetString(bytesPick).Replace("\0", "").Replace("\\0", ""); if (containerFlowDTO.ContainerCode != PickBarCode) throw new Exception($"ä¼ å ¥æç®±ç {containerFlowDTO.ContainerCode}ï¼è¾éæç®±ç {PickBarCode}æ°æ®é误"); if (containerFlowDTO.Direction == "100") { WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode); if (!responseContent.Status) throw new Exception(responseContent.Message); } commonConveyorLine.Communicator.Write("22", (short)(containerFlowDTO.Direction == "100" ? 256 : 512)); } else { CommonConveyorLine commonConveyorLine = (CommonConveyorLine)device; string PickBarCode = commonConveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_PickBarCode, stationManger.StationCode).Trim(); if (containerFlowDTO.ContainerCode!= PickBarCode) throw new Exception($"ä¼ å ¥æç®±ç {containerFlowDTO.ContainerCode}ï¼è¾éæç®±ç {PickBarCode}æ°æ®é误"); @@ -80,6 +96,7 @@ if (!responseContent.Status) throw new Exception(responseContent.Message); } commonConveyorLine.SetValue(ConveyorLineDBName.W_PickToHode,(short)containerFlowDTO.Direction.ObjToInt(), stationManger.StationCode); } content.OK(); } catch (Exception ex) ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -223,7 +223,7 @@ { lock (lock_requestInTask) { Dt_Task task = BaseDal.QueryFirst(x => x.PalletCode == barCode && x.NextAddress == stationCode && x.TaskState == TaskStatusEnum.CL_Executing.ObjToInt()); Dt_Task task = BaseDal.QueryFirst(x => x.PalletCode == barCode && x.TaskType==TaskTypeEnum.Inbound.ObjToInt() && x.NextAddress == stationCode && x.TaskState == TaskStatusEnum.CL_Executing.ObjToInt()); if (task == null) throw new Exception($"{barCode}æç®±æªæ¾å°ä»»å¡!"); Dt_LocationInfo? locationInfo = _locationInfoService.AssignLocation(); if (locationInfo == null) throw new Exception($"å¯ç¨è´§ä½ä¸è¶³!"); ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Tasks/Ò»ÆÚÏßÌå/ConveyorLineJob1.cs
@@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Components.Routing; using Newtonsoft.Json; using OfficeOpenXml.FormulaParsing.Excel.Functions.Math; using OfficeOpenXml.FormulaParsing.Excel.Functions.Text; using Quartz; using System; using System.Collections.Generic; @@ -9,6 +10,7 @@ using System.Linq; using System.Reflection.Metadata; using System.Text; using System.Text.Unicode; using System.Threading.Tasks; using WIDESEAWCS_Common; using WIDESEAWCS_Common.Helper; @@ -54,7 +56,16 @@ _routerService = routerService; _routerExtension = routerExtension; } /* 1å·ä½åºåºå£å 许æ¾ç®± 0 1å·ä½æ¾ç®±å®æä¿¡å· 21 6å·ä½æ£éä½æç®±å°è¾¾ 1 6å·ä½æ£éä½æç®±æ¡ç 2 6å·ä½æ£éä½æç®±æµå¨ 22 8å·ä½å ¥åºå£å 许åç®± 11 8å·ä½å ¥åºå£æç®±æ¡ç 12 8å·ä½æºå¨äººåç®±å®æ 23 */ public Task Execute(IJobExecutionContext context) { try @@ -65,13 +76,59 @@ OtherDevice device = (OtherDevice)value; List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode); foreach (var item in stationMangers) foreach (var station in stationMangers) { byte[] bytesPut = device.Communicator.Read("22", 1); ; device.Communicator.Write("22", new byte[] { 2, 0 }); byte[] bytesPuted = device.Communicator.Read("22",1); device.Communicator.Write("22", new byte[] { 0, 0 }); if (station.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt()) { //æ£éç³è¯· short pickArrived = device.Communicator.Read<short>("1"); if (pickArrived == 256) { byte[] bytesPick = device.Communicator.Read("2", 5); string pickBarCode = Encoding.UTF8.GetString(bytesPick).Replace("\0", "").Replace("\\0", ""); //䏿¥WMSæç®±å°è¾¾ if (pickBarCode.IsNotEmptyOrNull()) { WebResponseContent content = _taskService.WMSPickUp(station.PickStationCode, pickBarCode); if (content.Status) { WriteInfo(device.DeviceCode, $"{station.PickStationCode}æ£éç³è¯·ä¸æ¥æå{pickBarCode}"); } else { WriteError(device.DeviceCode, $"{station.PickStationCode}æ£éç³è¯·ä¸æ¥WMSé误{pickBarCode}ï¼ä¿¡æ¯{content.Message}"); } } else { WriteError(device.DeviceCode, $"{station.PickStationCode}æ£éç³è¯·ä¸º{pickArrived}æ¡ç 为空å¼"); } } } else { //å ¥åºç³è¯· short InTake = device.Communicator.Read<short>("11"); byte[] bytesIn = device.Communicator.Read("12", 5); string InBarCode = Encoding.UTF8.GetString(bytesIn).Replace("\0", "").Replace("\\0", ""); if (InTake==256 && InBarCode.IsNotEmptyOrNull()) { //ç³è¯·å ¥åºä»»å¡ Dt_Task task = _taskRepository.QueryFirst(x => x.PalletCode == InBarCode && x.TaskType == TaskTypeEnum.Inbound.ObjToInt() && x.TaskState != TaskStatusEnum.CL_Executing.ObjToInt()); if (task != null) continue; WebResponseContent content = _taskService.RequestInTask(station.StationCode, InBarCode); if (content.Status) { WriteInfo(device.DeviceCode, $"ç«å°{station.StationCode}æç®±{InBarCode}ç³è¯·å ¥åºæå"); } else { WriteError(device.DeviceCode, $"ç«å°{station.StationCode}æç®±{InBarCode}ç³è¯·å ¥åºä»»å¡é误ï¼ä¿¡æ¯{content.Message}"); } } } } } } ÏîÄ¿×ÊÁÏ/AGVͨÐÅÎĵµ/WCSÓëRCS°²È«½»»¥½Ó¿ÚÎĵµV1.6_11_13.pdfBinary files differ
ÏîÄ¿×ÊÁÏ/Ò»ÆÚ¶Ô½ÓÏà¹Ø×ÊÁÏ/¹þ¶û±õÒ»ÆÚÊäËÍÏß¶Ô½ÓÐÒémodbusTcpÐÒéV1.1.xlsxBinary files differ