Преглед на файлове

文件上传以及工单处理

zhengbingbing преди 8 години
родител
ревизия
8f21b299c7

+ 3 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/CallCenterApi.Interface.csproj

@@ -289,7 +289,9 @@
289 289
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
290 290
     </Content>
291 291
     <Content Include="Configs\log4net.config" />
292
-    <Content Include="Configs\system.config" />
292
+    <Content Include="Configs\system.config">
293
+      <SubType>Designer</SubType>
294
+    </Content>
293 295
     <None Include="Properties\PublishProfiles\1q.pubxml" />
294 296
     <None Include="Properties\PublishProfiles\ddr.pubxml" />
295 297
     <None Include="Properties\PublishProfiles\my.pubxml" />

+ 50 - 22
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallInScreenController.cs

@@ -494,26 +494,26 @@ namespace CallCenterApi.Interface.Controllers.tel
494 494
             {
495 495
                 #region 获取参数
496 496
                 int type = RequestString.GetInt("type", 0);
497
-                int tslx = RequestString.GetInt("tslx", 0);
497
+                //int tslx = RequestString.GetInt("tslx", 0);
498 498
                 string callid = RequestString.GetFormString("callid");
499 499
                 int khid = RequestString.GetInt("khid", 0);
500 500
                 string tskh = RequestString.GetFormString("tskh");
501 501
                 string tsdh = RequestString.GetFormString("tsdh");
502
-                int zrbm = RequestString.GetInt("zrbm", 0);
503
-                int zrid = RequestString.GetInt("zrid", 0);
502
+                //int zrbm = RequestString.GetInt("zrbm", 0);
503
+                //int zrid = RequestString.GetInt("zrid", 0);
504 504
                 string cont = RequestString.GetFormString("cont");
505
-                string answer = RequestString.GetFormString("answer");
505
+                //string answer = RequestString.GetFormString("answer");
506 506
                 string clcont = RequestString.GetFormString("clcont");
507 507
 
508 508
                 int clbm = RequestString.GetInt("clbm", 0);
509 509
                 int clid = RequestString.GetInt("clid", 0);
510 510
                 string source = RequestString.GetFormString("source");
511
-                string address = RequestString.GetFormString("address");
511
+                //string address = RequestString.GetFormString("address");
512 512
                 #region 新增字段
513 513
                 int infotypeid = RequestString.GetInt("infotypeid", 0);//信息分类
514
-                int isreward = RequestString.GetInt("isreward", 0);//上报奖励
515
-                string reamount = RequestString.GetFormString("reamount");//奖励金额
516
-                string retime = RequestString.GetFormString("retime");//奖励时间
514
+                //int isreward = RequestString.GetInt("isreward", 0);//上报奖励
515
+                //string reamount = RequestString.GetFormString("reamount");//奖励金额
516
+                //string retime = RequestString.GetFormString("retime");//奖励时间
517 517
                 int unitid = RequestString.GetInt("unitid", 0);//交办单位
518 518
                 #endregion
519 519
                 #endregion
@@ -541,7 +541,7 @@ namespace CallCenterApi.Interface.Controllers.tel
541 541
                         model.Detail = cont;
542 542
                         model.Clcontent = clcont;
543 543
                         model.Type = type;
544
-                        model.TypeClass = tslx;
544
+                        //model.TypeClass = tslx;
545 545
 
546 546
                         if (type == 1)
547 547
                         {
@@ -552,8 +552,8 @@ namespace CallCenterApi.Interface.Controllers.tel
552 552
                         model.IsDel = 0;
553 553
                         model.IsReturn = 0;
554 554
                         model.IsReturnBak = 0;
555
-                        model.ResponDept = zrbm;
556
-                        model.Answer = answer;
555
+                        //model.ResponDept = zrbm;
556
+                        //model.Answer = answer;
557 557
                         model.IsTimeOut = 0;
558 558
                         model.IsUserSend = 0;
559 559
                         model.IsAdminSend = 0;
@@ -574,9 +574,9 @@ namespace CallCenterApi.Interface.Controllers.tel
574 574
                                 model.InfoType = dicVModel.F_Name;
575 575
                             }
576 576
                         }
