| | |
| | | |
| | | using AutoMapper; |
| | | using Castle.Components.DictionaryAdapter.Xml; |
| | | using HslCommunication; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Microsoft.AspNetCore.Mvc.RazorPages; |
| | | using Microsoft.OpenApi.Any; |
| | |
| | | //æ¯å¦æè´§ |
| | | int StationStatus = conveyorLine.Communicator.Read<ushort>(StationNumProDTO.DeviceProAddress); |
| | | |
| | | //æè´§ï¼å¯è¿ä¿¡å· |
| | | statusValue = ((portStatus == 1 && StationStatus == 1) || (portStatus == 2 && StationStatus == 0)) ? 1 : (portStatus == 0) ? 0 : 0; |
| | | |
| | | if(DeStateName== "G01" || DeStateName == "G06" || DeStateName == "G07") |
| | | { |
| | | //æè´§ï¼å¯è¿ä¿¡å· |
| | | statusValue = (portStatus == 1 && StationStatus == 1) ? 1 : (portStatus == 2 && StationStatus == 0) ?0: (portStatus == 0) ? 0 : 0; |
| | | } |
| | | else |
| | | { |
| | | statusValue = StationStatus == 1 ? 0 : 1; |
| | | } |
| | | portStatusDict[DeStateName] = statusValue; |
| | | } |
| | | |
| | |
| | | int statusValue = 0; |
| | | int portStatus = conveyorLine.Communicator.Read<ushort>(deviceProDTO.DeviceProAddress); |
| | | int StationStatus = conveyorLine.Communicator.Read<ushort>(StationNumProDTO.DeviceProAddress); |
| | | |
| | | //æè´§ï¼å¯è¿ä¿¡å· |
| | | statusValue = ((portStatus == 1 && StationStatus == 1) || (portStatus == 2 && StationStatus == 0)) ? 1 : (portStatus == 0) ? 0 : 0; |
| | | WriteLog.Write_Log("AGVåé¦ä¿¡å·ä¿¡æ¯", "AGVåé¦ä¿¡å·ä¿¡æ¯", $"æ¯å¦å
许è¿å
¥å°åï¼ã{deviceProDTO.DeviceProAddress}ãï¼è¯»åæ°æ®ï¼ã{portStatus}ã\n" + |
| | | $"æ¯å¦æè´§å°åï¼ã{StationNumProDTO.DeviceProAddress}ãï¼è¯»åæ°æ®ï¼ã{StationStatus}ã\n" + |
| | | $"æè´§å¯è¿å
¥ä¿¡å·ï¼ã{statusValue}ã"); |
| | | |
| | | if (statusValue == 1) |
| | | { |
| | | return apiResponse.SuccessResponse(); |
| | |
| | | taskInfo1.taskType = taskType; |
| | | taskInfo1.invType = invType; |
| | | taskInfo1.psd = "akjfapjfpadaoif"; |
| | | |
| | | commandResult = HttpHelper.Post<CommandResult>(urlWMStaskreturn, taskInfo1, "ä»»å¡ç¶æåè°"); |
| | | |
| | | WriteLog.Write_Log("忥ç»ä¸æ¸¸åé¦ä»»å¡å®æ", "ä»»å¡ä¿¡æ¯", $"ä»»å¡å·ï¼{taskId}", $"è°ååæ°ï¼{taskInfo1.ToJson()},è¿ååæ°ï¼{commandResult.ToJson()}"); |
| | | WriteLog.Write_Log("忥ç»ä¸æ¸¸åé¦ä»»å¡å®æ", "ä»»å¡ä¿¡æ¯", $"ä»»å¡å·ï¼{taskId}", $"è°ååæ°ï¼{taskInfo1.ToJsonString()},è¿ååæ°ï¼{commandResult.ToJsonString()}"); |
| | | return commandResult; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Console.WriteLine("è°å䏿¸¸æ¥å£é误ï¼åå ï¼"+ex.Message); |
| | | commandResult.status = "error"; |
| | | commandResult.result = $"WCSæ¥å£é误ï¼åå ï¼{ex.Message}"; |
| | | string resujos = $"WCSæ¥å£é误ï¼åå ï¼{ex.Message}"; |
| | | commandResult.result = resujos.ToJsonString(); |
| | | |
| | | WriteLog.Write_Log("忥ç»ä¸æ¸¸åé¦ä»»å¡å®æ", "ä»»å¡ä¿¡æ¯", $"ä»»å¡å·ï¼{taskId}", $"WCSæ¥å£é误ï¼åå ï¼{ex.Message}"); |
| | | WriteLog.Write_Log("忥ç»ä¸æ¸¸åé¦ä»»å¡å®æ", "ä»»å¡ä¿¡æ¯", $"ä»»å¡å·ï¼{taskId}", $"éè¦ä¸ä¼ WMSä¿¡æ¯å
容ï¼{commandResult.ToJsonString()},WCSæ¥å£é误ï¼åå ï¼{ex.Message}"); |
| | | return commandResult; |
| | | } |
| | | |
| | |
| | | catch (Exception ex) |
| | | { |
| | | commandResult.status = "error"; |
| | | commandResult.result = $"WCSæ¥å£é误ï¼åå ï¼{ex.Message}"; |
| | | string resujos = $"WCSæ¥å£é误ï¼åå ï¼{ex.Message}"; |
| | | commandResult.result = resujos.ToJsonString(); |
| | | |
| | | |
| | | WriteLog.Write_Log("忥ç»ä¸æ¸¸è®¾å¤æ
éä¿¡æ¯", "è®¾å¤æ
éä¿¡æ¯", $"设å¤idï¼{devuuid}ï¼å¤±è´¥", $"WCSæ¥å£é误ï¼åå ï¼{ex.Message}"); |
| | | return commandResult; |
| | |
| | | catch (Exception ex) |
| | | { |
| | | commandResult.status = "error"; |
| | | commandResult.result = $"WCSæ¥å£é误ï¼åå ï¼{ex.Message}"; |
| | | string resujos = $"WCSæ¥å£é误ï¼åå ï¼{ex.Message}"; |
| | | commandResult.result = resujos.ToJsonString(); |
| | | |
| | | WriteLog.Write_Log("忥ç»ä¸æ¸¸æåå°ä½ä¿¡æ¯", "ä¿¡æ¯å
容", $"é误信æ¯", $"WCSæ¥å£é误ï¼åå ï¼{ex.Message}"); |
| | | return commandResult; |
| | | } |