Selaa lähdekoodia

文件上传以及工单处理

zhengbingbing 8 vuotta sitten
vanhempi
commit
8f21b299c7

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

289
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
289
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
290
     </Content>
290
     </Content>
291
     <Content Include="Configs\log4net.config" />
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
     <None Include="Properties\PublishProfiles\1q.pubxml" />
295
     <None Include="Properties\PublishProfiles\1q.pubxml" />
294
     <None Include="Properties\PublishProfiles\ddr.pubxml" />
296
     <None Include="Properties\PublishProfiles\ddr.pubxml" />
295
     <None Include="Properties\PublishProfiles\my.pubxml" />
297
     <None Include="Properties\PublishProfiles\my.pubxml" />

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

494
             {
494
             {
495
                 #region 获取参数
495
                 #region 获取参数
496
                 int type = RequestString.GetInt("type", 0);
496
                 int type = RequestString.GetInt("type", 0);
497
-                int tslx = RequestString.GetInt("tslx", 0);
497
+                //int tslx = RequestString.GetInt("tslx", 0);
498
                 string callid = RequestString.GetFormString("callid");
498
                 string callid = RequestString.GetFormString("callid");
499
                 int khid = RequestString.GetInt("khid", 0);
499
                 int khid = RequestString.GetInt("khid", 0);
500
                 string tskh = RequestString.GetFormString("tskh");
500
                 string tskh = RequestString.GetFormString("tskh");
501
                 string tsdh = RequestString.GetFormString("tsdh");
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
                 string cont = RequestString.GetFormString("cont");
504
                 string cont = RequestString.GetFormString("cont");
505
-                string answer = RequestString.GetFormString("answer");
505
+                //string answer = RequestString.GetFormString("answer");
506
                 string clcont = RequestString.GetFormString("clcont");
506
                 string clcont = RequestString.GetFormString("clcont");
507
 
507
 
508
                 int clbm = RequestString.GetInt("clbm", 0);
508
                 int clbm = RequestString.GetInt("clbm", 0);
509
                 int clid = RequestString.GetInt("clid", 0);
509
                 int clid = RequestString.GetInt("clid", 0);
510
                 string source = RequestString.GetFormString("source");
510
                 string source = RequestString.GetFormString("source");
511
-                string address = RequestString.GetFormString("address");
511
+                //string address = RequestString.GetFormString("address");
512
                 #region 新增字段
512
                 #region 新增字段
513
                 int infotypeid = RequestString.GetInt("infotypeid", 0);//信息分类
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
                 int unitid = RequestString.GetInt("unitid", 0);//交办单位
517
                 int unitid = RequestString.GetInt("unitid", 0);//交办单位
518
                 #endregion
518
                 #endregion
519
                 #endregion
519
                 #endregion
541
                         model.Detail = cont;
541
                         model.Detail = cont;
542
                         model.Clcontent = clcont;
542
                         model.Clcontent = clcont;
543
                         model.Type = type;
543
                         model.Type = type;
544
-                        model.TypeClass = tslx;
544
+                        //model.TypeClass = tslx;
545
 
545
 
546
                         if (type == 1)
546
                         if (type == 1)
547
                         {
547
                         {
552
                         model.IsDel = 0;
552
                         model.IsDel = 0;
553
                         model.IsReturn = 0;
553
                         model.IsReturn = 0;
554
                         model.IsReturnBak = 0;
554
                         model.IsReturnBak = 0;
555
-                        model.ResponDept = zrbm;
556
-                        model.Answer = answer;
555
+                        //model.ResponDept = zrbm;
556
+                        //model.Answer = answer;
557
                         model.IsTimeOut = 0;
557
                         model.IsTimeOut = 0;
558
                         model.IsUserSend = 0;
558
                         model.IsUserSend = 0;
559
                         model.IsAdminSend = 0;
559
                         model.IsAdminSend = 0;
574
                                 model.InfoType = dicVModel.F_Name;
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
                         model.UnitID = unitid;
580
                         model.UnitID = unitid;
581
                         if (unitid != 0)
581
                         if (unitid != 0)
582
                         {
582
                         {
588
                         }
588
                         }
589
                         #endregion
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
                         Model.T_Wo_WorkOrderTimeOut to = new BLL.T_Wo_WorkOrderTimeOut().GetModel(type);
597
                         Model.T_Wo_WorkOrderTimeOut to = new BLL.T_Wo_WorkOrderTimeOut().GetModel(type);
597
                         if (to != null)
598
                         if (to != null)
598
                         {
599
                         {
599
                             model.LimitTime = to.MainTime;
600
                             model.LimitTime = to.MainTime;
600
                         }
601
                         }
601
-
602
+                        #endregion
602
                         model.CreateUser = ua.F_UserCode;
603
                         model.CreateUser = ua.F_UserCode;
603
                         model.CreateTime = DateTime.Now;
604
                         model.CreateTime = DateTime.Now;
604
-
605
+                        #region 工单明细
605
                         if (clbm != 0 || clid != 0)
606
                         if (clbm != 0 || clid != 0)
606
                         {
607
                         {
607
                             Model.T_Wo_WorkOrderItem item = new Model.T_Wo_WorkOrderItem();
608
                             Model.T_Wo_WorkOrderItem item = new Model.T_Wo_WorkOrderItem();
640
                                 item.LimitTime = to.ItemTime;
641
                                 item.LimitTime = to.ItemTime;
641
                             }
642
                             }
642
 
643
 
643
-                            item.Detail = answer;
644
+                            item.Detail = clcont;
644
                             item.IsLast = 0;
645
                             item.IsLast = 0;
645
                             item.State = 0;
646
                             item.State = 0;
646
                             item.IsStart = 0;
647
                             item.IsStart = 0;
673
                                 #endregion
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
                         if (new BLL.T_Wo_WorkOrder().Add(model) > 0)
705
                         if (new BLL.T_Wo_WorkOrder().Add(model) > 0)
678
                         {
706
                         {
679
                             if (!string.IsNullOrEmpty(callid))
707
                             if (!string.IsNullOrEmpty(callid))

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

11
 using System.Web;
11
 using System.Web;
12
 using System.Web.Mvc;
12
 using System.Web.Mvc;
13
 using System.Transactions;
13
 using System.Transactions;
14
+using System.IO;
14
 
15
 
15
 namespace CallCenterApi.Interface.Controllers.weixin
16
 namespace CallCenterApi.Interface.Controllers.weixin
16
 {
17
 {
205
             string cusphone = RequestString.GetFormString("cusphone");//GetFormString
206
             string cusphone = RequestString.GetFormString("cusphone");//GetFormString
206
 
207
 
207
             string content = RequestString.GetFormString("content");
208
             string content = RequestString.GetFormString("content");
208
-            //string files = RequestString.GetFormString("files");
209
+            string files = RequestString.GetFormString("files");
209
             int type = RequestString.GetInt("type", 3);//默认为3投诉建议
210
             int type = RequestString.GetInt("type", 3);//默认为3投诉建议
210
             
211
             
211
             string stropenid = HttpUtility.UrlDecode(RequestString.GetFormString("openid"));
212
             string stropenid = HttpUtility.UrlDecode(RequestString.GetFormString("openid"));
212
             var wxuser = new BLL.T_Sys_Users().GetModelList(" F_OpenId='" + stropenid.Trim() + "'  and F_Type=1 ").FirstOrDefault();
213
             var wxuser = new BLL.T_Sys_Users().GetModelList(" F_OpenId='" + stropenid.Trim() + "'  and F_Type=1 ").FirstOrDefault();
213
             string fileids = "";
214
             string fileids = "";
214
             #region 上传附件
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
             #endregion
240
             #endregion
240
 
241
 
241
             workorder.WorkOrderController wo = new workorder.WorkOrderController();
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
             if (string.IsNullOrEmpty(workorderid))
244
             if (string.IsNullOrEmpty(workorderid))
244
             {
245
             {
245
                 return Error("新增失败");
246
                 return Error("新增失败");
259
         ///  获取工单详情
260
         ///  获取工单详情
260
         /// </summary>
261
         /// </summary>
261
         /// <returns></returns>
262
         /// <returns></returns>
262
-        //[WechatActionFilter]
263
+        [WechatActionFilter]
263
         public ActionResult GetWorkOrder()
264
         public ActionResult GetWorkOrder()
264
         {
265
         {
265
             string strworkorderid = HttpUtility.UrlDecode(RequestString.GetQueryString("workorderid"));
266
             string strworkorderid = HttpUtility.UrlDecode(RequestString.GetQueryString("workorderid"));
270
 
271
 
271
             if (tbu.Rows.Count > 0)
272
             if (tbu.Rows.Count > 0)
272
             {
273
             {
273
-                string sql = "select * "
274
+                string sql = "select *,dbo.GetUserName(CreateUser) as CreateUserName "
274
                     + " from T_Wo_WorkOrder where id =" + strworkorderid + " ";
275
                     + " from T_Wo_WorkOrder where id =" + strworkorderid + " ";
275
                 var dt = DbHelperSQL.Query(sql).Tables[0];
276
                 var dt = DbHelperSQL.Query(sql).Tables[0];
276
                 if (dt.Rows.Count > 0)
277
                 if (dt.Rows.Count > 0)
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
         #endregion
333
         #endregion
375
 
334
 
376
         #region 获取下拉框
335
         #region 获取下拉框
479
             }
438
             }
480
             return dt;
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
         #endregion
515
         #endregion
483
     }
516
     }
484
 }
517
 }

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

473
                     if (ua != null)
473
                     if (ua != null)
474
                     {
474
                     {
475
                         int type = RequestString.GetInt("type", 0);
475
                         int type = RequestString.GetInt("type", 0);
476
-                        int tslx = RequestString.GetInt("tslx", 0);
476
+                        //int tslx = RequestString.GetInt("tslx", 0);
477
                         string callid = RequestString.GetFormString("callid");
477
                         string callid = RequestString.GetFormString("callid");
478
                         int khid = RequestString.GetInt("khid", 0);
478
                         int khid = RequestString.GetInt("khid", 0);
479
                         string tskh = RequestString.GetFormString("tskh");
479
                         string tskh = RequestString.GetFormString("tskh");
485
                             return res;
485
                             return res;
486
                         }
486
                         }
487
                         #endregion
487
                         #endregion
488
-                        //int zrbm = RequestString.GetInt("zrbm", 0);
489
-                        //int zrid = RequestString.GetInt("zrid", 0);
490
                         string cont = RequestString.GetFormString("cont");
488
                         string cont = RequestString.GetFormString("cont");
491
                         string clcont = RequestString.GetFormString("clcont");
489
                         string clcont = RequestString.GetFormString("clcont");
492
                         string file = RequestString.GetFormString("file");
490
                         string file = RequestString.GetFormString("file");
493
-                        string answer = RequestString.GetFormString("answer");
494
                         string source = RequestString.GetFormString("source");
491
                         string source = RequestString.GetFormString("source");
495
-                        string address = RequestString.GetFormString("address");
496
-
497
                         #region 新增字段
492
                         #region 新增字段
498
                         int infotypeid = RequestString.GetInt("infotypeid", 0);//信息分类
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
                         int unitid = RequestString.GetInt("unitid", 0);//交办单位
494
                         int unitid = RequestString.GetInt("unitid", 0);//交办单位
503
                         #endregion
495
                         #endregion
504
 
496
 
512
                         model.Clcontent = clcont;
504
                         model.Clcontent = clcont;
513
                         model.Files = file;
505
                         model.Files = file;
514
                         model.Type = type;
506
                         model.Type = type;
515
-                        model.TypeClass = tslx;
507
+                        //model.TypeClass = tslx;
516
                         if (source.Trim() == "1")
508
                         if (source.Trim() == "1")
517
                             model.Source = "手工制单";
509
                             model.Source = "手工制单";
518
                         else if (source.Trim() == "2")
510
                         else if (source.Trim() == "2")
519
                             model.Source = "电话";
511
                             model.Source = "电话";
520
-                        else if(source.Trim() == "3")
521
-                            model.Source = "微信";
522
 
512
 
523
                         if (type == 1)
513
                         if (type == 1)
524
                         {
514
                         {
529
                         model.IsDel = 0;
519
                         model.IsDel = 0;
530
                         model.IsReturn = 0;
520
                         model.IsReturn = 0;
531
                         model.IsReturnBak = 0;
521
                         model.IsReturnBak = 0;
532
-                        //model.ResponDept = zrbm;
533
                         model.IsTimeOut = 0;
522
                         model.IsTimeOut = 0;
534
                         model.IsUserSend = 0;
523
                         model.IsUserSend = 0;
535
                         model.IsAdminSend = 0;
524
                         model.IsAdminSend = 0;
545
                                 model.InfoType = dicVModel.F_Name;
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
                         model.UnitID = unitid;
540
                         model.UnitID = unitid;
552
                         if (unitid != 0)
541
                         if (unitid != 0)
553
                         {
542
                         {
612
                                 item.LimitTime = to.ItemTime;
601
                                 item.LimitTime = to.ItemTime;
613
                             }
602
                             }
614
 
603
 
615
-                            item.Detail = answer;
604
+                            item.Detail = clcont;
616
                             item.IsLast = 0;
605
                             item.IsLast = 0;
617
                             item.State = 0;
606
                             item.State = 0;
618
                             item.IsStart = 0;
607
                             item.IsStart = 0;
1416
                     sql += " and datediff(day,CreateTime,'" + strendtime + "')>=0   ";
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
                     + " Detail as '工单内容',Customer as '客户名称',CustomerTel as '客户电话',"
1409
                     + " Detail as '工单内容',Customer as '客户名称',CustomerTel as '客户电话',"
1421
                     + " (case isnull(State,0) when 0 then '未指派' when 1 then '处理中' when 2 then '已完结' else '' end ) as '工单状态',"
1410
                     + " (case isnull(State,0) when 0 then '未指派' when 1 then '处理中' when 2 then '已完结' else '' end ) as '工单状态',"
1422
                     + " dbo.GetUserName(ResponUser) as '投诉人',CreateUser as '坐席工号',dbo.GetUserName(CreateUser) as '坐席姓名',"
1411
                     + " dbo.GetUserName(ResponUser) as '投诉人',CreateUser as '坐席工号',dbo.GetUserName(CreateUser) as '坐席姓名',"
1513
                             sql += " and datediff(day,CreateTime,'" + strendtime + "')>=0   ";
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
                             + " Detail as '工单内容',Customer as '客户名称',CustomerTel as '客户电话',"
1506
                             + " Detail as '工单内容',Customer as '客户名称',CustomerTel as '客户电话',"
1518
                             + " (case isnull(State,0) when 0 then '未指派' when 1 then '处理中' when 2 then '已完结' else '' end ) as '工单状态',"
1507
                             + " (case isnull(State,0) when 0 then '未指派' when 1 then '处理中' when 2 then '已完结' else '' end ) as '工单状态',"
1519
                             + " dbo.GetUserName(ResponUser) as '投诉人',CreateUser as '坐席工号',dbo.GetUserName(CreateUser) as '坐席姓名',"
1508
                             + " dbo.GetUserName(ResponUser) as '投诉人',CreateUser as '坐席工号',dbo.GetUserName(CreateUser) as '坐席姓名',"
1952
         #endregion
1941
         #endregion
1953
 
1942
 
1954
         #region 奖励记录
1943
         #region 奖励记录
1955
-        //获取工单
1944
+        //获取微信提交的工单
1956
         public ActionResult GetAMList()
1945
         public ActionResult GetAMList()
1957
         {
1946
         {
1958
             ActionResult res = NoToken("未知错误,请重新登录");
1947
             ActionResult res = NoToken("未知错误,请重新登录");
1982
 
1971
 
1983
                         sql += " and State = '2' ";
1972
                         sql += " and State = '2' ";
1984
                         sql += " and Type = '3' ";
1973
                         sql += " and Type = '3' ";
1974
+                        sql += " and Source = '微信' ";
1985
                         if (strisaudit.Trim() != "" && strisaudit != "undefined")
1975
                         if (strisaudit.Trim() != "" && strisaudit != "undefined")
1986
                         {
1976
                         {
1987
                             sql += " and IsAudit =" + strkey.Trim() + " ";
1977
                             sql += " and IsAudit =" + strkey.Trim() + " ";

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

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