577
-                        model.ISReward = isreward;
578
-                        model.RewardAmount = reamount;
579
-                        model.RewardTime = retime;
577
+                        model.ISReward = 0;
578
+                        //model.RewardAmount = reamount;
579
+                        //model.RewardTime = retime;
580 580
                         model.UnitID = unitid;
581 581
                         if (unitid != 0)
582 582
                         {
@@ -588,20 +588,21 @@ namespace CallCenterApi.Interface.Controllers.tel
588 588
                         }
589 589
                         #endregion
590 590
 
591
-                        Model.T_Sys_UserAccount us = new BLL.T_Sys_UserAccount().GetModel(zrid);
592
-                        if (us != null)
593
-                        {
594
-                            model.ResponUser = us.F_UserCode;
595
-                        }
591
+                        //Model.T_Sys_UserAccount us = new BLL.T_Sys_UserAccount().GetModel(zrid);
592
+                        //if (us != null)
593
+                        //{
594
+                        //    model.ResponUser = us.F_UserCode;
595
+                        //}
596
+                        #region 工单超时
596 597
                         Model.T_Wo_WorkOrderTimeOut to = new BLL.T_Wo_WorkOrderTimeOut().GetModel(type);
597 598
                         if (to != null)
598 599
                         {
599 600
                             model.LimitTime = to.MainTime;
600 601
                         }
601
-
602
+                        #endregion
602 603
                         model.CreateUser = ua.F_UserCode;
603 604
                         model.CreateTime = DateTime.Now;
604
-
605
+                        #region 工单明细
605 606
                         if (clbm != 0 || clid != 0)
606 607
                         {
607 608
                             Model.T_Wo_WorkOrderItem item = new Model.T_Wo_WorkOrderItem();
@@ -640,7 +641,7 @@ namespace CallCenterApi.Interface.Controllers.tel
640 641
                                 item.LimitTime = to.ItemTime;
641 642
                             }
642 643
 
643
-                            item.Detail = answer;
644
+                            item.Detail = clcont;
644 645
                             item.IsLast = 0;
645 646
                             item.State = 0;
646 647
                             item.IsStart = 0;
@@ -673,7 +674,34 @@ namespace CallCenterApi.Interface.Controllers.tel
673 674
                                 #endregion
674 675
                             }
675 676
                         }
677
+                        #endregion
678
+                        #region 插入操作记录
679
+                        Model.T_Wo_Operation oper = new Model.T_Wo_Operation();
680
+                        oper.F_WorkOrderId = model.WorkOrderID;
681
+                        oper.F_State = model.State;
682
+                        oper.F_CallRecordId = model.CallID != null ? int.Parse(model.CallID) : 0;
683
+                        oper.F_File = model.Files;
684
+
685
+                        string userinfo = ua.depname + "-" + ua.F_UserName + "(" + ua.F_UserCode + ")";
686
+                        if (model.State == 0)
687
+                        {
688
+                            oper.F_Message = userinfo + " 登记了工单,工单编号:" + model.WorkOrderID;
689
+                        }
690
+                        if (model.State == 1)
691
+                        {
692
+                            oper.F_Message = userinfo + " 登记并提交了工单,工单编号:" + model.WorkOrderID;
693
+                        }
694
+                        if (model.State == 2)
695
+                        {
696
+                            oper.F_Message = userinfo + " 登记并完结了工单,工单编号:" + model.WorkOrderID;
697
+                        }
676 698
 
