Bladeren bron

ivr设置

lihai 6 jaren geleden
bovenliggende
commit
734109ea83

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

@@ -93,6 +93,7 @@
93 93
     <Compile Include="T_Sys_Department.cs" />
94 94
     <Compile Include="T_Sys_DictionaryBase.cs" />
95 95
     <Compile Include="T_Sys_DictionaryValue.cs" />
96
+    <Compile Include="T_Sys_IVRWords.cs" />
96 97
     <Compile Include="T_Sys_LoginLogs.cs" />
97 98
     <Compile Include="T_Sys_MobileData.cs" />
98 99
     <Compile Include="T_Sys_ModuleInfo.cs" />

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

@@ -1,6 +1,6 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2 2
 <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 3
   <PropertyGroup>
4
-    <ProjectView>ShowAllFiles</ProjectView>
4
+    <ProjectView>ProjectFiles</ProjectView>
5 5
   </PropertyGroup>
6 6
 </Project>

+ 132 - 0
codegit/CallCenterApi/CallCenterApi.BLL/T_Sys_IVRWords.cs

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

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

@@ -93,6 +93,7 @@
93 93
     <Compile Include="T_Sys_Department.cs" />
94 94
     <Compile Include="T_Sys_DictionaryBase.cs" />
95 95
     <Compile Include="T_Sys_DictionaryValue.cs" />
96
+    <Compile Include="T_Sys_IVRWords.cs" />
96 97
     <Compile Include="T_Sys_LoginLogs.cs" />
97 98
     <Compile Include="T_Sys_MobileData.cs" />
98 99
     <Compile Include="T_Sys_ModuleInfo.cs" />

+ 360 - 0
codegit/CallCenterApi/CallCenterApi.DAL/T_Sys_IVRWords.cs

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

+ 385 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/IVRWordsController.cs

