jt
2021-06-10 5d0d028456874576560552f5a5c4e8b801786f11
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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
    }
}