699
+                        oper.F_CreateUser = ua.F_UserCode;
700
+                        oper.F_CreateTime = DateTime.Now;
701
+                        oper.F_IsDelete = 0;
702
+
703
+                        new BLL.T_Wo_Operation().Add(oper);
704
+                        #endregion
677 705
                         if (new BLL.T_Wo_WorkOrder().Add(model) > 0)
678 706
                         {
679 707
                             if (!string.IsNullOrEmpty(callid))

+ 104 - 71
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -11,6 +11,7 @@ using System.Linq;
11 11
 using System.Web;
12 12
 using System.Web.Mvc;
13 13
 using System.Transactions;
14
+using System.IO;
14 15
 
15 16
 namespace CallCenterApi.Interface.Controllers.weixin
16 17
 {
@@ -205,41 +206,41 @@ namespace CallCenterApi.Interface.Controllers.weixin
205 206
             string cusphone = RequestString.GetFormString("cusphone");//GetFormString
206 207
 
207 208
             string content = RequestString.GetFormString("content");
208
-            //string files = RequestString.GetFormString("files");
209
+            string files = RequestString.GetFormString("files");
209 210
             int type = RequestString.GetInt("type", 3);//默认为3投诉建议
210 211
             
211 212
             string stropenid = HttpUtility.UrlDecode(RequestString.GetFormString("openid"));
212 213
             var wxuser = new BLL.T_Sys_Users().GetModelList(" F_OpenId='" + stropenid.Trim() + "'  and F_Type=1 ").FirstOrDefault();
213 214
             string fileids = "";
214 215
             #region 上传附件
215
-            HttpFileCollection files = RequestString.GetFiles();
216
-            if (files.Count > 0)
217
-            {
218
-                List<Model.T_Sys_Accessories> acs = new List<Model.T_Sys_Accessories>();
219
-                string path = "/Upload/Files/" + DateTime.Now.ToString("yyyy") + "/" + DateTime.Now.ToString("MM") + "/" + DateTime.Now.ToString("dd") + "/";
220
-                for (int i = 0; i < files.Count; i++)
221
-                {
222
-                    HttpPostedFile file = files[i];
223
-                    FileUp fu = new FileUp();
224
-
225
-                    string name = fu.Upload(file, path);
226
-
227
-                    Model.T_Sys_Accessories model_T_Sys_Accessories = new Model.T_Sys_Accessories();
228
-                    model_T_Sys_Accessories.F_AddTime = DateTime.Now;//上传时间
229
-                    model_T_Sys_Accessories.F_FileName = name;//附件名称
230
-                    model_T_Sys_Accessories.F_FileType = System.IO.Path.GetExtension(file.FileName);//附件类型
231
-                    model_T_Sys_Accessories.F_FileUrl = path + name;//附件地址
232
-                    model_T_Sys_Accessories.F_Size = file.ContentLength;
233
-                    int id = new BLL.T_Sys_Accessories().Add(model_T_Sys_Accessories);
234
-                    model_T_Sys_Accessories.F_FileId = id;
235
-                    acs.Add(model_T_Sys_Accessories);
236
-                    fileids += id.ToString() + ",";
237
-                }
238
-            }
216
+            //HttpFileCollection files = RequestString.GetFiles();
217
+            //if (files.Count > 0)
218
+            //{
219
+            //    List<Model.T_Sys_Accessories> acs = new List<Model.T_Sys_Accessories>();
220
+            //    string path = "/Upload/Files/" + DateTime.Now.ToString("yyyy/MM/dd") + "/";
221
+            //    for (int i = 0; i < files.Count; i++)
222
+            //    {
223
+            //        HttpPostedFile file = files[i];
224
+            //        FileUp fu = new FileUp();
225
+
226
+            //        string name = fu.Upload(file, path);
227
+
228
+            //        Model.T_Sys_Accessories model_T_Sys_Accessories = new Model.T_Sys_Accessories();
229
+            //        model_T_Sys_Accessories.F_AddTime = DateTime.Now;//上传时间
230
+            //        model_T_Sys_Accessories.F_FileName = name;//附件名称
231
+            //        model_T_Sys_Accessories.F_FileType = System.IO.Path.GetExtension(file.FileName);//附件类型
232
+            //        model_T_Sys_Accessories.F_FileUrl = path + name;//附件地址
233
+            //        model_T_Sys_Accessories.F_Size = file.ContentLength;
234
+            //        int id = new BLL.T_Sys_Accessories().Add(model_T_Sys_Accessories);
235
+            //        model_T_Sys_Accessories.F_FileId = id;
236
+            //        acs.Add(model_T_Sys_Accessories);
237
+            //        fileids += id.ToString() + ",";
238
+            //    }
239
+            //}
239 240
             #endregion
240 241
 
241 242
             workorder.WorkOrderController wo = new workorder.WorkOrderController();
242
-            string workorderid = wo.AddWorkOrders(type, cusname, cusphone, content, fileids.Trim(','));
243
+            string workorderid = wo.AddWorkOrders(type, cusname, cusphone, content, files);
243 244
             if (string.IsNullOrEmpty(workorderid))
244 245
             {
245 246
                 return Error("新增失败");
@@ -259,7 +260,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
259 260
         ///  获取工单详情
260 261
         /// </summary>
261 262
         /// <returns></returns>
262
-        //[WechatActionFilter]
263
+        [WechatActionFilter]
263 264
         public ActionResult GetWorkOrder()
264 265
         {
265 266
             string strworkorderid = HttpUtility.UrlDecode(RequestString.GetQueryString("workorderid"));
@@ -270,7 +271,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
270 271
 
271 272
             if (tbu.Rows.Count > 0)
272 273
             {
273
-                string sql = "select * "
274
+                string sql = "select *,dbo.GetUserName(CreateUser) as CreateUserName "
274 275
                     + " from T_Wo_WorkOrder where id =" + strworkorderid + " ";
275 276
                 var dt = DbHelperSQL.Query(sql).Tables[0];
276 277
                 if (dt.Rows.Count > 0)
@@ -328,49 +329,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
328 329
             }
329 330
 
330 331
         }
331
-
332
-        /// <summary>
333
-        ///  获取工单数量
334
-        /// </summary>
335
-        /// <returns></returns>
336
-        [WechatActionFilter]
337
-        public ActionResult GetWorkOrderCount()
338
-        {
339
-            string stropenid = HttpUtility.UrlDecode(RequestString.GetQueryString("openid"));
340
-            int type = RequestString.GetInt("type", 0);
341
-
342
-            var wxuser = new BLL.T_Sys_Users().GetModelList(" F_OpenId='" + stropenid.Trim() + "' and F_Type=1 ").FirstOrDefault();
343
-
344
-            string where = " WorkOrderID in (select F_WorkOrderId from T_WO_UserWorkOrder where F_UserId='" + wxuser.F_Id + "') ";
345
-
346
-
347
-            string sql = " select count(1) from T_WO_UserWorkOrder where F_UserId='" + wxuser.F_Id + "' ";
348
-            string sqlblz = " select count(1) from T_Wo_WorkOrder where " + where + " and State!=2 ";
349
-            string sqlybl = " select count(1) from T_Wo_WorkOrder where " + where + " and State =2 ";
350
-
351
-            string sqltype = " select F_ValueId,F_Value,(select COUNT(1) from T_Wo_WorkOrder where 1=1 ";
352
-            if (type == 1)
353
-            {
354
-                sqltype += " and State!=2";
355
-            }
356
-            else if (type == 2)
357
-            {
358
-                sqltype += " and State=2";
359
-            }
360
-            sqltype += " and  TypeClass=F_ValueId and " + where + ") Count from  dbo.T_Sys_DictionaryValue where F_ItemId=2 and F_State=0 ";
361
-
362
-            DataTable dt = DbHelperSQL.Query(sqltype).Tables[0];
363
-
364
-            var obj = new
365
-            {
366
-                total = DbHelperSQL.GetSingle(sql).ToString(),
367
-                blzcount = DbHelperSQL.GetSingle(sqlblz).ToString(),
368
-                yblcount = DbHelperSQL.GetSingle(sqlybl).ToString(),
369
-                typedata = dt
370
-            };
371
-
372
-            return Success("成功", obj);
373
-        }
332
+        
374 333
         #endregion
375 334
 
376 335
         #region 获取下拉框
@@ -479,6 +438,80 @@ namespace CallCenterApi.Interface.Controllers.weixin
479 438
             }
480 439
             return dt;
481 440
         }
441
+
442
+        /// <summary>
443
+        /// 上传附件
444
+        /// </summary>
445
+        /// <returns></returns>
446
+        public ActionResult UpdateFile()
447
+        {
448
+            //string stropenid = HttpUtility.UrlDecode(RequestString.GetFormString("openid"));
449
+            string fileurl = HttpUtility.UrlDecode(RequestString.GetFormString("fileurl"));
450
+            string filename = HttpUtility.UrlDecode(RequestString.GetFormString("filename"));
451
+            string filesize = HttpUtility.UrlDecode(RequestString.GetFormString("filesize"));
452
+            string filetype = HttpUtility.UrlDecode(RequestString.GetFormString("filetype"));
453
+
454
+            FileUp fu = new FileUp();
455
+            string path = "/Upload/Files/" + DateTime.Now.ToString("yyyy/MM/dd") + "/";
456
+            #region
457
+            if (fileurl.Trim() != "" && fileurl != "undefined")
458
+            {
459
+                byte[] by = fu.GetBinaryFile(fileurl);
460
+
461
+                fu.SaveFile(by, path, filename, filetype);
462
+                Model.T_Sys_Accessories model_T_Sys_Accessories = new Model.T_Sys_Accessories();
463
+                model_T_Sys_Accessories.F_AddTime = DateTime.Now;//上传时间
464
+                model_T_Sys_Accessories.F_FileName = filename;//附件名称
465
+                model_T_Sys_Accessories.F_FileType = filetype;//附件类型
466
+                model_T_Sys_Accessories.F_FileUrl = path + filename;//附件地址
467
+                model_T_Sys_Accessories.F_Size = long.Parse(filesize);
468
+                //model_T_Sys_Accessories.F_UserCode = stropenid;//上传人  
469
+                int id = new BLL.T_Sys_Accessories().Add(model_T_Sys_Accessories);
470
+                if (id > 0)
471
+                {
472
+                    return Success("文件日志都成功", id);
473
+                }
474
+                else
475
+                    return Success("文件成功");
476
+            }
477
+            else
478
+            {
479
+                return Error("请选择要上传的文件");
480
+            }
481
+            #endregion
482
+
483
+            #region 多个上传
484
+
485
+            //HttpFileCollection files = RequestString.GetFiles();
486
+            //if (files.Count > 0)
487
+            //{
488
+            //    List<Model.T_Sys_Accessories> acs = new List<Model.T_Sys_Accessories>();
489
+                
490
+            //    for (int i = 0; i < files.Count; i++)
491
+            //    {
492
+
493
+            //        HttpPostedFile file = files[i];
494
+            //        string name = fu.Upload(file, path);
495
+            //        Model.T_Sys_Accessories model_T_Sys_Accessories = new Model.T_Sys_Accessories();
496
+            //        model_T_Sys_Accessories.F_AddTime = DateTime.Now;//上传时间
497
+            //        model_T_Sys_Accessories.F_FileName = name;//附件名称
498
+            //        model_T_Sys_Accessories.F_FileType = System.IO.Path.GetExtension(file.FileName);//附件类型
499
+            //        model_T_Sys_Accessories.F_FileUrl = path + name;//附件地址
500
+            //        model_T_Sys_Accessories.F_Size = file.ContentLength;
501
+            //        //model_T_Sys_Accessories.F_UserCode = stropenid;//上传人  
502
+            //        int id = new BLL.T_Sys_Accessories().Add(model_T_Sys_Accessories);
503
+            //        model_T_Sys_Accessories.F_FileId = id;
504
+            //        acs.Add(model_T_Sys_Accessories);
505
+            //    }
506
+
507
+            //    return Success("成功", acs);
508
+            //}
509
+            //else
510
+            //{
511
+            //    return Error("请选择要上传的文件");
512
+            //}
513
+            #endregion
514
+        }
482 515
         #endregion
483 516
     }
