|
|
@@ -50,9 +50,9 @@ namespace CallCenterApi.DAL
|
|
50
|
50
|
{
|
|
51
|
51
|
StringBuilder strSql = new StringBuilder();
|
|
52
|
52
|
strSql.Append("insert into T_Call_LeaveRecord(");
|
|
53
|
|
- strSql.Append("F_CallId,F_Phone,F_LeaveTime,F_Status,F_UserId,F_UserCode,F_UserName,F_DealTime,F_DealContent,F_Remark,F_CallAppId,F_RecFileUrl)");
|
|
|
53
|
+ strSql.Append("F_CallId,F_Phone,F_LeaveTime,F_Status,F_UserId,F_UserCode,F_UserName,F_DealTime,F_DealContent,F_Remark,F_CallAppId,F_RecFileUrl,F_LeaveType)");
|
|
54
|
54
|
strSql.Append(" values (");
|
|
55
|
|
- strSql.Append("@F_CallId,@F_Phone,@F_LeaveTime,@F_Status,@F_UserId,@F_UserCode,@F_UserName,@F_DealTime,@F_DealContent,@F_Remark,@F_CallAppId,@F_RecFileUrl)");
|
|
|
55
|
+ strSql.Append("@F_CallId,@F_Phone,@F_LeaveTime,@F_Status,@F_UserId,@F_UserCode,@F_UserName,@F_DealTime,@F_DealContent,@F_Remark,@F_CallAppId,@F_RecFileUrl,@F_LeaveType)");
|
|
56
|
56
|
strSql.Append(";select @@IDENTITY");
|
|
57
|
57
|
SqlParameter[] parameters = {
|
|
58
|
58
|
new SqlParameter("@F_CallId", SqlDbType.VarChar,50),
|
|
|
@@ -66,7 +66,8 @@ namespace CallCenterApi.DAL
|
|
66
|
66
|
new SqlParameter("@F_DealContent", SqlDbType.NText),
|
|
67
|
67
|
new SqlParameter("@F_Remark", SqlDbType.NText),
|
|
68
|
68
|
new SqlParameter("@F_CallAppId", SqlDbType.NVarChar,50),
|
|
69
|
|
- new SqlParameter("@F_RecFileUrl", SqlDbType.NVarChar,50)};
|
|
|
69
|
+ new SqlParameter("@F_RecFileUrl", SqlDbType.NVarChar,50),
|
|
|
70
|
+ new SqlParameter("@F_LeaveType", SqlDbType.NVarChar,50)};
|
|
70
|
71
|
parameters[0].Value = model.F_CallId;
|
|
71
|
72
|
parameters[1].Value = model.F_Phone;
|
|
72
|
73
|
parameters[2].Value = model.F_LeaveTime;
|
|
|
@@ -79,6 +80,7 @@ namespace CallCenterApi.DAL
|
|
79
|
80
|
parameters[9].Value = model.F_Remark;
|
|
80
|
81
|
parameters[10].Value = model.F_CallAppId;
|
|
81
|
82
|
parameters[11].Value = model.F_RecFileUrl;
|
|
|
83
|
+ parameters[12].Value = model.F_LeaveType;
|
|
82
|
84
|
|
|
83
|
85
|
object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
|
|
84
|
86
|
if (obj == null)
|
|
|
@@ -108,7 +110,8 @@ namespace CallCenterApi.DAL
|
|
108
|
110
|
strSql.Append("F_DealContent=@F_DealContent,");
|
|
109
|
111
|
strSql.Append("F_Remark=@F_Remark,");
|
|
110
|
112
|
strSql.Append("F_CallAppId=@F_CallAppId,");
|
|
111
|
|
- strSql.Append("F_RecFileUrl=@F_RecFileUrl");
|
|
|
113
|
+ strSql.Append("F_RecFileUrl=@F_RecFileUrl,");
|
|
|
114
|
+ strSql.Append("F_LeaveType=@F_LeaveType");
|
|
112
|
115
|
strSql.Append(" where F_Id=@F_Id");
|
|
113
|
116
|
SqlParameter[] parameters = {
|
|
114
|
117
|
new SqlParameter("@F_CallId", SqlDbType.VarChar,50),
|
|
|
@@ -123,6 +126,7 @@ namespace CallCenterApi.DAL
|
|
123
|
126
|
new SqlParameter("@F_Remark", SqlDbType.NText),
|
|
124
|
127
|
new SqlParameter("@F_CallAppId", SqlDbType.NVarChar,50),
|
|
125
|
128
|
new SqlParameter("@F_RecFileUrl", SqlDbType.NVarChar,50),
|
|
|
129
|
+ new SqlParameter("@F_LeaveType", SqlDbType.NVarChar,50),
|
|
126
|
130
|
new SqlParameter("@F_Id", SqlDbType.Int,4)};
|
|
127
|
131
|
parameters[0].Value = model.F_CallId;
|
|
128
|
132
|
parameters[1].Value = model.F_Phone;
|
|
|
@@ -136,7 +140,8 @@ namespace CallCenterApi.DAL
|
|
136
|
140
|
parameters[9].Value = model.F_Remark;
|
|
137
|
141
|
parameters[10].Value = model.F_CallAppId;
|
|
138
|
142
|
parameters[11].Value = model.F_RecFileUrl;
|
|
139
|
|
- parameters[12].Value = model.F_Id;
|
|
|
143
|
+ parameters[12].Value = model.F_LeaveType;
|
|
|
144
|
+ parameters[13].Value = model.F_Id;
|
|
140
|
145
|
|
|
141
|
146
|
int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
|
|
142
|
147
|
if (rows > 0)
|
|
|
@@ -200,7 +205,7 @@ namespace CallCenterApi.DAL
|
|
200
|
205
|
{
|
|
201
|
206
|
|
|
202
|
207
|
StringBuilder strSql = new StringBuilder();
|
|
203
|
|
- strSql.Append("select top 1 F_Id,F_CallId,F_Phone,F_LeaveTime,F_Status,F_UserId,F_UserCode,F_UserName,F_DealTime,F_DealContent,F_Remark,F_CallAppId,F_RecFileUrl from T_Call_LeaveRecord ");
|
|
|
208
|
+ strSql.Append("select top 1 F_Id,F_CallId,F_Phone,F_LeaveTime,F_Status,F_UserId,F_UserCode,F_UserName,F_DealTime,F_DealContent,F_Remark,F_CallAppId,F_RecFileUrl,F_LeaveType from T_Call_LeaveRecord ");
|
|
204
|
209
|
strSql.Append(" where F_Id=@F_Id");
|
|
205
|
210
|
SqlParameter[] parameters = {
|
|
206
|
211
|
new SqlParameter("@F_Id", SqlDbType.Int,4)
|
|
|
@@ -280,6 +285,10 @@ namespace CallCenterApi.DAL
|
|
280
|
285
|
{
|
|
281
|
286
|
model.F_RecFileUrl = row["F_RecFileUrl"].ToString();
|
|
282
|
287
|
}
|
|
|
288
|
+ if (row["F_LeaveType"] != null)
|
|
|
289
|
+ {
|
|
|
290
|
+ model.F_LeaveType = row["F_LeaveType"].ToString();
|
|
|
291
|
+ }
|
|
283
|
292
|
}
|
|
284
|
293
|
return model;
|
|
285
|
294
|
}
|
|
|
@@ -290,7 +299,7 @@ namespace CallCenterApi.DAL
|
|
290
|
299
|
public DataSet GetList(string strWhere)
|
|
291
|
300
|
{
|
|
292
|
301
|
StringBuilder strSql = new StringBuilder();
|
|
293
|
|
- strSql.Append("select F_Id,F_CallId,F_Phone,F_LeaveTime,F_Status,F_UserId,F_UserCode,F_UserName,F_DealTime,F_DealContent,F_Remark,F_CallAppId,F_RecFileUrl ");
|
|
|
302
|
+ strSql.Append("select F_Id,F_CallId,F_Phone,F_LeaveTime,F_Status,F_UserId,F_UserCode,F_UserName,F_DealTime,F_DealContent,F_Remark,F_CallAppId,F_RecFileUrl,F_LeaveType ");
|
|
294
|
303
|
strSql.Append(" FROM T_Call_LeaveRecord ");
|
|
295
|
304
|
if (strWhere.Trim() != "")
|
|
296
|
305
|
{
|
|
|
@@ -310,7 +319,7 @@ namespace CallCenterApi.DAL
|
|
310
|
319
|
{
|
|
311
|
320
|
strSql.Append(" top " + Top.ToString());
|
|
312
|
321
|
}
|
|
313
|
|
- strSql.Append(" F_Id,F_CallId,F_Phone,F_LeaveTime,F_Status,F_UserId,F_UserCode,F_UserName,F_DealTime,F_DealContent,F_Remark,F_CallAppId,F_RecFileUrl ");
|
|
|
322
|
+ strSql.Append(" F_Id,F_CallId,F_Phone,F_LeaveTime,F_Status,F_UserId,F_UserCode,F_UserName,F_DealTime,F_DealContent,F_Remark,F_CallAppId,F_RecFileUrl,F_LeaveType ");
|
|
314
|
323
|
strSql.Append(" FROM T_Call_LeaveRecord ");
|
|
315
|
324
|
if (strWhere.Trim() != "")
|
|
316
|
325
|
{
|
|
|
@@ -367,6 +376,34 @@ namespace CallCenterApi.DAL
|
|
367
|
376
|
return DbHelperSQL.Query(strSql.ToString());
|
|
368
|
377
|
}
|
|
369
|
378
|
|
|
|
379
|
+
|
|
|
380
|
+ /// <summary>
|
|
|
381
|
+ /// 更新办理标志
|
|
|
382
|
+ /// </summary>
|
|
|
383
|
+ public bool UpdateFlag(int F_ID,string F_CallAppId)
|
|
|
384
|
+ {
|
|
|
385
|
+
|
|
|
386
|
+ StringBuilder strSql = new StringBuilder();
|
|
|
387
|
+ //strSql.Append("delete from T_Call_OutTask ");
|
|
|
388
|
+ strSql.Append("update T_Call_LeaveRecord set F_Status=1,F_CallAppId=@F_CallAppId ");
|
|
|
389
|
+ strSql.Append(" where F_Id=@F_Id");
|
|
|
390
|
+ SqlParameter[] parameters = {
|
|
|
391
|
+ new SqlParameter("@F_Id", SqlDbType.Int,4),
|
|
|
392
|
+ new SqlParameter("@F_CallAppId", SqlDbType.NVarChar ,50)
|
|
|
393
|
+ };
|
|
|
394
|
+ parameters[0].Value = F_ID;
|
|
|
395
|
+ parameters[1].Value = F_CallAppId;
|
|
|
396
|
+
|
|
|
397
|
+ int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
|
|
|
398
|
+ if (rows > 0)
|
|
|
399
|
+ {
|
|
|
400
|
+ return true;
|
|
|
401
|
+ }
|
|
|
402
|
+ else
|
|
|
403
|
+ {
|
|
|
404
|
+ return false;
|
|
|
405
|
+ }
|
|
|
406
|
+ }
|
|
370
|
407
|
#endregion BasicMethod
|
|
371
|
408
|
#region ExtensionMethod
|
|
372
|
409
|
|