| | |
| | | using System.Reflection; |
| | | using System.Security.Cryptography; |
| | | using static HH.WCS.Mobox3.YNJT_BZP.util.Settings; |
| | | using static HH.WCS.Mobox3.YNJT_BZP.dispatch.WCSDispatch; |
| | | |
| | | namespace HH.WCS.Mobox3.YNJT_BZP.process { |
| | | internal class TaskProcess { |
| | |
| | | if (container1.N_TYPE == 0) |
| | | { |
| | | LogHelper.Info("非胎圈入库,接驳位存在母拖,下发母拖入库任务", "AGV"); |
| | | ApiHelper.baseTrayInStockAgv(endLoc.S_CODE, mst.S_CODE); |
| | | ApiHelper.autoBaseTrayInStock(endLoc.S_CODE, mst.S_CODE); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (endLoc.N_CURRENT_NUM == 0) |
| | | { |
| | | LogHelper.Info("胎圈入库,接驳位缺少母拖,下发母拖出库任务", "AGV"); |
| | | ApiHelper.baseTrayOutStockAgv(endLoc.S_CODE, mst.S_CODE); |
| | | ApiHelper.autoBaseTrayOutStock(endLoc.S_CODE, mst.S_CODE); |
| | | } |
| | | else if (endLoc.N_CURRENT_NUM == 1) |
| | | { |
| | |
| | | // 安全请求发送成功,添加任务动作记录 |
| | | if (result) |
| | | { |
| | | WCSHelper.AddActionRecord(no, state, forkliftNo, extData); |
| | | LogHelper.Info($"首次进行安全请求成功", "AGV"); |
| | | } |
| | | } |
| | |
| | | if (mst.N_B_STATE == 0) { |
| | | var startLoc = LocationHelper.GetLocation(mst.S_START_LOC); |
| | | var endLoc = LocationHelper.GetLocation(mst.S_END_LOC); |
| | | |
| | | if (mst.S_SCHEDULE_TYPE == "AGV") |
| | | { |
| | | AddOrderNewModel model = new AddOrderNewModel() |
| | |
| | | }; |
| | | List<Param> paramList = new List<Param>(); |
| | | var dic = new Dictionary<string, string>(); |
| | | dic.Add("IKey", mst.S_CODE); |
| | | dic.Add("From", startLoc.S_CODE); |
| | | dic.Add("To", endLoc.S_CODE); |
| | | |
| | | dic.Add("FUNC", "0"); |
| | | if (mst.S_TYPE.Contains("入库")) |
| | | { |
| | | dic.Add("DATA", "300"); |
| | | } |
| | | else |
| | | { |
| | | dic.Add("DATA", "0"); |
| | | } |
| | | dic.Add("Ctype", "0"); |
| | | foreach (var item in dic) |
| | | { |
| | | Param param = new Param |
| | |
| | | paramList.Add(param); |
| | | } |
| | | model.paramList = paramList; |
| | | LogHelper.Info($"向AGV下发任务,任务参数:{model}", "WMS"); |
| | | var res = NDCApi.AddOrderNew(model); |
| | | if (res != null && res.err_code == 0 || true) |
| | | { |
| | |
| | | } |
| | | else if (mst.S_SCHEDULE_TYPE == "WCS") |
| | | { |
| | | |
| | | if (true) |
| | | SendTaskModel sendTask = new SendTaskModel() |
| | | { |
| | | taskNo = mst.S_CODE, |
| | | taskType = mst.S_TYPE.Contains("入库") ? "1" : "2", |
| | | from = mst.S_START_LOC, |
| | | to = mst.S_END_LOC, |
| | | cntrNo = mst.S_CNTR_CODE, |
| | | }; |
| | | LogHelper.Info($"向WCS下发任务,任务参数:{sendTask}", "WMS"); |
| | | var bo = WCSDispatch.sendTask(sendTask); |
| | | if (true || bo) |
| | | { |
| | | //推送成功,修改任务优先级 |
| | | mst.N_B_STATE = 1; |