@@ -0,0 +1,385 @@
1
+using CallCenter.Utility;
2
+using CallCenterApi.Common;
3
+using CallCenterApi.DB;
4
+using CallCenterApi.Interface.Controllers.Base;
5
+using System;
6
+using System.Collections.Generic;
7
+using System.Data;
8
+using System.Linq;
9
+using System.Web;
10
+using System.Web.Mvc;
11
+
12
+namespace CallCenterApi.Interface.Controllers
13
+{
14
+    public class IVRWordsController : BaseController
15
+    {
16
+        BLL.T_Sys_IVRWords dBLL = new BLL.T_Sys_IVRWords();
17
+        //获取IVR欢迎词列表
18
+        public ActionResult GetList()
19
+        {
20
+            string sql = " and F_IsDel = 0 ";
21
+            upstate();//更新过期的为失效状态
22
+            DataTable dt = new DataTable();
23
+
24
+            string key = HttpUtility.UrlDecode(RequestString.GetQueryString("key"));
25
+            string strbtime = HttpUtility.UrlDecode(RequestString.GetQueryString("btime"));
26
+            string stretime = HttpUtility.UrlDecode(RequestString.GetQueryString("etime"));
27
+
28
+            string strybtime = HttpUtility.UrlDecode(RequestString.GetQueryString("bytime"));
29
+            string stryetime = HttpUtility.UrlDecode(RequestString.GetQueryString("eytime"));
30
+            string state = HttpUtility.UrlDecode(RequestString.GetQueryString("state"));
31
+
32
+            string strpageindex = RequestString.GetQueryString("page");
33
+            int pageindex = 1;
34
+            string strpagesize = RequestString.GetQueryString("pagesize");
35
+            int pagesize = 10;
36
+
37
+            if (key.Trim() != "" && key != "undefined")
38
+            {
39
+                sql += " and (F_Title like '%" + key.Trim() + "%' or F_Content like '%" + key.Trim() + "%' )";
40
+            }
41
+            if (strbtime.Trim() != "" && strbtime != "undefined")
42
+            {
43
+                sql += " and F_CreateTime >= '" + Convert.ToDateTime(strbtime.Trim()).ToString("yyyy-MM-dd 00:00:00") + "' ";
44
+            }
45
+            if (stretime.Trim() != "" && stretime != "undefined")
46
+            {
47
+                sql += " and F_CreateTime <= '" + Convert.ToDateTime(stretime.Trim()).ToString("yyyy-MM-dd 23:59:59") + "' ";
48
+            }
49
+            if (state.Trim() != "" && state != "undefined")
50
+            {
51
+                //0未启动,1生效中,2已失效
52
+                sql += " and F_IsState=" + state;
53
+            }
54
+            #region 有效期添加
55
+            var sqlwb = "";
56
+            var sqlwe = "";
57
+            if (strybtime.Trim() != "" && strybtime != "undefined")
58
+            {
59
+                sqlwb = "  ('" + strybtime.Trim() + "' between F_StartDate and F_EndDate) ";
60
+            }
61
+            if (stryetime.Trim() != "" && stryetime != "undefined")
62
+            {
63
+                sqlwe = "  ('" + stryetime.Trim() + "' between F_StartDate and F_EndDate) ";
64
+            }
65
+
66
+            if (sqlwb != "" && sqlwe != "")
67
+            {
68
+                sql += " and (" + sqlwb + " or " + sqlwe + ")";
69
+            }
70
+            else
71
+            {
72
+                if (sqlwb != "")
73
+                {
74
+                    sql += " and (" + sqlwb + ")";
75
+                }
76
+                else if (sqlwe != "")
77
+                {
78
+                    sql += " and (" + sqlwe + ")";
79
+                }
80
+            }
81
+            #endregion
82
+
83
+            if (strpageindex.Trim() != "")
84
+            {
85
+                pageindex = Convert.ToInt32(strpageindex);
86
+            }
87
+
88
+            if (strpagesize.Trim() != "")
89
+            {
90
+                pagesize = Convert.ToInt32(strpagesize);
91
+            }
92
+            int recordCount = 0;
93
+            dt = BLL.PagerBLL.GetListPager(
94
+           "T_Sys_IVRWords",
95
+           "F_ID",
96
+           "*",
97
+           sql,
98
+           "ORDER BY F_ID desc",
99
+           pagesize,
100
+           pageindex,
101
+           true,
102
+           out recordCount);
103
+
104
+            var config = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='IVRWavPath' ").FirstOrDefault();
105
+            foreach (DataRow dr in dt.Rows)
106
+            {
107
+                string path = dr["F_WavNewName"] != null ? dr["F_WavNewName"].ToString() : "";
108
+                if (path != "" && config != null && !string.IsNullOrEmpty(config.F_ParamValue))
109
+                {
110
+                    dr["F_WavPath"] = config.F_ParamValue + dr["F_WavNewName"].ToString();
111
+                }
112
+            }
113
+
114
+            var obj = new
115
+            {
116
+                state = "success",
117
+                message = "成功",
118
+                rows = dt,
119
+                total = recordCount
120
+            };
121
+
122
+            return Content(obj.ToJson());
123
+
124
+        }
125
+
126
+        //获取IVR欢迎词
127
+        public ActionResult GetIVRWords(string id)
128
+        {
129
+            if (id != null && id.Trim() != "")
130
+            {
131
+
132
+                Model.T_Sys_IVRWords dModel = dBLL.GetModel(int.Parse(id.Trim()));
133
+                var config = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='IVRWavPath' ").FirstOrDefault();
134
+
135
+                if (dModel.F_WavNewName != "" && config != null && !string.IsNullOrEmpty(config.F_ParamValue))
136
+                {
137
+                    dModel.F_WavPath = config.F_ParamValue + dModel.F_WavNewName;
138
+                }
139
+
140
+                if (dModel != null)
141
+                {
142
+                    return Success("获取IVR欢迎词成功", dModel);
143
+                }
144
+                else
145
+                {
146
+                    return Error("获取IVR欢迎词失败");
147
+                }
148
+            }
149
+            else
150
+            {
151
+                return Error("获取参数失败");
152
+            }
153
+
154
+        }
155
+
156
+        //添加IVR欢迎词
157
+        public ActionResult AddIVRWords(string id, string title, string content,
158
+            string isstate, string sdate, string edate, string remark, int type,
159
+            string oldname, string newname, string path)
160
+        {
161
+            bool res = false;
162
+            int iss = returnisadd(id, sdate, edate);
163
+            if (iss <= 0)
164
+            {
165
+                Model.T_Sys_IVRWords dModel = new Model.T_Sys_IVRWords();
166
+                if (id != null && id.Trim() != "")
167
+                {
168
+                    dModel = dBLL.GetModel(int.Parse(id.Trim()));
169
+                    if (dModel == null)
170
+                    {
171
+                        return Error("此对象获取失败,请稍后再试!");
172
+                    }
173
+                }
174
+                dModel.F_Title = title.Trim();
175
+                dModel.F_Content = content.Trim();
176
+                dModel.F_IsState = Utils.StrToInt(isstate, 0);
177
+                dModel.F_StartDate = Utils.StrToDateTime(sdate, DateTime.Now);
178
+                dModel.F_EndDate = Utils.StrToDateTime(edate, DateTime.Now);
179
+                dModel.F_Remark = remark.Trim();
180
+                dModel.F_Type = type;//1文本,2语音文件
181
+                if (type == 2)
182
+                {
183
+                    dModel.F_WavOldName = oldname;
184
+                    dModel.F_WavNewName = newname;
185
+                    dModel.F_WavPath = path;
186
+                }
187
+                if (id != null && id.Trim() != "")
188
+                {
189
+                    res = dBLL.Update(dModel);
190
+                }
191
+                else
192
+                {
193
+                    dModel.F_IsDel = 0;
194
+                    dModel.F_CreateUser = CurrentUser.UserData.F_UserCode;
195
+                    dModel.F_CreateTime = DateTime.Now;
196
+                    int b = dBLL.Add(dModel);
197
+                    res = b > 0;
198
+                }
199
+            }
200
+            if (res)
201
+            {
202
+                return Success("保存IVR欢迎词成功");
203
+            }
204
+            else
205
+            {
206
+                if (iss > 0)
207
+                {
208
+                    return Error("存在已启动的IVR欢迎词在此有效期间,请查看记录后另外选择有效期!");
209
+                }
210
+                else
211
+                {
212
+                    return Error("保存IVR欢迎词失败");
213
+                }
214
+            }
215
+        }
216
+
217
+        //删除IVR欢迎词
218
+        public ActionResult DelIVRWords(string[] ids)
219
+        {
220
+            if (ids != null && ids.Length > 0)
221
+            {
222
+                string idd = " ";
223
+                foreach (string str in ids)
224
+                {
225
+                    idd += str + ",";
226
+                }
227
+                if (dBLL.DeleteList(idd.TrimEnd(',')))
228
+                {
229
+                    return Success("删除成功");
230
+                }
231
+                else
232
+                    return Error("删除失败");
233
+            }
234
+            else
235
+            {
236
+                return Error("请选择要删除的记录");
237
+            }
238
+
239
+        }
240
+
241
+        //获取ivr欢迎词是否有添加权限
242
+        private int returnisadd(string id, string sdate, string edate)
243
+        {
244
+
245
+            DateTime ssdate = Utils.StrToDateTime(sdate, DateTime.Now);
246
+            DateTime eedate = Utils.StrToDateTime(edate, DateTime.Now);
247
+            string sql = " isnull(F_IsState,0)=1 and F_IsDel = 0 ";//生效中状态
248
+            if (id != null && id != "")
249
+            {
250
+                sql += " and F_ID<>" + id;
251
+            }
252
+            sql += " and( "
253
+                + "('" + ssdate.ToString("yyyy-MM-dd HH:mm:ss") + "' between F_StartDate and F_EndDate) "
254
+                + "or ('" + eedate.ToString("yyyy-MM-dd HH:mm:ss") + "' between F_StartDate and F_EndDate) "
255
+                + ")";
256
+            return dBLL.GetRecordCount(sql);
257
+        }
258
+
259
+        private void upstate()
260
+        {
261
+            string sql = " update T_Sys_IVRWords set F_IsState=2 ";
262
+            sql += " where isnull(F_IsState,0)=1 and F_IsDel = 0 ";//启动状态
263
+            sql += " and F_EndDate<getdate()";
264
+            DbHelperSQL.ExecuteSql(sql);
265
+        }
266
+        #region
267
+        //上传音频文件,并修改为系统需要的格式
268
+        //public ActionResult UploadWav()
269
+        //{
270
+        //    HttpPostedFile _upFile = RequestString.GetFile("upFile");
271
+        //    if (_upFile != null)
272
+        //    {
273
+
274
+        //        string datename = DateTime.Now.ToString("yyyyMMddHHMMss");
275
+        //        string fullFileName = datename + "_" + _upFile.FileName;
276
+        //        string ffmpegLocation = Server.MapPath("~/");
277
+
278
+        //        #region 读取配置的上传路径-原文件和修改过格式的文件均上传至此
279
+        //        string savedir = Configs.GetValue("saveloc");
280
+        //        if (!System.IO.Directory.Exists(savedir))
281
+        //        {
282
+        //            System.IO.Directory.CreateDirectory(savedir);
283
+        //        }
284
+        //        #endregion
285
+
286
+        //        #region 保存原文件到项目中
287
+        //        string path = this.Request.ApplicationPath + "/auoupload/" + fullFileName;
288
+        //        if (!System.IO.Directory.Exists(Server.MapPath(this.Request.ApplicationPath + "/auoupload/")))
289
+        //        {
290
+        //            System.IO.Directory.CreateDirectory(Server.MapPath(this.Request.ApplicationPath + "/auoupload/"));
291
+        //        }
292
+        //        string physicalpath = Server.MapPath(path);
293
+        //        _upFile.SaveAs(physicalpath);
294
+        //        #endregion
295
+
296
+        //        #region 修改音频格式并保存新文件到指定目录中和项目中
297
+        //        if (!string.IsNullOrEmpty(physicalpath))
298
+        //        {
299
+        //            # region 修改音频格式
300
+        //            //通过cmd执行ffmpeg改变音频采样率
301
+        //            Process p = new Process();
302
+        //            p.StartInfo.FileName = "cmd.exe";
303
+        //            p.StartInfo.UseShellExecute = false;
304
+        //            p.StartInfo.RedirectStandardOutput = true;
305
+        //            p.StartInfo.RedirectStandardInput = true;
306
+        //            p.StartInfo.RedirectStandardError = true;
307
+        //            p.StartInfo.CreateNoWindow = true;
308
+
309
+        //            string temp_filename = physicalpath.Split('\\').Last().Split('.')[0] + "_temp";
310
+        //            string path1 = this.Request.ApplicationPath + "/auoupload/";
311
+        //            string physicalpath1 = Server.MapPath(path1);
312
+
313
+        //            p.Start();
314
+        //            p.StandardInput.WriteLine("cd " + ffmpegLocation);
315
+        //            p.StandardInput.WriteLine(ffmpegLocation.Split('\\').First());
316
+        //            p.StandardInput.WriteLine("ffmpeg.exe");
317
+        //            string changefile = "ffmpeg -i " + physicalpath + " -acodec pcm_u8 -ab 64 -ar 8000 -ac 1 " + savedir + temp_filename + ".wav";
318
+        //            string changefile1 = "ffmpeg -i " + physicalpath + " -acodec pcm_u8 -ab 64 -ar 8000 -ac 1 " + physicalpath1 + temp_filename + ".wav";
319
+        //            p.StandardInput.WriteLine(changefile);
320
+        //            p.StandardInput.WriteLine(changefile1);
321
+        //            while (true)
322
+        //            {
323
+        //                if (System.IO.File.Exists(physicalpath1 + temp_filename + ".wav"))
324
+        //                    break;
325
+        //            }
326
+        //            Thread.Sleep(3000);
327
+        //            p.StandardInput.WriteLine("exit");
328
+        //            ////p.WaitForExit();//等待程序执行完退出进程
329
+        //            //p.Close();//关闭进程
330
+        //            ////Kill 是终止没有图形化界面的进程的唯一方法。
331
+        //            //p.Dispose();//释放资源
332
+        //            p.Kill();
333
+        //            #endregion
334
+        //            #region 上传
335
+        //            uploadFile upfile = new uploadFile();
336
+        //            //通过读取配置文件,获取数据库
337
+        //            string _ftp = Configs.GetValue("ftp");
338
+        //            string _acc = Configs.GetValue("account");
339
+        //            string _pwd = Configs.GetValue("password");
340
+
341
+        //            upfile.ftpPath = _ftp;
342
+        //            upfile.ftpUserID = _acc;
343
+        //            upfile.ftpPassword = _pwd;
344
+        //            //20180207 原文件同时保存
345
+        //            //string uploadres = upfile.UploadLocalToFtp(physicalpath1 + temp_filename + ".wav");
346
+        //            string uploadBeforres = upfile.UploadLocalToFtp(physicalpath);
347
+        //            //if (uploadres == "上传成功!" && uploadBeforres == "上传成功!")
348
+        //            if (uploadBeforres == "上传成功!")
349
+        //            {
350
+        //                //写入日志
351
+        //                //string logfile = Server.MapPath("~/log.txt");
352
+        //                //if (!System.IO.File.Exists(logfile))
353
+        //                //{
354
+        //                //    System.IO.File.Create(logfile);
355
+        //                //}
356
+        //                ////开始写入
357
+        //                //string str = DateTime.Now.ToString() + " 文件" + fullFileName + "上传成功";
358
+        //                //System.IO.File.AppendAllLines(logfile, new string[] { str }, Encoding.GetEncoding("gb2312"));
359
+
360
+
361
+        //                //删除本地文件
362
+        //                //System.IO.File.Delete(savedir + fullFileName);
363
+        //                //System.IO.File.Delete(savedir + temp_filename + ".wav");
364
+        //                //System.IO.File.Delete(physicalpath);
365
+        //                var obj = new
366
+        //                {
367
+        //                    oldname = fullFileName,
368
+        //                    newname = temp_filename + ".wav",
369
+        //                    wavpath = savedir + temp_filename + ".wav"
370
+        //                };
371
+        //                return Success("文件上传成功", obj);
372
+        //            }
373
+        //            else
374
+        //                return Error("文件上传失败,请重新上传::::::::uploadBeforres::" + uploadBeforres);
375
+        //            #endregion
376
+        //        }
377
+        //        else
378
+        //            return Error("格式修改出错,请重新上传");
379
+        //        #endregion
380
+        //    }
381
+        //    return Error("参数传入失败");
382
+        //}
383
+        #endregion
384
+    }
385
+}

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

