| | |
| | | using Newtonsoft.Json; |
| | | using Quartz; |
| | | using SqlSugar; |
| | | using System.Net; |
| | | using System.Reflection; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_BasicInfoRepository; |
| | |
| | | using WIDESEAWCS_QuartzJob.Service; |
| | | using WIDESEAWCS_SignalR; |
| | | using WIDESEAWCS_Tasks.ConveyorLineJob; |
| | | using WIDESEAWCS_Tasks.StackerCraneJob; |
| | | using ICacheService = WIDESEAWCS_Core.Caches.ICacheService; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | |
| | | conveyorLine.SetValue(ConveyorLineDBName.WheelsDiameter, task.wheels_gkcc, stationInfo.stationChildCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName.WheelsLX, task.WheelsLX, stationInfo.stationChildCode); |
| | | |
| | | conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode); |
| | | |
| | | _taskService.UpdatePosition(task.TaskNum, stationInfo.stationChildCode); |
| | | Dt_Task dt_Task = _taskService.UpdatePosition(task.TaskNum, stationInfo.stationChildCode); |
| | | if (dt_Task != null) |
| | | { |
| | | conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode); |
| | | } |
| | | else |
| | | { |
| | | conveyorLine.SetValue(ConveyorLineDBName.ResponState, 3, stationInfo.stationChildCode); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | var task = _taskService.QueryExecutingTaskByBarcode(command.Number, stationInfo.stationChildCode); |
| | | if (task != null) |
| | | { |
| | | //æ ¹æ®è½¦è½´ç¼åä½ç½® åå
¥å¯¹åºç®æ å°å |
| | | if (task.TargetAddress == stationInfo.stationChildCode) |
| | | if (task.TargetAddress == "2032" || task.TargetAddress == "2042") |
| | | { |
| | | //WebResponseContent content = _taskService.RequestWheelsFlow(task.task_CZInfo).Result; |
| | | |
| | | bool k1 = conveyorLine.SetValue(ConveyorLineDBName.SourceAddress, "2021", stationInfo.stationChildCode); |
| | | |
| | | bool k2 = conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, task.TargetAddress, stationInfo.stationChildCode); |
| | | bool k3 = conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode); |
| | | WebResponseContent k4 = _taskService.UpdateTaskStatusToNext(task); |
| | | |
| | | Console.Out.WriteLine($"读åå°è¾é线ç³è¯·,ç³è¯·æ¡ç ï¼{command.Number}ï¼åé¦è³è¾é线信æ¯====èµ·å§å°åï¼{k1},ç®æ å°åâ{k2},åé¦ä¿¡å·ï¼{k3},ä»»å¡ä¿®æ¹ç¶æï¼{k4.Status}ï¼)"); |
| | | |
| | | } |
| | | else |
| | | { |
| | | WebResponseContent content = _taskService.RequestWheelsFlow(task.PalletCode).Result; |
| | | if (content.Status) |
| | | { |
| | | string taraddress = content.Data.ToString(); // "2032";SourceAddress |
| | | |
| | | bool k1 = conveyorLine.SetValue(ConveyorLineDBName.SourceAddress, "2021", stationInfo.stationChildCode); |
| | | |
| | | bool k2= conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, taraddress, stationInfo.stationChildCode); |
| | | bool k3= conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode); |
| | | |
| | | bool k2 = conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, task.TargetAddress, stationInfo.stationChildCode); |
| | | bool k3 = conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode); |
| | | WebResponseContent k4 = _taskService.UpdateTaskStatusToNext(task); |
| | | |
| | | Console.Out.WriteLine($"读åå°è¾é线ç³è¯·,ç³è¯·æ¡ç ï¼{command.Number}ï¼åé¦è³è¾é线信æ¯====èµ·å§å°åï¼{k1},ç®æ å°åâ{k2},åé¦ä¿¡å·ï¼{k3},ä»»å¡ä¿®æ¹ç¶æï¼{k4.Status}ï¼)"); |
| | |
| | | Console.Out.WriteLine($"读åå°è¾é线ç³è¯·,ç³è¯·æ¡ç ï¼{command.Number}ï¼åWMSç³è¯·å»å失败ï¼åå ï¼{content.Message},åå
¥ç³è¯ä¿¡æ
éï¼2"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | bool k1= conveyorLine.SetValue(ConveyorLineDBName.SourceAddress, "2021", stationInfo.stationChildCode); |
| | | bool k2 = conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, task.TargetAddress, stationInfo.stationChildCode); |
| | | bool k3 = conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode); |
| | | WebResponseContent k4 = _taskService.UpdateTaskStatusToNext(task); |
| | | |
| | | Console.Out.WriteLine($"读åå°è¾é线ç³è¯·,ç³è¯·æ¡ç ï¼{command.Number}ï¼åé¦è³è¾é线信æ¯====èµ·å§å°åï¼{k1},ç®æ å°åâ{k2},åé¦ä¿¡å·ï¼{k3},ä»»å¡ä¿®æ¹ç¶æï¼{k4.Status}ï¼)"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | conveyorLine.SetValue(ConveyorLineDBName.ResponState, 2, stationInfo.stationChildCode); |
| | | Console.Out.WriteLine($"读åå°è¾é线ç³è¯·,ç³è¯·æ¡ç ï¼{command.Number}ï¼æªæ¾å°,åå
¥ç³è¯ä¿¡æ
éï¼2"); |
| | | |
| | | string taraddresspos = _taskService.RequestWheletHty(command.Number); |
| | | if (taraddresspos != null) |
| | | { |
| | | |
| | | bool k1 = conveyorLine.SetValue(ConveyorLineDBName.SourceAddress, "2021", stationInfo.stationChildCode); |
| | | |
| | | bool k2 = conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, taraddresspos, stationInfo.stationChildCode); |
| | | bool k3 = conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode); |
| | | |
| | | Console.Out.WriteLine($"å岿¥è¯¢ä¿¡æ¯ï¼,ç³è¯·æ¡ç ï¼{command.Number}ï¼åé¦è³è¾é线信æ¯====èµ·å§å°åï¼{k1},ç®æ å°åâ{k2},åé¦ä¿¡å·ï¼{k3},åå
¥ç®æ å°å为ï¼{taraddresspos})"); |
| | | } |
| | | else |
| | | { |
| | | conveyorLine.SetValue(ConveyorLineDBName.ResponState, 2, stationInfo.stationChildCode); |
| | | Console.Out.WriteLine($"读åå°è¾é线ç³è¯·,ç³è¯·æ¡ç ï¼{command.Number}ï¼æªæ¾å°ä»»å¡ï¼ç³è¯·ä¸ä¸å°å为ï¼{stationInfo.stationChildCode},åå
¥ç³è¯ä¿¡æ
éï¼2"); |
| | | } |
| | | } |
| | | //_taskService.UpdatePosition(task.TaskNum, stationInfo.stationChildCode); |
| | | } |
| | | |
| | | #region è½¦è½´çº¿äº¤äº |
| | |
| | | if (content.Status) |
| | | { |
| | | conveyorLine.SetValue(ConveyorLineDBName.Number, content.Data.ToString(), stationInfo.stationChildCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName.CarType,"001", stationInfo.stationChildCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName.CarType, "001", stationInfo.stationChildCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode); |
| | | } |
| | | else |
| | |
| | | /// <param name="ProtocalDetailValue">线ä½å½åbool读ååç§»å°å</param> |
| | | public void RequestTakeCZ(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, Dt_StationManager stationInfo) |
| | | { |
| | | |
| | | WebResponseContent content = _taskService.UpdateAxleCurrentStatue(command.Number); |
| | | if (content.Status) |
| | | { |
| | |
| | | { |
| | | DeviceProDTO? deviceProDTOt = conveyorLine.DeviceProDTOs.Find(x => x.DeviceChildCode == "3022" && x.DeviceProParamName == "Number"); |
| | | string Number = conveyorLine.Communicator.Read<string>(deviceProDTOt.DeviceProAddress); |
| | | if (Number != "" && Number!=null) |
| | | if (Number != "" && Number != null) |
| | | { |
| | | //è°åwmsæ¥å£ç³è¯·agvä»»å¡ |
| | | WebResponseContent content = _taskService.GetAGVTaskdistribution(stationInfo.stationLocation); |