liyuanyuan лет назад: 4
Родитель
Сommit
202853fb55

+ 176 - 0
codegit/CallCenterApi/CallCenterApi.BLL/AutoCallOut.cs

@@ -0,0 +1,176 @@
1
+/**  版本信息模板在安装目录下,可自行修改。
2
+* AutoCallOut.cs
3
+*
4
+* 功 能: N/A
5
+* 类 名: AutoCallOut
6
+*
7
+* Ver    变更日期             负责人  变更内容
8
+* ───────────────────────────────────
9
+* V0.01  2021/11/16 15:58:24   N/A    初版
10
+*
11
+* Copyright (c) 2012 Maticsoft Corporation. All rights reserved.
12
+*┌──────────────────────────────────┐
13
+*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │
14
+*│ 版权所有:动软卓越(北京)科技有限公司              │
15
+*└──────────────────────────────────┘
16
+*/
17
+using System;
18
+using System.Data;
19
+using System.Collections.Generic;
20
+
21
+using CallCenterApi.Model;
22
+namespace CallCenterApi.BLL
23
+{
24
+	/// <summary>
25
+	/// AutoCallOut
26
+	/// </summary>
27
+	public partial class AutoCallOut
28
+	{
29
+		private readonly CallCenterApi.DAL.AutoCallOut dal=new CallCenterApi.DAL.AutoCallOut();
30
+		public AutoCallOut()
31
+		{}
32
+		#region  BasicMethod
33
+
34
+		/// <summary>
35
+		/// 得到最大ID
36
+		/// </summary>
37
+		public int GetMaxId()
38
+		{
39
+			return dal.GetMaxId();
40
+		}
41
+
42
+		/// <summary>
43
+		/// 是否存在该记录
44
+		/// </summary>
45
+		public bool Exists(int ID)
46
+		{
47
+			return dal.Exists(ID);
48
+		}
49
+
50
+		/// <summary>
51
+		/// 增加一条数据
52
+		/// </summary>
53
+		public int  Add(CallCenterApi.Model.AutoCallOut model)
54
+		{
55
+			return dal.Add(model);
56
+		}
57
+
58
+		/// <summary>
59
+		/// 更新一条数据
60
+		/// </summary>
61
+		public bool Update(CallCenterApi.Model.AutoCallOut model)
62
+		{
63
+			return dal.Update(model);
64
+		}
65
+
66
+		/// <summary>
67
+		/// 删除一条数据
68
+		/// </summary>
69
+		public bool Delete(int ID)
70
+		{
71
+			
72
+			return dal.Delete(ID);
73
+		}
74
+		/// <summary>
75
+		/// 删除一条数据
76
+		/// </summary>
77
+		public bool DeleteList(string IDlist )
78
+		{
79
+			return dal.DeleteList(IDlist );
80
+		}
81
+
82
+		/// <summary>
83
+		/// 得到一个对象实体
84
+		/// </summary>
85
+		public CallCenterApi.Model.AutoCallOut GetModel(int ID)
86
+		{
87
+			
88
+			return dal.GetModel(ID);
89
+		}
90
+
91
+		/// <summary>
92
+		/// 得到一个对象实体,从缓存中
93
+		/// </summary>
94
+	 
95
+
96
+		/// <summary>
97
+		/// 获得数据列表
98
+		/// </summary>
99
+		public DataSet GetList(string strWhere)
100
+		{
101
+			return dal.GetList(strWhere);
102
+		}
103
+		/// <summary>
104
+		/// 获得前几行数据
105
+		/// </summary>
106
+		public DataSet GetList(int Top,string strWhere,string filedOrder)
107
+		{
108
+			return dal.GetList(Top,strWhere,filedOrder);
109
+		}
110
+		/// <summary>
111
+		/// 获得数据列表
112
+		/// </summary>
113
+		public List<CallCenterApi.Model.AutoCallOut> GetModelList(string strWhere)
114
+		{
115
+			DataSet ds = dal.GetList(strWhere);
116
+			return DataTableToList(ds.Tables[0]);
117
+		}
118
+		/// <summary>
119
+		/// 获得数据列表
120
+		/// </summary>
121
+		public List<CallCenterApi.Model.AutoCallOut> DataTableToList(DataTable dt)
122
+		{
123
+			List<CallCenterApi.Model.AutoCallOut> modelList = new List<CallCenterApi.Model.AutoCallOut>();
124
+			int rowsCount = dt.Rows.Count;
125
+			if (rowsCount > 0)
126
+			{
127
+				CallCenterApi.Model.AutoCallOut model;
128
+				for (int n = 0; n < rowsCount; n++)
129
+				{
130
+					model = dal.DataRowToModel(dt.Rows[n]);
131
+					if (model != null)
132
+					{
133
+						modelList.Add(model);
134
+					}
135
+				}
136
+			}
137
+			return modelList;
138
+		}
139
+
140
+		/// <summary>
141
+		/// 获得数据列表
142
+		/// </summary>
143
+		public DataSet GetAllList()
144
+		{
145
+			return GetList("");
146
+		}
147
+
148
+		/// <summary>
149
+		/// 分页获取数据列表
150
+		/// </summary>
151
+		public int GetRecordCount(string strWhere)
152
+		{
153
+			return dal.GetRecordCount(strWhere);
154
+		}
155
+		/// <summary>
156
+		/// 分页获取数据列表
157
+		/// </summary>
158
+		public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
159
+		{
160
+			return dal.GetListByPage( strWhere,  orderby,  startIndex,  endIndex);
161
+		}
162
+		/// <summary>
163
+		/// 分页获取数据列表
164
+		/// </summary>
165
+		//public DataSet GetList(int PageSize,int PageIndex,string strWhere)
166
+		//{
167
+			//return dal.GetList(PageSize,PageIndex,strWhere);
168
+		//}
169
+
170
+		#endregion  BasicMethod
171
+		#region  ExtensionMethod
172
+
173
+		#endregion  ExtensionMethod
174
+	}
175
+}
176
+

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

