|
|
@@ -39,9 +39,9 @@ namespace CallCenterApi.DAL
|
|
39
|
39
|
{
|
|
40
|
40
|
StringBuilder strSql = new StringBuilder();
|
|
41
|
41
|
strSql.Append("insert into T_CTI_Task(");
|
|
42
|
|
- strSql.Append("TaskName,TrunkGroupID,CallerNum,CallType,ExInfo,MaxTrunkCount,IntensityCoefficient,ItemTableName,State,AddTime,y_PSort,y_TkModelId,y_SXH,y_FPCount,y_YJCount,y_HCCount,y_HSCount,y_HTCount,y_HMCount,y_OkCount,y_RFCount,y_ConsCount,y_InvlCount,y_NoAnswerCount,y_ShutDownCount,TaskType,Pre,Concurrency,ConcurrencyType,PlanStartDate,PlanEndDate,StartTime1,EndTime1,StartTime2,EndTime2,AgentGroupId,DeptId)");
|
|
|
42
|
+ strSql.Append("TaskName,TrunkGroupID,CallerNum,CallType,ExInfo,MaxTrunkCount,IntensityCoefficient,ItemTableName,State,AddTime,y_PSort,y_TkModelId,y_SXH,y_FPCount,y_YJCount,y_HCCount,y_HSCount,y_HTCount,y_HMCount,y_OkCount,y_RFCount,y_ConsCount,y_InvlCount,y_NoAnswerCount,y_ShutDownCount,TaskType,Pre,Concurrency,ConcurrencyType,PlanStartDate,PlanEndDate,StartTime1,EndTime1,StartTime2,EndTime2,AgentGroupId,DeptId,AddAgentId)");
|
|
43
|
43
|
strSql.Append(" values (");
|
|
44
|
|
- strSql.Append("@TaskName,@TrunkGroupID,@CallerNum,@CallType,@ExInfo,@MaxTrunkCount,@IntensityCoefficient,@ItemTableName,@State,@AddTime,@y_PSort,@y_TkModelId,@y_SXH,@y_FPCount,@y_YJCount,@y_HCCount,@y_HSCount,@y_HTCount,@y_HMCount,@y_OkCount,@y_RFCount,@y_ConsCount,@y_InvlCount,@y_NoAnswerCount,@y_ShutDownCount,@TaskType,@Pre,@Concurrency,@ConcurrencyType,@PlanStartDate,@PlanEndDate,@StartTime1,@EndTime1,@StartTime2,@EndTime2,@AgentGroupId,@DeptId)");
|
|
|
44
|
+ strSql.Append("@TaskName,@TrunkGroupID,@CallerNum,@CallType,@ExInfo,@MaxTrunkCount,@IntensityCoefficient,@ItemTableName,@State,@AddTime,@y_PSort,@y_TkModelId,@y_SXH,@y_FPCount,@y_YJCount,@y_HCCount,@y_HSCount,@y_HTCount,@y_HMCount,@y_OkCount,@y_RFCount,@y_ConsCount,@y_InvlCount,@y_NoAnswerCount,@y_ShutDownCount,@TaskType,@Pre,@Concurrency,@ConcurrencyType,@PlanStartDate,@PlanEndDate,@StartTime1,@EndTime1,@StartTime2,@EndTime2,@AgentGroupId,@DeptId,@AddAgentId)");
|
|
45
|
45
|
strSql.Append(";select @@IDENTITY");
|
|
46
|
46
|
SqlParameter[] parameters = {
|
|
47
|
47
|
new SqlParameter("@TaskName", SqlDbType.VarChar,200),
|
|
|
@@ -80,6 +80,7 @@ namespace CallCenterApi.DAL
|
|
80
|
80
|
new SqlParameter("@StartTime2", SqlDbType.DateTime),
|
|
81
|
81
|
new SqlParameter("@EndTime2", SqlDbType.DateTime),
|
|
82
|
82
|
new SqlParameter("@AgentGroupId", SqlDbType.Int),
|
|
|
83
|
+ new SqlParameter("@AddAgentId", SqlDbType.Int),
|
|
83
|
84
|
new SqlParameter("@DeptId", SqlDbType.Int)
|
|
84
|
85
|
|
|
85
|
86
|
};
|
|
|
@@ -119,7 +120,8 @@ namespace CallCenterApi.DAL
|
|
119
|
120
|
parameters[33].Value = model.StartTime2;
|
|
120
|
121
|
parameters[34].Value = model.EndTime2;
|
|
121
|
122
|
parameters[35].Value = model.AgentGroupId;
|
|
122
|
|
- parameters[36].Value = model.DeptId;
|
|
|
123
|
+ parameters[36].Value = model.AddAgentId;
|
|
|
124
|
+ parameters[37].Value = model.DeptId;
|
|
123
|
125
|
object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
|
|
124
|
126
|
if (obj == null)
|
|
125
|
127
|
{
|
|
|
@@ -173,7 +175,8 @@ namespace CallCenterApi.DAL
|
|
173
|
175
|
strSql.Append("StartTime2=@StartTime2, ");
|
|
174
|
176
|
strSql.Append("EndTime2=@EndTime2, ");
|
|
175
|
177
|
strSql.Append("AgentGroupId=@AgentGroupId,");
|
|
176
|
|
- strSql.Append("DeptId=@DeptId ");
|
|
|
178
|
+ strSql.Append("DeptId=@DeptId,");
|
|
|
179
|
+ strSql.Append("AddAgentId=@AddAgentId ");
|
|
177
|
180
|
strSql.Append(" where TaskID=@TaskID");
|
|
178
|
181
|
SqlParameter[] parameters = {
|
|
179
|
182
|
new SqlParameter("@TaskName", SqlDbType.VarChar,200),
|
|
|
@@ -213,7 +216,8 @@ namespace CallCenterApi.DAL
|
|
213
|
216
|
new SqlParameter("@StartTime2", SqlDbType.DateTime),
|
|
214
|
217
|
new SqlParameter("@EndTime2", SqlDbType.DateTime),
|
|
215
|
218
|
new SqlParameter("@AgentGroupId", SqlDbType.Int),
|
|
216
|
|
- new SqlParameter("@DeptId", SqlDbType.Int)
|
|
|
219
|
+ new SqlParameter("@DeptId", SqlDbType.Int),
|
|
|
220
|
+ new SqlParameter("@AddAgentId", SqlDbType.Int),
|
|
217
|
221
|
};
|
|
218
|
222
|
parameters[0].Value = model.TaskName;
|
|
219
|
223
|
parameters[1].Value = model.TrunkGroupID;
|
|
|
@@ -253,6 +257,7 @@ namespace CallCenterApi.DAL
|
|
253
|
257
|
parameters[35].Value = model.EndTime2;
|
|
254
|
258
|
parameters[36].Value = model.AgentGroupId;
|
|
255
|
259
|
parameters[37].Value = model.DeptId;
|
|
|
260
|
+ parameters[38].Value = model.AddAgentId;
|
|
256
|
261
|
int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
|
|
257
|
262
|
if (rows > 0)
|
|
258
|
263
|
{
|
|
|
@@ -370,7 +375,7 @@ namespace CallCenterApi.DAL
|
|
370
|
375
|
{
|
|
371
|
376
|
|
|
372
|
377
|
StringBuilder strSql = new StringBuilder();
|
|
373
|
|
- strSql.Append("select top 1 TaskID,TaskName,TrunkGroupID,CallerNum,CallType,ExInfo,MaxTrunkCount,IntensityCoefficient,ItemTableName,State,AddTime,y_PSort,y_TkModelId,y_SXH,y_FPCount,y_YJCount,y_HCCount,y_HSCount,y_HTCount,y_HMCount,y_OkCount,y_RFCount,y_ConsCount,y_InvlCount,y_NoAnswerCount,y_ShutDownCount,TaskType,Pre,Concurrency,ConcurrencyType,PlanStartDate,PlanEndDate,StartTime1,EndTime1,StartTime2,EndTime2,AgentGroupId,DeptId from T_CTI_Task ");
|
|
|
378
|
+ strSql.Append("select top 1 TaskID,TaskName,TrunkGroupID,CallerNum,CallType,ExInfo,MaxTrunkCount,IntensityCoefficient,ItemTableName,State,AddTime,y_PSort,y_TkModelId,y_SXH,y_FPCount,y_YJCount,y_HCCount,y_HSCount,y_HTCount,y_HMCount,y_OkCount,y_RFCount,y_ConsCount,y_InvlCount,y_NoAnswerCount,y_ShutDownCount,TaskType,Pre,Concurrency,ConcurrencyType,PlanStartDate,PlanEndDate,StartTime1,EndTime1,StartTime2,EndTime2,AgentGroupId,DeptId,AddAgentId from T_CTI_Task ");
|
|
374
|
379
|
strSql.Append(" where State>=0 and TaskID=@TaskID ");
|
|
375
|
380
|
SqlParameter[] parameters = {
|
|
376
|
381
|
new SqlParameter("@TaskID", SqlDbType.BigInt)
|
|
|
@@ -534,6 +539,10 @@ namespace CallCenterApi.DAL
|
|
534
|
539
|
{
|
|
535
|
540
|
model.DeptId = Convert.ToInt32(ds.Tables[0].Rows[0]["DeptId"].ToString());
|
|
536
|
541
|
}
|
|
|
542
|
+ if (ds.Tables[0].Rows[0]["AddAgentId"] != null && ds.Tables[0].Rows[0]["AddAgentId"].ToString() != "")
|
|
|
543
|
+ {
|
|
|
544
|
+ model.AddAgentId = Convert.ToInt32(ds.Tables[0].Rows[0]["AddAgentId"].ToString());
|
|
|
545
|
+ }
|
|
537
|
546
|
return model;
|
|
538
|
547
|
}
|
|
539
|
548
|
else
|