484 517
 }

+ 10 - 20
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -473,7 +473,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
473 473
                     if (ua != null)
474 474
                     {
475 475
                         int type = RequestString.GetInt("type", 0);
476
-                        int tslx = RequestString.GetInt("tslx", 0);
476
+                        //int tslx = RequestString.GetInt("tslx", 0);
477 477
                         string callid = RequestString.GetFormString("callid");
478 478
                         int khid = RequestString.GetInt("khid", 0);
479 479
                         string tskh = RequestString.GetFormString("tskh");
@@ -485,20 +485,12 @@ namespace CallCenterApi.Interface.Controllers.workorder
485 485
                             return res;
486 486
                         }
487 487
                         #endregion
488
-                        //int zrbm = RequestString.GetInt("zrbm", 0);
489
-                        //int zrid = RequestString.GetInt("zrid", 0);
490 488
                         string cont = RequestString.GetFormString("cont");
491 489
                         string clcont = RequestString.GetFormString("clcont");
492 490
                         string file = RequestString.GetFormString("file");
493
-                        string answer = RequestString.GetFormString("answer");
494 491
                         string source = RequestString.GetFormString("source");
495
-                        string address = RequestString.GetFormString("address");
496
-
497 492
                         #region 新增字段
498 493
                         int infotypeid = RequestString.GetInt("infotypeid", 0);//信息分类
