| | |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using System.IO; |
| | | using System.Text; |
| | | using WIDESEA_External.Model; |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | |
| | | // WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode, stationManger.PickStationCode); |
| | | // if (!responseContent.Status) throw new Exception(responseContent.Message); |
| | | //} |
| | | WriteLog.Write_Log("䏿容卿µå¨å
¥åºæ¥å£", "ä»»å¡ä¿¡æ¯", $"è¿åè¾é线{stationManger.PickStationCode}", $"è¿åç»è¾é线çä»»å¡ä¿¡æ¯ï¼{containerFlowDTO.ToJson()}"); |
| | | commonConveyorLine.Communicator.Write("22", (containerFlowDTO.Direction == "100" ? new byte[] { 1, 0 } : new byte[] { 2, 0 })); |
| | | } |
| | | else |
| | | { |
| | | Thread.Sleep(500); |
| | | |
| | | CommonConveyorLine commonConveyorLine = (CommonConveyorLine)device; |
| | | string PickBarCode = commonConveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_PickBarCode, stationManger.StationCode).Trim(); |
| | | |
| | |
| | | if (containerFlowDTO.Direction == "100") |
| | | { |
| | | short W_PickToHode = commonConveyorLine.GetValue<ConveyorLineDBName, short>(ConveyorLineDBName.W_PickToHode, stationManger.StationCode); |
| | | if (W_PickToHode == 300) |
| | | if (W_PickToHode != 300) |
| | | { |
| | | WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode, stationManger.PickStationCode); |
| | | if (!responseContent.Status) throw new Exception(responseContent.Message); |
| | | commonConveyorLine.SetValue(ConveyorLineDBName.W_PickToHode, (short)300, stationManger.StationCode); |
| | | WriteLog.Write_Log("äºæå®¹å¨æµå¨å
¥åºæ¥å£", "ä»»å¡ä¿¡æ¯", $"PLCä¿¡å·300", $"è¾éæç¶æï¼{W_PickToHode}ï¼ä¸æ»¡è¶³å
¥åºæ¡ä»¶ï¼å¼ºå¶å
¥åºåå
¥300"); |
| | | } |
| | | else |
| | | { |
| | | throw new Exception($"ä¼ å
¥æç®±ç {containerFlowDTO.ContainerCode}ï¼è¾éæç¶æï¼{W_PickToHode}ï¼ä¸æ»¡è¶³å
¥åºæ¡ä»¶"); |
| | | } |
| | | WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode, stationManger.PickStationCode); |
| | | if (!responseContent.Status) throw new Exception(responseContent.Message); |
| | | } |
| | | WriteLog.Write_Log($"容卿µå¨{stationManger.StationCode}", $"è¾é线信æ¯", "å¼å§å
¥åº", $"ç¶æ{containerFlowDTO.Direction}ï¼æç®±ç {containerFlowDTO.ContainerCode}"); |
| | | WriteLog.Write_Log("äºæå®¹å¨æµå¨å
¥åºæ¥å£", "ä»»å¡ä¿¡æ¯", $"è¿åè¾é线{stationManger.PickStationCode}", $"è¿åç»è¾é线çä»»å¡ä¿¡æ¯ï¼{containerFlowDTO.ToJson()}"); |
| | | commonConveyorLine.SetValue(ConveyorLineDBName.W_PickToHode, (short)containerFlowDTO.Direction.ObjToInt(), stationManger.StationCode); |
| | | } |
| | | content.OK(); |
| | |
| | | { |
| | | return Service.ResetAllExceptionTask(taskNum); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// WMSå¼å¸¸æ¢å¤ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("WmsRecovery"), AllowAnonymous] |
| | | public WebResponseContent WmsRecovery() |
| | | { |
| | | return Service.WmsRecovery(); |
| | | } |
| | | } |
| | | } |