@@ -42,6 +42,7 @@
42 42
   <ItemGroup>
43 43
     <Compile Include="article.cs" />
44 44
     <Compile Include="article_category.cs" />
45
+    <Compile Include="AutoCallOut.cs" />
45 46
     <Compile Include="CallResult.cs" />
46 47
     <Compile Include="his\o_sf_bingrenqk.cs" />
47 48
     <Compile Include="his\sf_bingrenqk.cs" />

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

@@ -0,0 +1,360 @@
1
+/**  版本信息模板在安装目录下,可自行修改。
2
+* AutoCallOut.cs
3
+*
4
+* 功 能: N/A
5
+* 类 名: AutoCallOut
6
+*
7
+* Ver    变更日期             负责人  变更内容
8
+* ───────────────────────────────────
9
+* V0.01  2021/11/16 15:58:24   N/A    初版
10
+*
11
+* Copyright (c) 2012 Maticsoft Corporation. All rights reserved.
12
+*┌──────────────────────────────────┐
13
+*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │
14
+*│ 版权所有:动软卓越(北京)科技有限公司              │
15
+*└──────────────────────────────────┘
16
+*/
17
+using System;
18
+using System.Data;
19
+using System.Text;
20
+using System.Data.SqlClient;
21
+using CallCenterApi.DB;
22
+
23
+namespace CallCenterApi.DAL
24
+{
25
+	/// <summary>
26
+	/// 数据访问类:AutoCallOut
27
+	/// </summary>
28
+	public partial class AutoCallOut
29
+	{
30
+		public AutoCallOut()
31
+		{}
32
+		#region  BasicMethod
33
+
34
+		/// <summary>
35
+		/// 得到最大ID
36
+		/// </summary>
37
+		public int GetMaxId()
38
+		{
39
+		return DbHelperSQL.GetMaxID("ID", "AutoCallOut"); 
40
+		}
41
+
42
+		/// <summary>
43
+		/// 是否存在该记录
44
+		/// </summary>
45
+		public bool Exists(int ID)
46
+		{
47
+			StringBuilder strSql=new StringBuilder();
48
+			strSql.Append("select count(1) from AutoCallOut");
49
+			strSql.Append(" where ID=@ID");
50
+			SqlParameter[] parameters = {
51
+					new SqlParameter("@ID", SqlDbType.Int,4)
52
+			};
53
+			parameters[0].Value = ID;
54
+
55
+			return DbHelperSQL.Exists(strSql.ToString(),parameters);
56
+		}
57
+
58
+
59
+		/// <summary>
60
+		/// 增加一条数据
61
+		/// </summary>
62
+		public int Add(CallCenterApi.Model.AutoCallOut model)
63
+		{
64
+			StringBuilder strSql=new StringBuilder();
65
+			strSql.Append("insert into AutoCallOut(");
66
+			strSql.Append("usercode,tel,createtime,isphoned,identification,callid)");
67
+			strSql.Append(" values (");
68
+			strSql.Append("@usercode,@tel,@createtime,@isphoned,@identification,@callid)");
69
+			strSql.Append(";select @@IDENTITY");
70
+			SqlParameter[] parameters = {
71
+					new SqlParameter("@usercode", SqlDbType.VarChar,20),
72
+					new SqlParameter("@tel", SqlDbType.VarChar,50),
73
+					new SqlParameter("@createtime", SqlDbType.DateTime),
74
+					new SqlParameter("@isphoned", SqlDbType.Int,4),
75
+					new SqlParameter("@identification", SqlDbType.VarChar,100),
76
+					new SqlParameter("@callid", SqlDbType.VarChar,200)};
77
+			parameters[0].Value = model.usercode;
78
+			parameters[1].Value = model.tel;
79
+			parameters[2].Value = model.createtime;
80
+			parameters[3].Value = model.isphoned;
81
+			parameters[4].Value = model.identification;
82
+			parameters[5].Value = model.callid;
83
+
84
+			object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
85
+			if (obj == null)
86
+			{
87
+				return 0;
88
+			}
89
+			else
90
+			{
91
+				return Convert.ToInt32(obj);
92
+			}
93
+		}
94
+		/// <summary>
95
+		/// 更新一条数据
96
+		/// </summary>
97
+		public bool Update(CallCenterApi.Model.AutoCallOut model)
98
+		{
99
+			StringBuilder strSql=new StringBuilder();
100
+			strSql.Append("update AutoCallOut set ");
101
+			strSql.Append("usercode=@usercode,");
102
+			strSql.Append("tel=@tel,");
103
+			strSql.Append("createtime=@createtime,");
104
+			strSql.Append("isphoned=@isphoned,");
105
+			strSql.Append("identification=@identification,");
106
+			strSql.Append("callid=@callid");
107
+			strSql.Append(" where ID=@ID");
108
+			SqlParameter[] parameters = {
109
+					new SqlParameter("@usercode", SqlDbType.VarChar,20),
110
+					new SqlParameter("@tel", SqlDbType.VarChar,50),
111
+					new SqlParameter("@createtime", SqlDbType.DateTime),
112
+					new SqlParameter("@isphoned", SqlDbType.Int,4),
113
+					new SqlParameter("@identification", SqlDbType.VarChar,100),
114
+					new SqlParameter("@callid", SqlDbType.VarChar,200),
115
+					new SqlParameter("@ID", SqlDbType.Int,4)};
116
+			parameters[0].Value = model.usercode;
117
+			parameters[1].Value = model.tel;
118
+			parameters[2].Value = model.createtime;
119
+			parameters[3].Value = model.isphoned;
120
+			parameters[4].Value = model.identification;
121
+			parameters[5].Value = model.callid;
122
+			parameters[6].Value = model.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 ID)
139
+		{
140
+			
141
+			StringBuilder strSql=new StringBuilder();
142
+			strSql.Append("delete from AutoCallOut ");
143
+			strSql.Append(" where ID=@ID");
144
+			SqlParameter[] parameters = {
145
+					new SqlParameter("@ID", SqlDbType.Int,4)
146
+			};
147
+			parameters[0].Value = 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 IDlist )
163
+		{
164
+			StringBuilder strSql=new StringBuilder();
165
+			strSql.Append("delete from AutoCallOut ");
166
+			strSql.Append(" where ID in ("+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.AutoCallOut GetModel(int ID)
183
+		{
184
+			
185
+			StringBuilder strSql=new StringBuilder();
186
+			strSql.Append("select  top 1 ID,usercode,tel,createtime,isphoned,identification,callid from AutoCallOut ");
187
+			strSql.Append(" where ID=@ID");
188
+			SqlParameter[] parameters = {
189
+					new SqlParameter("@ID", SqlDbType.Int,4)
190
+			};
191
+			parameters[0].Value = ID;
192
+
193
+			CallCenterApi.Model.AutoCallOut model=new CallCenterApi.Model.AutoCallOut();
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.AutoCallOut DataRowToModel(DataRow row)
210
+		{
211
+			CallCenterApi.Model.AutoCallOut model=new CallCenterApi.Model.AutoCallOut();
212
+			if (row != null)
213
+			{
214
+				if(row["ID"]!=null && row["ID"].ToString()!="")
215
+				{
216
+					model.ID=int.Parse(row["ID"].ToString());
217
+				}
218
+				if(row["usercode"]!=null)
219
+				{
220
+					model.usercode=row["usercode"].ToString();
221
+				}
222
+				if(row["tel"]!=null)
223
+				{
224
+					model.tel=row["tel"].ToString();
225
+				}
226
+				if(row["createtime"]!=null && row["createtime"].ToString()!="")
227
+				{
228
+					model.createtime=DateTime.Parse(row["createtime"].ToString());
229
+				}
230
+				if(row["isphoned"]!=null && row["isphoned"].ToString()!="")
231
+				{
232
+					model.isphoned=int.Parse(row["isphoned"].ToString());
233
+				}
234
+				if(row["identification"]!=null)
235
+				{
236
+					model.identification=row["identification"].ToString();
237
+				}
238
+				if(row["callid"]!=null)
239
+				{
240
+					model.callid=row["callid"].ToString();
241
+				}
242
+			}
243
+			return model;
244
+		}
245
+
246
+		/// <summary>
247
+		/// 获得数据列表
248
+		/// </summary>
249
+		public DataSet GetList(string strWhere)
250
+		{
251
+			StringBuilder strSql=new StringBuilder();
252
+			strSql.Append("select ID,usercode,tel,createtime,isphoned,identification,callid ");
253
+			strSql.Append(" FROM AutoCallOut ");
254
+			if(strWhere.Trim()!="")
255
+			{
256
+				strSql.Append(" where "+strWhere);
257
+			}
258
+			return DbHelperSQL.Query(strSql.ToString());
259
+		}
260
+
261
+		/// <summary>
262
+		/// 获得前几行数据
263
+		/// </summary>
264
+		public DataSet GetList(int Top,string strWhere,string filedOrder)
265
+		{
266
+			StringBuilder strSql=new StringBuilder();
267
+			strSql.Append("select ");
268
+			if(Top>0)
269
+			{
270
+				strSql.Append(" top "+Top.ToString());
271
+			}
272
+			strSql.Append(" ID,usercode,tel,createtime,isphoned,identification,callid ");
273
+			strSql.Append(" FROM AutoCallOut ");
274
+			if(strWhere.Trim()!="")
275
+			{
276
+				strSql.Append(" where "+strWhere);
277
+			}
278
+			strSql.Append(" order by " + filedOrder);
279
+			return DbHelperSQL.Query(strSql.ToString());
280
+		}
281
+
282
+		/// <summary>
283
+		/// 获取记录总数
284
+		/// </summary>
285
+		public int GetRecordCount(string strWhere)
286
+		{
287
+			StringBuilder strSql=new StringBuilder();
288
+			strSql.Append("select count(1) FROM AutoCallOut ");
289
+			if(strWhere.Trim()!="")
290
+			{
291
+				strSql.Append(" where "+strWhere);
292
+			}
293
+			object obj = DbHelperSQL.GetSingle(strSql.ToString());
294
+			if (obj == null)
295
+			{
296
+				return 0;
297
+			}
298
+			else
299
+			{
300
+				return Convert.ToInt32(obj);
301
+			}
302
+		}
303
+		/// <summary>
304
+		/// 分页获取数据列表
305
+		/// </summary>
306
+		public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
307
+		{
308
+			StringBuilder strSql=new StringBuilder();
309
+			strSql.Append("SELECT * FROM ( ");
310
+			strSql.Append(" SELECT ROW_NUMBER() OVER (");
311
+			if (!string.IsNullOrEmpty(orderby.Trim()))
312
+			{
313
+				strSql.Append("order by T." + orderby );
314
+			}
315
+			else
316
+			{
317
+				strSql.Append("order by T.ID desc");
318
+			}
319
+			strSql.Append(")AS Row, T.*  from AutoCallOut T ");
320
+			if (!string.IsNullOrEmpty(strWhere.Trim()))
321
+			{
322
+				strSql.Append(" WHERE " + strWhere);
323
+			}
324
+			strSql.Append(" ) TT");
325
+			strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
326
+			return DbHelperSQL.Query(strSql.ToString());
327
+		}
328
+
329
+		/*
330
+		/// <summary>
331
+		/// 分页获取数据列表
332
+		/// </summary>
333
+		public DataSet GetList(int PageSize,int PageIndex,string strWhere)
334
+		{
335
+			SqlParameter[] parameters = {
336
+					new SqlParameter("@tblName", SqlDbType.VarChar, 255),
337
+					new SqlParameter("@fldName", SqlDbType.VarChar, 255),
338
+					new SqlParameter("@PageSize", SqlDbType.Int),
339
+					new SqlParameter("@PageIndex", SqlDbType.Int),
340
+					new SqlParameter("@IsReCount", SqlDbType.Bit),
341
+					new SqlParameter("@OrderType", SqlDbType.Bit),
342
+					new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
343
+					};
344
+			parameters[0].Value = "AutoCallOut";
345
+			parameters[1].Value = "ID";
346
+			parameters[2].Value = PageSize;
347
+			parameters[3].Value = PageIndex;
348
+			parameters[4].Value = 0;
349
+			parameters[5].Value = 0;
350
+			parameters[6].Value = strWhere;	
351
+			return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
352
+		}*/
353
+
354
+		#endregion  BasicMethod
355
+		#region  ExtensionMethod
356
+
357
+		#endregion  ExtensionMethod
358
+	}
359
+}
360
+

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

@@ -43,6 +43,7 @@
43 43
   <ItemGroup>
44 44
     <Compile Include="article.cs" />
45 45
     <Compile Include="article_category.cs" />
46
+    <Compile Include="AutoCallOut.cs" />
46 47
     <Compile Include="CallRecords.cs" />
47 48
     <Compile Include="his\o_sf_bingrenqk.cs" />
48 49
     <Compile Include="his\o_sf_shoushuxx.cs" />

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Configs/system.config

@@ -37,7 +37,7 @@
37 37
   <add key="saveloc" value="\upload_wav\" />
38 38
 
39 39
 
40
-  <add key="datedue" value="2021-11-12 23:59:59" />
40
+  <add key="datedue" value="2028-11-12 23:59:59" />
41 41
 
42 42
   <add key="remind" value="7" />
43 43
 </appSettings>

+ 127 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/callout/AutoCallOutController.cs

@@ -1,6 +1,9 @@
1
-using CallCenterApi.Interface.Controllers.Base;
1
+using CallCenterApi.Cache.Models;
2
+using CallCenterApi.DB;
3
+using CallCenterApi.Interface.Controllers.Base;
2 4
 using System;
3 5
 using System.Collections.Generic;
6
+using System.Data;
4 7
 using System.Linq;
5 8
 using System.Web;
6 9
 using System.Web.Mvc;
@@ -9,12 +12,135 @@ namespace CallCenterApi.Interface.Controllers.callout
9 12
 {
10 13
     public class AutoCallOutController : BaseController
11 14
     {
15
+        private BLL.AutoCallOut bllauto = new BLL.AutoCallOut();
12 16
         // GET: AutoCallOut
13 17
         public ActionResult Index()
14 18
         {
15 19
             return View();
16 20
         }
17 21
 
22
+        /// 获取第一条数据
23
+        /// 读取最早的工号和呼出的电话 创建时间  标记未拨出
24
+
25
+        public ActionResult GetMinModel()
26
+        {
27
+            string usercode = CurrentUser.UserData.F_UserCode;
28
+            DataTable dt = new DataTable();
29
+            var sql = " isphoned=0 ";
30
+            sql += " AND  usercode='" + usercode + "'";
31
+            string orderby = "  order by  createtime";
32
+
33
+            string sqldt = "SELECT usercode,tel,identification,id FROM AutoCallOut WHERE " + sql + orderby + " ";
34
+            dt = DbHelperSQL.Query(sqldt).Tables[0];
35
+
36
+            List<Model.AutoCallOut> modellist = bllauto.GetModelList(sql + orderby);
37
+            if (modellist != null && modellist.Count > 0)
38
+            {
39
+
40
+                return Success("获取成功", modellist.First());
41
+            }
42
+            return Success("获取失败");
43
+        }
44
+        ///tianjia数据
45
+        ///
46
+        public ActionResult AddInfo(string usercode, string tel, string identification)
47
+        {
48
+
49
+            Model.AutoCallOut dModel = new Model.AutoCallOut();
50
+
51
+            dModel.tel = tel.Trim();
52
+            dModel.identification = identification.Trim();
53
+            dModel.usercode = usercode.Trim();
54
+            dModel.isphoned = 0;
55
+            dModel.createtime = DateTime.Now;
56
+            int b = new BLL.AutoCallOut().Add(dModel);
57
+            if (b > 0)
58
+            {
59
+                return Success("添加成功");
60
+            }
61
+            else
62
+            {
63
+                return Error("添加失败");
64
+            }
65
+
66
+
67
+        }
68
+
69
+        public ActionResult UpdateCallIdInfo(string usercode, string tel, string identification, string callid)
70
+        {
71
+            
72
+            string wherestr = " usercode='" + usercode + "' and tel='" + tel + "' and identification='" + identification + "'";
73
+
74
+            List<Model.AutoCallOut> list = bllauto.GetModelList(wherestr);
75
+
76
+            if (list != null && list.Count > 0)
77
+            {
78
+                Model.AutoCallOut dModel = list.First();
79
+                dModel.callid = callid;
80
+                dModel.isphoned = 1;
81
+                bool b = new BLL.AutoCallOut().Update(dModel);
82
+                if (b)
83
+                {
84
+                    return Success("更新成功");
85
+                }
86
+                else
87
+                {
88
+                    return Error("更新失败");
89
+                }
90
+            }
91
+            return Error("更新失败");
92
+
93
+        }
94
+
95
+        public ActionResult GetCallFile(string identification)
96
+        {
97
+            string filepath = "";
98
+            string TalkStartTime = "";
99
+            int TalkLongTime = 0;
100
+            string wherestr = " identification='" + identification + "'";
101
+
102
+            List<Model.AutoCallOut> list = bllauto.GetModelList(wherestr);
103
+
104
+            if (list!=null &&list.Count>0)
105
+            {
106
+                Model.AutoCallOut dModel = list.First();
107
+               string callid=  dModel.callid;
108
+                if(!string.IsNullOrEmpty(callid))
109
+                {
110
+                    BLL.T_Call_CallRecords callBll = new BLL.T_Call_CallRecords();
111
+                    Model.T_Call_CallRecords callmodel = callBll.GetModelByCallId(callid);
112
+                   string path= callmodel.FilePath != null ? callmodel.FilePath : "";
113
+                    TalkStartTime = callmodel.TalkStartTime.ToString();
114
+                    TalkLongTime = callmodel.TalkLongTime == null ? 0 :(int) callmodel.TalkLongTime;
115
+
116
+                    var config = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='PlayPath' ").FirstOrDefault();
117
+
118
+                    if (path != "" && config != null && !string.IsNullOrEmpty(config.F_ParamValue))
119
+                    {
120
+                        var ym = config.F_ParamValue;
121
+                        if (ym.Substring(ym.Length - 1) == "/")
122
+                        {
123
+                            ym = ym.Substring(0, ym.Length - 1);
124
+                        }
125
+                        filepath = ym + path.Substring(path.IndexOf(':') + 1).Replace('\\', '/');
126
+                    }
127
+
128
+
129
+                }
130
+                var obj = new {
131
+                    FilePath=filepath,
132
+                    TalkStartTime= TalkStartTime,
133
+                    TalkLongTime= TalkLongTime
134
+
135
+                };
136
+
137
+                return Success("获取成功", obj);
138
+
139
+            }
140
+
141
+            return Error("没有数据");
142
+        }
143
+
18 144
 
19 145
     }
20 146
 }

+ 96 - 0
codegit/CallCenterApi/CallCenterApi.Model/AutoCallOut.cs

@@ -0,0 +1,96 @@
1
+/**  版本信息模板在安装目录下,可自行修改。
2
+* AutoCallOut.cs
3
+*
4
+* 功 能: N/A
5
+* 类 名: AutoCallOut
6
+*
7
+* Ver    变更日期             负责人  变更内容
8
+* ───────────────────────────────────
9
+* V0.01  2021/11/16 15:58:24   N/A    初版
10
+*
11
+* Copyright (c) 2012 Maticsoft Corporation. All rights reserved.
12
+*┌──────────────────────────────────┐
13
+*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │
14
+*│ 版权所有:动软卓越(北京)科技有限公司              │
15
+*└──────────────────────────────────┘
16
+*/
17
+using System;
18
+namespace CallCenterApi.Model
19
+{
20
+	/// <summary>
21
+	/// AutoCallOut:实体类(属性说明自动提取数据库字段的描述信息)
22
+	/// </summary>
23
+	[Serializable]
24
+	public partial class AutoCallOut
25
+	{
26
+		public AutoCallOut()
27
+		{}
28
+		#region Model
29
+		private int _id;
30
+		private string _usercode;
31
+		private string _tel;
32
+		private DateTime? _createtime;
33
+		private int? _isphoned=0;
34
+		private string _identification;
35
+		private string _callid;
36
+		/// <summary>
37
+		/// 
38
+		/// </summary>
39
+		public int ID
40
+		{
41
+			set{ _id=value;}
42
+			get{return _id;}
43
+		}
44
+		/// <summary>
45
+		/// 
46
+		/// </summary>
47
+		public string usercode
48
+		{
49
+			set{ _usercode=value;}
50
+			get{return _usercode;}
51
+		}
52
+		/// <summary>
53
+		/// 
54
+		/// </summary>
55
+		public string tel
56
+		{
57
+			set{ _tel=value;}
58
+			get{return _tel;}
59
+		}
60
+		/// <summary>
61
+		/// 
62
+		/// </summary>
63
+		public DateTime? createtime
64
+		{
65
+			set{ _createtime=value;}
66
+			get{return _createtime;}
67
+		}
68
+		/// <summary>
69
+		/// 
70
+		/// </summary>
71
+		public int? isphoned
72
+		{
73
+			set{ _isphoned=value;}
74
+			get{return _isphoned;}
75
+		}
76
+		/// <summary>
77
+		/// 
78
+		/// </summary>
79
+		public string identification
80
+		{
81
+			set{ _identification=value;}
82
+			get{return _identification;}
83
+		}
84
+		/// <summary>
85
+		/// 
86
+		/// </summary>
87
+		public string callid
88
+		{
89
+			set{ _callid=value;}
90
+			get{return _callid;}
91
+		}
92
+		#endregion Model
93
+
94
+	}
95
+}
96
+

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

@@ -43,6 +43,7 @@
43 43
   <ItemGroup>
44 44
     <Compile Include="article.cs" />
45 45
     <Compile Include="article_category.cs" />
46
+    <Compile Include="AutoCallOut.cs" />
46 47
     <Compile Include="CallResult.cs" />
47 48
     <Compile Include="his\o_sf_bingrenqk.cs" />
48 49
     <Compile Include="his\o_sf_shoushuxx.cs" />