499
-                        int isreward = RequestString.GetInt("isreward", 0);//上报奖励
500
-                        string reamount= RequestString.GetFormString("reamount");//奖励金额
501
-                        string retime = RequestString.GetFormString("retime");//奖励时间
502 494
                         int unitid = RequestString.GetInt("unitid", 0);//交办单位
503 495
                         #endregion
504 496
 
@@ -512,13 +504,11 @@ namespace CallCenterApi.Interface.Controllers.workorder
512 504
                         model.Clcontent = clcont;
513 505
                         model.Files = file;
514 506
                         model.Type = type;
515
-                        model.TypeClass = tslx;
507
+                        //model.TypeClass = tslx;
516 508
                         if (source.Trim() == "1")
517 509
                             model.Source = "手工制单";
518 510
                         else if (source.Trim() == "2")
519 511
                             model.Source = "电话";
520
-                        else if(source.Trim() == "3")
521
-                            model.Source = "微信";
522 512
 
523 513
                         if (type == 1)
524 514
                         {
@@ -529,7 +519,6 @@ namespace CallCenterApi.Interface.Controllers.workorder
529 519
                         model.IsDel = 0;
530 520
                         model.IsReturn = 0;
531 521
                         model.IsReturnBak = 0;
532
-                        //model.ResponDept = zrbm;
533 522
                         model.IsTimeOut = 0;
534 523
                         model.IsUserSend = 0;
535 524
                         model.IsAdminSend = 0;
@@ -545,9 +534,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
545 534
                                 model.InfoType = dicVModel.F_Name;
546 535
                             }
