| | |
| | | using System.Diagnostics.Eventing.Reader; |
| | | using System.IdentityModel.Protocols.WSTrust; |
| | | using System.Linq; |
| | | using System.Net.NetworkInformation; |
| | | using System.Security.Cryptography; |
| | | using System.Threading; |
| | | using System.Threading.Tasks; |
| | |
| | | { |
| | | //根据客户现场要求,如果取货完成任务失败人工拉到终点,我们就当卸货完成处理;如果是人工拉走到其它区域,我们就解锁终点,删除托盘。 |
| | | //终点绑定 |
| | | //物料到位通知 |
| | | if (mst.S_TYPE == "出平库" || mst.S_TYPE == "余料返回") |
| | | { |
| | | string urlitem = Settings.tableUrls.Find(a => a.id == 5).url; |
| | | TaskProcess.MESIteminfoback(mst, urlitem); |
| | | } |
| | | if ((mst.S_NOTE == "出库" || mst.S_NOTE == "异常库区入库") && !string.IsNullOrEmpty(mst.S_MES_NO)) |
| | | { |
| | | string urlitem = Settings.tableUrls.Find(a => a.id == 5).url; |
| | | TaskProcess.MESIteminfoback(mst, urlitem); |
| | | } |
| | | CacheBitUpdate(mst, false); |
| | | LocationHelper.UnLockLoc(mst.S_END_LOC); |
| | | } |
| | |
| | | // } |
| | | return result; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 空托等待任务 超时5分组直接推送 |
| | | /// </summary> |
| | | /// <param name="mst"></param> |
| | | /// <returns></returns> |
| | | internal static void WaitSend(WCSTask mst) |
| | | { |
| | | // 计算与当前时间的差值 |
| | | TimeSpan timeDifference = DateTime.Now - mst.T_CREATE; |
| | | if (timeDifference.TotalMinutes > 5) |
| | | { |
| | | var db = new SqlHelper<WCSTask>().GetInstance(); |
| | | mst.S_B_STATE = "等待"; |
| | | db.Updateable(mst).UpdateColumns(it => new { it.S_B_STATE }).ExecuteCommand(); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 任务状态回报 |
| | | /// </summary> |