|
|
@@ -85,32 +85,24 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
85
|
85
|
string strname = RequestString.GetQueryString("name");
|
|
86
|
86
|
//电话
|
|
87
|
87
|
string strtel = RequestString.GetQueryString("tel");
|
|
88
|
|
- //大区
|
|
89
|
|
- string strarea = RequestString.GetQueryString("area");
|
|
90
|
|
- //省份
|
|
91
|
|
- string strprov = RequestString.GetQueryString("province");
|
|
92
|
|
- //城市
|
|
93
|
|
- string strcity = RequestString.GetQueryString("city");
|
|
|
88
|
+ //营业厅
|
|
|
89
|
+ string definition = RequestString.GetQueryString("definition");
|
|
94
|
90
|
//关键词
|
|
95
|
91
|
string strkey = RequestString.GetQueryString("key");
|
|
96
|
92
|
//坐席工号
|
|
97
|
|
- string strusercode = RequestString.GetQueryString("usercode");
|
|
98
|
|
-
|
|
99
|
|
-
|
|
|
93
|
+ string strusercode = RequestString.GetQueryString("strusercode");
|
|
|
94
|
+ string F_Typeof = RequestString.GetQueryString("Typeof");
|
|
|
95
|
+
|
|
100
|
96
|
//类型
|
|
101
|
|
- int type = RequestString.GetInt("type", 0);
|
|
|
97
|
+ // int type = RequestString.GetInt("type", 0);
|
|
102
|
98
|
//来源
|
|
103
|
99
|
int source = RequestString.GetInt("source", 0);
|
|
104
|
100
|
//状态
|
|
105
|
101
|
int state = RequestString.GetInt("state", -1);
|
|
106
|
102
|
//处理状态
|
|
107
|
103
|
int dealstate = RequestString.GetInt("dealstate", -1);
|
|
108
|
|
- //产品类型
|
|
109
|
|
- int producttype = RequestString.GetInt("producttype", 0);
|
|
110
|
|
-
|
|
111
|
104
|
string strstarttime = HttpUtility.UrlDecode(RequestString.GetQueryString("starttime"));
|
|
112
|
105
|
string strendtime = HttpUtility.UrlDecode(RequestString.GetQueryString("endtime"));
|
|
113
|
|
-
|
|
114
|
106
|
string strpageindex = RequestString.GetQueryString("page");
|
|
115
|
107
|
int pageindex = 1;
|
|
116
|
108
|
string strpagesize = RequestString.GetQueryString("pagesize");
|
|
|
@@ -127,18 +119,11 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
127
|
119
|
sql += " and F_GroupCode = '" + userModel.groupcode + "' ";
|
|
128
|
120
|
}
|
|
129
|
121
|
}
|
|
130
|
|
- if (producttype != 0)
|
|
131
|
|
- {
|
|
132
|
|
- sql += " and F_ProductType = '" + producttype + "' ";
|
|
133
|
|
- }
|
|
134
|
|
- if (type != 0)
|
|
135
|
|
- {
|
|
136
|
|
- sql += " and F_Type = '" + type + "' ";
|
|
137
|
|
- }
|
|
138
|
122
|
if (source != 0)
|
|
139
|
123
|
{
|
|
140
|
124
|
sql += " and F_Source = '" + source + "' ";
|
|
141
|
125
|
}
|
|
|
126
|
+
|
|
142
|
127
|
if (state != -1)
|
|
143
|
128
|
{
|
|
144
|
129
|
sql += " and F_State = '" + state + "' ";
|
|
|
@@ -151,11 +136,17 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
151
|
136
|
{
|
|
152
|
137
|
sql += " and F_CreateUser = '" + strusercode + "' ";
|
|
153
|
138
|
}
|
|
|
139
|
+ else
|
|
|
140
|
+ {
|
|
|
141
|
+ sql += " and F_CreateUser = '" + userModel.F_UserCode + "' ";
|
|
|
142
|
+ }
|
|
154
|
143
|
if (strkey.Trim() != "" && strkey != "undefined")
|
|
155
|
144
|
{
|
|
156
|
|
- sql += " and (F_Content like '%" + strkey + "%' or F_CusName like '%" + strkey + "%' or F_Province like '%" + strkey + "%' or F_City like '%"
|
|
157
|
|
- + strkey + "%' or F_ProductName like '%" + strkey + "%' or F_CusPhone like '%" + strkey + "%' or F_BatchNumber like '%" + strkey
|
|
158
|
|
- + "%' or F_CreateUser like '%" + strkey + "%' or F_VIPName like '%" + strkey + "%') ";
|
|
|
145
|
+ sql += " and (F_Content like '%" + strkey + "%' or F_CusName like '%" + strkey + "%' or F_CusPhone like '%" + strkey + "%') ";
|
|
|
146
|
+ }
|
|
|
147
|
+ if (F_Typeof.Trim() != "" && F_Typeof != "undefined")
|
|
|
148
|
+ {
|
|
|
149
|
+ sql += " and F_Typeof like '%" + F_Typeof.Trim() + "%' ";
|
|
159
|
150
|
}
|
|
160
|
151
|
if (strworkid.Trim() != "" && strworkid != "undefined")
|
|
161
|
152
|
{
|
|
|
@@ -169,21 +160,11 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
169
|
160
|
{
|
|
170
|
161
|
sql += " and F_CusPhone like '%" + strtel + "%' ";
|
|
171
|
162
|
}
|
|
172
|
|
- if (strarea.Trim() != "" && strarea != "undefined")
|
|
173
|
|
- {
|
|
174
|
|
- sql += " and F_Area = '" + strarea.Trim() + "' ";
|
|
175
|
|
- }
|
|
176
|
|
- if (strprov.Trim() != "" && strprov.Trim() != "undefined")
|
|
|
163
|
+ if (definition.Trim() != "" && definition != "undefined")
|
|
177
|
164
|
{
|
|
178
|
|
- //sql += " and F_Province = '" + strprov.Trim() + "' ";
|
|
179
|
|
- sql += " and F_Province like '%" + strprov + "%' ";
|
|
|
165
|
+ sql += " and F_Definition like '%" + definition + "%' ";
|
|
180
|
166
|
}
|
|
181
|
|
- if (strcity.Trim() != "" && strcity.Trim() != "undefined")
|
|
182
|
|
- {
|
|
183
|
|
- //sql += " and F_City = '" + strcity.Trim() + "' ";
|
|
184
|
|
- sql += " and F_City like '%" + strcity + "%' ";
|
|
185
|
|
- }
|
|
186
|
|
-
|
|
|
167
|
+
|
|
187
|
168
|
if (strstarttime.Trim() != "" && strstarttime != "undefined")
|
|
188
|
169
|
{
|
|
189
|
170
|
sql += " and datediff(day,F_CreateTime,'" + strstarttime + "')<=0 ";
|
|
|
@@ -203,22 +184,19 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
203
|
184
|
pagesize = Convert.ToInt32(strpagesize);
|
|
204
|
185
|
}
|
|
205
|
186
|
|
|
206
|
|
- string cols = "*,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_Type) as TypeName,dbo.GetDictionaryName(F_SmallType) as SmallTypeName,"
|
|
207
|
|
- + "dbo.GetDictionaryName(F_ProductType) as ProductTypeName,dbo.GetDictionaryName(F_Source) as SourceName";
|
|
208
|
|
-
|
|
|
187
|
+ // string cols = "*,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_Type) as TypeName,dbo.GetDictionaryName(F_SmallType) as SmallTypeName,"
|
|
|
188
|
+ // + "dbo.GetDictionaryName(F_ProductType) as ProductTypeName,dbo.GetDictionaryName(F_Source) as SourceName";
|
|
|
189
|
+ string msg = "";
|
|
209
|
190
|
if (isdc > 0)
|
|
210
|
191
|
{
|
|
211
|
|
- string dccols = "F_WorkOrderId,case isnull(F_State,0) when 0 then '待处理' else '已处理' end,dbo.GetDictionaryName(F_Source) as SourceName,"
|
|
212
|
|
- + "dbo.GetDictionaryName(F_Type) as TypeName,dbo.GetDictionaryName(F_SmallType) as SmallTypeName,F_CusPhone,F_CusName,F_Content,F_ProductName,"
|
|
213
|
|
- + "F_ProductDate,F_BuyDate,F_BuyAddress,dbo.GetDictionaryName(F_ProductType) as ProductTypeName,F_BatchNumber,F_UserDate,"
|
|
214
|
|
- + "case isnull(F_IsBack,0) when 0 then '否' else '是' end,F_Area,F_Province,F_City,F_VIPName,F_VIPPhone,"
|
|
215
|
|
- + "dbo.GetDictionaryName(F_DealState) as DealStateName,F_DealCost,F_DealResult,F_DealDes,dbo.GetDictionaryName(F_DealTimely) as DealTimelyName,"
|
|
216
|
|
- + "dbo.GetUserName(F_CreateUser) as UserName,F_CreateTime,F_DealTime,F_DealSeconds";
|
|
217
|
|
- var dtdc = DbHelperSQL.Query(" select " + dccols + " from T_Bus_WorkOrder where 1=1 " + sql).Tables[0];
|
|
218
|
|
- string[] dccolnames = new string[] {"工单编号","工单状态", "工单来源", "工单类型", "投诉类型", "投诉号码", "客户姓名", "投诉事件描述", "产品名称",
|
|
219
|
|
- "生产日期", "购买日期", "购买地点", "产品类别", "生产批号", "食/饮用日期", "样品是否寄回", "大区", "省份", "城市" , "专员姓名" , "专员电话" ,
|
|
220
|
|
- "处理状态" , "处理费用" , "处理结果" , "处理进展详述" , "及时响应" , "受理人" , "受理时间","处理时间", "处理间隔(秒)" , };
|
|
221
|
|
- var msg = new NPOIHelper().ExportToExcel("工单列表", dtdc, dccolnames);
|
|
|
192
|
+ string dccols = "F_WorkOrderId,case isnull(F_State,0) when 0 then '待处理' else '已处理' end,"
|
|
|
193
|
+ + "F_Typeof,F_CusPhone,F_CusName,F_Content,F_Replycontent,"
|
|
|
194
|
+ + "dbo.GetDictionaryName(F_DealState) as DealStateName,F_DealResult,F_DealDes,"
|
|
|
195
|
+ + "dbo.GetUserName(F_CreateUser) as UserName,F_CreateTime,F_DealTime";
|
|
|
196
|
+ var dtdc = DbHelperSQL.Query(" select " + dccols + " from T_Bus_WorkOrder where 1=1 " + sql+ "ORDER BY F_Id desc").Tables[0];
|
|
|
197
|
+ string[] dccolnames = new string[] {"工单编号","工单状态", "工单类型", "客户电话", "客户姓名", "描述内容", "回复内容",
|
|
|
198
|
+ "处理状态" , "处理结果" , "处理进展详述" , "创建人" , "受理时间","处理时间" , };
|
|
|
199
|
+ msg = new NPOIHelper().ExportToExcel("工单列表", dtdc, dccolnames);
|
|
222
|
200
|
if (msg == "")
|
|
223
|
201
|
{
|
|
224
|
202
|
return Success("导出成功");
|
|
|
@@ -233,7 +211,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
233
|
211
|
dt = BLL.PagerBLL.GetListPager(
|
|
234
|
212
|
"T_Bus_WorkOrder",
|
|
235
|
213
|
"F_Id",
|
|
236
|
|
- cols,
|
|
|
214
|
+ "*",
|
|
237
|
215
|
sql,
|
|
238
|
216
|
"ORDER BY F_Id desc",
|
|
239
|
217
|
pagesize,
|
|
|
@@ -256,6 +234,12 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
256
|
234
|
{
|
|
257
|
235
|
dr["FilePath"] = GetCallPath(dr["F_CallRecordId"].ToString(), config.F_ParamValue);
|
|
258
|
236
|
}
|
|
|
237
|
+ if (dr["F_CreateUser"] != null && dr["F_CreateUser"].ToString() != "")
|
|
|
238
|
+ {
|
|
|
239
|
+ var user = new BLL.T_Sys_UserAccount().GetModel(dr["F_CreateUser"].ToString());
|
|
|
240
|
+ if (user != null)
|
|
|
241
|
+ dr["F_CreateUser"] = dr["F_CreateUser"].ToString() + "(" + user.F_UserName + ")";
|
|
|
242
|
+ }
|
|
259
|
243
|
}
|
|
260
|
244
|
|
|
261
|
245
|
var obj = new
|
|
|
@@ -286,10 +270,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
286
|
270
|
|
|
287
|
271
|
if (!string.IsNullOrEmpty(strworkorderid))
|
|
288
|
272
|
{
|
|
289
|
|
- string sql = "select *,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_Type) as TypeName,"
|
|
290
|
|
- + "dbo.GetDictionaryName(F_SmallType) as SmallTypeName,dbo.GetDictionaryName(F_DealState) as DealStateName,"
|
|
291
|
|
- + "dbo.GetDictionaryName(F_DealTimely) as DealTimelyName,dbo.GetDictionaryName(F_ProductType) as ProductTypeName,"
|
|
292
|
|
- + "dbo.GetDictionaryName(F_Source) as SourceName from T_Bus_WorkOrder where F_WorkOrderId ='" + strworkorderid + "'";
|
|
|
273
|
+ string sql = "select * from T_Bus_WorkOrder where F_WorkOrderId ='" + strworkorderid + "'";
|
|
293
|
274
|
var dt = DbHelperSQL.Query(sql).Tables[0];
|
|
294
|
275
|
if (dt.Rows.Count > 0)
|
|
295
|
276
|
{
|
|
|
@@ -308,6 +289,12 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
308
|
289
|
{
|
|
309
|
290
|
dt.Rows[0]["FilePath"] = GetCallPath(dt.Rows[0]["F_CallRecordId"].ToString(), config.F_ParamValue);
|
|
310
|
291
|
}
|
|
|
292
|
+ if (dt.Rows[0]["F_CreateUser"] != null && dt.Rows[0]["F_CreateUser"].ToString() != "")
|
|
|
293
|
+ {
|
|
|
294
|
+ var user = new BLL.T_Sys_UserAccount().GetModel(dt.Rows[0]["F_CreateUser"].ToString());
|
|
|
295
|
+ if (user != null)
|
|
|
296
|
+ dt.Rows[0]["F_CreateUser"] = dt.Rows[0]["F_CreateUser"].ToString() + "(" + user.F_UserName + ")";
|
|
|
297
|
+ }
|
|
311
|
298
|
#endregion
|
|
312
|
299
|
|
|
313
|
300
|
#region 附件
|
|
|
@@ -339,7 +326,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
339
|
326
|
}
|
|
340
|
327
|
#endregion
|
|
341
|
328
|
|
|
342
|
|
- #region 办理过程
|
|
|
329
|
+ #region 处理过程
|
|
343
|
330
|
string gcsql = "select *,dbo.GetUserName(F_CreateUser) as UserName "
|
|
344
|
331
|
+ "from T_Bus_Operation where F_IsDelete=0 and F_WorkOrderId ='" + strworkorderid + "'";
|
|
345
|
332
|
var gcdt = DbHelperSQL.Query(gcsql).Tables[0];
|
|
|
@@ -394,11 +381,11 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
394
|
381
|
{
|
|
395
|
382
|
int userId = CurrentUser.UserData.F_UserId;
|
|
396
|
383
|
Model.T_Sys_UserAccount userModel = userBLL.GetModel(userId);
|
|
397
|
|
- //投诉人
|
|
|
384
|
+ //客户姓名
|
|
398
|
385
|
string cusname = RequestString.GetFormString("cusname");
|
|
399
|
386
|
//投诉人性别
|
|
400
|
|
- string cussex = RequestString.GetFormString("cussex");
|
|
401
|
|
- //投诉电话
|
|
|
387
|
+ // string cussex = RequestString.GetFormString("cussex");
|
|
|
388
|
+ //客户电话
|
|
402
|
389
|
string cusphone = RequestString.GetFormString("cusphone");
|
|
403
|
390
|
//分组代码
|
|
404
|
391
|
string code = RequestString.GetFormString("code");
|
|
|
@@ -406,48 +393,66 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
406
|
393
|
{
|
|
407
|
394
|
code = userModel.groupcode;
|
|
408
|
395
|
}
|
|
409
|
|
- //事件描述
|
|
|
396
|
+ //客户类别
|
|
|
397
|
+ string customertype = RequestString.GetFormString("customertype");
|
|
|
398
|
+ //营业厅名称
|
|
|
399
|
+ string definition = RequestString.GetFormString("definition");
|
|
|
400
|
+ //工单类型
|
|
|
401
|
+ string Typeof = RequestString.GetFormString("Typeof");
|
|
|
402
|
+ //描述内容
|
|
410
|
403
|
string content = RequestString.GetFormString("content");
|
|
|
404
|
+ //回复内容
|
|
|
405
|
+ string replycontent = RequestString.GetFormString("replycontent");
|
|
|
406
|
+ //派单类型
|
|
|
407
|
+ string pietype = RequestString.GetFormString("pietype");
|
|
|
408
|
+ //定责
|
|
|
409
|
+ string fixduty = RequestString.GetFormString("fixduty");
|
|
|
410
|
+ //处理人
|
|
|
411
|
+ string dealing = RequestString.GetFormString("dealing");
|
|
|
412
|
+ //处理人电话
|
|
|
413
|
+ string dealingtel = RequestString.GetFormString("dealingtel");
|
|
|
414
|
+
|
|
411
|
415
|
//产品名称
|
|
412
|
|
- string productname = RequestString.GetFormString("productname");
|
|
|
416
|
+ // string productname = RequestString.GetFormString("productname");
|
|
413
|
417
|
//购买日期
|
|
414
|
|
- string buydate = RequestString.GetFormString("buydate");
|
|
|
418
|
+ // string buydate = RequestString.GetFormString("buydate");
|
|
415
|
419
|
//购买地点
|
|
416
|
|
- string buyaddress = RequestString.GetFormString("buyaddress");
|
|
|
420
|
+ // string buyaddress = RequestString.GetFormString("buyaddress");
|
|
417
|
421
|
////产品类别
|
|
418
|
422
|
//string producttype = RequestString.GetFormString("producttype");
|
|
419
|
423
|
//生产日期
|
|
420
|
|
- string productdate = RequestString.GetFormString("productdate");
|
|
|
424
|
+ // string productdate = RequestString.GetFormString("productdate");
|
|
421
|
425
|
//生产批号
|
|
422
|
|
- string batchnumber = RequestString.GetFormString("batchnumber");
|
|
|
426
|
+ // string batchnumber = RequestString.GetFormString("batchnumber");
|
|
423
|
427
|
//使用日期
|
|
424
|
|
- string userdate = RequestString.GetFormString("userdate");
|
|
|
428
|
+ // string userdate = RequestString.GetFormString("userdate");
|
|
425
|
429
|
//专员名称
|
|
426
|
|
- string vipname = RequestString.GetFormString("vipname");
|
|
|
430
|
+ // string vipname = RequestString.GetFormString("vipname");
|
|
427
|
431
|
//专员号码
|
|
428
|
|
- string vipphone = RequestString.GetFormString("vipphone");
|
|
|
432
|
+ // string vipphone = RequestString.GetFormString("vipphone");
|
|
429
|
433
|
//大区
|
|
430
|
|
- string area = RequestString.GetFormString("area");
|
|
|
434
|
+ // string area = RequestString.GetFormString("area");
|
|
431
|
435
|
//省份
|
|
432
|
|
- string province = RequestString.GetFormString("province");
|
|
|
436
|
+ // string province = RequestString.GetFormString("province");
|
|
433
|
437
|
//城市
|
|
434
|
|
- string city = RequestString.GetFormString("city");
|
|
|
438
|
+ // string city = RequestString.GetFormString("city");
|
|
435
|
439
|
//县区
|
|
436
|
|
- string county = RequestString.GetFormString("county");
|
|
|
440
|
+ // string county = RequestString.GetFormString("county");
|
|
437
|
441
|
//附件
|
|
438
|
442
|
string files = RequestString.GetFormString("files");
|
|
439
|
443
|
//类型
|
|
440
|
444
|
int type = RequestString.GetInt("type", 0);
|
|
441
|
|
- //子类型
|
|
|
445
|
+ int taskid = RequestString.GetInt("taskid", 0);
|
|
|
446
|
+
|
|
442
|
447
|
int smalltype = RequestString.GetInt("smalltype", 0);
|
|
443
|
448
|
//产品类别
|
|
444
|
|
- int producttype = RequestString.GetInt("producttype", 0);
|
|
|
449
|
+ // int producttype = RequestString.GetInt("producttype", 0);
|
|
445
|
450
|
//来源
|
|
446
|
451
|
int source = RequestString.GetInt("source", 0);
|
|
447
|
452
|
//是否寄回
|
|
448
|
|
- int isback = RequestString.GetInt("isback", 0);
|
|
|
453
|
+ // int isback = RequestString.GetInt("isback", 0);
|
|
449
|
454
|
//专员id
|
|
450
|
|
- int vipid = RequestString.GetInt("vipid", 0);
|
|
|
455
|
+ // int vipid = RequestString.GetInt("vipid", 0);
|
|
451
|
456
|
|
|
452
|
457
|
//备注信息
|
|
453
|
458
|
string remark = RequestString.GetFormString("remark");
|
|
|
@@ -455,64 +460,68 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
455
|
460
|
string callid = RequestString.GetFormString("callid");
|
|
456
|
461
|
|
|
457
|
462
|
if (string.IsNullOrEmpty(cusphone))
|
|
458
|
|
- return Error("请输入投诉电话");
|
|
|
463
|
+ return Error("请输入客户电话");
|
|
459
|
464
|
if (string.IsNullOrEmpty(content))
|
|
460
|
|
- return Error("请输入事件描述");
|
|
461
|
|
- if (type == 0)
|
|
462
|
|
- return Error("请选择工单类型");
|
|
463
|
|
- if (source == 0)
|
|
464
|
|
- return Error("请选择来源");
|
|
|
465
|
+ return Error("请输入描述内容");
|
|
|
466
|
+
|
|
465
|
467
|
|
|
466
|
|
- var valuecode = new BLL.T_Sys_DictionaryValue().GetModel(type).F_ValueCode;
|
|
|
468
|
+ // var valuecode = new BLL.T_Sys_DictionaryValue().GetModel(type).F_ValueCode;
|
|
467
|
469
|
|
|
468
|
470
|
using (TransactionScope trans = new TransactionScope())
|
|
469
|
471
|
{
|
|
470
|
472
|
#region 保存工单信息
|
|
471
|
473
|
Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = new Model.T_Bus_WorkOrder();
|
|
472
|
474
|
//modelT_Bus_WorkOrder.F_WorkOrderId = workorderBLL.GetNewWorkOrderID(valuecode,userModel.F_UserCode);
|
|
473
|
|
- modelT_Bus_WorkOrder.F_WorkOrderId = workorderBLL.GetNewWorkOrderID(valuecode);
|
|
|
475
|
+ modelT_Bus_WorkOrder.F_WorkOrderId = DateTime.Now.ToString("yyyyMMddHHmmssfff"); //工单编号
|
|
474
|
476
|
|
|
475
|
477
|
modelT_Bus_WorkOrder.F_Source = source;//信息来源
|
|
476
|
478
|
modelT_Bus_WorkOrder.F_Type = type;//信息类别
|
|
477
|
479
|
modelT_Bus_WorkOrder.F_SmallType = smalltype;//信息子类别
|
|
478
|
|
- modelT_Bus_WorkOrder.F_CusName = cusname;//投诉人姓名
|
|
479
|
|
- modelT_Bus_WorkOrder.F_CusSex = cussex;//性别
|
|
|
480
|
+ modelT_Bus_WorkOrder.F_CusName = cusname;//客户姓名
|
|
|
481
|
+ // modelT_Bus_WorkOrder.F_CusSex = cussex;//性别
|
|
|
482
|
+ modelT_Bus_WorkOrder.F_Customertype = customertype;//客户类别
|
|
|
483
|
+ modelT_Bus_WorkOrder.F_Definition = definition;//营业厅名称
|
|
|
484
|
+ modelT_Bus_WorkOrder.F_Typeof = Typeof;//工单类型
|
|
480
|
485
|
modelT_Bus_WorkOrder.F_CusPhone = cusphone;//来电号码
|
|
481
|
486
|
modelT_Bus_WorkOrder.F_GroupCode = code;//分组代码
|
|
482
|
|
- modelT_Bus_WorkOrder.F_Content = content;//事件描述
|
|
483
|
|
- modelT_Bus_WorkOrder.F_ProductName = productname;//产品名称
|
|
484
|
|
- modelT_Bus_WorkOrder.F_ProductDate = productdate;//生产日期
|
|
485
|
|
- modelT_Bus_WorkOrder.F_BuyDate = buydate;//购买日期
|
|
486
|
|
- modelT_Bus_WorkOrder.F_BuyAddress = buyaddress;//购买地点
|
|
487
|
|
- modelT_Bus_WorkOrder.F_ProductType = producttype;//产品类型
|
|
488
|
|
- modelT_Bus_WorkOrder.F_BatchNumber = batchnumber;//生产批号
|
|
489
|
|
- modelT_Bus_WorkOrder.F_UserDate = userdate;//使用日期
|
|
490
|
|
- modelT_Bus_WorkOrder.F_VIPPhone = vipphone;//专员号码
|
|
|
487
|
+ modelT_Bus_WorkOrder.F_Content = content;//描述内容
|
|
|
488
|
+ modelT_Bus_WorkOrder.F_Replycontent = replycontent;//回复内容
|
|
|
489
|
+ modelT_Bus_WorkOrder.F_Pietype = pietype;//派单类型
|
|
|
490
|
+ modelT_Bus_WorkOrder.F_Fixduty = fixduty;//定责
|
|
|
491
|
+ modelT_Bus_WorkOrder.F_Dealing =dealing ;//处理人
|
|
|
492
|
+ modelT_Bus_WorkOrder.F_Dealingtel = dealingtel ;//处理人电话
|
|
|
493
|
+ modelT_Bus_WorkOrder.F_VIPId = taskid;//任务id
|
|
|
494
|
+
|
|
|
495
|
+ // modelT_Bus_WorkOrder.F_ProductName = productname;//产品名称
|
|
|
496
|
+ // modelT_Bus_WorkOrder.F_ProductDate = productdate;//生产日期
|
|
|
497
|
+ // modelT_Bus_WorkOrder.F_BuyDate = buydate;//购买日期
|
|
|
498
|
+ // modelT_Bus_WorkOrder.F_BuyAddress = buyaddress;//购买地点
|
|
|
499
|
+ // modelT_Bus_WorkOrder.F_ProductType = producttype;//产品类型
|
|
|
500
|
+ // modelT_Bus_WorkOrder.F_BatchNumber = batchnumber;//生产批号
|
|
|
501
|
+ // modelT_Bus_WorkOrder.F_UserDate = userdate;//使用日期
|
|
|
502
|
+ // modelT_Bus_WorkOrder.F_VIPPhone = vipphone;//专员号码
|
|
491
|
503
|
modelT_Bus_WorkOrder.F_Remark = remark;//备注信息
|
|
|
504
|
+ // modelT_Bus_WorkOrder.F_Area = area;//大区
|
|
|
505
|
+ // modelT_Bus_WorkOrder.F_Province = province;//省份
|
|
|
506
|
+ // modelT_Bus_WorkOrder.F_City = city;//城市
|
|
|
507
|
+ // modelT_Bus_WorkOrder.F_County = county; //县区
|
|
492
|
508
|
|
|
493
|
|
- modelT_Bus_WorkOrder.F_Area = area;//大区
|
|
494
|
|
- modelT_Bus_WorkOrder.F_Province = province;//省份
|
|
495
|
|
- modelT_Bus_WorkOrder.F_City = city;//城市
|
|
496
|
|
- modelT_Bus_WorkOrder.F_County = county; //县区
|
|
497
|
|
-
|
|
498
|
|
- modelT_Bus_WorkOrder.F_IsBack = isback;//是否寄回
|
|
499
|
|
- modelT_Bus_WorkOrder.F_VIPId = vipid;//专员id
|
|
500
|
|
-
|
|
|
509
|
+ // modelT_Bus_WorkOrder.F_IsBack = isback;//是否寄回
|
|
|
510
|
+ // modelT_Bus_WorkOrder.F_VIPId = vipid;//专员id
|
|
501
|
511
|
modelT_Bus_WorkOrder.F_DealType = 0;
|
|
502
|
|
-
|
|
503
|
|
- if (vipid != 0)
|
|
504
|
|
- {
|
|
505
|
|
- var ml = new BLL.T_Cus_Customer().GetModel(vipid);
|
|
506
|
|
- if (ml != null)
|
|
507
|
|
- modelT_Bus_WorkOrder.F_VIPName = ml.F_Name;
|
|
508
|
|
- }
|
|
509
|
|
- else
|
|
510
|
|
- {
|
|
511
|
|
- modelT_Bus_WorkOrder.F_VIPName = vipname;
|
|
512
|
|
- }
|
|
513
|
|
-
|
|
514
|
|
- modelT_Bus_WorkOrder.F_CreateUser = userModel.F_UserCode;//登记人工号
|
|
515
|
|
- modelT_Bus_WorkOrder.F_CreateTime = DateTime.Now;//登记时间
|
|
|
512
|
+ //if (vipid != 0)
|
|
|
513
|
+ //{
|
|
|
514
|
+ // var ml = new BLL.T_Cus_Customer().GetModel(vipid);
|
|
|
515
|
+ // if (ml != null)
|
|
|
516
|
+ // modelT_Bus_WorkOrder.F_VIPName = ml.F_Name;
|
|
|
517
|
+ //}
|
|
|
518
|
+ //else
|
|
|
519
|
+ //{
|
|
|
520
|
+ // modelT_Bus_WorkOrder.F_VIPName = vipname;
|
|
|
521
|
+ //}
|
|
|
522
|
+
|
|
|
523
|
+ modelT_Bus_WorkOrder.F_CreateUser = userModel.F_UserCode;//创建人
|
|
|
524
|
+ modelT_Bus_WorkOrder.F_CreateTime = DateTime.Now;//创建时间
|
|
516
|
525
|
modelT_Bus_WorkOrder.F_State = 0;//工单状态0登记中
|
|
517
|
526
|
modelT_Bus_WorkOrder.F_IsDelete = 0;//是否删除(0:否,1:是)
|
|
518
|
527
|
|
|
|
@@ -533,7 +542,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
533
|
542
|
|
|
534
|
543
|
workorderBLL.Add(modelT_Bus_WorkOrder);
|
|
535
|
544
|
#endregion
|
|
536
|
|
-
|
|
|
545
|
+ if (taskid > 0)
|
|
|
546
|
+ {
|
|
|
547
|
+ var t_Call_OutTaskTelNum = new BLL.T_Call_OutTaskTelNum().GetModel((int)modelT_Bus_WorkOrder.F_VIPId);
|
|
|
548
|
+ if (t_Call_OutTaskTelNum != null)
|
|
|
549
|
+ t_Call_OutTaskTelNum.ExpandSintField1 = 1;
|
|
|
550
|
+ new BLL.T_Call_OutTaskTelNum().Update (t_Call_OutTaskTelNum);
|
|
|
551
|
+ }
|
|
537
|
552
|
#region 插入操作记录
|
|
538
|
553
|
Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
|
|
539
|
554
|
oper.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
|
|
|
@@ -567,42 +582,63 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
567
|
582
|
{
|
|
568
|
583
|
int userId = CurrentUser.UserData.F_UserId;
|
|
569
|
584
|
Model.T_Sys_UserAccount userModel = userBLL.GetModel(userId);
|
|
570
|
|
- //投诉人
|
|
|
585
|
+ //客户姓名
|
|
571
|
586
|
string cusname = RequestString.GetFormString("cusname");
|
|
572
|
587
|
//投诉人性别
|
|
573
|
|
- string cussex = RequestString.GetFormString("cussex");
|
|
574
|
|
- //投诉电话
|
|
|
588
|
+ // string cussex = RequestString.GetFormString("cussex");
|
|
|
589
|
+ //客户电话
|
|
575
|
590
|
string cusphone = RequestString.GetFormString("cusphone");
|
|
576
|
591
|
//分组代码
|
|
577
|
592
|
string code = RequestString.GetFormString("code");
|
|
578
|
|
- //事件描述
|
|
|
593
|
+ if (!string.IsNullOrEmpty(userModel.groupcode))
|
|
|
594
|
+ {
|
|
|
595
|
+ code = userModel.groupcode;
|
|
|
596
|
+ }
|
|
|
597
|
+ //客户类别
|
|
|
598
|
+ string customertype = RequestString.GetFormString("customertype");
|
|
|
599
|
+ //营业厅名称
|
|
|
600
|
+ string definition = RequestString.GetFormString("definition");
|
|
|
601
|
+ //工单类型
|
|
|
602
|
+ string Typeof = RequestString.GetFormString("Typeof");
|
|
|
603
|
+ //描述内容
|
|
579
|
604
|
string content = RequestString.GetFormString("content");
|
|
|
605
|
+ //回复内容
|
|
|
606
|
+ string replycontent = RequestString.GetFormString("replycontent");
|
|
|
607
|
+ //派单类型
|
|
|
608
|
+ string pietype = RequestString.GetFormString("pietype");
|
|
|
609
|
+ //定责
|
|
|
610
|
+ string fixduty = RequestString.GetFormString("fixduty");
|
|
|
611
|
+ //处理人
|
|
|
612
|
+ string dealing = RequestString.GetFormString("dealing");
|
|
|
613
|
+ //处理人电话
|
|
|
614
|
+ string dealingtel = RequestString.GetFormString("dealingtel");
|
|
|
615
|
+
|
|
580
|
616
|
//产品名称
|
|
581
|
|
- string productname = RequestString.GetFormString("productname");
|
|
582
|
|
- //生产日期
|
|
583
|
|
- string productdate = RequestString.GetFormString("productdate");
|
|
|
617
|
+ // string productname = RequestString.GetFormString("productname");
|
|
584
|
618
|
//购买日期
|
|
585
|
|
- string buydate = RequestString.GetFormString("buydate");
|
|
|
619
|
+ // string buydate = RequestString.GetFormString("buydate");
|
|
586
|
620
|
//购买地点
|
|
587
|
|
- string buyaddress = RequestString.GetFormString("buyaddress");
|
|
|
621
|
+ // string buyaddress = RequestString.GetFormString("buyaddress");
|
|
588
|
622
|
////产品类别
|
|
589
|
623
|
//string producttype = RequestString.GetFormString("producttype");
|
|
|
624
|
+ //生产日期
|
|
|
625
|
+ // string productdate = RequestString.GetFormString("productdate");
|
|
590
|
626
|
//生产批号
|
|
591
|
|
- string batchnumber = RequestString.GetFormString("batchnumber");
|
|
|
627
|
+ // string batchnumber = RequestString.GetFormString("batchnumber");
|
|
592
|
628
|
//使用日期
|
|
593
|
|
- string userdate = RequestString.GetFormString("userdate");
|
|
|
629
|
+ // string userdate = RequestString.GetFormString("userdate");
|
|
594
|
630
|
//专员名称
|
|
595
|
|
- string vipname = RequestString.GetFormString("vipname");
|
|
|
631
|
+ // string vipname = RequestString.GetFormString("vipname");
|
|
596
|
632
|
//专员号码
|
|
597
|
|
- string vipphone = RequestString.GetFormString("vipphone");
|
|
|
633
|
+ // string vipphone = RequestString.GetFormString("vipphone");
|
|
598
|
634
|
//大区
|
|
599
|
|
- string area = RequestString.GetFormString("area");
|
|
|
635
|
+ // string area = RequestString.GetFormString("area");
|
|
600
|
636
|
//省份
|
|
601
|
|
- string province = RequestString.GetFormString("province");
|
|
|
637
|
+ // string province = RequestString.GetFormString("province");
|
|
602
|
638
|
//城市
|
|
603
|
|
- string city = RequestString.GetFormString("city");
|
|
|
639
|
+ // string city = RequestString.GetFormString("city");
|
|
604
|
640
|
//县区
|
|
605
|
|
- string county = RequestString.GetFormString("county");
|
|
|
641
|
+ // string county = RequestString.GetFormString("county");
|
|
606
|
642
|
//附件
|
|
607
|
643
|
string files = RequestString.GetFormString("files");
|
|
608
|
644
|
//类型
|
|
|
@@ -610,13 +646,14 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
610
|
646
|
//子类型
|
|
611
|
647
|
int smalltype = RequestString.GetInt("smalltype", 0);
|
|
612
|
648
|
//产品类别
|
|
613
|
|
- int producttype = RequestString.GetInt("producttype", 0);
|
|
|
649
|
+ // int producttype = RequestString.GetInt("producttype", 0);
|
|
614
|
650
|
//来源
|
|
615
|
651
|
int source = RequestString.GetInt("source", 0);
|
|
616
|
652
|
//是否寄回
|
|
617
|
|
- int isback = RequestString.GetInt("isback", 0);
|
|
|
653
|
+ // int isback = RequestString.GetInt("isback", 0);
|
|
618
|
654
|
//专员id
|
|
619
|
|
- int vipid = RequestString.GetInt("vipid", 0);
|
|
|
655
|
+ // int vipid = RequestString.GetInt("vipid", 0);
|
|
|
656
|
+
|
|
620
|
657
|
//备注信息
|
|
621
|
658
|
string remark = RequestString.GetFormString("remark");
|
|
622
|
659
|
|
|
|
@@ -628,22 +665,20 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
628
|
665
|
string dealdes = RequestString.GetFormString("dealdes");
|
|
629
|
666
|
string dealresult = RequestString.GetFormString("dealresult");
|
|
630
|
667
|
int dealstate = RequestString.GetInt("dealstate", 0);
|
|
631
|
|
- int dealtimely = RequestString.GetInt("dealtimely", 0);
|
|
632
|
|
- decimal dealcost = 0;
|
|
633
|
|
- var strdealcost = RequestString.GetFormString("dealcost");
|
|
634
|
|
- if (!string.IsNullOrEmpty(strdealcost))
|
|
635
|
|
- {
|
|
636
|
|
- dealcost = decimal.Parse(strdealcost);
|
|
637
|
|
- }
|
|
|
668
|
+ // int dealtimely = RequestString.GetInt("dealtimely", 0);
|
|
|
669
|
+ // decimal dealcost = 0;
|
|
|
670
|
+ // var strdealcost = RequestString.GetFormString("dealcost");
|
|
|
671
|
+ //if (!string.IsNullOrEmpty(strdealcost))
|
|
|
672
|
+ //{
|
|
|
673
|
+ // dealcost = decimal.Parse(strdealcost);
|
|
|
674
|
+ //}
|
|
638
|
675
|
|
|
639
|
676
|
if (string.IsNullOrEmpty(cusphone))
|
|
640
|
677
|
return Error("请输入投诉电话");
|
|
641
|
678
|
if (string.IsNullOrEmpty(content))
|
|
642
|
679
|
return Error("请输入事件描述");
|
|
643
|
|
- if (type == 0)
|
|
644
|
|
- return Error("请选择工单类型");
|
|
645
|
|
- if (source == 0)
|
|
646
|
|
- return Error("请选择来源");
|
|
|
680
|
+
|
|
|
681
|
+
|
|
647
|
682
|
|
|
648
|
683
|
#region 修改
|
|
649
|
684
|
Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = workorderBLL.GetModel(workid);
|
|
|
@@ -657,53 +692,35 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
657
|
692
|
modelT_Bus_WorkOrder.F_Type = type;//信息类别
|
|
658
|
693
|
modelT_Bus_WorkOrder.F_SmallType = smalltype;//信息子类别
|
|
659
|
694
|
modelT_Bus_WorkOrder.F_CusName = cusname;//投诉人姓名
|
|
660
|
|
- modelT_Bus_WorkOrder.F_CusSex = cussex;//性别
|
|
|
695
|
+ // modelT_Bus_WorkOrder.F_CusSex = cussex;//性别
|
|
661
|
696
|
modelT_Bus_WorkOrder.F_CusPhone = cusphone;//来电号码
|
|
|
697
|
+ modelT_Bus_WorkOrder.F_Customertype = customertype;//客户类别
|
|
|
698
|
+ modelT_Bus_WorkOrder.F_Definition = definition;//营业厅名称
|
|
|
699
|
+ modelT_Bus_WorkOrder.F_Typeof = Typeof;//工单类型
|
|
|
700
|
+ modelT_Bus_WorkOrder.F_Replycontent = replycontent;//回复内容
|
|
|
701
|
+ modelT_Bus_WorkOrder.F_Pietype = pietype;//派单类型
|
|
|
702
|
+ modelT_Bus_WorkOrder.F_Fixduty = fixduty;//定责
|
|
|
703
|
+
|
|
662
|
704
|
if (!string.IsNullOrEmpty(code))
|
|
663
|
705
|
{
|
|
664
|
706
|
modelT_Bus_WorkOrder.F_GroupCode = code;//分组代码
|
|
665
|
707
|
}
|
|
666
|
708
|
modelT_Bus_WorkOrder.F_Content = content;//事件描述
|
|
667
|
|
- modelT_Bus_WorkOrder.F_ProductName = productname;//产品名称
|
|
668
|
|
- modelT_Bus_WorkOrder.F_ProductDate = productdate;//生产日期
|
|
669
|
|
- modelT_Bus_WorkOrder.F_BuyDate = buydate;//购买日期
|
|
670
|
|
- modelT_Bus_WorkOrder.F_BuyAddress = buyaddress;//购买地点
|
|
671
|
|
- modelT_Bus_WorkOrder.F_ProductType = producttype;//产品类别
|
|
672
|
|
- modelT_Bus_WorkOrder.F_BatchNumber = batchnumber;//生产批号
|
|
673
|
|
- modelT_Bus_WorkOrder.F_UserDate = userdate;//使用日期
|
|
674
|
|
- modelT_Bus_WorkOrder.F_VIPPhone = vipphone;//专员号码
|
|
675
|
709
|
modelT_Bus_WorkOrder.F_Remark = remark;//备注信息
|
|
676
|
710
|
|
|
677
|
|
- modelT_Bus_WorkOrder.F_Area = area;//大区
|
|
678
|
|
- modelT_Bus_WorkOrder.F_Province = province;//省份
|
|
679
|
|
- modelT_Bus_WorkOrder.F_City = city;//城市
|
|
680
|
|
- modelT_Bus_WorkOrder.F_County = county; //县区
|
|
681
|
|
-
|
|
682
|
|
- modelT_Bus_WorkOrder.F_IsBack = isback;//是否寄回
|
|
683
|
|
- modelT_Bus_WorkOrder.F_VIPId = vipid;//专员id
|
|
|
711
|
+ modelT_Bus_WorkOrder.F_Dealing = dealing;//处理人
|
|
|
712
|
+ modelT_Bus_WorkOrder.F_Dealingtel = dealingtel;//处理人电话
|
|
684
|
713
|
|
|
685
|
714
|
modelT_Bus_WorkOrder.F_DealState = dealstate;
|
|
686
|
715
|
//modelT_Bus_WorkOrder.F_DealFile = files;
|
|
687
|
716
|
modelT_Bus_WorkOrder.F_DealDes = dealdes;
|
|
688
|
717
|
modelT_Bus_WorkOrder.F_DealResult = dealresult;
|
|
689
|
|
- modelT_Bus_WorkOrder.F_DealCost = dealcost;
|
|
690
|
|
- modelT_Bus_WorkOrder.F_DealTimely = dealtimely;
|
|
|
718
|
+ // modelT_Bus_WorkOrder.F_DealCost = dealcost;
|
|
|
719
|
+ // modelT_Bus_WorkOrder.F_DealTimely = dealtimely;
|
|
691
|
720
|
|
|
692
|
|
- if (vipid != 0)
|
|
693
|
|
- {
|
|
694
|
|
- var ml = new BLL.T_Cus_Customer().GetModel(vipid);
|
|
695
|
|
- if (ml != null)
|
|
696
|
|
- modelT_Bus_WorkOrder.F_VIPName = ml.F_Name;
|
|
697
|
|
- }
|
|
698
|
|
- else
|
|
699
|
|
- {
|
|
700
|
|
- modelT_Bus_WorkOrder.F_VIPName = vipname;
|
|
701
|
|
- }
|
|
|
721
|
+
|
|
702
|
722
|
|
|
703
|
|
- //modelT_Bus_WorkOrder.F_CreateUser = userModel.F_UserCode;//登记人工号
|
|
704
|
|
- //modelT_Bus_WorkOrder.F_CreateTime = DateTime.Now;//登记时间
|
|
705
|
|
- //modelT_Bus_WorkOrder.F_State = 0;//工单状态0登记中
|
|
706
|
|
- //modelT_Bus_WorkOrder.F_IsDelete = 0;//是否删除(0:否,1:是)
|
|
|
723
|
+
|
|
707
|
724
|
|
|
708
|
725
|
modelT_Bus_WorkOrder.F_File = files;//附件
|
|
709
|
726
|
|
|
|
@@ -847,7 +864,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
847
|
864
|
oper.F_State = modelT_Bus_WorkOrder.F_State;
|
|
848
|
865
|
|
|
849
|
866
|
string userinfo = userModel.F_UserName + "(" + userModel.F_UserCode + ")";
|
|
850
|
|
- oper.F_Message = userinfo + " 跟进了工单";
|
|
|
867
|
+ oper.F_Message = userinfo + " 跟进了工单"+ content;
|
|
851
|
868
|
oper.F_CreateUser = userModel.F_UserCode;
|
|
852
|
869
|
oper.F_CreateTime = DateTime.Now;
|
|
853
|
870
|
oper.F_IsDelete = 0;
|
|
|
@@ -911,15 +928,14 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
911
|
928
|
new BLL.T_Bus_WorkOrder().Update(modelT_Bus_WorkOrder);
|
|
912
|
929
|
|
|
913
|
930
|
#endregion
|
|
914
|
|
-
|
|
915
|
|
-
|
|
|
931
|
+
|
|
916
|
932
|
#region 插入操作记录
|
|
917
|
933
|
Model.T_Bus_Operation oper = new Model.T_Bus_Operation();
|
|
918
|
934
|
oper.F_WorkOrderId = modelT_Bus_WorkOrder.F_WorkOrderId;
|
|
919
|
935
|
oper.F_State = modelT_Bus_WorkOrder.F_State;
|
|
920
|
936
|
|
|
921
|
937
|
string userinfo = userModel.F_UserName + "(" + userModel.F_UserCode + ")";
|
|
922
|
|
- oper.F_Message = userinfo + " 办理了工单";
|
|
|
938
|
+ oper.F_Message = userinfo + " 处理了工单"+ dealresult;
|
|
923
|
939
|
oper.F_CreateUser = userModel.F_UserCode;
|
|
924
|
940
|
oper.F_CreateTime = DateTime.Now;
|
|
925
|
941
|
oper.F_IsDelete = 0;
|
|
|
@@ -934,7 +950,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
934
|
950
|
}
|
|
935
|
951
|
else
|
|
936
|
952
|
{
|
|
937
|
|
- return Error("已经办理过了");
|
|
|
953
|
+ return Error("已经处理过了");
|
|
938
|
954
|
}
|
|
939
|
955
|
}
|
|
940
|
956
|
else
|