| | |
| | | using HH.WCS.JiaTong.util; |
| | | using HH.WCS.JiaTong.wms; |
| | | using Newtonsoft.Json; |
| | | using S7.Net; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | { |
| | | if (data == "") |
| | | { |
| | | Traystacker(plc); |
| | | // Traystacker(plc); |
| | | } |
| | | } |
| | | } |
| | |
| | | /// <summary> |
| | | /// 叠盘机空托返回 |
| | | /// </summary> |
| | | internal static void Traystacker(Settings.deviceInfo device) |
| | | internal static void Traystacker(string loc, int qty) |
| | | { |
| | | try |
| | | { |
| | | //上传数据 |
| | | Result<Traystacker> result1 = new Result<Traystacker>(); |
| | | Traystacker traystacker = new Traystacker() { station = device.TN_Location[0], taskSource = 1, Qty = 7 }; |
| | | Traystacker traystacker = new Traystacker() { station = loc, taskSource = 1, Qty = qty }; |
| | | result1.data.Add(traystacker); |
| | | HttpHelper httpHelper = new HttpHelper(); |
| | | Result result = new Result(); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | internal static void KjTraffic() |
| | | { |
| | | |
| | | |
| | | var db = new SqlHelper<object>().GetInstance(); |
| | | List<string> locs = new List<string>() { "PMDDW-001" }; |
| | | var location = db.Queryable<Location>().Where(a => locs.Contains(a.S_CODE)).ToList(); |
| | | if (location.Count > 0) |
| | | { |
| | | // string cntrcode = ""; |
| | | foreach (var item in location) |
| | | { |
| | | |
| | | if (item.N_CURRENT_NUM >= 6) |
| | | { |
| | | //var cntr = db.Queryable<LocCntrRel>().Where(a => a.S_LOC_CODE.Trim() == item.S_CODE).ToList(); |
| | | //if (cntr.Count > 0) |
| | | //{ |
| | | // var cntrcodes = cntr.Select(a => a.S_CNTR_CODE).ToArray(); |
| | | // cntrcode = string.Join(",", cntrcodes); |
| | | //} |
| | | |
| | | //创建过未完成的任务不发起请求 |
| | | var mst = WCSHelper.GetTaskByStartloc(item.S_CODE); |
| | | if (mst == null) |
| | | { |
| | | Traystacker(item.S_CODE, item.N_CURRENT_NUM); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 原材料库接口访问 |
| | | /// </summary> |