547 536
                         }
548
-                        model.ISReward = isreward;
549
-                        model.RewardAmount = reamount;
550
-                        model.RewardTime = retime;
537
+                        model.ISReward = 0;
538
+                        //model.RewardAmount = reamount;
539
+                        //model.RewardTime = retime;
551 540
                         model.UnitID = unitid;
552 541
                         if (unitid != 0)
553 542
                         {
@@ -612,7 +601,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
612 601
                                 item.LimitTime = to.ItemTime;
613 602
                             }
614 603
 
615
-                            item.Detail = answer;
604
+                            item.Detail = clcont;
616 605
                             item.IsLast = 0;
617 606
                             item.State = 0;
618 607
                             item.IsStart = 0;
@@ -1416,7 +1405,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1416 1405
                     sql += " and datediff(day,CreateTime,'" + strendtime + "')>=0   ";
1417 1406
                 }
1418 1407
 
1419
-                sql = " select WorkOrderID as '工单编号',( case isnull(Type,0) when 1 then '售前咨询' when 2 then '报修服务' when 3 then '投诉建议' else '' end) as '工单类型',"
1408
+                sql = " select WorkOrderID as '工单编号',( case isnull(Type,0) when 1 then '咨询' when 3 then '投诉建议' else '' end) as '工单类型',"
1420 1409
                     + " Detail as '工单内容',Customer as '客户名称',CustomerTel as '客户电话',"
