File was renamed from HH.WCS.Mobox3/HH.WCS.Mobox3.EmersonWCS/wms/WMSHelper.cs |
| | |
| | | using HH.WCS.EmersonWcs.api; |
| | | using HH.WCS.EmersonWcs.LISTA.models; |
| | | using HH.WCS.EmersonWcs.models.other; |
| | | using HH.WCS.EmersonWcs.util; |
| | | using HH.WCS.Emerson.api; |
| | | using HH.WCS.Emerson.LISTA.models; |
| | | using HH.WCS.Emerson.models.other; |
| | | using HH.WCS.Emerson.util; |
| | | using Newtonsoft.Json; |
| | | using Opc.Ua; |
| | | using System; |
| | |
| | | using System.Security.Cryptography; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using static HH.WCS.EmersonWcs.api.ApiModel; |
| | | using static HH.WCS.Emerson.api.ApiModel; |
| | | |
| | | namespace HH.WCS.EmersonWcs.wms |
| | | namespace HH.WCS.Emerson.wms |
| | | { |
| | | /// <summary> |
| | | /// wms管到作业 |
| | |
| | | var distribution = db.Queryable<TN_Distribution_CNTR>().Where(a => a.N_B_STATE == 1).ToList(); |
| | | if (distribution.Count > 0) |
| | | { |
| | | |
| | | try |
| | | { |
| | | foreach (var item in distribution) |
| | | { |
| | | LogHelper.Info($"托盘{item.S_CNTR_CODE}开始出库"); |
| | |
| | | endloc = LocationHelper.GetLoc(item.S_EXIT_LOC_CODE); |
| | | |
| | | } |
| | | |
| | | if (endloc == null && endloc.N_LOCK_STATE == 0 && endloc.N_CURRENT_NUM == 0) |
| | | if (endloc == null) |
| | | { |
| | | LogHelper.Info($"终点货位:{item.S_EXIT_LOC_CODE}不可用"); |
| | | return; |
| | | } |
| | | if (endloc.N_LOCK_STATE != 0 || endloc.N_CURRENT_NUM != 0) |
| | | { |
| | | LogHelper.Info($"终点货位:{item.S_EXIT_LOC_CODE}不可用"); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | |
| | | var distributions = db.Queryable<TN_Distribution_CNTR>().Where(a => a.N_B_STATE == 1 && a.S_BS_NO == item.S_BS_NO).ToList(); |
| | | if (distributions.Count > 0) |
| | | { |
| | | |
| | | LogHelper.Info($"托盘{item.S_CNTR_CODE}创建任务完成,出库单{item.S_BS_NO}存在未完成的出库任务,不允许修改出库单状态"); |
| | | |
| | | } |
| | | else |
| | | { |
| | |
| | | Console.WriteLine("起点终点货位为空,请检查日志"); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogHelper.Info($"CreateOutTask Error :{ex}"); |
| | | throw; |
| | | } |
| | | |
| | | |
| | | } |
| | | |