using HH.WMS.Entitys.Algorithm; using HW.Utility.Data; using System; using System.Collections.Generic; using System.Data; using System.Data.Common; using System.Linq; using System.Text; namespace HW.DAL { /// /// /// public class TN_AB_B_AREA_LOCATION_RDAL:BaseDAL { #region 获取仓库库区/逻辑分区与货位关联集合 /// /// 根据表名获取仓库库区/逻辑分区与货位关联集合 /// /// 表名 /// 仓库库区/逻辑分区与货位关联集合 /// [HanHe(XDL)] CREATED 2018/06/14 public List GetAreaLocationRList(string tableName) { string sql = @"SELECT CN_GUID ,CN_S_AREA_GUID ,CN_S_AREA_CODE ,CN_S_AREA_NAME ,CN_S_STOCK_CODE ,CN_S_LOCATION_CODE ,CN_S_CREATOR ,CN_S_CREATOR_NAME ,S.CN_T_CREATE ,CN_S_PRIORITY ,CN_S_STOCK_AREA ,CN_N_TYPE FROM TN_AB_B_SYNCH_LOG L LEFT JOIN TN_AB_B_AREA_LOCATION_R S ON L.CN_S_GUID=S.CN_GUID WHERE L.CN_S_TABLE_NAME='" + tableName + "' AND L.CN_N_OP_FLAG IN (1,2)"; DbCommand cmd = DataAccess.GetSqlStringCommand(sql); List list = DataAccessExtensive.ExecuteListEntity(this.DataAccess, cmd, SetEntity); return list; } /// /// 设置实体的各列 /// private void SetEntity(AutoBomAreaLocation_REntity entity, IDataReader reader) { SetEntityUti(entity, "CN_GUID", "CN_GUID", reader); SetEntityUti(entity, "CN_S_AREA_GUID", "CN_S_AREA_GUID", reader); SetEntityUti(entity, "CN_S_AREA_CODE", "CN_S_AREA_CODE", reader); SetEntityUti(entity, "CN_S_AREA_NAME", "CN_S_AREA_NAME", reader); SetEntityUti(entity, "CN_S_STOCK_CODE", "CN_S_STOCK_CODE", reader); SetEntityUti(entity, "CN_S_LOCATION_CODE", "CN_S_LOCATION_CODE", reader); SetEntityUti(entity, "CN_S_CREATOR", "CN_S_CREATOR", reader); SetEntityUti(entity, "CN_S_CREATOR_NAME", "CN_S_CREATOR_NAME", reader); SetEntityUti(entity, "CN_T_CREATE", "CN_T_CREATE", reader); SetEntityUti(entity, "CN_S_PRIORITY", "CN_S_PRIORITY", reader); SetEntityUti(entity, "CN_S_STOCK_AREA", "CN_S_STOCK_AREA", reader); SetEntityUti(entity, "CN_N_TYPE", "CN_N_TYPE", reader); } } #endregion }