| | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// 根据物料获得对应的内测货位 |
| | | /// 根据物料和排号获得对应的未锁定托盘货位 |
| | | /// </summary> |
| | | /// <param name="areaCode">库区编码</param> |
| | | /// <param name="row">货位排</param> |
| | | /// <param name="ItemCode">物料编码</param> |
| | | /// <returns></returns> |
| | | internal static List<Location> GetLocByItemCodeOrderyTime(string areaCode, string ItemCode) |
| | | { |
| | | List<Location> locs; |
| | | var db = new SqlHelper<object>().GetInstance(); |
| | | |
| | | try |
| | | { |
| | | locs = db.Queryable<Location>() |
| | | .LeftJoin<LocCntrRel>((a, b) => a.S_CODE == b.S_LOC_CODE) |
| | | .LeftJoin<CntrItemDetail>((a, b, c) => b.S_CNTR_CODE == c.S_CNTR_CODE) |
| | | .Where((a, b, c) => a.N_CURRENT_NUM > 0 && a.N_LOCK_STATE == 0 && a.S_AREA_CODE == areaCode |
| | | && c.S_ITEM_CODE == ItemCode && a.N_LOCK_STATE == 0) |
| | | .GroupBy((a, b, c) => new { a.S_CODE, c.T_INBOUND_TIME ,a.N_POS }) |
| | | |
| | | .OrderBy((a, b, c) => c.T_INBOUND_TIME) |
| | | .OrderByDescending((a, b, c) => a.N_POS) |
| | | .ToList(); |
| | | |
| | | |
| | | |
| | | return locs; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogHelper.Info($"GetLocByItemCode Error:{ex}"); |
| | | throw; |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 根据物料和排号获得对应的未锁定托盘货位,并按托盘物料表时间分组 |
| | | /// </summary> |
| | | /// <param name="areaCode">库区编码</param> |
| | | /// <param name="row">货位排</param> |
| | |
| | | var queryable = db.Queryable<Location>() |
| | | .LeftJoin<LocCntrRel>((a, b) => a.S_CODE == b.S_LOC_CODE) |
| | | .LeftJoin<CntrItemDetail>((a, b, c) => b.S_CNTR_CODE == c.S_CNTR_CODE) |
| | | .Where((a, b, c) => a.N_CURRENT_NUM > 0 && a.N_LOCK_STATE == 0 && a.S_AREA_CODE == areaCode && row.Contains(a.N_ROW) && c.S_ITEM_CODE == ItemCode); |
| | | .Where((a, b, c) => a.N_CURRENT_NUM > 0 && a.N_LOCK_STATE == 0 && a.S_AREA_CODE == areaCode && row.Contains(a.N_ROW) && c.S_ITEM_CODE == ItemCode && a.N_LOCK_STATE == 0); |
| | | |
| | | locs = queryable.ToList(); |
| | | |
| | |
| | | { |
| | | var db = new SqlHelper<object>().GetInstance(); |
| | | Location location = null; |
| | | |
| | | try |
| | | { |
| | | //判断当前排可用货位小于2 如果小于2则不允许入 |
| | |
| | | return result; |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 根据货位集合获取有容器的货位 |
| | | /// </summary> |
| | |
| | | model.S_LOCK_STATE = Location.GetLockStateStr(lockState); |
| | | res = db.Updateable(model).UpdateColumns(it => new { it.N_LOCK_STATE, it.S_LOCK_STATE }).ExecuteCommand() > 0; |
| | | } |
| | | |
| | | return res; |
| | | } |
| | | |