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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
|
| using HH.WMS.Entitys.Autobom;
| 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
| {
| /// <summary>
| /// 字典数据处理层
| /// </summary>
| /// <returns></returns>
| /// <history>[HanHe(XDL)] CREATED 2018/06/14</history>
| public class TN_AB_B_DICTDAL:BaseDAL
| {
| #region 获取字典集合
| /// <summary>
| /// 根据表名获取字典集合
| /// </summary>
| /// <param name="tableName">表名</param>
| /// <returns>字典集合</returns>
| /// <history>[HanHe(XDL)] CREATED 2018/06/14</history>
| public List<TN_AB_B_DICTEntity> GetDicList(string tableName)
| {
| string sql = @"SELECT S.CN_S_GUID
| ,CN_S_CODE
| ,CN_S_PARENT_GUID
| ,CN_S_PARENT_CODE
| ,CN_S_NAME
| ,CN_N_TYPE
| ,CN_N_ORDER
| ,CN_C_IS_DEFAULT
| ,CN_C_IS_ENABLE
| ,CN_N_CHILD_QTY
| ,CN_N_DEPTH
| ,CN_S_FROM
| ,CN_N_GROUP
| ,CN_S_CREATOR
| ,CN_S_CREATOR_NAME
| ,S.CN_T_CREATE
| ,CN_S_MODIFY_BY
| ,CN_S_MODIFY_NAME
| ,CN_T_MODIFY
| FROM TN_AB_B_SYNCH_LOG L LEFT JOIN TN_AB_B_DICT S
| ON L.CN_S_GUID=S.CN_S_GUID
| WHERE L.CN_S_TABLE_NAME='" + tableName + "' AND L.CN_N_OP_FLAG IN (1,2)";
| DbCommand cmd = DataAccess.GetSqlStringCommand(sql);
| List<TN_AB_B_DICTEntity> list = DataAccessExtensive.ExecuteListEntity<TN_AB_B_DICTEntity>(this.DataAccess, cmd, SetEntity);
| return list;
| }
|
| /// <summary>
| /// 设置实体的各列
| /// <summary>
| private void SetEntity(TN_AB_B_DICTEntity entity, IDataReader reader)
| {
| SetEntityUti(entity, "CN_S_GUID", "CN_S_GUID", reader);
| SetEntityUti(entity, "CN_S_CODE", "CN_S_CODE", reader);
| SetEntityUti(entity, "CN_S_PARENT_GUID", "CN_S_PARENT_GUID", reader);
| SetEntityUti(entity, "CN_S_PARENT_CODE", "CN_S_PARENT_CODE", reader);
| SetEntityUti(entity, "CN_S_NAME", "CN_S_NAME", reader);
| SetEntityUti(entity, "CN_N_TYPE", "CN_N_TYPE", reader);
| SetEntityUti(entity, "CN_N_ORDER", "CN_N_ORDER", reader);
| SetEntityUti(entity, "CN_C_IS_DEFAULT", "CN_C_IS_DEFAULT", reader);
| SetEntityUti(entity, "CN_C_IS_ENABLE", "CN_C_IS_ENABLE", reader);
| SetEntityUti(entity, "CN_N_CHILD_QTY", "CN_N_CHILD_QTY", reader);
| SetEntityUti(entity, "CN_N_DEPTH", "CN_N_DEPTH", reader);
| SetEntityUti(entity, "CN_S_FROM", "CN_S_FROM", reader);
| SetEntityUti(entity, "CN_N_GROUP", "CN_N_GROUP", 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_MODIFY_BY", "CN_S_MODIFY_BY", reader);
| SetEntityUti(entity, "CN_S_MODIFY_NAME", "CN_S_MODIFY_NAME", reader);
| SetEntityUti(entity, "CN_T_MODIFY", "CN_T_MODIFY", reader);
| }
| }
| #endregion
|
| }
|
|