| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Reflection.Metadata; |
| | | using System.Text; |
| | | using System.Threading; |
| | | using WIDESEA_Common; |
| | |
| | | { |
| | | try |
| | | { |
| | | string barcode = client.ReadValue(CLineInfoDBName.R_Line_Barcode.ToString(), ReInboundRequestStationNo).ToString(); |
| | | int R_Line_PLCDispatch = int.Parse(client.ReadValue(CLineInfoDBName.W_Line_PLCDispatch.ToString(), ReInboundRequestStationNo).ToString()); |
| | | bool load = bool.Parse(client.ReadValue(CLineInfoDBName.R_Line_LoadSleep.ToString(), ReInboundRequestStationNo).ToString()); |
| | | if (!string.IsNullOrEmpty(barcode) && !"0".Equals(barcode) && load) |
| | | if (R_Line_PLCDispatch ==1 && load) |
| | | { |
| | | string barcode = client.ReadValue(CLineInfoDBName.R_Line_Barcode.ToString(), ReInboundRequestStationNo).ToString(); |
| | | if (!string.IsNullOrEmpty(barcode) && !"0".Equals(barcode)) |
| | | { |
| | | Dt_TaskWCSinfo wcsInfo = taskWCSinfoRepository.FindFirst(r => r.wcstask_barcode == barcode && r.wcstask_type == TaskType.TaskType_Empty_Pallet_Inbound.ToString()); |
| | | if (null == wcsInfo) |
| | |
| | | WmsTaskInfo wmsTask = JsonConvert.DeserializeObject<WmsTaskInfo>(content.Data.ToString()); |
| | | wcsInfo = CommonFunction.AddWCSEmptyInboundTask(wmsTask, taskWCSinfoRepository); |
| | | taskWCSinfoRepository.Add(wcsInfo, true); |
| | | client.WriteValue(CLineInfoDBName.W_Line_PLCDispatch.ToString(), ReInboundRequestStationNo, 1); |
| | | |
| | | |
| | | client.WriteValue(CLineInfoDBName.W_Line_PLCDispatch.ToString(), ReInboundRequestStationNo, 2); |
| | | } |
| | | else |
| | | { |
| | | client.WriteValue(CLineInfoDBName.W_Line_PLCDispatch.ToString(), ReInboundRequestStationNo, 2); |
| | | throw new Exception("å
¥åºç³è¯·å¤±è´¥:" + content.Message); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | WmsTaskInfo wmsTask = JsonConvert.DeserializeObject<WmsTaskInfo>(content.Data.ToString()); |
| | | wcsInfo = CommonFunction.AddWCSEmptyInboundTask(wmsTask, taskWCSinfoRepository); |
| | | taskWCSinfoRepository.Add(wcsInfo, true); |
| | | client.WriteValue(CLineInfoDBName.W_Line_PLCDispatch.ToString(), ReInboundRequestStationNo, 1); |
| | | |
| | | client.WriteValue(CLineInfoDBName.W_Line_PLCDispatch.ToString(), ReInboundRequestStationNo, 2); |
| | | } |
| | | else |
| | | { |
| | | client.WriteValue(CLineInfoDBName.W_Line_PLCDispatch.ToString(), ReInboundRequestStationNo, 2); |
| | | throw new Exception("å
¥åºç³è¯·å¤±è´¥:" + content.Message); |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("å
¥åºç³è¯·å¤±è´¥:读åå°ç空æçæ¡ç 为空ï¼è¯»åå
容ï¼"+ barcode); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | client.WriteValue(CLineInfoDBName.W_Line_PLCDispatch.ToString(), ReInboundRequestStationNo, 3); |
| | | Console.Out.WriteLine(DateTime.Now + ex.Message); |
| | | } |
| | | } |