浏览代码

字典项分组,新增跟进记录

zhoufan 7 年之前
父节点
当前提交
6ceecd3304
共有 20 个文件被更改,包括 1216 次插入295 次删除
  1. 1 0
      codegit/CallCenterApi/CallCenterApi.BLL/CallCenterApi.BLL.csproj
  2. 145 0
      codegit/CallCenterApi/CallCenterApi.BLL/T_Bus_Follow.cs
  3. 25 21
      codegit/CallCenterApi/CallCenterApi.BLL/T_Sys_DictionaryBase.cs
  4. 1 0
      codegit/CallCenterApi/CallCenterApi.DAL/CallCenterApi.DAL.csproj
  5. 380 0
      codegit/CallCenterApi/CallCenterApi.DAL/T_Bus_Follow.cs
  6. 90 81
      codegit/CallCenterApi/CallCenterApi.DAL/T_Bus_WorkOrder.cs
  7. 22 14
      codegit/CallCenterApi/CallCenterApi.DAL/T_Sys_Department.cs
  8. 98 52
      codegit/CallCenterApi/CallCenterApi.DAL/T_Sys_DictionaryBase.cs
  9. 61 23
      codegit/CallCenterApi/CallCenterApi.DAL/T_Sys_DictionaryValue.cs
  10. 16 4
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/AreaController.cs
  11. 25 4
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DepartmentController.cs
  12. 74 59
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DictionaryController.cs
  13. 88 8
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs
  14. 1 2
      codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/DictionaryInput.cs
  15. 1 0
      codegit/CallCenterApi/CallCenterApi.Model/CallCenterApi.Model.csproj
  16. 125 0
      codegit/CallCenterApi/CallCenterApi.Model/T_Bus_Follow.cs
  17. 12 3
      codegit/CallCenterApi/CallCenterApi.Model/T_Bus_WorkOrder.cs
  18. 17 11
      codegit/CallCenterApi/CallCenterApi.Model/T_Sys_Department.cs
  19. 23 8
      codegit/CallCenterApi/CallCenterApi.Model/T_Sys_DictionaryBase.cs
  20. 11 5
      codegit/CallCenterApi/CallCenterApi.Model/T_Sys_DictionaryValue.cs

+ 1 - 0
codegit/CallCenterApi/CallCenterApi.BLL/CallCenterApi.BLL.csproj

47
     <Compile Include="PagerBLL.cs" />
47
     <Compile Include="PagerBLL.cs" />
48
     <Compile Include="Properties\AssemblyInfo.cs" />
48
     <Compile Include="Properties\AssemblyInfo.cs" />
49
     <Compile Include="telloc_users.cs" />
49
     <Compile Include="telloc_users.cs" />
50
+    <Compile Include="T_Bus_Follow.cs" />
50
     <Compile Include="T_Bus_Operation.cs" />
51
     <Compile Include="T_Bus_Operation.cs" />
51
     <Compile Include="T_Bus_RemindRecord.cs" />
52
     <Compile Include="T_Bus_RemindRecord.cs" />
52
     <Compile Include="T_Bus_WorkOrder.cs" />
53
     <Compile Include="T_Bus_WorkOrder.cs" />

+ 145 - 0
codegit/CallCenterApi/CallCenterApi.BLL/T_Bus_Follow.cs

1
+using System;
2
+using System.Data;
3
+using System.Collections.Generic;
4
+using CallCenterApi.Model;
5
+namespace CallCenterApi.BLL
6
+{
7
+    /// <summary>
8
+    /// T_Bus_Follow
9
+    /// </summary>
10
+    public partial class T_Bus_Follow
11
+    {
12
+        private readonly CallCenterApi.DAL.T_Bus_Follow dal = new CallCenterApi.DAL.T_Bus_Follow();
13
+        public T_Bus_Follow()
14
+        { }
15
+        #region  BasicMethod
16
+        /// <summary>
17
+        /// 是否存在该记录
18
+        /// </summary>
19
+        public bool Exists(int F_Id)
20
+        {
21
+            return dal.Exists(F_Id);
22
+        }
23
+
24
+        /// <summary>
25
+        /// 增加一条数据
26
+        /// </summary>
27
+        public int Add(CallCenterApi.Model.T_Bus_Follow model)
28
+        {
29
+            return dal.Add(model);
30
+        }
31
+
32
+        /// <summary>
33
+        /// 更新一条数据
34
+        /// </summary>
35
+        public bool Update(CallCenterApi.Model.T_Bus_Follow model)
36
+        {
37
+            return dal.Update(model);
38
+        }
39
+
40
+        /// <summary>
41
+        /// 删除一条数据
42
+        /// </summary>
43
+        public bool Delete(int F_Id)
44
+        {
45
+
46
+            return dal.Delete(F_Id);
47
+        }
48
+        /// <summary>
49
+        /// 删除一条数据
50
+        /// </summary>
51
+        public bool DeleteList(string F_Idlist)
52
+        {
53
+            return dal.DeleteList(F_Idlist);
54
+        }
55
+
56
+        /// <summary>
57
+        /// 得到一个对象实体
58
+        /// </summary>
59
+        public CallCenterApi.Model.T_Bus_Follow GetModel(int F_Id)
60
+        {
61
+
62
+            return dal.GetModel(F_Id);
63
+        }
64
+
65
+        /// <summary>
66
+        /// 获得数据列表
67
+        /// </summary>
68
+        public DataSet GetList(string strWhere)
69
+        {
70
+            return dal.GetList(strWhere);
71
+        }
72
+        /// <summary>
73
+        /// 获得前几行数据
74
+        /// </summary>
75
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
76
+        {
77
+            return dal.GetList(Top, strWhere, filedOrder);
78
+        }
79
+        /// <summary>
80
+        /// 获得数据列表
81
+        /// </summary>
82
+        public List<CallCenterApi.Model.T_Bus_Follow> GetModelList(string strWhere)
83
+        {
84
+            DataSet ds = dal.GetList(strWhere);
85
+            return DataTableToList(ds.Tables[0]);
86
+        }
87
+        /// <summary>
88
+        /// 获得数据列表
89
+        /// </summary>
90
+        public List<CallCenterApi.Model.T_Bus_Follow> DataTableToList(DataTable dt)
91
+        {
92
+            List<CallCenterApi.Model.T_Bus_Follow> modelList = new List<CallCenterApi.Model.T_Bus_Follow>();
93
+            int rowsCount = dt.Rows.Count;
94
+            if (rowsCount > 0)
95
+            {
96
+                CallCenterApi.Model.T_Bus_Follow model;
97
+                for (int n = 0; n < rowsCount; n++)
98
+                {
99
+                    model = dal.DataRowToModel(dt.Rows[n]);
100
+                    if (model != null)
101
+                    {
102
+                        modelList.Add(model);
103
+                    }
104
+                }
105
+            }
106
+            return modelList;
107
+        }
108
+
109
+        /// <summary>
110
+        /// 获得数据列表
111
+        /// </summary>
112
+        public DataSet GetAllList()
113
+        {
114
+            return GetList("");
115
+        }
116
+
117
+        /// <summary>
118
+        /// 分页获取数据列表
119
+        /// </summary>
120
+        public int GetRecordCount(string strWhere)
121
+        {
122
+            return dal.GetRecordCount(strWhere);
123
+        }
124
+        /// <summary>
125
+        /// 分页获取数据列表
126
+        /// </summary>
127
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
128
+        {
129
+            return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
130
+        }
131
+        /// <summary>
132
+        /// 分页获取数据列表
133
+        /// </summary>
134
+        //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
135
+        //{
136
+        //return dal.GetList(PageSize,PageIndex,strWhere);
137
+        //}
138
+
139
+        #endregion  BasicMethod
140
+        #region  ExtensionMethod
141
+
142
+        #endregion  ExtensionMethod
143
+    }
144
+}
145
+

+ 25 - 21
codegit/CallCenterApi/CallCenterApi.BLL/T_Sys_DictionaryBase.cs

1
 using System;
1
 using System;
2
-using System.Collections.Generic;
3
 using System.Data;
2
 using System.Data;
4
-using System.Linq;
5
-using System.Text;
6
-using System.Threading.Tasks;
7
-
3
+using System.Collections.Generic;
4
+using CallCenterApi.Model;
8
 namespace CallCenterApi.BLL
5
 namespace CallCenterApi.BLL
