using HH.WCS.Hexafluo.util;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace HH.WCS.Hexafluo.wms
|
{
|
/// <summary>
|
/// 普通库区
|
/// </summary>
|
internal class NormalArea
|
{
|
/// <summary>
|
/// 没有特殊要求货架区随便找一个空位
|
/// </summary>
|
/// <returns></returns>
|
/// <exception cref="NotImplementedException"></exception>
|
internal static Location GetLocation4In(string area) {
|
var db = new SqlHelper<object>().GetInstance();
|
return db.Queryable<Location>().Where(a => a.S_AREA_CODE.Trim() == area && a.N_CURRENT_NUM == 0 && a.S_LOCK_STATE.Trim() == "无").First();
|
}
|
|
/// <summary>
|
/// 没有特殊要求,出一个相同物料的就可以
|
/// </summary>
|
/// <param name="area"></param>
|
/// <param name="itemCode"></param>
|
/// <returns></returns>
|
/// <exception cref="NotImplementedException"></exception>
|
internal static Location GetLocation4Out(string area, string itemCode) {
|
var db = new SqlHelper<object>().GetInstance();
|
//查找所有有托盘的货位
|
return db.Queryable<Location>().Where(a => a.S_AREA_CODE.Trim() == area && a.N_CURRENT_NUM == 1 && a.S_LOCK_STATE.Trim() == "无" && a.LocCntrRel.CntrItemRel.S_ITEM_CODE.Trim() == itemCode).Includes(a => a.LocCntrRel, a => a.CntrItemRel).First();
|
}
|
}
|
}
|