1421 1410
                     + " (case isnull(State,0) when 0 then '未指派' when 1 then '处理中' when 2 then '已完结' else '' end ) as '工单状态',"
1422 1411
                     + " dbo.GetUserName(ResponUser) as '投诉人',CreateUser as '坐席工号',dbo.GetUserName(CreateUser) as '坐席姓名',"
@@ -1513,7 +1502,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1513 1502
                             sql += " and datediff(day,CreateTime,'" + strendtime + "')>=0   ";
1514 1503
                         }
1515 1504
 
1516
-                        sql = " select WorkOrderID as '工单编号',( case isnull(Type,0) when 1 then '售前咨询' when 2 then '报修服务' when 3 then '投诉建议' else '' end) as '工单类型',"
1505
+                        sql = " select WorkOrderID as '工单编号',( case isnull(Type,0) when 1 then '咨询' when 3 then '投诉建议' else '' end) as '工单类型',"
1517 1506
                             + " Detail as '工单内容',Customer as '客户名称',CustomerTel as '客户电话',"
1518 1507
                             + " (case isnull(State,0) when 0 then '未指派' when 1 then '处理中' when 2 then '已完结' else '' end ) as '工单状态',"
1519 1508
                             + " dbo.GetUserName(ResponUser) as '投诉人',CreateUser as '坐席工号',dbo.GetUserName(CreateUser) as '坐席姓名',"
@@ -1952,7 +1941,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1952 1941
         #endregion
1953 1942
 
1954 1943
         #region 奖励记录
1955
-        //获取工单
1944
+        //获取微信提交的工单
1956 1945
         public ActionResult GetAMList()
1957 1946
         {
1958 1947
             ActionResult res = NoToken("未知错误,请重新登录");
@@ -1982,6 +1971,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1982 1971
 
1983 1972
                         sql += " and State = '2' ";
1984 1973
                         sql += " and Type = '3' ";
1974
+                        sql += " and Source = '微信' ";
1985 1975
                         if (strisaudit.Trim() != "" && strisaudit != "undefined")
1986 1976
                         {
1987 1977
                             sql += " and IsAudit =" + strkey.Trim() + " ";

+ 1 - 1
codegit/CallCenterCommon/CallCenter.Utility/FileUp.cs

@@ -127,7 +127,7 @@ namespace CallCenter.Utility
127 127
                 {
128 128
                     Directory.CreateDirectory(savePath);
129 129
                 }
130
-                string File = savePath + fileName + fileType;
130
+                string File = savePath + fileName;//+ fileType;
131 131
                 fileStream = new FileStream(File, FileMode.Create);
132 132
                 m.WriteTo(fileStream);
133 133
             }