9
 {
6
 {
10
     /// <summary>
7
     /// <summary>
12
     /// </summary>
9
     /// </summary>
13
     public partial class T_Sys_DictionaryBase
10
     public partial class T_Sys_DictionaryBase
14
     {
11
     {
15
-        private readonly DAL.T_Sys_DictionaryBase dal = new DAL.T_Sys_DictionaryBase();
12
+        private readonly CallCenterApi.DAL.T_Sys_DictionaryBase dal = new CallCenterApi.DAL.T_Sys_DictionaryBase();
16
         public T_Sys_DictionaryBase()
13
         public T_Sys_DictionaryBase()
17
         { }
14
         { }
18
         #region  BasicMethod
15
         #region  BasicMethod
19
         /// <summary>
16
         /// <summary>
20
         /// 是否存在该记录
17
         /// 是否存在该记录
21
         /// </summary>
18
         /// </summary>
22
-        public bool Exists(string F_DictionaryFlag)
19
+        public bool Exists(int F_Id)
23
         {
20
         {
24
-            return dal.Exists(F_DictionaryFlag);
21
+            return dal.Exists(F_Id);
25
         }
22
         }
26
 
23
 
27
         /// <summary>
24
         /// <summary>
28
         /// 增加一条数据
25
         /// 增加一条数据
29
         /// </summary>
26
         /// </summary>
30
-        public bool Add(Model.T_Sys_DictionaryBase model)
27
+        public int Add(CallCenterApi.Model.T_Sys_DictionaryBase model)
31
         {
28
         {
32
             return dal.Add(model);
29
             return dal.Add(model);
33
         }
30
         }
35
         /// <summary>
32
         /// <summary>
36
         /// 更新一条数据
33
         /// 更新一条数据
37
         /// </summary>
34
         /// </summary>
38
-        public bool Update(Model.T_Sys_DictionaryBase model)
35
+        public bool Update(CallCenterApi.Model.T_Sys_DictionaryBase model)
39
         {
36
         {
40
             return dal.Update(model);
37
             return dal.Update(model);
41
         }
38
         }
43
         /// <summary>
40
         /// <summary>
44
         /// 删除一条数据
41
         /// 删除一条数据
45
         /// </summary>
42
         /// </summary>
46
-        public bool Delete(string F_DictionaryFlag)
43
+        public bool Delete(int F_Id)
47
         {
44
         {
48
 
45
 
49
-            return dal.Delete(F_DictionaryFlag);
46
+            return dal.Delete(F_Id);
50
         }
47
         }
51
         /// <summary>
48
         /// <summary>
52
         /// 删除一条数据
49
         /// 删除一条数据
53
         /// </summary>
50
         /// </summary>
54
-        public bool DeleteList(string F_DictionaryFlaglist)
51
+        public bool DeleteList(string F_Idlist)
55
         {
52
         {
56
-            return dal.DeleteList(F_DictionaryFlaglist);
53
+            return dal.DeleteList(F_Idlist);
57
         }
54
         }
58
 
55
 
59
         /// <summary>
56
         /// <summary>
60
         /// 得到一个对象实体
57
         /// 得到一个对象实体
61
         /// </summary>
58
         /// </summary>
62
-        public Model.T_Sys_DictionaryBase GetModel(string F_DictionaryFlag)
59
+        public CallCenterApi.Model.T_Sys_DictionaryBase GetModel(int F_Id)
63
         {
60
         {
64
 
61
 
65
-            return dal.GetModel(F_DictionaryFlag);
62
+            return dal.GetModel(F_Id);
66
         }
63
         }
67
 
64
 
68
         /// <summary>
65
         /// <summary>
82
         /// <summary>
79
         /// <summary>
83
         /// 获得数据列表
80
         /// 获得数据列表
84
         /// </summary>
81
         /// </summary>
85
-        public List<Model.T_Sys_DictionaryBase> GetModelList(string strWhere)
82
+        public List<CallCenterApi.Model.T_Sys_DictionaryBase> GetModelList(string strWhere)
86
         {
83
         {
87
             DataSet ds = dal.GetList(strWhere);
84
             DataSet ds = dal.GetList(strWhere);
88
             return DataTableToList(ds.Tables[0]);
85
             return DataTableToList(ds.Tables[0]);
90
         /// <summary>
87
         /// <summary>
91
         /// 获得数据列表
88
         /// 获得数据列表
92
         /// </summary>
89
         /// </summary>
93
-        public List<Model.T_Sys_DictionaryBase> DataTableToList(DataTable dt)
90
+        public List<CallCenterApi.Model.T_Sys_DictionaryBase> DataTableToList(DataTable dt)
94
         {
91
         {
95
-            List<Model.T_Sys_DictionaryBase> modelList = new List<Model.T_Sys_DictionaryBase>();
92
+            List<CallCenterApi.Model.T_Sys_DictionaryBase> modelList = new List<CallCenterApi.Model.T_Sys_DictionaryBase>();
96
             int rowsCount = dt.Rows.Count;
93
             int rowsCount = dt.Rows.Count;
97
             if (rowsCount > 0)
94
             if (rowsCount > 0)
98
             {
95
             {
99
-                Model.T_Sys_DictionaryBase model;
96
+                CallCenterApi.Model.T_Sys_DictionaryBase model;
100
                 for (int n = 0; n < rowsCount; n++)
97
                 for (int n = 0; n < rowsCount; n++)
101
                 {
98
                 {
102
                     model = dal.DataRowToModel(dt.Rows[n]);
99
                     model = dal.DataRowToModel(dt.Rows[n]);
131
         {
128
         {
132
             return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
129
             return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
133
         }
130
         }
134
-
131
+        /// <summary>
132
+        /// 分页获取数据列表
133
+        /// </summary>
134
+        //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
135
+        //{
136
+        //return dal.GetList(PageSize,PageIndex,strWhere);
137
+        //}
135
 
138
 
136
         #endregion  BasicMethod
139
         #endregion  BasicMethod
137
         #region  ExtensionMethod
140
         #region  ExtensionMethod
139
         #endregion  ExtensionMethod
142
         #endregion  ExtensionMethod
140
     }
143
     }
141
 }
144
 }
145
+

+ 1 - 0
codegit/CallCenterApi/CallCenterApi.DAL/CallCenterApi.DAL.csproj

47
     <Compile Include="PagerDAL.cs" />
47
     <Compile Include="PagerDAL.cs" />
48
     <Compile Include="Properties\AssemblyInfo.cs" />
48
     <Compile Include="Properties\AssemblyInfo.cs" />
49
     <Compile Include="telloc_users.cs" />
49
     <Compile Include="telloc_users.cs" />
50
+    <Compile Include="T_Bus_Follow.cs" />
50
     <Compile Include="T_Bus_Operation.cs" />
51
     <Compile Include="T_Bus_Operation.cs" />
51
     <Compile Include="T_Bus_RemindRecord.cs" />
52
     <Compile Include="T_Bus_RemindRecord.cs" />
52
     <Compile Include="T_Bus_WorkOrder.cs" />
53
     <Compile Include="T_Bus_WorkOrder.cs" />

+ 380 - 0
codegit/CallCenterApi/CallCenterApi.DAL/T_Bus_Follow.cs

1
+using System;
2
+using System.Data;
3
+using System.Text;
4
+using System.Data.SqlClient;
5
+using CallCenterApi.DB;
6
+
7
+namespace CallCenterApi.DAL
8
+{
9
+    /// <summary>
10
+    /// 数据访问类:T_Bus_Follow
11
+    /// </summary>
12
+    public partial class T_Bus_Follow
13
+    {
14
+        public T_Bus_Follow()
15
+        { }
16
+        #region  BasicMethod
17
+        /// <summary>
18
+        /// 是否存在该记录
19
+        /// </summary>
20
+        public bool Exists(int F_Id)
21
+        {
22
+            StringBuilder strSql = new StringBuilder();
23
+            strSql.Append("select count(1) from T_Bus_Follow");
24
+            strSql.Append(" where F_Id=@F_Id");
25
+            SqlParameter[] parameters = {
26
+                    new SqlParameter("@F_Id", SqlDbType.Int,4)
27
+            };
28
+            parameters[0].Value = F_Id;
29
+
30
+            return DbHelperSQL.Exists(strSql.ToString(), parameters);
31
+        }
32
+
33
+
34
+        /// <summary>
35
+        /// 增加一条数据
36
+        /// </summary>
37
+        public int Add(CallCenterApi.Model.T_Bus_Follow model)
38
+        {
39
+            StringBuilder strSql = new StringBuilder();
40
+            strSql.Append("insert into T_Bus_Follow(");
41
+            strSql.Append("F_WorkOrderId,F_Title,F_Content,F_Remark,F_File,F_State,F_CreateUser,F_CreateTime,F_IsDelete,F_DeleteUser,F_DeleteTime)");
42
+            strSql.Append(" values (");
43
+            strSql.Append("@F_WorkOrderId,@F_Title,@F_Content,@F_Remark,@F_File,@F_State,@F_CreateUser,@F_CreateTime,@F_IsDelete,@F_DeleteUser,@F_DeleteTime)");
44
+            strSql.Append(";select @@IDENTITY");
45
+            SqlParameter[] parameters = {
46
+                    new SqlParameter("@F_WorkOrderId", SqlDbType.VarChar,50),
47
+                    new SqlParameter("@F_Title", SqlDbType.NVarChar,500),
48
+                    new SqlParameter("@F_Content", SqlDbType.NVarChar,-1),
49
+                    new SqlParameter("@F_Remark", SqlDbType.NVarChar,-1),
50
+                    new SqlParameter("@F_File", SqlDbType.VarChar,500),
51
+                    new SqlParameter("@F_State", SqlDbType.Int,4),
52
+                    new SqlParameter("@F_CreateUser", SqlDbType.VarChar,50),
53
+                    new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
54
+                    new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
55
+                    new SqlParameter("@F_DeleteUser", SqlDbType.VarChar,50),
56
+                    new SqlParameter("@F_DeleteTime", SqlDbType.DateTime)};
57
+            parameters[0].Value = model.F_WorkOrderId;
58
+            parameters[1].Value = model.F_Title;
59
+            parameters[2].Value = model.F_Content;
60
+            parameters[3].Value = model.F_Remark;
61
+            parameters[4].Value = model.F_File;
62
+            parameters[5].Value = model.F_State;
63
+            parameters[6].Value = model.F_CreateUser;
64
+            parameters[7].Value = model.F_CreateTime;
65
+            parameters[8].Value = model.F_IsDelete;
66
+            parameters[9].Value = model.F_DeleteUser;
67
+            parameters[10].Value = model.F_DeleteTime;
68
+
69
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
70
+            if (obj == null)
71
+            {
72
+                return 0;
73
+            }
74
+            else
75
+            {
76
+                return Convert.ToInt32(obj);
77
+            }
78
+        }
79
+        /// <summary>
80
+        /// 更新一条数据
81
+        /// </summary>
82
+        public bool Update(CallCenterApi.Model.T_Bus_Follow model)
83
+        {
84
+            StringBuilder strSql = new StringBuilder();
85
+            strSql.Append("update T_Bus_Follow set ");
86
+            strSql.Append("F_WorkOrderId=@F_WorkOrderId,");
87
+            strSql.Append("F_Title=@F_Title,");
88
+            strSql.Append("F_Content=@F_Content,");
89
+            strSql.Append("F_Remark=@F_Remark,");
90
+            strSql.Append("F_File=@F_File,");
91
+            strSql.Append("F_State=@F_State,");
92
+            strSql.Append("F_CreateUser=@F_CreateUser,");
93
+            strSql.Append("F_CreateTime=@F_CreateTime,");
94
+            strSql.Append("F_IsDelete=@F_IsDelete,");
95
+            strSql.Append("F_DeleteUser=@F_DeleteUser,");
96
+            strSql.Append("F_DeleteTime=@F_DeleteTime");
97
+            strSql.Append(" where F_Id=@F_Id");
98
+            SqlParameter[] parameters = {
99
+                    new SqlParameter("@F_WorkOrderId", SqlDbType.VarChar,50),
100
+                    new SqlParameter("@F_Title", SqlDbType.NVarChar,500),
101
+                    new SqlParameter("@F_Content", SqlDbType.NVarChar,-1),
102
+                    new SqlParameter("@F_Remark", SqlDbType.NVarChar,-1),
103
+                    new SqlParameter("@F_File", SqlDbType.VarChar,500),
104
+                    new SqlParameter("@F_State", SqlDbType.Int,4),
105
+                    new SqlParameter("@F_CreateUser", SqlDbType.VarChar,50),
106
+                    new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
107
+                    new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
108
+                    new SqlParameter("@F_DeleteUser", SqlDbType.VarChar,50),
109
+                    new SqlParameter("@F_DeleteTime", SqlDbType.DateTime),
110
+                    new SqlParameter("@F_Id", SqlDbType.Int,4)};
111
+            parameters[0].Value = model.F_WorkOrderId;
112
+            parameters[1].Value = model.F_Title;
113
+            parameters[2].Value = model.F_Content;
114
+            parameters[3].Value = model.F_Remark;
115
+            parameters[4].Value = model.F_File;
116
+            parameters[5].Value = model.F_State;
117
+            parameters[6].Value = model.F_CreateUser;
118
+            parameters[7].Value = model.F_CreateTime;
119
+            parameters[8].Value = model.F_IsDelete;
120
+            parameters[9].Value = model.F_DeleteUser;
121
+            parameters[10].Value = model.F_DeleteTime;
122
+            parameters[11].Value = model.F_Id;
123
+
124
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
125
+            if (rows > 0)
126
+            {
127
+                return true;
128
+            }
129
+            else
130
+            {
131
+                return false;
132
+            }
133
+        }
134
+
135
+        /// <summary>
136
+        /// 删除一条数据
137
+        /// </summary>
138
+        public bool Delete(int F_Id)
139
+        {
140
+
141
+            StringBuilder strSql = new StringBuilder();
142
+            strSql.Append("delete from T_Bus_Follow ");
143
+            strSql.Append(" where F_Id=@F_Id");
144
+            SqlParameter[] parameters = {
145
+                    new SqlParameter("@F_Id", SqlDbType.Int,4)
146
+            };
147
+            parameters[0].Value = F_Id;
148
+
149
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
150
+            if (rows > 0)
151
+            {
152
+                return true;
153
+            }
154
+            else
155
+            {
156
+                return false;
157
+            }
158
+        }
159
+        /// <summary>
160
+        /// 批量删除数据
161
+        /// </summary>
162
+        public bool DeleteList(string F_Idlist)
163
+        {
164
+            StringBuilder strSql = new StringBuilder();
165
+            strSql.Append("delete from T_Bus_Follow ");
166
+            strSql.Append(" where F_Id in (" + F_Idlist + ")  ");
167
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
168
+            if (rows > 0)
169
+            {
170
+                return true;
171
+            }
172
+            else
173
+            {
174
+                return false;
175
+            }
176
+        }
177
+
178
+
179
+        /// <summary>
180
+        /// 得到一个对象实体
181
+        /// </summary>
182
+        public CallCenterApi.Model.T_Bus_Follow GetModel(int F_Id)
183
+        {
184
+
185
+            StringBuilder strSql = new StringBuilder();
186
+            strSql.Append("select  top 1 F_Id,F_WorkOrderId,F_Title,F_Content,F_Remark,F_File,F_State,F_CreateUser,F_CreateTime,F_IsDelete,F_DeleteUser,F_DeleteTime from T_Bus_Follow ");
187
+            strSql.Append(" where F_Id=@F_Id");
188
+            SqlParameter[] parameters = {
189
+                    new SqlParameter("@F_Id", SqlDbType.Int,4)
190
+            };
191
+            parameters[0].Value = F_Id;
192
+
193
+            CallCenterApi.Model.T_Bus_Follow model = new CallCenterApi.Model.T_Bus_Follow();
194
+            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
195
+            if (ds.Tables[0].Rows.Count > 0)
196
+            {
197
+                return DataRowToModel(ds.Tables[0].Rows[0]);
198
+            }
199
+            else
200
+            {
201
+                return null;
202
+            }
203
+        }
204
+
205
+
206
+        /// <summary>
207
+        /// 得到一个对象实体
208
+        /// </summary>
209
+        public CallCenterApi.Model.T_Bus_Follow DataRowToModel(DataRow row)
210
+        {
211
+            CallCenterApi.Model.T_Bus_Follow model = new CallCenterApi.Model.T_Bus_Follow();
212
+            if (row != null)
213
+            {
214
+                if (row["F_Id"] != null && row["F_Id"].ToString() != "")
215
+                {
216
+                    model.F_Id = int.Parse(row["F_Id"].ToString());
217
+                }
218
+                if (row["F_WorkOrderId"] != null)
219
+                {
220
+                    model.F_WorkOrderId = row["F_WorkOrderId"].ToString();
221
+                }
222
+                if (row["F_Title"] != null)
223
+                {
224
+                    model.F_Title = row["F_Title"].ToString();
225
+                }
226
+                if (row["F_Content"] != null)
227
+                {
228
+                    model.F_Content = row["F_Content"].ToString();
229
+                }
230
+                if (row["F_Remark"] != null)
231
+                {
232
+                    model.F_Remark = row["F_Remark"].ToString();
233
+                }
234
+                if (row["F_File"] != null)
235
+                {
236
+                    model.F_File = row["F_File"].ToString();
237
+                }
238
+                if (row["F_State"] != null && row["F_State"].ToString() != "")
239
+                {
240
+                    model.F_State = int.Parse(row["F_State"].ToString());
241
+                }
242
+                if (row["F_CreateUser"] != null)
243
+                {
244
+                    model.F_CreateUser = row["F_CreateUser"].ToString();
245
+                }
246
+                if (row["F_CreateTime"] != null && row["F_CreateTime"].ToString() != "")
247
+                {
248
+                    model.F_CreateTime = DateTime.Parse(row["F_CreateTime"].ToString());
249
+                }
250
+                if (row["F_IsDelete"] != null && row["F_IsDelete"].ToString() != "")
251
+                {
252
+                    model.F_IsDelete = int.Parse(row["F_IsDelete"].ToString());
253
+                }
254
+                if (row["F_DeleteUser"] != null)
255
+                {
256
+                    model.F_DeleteUser = row["F_DeleteUser"].ToString();
257
+                }
258
+                if (row["F_DeleteTime"] != null && row["F_DeleteTime"].ToString() != "")
259
+                {
260
+                    model.F_DeleteTime = DateTime.Parse(row["F_DeleteTime"].ToString());
261
+                }
262
+            }
263
+            return model;
264
+        }
265
+
266
+        /// <summary>
267
+        /// 获得数据列表
268
+        /// </summary>
269
+        public DataSet GetList(string strWhere)
270
+        {
271
+            StringBuilder strSql = new StringBuilder();
272
+            strSql.Append("select F_Id,F_WorkOrderId,F_Title,F_Content,F_Remark,F_File,F_State,F_CreateUser,F_CreateTime,F_IsDelete,F_DeleteUser,F_DeleteTime ");
273
+            strSql.Append(" FROM T_Bus_Follow ");
274
+            if (strWhere.Trim() != "")
275
+            {
276
+                strSql.Append(" where " + strWhere);
277
+            }
278
+            return DbHelperSQL.Query(strSql.ToString());
279
+        }
280
+
281
+        /// <summary>
282
+        /// 获得前几行数据
283
+        /// </summary>
284
+        public DataSet GetList(int Top, string strWhere, string filedOrder)
285
+        {
286
+            StringBuilder strSql = new StringBuilder();
287
+            strSql.Append("select ");
288
+            if (Top > 0)
289
+            {
290
+                strSql.Append(" top " + Top.ToString());
291
+            }
292
+            strSql.Append(" F_Id,F_WorkOrderId,F_Title,F_Content,F_Remark,F_File,F_State,F_CreateUser,F_CreateTime,F_IsDelete,F_DeleteUser,F_DeleteTime ");
293
+            strSql.Append(" FROM T_Bus_Follow ");
294
+            if (strWhere.Trim() != "")
295
+            {
296
+                strSql.Append(" where " + strWhere);
297
+            }
298
+            strSql.Append(" order by " + filedOrder);
299
+            return DbHelperSQL.Query(strSql.ToString());
300
+        }
301
+
302
+        /// <summary>
303
+        /// 获取记录总数
304
+        /// </summary>
305
+        public int GetRecordCount(string strWhere)
306
+        {
307
+            StringBuilder strSql = new StringBuilder();
308
+            strSql.Append("select count(1) FROM T_Bus_Follow ");
309
+            if (strWhere.Trim() != "")
310
+            {
311
+                strSql.Append(" where " + strWhere);
312
+            }
313
+            object obj = DbHelperSQL.GetSingle(strSql.ToString());
314
+            if (obj == null)
315
+            {
316
+                return 0;
317
+            }
318
+            else
319
+            {
320
+                return Convert.ToInt32(obj);
321
+            }
322
+        }
323
+        /// <summary>
324
+        /// 分页获取数据列表
325
+        /// </summary>
326
+        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
327
+        {
328
+            StringBuilder strSql = new StringBuilder();
329
+            strSql.Append("SELECT * FROM ( ");
330
+            strSql.Append(" SELECT ROW_NUMBER() OVER (");
331
+            if (!string.IsNullOrEmpty(orderby.Trim()))
332
+            {
333
+                strSql.Append("order by T." + orderby);
334
+            }
335
+            else
336
+            {
337
+                strSql.Append("order by T.F_Id desc");
338
+            }
339
+            strSql.Append(")AS Row, T.*  from T_Bus_Follow T ");
340
+            if (!string.IsNullOrEmpty(strWhere.Trim()))
341
+            {
342
+                strSql.Append(" WHERE " + strWhere);
343
+            }
344
+            strSql.Append(" ) TT");
345
+            strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
346
+            return DbHelperSQL.Query(strSql.ToString());
347
+        }
348
+
349
+        /*
350
+		/// <summary>
351
+		/// 分页获取数据列表
352
+		/// </summary>
353
+		public DataSet GetList(int PageSize,int PageIndex,string strWhere)
354
+		{
355
+			SqlParameter[] parameters = {
356
+					new SqlParameter("@tblName", SqlDbType.VarChar, 255),
357
+					new SqlParameter("@fldName", SqlDbType.VarChar, 255),
358
+					new SqlParameter("@PageSize", SqlDbType.Int),
359
+					new SqlParameter("@PageIndex", SqlDbType.Int),
360
+					new SqlParameter("@IsReCount", SqlDbType.Bit),
361
+					new SqlParameter("@OrderType", SqlDbType.Bit),
362
+					new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
363
+					};
364
+			parameters[0].Value = "T_Bus_Follow";
365
+			parameters[1].Value = "F_Id";
366
+			parameters[2].Value = PageSize;
367
+			parameters[3].Value = PageIndex;
368
+			parameters[4].Value = 0;
369
+			parameters[5].Value = 0;
370
+			parameters[6].Value = strWhere;	
371
+			return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
372
+		}*/
373
+
374
+        #endregion  BasicMethod
375
+        #region  ExtensionMethod
376
+
377
+        #endregion  ExtensionMethod
378
+    }
379
+}
380
+

文件差异内容过多而无法显示
+ 90 - 81
codegit/CallCenterApi/CallCenterApi.DAL/T_Bus_WorkOrder.cs


+ 22 - 14
codegit/CallCenterApi/CallCenterApi.DAL/T_Sys_Department.cs

35
 
35
 
36
 
36
 
37
         /// <summary>
37
         /// <summary>
38
-        /// 增加一条数据
39
-        /// </summary>
40
-        public int Add(Model.T_Sys_Department model)
38
+		/// 增加一条数据
39
+		/// </summary>
40
+		public int Add(CallCenterApi.Model.T_Sys_Department model)
41
         {
41
         {
42
             StringBuilder strSql = new StringBuilder();
42
             StringBuilder strSql = new StringBuilder();
43
             strSql.Append("insert into T_Sys_Department(");
43
             strSql.Append("insert into T_Sys_Department(");
44
-            strSql.Append("F_DeptCode,F_ParentName,F_ParentId,F_ParentCode,F_DeptName,F_State,F_Layer,F_Type,F_Sort,F_Remark,F_Telephone,F_Mobile,F_OtherPhone,F_Email,F_Header)");
44
+            strSql.Append("F_DeptCode,F_ParentName,F_ParentId,F_ParentCode,F_DeptName,F_State,F_Layer,F_Type,F_Sort,F_Remark,F_Telephone,F_Mobile,F_OtherPhone,F_Email,F_Header,F_GroupCode)");
45
             strSql.Append(" values (");
45
             strSql.Append(" values (");
46
-            strSql.Append("@F_DeptCode,@F_ParentName,@F_ParentId,@F_ParentCode,@F_DeptName,@F_State,@F_Layer,@F_Type,@F_Sort,@F_Remark,@F_Telephone,@F_Mobile,@F_OtherPhone,@F_Email,@F_Header)");
46
+            strSql.Append("@F_DeptCode,@F_ParentName,@F_ParentId,@F_ParentCode,@F_DeptName,@F_State,@F_Layer,@F_Type,@F_Sort,@F_Remark,@F_Telephone,@F_Mobile,@F_OtherPhone,@F_Email,@F_Header,@F_GroupCode)");
47
             strSql.Append(";select @@IDENTITY");
47
             strSql.Append(";select @@IDENTITY");
48
             SqlParameter[] parameters = {
48
             SqlParameter[] parameters = {
49
                     new SqlParameter("@F_DeptCode", SqlDbType.VarChar,50),
49
                     new SqlParameter("@F_DeptCode", SqlDbType.VarChar,50),
60
                     new SqlParameter("@F_Mobile", SqlDbType.VarChar,50),
60
                     new SqlParameter("@F_Mobile", SqlDbType.VarChar,50),
61
                     new SqlParameter("@F_OtherPhone", SqlDbType.VarChar,50),
61
                     new SqlParameter("@F_OtherPhone", SqlDbType.VarChar,50),
62
                     new SqlParameter("@F_Email", SqlDbType.VarChar,50),
62
                     new SqlParameter("@F_Email", SqlDbType.VarChar,50),
63
-                    new SqlParameter("@F_Header", SqlDbType.Int,4)};
63
+                    new SqlParameter("@F_Header", SqlDbType.Int,4),
64
+                    new SqlParameter("@F_GroupCode", SqlDbType.VarChar,50)};
64
             parameters[0].Value = model.F_DeptCode;
65
             parameters[0].Value = model.F_DeptCode;
65
             parameters[1].Value = model.F_ParentName;
66
             parameters[1].Value = model.F_ParentName;
66
             parameters[2].Value = model.F_ParentId;
67
             parameters[2].Value = model.F_ParentId;
76
             parameters[12].Value = model.F_OtherPhone;
77
             parameters[12].Value = model.F_OtherPhone;
77
             parameters[13].Value = model.F_Email;
78
             parameters[13].Value = model.F_Email;
78
             parameters[14].Value = model.F_Header;
79
             parameters[14].Value = model.F_Header;
80
+            parameters[15].Value = model.F_GroupCode;
79
 
81
 
80
             object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
82
             object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
81
             if (obj == null)
83
             if (obj == null)
90
         /// <summary>
92
         /// <summary>
91
         /// 更新一条数据
93
         /// 更新一条数据
92
         /// </summary>
94
         /// </summary>
93
-        public bool Update(Model.T_Sys_Department model)
95
+        public bool Update(CallCenterApi.Model.T_Sys_Department model)
94
         {
96
         {
95
             StringBuilder strSql = new StringBuilder();
97
             StringBuilder strSql = new StringBuilder();
96
             strSql.Append("update T_Sys_Department set ");
98
             strSql.Append("update T_Sys_Department set ");
108
             strSql.Append("F_Mobile=@F_Mobile,");
110
             strSql.Append("F_Mobile=@F_Mobile,");
109
             strSql.Append("F_OtherPhone=@F_OtherPhone,");
111
             strSql.Append("F_OtherPhone=@F_OtherPhone,");
110
             strSql.Append("F_Email=@F_Email,");
112
             strSql.Append("F_Email=@F_Email,");
111
-            strSql.Append("F_Header=@F_Header");
113
+            strSql.Append("F_Header=@F_Header,");
114
+            strSql.Append("F_GroupCode=@F_GroupCode");
112
             strSql.Append(" where F_DeptId=@F_DeptId");
115
             strSql.Append(" where F_DeptId=@F_DeptId");
113
             SqlParameter[] parameters = {
116
             SqlParameter[] parameters = {
114
                     new SqlParameter("@F_DeptCode", SqlDbType.VarChar,50),
117
                     new SqlParameter("@F_DeptCode", SqlDbType.VarChar,50),
126
                     new SqlParameter("@F_OtherPhone", SqlDbType.VarChar,50),
129
                     new SqlParameter("@F_OtherPhone", SqlDbType.VarChar,50),
127
                     new SqlParameter("@F_Email", SqlDbType.VarChar,50),
130
                     new SqlParameter("@F_Email", SqlDbType.VarChar,50),
128
                     new SqlParameter("@F_Header", SqlDbType.Int,4),
131
                     new SqlParameter("@F_Header", SqlDbType.Int,4),
132
+                    new SqlParameter("@F_GroupCode", SqlDbType.VarChar,50),
129
                     new SqlParameter("@F_DeptId", SqlDbType.Int,4)};
133
                     new SqlParameter("@F_DeptId", SqlDbType.Int,4)};
130
             parameters[0].Value = model.F_DeptCode;
134
             parameters[0].Value = model.F_DeptCode;
131
             parameters[1].Value = model.F_ParentName;
135
             parameters[1].Value = model.F_ParentName;
142
             parameters[12].Value = model.F_OtherPhone;
146
             parameters[12].Value = model.F_OtherPhone;
143
             parameters[13].Value = model.F_Email;
147
             parameters[13].Value = model.F_Email;
144
             parameters[14].Value = model.F_Header;
148
             parameters[14].Value = model.F_Header;
145
-            parameters[15].Value = model.F_DeptId;
149
+            parameters[15].Value = model.F_GroupCode;
150
+            parameters[16].Value = model.F_DeptId;
146
 
151
 
147
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
152
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
148
             if (rows > 0)
153
             if (rows > 0)
206
         {
211
         {
207
 
212
 
208
             StringBuilder strSql = new StringBuilder();
213
             StringBuilder strSql = new StringBuilder();
209
-            strSql.Append("select TOP 1 F_DeptId,F_DeptCode,(SELECT B.F_DeptName FROM T_Sys_Department B WHERE B.F_DeptId=A.F_ParentId) AS F_ParentName,F_ParentId,F_ParentCode,F_DeptName,F_State,F_Layer,F_Type,F_Sort,F_Remark,F_Telephone,F_Mobile,F_OtherPhone,F_Email,F_Header from T_Sys_Department  A");
214
+            strSql.Append("select TOP 1 *,(SELECT B.F_DeptName FROM T_Sys_Department B WHERE B.F_DeptId=A.F_ParentId) AS F_ParentName from T_Sys_Department  A");
210
             strSql.Append(" where F_DeptId=@F_DeptId");
215
             strSql.Append(" where F_DeptId=@F_DeptId");
211
             SqlParameter[] parameters = {
216
             SqlParameter[] parameters = {
212
                     new SqlParameter("@F_DeptId", SqlDbType.Int,4)
217
                     new SqlParameter("@F_DeptId", SqlDbType.Int,4)
298
                 {
303
                 {
299
                     model.F_Header = int.Parse(row["F_Header"].ToString());
304
                     model.F_Header = int.Parse(row["F_Header"].ToString());
300
                 }
305
                 }
306
+                if (row["F_GroupCode"] != null)
307
+                {
308
+                    model.F_GroupCode = row["F_GroupCode"].ToString();
309
+                }
301
             }
310
             }
302
             return model;
311
             return model;
303
         }
312
         }
308
         public DataSet GetList(string strWhere)
317
         public DataSet GetList(string strWhere)
309
         {
318
         {
310
             StringBuilder strSql = new StringBuilder();
319
             StringBuilder strSql = new StringBuilder();
311
-            strSql.Append("select F_DeptId,F_DeptCode,F_ParentName,F_ParentId,F_ParentCode,F_DeptName,F_State,F_Layer,F_Type,F_Sort,F_Remark,F_Telephone,F_Mobile,F_OtherPhone,F_Email,F_Header ");
312
-            strSql.Append(" FROM T_Sys_Department ");
320
+            strSql.Append("select * FROM T_Sys_Department ");
313
             if (strWhere.Trim() != "")
321
             if (strWhere.Trim() != "")
314
             {
322
             {
315
                 strSql.Append(" where " + strWhere);
323
                 strSql.Append(" where " + strWhere);
328
             {
336
             {
329
                 strSql.Append(" top " + Top.ToString());
337
                 strSql.Append(" top " + Top.ToString());
330
             }
338
             }
331
-            strSql.Append(" F_DeptId,F_DeptCode,F_ParentName,F_ParentId,F_ParentCode,F_DeptName,F_State,F_Layer,F_Type,F_Sort,F_Remark,F_Telephone,F_Mobile,F_OtherPhone,F_Email,F_Header ");
332
-            strSql.Append(" FROM T_Sys_Department ");
339
+            
340
+            strSql.Append(" * FROM T_Sys_Department ");
333
             if (strWhere.Trim() != "")
341
             if (strWhere.Trim() != "")
334
             {
342
             {
335
                 strSql.Append(" where " + strWhere);
343
                 strSql.Append(" where " + strWhere);

+ 98 - 52
codegit/CallCenterApi/CallCenterApi.DAL/T_Sys_DictionaryBase.cs

1
-using CallCenterApi.DB;
2
-using System;
3
-using System.Collections.Generic;
1
+using System;
4
 using System.Data;
2
 using System.Data;
5
-using System.Data.SqlClient;
6
-using System.Linq;
7
 using System.Text;
3
 using System.Text;
8
-using System.Threading.Tasks;
4
+using System.Data.SqlClient;
5
+using CallCenterApi.DB;
9
 
6
 
10
 namespace CallCenterApi.DAL
7
 namespace CallCenterApi.DAL
11
 {
8
 {
12
-    // <summary>
9
+    /// <summary>
13
     /// 数据访问类:T_Sys_DictionaryBase
10
     /// 数据访问类:T_Sys_DictionaryBase
14
     /// </summary>
11
     /// </summary>
15
     public partial class T_Sys_DictionaryBase
12
     public partial class T_Sys_DictionaryBase
17
         public T_Sys_DictionaryBase()
14
         public T_Sys_DictionaryBase()
18
         { }
15
         { }
19
         #region  BasicMethod
16
         #region  BasicMethod
20
-
21
         /// <summary>
17
         /// <summary>
22
         /// 是否存在该记录
18
         /// 是否存在该记录
23
         /// </summary>
19
         /// </summary>
24
-        public bool Exists(string F_DictionaryFlag)
20
+        public bool Exists(int F_Id)
25
         {
21
         {
26
             StringBuilder strSql = new StringBuilder();
22
             StringBuilder strSql = new StringBuilder();
27
             strSql.Append("select count(1) from T_Sys_DictionaryBase");
23
             strSql.Append("select count(1) from T_Sys_DictionaryBase");
28
-            strSql.Append(" where F_DictionaryFlag=@F_DictionaryFlag ");
24
+            strSql.Append(" where F_Id=@F_Id");
29
             SqlParameter[] parameters = {
25
             SqlParameter[] parameters = {
30
-                    new SqlParameter("@F_DictionaryFlag", SqlDbType.VarChar,50)         };
31
-            parameters[0].Value = F_DictionaryFlag;
26
+                    new SqlParameter("@F_Id", SqlDbType.Int,4)
27
+            };
28
+            parameters[0].Value = F_Id;
32
 
29
 
33
             return DbHelperSQL.Exists(strSql.ToString(), parameters);
30
             return DbHelperSQL.Exists(strSql.ToString(), parameters);
34
         }
31
         }
37
         /// <summary>
34
         /// <summary>
38
         /// 增加一条数据
35
         /// 增加一条数据
39
         /// </summary>
36
         /// </summary>
40
-        public bool Add(Model.T_Sys_DictionaryBase model)
37
+        public int Add(CallCenterApi.Model.T_Sys_DictionaryBase model)
41
         {
38
         {
42
             StringBuilder strSql = new StringBuilder();
39
             StringBuilder strSql = new StringBuilder();
43
             strSql.Append("insert into T_Sys_DictionaryBase(");
40
             strSql.Append("insert into T_Sys_DictionaryBase(");
44
-            strSql.Append("F_DictionaryFlag,F_DictionaryName,F_Sort,F_Describe,F_State)");
41
+            strSql.Append("F_DictionaryFlag,F_DictionaryName,F_Sort,F_Describe,F_State,F_GroupCode)");
45
             strSql.Append(" values (");
42
             strSql.Append(" values (");
46
-            strSql.Append("@F_DictionaryFlag,@F_DictionaryName,@F_Sort,@F_Describe,@F_State)");
43
+            strSql.Append("@F_DictionaryFlag,@F_DictionaryName,@F_Sort,@F_Describe,@F_State,@F_GroupCode)");
44
+            strSql.Append(";select @@IDENTITY");
47
             SqlParameter[] parameters = {
45
             SqlParameter[] parameters = {
48
                     new SqlParameter("@F_DictionaryFlag", SqlDbType.VarChar,50),
46
                     new SqlParameter("@F_DictionaryFlag", SqlDbType.VarChar,50),
49
                     new SqlParameter("@F_DictionaryName", SqlDbType.VarChar,50),
47
                     new SqlParameter("@F_DictionaryName", SqlDbType.VarChar,50),
50
                     new SqlParameter("@F_Sort", SqlDbType.Int,4),
48
                     new SqlParameter("@F_Sort", SqlDbType.Int,4),
51
                     new SqlParameter("@F_Describe", SqlDbType.VarChar,100),
49
                     new SqlParameter("@F_Describe", SqlDbType.VarChar,100),
52
-                    new SqlParameter("@F_State", SqlDbType.VarChar,20)};
50
+                    new SqlParameter("@F_State", SqlDbType.Bit,1),
51
+                    new SqlParameter("@F_GroupCode", SqlDbType.VarChar,50)};
53
             parameters[0].Value = model.F_DictionaryFlag;
52
             parameters[0].Value = model.F_DictionaryFlag;
54
             parameters[1].Value = model.F_DictionaryName;
53
             parameters[1].Value = model.F_DictionaryName;
55
             parameters[2].Value = model.F_Sort;
54
             parameters[2].Value = model.F_Sort;
56
             parameters[3].Value = model.F_Describe;
55
             parameters[3].Value = model.F_Describe;
57
             parameters[4].Value = model.F_State;
56
             parameters[4].Value = model.F_State;
57
+            parameters[5].Value = model.F_GroupCode;
58
 
58
 
59
-            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
60
-            if (rows > 0)
59
+            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
60
+            if (obj == null)
61
             {
61
             {
62
-                return true;
62
+                return 0;
63
             }
63
             }
64
             else
64
             else
65
             {
65
             {
66
-                return false;
66
+                return Convert.ToInt32(obj);
67
             }
67
             }
68
         }
68
         }
69
         /// <summary>
69
         /// <summary>
70
         /// 更新一条数据
70
         /// 更新一条数据
71
         /// </summary>
71
         /// </summary>
72
-        public bool Update(Model.T_Sys_DictionaryBase model)
72
+        public bool Update(CallCenterApi.Model.T_Sys_DictionaryBase model)
73
         {
73
         {
74
             StringBuilder strSql = new StringBuilder();
74
             StringBuilder strSql = new StringBuilder();
75
             strSql.Append("update T_Sys_DictionaryBase set ");
75
             strSql.Append("update T_Sys_DictionaryBase set ");
76
+            strSql.Append("F_DictionaryFlag=@F_DictionaryFlag,");
76
             strSql.Append("F_DictionaryName=@F_DictionaryName,");
77
             strSql.Append("F_DictionaryName=@F_DictionaryName,");
77
             strSql.Append("F_Sort=@F_Sort,");
78
             strSql.Append("F_Sort=@F_Sort,");
78
             strSql.Append("F_Describe=@F_Describe,");
79
             strSql.Append("F_Describe=@F_Describe,");
79
-            strSql.Append("F_State=@F_State");
80
-            strSql.Append(" where F_DictionaryFlag=@F_DictionaryFlag ");
80
+            strSql.Append("F_State=@F_State,");
81
+            strSql.Append("F_GroupCode=@F_GroupCode");
82
+            strSql.Append(" where F_Id=@F_Id");
81
             SqlParameter[] parameters = {
83
             SqlParameter[] parameters = {
84
+                    new SqlParameter("@F_DictionaryFlag", SqlDbType.VarChar,50),
82
                     new SqlParameter("@F_DictionaryName", SqlDbType.VarChar,50),
85
                     new SqlParameter("@F_DictionaryName", SqlDbType.VarChar,50),
83
                     new SqlParameter("@F_Sort", SqlDbType.Int,4),
86
                     new SqlParameter("@F_Sort", SqlDbType.Int,4),
84
                     new SqlParameter("@F_Describe", SqlDbType.VarChar,100),
87
                     new SqlParameter("@F_Describe", SqlDbType.VarChar,100),
85
-                    new SqlParameter("@F_State", SqlDbType.VarChar,20),
86
-                    new SqlParameter("@F_DictionaryFlag", SqlDbType.VarChar,50)};
87
-            parameters[0].Value = model.F_DictionaryName;
88
-            parameters[1].Value = model.F_Sort;
89
-            parameters[2].Value = model.F_Describe;
90
-            parameters[3].Value = model.F_State;
91
-            parameters[4].Value = model.F_DictionaryFlag;
88
+                    new SqlParameter("@F_State", SqlDbType.Bit,1),
89
+                    new SqlParameter("@F_GroupCode", SqlDbType.VarChar,50),
90
+                    new SqlParameter("@F_Id", SqlDbType.Int,4)};
91
+            parameters[0].Value = model.F_DictionaryFlag;
92
+            parameters[1].Value = model.F_DictionaryName;
93
+            parameters[2].Value = model.F_Sort;
94
+            parameters[3].Value = model.F_Describe;
95
+            parameters[4].Value = model.F_State;
96
+            parameters[5].Value = model.F_GroupCode;
97
+            parameters[6].Value = model.F_Id;
92
 
98
 
93
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
99
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
94
             if (rows > 0)
100
             if (rows > 0)
104
         /// <summary>
110
         /// <summary>
105
         /// 删除一条数据
111
         /// 删除一条数据
106
         /// </summary>
112
         /// </summary>
107
-        public bool Delete(string F_DictionaryFlag)
113
+        public bool Delete(int F_Id)
108
         {
114
         {
109
 
115
 
110
             StringBuilder strSql = new StringBuilder();
116
             StringBuilder strSql = new StringBuilder();
111
             strSql.Append("delete from T_Sys_DictionaryBase ");
117
             strSql.Append("delete from T_Sys_DictionaryBase ");
112
-            strSql.Append(" where F_DictionaryFlag=@F_DictionaryFlag ");
118
+            strSql.Append(" where F_Id=@F_Id");
113
             SqlParameter[] parameters = {
119
             SqlParameter[] parameters = {
114
-                    new SqlParameter("@F_DictionaryFlag", SqlDbType.VarChar,50)         };
115
-            parameters[0].Value = F_DictionaryFlag;
120
+                    new SqlParameter("@F_Id", SqlDbType.Int,4)
121
+            };
122
+            parameters[0].Value = F_Id;
116
 
123
 
117
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
124
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
118
             if (rows > 0)
125
             if (rows > 0)
127
         /// <summary>
134
         /// <summary>
128
         /// 批量删除数据
135
         /// 批量删除数据
129
         /// </summary>
136
         /// </summary>
130
-        public bool DeleteList(string F_DictionaryFlaglist)
137
+        public bool DeleteList(string F_Idlist)
131
         {
138
         {
132
             StringBuilder strSql = new StringBuilder();
139
             StringBuilder strSql = new StringBuilder();
133
             strSql.Append("delete from T_Sys_DictionaryBase ");
140
             strSql.Append("delete from T_Sys_DictionaryBase ");
134
-            strSql.Append(" where F_DictionaryFlag in (" + F_DictionaryFlaglist + ")  ");
141
+            strSql.Append(" where F_Id in (" + F_Idlist + ")  ");
135
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
142
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
136
             if (rows > 0)
143
             if (rows > 0)
137
             {
144
             {
147
         /// <summary>
154
         /// <summary>
148
         /// 得到一个对象实体
155
         /// 得到一个对象实体
149
         /// </summary>
156
         /// </summary>
150
-        public Model.T_Sys_DictionaryBase GetModel(string F_DictionaryFlag)
157
+        public CallCenterApi.Model.T_Sys_DictionaryBase GetModel(int F_Id)
151
         {
158
         {
152
 
159
 
153
             StringBuilder strSql = new StringBuilder();
160
             StringBuilder strSql = new StringBuilder();
154
-            strSql.Append("select  top 1 F_DictionaryFlag,F_DictionaryName,F_Sort,F_Describe,F_State from T_Sys_DictionaryBase ");
155
-            strSql.Append(" where F_DictionaryFlag=@F_DictionaryFlag ");
161
+            strSql.Append("select  top 1 F_Id,F_DictionaryFlag,F_DictionaryName,F_Sort,F_Describe,F_State,F_GroupCode from T_Sys_DictionaryBase ");
162
+            strSql.Append(" where F_Id=@F_Id");
156
             SqlParameter[] parameters = {
163
             SqlParameter[] parameters = {
157
-                    new SqlParameter("@F_DictionaryFlag", SqlDbType.VarChar,50)         };
158
-            parameters[0].Value = F_DictionaryFlag;
164
+                    new SqlParameter("@F_Id", SqlDbType.Int,4)
165
+            };
166
+            parameters[0].Value = F_Id;
159
 
167
 
160
-            Model.T_Sys_DictionaryBase model = new Model.T_Sys_DictionaryBase();
168
+            CallCenterApi.Model.T_Sys_DictionaryBase model = new CallCenterApi.Model.T_Sys_DictionaryBase();
161
             DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
169
             DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
162
             if (ds.Tables[0].Rows.Count > 0)
170
             if (ds.Tables[0].Rows.Count > 0)
163
             {
171
             {
173
         /// <summary>
181
         /// <summary>
174
         /// 得到一个对象实体
182
         /// 得到一个对象实体
175
         /// </summary>
183
         /// </summary>
176
-        public Model.T_Sys_DictionaryBase DataRowToModel(DataRow row)
184
+        public CallCenterApi.Model.T_Sys_DictionaryBase DataRowToModel(DataRow row)
177
         {
185
         {
178
-            Model.T_Sys_DictionaryBase model = new Model.T_Sys_DictionaryBase();
186
+            CallCenterApi.Model.T_Sys_DictionaryBase model = new CallCenterApi.Model.T_Sys_DictionaryBase();
179
             if (row != null)
187
             if (row != null)
180
             {
188
             {
189
+                if (row["F_Id"] != null && row["F_Id"].ToString() != "")
190
+                {
191
+                    model.F_Id = int.Parse(row["F_Id"].ToString());
192
+                }
181
                 if (row["F_DictionaryFlag"] != null)
193
                 if (row["F_DictionaryFlag"] != null)
182
                 {
194
                 {
183
                     model.F_DictionaryFlag = row["F_DictionaryFlag"].ToString();
195
                     model.F_DictionaryFlag = row["F_DictionaryFlag"].ToString();
190
                 {
202
                 {
191
                     model.F_Sort = int.Parse(row["F_Sort"].ToString());
203
                     model.F_Sort = int.Parse(row["F_Sort"].ToString());
192
                 }
204
                 }
193
-                if (row["F_Describe"] != null)  
205
+                if (row["F_Describe"] != null)
194
                 {
206
                 {
195
                     model.F_Describe = row["F_Describe"].ToString();
207
                     model.F_Describe = row["F_Describe"].ToString();
196
                 }
208
                 }
197
-                if (row["F_State"] != null && row["F_State"] != DBNull.Value)
209
+                if (row["F_State"] != null && row["F_State"].ToString() != "")
210
+                {
211
+                    if ((row["F_State"].ToString() == "1") || (row["F_State"].ToString().ToLower() == "true"))
212
+                    {
213
+                        model.F_State = true;
214
+                    }
215
+                    else
216
+                    {
217
+                        model.F_State = false;
218
+                    }
219
+                }
220
+                if (row["F_GroupCode"] != null)
198
                 {
221
                 {
199
-                    model.F_State = Convert.ToBoolean(row["F_State"]);
222
+                    model.F_GroupCode = row["F_GroupCode"].ToString();
200
                 }
223
                 }
201
-                else { model.F_State = false; }
202
             }
224
             }
203
             return model;
225
             return model;
204
         }
226
         }
209
         public DataSet GetList(string strWhere)
231
         public DataSet GetList(string strWhere)
210
         {
232
         {
211
             StringBuilder strSql = new StringBuilder();
233
             StringBuilder strSql = new StringBuilder();
212
-            strSql.Append("select F_DictionaryFlag,F_DictionaryName,F_Sort,F_Describe,F_State ");
234
+            strSql.Append("select F_Id,F_DictionaryFlag,F_DictionaryName,F_Sort,F_Describe,F_State,F_GroupCode ");
213
             strSql.Append(" FROM T_Sys_DictionaryBase ");
235
             strSql.Append(" FROM T_Sys_DictionaryBase ");
214
             if (strWhere.Trim() != "")
236
             if (strWhere.Trim() != "")
215
             {
237
             {
229
             {
251
             {
230
                 strSql.Append(" top " + Top.ToString());
252
                 strSql.Append(" top " + Top.ToString());
231
             }
253
             }
232
-            strSql.Append(" F_DictionaryFlag,F_DictionaryName,F_Sort,F_Describe,F_State ");
254
+            strSql.Append(" F_Id,F_DictionaryFlag,F_DictionaryName,F_Sort,F_Describe,F_State,F_GroupCode ");
233
             strSql.Append(" FROM T_Sys_DictionaryBase ");
255
             strSql.Append(" FROM T_Sys_DictionaryBase ");
234
             if (strWhere.Trim() != "")
256
             if (strWhere.Trim() != "")
235
             {
257
             {
274
             }
296
             }
275
             else
297
             else
276
             {
298
             {
277
-                strSql.Append("order by T.F_DictionaryFlag desc");
299
+                strSql.Append("order by T.F_Id desc");
278
             }
300
             }
279
             strSql.Append(")AS Row, T.*  from T_Sys_DictionaryBase T ");
301
             strSql.Append(")AS Row, T.*  from T_Sys_DictionaryBase T ");
280
             if (!string.IsNullOrEmpty(strWhere.Trim()))
302
             if (!string.IsNullOrEmpty(strWhere.Trim()))
286
             return DbHelperSQL.Query(strSql.ToString());
308
             return DbHelperSQL.Query(strSql.ToString());
287
         }
309
         }
288
 
310
 
289
-
311
+        /*
312
+		/// <summary>
313
+		/// 分页获取数据列表
314
+		/// </summary>
315
+		public DataSet GetList(int PageSize,int PageIndex,string strWhere)
316
+		{
317
+			SqlParameter[] parameters = {
318
+					new SqlParameter("@tblName", SqlDbType.VarChar, 255),
319
+					new SqlParameter("@fldName", SqlDbType.VarChar, 255),
320
+					new SqlParameter("@PageSize", SqlDbType.Int),
321
+					new SqlParameter("@PageIndex", SqlDbType.Int),
322
+					new SqlParameter("@IsReCount", SqlDbType.Bit),
323
+					new SqlParameter("@OrderType", SqlDbType.Bit),
324
+					new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
325
+					};
326
+			parameters[0].Value = "T_Sys_DictionaryBase";
327
+			parameters[1].Value = "F_Id";
328
+			parameters[2].Value = PageSize;
329
+			parameters[3].Value = PageIndex;
330
+			parameters[4].Value = 0;
331
+			parameters[5].Value = 0;
332
+			parameters[6].Value = strWhere;	
333
+			return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
334
+		}*/
290
 
335
 
291
         #endregion  BasicMethod
336
         #endregion  BasicMethod
292
         #region  ExtensionMethod
337
         #region  ExtensionMethod
294
         #endregion  ExtensionMethod
339
         #endregion  ExtensionMethod
295
     }
340
     }
296
 }
341
 }
342
+

+ 61 - 23
codegit/CallCenterApi/CallCenterApi.DAL/T_Sys_DictionaryValue.cs

1
-using CallCenterApi.DB;
2
-using System;
3
-using System.Collections.Generic;
1
+using System;
4
 using System.Data;
2
 using System.Data;
5
-using System.Data.SqlClient;
6
-using System.Linq;
7
 using System.Text;
3
 using System.Text;
8
-using System.Threading.Tasks;
4
+using System.Data.SqlClient;
5
+using CallCenterApi.DB;
9
 
6
 
10
 namespace CallCenterApi.DAL
7
 namespace CallCenterApi.DAL
11
 {
8
 {
37
         /// <summary>
34
         /// <summary>
38
         /// 增加一条数据
35
         /// 增加一条数据
39
         /// </summary>
36
         /// </summary>
40
-        public int Add(Model.T_Sys_DictionaryValue model)
37
+        public int Add(CallCenterApi.Model.T_Sys_DictionaryValue model)
41
         {
38
         {
42
             StringBuilder strSql = new StringBuilder();
39
             StringBuilder strSql = new StringBuilder();
43
             strSql.Append("insert into T_Sys_DictionaryValue(");
40
             strSql.Append("insert into T_Sys_DictionaryValue(");
44
-            strSql.Append("F_DictionaryFlag,F_ValueCode,F_Name,F_Sort,F_Describe,F_State)");
41
+            strSql.Append("F_DictionaryFlag,F_ValueCode,F_Name,F_Sort,F_Describe,F_State,F_GroupCode)");
45
             strSql.Append(" values (");
42
             strSql.Append(" values (");
46
-            strSql.Append("@F_DictionaryFlag,@F_ValueCode,@F_Name,@F_Sort,@F_Describe,@F_State)");
43
+            strSql.Append("@F_DictionaryFlag,@F_ValueCode,@F_Name,@F_Sort,@F_Describe,@F_State,@F_GroupCode)");
47
             strSql.Append(";select @@IDENTITY");
44
             strSql.Append(";select @@IDENTITY");
48
             SqlParameter[] parameters = {
45
             SqlParameter[] parameters = {
49
                     new SqlParameter("@F_DictionaryFlag", SqlDbType.VarChar,50),
46
                     new SqlParameter("@F_DictionaryFlag", SqlDbType.VarChar,50),
51
                     new SqlParameter("@F_Name", SqlDbType.VarChar,50),
48
                     new SqlParameter("@F_Name", SqlDbType.VarChar,50),
52
                     new SqlParameter("@F_Sort", SqlDbType.Int,4),
49
                     new SqlParameter("@F_Sort", SqlDbType.Int,4),
53
                     new SqlParameter("@F_Describe", SqlDbType.VarChar,-1),
50
                     new SqlParameter("@F_Describe", SqlDbType.VarChar,-1),
54
-                    new SqlParameter("@F_State", SqlDbType.VarChar,50)};
51
+                    new SqlParameter("@F_State", SqlDbType.Bit,1),
52
+                    new SqlParameter("@F_GroupCode", SqlDbType.VarChar,50)};
55
             parameters[0].Value = model.F_DictionaryFlag;
53
             parameters[0].Value = model.F_DictionaryFlag;
56
             parameters[1].Value = model.F_ValueCode;
54
             parameters[1].Value = model.F_ValueCode;
57
             parameters[2].Value = model.F_Name;
55
             parameters[2].Value = model.F_Name;
58
             parameters[3].Value = model.F_Sort;
56
             parameters[3].Value = model.F_Sort;
59
             parameters[4].Value = model.F_Describe;
57
             parameters[4].Value = model.F_Describe;
60
             parameters[5].Value = model.F_State;
58
             parameters[5].Value = model.F_State;
59
+            parameters[6].Value = model.F_GroupCode;
61
 
60
 
62
             object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
61
             object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
63
             if (obj == null)
62
             if (obj == null)
72
         /// <summary>
71
         /// <summary>
73
         /// 更新一条数据
72
         /// 更新一条数据
74
         /// </summary>
73
         /// </summary>
75
-        public bool Update(Model.T_Sys_DictionaryValue model)
74
+        public bool Update(CallCenterApi.Model.T_Sys_DictionaryValue model)
76
         {
75
         {
77
             StringBuilder strSql = new StringBuilder();
76
             StringBuilder strSql = new StringBuilder();
78
             strSql.Append("update T_Sys_DictionaryValue set ");
77
             strSql.Append("update T_Sys_DictionaryValue set ");
81
             strSql.Append("F_Name=@F_Name,");
80
             strSql.Append("F_Name=@F_Name,");
82
             strSql.Append("F_Sort=@F_Sort,");
81
             strSql.Append("F_Sort=@F_Sort,");
83
             strSql.Append("F_Describe=@F_Describe,");
82
             strSql.Append("F_Describe=@F_Describe,");
84
-            strSql.Append("F_State=@F_State");
83
+            strSql.Append("F_State=@F_State,");
84
+            strSql.Append("F_GroupCode=@F_GroupCode");
85
             strSql.Append(" where F_DictionaryValueId=@F_DictionaryValueId");
85
             strSql.Append(" where F_DictionaryValueId=@F_DictionaryValueId");
86
             SqlParameter[] parameters = {
86
             SqlParameter[] parameters = {
87
                     new SqlParameter("@F_DictionaryFlag", SqlDbType.VarChar,50),
87
                     new SqlParameter("@F_DictionaryFlag", SqlDbType.VarChar,50),
89
                     new SqlParameter("@F_Name", SqlDbType.VarChar,50),
89
                     new SqlParameter("@F_Name", SqlDbType.VarChar,50),
90
                     new SqlParameter("@F_Sort", SqlDbType.Int,4),
90
                     new SqlParameter("@F_Sort", SqlDbType.Int,4),
91
                     new SqlParameter("@F_Describe", SqlDbType.VarChar,-1),
91
                     new SqlParameter("@F_Describe", SqlDbType.VarChar,-1),
92
-                    new SqlParameter("@F_State", SqlDbType.VarChar,50),
92
+                    new SqlParameter("@F_State", SqlDbType.Bit,1),
93
+                    new SqlParameter("@F_GroupCode", SqlDbType.VarChar,50),
93
                     new SqlParameter("@F_DictionaryValueId", SqlDbType.Int,4)};
94
                     new SqlParameter("@F_DictionaryValueId", SqlDbType.Int,4)};
94
             parameters[0].Value = model.F_DictionaryFlag;
95
             parameters[0].Value = model.F_DictionaryFlag;
95
             parameters[1].Value = model.F_ValueCode;
96
             parameters[1].Value = model.F_ValueCode;
97
             parameters[3].Value = model.F_Sort;
98
             parameters[3].Value = model.F_Sort;
98
             parameters[4].Value = model.F_Describe;
99
             parameters[4].Value = model.F_Describe;
99
             parameters[5].Value = model.F_State;
100
             parameters[5].Value = model.F_State;
100
-            parameters[6].Value = model.F_DictionaryValueId;
101
+            parameters[6].Value = model.F_GroupCode;
102
+            parameters[7].Value = model.F_DictionaryValueId;
101
 
103
 
102
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
104
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
103
             if (rows > 0)
105
             if (rows > 0)
157
         /// <summary>
159
         /// <summary>
158
         /// 得到一个对象实体
160
         /// 得到一个对象实体
159
         /// </summary>
161
         /// </summary>
160
-        public Model.T_Sys_DictionaryValue GetModel(int F_DictionaryValueId)
162
+        public CallCenterApi.Model.T_Sys_DictionaryValue GetModel(int F_DictionaryValueId)
161
         {
163
         {
162
 
164
 
163
             StringBuilder strSql = new StringBuilder();
165
             StringBuilder strSql = new StringBuilder();
164
-            strSql.Append("select  top 1 F_DictionaryValueId,F_DictionaryFlag,F_ValueCode,F_Name,F_Sort,F_Describe,F_State from T_Sys_DictionaryValue ");
166
+            strSql.Append("select  top 1 F_DictionaryValueId,F_DictionaryFlag,F_ValueCode,F_Name,F_Sort,F_Describe,F_State,F_GroupCode from T_Sys_DictionaryValue ");
165
             strSql.Append(" where F_DictionaryValueId=@F_DictionaryValueId");
167
             strSql.Append(" where F_DictionaryValueId=@F_DictionaryValueId");
166
             SqlParameter[] parameters = {
168
             SqlParameter[] parameters = {
167
                     new SqlParameter("@F_DictionaryValueId", SqlDbType.Int,4)
169
                     new SqlParameter("@F_DictionaryValueId", SqlDbType.Int,4)
168
             };
170
             };
169
             parameters[0].Value = F_DictionaryValueId;
171
             parameters[0].Value = F_DictionaryValueId;
170
 
172
 
171
-            Model.T_Sys_DictionaryValue model = new Model.T_Sys_DictionaryValue();
173
+            CallCenterApi.Model.T_Sys_DictionaryValue model = new CallCenterApi.Model.T_Sys_DictionaryValue();
172
             DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
174
             DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
173
             if (ds.Tables[0].Rows.Count > 0)
175
             if (ds.Tables[0].Rows.Count > 0)
174
             {
176
             {
184
         /// <summary>
186
         /// <summary>
185
         /// 得到一个对象实体
187
         /// 得到一个对象实体
186
         /// </summary>
188
         /// </summary>
187
-        public Model.T_Sys_DictionaryValue DataRowToModel(DataRow row)
189
+        public CallCenterApi.Model.T_Sys_DictionaryValue DataRowToModel(DataRow row)
188
         {
190
         {
189
-            Model.T_Sys_DictionaryValue model = new Model.T_Sys_DictionaryValue();
191
+            CallCenterApi.Model.T_Sys_DictionaryValue model = new CallCenterApi.Model.T_Sys_DictionaryValue();
190
             if (row != null)
192
             if (row != null)
191
             {
193
             {
192
                 if (row["F_DictionaryValueId"] != null && row["F_DictionaryValueId"].ToString() != "")
194
                 if (row["F_DictionaryValueId"] != null && row["F_DictionaryValueId"].ToString() != "")
213
                 {
215
                 {
214
                     model.F_Describe = row["F_Describe"].ToString();
216
                     model.F_Describe = row["F_Describe"].ToString();
215
                 }
217
                 }
216
-                if (row["F_State"] != null && row["F_State"] != DBNull.Value)
218
+                if (row["F_State"] != null && row["F_State"].ToString() != "")
217
                 {
219
                 {
218
-                    model.F_State = Convert.ToBoolean(row["F_State"]);
220
+                    if ((row["F_State"].ToString() == "1") || (row["F_State"].ToString().ToLower() == "true"))
221
+                    {
222
+                        model.F_State = true;
223
+                    }
224
+                    else
225
+                    {
226
+                        model.F_State = false;
227
+                    }
228
+                }
229
+                if (row["F_GroupCode"] != null)
230
+                {
231
+                    model.F_GroupCode = row["F_GroupCode"].ToString();
219
                 }
232
                 }
220
             }
233
             }
221
             return model;
234
             return model;
227
         public DataSet GetList(string strWhere)
240
         public DataSet GetList(string strWhere)
228
         {
241
         {
229
             StringBuilder strSql = new StringBuilder();
242
             StringBuilder strSql = new StringBuilder();
230
-            strSql.Append("select F_DictionaryValueId,F_DictionaryFlag,F_ValueCode,F_Name,F_Sort,F_Describe,F_State ");
243
+            strSql.Append("select F_DictionaryValueId,F_DictionaryFlag,F_ValueCode,F_Name,F_Sort,F_Describe,F_State,F_GroupCode ");
231
             strSql.Append(" FROM T_Sys_DictionaryValue ");
244
             strSql.Append(" FROM T_Sys_DictionaryValue ");
232
             if (strWhere.Trim() != "")
245
             if (strWhere.Trim() != "")
233
             {
246
             {
247
             {
260
             {
248
                 strSql.Append(" top " + Top.ToString());
261
                 strSql.Append(" top " + Top.ToString());
249
             }
262
             }
250
-            strSql.Append(" F_DictionaryValueId,F_DictionaryFlag,F_ValueCode,F_Name,F_Sort,F_Describe,F_State ");
263
+            strSql.Append(" F_DictionaryValueId,F_DictionaryFlag,F_ValueCode,F_Name,F_Sort,F_Describe,F_State,F_GroupCode ");
251
             strSql.Append(" FROM T_Sys_DictionaryValue ");
264
             strSql.Append(" FROM T_Sys_DictionaryValue ");
252
             if (strWhere.Trim() != "")
265
             if (strWhere.Trim() != "")
253
             {
266
             {
304
             return DbHelperSQL.Query(strSql.ToString());
317
             return DbHelperSQL.Query(strSql.ToString());
305
         }
318
         }
306
 
319
 
320
+        /*
321
+		/// <summary>
322
+		/// 分页获取数据列表
323
+		/// </summary>
324
+		public DataSet GetList(int PageSize,int PageIndex,string strWhere)
325
+		{
326
+			SqlParameter[] parameters = {
327
+					new SqlParameter("@tblName", SqlDbType.VarChar, 255),
328
+					new SqlParameter("@fldName", SqlDbType.VarChar, 255),
329
+					new SqlParameter("@PageSize", SqlDbType.Int),
330
+					new SqlParameter("@PageIndex", SqlDbType.Int),
331
+					new SqlParameter("@IsReCount", SqlDbType.Bit),
332
+					new SqlParameter("@OrderType", SqlDbType.Bit),
333
+					new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
334
+					};
335
+			parameters[0].Value = "T_Sys_DictionaryValue";
336
+			parameters[1].Value = "F_DictionaryValueId";
337
+			parameters[2].Value = PageSize;
338
+			parameters[3].Value = PageIndex;
339
+			parameters[4].Value = 0;
340
+			parameters[5].Value = 0;
341
+			parameters[6].Value = strWhere;	
342
+			return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
343
+		}*/
307
 
344
 
308
         #endregion  BasicMethod
345
         #endregion  BasicMethod
309
         #region  ExtensionMethod
346
         #region  ExtensionMethod
311
         #endregion  ExtensionMethod
348
         #endregion  ExtensionMethod
312
     }
349
     }
313
 }
350
 }
351
+

+ 16 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/AreaController.cs

25
             int userId = CurrentUser.UserData.F_UserId;
25
             int userId = CurrentUser.UserData.F_UserId;
26
             Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
26
             Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
27
 
27
 
28
-            DataTable dt = areaBLL.GetList(0, "F_GroupCode = '" + userModel.groupcode + "'", " F_Sort").Tables[0];
28
+            string where = " F_IsDelete=0 ";
29
+            if (!string.IsNullOrEmpty(userModel.groupcode))
30
+            {
31
+                where += " and F_GroupCode = '" + userModel.groupcode + "'";
32
+            }
33
+
34
+            DataTable dt = areaBLL.GetList(0, where, " F_Sort asc").Tables[0];
29
             return Success("加载成功", dt);
35
             return Success("加载成功", dt);
30
         }
36
         }
31
 
37
 
38
             int userId = CurrentUser.UserData.F_UserId;
44
             int userId = CurrentUser.UserData.F_UserId;
39
             Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
45
             Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
40
 
46
 
41
-            DataTable dt = areaBLL.GetList(" isnull(F_ParentId,0)='" + id + "' and F_GroupCode = '" + userModel.groupcode + "' and F_State=0 ").Tables[0];
47
+            string where = " isnull(F_ParentId,0)='" + id + "' and F_IsDelete=0 ";
48
+            if (!string.IsNullOrEmpty(userModel.groupcode))
49
+            {
50
+                where += " and F_GroupCode = '" + userModel.groupcode + "'";
51
+            }
52
+
53
+            DataTable dt = areaBLL.GetList(0, where, " F_Sort asc").Tables[0];
42
             return Success("列表加载成功", dt);
54
             return Success("列表加载成功", dt);
43
         }
55
         }
44
 
56
 
77
             Model.T_Sys_Area dModel = new Model.T_Sys_Area();
89
             Model.T_Sys_Area dModel = new Model.T_Sys_Area();
78
             if (id == 0)
90
             if (id == 0)
79
             {
91
             {
80
-                var list = areaBLL.GetModelList(" F_Id='" + id + "' and F_AreaName='" + name + "' ");
92
+                var list = areaBLL.GetModelList(" F_Id='" + id + "' and F_AreaName='" + name + "' and F_IsDelete=0 ");
81
                 if (list.Count > 0)
93
                 if (list.Count > 0)
82
                 {
94
                 {
83
                     return Error("已经存在此区域");
95
                     return Error("已经存在此区域");
104
                 dModel = areaBLL.GetModel(id);
116
                 dModel = areaBLL.GetModel(id);
105
                 if (dModel != null)
117
                 if (dModel != null)
106
                 {
118
                 {
107
-                    var list = areaBLL.GetModelList(" F_Id='" + id + "' and F_AreaName='" + name + "' and F_Id!='" + id + "' ");
119
+                    var list = areaBLL.GetModelList(" F_Id='" + id + "' and F_AreaName='" + name + "' and F_Id!='" + id + "' and F_IsDelete=0 ");
108
                     if (list.Count > 0)
120
                     if (list.Count > 0)
109
                     {
121
                     {
110
                         return Error("已经存在此区域");
122
                         return Error("已经存在此区域");

+ 25 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DepartmentController.cs

11
 
11
 
12
 namespace CallCenterApi.Interface.Controllers
12
 namespace CallCenterApi.Interface.Controllers
13
 {
13
 {
14
-    //[Authority]
14
+    [Authority]
15
     public class DepartmentController : BaseController
15
     public class DepartmentController : BaseController
16
     {
16
     {
17
         private BLL.T_Sys_Department departmentBLL = new BLL.T_Sys_Department();
17
         private BLL.T_Sys_Department departmentBLL = new BLL.T_Sys_Department();
24
         {
24
         {
25
             if (Request.IsAuthenticated)
25
             if (Request.IsAuthenticated)
26
             {
26
             {
27
-                DataTable dt = new DataTable();
28
-                dt = new BLL.T_Sys_Department().GetList(" F_State=1 ").Tables[0];
27
+                //int userId = CurrentUser.UserData.F_UserId;
28
+                //Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
29
+                string where = "F_State='1'";
30
+                //if (!string.IsNullOrEmpty(userModel.groupcode))
31
+                //{
32
+                //    where += " and F_GroupCode = '" + userModel.groupcode + "'";
33
+                //}
34
+
35
+                DataTable dt = departmentBLL.GetList(0, where, " F_Sort asc").Tables[0];
29
                 return Success("加载成功", dt);
36
                 return Success("加载成功", dt);
30
             }
37
             }
31
             return NoToken("未知错误,请重新登录");
38
             return NoToken("未知错误,请重新登录");
67
             ActionResult res = NoToken("未知错误,请重新登录");
74
             ActionResult res = NoToken("未知错误,请重新登录");
68
             if (Request.IsAuthenticated)
75
             if (Request.IsAuthenticated)
69
             {
76
             {
77
+                //int userId = CurrentUser.UserData.F_UserId;
78
+                //Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
79
+
70
                 string pcode = "";
80
                 string pcode = "";
71
                 Model.T_Sys_Department dModel = new Model.T_Sys_Department();
81
                 Model.T_Sys_Department dModel = new Model.T_Sys_Department();
72
                 dModel.F_ParentId = input.PId;
82
                 dModel.F_ParentId = input.PId;
81
                 dModel.F_Sort = input.Sort;
91
                 dModel.F_Sort = input.Sort;
82
                 dModel.F_DeptName = input.DeptName;
92
                 dModel.F_DeptName = input.DeptName;
83
                 dModel.F_State = 1;
93
                 dModel.F_State = 1;
94
+                //dModel.F_GroupCode = userModel.groupcode;
84
                 int id = departmentBLL.Add(dModel);
95
                 int id = departmentBLL.Add(dModel);
85
                 if (id> 0)
96
                 if (id> 0)
86
                 {
97
                 {
109
                 Model.T_Sys_Department dModel = dBLL.GetModel(input.DeptId);
120
                 Model.T_Sys_Department dModel = dBLL.GetModel(input.DeptId);
110
                 if (dModel == null)
121
                 if (dModel == null)
111
                     return Error("获取信息失败");
122
                     return Error("获取信息失败");
123
+
112
                 dModel.F_ParentId = input.PId;
124
                 dModel.F_ParentId = input.PId;
113
                 if (input.PId != 0)
125
                 if (input.PId != 0)
114
                 {
126
                 {
159
         {
171
         {
160
             if (Request.IsAuthenticated)
172
             if (Request.IsAuthenticated)
161
             {
173
             {
174
+                //int userId = CurrentUser.UserData.F_UserId;
175
+                //Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
176
+
162
                 DataTable dt = new DataTable();
177
                 DataTable dt = new DataTable();
163
-                dt = new BLL.T_Sys_Department().GetList(" F_State=1 and F_ParentId=" + pId).Tables[0];
178
+                string where = " isnull(F_ParentId,0)='" + pId + "' and F_State=1 ";
179
+                //if (!string.IsNullOrEmpty(userModel.groupcode))
180
+                //{
181
+                //    where += " and F_GroupCode = '" + userModel.groupcode + "'";
182
+                //}
183
+                dt = new BLL.T_Sys_Department().GetList(0, where, " F_Sort asc").Tables[0];
184
+
164
                 List<Model.TreeModel> modelList = BindTree(dt, "0");
185
                 List<Model.TreeModel> modelList = BindTree(dt, "0");
165
 
186
 
166
                 if (modelList != null) {
187
                 if (modelList != null) {

+ 74 - 59
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DictionaryController.cs

12
 
12
 
13
 namespace CallCenterApi.Interface.Controllers
13
 namespace CallCenterApi.Interface.Controllers
14
 {
14
 {
15
-    
15
+    [Authority]
16
     public class DictionaryController : BaseController
16
     public class DictionaryController : BaseController
17
     {
17
     {
18
         private BLL.T_Sys_DictionaryBase dictionaryBaseBLL = new BLL.T_Sys_DictionaryBase();
18
         private BLL.T_Sys_DictionaryBase dictionaryBaseBLL = new BLL.T_Sys_DictionaryBase();
26
         /// <returns></returns>
26
         /// <returns></returns>
27
         public ActionResult GetList(FilterDictionary filter)
27
         public ActionResult GetList(FilterDictionary filter)
28
         {
28
         {
29
-            ActionResult res = NoToken("未知错误,请重新登录");
30
             if (Request.IsAuthenticated)
29
             if (Request.IsAuthenticated)
31
             {
30
             {
32
                 var sql = " and F_State=1 ";
31
                 var sql = " and F_State=1 ";
32
+                int userId = CurrentUser.UserData.F_UserId;
33
+                Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
34
+
35
+                if (!string.IsNullOrEmpty(userModel.groupcode))
36
+                {
37
+                    sql += " and F_GroupCode = '" + userModel.groupcode + "'";
38
+                }
39
+
33
                 var recordCount = 0;
40
                 var recordCount = 0;
34
                 var dt = BLL.PagerBLL.GetListPager(
41
                 var dt = BLL.PagerBLL.GetListPager(
35
                   "T_Sys_DictionaryBase",
42
                   "T_Sys_DictionaryBase",
36
-                  "F_DictionaryFlag",
43
+                  "F_Id",
37
                   "*",
44
                   "*",
38
                   sql,
45
                   sql,
39
                   "ORDER BY F_Sort ",
46
                   "ORDER BY F_Sort ",
46
                 {
53
                 {
47
                     rows = modelList.Select(x => new
54
                     rows = modelList.Select(x => new
48
                     {
55
                     {
56
+                        id = x.F_Id,
49
                         name = x.F_DictionaryName,
57
                         name = x.F_DictionaryName,
50
                         flag = x.F_DictionaryFlag,
58
                         flag = x.F_DictionaryFlag,
51
                         sort = x.F_Sort
59
                         sort = x.F_Sort
52
                     }),
60
                     }),
53
                     total = recordCount
61
                     total = recordCount
54
                 };
62
                 };
55
-                res = Content(obj.ToJson());
63
+                return Content(obj.ToJson());
56
             }
64
             }
57
-            return res;
65
+            return NoToken("未知错误,请重新登录");
58
         }
66
         }
59
 
67
 
60
         /// <summary>
68
         /// <summary>
61
         /// 获取字典
69
         /// 获取字典
62
         /// </summary>
70
         /// </summary>
63
-        /// <param name="dicFlag"></param>
71
+        /// <param name="id"></param>
64
         /// <returns></returns>
72
         /// <returns></returns>
65
-        public ActionResult GetDic(string dicFlag)
73
+        public ActionResult GetDic(int id)
66
         {
74
         {
67
-            ActionResult res = NoToken("未知错误,请重新登录");
68
             if (Request.IsAuthenticated)
75
             if (Request.IsAuthenticated)
69
             {
76
             {
70
-                Model.T_Sys_DictionaryBase baseModel = dictionaryBaseBLL.GetModel(dicFlag);
77
+                Model.T_Sys_DictionaryBase baseModel = dictionaryBaseBLL.GetModel(id);
71
                 if (baseModel != null)
78
                 if (baseModel != null)
72
-                    res = Success("加载字典成功", new
79
+                    return Success("加载字典成功", new
73
                     {
80
                     {
81
+                        id = baseModel.F_Id,
74
                         name = baseModel.F_DictionaryName,
82
                         name = baseModel.F_DictionaryName,
75
                         flag = baseModel.F_DictionaryFlag,
83
                         flag = baseModel.F_DictionaryFlag,
76
                         sort = baseModel.F_Sort
84
                         sort = baseModel.F_Sort
77
                     });
85
                     });
78
                 else
86
                 else
79
-                    res = Error("加载字典失败");
87
+                    return Error("加载字典失败");
80
             }
88
             }
81
-            return res;
89
+            return NoToken("未知错误,请重新登录");
82
         }
90
         }
83
         //[Authority]
91
         //[Authority]
84
         /// <summary>
92
         /// <summary>
88
         /// <returns></returns>
96
         /// <returns></returns>
89
         public ActionResult AddDic(DictionaryBaseInput input)
97
         public ActionResult AddDic(DictionaryBaseInput input)
90
         {
98
         {
91
-            ActionResult res = NoToken("未知错误,请重新登录");
92
             if (Request.IsAuthenticated)
99
             if (Request.IsAuthenticated)
93
             {
100
             {
101
+                int userId = CurrentUser.UserData.F_UserId;
102
+                Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
103
+
94
                 Model.T_Sys_DictionaryBase orderModel = new Model.T_Sys_DictionaryBase();
104
                 Model.T_Sys_DictionaryBase orderModel = new Model.T_Sys_DictionaryBase();
95
                 BLL.T_Sys_DictionaryBase orderBll = new BLL.T_Sys_DictionaryBase();
105
                 BLL.T_Sys_DictionaryBase orderBll = new BLL.T_Sys_DictionaryBase();
96
-                var model = orderBll.GetModel(input.DicFlag.Trim());
97
-                if (model != null)
106
+                var list = orderBll.GetList(" F_DictionaryFlag='" + input.DicFlag.Trim() + "' and F_GroupCode='" + userModel.groupcode + "'").Tables[0];
107
+                if (list.Rows.Count >0)
98
                     return Error("字典标志已存在");
108
                     return Error("字典标志已存在");
99
                 orderModel.F_DictionaryFlag = input.DicFlag;
109
                 orderModel.F_DictionaryFlag = input.DicFlag;
100
                 orderModel.F_DictionaryName = input.Name;
110
                 orderModel.F_DictionaryName = input.Name;
101
                 orderModel.F_Describe = input.Remark;
111
                 orderModel.F_Describe = input.Remark;
102
                 orderModel.F_State = true;
112
                 orderModel.F_State = true;
103
                 orderModel.F_Sort = input.Sort;
113
                 orderModel.F_Sort = input.Sort;
114
+                orderModel.F_GroupCode = userModel.groupcode;
104
 
115
 
105
-                if (orderBll.Add(orderModel))
106
-                    res = Success("字典添加成功");
116
+                if (orderBll.Add(orderModel)>0)
117
+                    return Success("字典添加成功");
107
                 else
118
                 else
108
-                    res = Error("字典添加失败");
119
+                    return Error("字典添加失败");
109
             }
120
             }
110
-            return res;
121
+            return NoToken("未知错误,请重新登录");
111
         }
122
         }
112
 
123
 
113
         //[Authority]
124
         //[Authority]
118
         /// <returns></returns>
129
         /// <returns></returns>
119
         public ActionResult EditDic(DictionaryBaseInput input)
130
         public ActionResult EditDic(DictionaryBaseInput input)
120
         {
131
         {
121
-            ActionResult res = NoToken("未知错误,请重新登录");
122
             if (Request.IsAuthenticated)
132
             if (Request.IsAuthenticated)
123
             {
133
             {
124
                 BLL.T_Sys_DictionaryBase orderBll = new BLL.T_Sys_DictionaryBase();
134
                 BLL.T_Sys_DictionaryBase orderBll = new BLL.T_Sys_DictionaryBase();
125
-                Model.T_Sys_DictionaryBase orderModel = orderBll.GetModel(input.DicFlag.Trim());
135
+                Model.T_Sys_DictionaryBase orderModel = orderBll.GetModel(input.DicId);
126
                 if (orderModel == null)
136
                 if (orderModel == null)
127
                     return Error("字典对象不存在");
137
                     return Error("字典对象不存在");
128
                 orderModel.F_DictionaryFlag = input.DicFlag;
138
                 orderModel.F_DictionaryFlag = input.DicFlag;
130
                 orderModel.F_Describe = input.Remark;
140
                 orderModel.F_Describe = input.Remark;
131
                 orderModel.F_Sort = input.Sort;
141
                 orderModel.F_Sort = input.Sort;
132
                 if (orderBll.Update(orderModel))
142
                 if (orderBll.Update(orderModel))
133
-                    res = Success("字典添加成功");
143
+                    return Success("字典添加成功");
134
                 else
144
                 else
135
-                    res = Error("字典添加失败");
145
+                    return Error("字典添加失败");
136
             }
146
             }
137
-            return res;
147
+            return NoToken("未知错误,请重新登录");
138
         }
148
         }
139
 
149
 
140
         //[Authority]
150
         //[Authority]
145
         /// <returns></returns>
155
         /// <returns></returns>
146
         public ActionResult DelDic(string[] ids)
156
         public ActionResult DelDic(string[] ids)
147
         {
157
         {
148
-            ActionResult res = NoToken("未知错误,请重新登录");
149
             if (Request.IsAuthenticated)
158
             if (Request.IsAuthenticated)
150
             {
159
             {
151
                 if (ids == null || ids.Length <= 0)
160
                 if (ids == null || ids.Length <= 0)
156
                     sb.Append("'" + item + "',");
165
                     sb.Append("'" + item + "',");
157
                 }
166
                 }
158
                 if (new BLL.T_Sys_DictionaryBase().DeleteList(sb.ToString().Trim(',')))
167
                 if (new BLL.T_Sys_DictionaryBase().DeleteList(sb.ToString().Trim(',')))
159
-                    res = Success("删除成功");
168
+                    return Success("删除成功");
160
                 else
169
                 else
161
-                    res = Error("删除失败");
170
+                    return Error("删除失败");
162
             }
171
             }
163
-            return res;
172
+            return NoToken("未知错误,请重新登录");
164
         }
173
         }
165
         #endregion
174
         #endregion
166
 
175
 
169
         //获取字典值列表
178
         //获取字典值列表
170
         public ActionResult GetDicValueList(FilterDictionary filter)
179
         public ActionResult GetDicValueList(FilterDictionary filter)
171
         {
180
         {
172
-             ActionResult res = NoToken("未知错误,请重新登录");
173
             if (Request.IsAuthenticated)
181
             if (Request.IsAuthenticated)
174
             {
182
             {
175
-                string sql = "";
176
-                DataTable dt = new DataTable();
183
+                var sql = " and F_State=1 ";
184
+                int userId = CurrentUser.UserData.F_UserId;
185
+                Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
177
 
186
 
187
+                if (!string.IsNullOrEmpty(userModel.groupcode))
188
+                {
189
+                    sql += " and F_GroupCode = '" + userModel.groupcode + "'";
190
+                }
178
 
191
 
192
+                DataTable dt = new DataTable();
179
 
193
 
180
                 if (!string.IsNullOrWhiteSpace(filter.Id))
194
                 if (!string.IsNullOrWhiteSpace(filter.Id))
181
                 {
195
                 {
210
                     total = recordCount
224
                     total = recordCount
211
                 };
225
                 };
212
 
226
 
213
-                res = Content(obj.ToJson());
227
+                return Content(obj.ToJson());
214
             }
228
             }
215
-            return res;
229
+            return NoToken("未知错误,请重新登录");
216
         }
230
         }
217
 
231
 
218
         //获取字典值列表
232
         //获取字典值列表
219
         public ActionResult GetDicValueListByFlag(string flag)
233
         public ActionResult GetDicValueListByFlag(string flag)
220
         {
234
         {
221
-            ActionResult res = NoToken("未知错误,请重新登录");
222
             if (Request.IsAuthenticated)
235
             if (Request.IsAuthenticated)
223
             {
236
             {
237
+                var sql = "  F_DictionaryFlag='" + flag + "' and F_State=1 ";
238
+                int userId = CurrentUser.UserData.F_UserId;
239
+                Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
224
 
240
 
225
-                DataTable dt = new DataTable();
241
+                if (!string.IsNullOrEmpty(userModel.groupcode))
242
+                {
243
+                    sql += " and F_GroupCode = '" + userModel.groupcode + "'";
244
+                }
226
 
245
 
227
-                dt = new BLL.T_Sys_DictionaryValue().GetList(" F_DictionaryFlag='" + flag + "' and F_State=1 ").Tables[0];
246
+                DataTable dt = new BLL.T_Sys_DictionaryValue().GetList(0, sql, " F_Sort asc").Tables[0];
228
 
247
 
229
-                res = Success("列表加载成功", dt);
248
+                return Success("列表加载成功", dt);
230
             }
249
             }
231
-            return res;
250
+            return NoToken("未知错误,请重新登录");
232
         }
251
         }
233
 
252
 
234
         //加载字典值
253
         //加载字典值
235
         public ActionResult GetDicValue(int dicValueId = 0)
254
         public ActionResult GetDicValue(int dicValueId = 0)
236
         {
255
         {
237
-            ActionResult res = NoToken("未知错误,请重新登录");
238
             if (Request.IsAuthenticated)
256
             if (Request.IsAuthenticated)
239
             {
257
             {
240
                 if (dicValueId <= 0)
258
                 if (dicValueId <= 0)
241
                     return Error("字典值标识传输失败");
259
                     return Error("字典值标识传输失败");
242
                 Model.T_Sys_DictionaryValue valueModel = dictionaryValueBLL.GetModel(dicValueId);
260
                 Model.T_Sys_DictionaryValue valueModel = dictionaryValueBLL.GetModel(dicValueId);
243
                 if (valueModel != null)
261
                 if (valueModel != null)
244
-                    res = Success("加载字典值成功", new
262
+                    return Success("加载字典值成功", new
245
                     {
263
                     {
246
                         id = valueModel.F_DictionaryValueId,
264
                         id = valueModel.F_DictionaryValueId,
247
                         dicflag = valueModel.F_DictionaryFlag,
265
                         dicflag = valueModel.F_DictionaryFlag,
250
                         sort = valueModel.F_Sort,
268
                         sort = valueModel.F_Sort,
251
                     });
269
                     });
252
                 else
270
                 else
253
-                    res = Error("加载字典值失败");
271
+                    return Error("加载字典值失败");
254
             }
272
             }
255
-            return res;
273
+            return NoToken("未知错误,请重新登录");
256
         }
274
         }
257
 
275
 
258
         //[Authority]
276
         //[Authority]
259
         //添加字典值
277
         //添加字典值
260
         public ActionResult AddDicValue(DictionaryValueInput input)
278
         public ActionResult AddDicValue(DictionaryValueInput input)
261
         {
279
         {
262
-            ActionResult res = NoToken("未知错误,请重新登录");
263
             if (Request.IsAuthenticated)
280
             if (Request.IsAuthenticated)
264
             {
281
             {
282
+
283
+                int userId = CurrentUser.UserData.F_UserId;
284
+                Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
285
+
265
                 Model.T_Sys_DictionaryValue orderModel = new Model.T_Sys_DictionaryValue();
286
                 Model.T_Sys_DictionaryValue orderModel = new Model.T_Sys_DictionaryValue();
266
                 BLL.T_Sys_DictionaryValue orderBll = new BLL.T_Sys_DictionaryValue();
287
                 BLL.T_Sys_DictionaryValue orderBll = new BLL.T_Sys_DictionaryValue();
267
 
288
 
271
                 orderModel.F_ValueCode = "";
292
                 orderModel.F_ValueCode = "";
272
                 orderModel.F_DictionaryFlag = input.DicFlag;
293
                 orderModel.F_DictionaryFlag = input.DicFlag;
273
                 orderModel.F_Sort = input.Sort;
294
                 orderModel.F_Sort = input.Sort;
274
-
295
+                orderModel.F_GroupCode = userModel.groupcode;
275
 
296
 
276
                 if (orderBll.Add(orderModel) > 0)
297
                 if (orderBll.Add(orderModel) > 0)
277
-                    res = Success("字典值添加成功");
298
+                    return Success("字典值添加成功");
278
                 else
299
                 else
279
-                    res = Error("字典值添加失败");
300
+                    return Error("字典值添加失败");
280
             }
301
             }
281
-            return res;
302
+            return NoToken("未知错误,请重新登录");
282
         }
303
         }
283
         ////[Authority]
304
         ////[Authority]
284
         //编辑字典值
305
         //编辑字典值
285
         public ActionResult EditDicValue(DictionaryValueInput input)
306
         public ActionResult EditDicValue(DictionaryValueInput input)
286
         {
307
         {
287
-            ActionResult res = NoToken("未知错误,请重新登录");
288
             if (Request.IsAuthenticated)
308
             if (Request.IsAuthenticated)
289
             {
309
             {
290
                 if (input.DicVid <= 0)
310
                 if (input.DicVid <= 0)
299
                 orderModel.F_DictionaryFlag = input.DicFlag;
319
                 orderModel.F_DictionaryFlag = input.DicFlag;
300
                 orderModel.F_Sort = input.Sort;
320
                 orderModel.F_Sort = input.Sort;
301
                 if (orderBll.Update(orderModel))
321
                 if (orderBll.Update(orderModel))
302
-                    res = Success("字典值编辑成功");
322
+                    return Success("字典值编辑成功");
303
                 else
323
                 else
304
-                    res = Error("字典值编辑失败");
324
+                    return Error("字典值编辑失败");
305
             }
325
             }
306
-            return res;
326
+            return NoToken("未知错误,请重新登录");
307
         }
327
         }
308
         //[Authority]
328
         //[Authority]
309
         //删除字典值
329
         //删除字典值
310
         public ActionResult DelDicValue(string[] ids)
330
         public ActionResult DelDicValue(string[] ids)
311
         {
331
         {
312
-            ActionResult res = NoToken("未知错误,请重新登录");
313
             if (Request.IsAuthenticated)
332
             if (Request.IsAuthenticated)
314
             {
333
             {
315
                 if (ids == null || ids.Length <= 0)
334
                 if (ids == null || ids.Length <= 0)
316
                     return Error("获取参数失败");
335
                     return Error("获取参数失败");
317
                 var idStr = string.Join(",", ids);
336
                 var idStr = string.Join(",", ids);
318
                 if (new BLL.T_Sys_DictionaryValue().DeleteList(idStr))
337
                 if (new BLL.T_Sys_DictionaryValue().DeleteList(idStr))
319
-                    res = Success("删除成功");
338
+                    return Success("删除成功");
320
                 else
339
                 else
321
-                    res = Error("删除失败");
340
+                    return Error("删除失败");
322
             }
341
             }
323
-            return res;
342
+            return NoToken("未知错误,请重新登录");
324
         }
343
         }
325
         #endregion
344
         #endregion
326
-
327
-
328
-
329
-
330
     }
345
     }
331
 }
346
 }

+ 88 - 8
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

152
                 }
152
                 }
153
                 if (strkey.Trim() != "" && strkey != "undefined")
153
                 if (strkey.Trim() != "" && strkey != "undefined")
154
                 {
154
                 {
155
-                    sql += " and F_Content like '%" + strkey + "%' ";
155
+                    sql += " and (F_Content like '%" + strkey + "%' or F_Name like '%" + strkey + "%' or F_Province like '%" + strkey + "%' or F_City like '%" 
156
+                        + strkey + "%' or F_CreateUser like '%" + strkey + "%' or F_VIPPhone like '%" + strkey + "%') ";
156
                 }
157
                 }
157
                 if (strworkid.Trim() != "" && strworkid != "undefined")
158
                 if (strworkid.Trim() != "" && strworkid != "undefined")
158
                 {
159
                 {
198
                     pagesize = Convert.ToInt32(strpagesize);
199
                     pagesize = Convert.ToInt32(strpagesize);
199
                 }
200
                 }
200
 
201
 
201
-                string cols = "*,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_Type) as TypeName,dbo.GetDictionaryName(F_Source) as SourceName";
202
+                string cols = "*,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_Type) as TypeName,dbo.GetDictionaryName(F_SmallType) as SmallTypeName,dbo.GetDictionaryName(F_Source) as SourceName";
202
 
203
 
203
                 if (isdc > 0)
204
                 if (isdc > 0)
204
                 {
205
                 {
271
 
272
 
272
             if (!string.IsNullOrEmpty(strworkorderid))
273
             if (!string.IsNullOrEmpty(strworkorderid))
273
             {
274
             {
274
-                string sql = "select *,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_Type) as TypeName,"
275
+                string sql = "select *,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_Type) as TypeName,dbo.GetDictionaryName(F_SmallType) as SmallTypeName,"
275
                     + "dbo.GetDictionaryName(F_Source) as SourceName  from T_Bus_WorkOrder where F_WorkOrderId ='" + strworkorderid + "'";
276
                     + "dbo.GetDictionaryName(F_Source) as SourceName  from T_Bus_WorkOrder where F_WorkOrderId ='" + strworkorderid + "'";
276
                 var dt = DbHelperSQL.Query(sql).Tables[0];
277
                 var dt = DbHelperSQL.Query(sql).Tables[0];
277
                 if (dt.Rows.Count > 0)
278
                 if (dt.Rows.Count > 0)
311
                     }
312
                     }
312
                     #endregion
313
                     #endregion
313
 
314
 
315
+                    #region 跟进信息
316
+                    string gjsql = "select *,dbo.GetUserName(F_CreateUser) as UserName from T_Bus_Follow "
317
+                        + "where F_State=1 and F_IsDelete=0 and F_WorkOrderId ='" + strworkorderid + "'";
318
+
319
+                    var gjdt = DbHelperSQL.Query(gjsql).Tables[0];
320
+                    if (configfj != null)
321
+                    {
322
+                        gjdt = BindFileData(gjdt, configfj.F_ParamValue);
323
+                    }
324
+                    #endregion
325
+
314
                     #region 办理过程
326
                     #region 办理过程
315
                     string gcsql = "select *,dbo.GetUserName(F_CreateUser) as UserName "
327
                     string gcsql = "select *,dbo.GetUserName(F_CreateUser) as UserName "
316
                                     + "from T_Bus_Operation where F_IsDelete=0 and F_WorkOrderId ='" + strworkorderid + "'";
328
                                     + "from T_Bus_Operation where F_IsDelete=0 and F_WorkOrderId ='" + strworkorderid + "'";
342
                     {
354
                     {
343
                         data = dt,
355
                         data = dt,
344
                         cbdata = cbdt,
356
                         cbdata = cbdt,
345
-                        gcdata = gcdt
357
+                        gcdata = gcdt,
358
+                        gjdata = gjdt
346
                     };
359
                     };
347
                     return Success("获取成功", obj);
360
                     return Success("获取成功", obj);
348
                 }
361
                 }
385
             string buydate = RequestString.GetFormString("buydate");
398
             string buydate = RequestString.GetFormString("buydate");
386
             //购买地点
399
             //购买地点
387
             string buyaddress = RequestString.GetFormString("buyaddress");
400
             string buyaddress = RequestString.GetFormString("buyaddress");
388
-            //产品类别
389
-            string producttype = RequestString.GetFormString("producttype");
401
+            ////产品类别
402
+            //string producttype = RequestString.GetFormString("producttype");
390
             //生产日期
403
             //生产日期
391
             string productdate = RequestString.GetFormString("productdate");
404
             string productdate = RequestString.GetFormString("productdate");
392
             //生产批号
405
             //生产批号
405
             string files = RequestString.GetFormString("files");
418
             string files = RequestString.GetFormString("files");
406
             //类型
419
             //类型
407
             int type = RequestString.GetInt("type", 0);
420
             int type = RequestString.GetInt("type", 0);
421
+            //子类型
422
+            int smalltype = RequestString.GetInt("smalltype", 0);
423
+            //产品类别
424
+            int producttype = RequestString.GetInt("producttype", 0);
408
             //来源
425
             //来源
409
             int source = RequestString.GetInt("source", 0);
426
             int source = RequestString.GetInt("source", 0);
410
             //是否寄回
427
             //是否寄回
431
 
448
 
432
                 modelT_Bus_WorkOrder.F_Source = source;//信息来源
449
                 modelT_Bus_WorkOrder.F_Source = source;//信息来源
433
                 modelT_Bus_WorkOrder.F_Type = type;//信息类别
450
                 modelT_Bus_WorkOrder.F_Type = type;//信息类别
451
+                modelT_Bus_WorkOrder.F_SmallType = smalltype;//信息子类别
434
                 modelT_Bus_WorkOrder.F_CusName = cusname;//投诉人姓名
452
                 modelT_Bus_WorkOrder.F_CusName = cusname;//投诉人姓名
435
                 modelT_Bus_WorkOrder.F_CusSex = cussex;//性别
453
                 modelT_Bus_WorkOrder.F_CusSex = cussex;//性别
436
                 modelT_Bus_WorkOrder.F_CusPhone = cusphone;//来电号码
454
                 modelT_Bus_WorkOrder.F_CusPhone = cusphone;//来电号码
535
             string buydate = RequestString.GetFormString("buydate");
553
             string buydate = RequestString.GetFormString("buydate");
536
             //购买地点
554
             //购买地点
537
             string buyaddress = RequestString.GetFormString("buyaddress");
555
             string buyaddress = RequestString.GetFormString("buyaddress");
538
-            //产品类别
539
-            string producttype = RequestString.GetFormString("producttype");
556
+            ////产品类别
557
+            //string producttype = RequestString.GetFormString("producttype");
540
             //生产批号
558
             //生产批号
541
             string batchnumber = RequestString.GetFormString("batchnumber");
559
             string batchnumber = RequestString.GetFormString("batchnumber");
542
             //使用日期
560
             //使用日期
553
             string files = RequestString.GetFormString("files");
571
             string files = RequestString.GetFormString("files");
554
             //类型
572
             //类型
555
             int type = RequestString.GetInt("type", 0);
573
             int type = RequestString.GetInt("type", 0);
574
+            //子类型
575
+            int smalltype = RequestString.GetInt("smalltype", 0);
576
+            //产品类别
577
+            int producttype = RequestString.GetInt("producttype", 0);
556
             //来源
578
             //来源
557
             int source = RequestString.GetInt("source", 0);
579
             int source = RequestString.GetInt("source", 0);
558
             //是否寄回
580
             //是否寄回
583
 
605
 
584
                     modelT_Bus_WorkOrder.F_Source = source;//信息来源
606
                     modelT_Bus_WorkOrder.F_Source = source;//信息来源
585
                     modelT_Bus_WorkOrder.F_Type = type;//信息类别
607
                     modelT_Bus_WorkOrder.F_Type = type;//信息类别
608
+                    modelT_Bus_WorkOrder.F_SmallType = smalltype;//信息子类别
586
                     modelT_Bus_WorkOrder.F_CusName = cusname;//投诉人姓名
609
                     modelT_Bus_WorkOrder.F_CusName = cusname;//投诉人姓名
587
                     modelT_Bus_WorkOrder.F_CusSex = cussex;//性别
610
                     modelT_Bus_WorkOrder.F_CusSex = cussex;//性别
588
                     modelT_Bus_WorkOrder.F_CusPhone = cusphone;//来电号码
611
                     modelT_Bus_WorkOrder.F_CusPhone = cusphone;//来电号码
723
         }
746
         }
724
 
747
 
725
         /// <summary>
748
         /// <summary>
749
+        /// 跟进工单
750
+        /// </summary>
751
+        /// <returns></returns>
752
+        public ActionResult FllowWorkOrder()
753
+        {
754
+            int userId = CurrentUser.UserData.F_UserId;
755
+            Model.T_Sys_UserAccount userModel = userBLL.GetModel(userId);
756
+
757
+            string workorderid = RequestString.GetFormString("workid");
758
+            string title = RequestString.GetFormString("title");
759
+            string content = RequestString.GetFormString("content");
760
+            string files = RequestString.GetFormString("files");
761
+
762
+            Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = workorderBLL.GetModel(workorderid);
763
+            if (modelT_Bus_WorkOrder != null)
764
+            {
765
+                using (TransactionScope trans = new TransactionScope())
766
+                {
767
+                    #region 插入督办记录
768
+                    Model.T_Bus_Follow modelT_Bus_Follow = new Model.T_Bus_Follow();
769
+                    modelT_Bus_Follow.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
770
+                    modelT_Bus_Follow.F_Title = title;
771
+                    modelT_Bus_Follow.F_Content = content;
772
+                    modelT_Bus_Follow.F_File = files;
773
+                    modelT_Bus_Follow.F_State = 1;
774
+                    modelT_Bus_Follow.F_IsDelete = 0;
775
+                    modelT_Bus_Follow.F_CreateUser = userModel.F_UserCode;
776
+                    modelT_Bus_Follow.F_CreateTime = DateTime.Now;
777
+
778
+                    new BLL.T_Bus_Follow().Add(modelT_Bus_Follow);
779
+                    #endregion
780
+
781
+                    #region 插入操作记录
782
+                    Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
783
+                    oper.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
784
+                    oper.F_State = modelT_Bus_WorkOrder.F_State;
785
+
786
+                    string userinfo = userModel.F_UserName + "(" + userModel.F_UserCode + ")";
787
+                    oper.F_Message = userinfo + " 跟进了工单";
788
+                    oper.F_CreateUser = userModel.F_UserCode;
789
+                    oper.F_CreateTime = DateTime.Now;
790
+                    oper.F_IsDelete = 0;
791
+
792
+                    new BLL.T_Bus_Operation().Add(oper);
793
+                    #endregion
794
+
795
+                    trans.Complete();
796
+                }
797
+                return Success("操作成功");
798
+            }
799
+            else
800
+            {
801
+                return Error("操作失败");
802
+            }
803
+        }
804
+
805
+        /// <summary>
726
         /// 处理工单
806
         /// 处理工单
727
         /// </summary>
807
         /// </summary>
728
         /// <returns></returns>
808
         /// <returns></returns>

+ 1 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/DictionaryInput.cs

7
 {
7
 {
8
     public class DictionaryBaseInput
8
     public class DictionaryBaseInput
9
     {
9
     {
10
+        public int DicId { get; set; }
10
         public string DicFlag { get; set; }
11
         public string DicFlag { get; set; }
11
         public string Name { get; set; }
12
         public string Name { get; set; }
12
         public int Sort { get; set; } = 0;
13
         public int Sort { get; set; } = 0;
21
         public string DicvName { get; set; }
22
         public string DicvName { get; set; }
22
         public int Sort { get; set; } = 0;
23
         public int Sort { get; set; } = 0;
23
         public string DicDes { get; set; }
24
         public string DicDes { get; set; }
24
-
25
-
26
     }
25
     }
27
 }
26
 }

+ 1 - 0
codegit/CallCenterApi/CallCenterApi.Model/CallCenterApi.Model.csproj

51
     <Compile Include="QCModel.cs" />
51
     <Compile Include="QCModel.cs" />
52
     <Compile Include="telloc_users.cs" />
52
     <Compile Include="telloc_users.cs" />
53
     <Compile Include="TreeModel.cs" />
53
     <Compile Include="TreeModel.cs" />
54
+    <Compile Include="T_Bus_Follow.cs" />
54
     <Compile Include="T_Bus_Operation.cs" />
55
     <Compile Include="T_Bus_Operation.cs" />
55
     <Compile Include="T_Bus_RemindRecord.cs" />
56
     <Compile Include="T_Bus_RemindRecord.cs" />
56
     <Compile Include="T_Bus_WorkOrder.cs" />
57
     <Compile Include="T_Bus_WorkOrder.cs" />

+ 125 - 0
codegit/CallCenterApi/CallCenterApi.Model/T_Bus_Follow.cs

1
+using System;
2
+namespace CallCenterApi.Model
3
+{
4
+    /// <summary>
5
+    /// T_Bus_Follow:实体类(属性说明自动提取数据库字段的描述信息)
6
+    /// </summary>
7
+    [Serializable]
8
+    public partial class T_Bus_Follow
9
+    {
10
+        public T_Bus_Follow()
11
+        { }
12
+        #region Model
13
+        private int _f_id;
14
+        private string _f_workorderid;
15
+        private string _f_title;
16
+        private string _f_content;
17
+        private string _f_remark;
18
+        private string _f_file;
19
+        private int? _f_state;
20
+        private string _f_createuser;
21
+        private DateTime? _f_createtime;
22
+        private int? _f_isdelete;
23
+        private string _f_deleteuser;
24
+        private DateTime? _f_deletetime;
25
+        /// <summary>
26
+        /// 
27
+        /// </summary>
28
+        public int F_Id
29
+        {
30
+            set { _f_id = value; }
31
+            get { return _f_id; }
32
+        }
33
+        /// <summary>
34
+        /// 
35
+        /// </summary>
36
+        public string F_WorkOrderId
37
+        {
38
+            set { _f_workorderid = value; }
39
+            get { return _f_workorderid; }
40
+        }
41
+        /// <summary>
42
+        /// 
43
+        /// </summary>
44
+        public string F_Title
45
+        {
46
+            set { _f_title = value; }
47
+            get { return _f_title; }
48
+        }
49
+        /// <summary>
50
+        /// 
51
+        /// </summary>
52
+        public string F_Content
53
+        {
54
+            set { _f_content = value; }
55
+            get { return _f_content; }
56
+        }
57
+        /// <summary>
58
+        /// 
59
+        /// </summary>
60
+        public string F_Remark
61
+        {
62
+            set { _f_remark = value; }
63
+            get { return _f_remark; }
64
+        }
65
+        /// <summary>
66
+        /// 
67
+        /// </summary>
68
+        public string F_File
69
+        {
70
+            set { _f_file = value; }
71
+            get { return _f_file; }
72
+        }
73
+        /// <summary>
74
+        /// 
75
+        /// </summary>
76
+        public int? F_State
77
+        {
78
+            set { _f_state = value; }
79
+            get { return _f_state; }
80
+        }
81
+        /// <summary>
82
+        /// 
83
+        /// </summary>
84
+        public string F_CreateUser
85
+        {
86
+            set { _f_createuser = value; }
87
+            get { return _f_createuser; }
88
+        }
89
+        /// <summary>
90
+        /// 
91
+        /// </summary>
92
+        public DateTime? F_CreateTime
93
+        {
94
+            set { _f_createtime = value; }
95
+            get { return _f_createtime; }
96
+        }
97
+        /// <summary>
98
+        /// 
99
+        /// </summary>
100
+        public int? F_IsDelete
101
+        {
102
+            set { _f_isdelete = value; }
103
+            get { return _f_isdelete; }
104
+        }
105
+        /// <summary>
106
+        /// 
107
+        /// </summary>
108
+        public string F_DeleteUser
109
+        {
110
+            set { _f_deleteuser = value; }
111
+            get { return _f_deleteuser; }
112
+        }
113
+        /// <summary>
114
+        /// 
115
+        /// </summary>
116
+        public DateTime? F_DeleteTime
117
+        {
118
+            set { _f_deletetime = value; }
119
+            get { return _f_deletetime; }
120
+        }
121
+        #endregion Model
122
+
123
+    }
124
+}
125
+

+ 12 - 3
codegit/CallCenterApi/CallCenterApi.Model/T_Bus_WorkOrder.cs

16
         private string _f_cusname;
16
         private string _f_cusname;
17
         private string _f_cussex;
17
         private string _f_cussex;
18
         private int? _f_type;
18
         private int? _f_type;
19
+        private int? _f_smalltype;
19
         private string _f_content;
20
         private string _f_content;
20
         private string _f_file;
21
         private string _f_file;
21
         private int? _f_source;
22
         private int? _f_source;
23
         private string _f_productdate;
24
         private string _f_productdate;
24
         private string _f_buydate;
25
         private string _f_buydate;
25
         private string _f_buyaddress;
26
         private string _f_buyaddress;
26
-        private string _f_producttype;
27
+        private int? _f_producttype;
27
         private string _f_batchnumber;
28
         private string _f_batchnumber;
28
         private string _f_userdate;
29
         private string _f_userdate;
29
         private int? _f_isback;
30
         private int? _f_isback;
94
             get { return _f_cussex; }
95
             get { return _f_cussex; }
95
         }
96
         }
96
         /// <summary>
97
         /// <summary>
97
-        /// 原因
98
+        /// 工单类型
98
         /// </summary>
99
         /// </summary>
99
         public int? F_Type
100
         public int? F_Type
100
         {
101
         {
102
             get { return _f_type; }
103
             get { return _f_type; }
103
         }
104
         }
104
         /// <summary>
105
         /// <summary>
106
+        /// 工单类型子类型
107
+        /// </summary>
108
+        public int? F_SmallType
109
+        {
110
+            set { _f_smalltype = value; }
111
+            get { return _f_smalltype; }
112
+        }
113
+        /// <summary>
105
         /// 事件描述
114
         /// 事件描述
106
         /// </summary>
115
         /// </summary>
107
         public string F_Content
116
         public string F_Content
160
         /// <summary>
169
         /// <summary>
161
         /// 产品类别
170
         /// 产品类别
162
         /// </summary>
171
         /// </summary>
163
-        public string F_ProductType
172
+        public int? F_ProductType
164
         {
173
         {
165
             set { _f_producttype = value; }
174
             set { _f_producttype = value; }
166
             get { return _f_producttype; }
175
             get { return _f_producttype; }

+ 17 - 11
codegit/CallCenterApi/CallCenterApi.Model/T_Sys_Department.cs

1
 using System;
1
 using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Text;
5
-using System.Threading.Tasks;
6
-
7
 namespace CallCenterApi.Model
2
 namespace CallCenterApi.Model
8
 {
3
 {
9
     /// <summary>
4
     /// <summary>
31
         private string _f_otherphone;
26
         private string _f_otherphone;
32
         private string _f_email;
27
         private string _f_email;
33
         private int? _f_header;
28
         private int? _f_header;
29
+        private string _f_groupcode;
34
         /// <summary>
30
         /// <summary>
35
-        /// 
31
+        /// 部门自增ID
36
         /// </summary>
32
         /// </summary>
37
         public int F_DeptId
33
         public int F_DeptId
38
         {
34
         {
40
             get { return _f_deptid; }
36
             get { return _f_deptid; }
41
         }
37
         }
42
         /// <summary>
38
         /// <summary>
43
-        /// 
39
+        /// 对接系统的ID
44
         /// </summary>
40
         /// </summary>
45
         public string F_DeptCode
41
         public string F_DeptCode
46
         {
42
         {
56
             get { return _f_parentname; }
52
             get { return _f_parentname; }
57
         }
53
         }
58
         /// <summary>
54
         /// <summary>
59
-        /// 
55
+        /// 父节点ID
60
         /// </summary>
56
         /// </summary>
61
         public int F_ParentId
57
         public int F_ParentId
62
         {
58
         {
72
             get { return _f_parentcode; }
68
             get { return _f_parentcode; }
73
         }
69
         }
74
         /// <summary>
70
         /// <summary>
75
-        /// 
71
+        /// 部门名称
76
         /// </summary>
72
         /// </summary>
77
         public string F_DeptName
73
         public string F_DeptName
78
         {
74
         {
80
             get { return _f_deptname; }
76
             get { return _f_deptname; }
81
         }
77
         }
82
         /// <summary>
78
         /// <summary>
83
-        /// 
79
+        /// 状态
84
         /// </summary>
80
         /// </summary>
85
         public int? F_State
81
         public int? F_State
86
         {
82
         {
104
             get { return _f_type; }
100
             get { return _f_type; }
105
         }
101
         }
106
         /// <summary>
102
         /// <summary>
107
-        /// 
103
+        /// 排序编号
108
         /// </summary>
104
         /// </summary>
109
         public int? F_Sort
105
         public int? F_Sort
110
         {
106
         {
159
             set { _f_header = value; }
155
             set { _f_header = value; }
160
             get { return _f_header; }
156
             get { return _f_header; }
161
         }
157
         }
158
+        /// <summary>
159
+        /// 
160
+        /// </summary>
161
+        public string F_GroupCode
162
+        {
163
+            set { _f_groupcode = value; }
164
+            get { return _f_groupcode; }
165
+        }
162
         #endregion Model
166
         #endregion Model
167
+
163
     }
168
     }
164
 }
169
 }
170
+

+ 23 - 8
codegit/CallCenterApi/CallCenterApi.Model/T_Sys_DictionaryBase.cs

1
 using System;
1
 using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Text;
5
-using System.Threading.Tasks;
6
-
7
 namespace CallCenterApi.Model
2
 namespace CallCenterApi.Model
8
 {
3
 {
9
     /// <summary>
4
     /// <summary>
10
-	/// T_Sys_DictionaryBase:实体类(属性说明自动提取数据库字段的描述信息)
11
-	/// </summary>
12
-	[Serializable]
5
+    /// T_Sys_DictionaryBase:实体类(属性说明自动提取数据库字段的描述信息)
6
+    /// </summary>
7
+    [Serializable]
13
     public partial class T_Sys_DictionaryBase
8
     public partial class T_Sys_DictionaryBase
14
     {
9
     {
15
         public T_Sys_DictionaryBase()
10
         public T_Sys_DictionaryBase()
16
         { }
11
         { }
17
         #region Model
12
         #region Model
13
+        private int _f_id;
18
         private string _f_dictionaryflag;
14
         private string _f_dictionaryflag;
19
         private string _f_dictionaryname;
15
         private string _f_dictionaryname;
20
         private int? _f_sort;
16
         private int? _f_sort;
21
         private string _f_describe;
17
         private string _f_describe;
22
         private bool _f_state;
18
         private bool _f_state;
19
+        private string _f_groupcode;
20
+        /// <summary>
21
+        /// 
22
+        /// </summary>
23
+        public int F_Id
24
+        {
25
+            set { _f_id = value; }
26
+            get { return _f_id; }
27
+        }
23
         /// <summary>
28
         /// <summary>
24
         /// 
29
         /// 
25
         /// </summary>
30
         /// </summary>
60
             set { _f_state = value; }
65
             set { _f_state = value; }
61
             get { return _f_state; }
66
             get { return _f_state; }
62
         }
67
         }
68
+        /// <summary>
69
+        /// 
70
+        /// </summary>
71
+        public string F_GroupCode
72
+        {
73
+            set { _f_groupcode = value; }
74
+            get { return _f_groupcode; }
75
+        }
63
         #endregion Model
76
         #endregion Model
77
+
64
     }
78
     }
65
 }
79
 }
80
+

+ 11 - 5
codegit/CallCenterApi/CallCenterApi.Model/T_Sys_DictionaryValue.cs

1
 using System;
1
 using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Text;
5
-using System.Threading.Tasks;
6
-
7
 namespace CallCenterApi.Model
2
 namespace CallCenterApi.Model
8
 {
3
 {
9
     /// <summary>
4
     /// <summary>
22
         private int? _f_sort;
17
         private int? _f_sort;
23
         private string _f_describe;
18
         private string _f_describe;
24
         private bool _f_state;
19
         private bool _f_state;
20
+        private string _f_groupcode;
25
         /// <summary>
21
         /// <summary>
26
         /// 
22
         /// 
27
         /// </summary>
23
         /// </summary>
78
             set { _f_state = value; }
74
             set { _f_state = value; }
79
             get { return _f_state; }
75
             get { return _f_state; }
80
         }
76
         }
77
+        /// <summary>
78
+        /// 
79
+        /// </summary>
80
+        public string F_GroupCode
81
+        {
82
+            set { _f_groupcode = value; }
83
+            get { return _f_groupcode; }
84
+        }
81
         #endregion Model
85
         #endregion Model
86
+
82
     }
87
     }
83
 }
88
 }
89
+