Przeglądaj źródła

工单和外呼报表调整

zhengbingbing 7 lat temu
rodzic
commit
973e88cdde

+ 3 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/CallOutReportController.cs

@@ -207,7 +207,7 @@ namespace CallCenterApi.Interface.Controllers.report
207 207
                     dr["xiangzhen"] = itemconf.F_Name;
208 208
                     //根据乡镇获取总数
209 209
                     //int totalnum= otnBLL.GetRecordCount(" DATEDIFF(day,ExpandDatField1,'" + sdate + "')<=0 and DATEDIFF(day,ExpandDatField1,'" + edate + "')>=0 and ExpandIntField1='" + itemconf.F_DictionaryValueId+"' ");
210
-                    int totalnum = ansBLL.GetRecordCount("  F_OptOn between '" + sdate + "' and '" + edate + "' and F_Answer='" + itemconf.F_Name + "' ");
210
+                    int totalnum = ansBLL.GetRecordCount(" DATEDIFF(day,F_OptOn,'" + sdate + "')<=0 and DATEDIFF(day,F_OptOn,'" + edate + "')>=0 and F_Answer='" + itemconf.F_Name + "' ");
211 211
 
212 212
                     leiji += totalnum;
213 213
                     dr["zongshu"] = totalnum;
@@ -252,7 +252,8 @@ namespace CallCenterApi.Interface.Controllers.report
252 252
                     DataRow dr = dtnew.NewRow();
253 253
                     dr["xiangzhen"] = itemconf.F_Name;
254 254
                     //根据乡镇获取总数
255
-                    int totalnum = otnBLL.GetRecordCount(" DATEDIFF(day,ExpandDatField1,'" + sdate + "')<=0 and DATEDIFF(day,ExpandDatField1,'" + edate + "')>=0 and ExpandIntField1='" + itemconf.F_DictionaryValueId + "' ");
255
+                    //int totalnum = otnBLL.GetRecordCount(" DATEDIFF(day,ExpandDatField1,'" + sdate + "')<=0 and DATEDIFF(day,ExpandDatField1,'" + edate + "')>=0 and ExpandIntField1='" + itemconf.F_DictionaryValueId + "' ");
256
+                    int totalnum = ansBLL.GetRecordCount(" DATEDIFF(day,F_OptOn,'" + sdate + "')<=0 and DATEDIFF(day,F_OptOn,'" + edate + "')>=0 and F_Answer='" + itemconf.F_Name + "' ");
256 257
 
257 258
                     leiji += totalnum;
258 259
                     dr["zongshu"] = totalnum;

+ 83 - 78
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallInScreenController.cs

@@ -519,9 +519,11 @@ namespace CallCenterApi.Interface.Controllers.tel
519 519
         /// 创建工单
520 520
         /// </summary>
521 521
         /// <returns></returns>
