| | |
| | | using HH.WCS.QingXigongchang.api; |
| | | using HH.WCS.QingXigongchang.core; |
| | | using HH.WCS.QingXigongchang.device; |
| | | using HH.WCS.QingXigongchang.device; |
| | | using HH.WCS.QingXigongchang.dispatch; |
| | | using HH.WCS.QingXigongchang.util; |
| | | using HH.WCS.QingXigongchang.wms; |
| | | using Newtonsoft.Json; |
| | | using NLog.Fluent; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Reflection; |
| | | using System.Reflection.Emit; |
| | | using System.Runtime.InteropServices; |
| | | using System.Security.Cryptography; |
| | | using System.Security.Policy; |
| | | using System.Threading; |
| | | using System.Threading.Tasks; |
| | | using System.Web.Http.Results; |
| | | using static HH.WCS.QingXigongchang.api.ApiModel; |
| | | using static HH.WCS.QingXigongchang.device.OITcpHelper; |
| | | using Monitor = HH.WCS.QingXigongchang.core.Monitor; |
| | | |
| | | namespace HH.WCS.QingXigongchang.process |
| | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 任务状态更新处理 |
| | | /// </summary> |
| | |
| | | //} |
| | | } |
| | | |
| | | //终点货位为 YWLT1TSJCD 或者 YWLT2TSJCD 的 要取货完成解锁起点,解绑起点,绑定终点,卸货完成,解锁终点 2025年6月10日 Plg |
| | | //if (mst.S_END_LAREA?.Trim() == "YWLT1TSJCD" || mst.S_END_LAREA?.Trim() == "YWLT2TSJCD") |
| | | //{ |
| | | // //解绑起点 |
| | | // CacheBitUpdate(mst, load: true); |
| | | // //绑定终点 |
| | | // CacheBitUpdate(mst, load: false); |
| | | //} |
| | | LocationHelper.UnLockLoc(mst.S_START_LOC.Trim()); |
| | | } |
| | | //new List<string> { "成品满框-入库", "" } |
| | | if (state == 6 || state == 5) |
| | | { |
| | | |
| | | LogHelper.Info($"任务类型:{mst.S_TYPE}- 动作:{state}. 是否5算6?{mst.S_TYPE.Contains("成品满框") || mst.S_TYPE.Contains("备货")} "); |
| | | if (mst.S_TYPE.Contains("备货")) |
| | | { |
| | | if (state == 6) goto vvv; |
| | | } |
| | | else if (state == 5) goto vvv; |
| | | else if (state == 5) |
| | | { |
| | | ///只需要释放货位就行了 |
| | | //if (mst.S_END_LAREA?.Trim() == "YWLT1TSJCD" || mst.S_END_LAREA?.Trim() == "YWLT2TSJCD") |
| | | //{ |
| | | // LocationHelper.UnLockLoc(mst.S_END_LOC.Trim()); |
| | | // return r; |
| | | //} |
| | | goto vvv; |
| | | } |
| | | |
| | | if (mst.S_TYPE.Trim() == "J空瓶坯-出库") |
| | | { |
| | |
| | | && mst.S_TYPE.Trim() != "瓶盖空筐转运-J2" |
| | | && mst.S_TYPE.Trim() != "青溪纸箱搬运物料" |
| | | && !mst.S_TYPE.Trim().Contains("自由点对点")) |
| | | { |
| | | CacheBitUpdate(mst, load: false, mst.S_NOTE); |
| | | } |
| | | |
| | | |
| | | if (mst.S_TYPE.Trim().Contains("成品-空托上线")) |
| | | { |
| | |
| | | //} |
| | | else |
| | | { |
| | | |
| | | if (start == 0) |
| | | { |
| | | //bool flag3 = ; |
| | |
| | | } |
| | | } |
| | | |
| | | //if (Settings.GetDeviceInfoList().Find(x => x.location.Contains(mst.S_END_LOC))?.deviceType == 13 && mst.S_TYPE.Contains("收缩膜叉运")) |
| | | //{ |
| | | // end = 7027; |
| | | //} |
| | | |
| | | LogHelper.Info("SendTask " + mst.S_TASK_NO); |
| | | Console.WriteLine("start=" + start.ToString()); |
| | | Console.WriteLine("end= " + end.ToString()); |
| | |
| | | /// <param name="trayCarryCount"></param> |
| | | /// <param name="priority"></param> |
| | | /// <returns></returns> |
| | | public static bool CreateTransport(string wWorkNo, string start, string end, string taskType, List<string> cntrs, int startLayer, int endLayer, int trayCarryCount = 1, int priority = 1, string note = "") |
| | | public static bool CreateTransport(string wWorkNo, string start, string end, string taskType, List<string> cntrs, int startLayer, int endLayer, int trayCarryCount = 1, int priority = 1, string note = "", string TwoEndLoc = "") |
| | | { |
| | | if (string.IsNullOrEmpty(start) || string.IsNullOrEmpty(end)) |
| | | return false; |
| | | |
| | | var result = false; |
| | | //批次号存托盘号,1~3个托盘 |
| | | var trayCodes = string.Join(",", cntrs); |
| | |
| | | |
| | | LogHelper.Info($"CreateTransport- " + $"{taskNo}-{start}-{end}-{taskType}"); |
| | | |
| | | var res = TaskHelper.CreateTask(wWorkNo, start.Trim(), end.Trim(), taskType, priority, trayCodes, trayCarryCount, startLayer, endLayer, note, lockLoc: true); |
| | | var res = TaskHelper.CreateTask(wWorkNo, start.Trim(), end.Trim(), taskType, priority, trayCodes, trayCarryCount, startLayer, endLayer, note, lockLoc: true, TwoEndLoc); |
| | | if (res) |
| | | { |
| | | result = true; |