| | |
| | | |
| | | #region 佳通合肥接口业务 |
| | | |
| | | |
| | | public static object _lockCreateTask = new object(); |
| | | public static object _lockCreateItem = new object(); |
| | | public static object _lockCreateTask = new object(); |
| | | |
| | | /// <summary> |
| | | /// 立库任务下发=》创建任务 |
| | | /// </summary> |
| | |
| | | AddErrorInfo("寻找出库货位失败", result.msg, Source); |
| | | return result; |
| | | } |
| | | |
| | | //endloc = db.Queryable<Location>().Where(a => a.S_CODE.Trim() == taskData.dropStation).First(); |
| | | //if (endloc != null) |
| | | //{ |
| | | // End = taskData.dropStation; |
| | | //} |
| | | //else |
| | | //{ |
| | | // result.code = "1"; |
| | | // result.msg = $"根据终点{End},找不到对应货位,请检查货位表"; |
| | | // AddErrorInfo("货位查找失败", result.msg, Source); |
| | | // return result; |
| | | //} |
| | | } |
| | | else |
| | | { |
| | |
| | | AddErrorInfo("创建托盘失败", result.msg, Source); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | else if (taskData.taskType == 3)//移库流程,直接使用起点货位和终点货位生成任务, |
| | | { |
| | | note = "出库"; |
| | | note = "入库"; |
| | | //创建托盘物料绑定信息,并计算终点货位 |
| | | startloc = db.Queryable<Location>().Where(a => a.S_CODE.Trim() == taskData.pickStation).First(); |
| | | if (startloc != null) |
| | |
| | | type = "平库空工装呼叫"; |
| | | break; |
| | | case "4": |
| | | type = "平库余料回库"; |
| | | type = "余料返回"; |
| | | break; |
| | | case "5": |
| | | type = "粉料空托返回"; |
| | |
| | | AddErrorInfo("货位查找失败", result.msg, Source); |
| | | return result; |
| | | } |
| | | else |
| | | { |
| | | //判断起点是否绑定其他托盘 |
| | | var CntrRel = LocationHelper.GetLocCntrRel(startloc.S_CODE).OrderBy(a => a.T_CREATE).FirstOrDefault(); |
| | | if (CntrRel != null) |
| | | { |
| | | if (CntrRel.S_CNTR_CODE != model.Rfid) |
| | | { |
| | | result.code = "1"; |
| | | result.msg = $"根据起点:{model.InitialLocation}获取托盘:{CntrRel.S_CNTR_CODE}与下发托盘:{model.Rfid}不一致,请检查托盘码是否正确"; |
| | | AddErrorInfo("托盘码校检失败", result.msg, Source); |
| | | return result; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | LocationHelper.BindingLoc(startloc.S_CODE, new List<string> { model.Rfid }); |
| | | } |
| | | } |
| | | |
| | | endloc = db.Queryable<Location>().Where(a => a.S_CODE.Trim() == model.TargetLocation).First(); |
| | | if (endloc == null) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | LocationHelper.LockLoc(startloc.S_CODE, 2); |
| | | LocationHelper.LockLoc(endloc.S_CODE, 1); |
| | | |
| | | LogHelper.Info("创建任务成功"); |
| | | } |
| | | else |