| | |
| | | public string urlWMSMovelibraryTask = WIDESEAWCS_Core.Helper.AppSettings.Configuration["urlWMSMovelibraryTask"]; |
| | | public string urlRelocationTaskCompleted = WIDESEAWCS_Core.Helper.AppSettings.Configuration["urlRelocationTaskCompleted"]; |
| | | public string urlQueryinventory = WIDESEAWCS_Core.Helper.AppSettings.Configuration["urlQueryinventory"]; |
| | | public string urlEmptyOutbound = WIDESEAWCS_Core.Helper.AppSettings.Configuration["urlEmptyOutbound"]; |
| | | /// <summary> |
| | | /// æ¥æ¶WMSä»»å¡ä¿¡æ¯ |
| | | /// </summary> |
| | |
| | | /// <param name="palletCode">æçå·</param> |
| | | /// <param name="sourceAddress">èµ·å§å°å</param> |
| | | /// <returns></returns> |
| | | public class GenerateInv |
| | | { |
| | | public string SourceAddress { get; set; } |
| | | public string PalletCode { get; set; } |
| | | } |
| | | public WebResponseContent RequestWMSTask(string palletCode, string sourceAddress) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | palletCode = "6431-jdsda-jjal333-300"; |
| | | content = HttpHelper.Get<WebResponseContent>($"{urlWMSTask}?sourceAddress={sourceAddress}&palletCode={palletCode}"); |
| | | GenerateInv generate = new GenerateInv() |
| | | { |
| | | SourceAddress=sourceAddress, |
| | | PalletCode = palletCode |
| | | }; |
| | | content = HttpHelper.Post<WebResponseContent>($"{urlWMSTask}", generate); |
| | | Dt_Task task = new Dt_Task(); |
| | | if (content != null) |
| | | { |
| | |
| | | return content; |
| | | } |
| | | /// <summary> |
| | | /// æ¥è¯¢åºä½ |
| | | /// è¿è¡ç»ç |
| | | /// </summary> |
| | | /// <param name="palletCode"></param> |
| | | /// <returns></returns> |
| | |
| | | return content = HttpHelper.Get<WebResponseContent>($"{urlQueryinventory}?palletCode={palletCode}"); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®æçå·ãèµ·å§å°ååWMS请æ±ä»»å¡ |
| | | /// </summary> |
| | | /// <param name="palletCode">æçå·</param> |
| | | /// <param name="sourceAddress">èµ·å§å°å</param> |
| | | /// <returns></returns> |
| | | public WebResponseContent RequestWMSTask2(string sourceAddress) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | content = HttpHelper.Get<WebResponseContent>($"{urlEmptyOutbound}?sourceAddress={sourceAddress}"); |
| | | Dt_Task task = new Dt_Task(); |
| | | if (content != null) |
| | | { |
| | | if (content.Status) |
| | | { |
| | | task = JsonConvert.DeserializeObject<Dt_Task>(content.Data.ToString()); |
| | | task.TaskState = (int)TaskInStatusEnum.Line_InFinish; |
| | | task.Roadway = task.Roadway == "1" ? task.Roadway = "SC01" : task.Roadway = "SC02"; |
| | | BaseDal.AddData(task); |
| | | return content = WebResponseContent.Instance.OK(); |
| | | } |
| | | else |
| | | { |
| | | |
| | | return content = WebResponseContent.Instance.Error(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.Error(); |
| | | } |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return content = WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// æ ¹æ®æ·±åºä½åwmsç³è¯·å¤ææµ
åºä½æ¯å¦æè´§ï¼æ¯å¦éè¦è¿è¡ç§»åºæä½ |
| | | /// </summary> |
| | |
| | | } |
| | | public Dt_Task IngStackerCraneTask(string deviceNo) |
| | | { |
| | | string deviceNot = deviceNo == "SC01" ? "1" : "2"; |
| | | return BaseDal.QueryFirst(x => x.Roadway == deviceNot && x.TaskState == (int)TaskInStatusEnum.SC_InExecuting); |
| | | //string deviceNot = deviceNo == "SC01" ? "1" : "2"; |
| | | return BaseDal.QueryFirst(x => x.Roadway == deviceNo && x.TaskState == (int)TaskInStatusEnum.SC_InExecuting); |
| | | } |
| | | |
| | | /// <summary> |