|
|
@@ -154,7 +154,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
154
|
154
|
Model.T_Sys_UserAccount ua = userBLL.GetModel(userId);
|
|
155
|
155
|
Model.T_Sys_RoleInfo ro = rolebll.GetModel(ua.F_RoleId);
|
|
156
|
156
|
int DTJ = 0, DFP = 0, DCL = 0, CLZ = 0, YWJ = 0, THDTJ = 0, THDFP = 0, YJGD = 0, EJGD = 0, SJGD = 0, CJSL=0,ZX=0;
|
|
157
|
|
- string where = $" and (F_Type=" + 2 + "or (F_Duplicate in(2,0)and F_Type=3))";
|
|
|
157
|
+ string where = $" and (F_Type=" + 2 + "or (F_Duplicate!=1 and F_Duplicate!=4 and F_Type=3) or F_Type>4 )";
|
|
158
|
158
|
if (ro.F_RoleCode == "DS")//电商角色
|
|
159
|
159
|
{
|
|
160
|
160
|
where += "and F_Content like '%电商%'";
|
|
|
@@ -168,33 +168,29 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
168
|
168
|
|
|
169
|
169
|
sql += $" F_IsDelete=0";
|
|
170
|
170
|
sql += "AND F_Duplicate !=5"+ where;
|
|
171
|
|
- if (ro.F_RoleCode == "XTGLY" || ro.F_RoleCode == "JCRY")
|
|
172
|
|
- {
|
|
173
|
|
- sql += "AND F_State in(0)";
|
|
174
|
|
- }
|
|
175
|
|
- else if ( ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX" || ro.F_RoleCode == "ZR" || ro.F_RoleCode == "CLZY")
|
|
|
171
|
+ if (ro.F_RoleCode == "XTGLY" || ro.F_RoleCode == "JCRY"|| ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX" || ro.F_RoleCode == "ZR" || ro.F_RoleCode == "CLZY")
|
|
176
|
172
|
{
|
|
177
|
|
- sql += "AND F_State in(0)";
|
|
|
173
|
+ sql += "AND F_State =0";
|
|
178
|
174
|
}
|
|
179
|
175
|
else
|
|
180
|
176
|
{
|
|
181
|
177
|
DTJ = 0;
|
|
182
|
178
|
break;
|
|
183
|
179
|
}
|
|
184
|
|
- DTJ = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待提交
|
|
|
180
|
+ DTJ = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待提交
|
|
185
|
181
|
break;
|
|
186
|
182
|
case 1://待分派
|
|
187
|
183
|
sql = "";
|
|
188
|
184
|
sql += $" F_IsDelete=0";
|
|
189
|
185
|
sql += "AND F_Duplicate !=5"+ where;
|
|
190
|
|
- sql += "AND F_State in (1)";
|
|
|
186
|
+ sql += "AND F_State =1";
|
|
191
|
187
|
sql += RetuSql(ro, 0, ua);
|
|
192
|
188
|
if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "QTJS" || ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBTZX" || ro.F_RoleCode == "ZG")
|
|
193
|
189
|
{
|
|
194
|
190
|
DFP = 0;
|
|
195
|
191
|
break;
|
|
196
|
192
|
}
|
|
197
|
|
- DFP = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待分派
|
|
|
193
|
+ DFP = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待分派
|
|
198
|
194
|
break;
|
|
199
|
195
|
case 2://待处理
|
|
200
|
196
|
sql = "";
|
|
|
@@ -211,7 +207,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
211
|
207
|
DCL = 0;
|
|
212
|
208
|
break;
|
|
213
|
209
|
}
|
|
214
|
|
- DCL = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
|
|
|
210
|
+ DCL = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待处理
|
|
215
|
211
|
break;
|
|
216
|
212
|
case 3://处理中
|
|
217
|
213
|
sql = "";
|
|
|
@@ -228,7 +224,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
228
|
224
|
CLZ = 0;
|
|
229
|
225
|
break;
|
|
230
|
226
|
}
|
|
231
|
|
- CLZ = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
|
|
|
227
|
+ CLZ = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待处理
|
|
232
|
228
|
break;
|
|
233
|
229
|
case 4://退回待分派
|
|
234
|
230
|
sql = "";
|
|
|
@@ -241,7 +237,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
241
|
237
|
THDFP = 0;
|
|
242
|
238
|
break;
|
|
243
|
239
|
}
|
|
244
|
|
- THDFP = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
|
|
|
240
|
+ THDFP = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待处理
|
|
245
|
241
|
break;
|
|
246
|
242
|
case 5://退回待提交
|
|
247
|
243
|
sql = "";
|
|
|
@@ -254,7 +250,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
254
|
250
|
THDTJ = 0;
|
|
255
|
251
|
break;
|
|
256
|
252
|
}
|
|
257
|
|
- THDTJ = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
|
|
|
253
|
+ THDTJ = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待处理
|
|
258
|
254
|
break;
|
|
259
|
255
|
case 6://已完结
|
|
260
|
256
|
sql = "";
|
|
|
@@ -274,7 +270,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
274
|
270
|
YWJ = 0;
|
|
275
|
271
|
break;
|
|
276
|
272
|
}
|
|
277
|
|
- YWJ = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
|
|
|
273
|
+ YWJ = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待处理
|
|
278
|
274
|
break;
|
|
279
|
275
|
case 7://
|
|
280
|
276
|
sql = "";
|
|
|
@@ -290,7 +286,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
290
|
286
|
sql += "AND F_Notifications='" + ua.F_UserCode + "'";
|
|
291
|
287
|
if (ro.F_RoleCode == "QTJS")
|
|
292
|
288
|
sql += "AND F_CreateUser=" + ua.F_UserCode;
|
|
293
|
|
- YJGD = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
|
|
|
289
|
+ YJGD = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待处理
|
|
294
|
290
|
break;
|
|
295
|
291
|
case 8://
|
|
296
|
292
|
sql = "";
|
|
|
@@ -305,7 +301,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
305
|
301
|
sql += "AND F_Notifications='" + ua.F_UserCode + "'";
|
|
306
|
302
|
if (ro.F_RoleCode == "QTJS")
|
|
307
|
303
|
sql += "AND F_CreateUser=" + ua.F_UserCode;
|
|
308
|
|
- EJGD = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
|
|
|
304
|
+ EJGD = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待处理
|
|
309
|
305
|
break;
|
|
310
|
306
|
case 9://
|
|
311
|
307
|
sql = "";
|
|
|
@@ -319,7 +315,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
319
|
315
|
sql += "AND F_Notifications='" + ua.F_UserCode + "'";
|
|
320
|
316
|
if (ro.F_RoleCode == "QTJS")
|
|
321
|
317
|
sql += "AND F_CreateUser=" + ua.F_UserCode;
|
|
322
|
|
- SJGD = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
|
|
|
318
|
+ SJGD = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待处理
|
|
323
|
319
|
break;
|
|
324
|
320
|
case 10://
|
|
325
|
321
|
sql = "";
|
|
|
@@ -344,13 +340,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
344
|
340
|
CJSL = 0;
|
|
345
|
341
|
break;
|
|
346
|
342
|
}
|
|
347
|
|
- CJSL = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//
|
|
|
343
|
+ CJSL = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//
|
|
348
|
344
|
break;
|
|
349
|
345
|
case 11://咨询
|
|
350
|
346
|
sql = "";
|
|
351
|
347
|
sql += $" F_IsDelete=0";
|
|
352
|
348
|
sql += "AND F_Duplicate !=5" ;
|
|
353
|
|
- sql += " and (F_Type=" + 1 + "or ( F_Duplicate in(1)and F_Type!=2 ))";
|
|
|
349
|
+ sql += " and (F_Type=" + 1 + "or ( F_Duplicate in(1)and F_Type!=2 and F_Type<5))";
|
|
354
|
350
|
sql += RetuSql(ro, 0, ua);
|
|
355
|
351
|
if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "ZG")
|
|
356
|
352
|
sql += "AND F_Notifications='" + ua.F_UserCode + "'";
|
|
|
@@ -359,7 +355,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
359
|
355
|
ZX = 0;
|
|
360
|
356
|
break;
|
|
361
|
357
|
}
|
|
362
|
|
- ZX = new BLL.T_Bus_WorkOrder().GetModelList(sql).Count;//待处理
|
|
|
358
|
+ ZX = int.Parse(DbHelperSQL.GetSingle($"select COUNT(1) from T_Bus_WorkOrder where {sql} ").ToString());//待处理
|
|
363
|
359
|
break;
|
|
364
|
360
|
|
|
365
|
361
|
}
|
|
|
@@ -429,7 +425,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
429
|
425
|
{
|
|
430
|
426
|
if (state != 11)
|
|
431
|
427
|
{
|
|
432
|
|
- sql += $" and (F_Type=" + 2 + "or (F_Duplicate in(2,0)and F_Type=3))";
|
|
|
428
|
+ sql += $" and (F_Type=" + 2 + "or (F_Duplicate!=1 and F_Duplicate!=4 and F_Typ=3 ) or F_Type>4)";
|
|
433
|
429
|
}
|
|
434
|
430
|
}
|
|
435
|
431
|
|
|
|
@@ -646,7 +642,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
646
|
642
|
return Error("无操作权限");
|
|
647
|
643
|
break;
|
|
648
|
644
|
case 11:
|
|
649
|
|
- sql += $" and (F_Type=" + 1 + "or ( F_Duplicate in(1)and F_Type!=2 ))";
|
|
|
645
|
+ sql += $" and (F_Type=" + 1 + "or ( F_Duplicate in(1)and F_Type!=2 ) and F_Type<5)";
|
|
650
|
646
|
sql += RetuSql(ro, see, ua);
|
|
651
|
647
|
if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "ZG")
|
|
652
|
648
|
sql += "AND F_DealUser=" + ua.F_UserCode;
|
|
|
@@ -843,7 +839,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
843
|
839
|
string[] ccc = {
|
|
844
|
840
|
"工单编号","大区","办事处","投诉时间","序号","姓名","地址","联系电话","产品代码",
|
|
845
|
841
|
"产品名称","规格","生产日期","产品编码","生产厂家","问题代码","质量问题","通知人"
|
|
846
|
|
- ,"接听人" ,"落实情况","处理进度","工单类别","分派时间","接单时间","处理时间","备注"
|
|
|
842
|
+ ,"接听人" ,"落实情况","处理进度","工单类别","产品类型","分派时间","接单时间","处理时间","备注"
|
|
847
|
843
|
};
|
|
848
|
844
|
return ccc;
|
|
849
|
845
|
}
|