@@ -99,6 +99,7 @@
99 99
     <Compile Include="T_Sys_Department.cs" />
100 100
     <Compile Include="T_Sys_DictionaryBase.cs" />
101 101
     <Compile Include="T_Sys_DictionaryValue.cs" />
102
+    <Compile Include="T_Sys_IVRWords.cs" />
102 103
     <Compile Include="T_Sys_LoginLogs.cs" />
103 104
     <Compile Include="T_Sys_MobileData.cs" />
104 105
     <Compile Include="T_Sys_ModuleFunctions.cs" />

+ 147 - 0
codegit/CallCenterApi/CallCenterApi.Model/T_Sys_IVRWords.cs

@@ -0,0 +1,147 @@
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
8
+{
9
+    /// <summary>
10
+    /// IVR语音文件表
11
+    /// </summary>
12
+    [Serializable]
13
+    public partial class T_Sys_IVRWords
14
+    {
15
+        public T_Sys_IVRWords()
16
+        { }
17
+        #region Model
18
+        private int _f_id;
19
+        private string _f_title;
20
+        private string _f_content;
21
+        private int? _f_type;
22
+        private string _f_wavoldname;
23
+        private string _f_wavnewname;
24
+        private string _f_wavpath;
25
+        private DateTime? _f_startdate = DateTime.Now;
26
+        private DateTime? _f_enddate = DateTime.Now;
27
+        private string _f_remark;
28
+        private int? _f_isstate = 0;
29
+        private DateTime? _f_createtime = DateTime.Now;
30
+        private string _f_createuser;
31
+        private int? _f_isdel = 0;
32
+        /// <summary>
33
+        /// 自增ID
34
+        /// </summary>
35
+        public int F_ID
36
+        {
37
+            set { _f_id = value; }
38
+            get { return _f_id; }
39
+        }
40
+        /// <summary>
41
+        /// 标题
42
+        /// </summary>
43
+        public string F_Title
44
+        {
45
+            set { _f_title = value; }
46
+            get { return _f_title; }
47
+        }
48
+        /// <summary>
49
+        /// 内容
50
+        /// </summary>
51
+        public string F_Content
52
+        {
53
+            set { _f_content = value; }
54
+            get { return _f_content; }
55
+        }
56
+        /// <summary>
57
+        /// 类型:1文本,2语音文件
58
+        /// </summary>
59
+        public int? F_Type
60
+        {
61
+            set { _f_type = value; }
62
+            get { return _f_type; }
63
+        }
64
+        /// <summary>
65
+        /// 语音文件原名
66
+        /// </summary>
67
+        public string F_WavOldName
68
+        {
69
+            set { _f_wavoldname = value; }
70
+            get { return _f_wavoldname; }
71
+        }
72
+        /// <summary>
73
+        /// 语音文件新名
74
+        /// </summary>
75
+        public string F_WavNewName
76
+        {
77
+            set { _f_wavnewname = value; }
78
+            get { return _f_wavnewname; }
79
+        }
80
+        /// <summary>
81
+        /// 语音文件路径
82
+        /// </summary>
83
+        public string F_WavPath
84
+        {
85
+            set { _f_wavpath = value; }
86
+            get { return _f_wavpath; }
87
+        }
88
+        /// <summary>
89
+        /// 生效时间
90
+        /// </summary>
91
+        public DateTime? F_StartDate
92
+        {
93
+            set { _f_startdate = value; }
94
+            get { return _f_startdate; }
95
+        }
96
+        /// <summary>
97
+        /// 失效时间
98
+        /// </summary>
99
+        public DateTime? F_EndDate
100
+        {
101
+            set { _f_enddate = value; }
102
+            get { return _f_enddate; }
103
+        }
104
+        /// <summary>
105
+        /// 备注
106
+        /// </summary>
107
+        public string F_Remark
108
+        {
109
+            set { _f_remark = value; }
110
+            get { return _f_remark; }
111
+        }
112
+        /// <summary>
113
+        /// 状态:1启动,0不启动
114
+        /// </summary>
115
+        public int? F_IsState
116
+        {
117
+            set { _f_isstate = value; }
118
+            get { return _f_isstate; }
119
+        }
120
+        /// <summary>
121
+        /// 添加时间
122
+        /// </summary>
123
+        public DateTime? F_CreateTime
124
+        {
125
+            set { _f_createtime = value; }
126
+            get { return _f_createtime; }
127
+        }
128
+        /// <summary>
129
+        /// 添加人
130
+        /// </summary>
131
+        public string F_CreateUser
132
+        {
133
+            set { _f_createuser = value; }
134
+            get { return _f_createuser; }
135
+        }
136
+        /// <summary>
137
+        /// 是否删除:0未删除,1已删除
138
+        /// </summary>
139
+        public int? F_IsDel
140
+        {
141
+            set { _f_isdel = value; }
142
+            get { return _f_isdel; }
143
+        }
144
+        #endregion Model
145
+
146
+    }
147
+}

