using HH.MData;
|
using HH.WMS.Entitys.Basic;
|
using MongoDB.Driver.Builders;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace HH.WMS.DAL.Basic
|
{
|
public class TN_AB_B_NUMRULEDAL:BaseDAL
|
{
|
#region 根据规则名称返回实体
|
/// <summary>
|
/// 根据规则名称返回实体
|
/// </summary>
|
/// <param name="fieldName">字段名称</param>
|
/// <param name="inputValue">输入值</param>
|
/// <returns></returns>
|
/// <history>[HanHe(xdl)] CREATED 2018/11/13</history>
|
public TN_AB_B_NUMRULEEntity GetNumruleEntity(string fieldName, string inputValue)
|
{
|
var query = Query.EQ(fieldName, inputValue);
|
TN_AB_B_NUMRULEEntity entity = MongoDBSingleton.Instance.FindOne<TN_AB_B_NUMRULEEntity>(query, "TN_AB_B_NUMRULE");
|
return entity;
|
}
|
|
/// <summary>
|
/// 获取编码规则集合
|
/// </summary>
|
/// <returns></returns>
|
/// <history>[HanHe(xdl)] CREATED 2018/11/13</history>
|
public List<TN_AB_B_NUMRULEEntity> GetNumruleList()
|
{
|
try
|
{
|
|
List<TN_AB_B_NUMRULEEntity> entityList = MongoDBSingleton.Instance.FindAll<TN_AB_B_NUMRULEEntity>("TN_AB_B_NUMRULE");
|
return entityList;
|
}
|
catch (Exception)
|
{
|
|
throw;
|
}
|
}
|
#endregion
|
}
|
}
|