| | |
| | | /// <param name="itemCode"></param> |
| | | /// <param name="roadway">接驳位所在巷道</param> |
| | | /// <param name="row">接驳位所在排</param> |
| | | /// <param name="thresholdValue">库容阈值</param> |
| | | /// <returns></returns> |
| | | public static Location GetEndLocation(string areaCode, string itemCode ,int roadway ,int row) |
| | | public static Location GetEndLocation(string areaCode, string itemCode ,int roadway ,int row ,int thresholdValue = 1) |
| | | { |
| | | Location loc = null; |
| | | try |
| | |
| | | .LeftJoin<WCSTask>((a,b) => a.S_CODE == b.S_OP_CODE) |
| | | .LeftJoin<Location>((a, b ,c) => b.S_END_LOC == c.S_CODE) |
| | | .Where((a, b, c) => b.S_END_AREA == storeAreaInfo.accessArea && c.N_ROADWAY == roadway && a.N_B_STATE < 2 && b.S_TYPE.Contains("入库")).Count(); |
| | | if (locList.Count - 2 > taskNum) |
| | | if (locList.Count - thresholdValue > taskNum) |
| | | { |
| | | // 【1.2】查询深度 N_DEEP = 2 ,位置 N_POS = 1 且 物料相同 的货位 |
| | | var sameItemLocList = db.Queryable<Location>() |
| | |
| | | } |
| | | } |
| | | catch (Exception ex) { |
| | | LogHelper.Error("GetEndLocation:" + ex.Message, ex); |
| | | LogHelper.Info("获取入库终点报错,错误信息:" + ex.Message,"WMS"); |
| | | } |
| | | return loc; |
| | | } |