+ 90 - 0
sql/T_Sys_IVRWords.sql

@@ -0,0 +1,90 @@
1
+USE [XinXiangMD_Base_Callcenter]
2
+GO
3
+
4
+/****** Object:  Table [dbo].[T_Sys_IVRWords]    Script Date: 11/12/2019 08:40:44 ******/
5
+SET ANSI_NULLS ON
6
+GO
7
+
8
+SET QUOTED_IDENTIFIER ON
9
+GO
10
+
11
+CREATE TABLE [dbo].[T_Sys_IVRWords](
12
+	[F_ID] [int] IDENTITY(1,1) NOT NULL,
13
+	[F_Title] [nvarchar](500) NULL,
14
+	[F_Content] [ntext] NULL,
15
+	[F_Type] [int] NULL,
16
+	[F_WavOldName] [nvarchar](500) NULL,
17
+	[F_WavNewName] [nvarchar](500) NULL,
18
+	[F_WavPath] [ntext] NULL,
19
+	[F_StartDate] [datetime] NULL,
20
+	[F_EndDate] [datetime] NULL,
21
+	[F_Remark] [ntext] NULL,
22
+	[F_IsState] [int] NULL,
23
+	[F_CreateTime] [datetime] NULL,
24
+	[F_CreateUser] [nvarchar](50) NULL,
25
+	[F_IsDel] [int] NULL
26
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
27
+
28
+GO
29
+
30
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'自增ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Sys_IVRWords', @level2type=N'COLUMN',@level2name=N'F_ID'
31
+GO
32
+
33
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标题' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Sys_IVRWords', @level2type=N'COLUMN',@level2name=N'F_Title'
34
+GO
35
+
36
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Sys_IVRWords', @level2type=N'COLUMN',@level2name=N'F_Content'
37
+GO
38
+
39
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类型:1文本,2语音文件' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Sys_IVRWords', @level2type=N'COLUMN',@level2name=N'F_Type'
40
+GO
41
+
42
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'语音文件原名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Sys_IVRWords', @level2type=N'COLUMN',@level2name=N'F_WavOldName'
43
+GO
44
+
45
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'语音文件新名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Sys_IVRWords', @level2type=N'COLUMN',@level2name=N'F_WavNewName'
46
+GO
47
+
48
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'语音文件路径' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Sys_IVRWords', @level2type=N'COLUMN',@level2name=N'F_WavPath'
49
+GO
50
+
51
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'生效时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Sys_IVRWords', @level2type=N'COLUMN',@level2name=N'F_StartDate'
52
+GO
53
+
54
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'失效时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Sys_IVRWords', @level2type=N'COLUMN',@level2name=N'F_EndDate'
55
+GO
56
+
57
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Sys_IVRWords', @level2type=N'COLUMN',@level2name=N'F_Remark'
58
+GO
59
+
60
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态:1启动,0不启动' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Sys_IVRWords', @level2type=N'COLUMN',@level2name=N'F_IsState'
61
+GO
62
+
63
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Sys_IVRWords', @level2type=N'COLUMN',@level2name=N'F_CreateTime'
64
+GO
65
+
66
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Sys_IVRWords', @level2type=N'COLUMN',@level2name=N'F_CreateUser'
67
+GO
68
+
69
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否删除:0未删除,1已删除' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Sys_IVRWords', @level2type=N'COLUMN',@level2name=N'F_IsDel'
70
+GO
71
+
72
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'IVR语音文件表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Sys_IVRWords'
73
+GO
74
+
75
+ALTER TABLE [dbo].[T_Sys_IVRWords] ADD  DEFAULT (getdate()) FOR [F_StartDate]
76
+GO
77
+
78
+ALTER TABLE [dbo].[T_Sys_IVRWords] ADD  DEFAULT (getdate()) FOR [F_EndDate]
79
+GO
80
+
81
+ALTER TABLE [dbo].[T_Sys_IVRWords] ADD  DEFAULT ((0)) FOR [F_IsState]
82
+GO
83
+
84
+ALTER TABLE [dbo].[T_Sys_IVRWords] ADD  DEFAULT (getdate()) FOR [F_CreateTime]
85
+GO
86
+
87
+ALTER TABLE [dbo].[T_Sys_IVRWords] ADD  DEFAULT ((0)) FOR [F_IsDel]
88
+GO
89
+
90
+