522
-        public ActionResult AddWorkOrder(string callid, int khid, string source, string file
522
+        public ActionResult AddWorkOrder(string callid, string source, string file
523 523
             , string customer, string custel, string country, string address, string inqtime, string inquser
524
-           , string detail, string cont, string answer, string remark, int infotypeid = 0, int unitid = 0, int clbm = 0, int clid = 0)
524
+           , string detail, string cont, string answer, string remark
525
+            , string infotype, string unit, string clbm, string clr, int khid = 0)
526
+            //, int infotypeid = 0, int unitid = 0, int clbm = 0, int clid = 0)
525 527
         {
526 528
             ActionResult res = NoToken("未知错误,请重新登录");
527 529
             if (Request.IsAuthenticated)
@@ -558,24 +560,27 @@ namespace CallCenterApi.Interface.Controllers.tel
558 560
                             model.Remark = remark;
559 561
                         #endregion
560 562
                         #region 信息分类和交办单位
561
-                        model.InfoTypeID = infotypeid;
562
-                        if (infotypeid != 0)
563
-                        {
564
-                            Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(infotypeid);
565
-                            if (dicVModel != null)
566
-                            {
567
-                                model.InfoType = dicVModel.F_Name;
568
-                            }
569
-                        }
570
-                        model.UnitID = unitid;
571
-                        if (unitid != 0)
572
-                        {
573
-                            Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(unitid);
574
-                            if (dicVModel != null)
575
-                            {
576
-                                model.Unit = dicVModel.F_Name;
577
-                            }
578
-                        }
563
+                        model.InfoType = infotype;
564
+                        model.Unit = unit;
565
+                        //20180518 zhengbingbing 不传ID调整为只有文字
566
+                        //model.InfoTypeID = infotypeid;
567
+                        //if (infotypeid != 0)
568
+                        //{
569
+                        //    Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(infotypeid);
570
+                        //    if (dicVModel != null)
571
+                        //    {
572
+                        //        model.InfoType = dicVModel.F_Name;
573
+                        //    }
574
+                        //}
575
+                        //model.UnitID = unitid;
576
+                        //if (unitid != 0)
577
+                        //{
578
+                        //    Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(unitid);
579
+                        //    if (dicVModel != null)
580
+                        //    {
581
+                        //        model.Unit = dicVModel.F_Name;
582
+                        //    }
583
+                        //}
579 584
                         #endregion
580 585
                         if (source.Trim() == "1")
581 586
                             model.Source = "手工制单";
@@ -597,66 +602,66 @@ namespace CallCenterApi.Interface.Controllers.tel
597 602
                         #endregion
598 603
                         
599 604
                         #region 工单明细
600
-                        if (clbm != 0 || clid != 0)
601
-                        {
602
-                            Model.T_Wo_WorkOrderItem item = new Model.T_Wo_WorkOrderItem();
603
-                            item.WorkOrderID = model.WorkOrderID;
604
-                            item.ToDept = clbm;
605
-                            item.Type = 1;
606
-
607
-                            if (clid != 0)
608
-                            {
609
-                                Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModel(clid);
610
-                                if (clus != null)
611
-                                {
612
-                                    item.ToUser = clus.F_UserCode;
613
-                                }
614
-                            }
615
-                            else
616
-                            {
617
-                                string users = string.Empty;
618
-                                var list = new BLL.T_Sys_UserAccount().GetModelList(" F_DeptId='" + clbm + "'");
619
-                                foreach (var l in list)
620
-                                {
621
-                                    if (string.IsNullOrEmpty(users))
622
-                                    {
623
-                                        users = l.F_UserCode;
624
-                                    }
625
-                                    else
626
-                                    {
627
-                                        users = users + "," + l.F_UserCode;
628
-                                    }
629
-                                }
630
-                                item.ToUser = users;
631
-                            }
605
+                        //if (clbm != 0 || clid != 0)
606
+                        //{
607
+                        //    Model.T_Wo_WorkOrderItem item = new Model.T_Wo_WorkOrderItem();
608
+                        //    item.WorkOrderID = model.WorkOrderID;
609
+                        //    item.ToDept = clbm;
610
+                        //    item.Type = 1;
611
+
612
+                        //    if (clid != 0)
613
+                        //    {
614
+                        //        Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModel(clid);
615
+                        //        if (clus != null)
616
+                        //        {
617
+                        //            item.ToUser = clus.F_UserCode;
618
+                        //        }
619
+                        //    }
620
+                        //    else
621
+                        //    {
622
+                        //        string users = string.Empty;
623
+                        //        var list = new BLL.T_Sys_UserAccount().GetModelList(" F_DeptId='" + clbm + "'");
624
+                        //        foreach (var l in list)
625
+                        //        {
626
+                        //            if (string.IsNullOrEmpty(users))
627
+                        //            {
628
+                        //                users = l.F_UserCode;
629
+                        //            }
630
+                        //            else
631
+                        //            {
632
+                        //                users = users + "," + l.F_UserCode;
633
+                        //            }
634
+                        //        }
635
+                        //        item.ToUser = users;
636
+                        //    }
632 637
                             
633
-                            if (item.ToUser != "")
634
-                            {
635
-                                item.SureUser = ua.F_UserCode;
636
-                                item.State = 1;
637
-                                item.SureTime = DateTime.Now;
638
-                                item.IsStart = 1;
639
-                            }
640
-                            else
641
-                            {
642
-                                item.State = 0;
643
-                                item.IsStart = 0;
644
-                            }
645
-                            item.Detail = model.Detail;
646
-                            item.IsLast = 0;
647
-                            item.IsTimeOut = 0;
648
-                            item.IsDel = 0;
649
-                            item.CreateUser = ua.F_UserCode;
650
-                            item.CreateTime = DateTime.Now;
651
-
652
-                            long itemid = new BLL.T_Wo_WorkOrderItem().Add(item);
653
-                            if (itemid > 0)
654
-                            {
655
-                                model.State = 1;//已指派
656
-                                model.AppointTime = DateTime.Now;
638
+                        //    if (item.ToUser != "")
639
+                        //    {
640
+                        //        item.SureUser = ua.F_UserCode;
641
+                        //        item.State = 1;
642
+                        //        item.SureTime = DateTime.Now;
643
+                        //        item.IsStart = 1;
644
+                        //    }
645
+                        //    else
646
+                        //    {
647
+                        //        item.State = 0;
648
+                        //        item.IsStart = 0;
649
+                        //    }
650
+                        //    item.Detail = model.Detail;
651
+                        //    item.IsLast = 0;
652
+                        //    item.IsTimeOut = 0;
653
+                        //    item.IsDel = 0;
654
+                        //    item.CreateUser = ua.F_UserCode;
655
+                        //    item.CreateTime = DateTime.Now;
656
+
657
+                        //    long itemid = new BLL.T_Wo_WorkOrderItem().Add(item);
658
+                        //    if (itemid > 0)
659
+                        //    {
660
+                        //        model.State = 1;//已指派
661
+                        //        model.AppointTime = DateTime.Now;
657 662
                                 
658
-                            }
659
-                        }
663
+                        //    }
664
+                        //}
660 665
                         #endregion
661 666
                         #region 插入操作记录
662 667
                         Model.T_Wo_Operation oper = new Model.T_Wo_Operation();

+ 4 - 12
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -416,19 +416,11 @@ namespace CallCenterApi.Interface.Controllers.weixin
416 416
         /// </summary>
417 417
         /// <returns></returns>
418 418
         [WechatActionFilter]
419
-        public ActionResult AddPagers()
419
+        public ActionResult AddPagers(string openid, string[] ans, string cusname,
420
+            string telphone,string phone,string countryid,string address)
420 421
         {
421
-            string stropenid = HttpUtility.UrlDecode(RequestString.GetQueryString("openid"));
422
-            string[] ans ={ "",""};
423
-
424
-            string name = HttpUtility.UrlDecode(RequestString.GetFormString("cusname"));
425
-            string telphone = RequestString.GetFormString("telphone");
426
-            string phone = RequestString.GetFormString("phone");
427
-            string countryid = HttpUtility.UrlDecode(RequestString.GetFormString("countryid"));
428
-            string address = HttpUtility.UrlDecode(RequestString.GetFormString("address"));
429
-            
430
-            var wxuser = new BLL.T_Sys_Users().GetModelList(" F_OpenId='" + stropenid.Trim() + "'  and F_Type=1 ").FirstOrDefault();
431
-            bool res = new callout.PagerAnswerWXController().AnswersWX(telphone, stropenid, ans, name, phone, int.Parse(countryid), address);
422
+            var wxuser = new BLL.T_Sys_Users().GetModelList(" F_OpenId='" + openid + "'  and F_Type=1 ").FirstOrDefault();
423
+            bool res = new callout.PagerAnswerWXController().AnswersWX(telphone, openid, ans, cusname, phone, int.Parse(countryid), address);
432 424
 
433 425
             if (res)
434 426
             {