zhengbingbing лет назад: 6
Родитель
Сommit
8b32b7e32f

BIN
codegit/.vs/SanYuanCWCallCenter/v14/.suo


+ 2 - 1
codegit/CallCenterApi/CallCenterAPI.WechatSDK/WxHelper.cs

@@ -318,10 +318,11 @@ namespace CallCenterAPI.WechatSDK
318 318
             //var result = TemplateApi.SendTemplateMessageAsync(AppId, openid, templateid, url, jsondata.ToJObject());
319 319
             SendTemplateMessageResult sendResult = TemplateApi.SendTemplateMessage(AppId, openid, templateid, url, jsondata);
320 320
 
321
+            //return AppId + "||||" + openid + "||||" + templateid + "||||" + url + "||||" ;
321 322
             object result = sendResult;
322 323
 
323 324
             return result;
324
-            //return AppId + "||||" + openid + "||||" + templateid + "||||" + url + "||||" + ddd;
325
+            
325 326
         }
326 327
         #endregion
327 328
     }

+ 22 - 15
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs

@@ -457,6 +457,13 @@ namespace CallCenterApi.Interface.Controllers
457 457
         public ActionResult GetDeptUserList(int deptid = 0)
458 458
         {
459 459
             List<Model.T_Sys_UserAccount> DeptUserList = sysUserAccountBll.GetModelList(" 1=1 and F_DeptId=" + deptid + " order by f_userid desc ");
460
+            var rolelist = new BLL.T_Sys_RoleInfo().GetModelList("").ToList();
461
+            foreach (var item in DeptUserList)
462
+            {
463
+                var roleinfo = rolelist.Where(r => r.F_RoleId == item.F_RoleId).FirstOrDefault();
464
+                if (roleinfo != null)
465
+                    item.F_UserCode = item.F_UserCode + "-" + roleinfo.F_RoleName;
466
+            }
460 467
             return Success("列表加载成功", DeptUserList);
461 468
 
462 469
         }
@@ -489,21 +496,21 @@ namespace CallCenterApi.Interface.Controllers
489 496
                         //1--接待部
490 497
                         usertype = 1;
491 498
                     }
492
-                    else if (modelDep.F_Type == 2)
493
-                    {
494
-                        //2--办理人员
495
-                        usertype = 2;
496
-                    }
497
-                    else if (modelDep.F_Type == 3)
498
-                    {
499
-                        //3--区域客服
500
-                        usertype = 3;
501
-                    }
502
-                    else if (modelDep.F_Type == 4)
503
-                    {
504
-                        //4--监管
505
-                        usertype = 4;
506
-                    }
499
+                    //else if (modelDep.F_Type == 2)
500
+                    //{
501
+                    //    //2--办理人员
502
+                    //    usertype = 2;
503
+                    //}
504
+                    //else if (modelDep.F_Type == 3)
505
+                    //{
506
+                    //    //3--区域客服
507
+                    //    usertype = 3;
508
+                    //}
509
+                    //else if (modelDep.F_Type == 4)
510
+                    //{
511
+                    //    //4--监管
512
+                    //    usertype = 4;
513
+                    //}
507 514
                     else
508 515
                     {
509 516
                         usertype = 0;

+ 4 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallInScreenController.cs

@@ -556,6 +556,8 @@ namespace CallCenterApi.Interface.Controllers.tel
556 556
                         int customerid = RequestString.GetFormInt("customerid", 0);
557 557
                         //客户姓名
558 558
                         string callCustomer = RequestString.GetFormString("callCustomer");
559
+                        //公司名称
560
+                        string company = RequestString.GetFormString("company");
559 561
                         //联系电话
560 562
                         string tel = RequestString.GetFormString("tel");
561 563
                         //受理人 - 审核人工号
@@ -590,7 +592,7 @@ namespace CallCenterApi.Interface.Controllers.tel
590 592
                         model.Customer = callCustomer;  //客户姓名
591 593
                         model.CustomerTel = tel;        //联系电话  
592 594
                         model.CustomerID = customerid;  //用户档案Id
593
-                        
595
+                        model.County = company;//公司名称
594 596
                         model.IsAudit = 1;     //是否需要审核(0未审核,1已审核)pc端默认审核,微信端默认为审核
595 597
                         model.IsEffective = iseffective;
596 598
                         if (iseffective == 1)
@@ -706,7 +708,7 @@ namespace CallCenterApi.Interface.Controllers.tel
706 708
                                                         wotype = dicv.F_Name;
707 709
                                                         content = "客户" + model.Customer + "提出的工单已派单,请及时处理";
708 710
                                                     }
709
-                                                    WxHelper.SendWechatMsg1(model.WorkOrderID, "你有新的工单需要处理", wotype, content, "", orderid.ToString(), modelUser2.F_WxOpenId);
711
+                                                    WxHelper.SendWechatMsg1(model.WorkOrderID, "你有新的工单需要处理", wotype, content, orderid.ToString(), modelUser2.F_WxOpenId);
710 712
                                                 }
711 713
                                             }
712 714
                                         }

+ 120 - 57
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -690,24 +690,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
690 690
             var ua = userAccountBLL.GetModelList(" F_WxOpenId='" + stropenid + "'").FirstOrDefault();
691 691
             //获取客户档案(业主)表信息
692 692
             var modelCustomer = customerBaseBLL.GetModelList(" F_WxOpenId='" + stropenid.Trim() + "'").FirstOrDefault();
693
-            #region 权限限制      
694
-            int customerid = 0;
695
-
696
-            if (ua != null)
697
-            {
698
-                sql += " and (CreateUser= '" + ua.F_UserCode + "' or WorkOrderID in ( '" + wo.GetCYWorkOrderID(ua.F_UserCode) + "')) ";
699
-            }
700
-            else if (modelCustomer != null)
701
-            {
702
-                customerid = modelCustomer.F_CustomerId;
703
-                sql += " and CustomerID=" + customerid;
704
-            }
705
-            else
706
-            {
707
-                sql = "";
708
-            }
709
-            #endregion
710
-
693
+            
711 694
             if (!string.IsNullOrEmpty(sql))
712 695
             {
713 696
                 sql += " and IsDel=0 ";
@@ -719,37 +702,49 @@ namespace CallCenterApi.Interface.Controllers.weixin
719 702
 
720 703
                 if (states >= 0)
721 704
                 {
722
-                    string uwhere = " ";
723
-                    switch (states)
705
+                    #region 权限限制  
706
+                    if (ua != null)
724 707
                     {
725
-                        case 0://待指派的
726
-                                 //sql += " and State ='0' and CreateUser= '" + ua.F_UserCode + "' ";
727
-                                 //3区域客服可以看到区域待指派工单
728
-                            if (ua.F_RoleId != 17)
729
-                            {
730
-                                uwhere += " and CreateUser='" + ua.F_UserCode + "' ";
731
-                            }
732
-                            sql += " and State =0 " + uwhere;
733
-                            break;
734
-                        case 1://待接单的
735
-                            sql += " and State =1 and WorkOrderID in ( '" + wo.GetDJDWorkOrderID(ua.F_UserCode) + "') ";
736
-                            break;
737
-                        case 2://待完成的(待处理)
738
-                            sql += " and State =1 and WorkOrderID in ( '" + wo.GetDWCWorkOrderID(ua.F_UserCode) + "') ";
739
-                            break;
740
-                        case 3://已完成的
741
-                            sql += " and State =2 and LastDealUser = '" + ua.F_UserCode + "' ";
742
-                            break;
743
-                        case 4://我参与的
744
-                            sql += " and (CreateUser= '" + ua.F_UserCode + "' or WorkOrderID in ( '" + wo.GetCYWorkOrderID(ua.F_UserCode) + "')) ";
745
-                            break;
746
-                        case 5://超期工单 - 设置两个月的处理时效,两个月内未解决的工单都直接汇总到这里
747
-                            sql += $" and DATEADD(DAY,{days},CreateTime) < GETDATE() AND State < 2 ";
748
-                            break;
708
+                        string uwhere = " ";
709
+                        switch (states)
710
+                        {
711
+                            case 0://待指派的
712
+                                   //sql += " and State ='0' and CreateUser= '" + ua.F_UserCode + "' ";
713
+                                   //3区域客服可以看到区域待指派工单
714
+                                if (ua.F_RoleId != 17)
715
+                                {
716
+                                    uwhere += " and CreateUser='" + ua.F_UserCode + "' ";
717
+                                }
718
+                                sql += " and State =0 " + uwhere;
719
+                                break;
720
+                            case 1://待接单的
721
+                                sql += " and State =1 and WorkOrderID in ( '" + wo.GetDJDWorkOrderID(ua.F_UserCode) + "') ";
722
+                                break;
723
+                            case 2://待完成的(待处理)
724
+                                sql += " and State =1 and WorkOrderID in ( '" + wo.GetDWCWorkOrderID(ua.F_UserCode) + "') ";
725
+                                break;
726
+                            case 3://已完成的
727
+                                sql += " and State =2 and LastDealUser = '" + ua.F_UserCode + "' ";
728
+                                break;
729
+                            case 4://我参与的
730
+                                sql += " and (CreateUser= '" + ua.F_UserCode + "' or WorkOrderID in ( '" + wo.GetCYWorkOrderID(ua.F_UserCode) + "')) ";
731
+                                break;
732
+                            case 5://超期工单 - 设置两个月的处理时效,两个月内未解决的工单都直接汇总到这里
733
+                                sql += $" and DATEADD(DAY,{days},CreateTime) < GETDATE() AND State < 2 ";
734
+                                break;
735
+                        }
749 736
                     }
750
-                    //sql += " and State = " + states + " ";
737
+                    else if (modelCustomer != null)
738
+                    {
739
+                        sql += " and CustomerID=" + modelCustomer.F_CustomerId;
740
+                    }
741
+                    else
742
+                    {
743
+                        sql = "";
744
+                    }
745
+                    #endregion
751 746
                 }
752
-                
747
+
753 748
                 if (strstarttime.Trim() != "" && strstarttime != "undefined")
754 749
                 {
755 750
                     sql += " and datediff(day,CreateTime,'" + strstarttime + "')<=0 ";
@@ -773,7 +768,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
773 768
                     "WorkOrderID",
774 769
                     cols,
775 770
                     sql,
776
-                    "ORDER BY CreateTime DESC",
771
+                    "ORDER BY CreateTime DESC,State asc",
777 772
                     pagesize,
778 773
                     pageindex,
779 774
                     true,
@@ -837,6 +832,74 @@ namespace CallCenterApi.Interface.Controllers.weixin
837 832
             }
838 833
             return Error("查询失败");
839 834
         }
835
+        
836
+        /// <summary>
837
+        ///  处理工单
838
+        /// </summary>
839
+        /// <returns></returns>
840
+        [WechatActionFilter]
841
+        public ActionResult DealWorkOrder()
842
+        {
843
+            DataTable dt = new DataTable();
844
+            string orderid = RequestString.GetFormString("orderid");
845
+            int isend = RequestString.GetInt("isend", 0);   //处理方式 1结束  0转派
846
+            //int ltype = RequestString.GetInt("ltype", 0);   //处理方式 1结束  0转派
847
+            int clbm = RequestString.GetInt("clbm", 0);     //部门id
848
+            int clid = RequestString.GetInt("clid", 0);     //用户接收人id                         
849
+            string cont = RequestString.GetFormString("cont");  //处理内容
850
+            //string detail = RequestString.GetFormString("detail");
851
+
852
+            string stropenid = HttpUtility.UrlDecode(RequestString.GetFormString("openid"));
853
+
854
+            workorder.WorkOrderController wo = new workorder.WorkOrderController();
855
+            bool res = wo.DealWXWorkOrder(orderid, isend, clbm, clid, cont, stropenid);
856
+
857
+            if (res)
858
+            {
859
+                return Success("操作成功");
860
+            }
861
+            else
862
+            {
863
+                return Error("操作失败");
864
+            }
865
+        }
866
+
867
+        /// <summary>
868
+        /// 接单 - 确认工单
869
+        /// </summary>
870
+        /// <returns></returns>
871
+        [WechatActionFilter]
872
+        public ActionResult SureWorkOrder()
873
+        {
874
+            string stropenid = HttpUtility.UrlDecode(RequestString.GetFormString("openid"));
875
+            string orderid = RequestString.GetFormString("orderid");
876
+            if (!string.IsNullOrEmpty(stropenid))
877
+            {
878
+                var ua = new BLL.T_Sys_UserAccount().GetModelList(" F_WxOpenId='" + stropenid + "'").FirstOrDefault();
879
+                if (ua != null)
880
+                {
881
+                    Model.T_Wo_WorkOrder model = new BLL.T_Wo_WorkOrder().GetModelList(" WorkOrderID='" + orderid + "'").FirstOrDefault();
882
+                    if (model != null)
883
+                    {
884
+                        Model.T_Wo_WorkOrderItem item = new BLL.T_Wo_WorkOrderItem().GetModelList(" WorkOrderID='" + orderid + "' and isdel=0 and Type=1 ").OrderByDescending(p => p.CreateTime).FirstOrDefault();
885
+                        if (item != null && item.State == 0 && ("," + item.ToUser + ",").Contains("," + ua.F_UserCode + ","))
886
+                        {
887
+                            item.SureUser = ua.F_UserCode;
888
+                            item.State = 1;
889
+                            item.SureTime = DateTime.Now;
890
+                            if (new BLL.T_Wo_WorkOrderItem().Update(item))
891
+                            {
892
+                                return Success("接单成功!");
893
+                            }
894
+                        }
895
+                        return Error("操作失败,工单还没有派单!");
896
+                    }
897
+                }
898
+                return Error("操作失败");
899
+            }
900
+            return Error("参数错误");
901
+        }
902
+
840 903
         #endregion
841 904
 
842 905
         #region 微信工单
@@ -1284,12 +1347,12 @@ namespace CallCenterApi.Interface.Controllers.weixin
1284 1347
         //    string callCustomer = RequestString.GetFormString("callCustomer");
1285 1348
         //    //联系电话
1286 1349
         //    string tel = RequestString.GetFormString("tel");
1287
-           
1350
+
1288 1351
         //    //处理部门
1289 1352
         //    string fkdep = RequestString.GetFormString("fkdep");
1290 1353
         //    //客服类类型
1291 1354
         //    string kfdepid = RequestString.GetFormString("kfdepid");
1292
-            
1355
+
1293 1356
         //    //受理人 - 审核人工号
1294 1357
         //    string auditusercode = RequestString.GetFormString("auditusercode");
1295 1358
         //    //工单状态
@@ -1298,7 +1361,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
1298 1361
         //    string fkcont = RequestString.GetFormString("fkcont");
1299 1362
         //    string callid = HttpUtility.UrlDecode(RequestString.GetFormString("callid"));
1300 1363
         //    string files = RequestString.GetFormString("files");
1301
-           
1364
+
1302 1365
         //    //咨询类工单指派部门
1303 1366
         //    int clbm = RequestString.GetFormInt("clbm", 0);
1304 1367
         //    //备注
@@ -1373,21 +1436,21 @@ namespace CallCenterApi.Interface.Controllers.weixin
1373 1436
         //    string callCustomer = RequestString.GetFormString("callCustomer");
1374 1437
         //    //联系电话
1375 1438
         //    string tel = RequestString.GetFormString("tel");
1376
-           
1439
+
1377 1440
         //    //处理部门
1378 1441
         //    string fkdep = RequestString.GetFormString("fkdep");
1379 1442
         //    //客服类类型
1380 1443
         //    string kfdepid = RequestString.GetFormString("kfdepid");
1381
-           
1444
+
1382 1445
         //    //受理人 - 审核人工号
1383 1446
         //    string auditusercode = RequestString.GetFormString("auditusercode");
1384 1447
         //    //接待描述 - 反馈内容
1385 1448
         //    string fkcont = RequestString.GetFormString("fkcont");
1386 1449
         //    string files = RequestString.GetFormString("files");
1387
-            
1450
+
1388 1451
         //    //备注
1389 1452
         //    string note = RequestString.GetFormString("note");
1390
-   
1453
+
1391 1454
         //    string stropenid = HttpUtility.UrlDecode(RequestString.GetFormString("openid"));
1392 1455
         //    //var wxuser = new BLL.T_Sys_Users().GetModelList(" F_OpenId='" + stropenid.Trim() + "'  and F_Type=1 ").FirstOrDefault();
1393 1456
         //    if (!string.IsNullOrEmpty(stropenid))
@@ -1408,7 +1471,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
1408 1471
         //                    model.Customer = callCustomer;  //客户姓名
1409 1472
         //                    model.CustomerTel = tel;        //联系电话  
1410 1473
         //                    //model.CustomerID = customerid;  //用户档案Id
1411
-                            
1474
+
1412 1475
         //                    model.Source = fkdep;  //处理部门 反馈单位  
1413 1476
         //                    model.CreateUserID = kfdepid;  //客服类类型           
1414 1477
         //                    model.AuditUser = auditusercode;  //受理人 - 审核人工号
@@ -1417,7 +1480,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
1417 1480
         //                                                           //反馈内容
1418 1481
         //                    var detailutf8 = System.Web.HttpUtility.UrlDecode(fkcont, System.Text.Encoding.UTF8);
1419 1482
         //                    model.Detail = detailutf8;
1420
-                           
1483
+
1421 1484
         //                    if (new BLL.T_Wo_WorkOrder().Update(model))
1422 1485
         //                    {
1423 1486
         //                        //添加工单修改操作日志
@@ -1974,7 +2037,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
1974 2037
         //    return Content(obj.ToJson());
1975 2038
         //}
1976 2039
         #endregion
1977
-        
2040
+
1978 2041
         #region 附件和语音文件
1979 2042
         /// <summary>
1980 2043
         /// 获取留言路径

+ 71 - 35
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -653,6 +653,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
653 653
                         int ywlx = RequestString.GetFormInt("ywlx", 0);
654 654
                         //客户姓名
655 655
                         string callCustomer = RequestString.GetFormString("callCustomer");
656
+                        //公司名称
657
+                        string company = RequestString.GetFormString("company");
656 658
                         //联系电话
657 659
                         string tel = RequestString.GetFormString("tel");
658 660
                         //受理人 - 审核人工号
@@ -675,6 +677,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
675 677
                                 model.Type = gdlx;              //工单类型                    
676 678
                                 model.TypeClass = ywlx;         //业务办理-数据字典读取
677 679
                                 model.Customer = callCustomer;  //客户姓名
680
+                                model.County = company;//公司名称
678 681
                                 model.CustomerTel = tel;        //联系电话  
679 682
                                 //model.CustomerID = customerid;  //用户档案Id
680 683
                                 
@@ -897,28 +900,28 @@ namespace CallCenterApi.Interface.Controllers.workorder
897 900
                                 new BLL.T_Msg_List().Add(msg);
898 901
                                 #endregion
899 902
                                 #region 派单后发送微信推送
900
-                                if (clid != 0)
901
-                                {
902
-                                    if (model.State == 1)
903
-                                    {//已派单状态
904
-                                        var modelUser2 = sysUserAccountBll.GetModel(clid);  //被指派人
905
-                                        if (modelUser2 != null)
906
-                                        {
907
-                                            if (!string.IsNullOrEmpty(modelUser2.F_WxOpenId))
908
-                                            {
909
-                                                var dicv = dicvalueBll.GetModel(model.TypeClass.Value);
910
-                                                string content = string.Empty;
911
-                                                var wotype = "";
912
-                                                if (dicv != null)
913
-                                                {
914
-                                                    wotype = dicv.F_Name;
915
-                                                    content = "客户" + model.Customer + "提出的工单已派单,请及时处理";
916
-                                                }
917
-                                                WxHelper.SendWechatMsg1(model.WorkOrderID, "你有新的工单需要处理", wotype, content, "", orderid.ToString(), modelUser2.F_WxOpenId);
918
-                                            }
919
-                                        }
920
-                                    }
921
-                                }
903
+                                //if (clid != 0)
904
+                                //{
905
+                                //    if (model.State == 1)
906
+                                //    {//已派单状态
907
+                                //        var modelUser2 = sysUserAccountBll.GetModel(clid);  //被指派人
908
+                                //        if (modelUser2 != null)
909
+                                //        {
910
+                                //            if (!string.IsNullOrEmpty(modelUser2.F_WxOpenId))
911
+                                //            {
912
+                                //                var dicv = dicvalueBll.GetModel(model.TypeClass.Value);
913
+                                //                string content = string.Empty;
914
+                                //                var wotype = "";
915
+                                //                if (dicv != null)
916
+                                //                {
917
+                                //                    wotype = dicv.F_Name;
918
+                                //                    content = "客户" + model.Customer + "提出的工单已派单,请及时处理";
919
+                                //                }
920
+                                //                WxHelper.SendWechatMsg1(model.WorkOrderID, "你有新的工单需要处理", wotype, content, orderid.ToString(), modelUser2.F_WxOpenId);
921
+                                //            }
922
+                                //        }
923
+                                //    }
924
+                                //}
922 925
                                 #endregion
923 926
                                 res = Success("处理成功");
924 927
                             }
@@ -2190,17 +2193,21 @@ namespace CallCenterApi.Interface.Controllers.workorder
2190 2193
         }
2191 2194
 
2192 2195
         //处理工单 - 微信
2193
-        public bool DealWXWorkOrder(string orderid,int isend,int ltype,int clbm,int clid,string cont,string detail, string openid)
2196
+        public bool DealWXWorkOrder(string orderid, int isend, int clbm, int clid, string cont, string openid)
2194 2197
         {
2195
-            bool res = false;
2196
-            Model.T_Wo_WorkOrder model = new BLL.T_Wo_WorkOrder().GetModelList(" WorkOrderID = '" + orderid + "'").FirstOrDefault();
2197
-            if (model != null)
2198
+            if (openid != "")
2198 2199
             {
2199
-                if (openid != "")
2200
+                Model.T_Sys_UserAccount ua = new BLL.T_Sys_UserAccount().GetModelList(" F_WxOpenId='" + openid + "'").FirstOrDefault();
2201
+
2202
+                Model.T_Wo_WorkOrder model = new BLL.T_Wo_WorkOrder().GetModelList(" WorkOrderID='" + orderid + "'").FirstOrDefault();
2203
+                if (ua != null)
2200 2204
                 {
2201
-                    Model.T_Sys_UserAccount ua = new BLL.T_Sys_UserAccount().GetModelList(" F_WxOpenId='" + openid + "'").FirstOrDefault();
2202
-                    if (ua != null)
2205
+                    if (model != null)
2203 2206
                     {
2207
+                        #region 获取处理人工号 20180227处理人工号改为时间+坐席工号格式
2208
+                        string struser = DateTime.Now.ToShortDateString() + "_" + ua.F_UserCode;
2209
+                        #endregion
2210
+                        //var clus = new BLL.T_Sys_UserAccount().GetModel(clid);
2204 2211
                         Model.T_Wo_WorkOrderItem item = new Model.T_Wo_WorkOrderItem();
2205 2212
                         #region 获取接收人
2206 2213
                         if (clid != 0)
@@ -2229,11 +2236,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
2229 2236
                             item.ToUser = users;
2230 2237
                         }
2231 2238
                         #endregion
2239
+                        #region 工单记录
2232 2240
                         item.WorkOrderID = orderid;
2233 2241
                         item.Type = 1;      //处理
2234 2242
                         item.ToDept = clbm; //部门
2235 2243
                         if (!string.IsNullOrEmpty(cont))
2236 2244
                             item.Detail = cont;
2245
+                        item.IsDel = 0;
2237 2246
                         //转派
2238 2247
                         if (isend == 0)
2239 2248
                         {
@@ -2245,20 +2254,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
2245 2254
                             item.State = 2;
2246 2255
                             item.IsLast = 1;
2247 2256
                         }
2248
-                        item.IsDel = 0;
2249 2257
                         item.IsStart = 0;
2250 2258
                         item.IsTimeOut = 0;
2251 2259
                         item.CreateUser = ua.F_UserCode;
2252 2260
                         item.CreateTime = DateTime.Now;
2261
+                        #endregion
2253 2262
                         long itemid = new BLL.T_Wo_WorkOrderItem().Add(item);
2254 2263
                         if (itemid > 0)
2255 2264
                         {
2265
+                            #region
2256 2266
                             string strmsg = string.Empty;
2257 2267
 
2258 2268
                             strmsg = ua.F_UserName + "完结了工单,单号:" + model.WorkOrderID;
2259 2269
                             //工单完结要更新工单的状态
2260 2270
                             if (isend == 0)
2261 2271
                             {
2272
+                                model.ResponDept = item.ToDept;
2262 2273
                                 //无接收人时,状态修改成 0待指派
2263 2274
                                 if (clid == 0)
2264 2275
                                 {
@@ -2266,25 +2277,26 @@ namespace CallCenterApi.Interface.Controllers.workorder
2266 2277
                                 }
2267 2278
                                 else
2268 2279
                                 {
2280
+                                    model.AuditUser = item.ToUser;
2269 2281
                                     model.State = 1;    //待处理
2270 2282
                                 }
2271 2283
                                 //model.State = 1;    //已处理
2272 2284
                             }
2273 2285
                             else
2274 2286
                             {
2275
-                                model.State = 2;    //已处理
2287
+                                model.State = 2;    //已处理item.ToUser
2276 2288
                                 model.LastDealUser = ua.F_UserCode;
2277 2289
                                 model.LastDealTime = DateTime.Now;
2278 2290
                             }
2279 2291
                             //处理内容
2280 2292
                             if (!string.IsNullOrEmpty(cont))
2281 2293
                                 model.Clcontent += cont + ",";
2282
-                            //处理工单时,反馈内容可以编辑
2283
-                            //if (!string.IsNullOrEmpty(detail))
2284
-                            //    model.Detail = detail;
2294
+                            //model.Clcontent = cont;
2295
+                            //处理工单时,接待描述可以编辑 - 不能再修改
2296
+                            //model.Detail = detail;
2285 2297
 
2286 2298
                             new BLL.T_Wo_WorkOrder().Update(model);
2287
-
2299
+                            #endregion
2288 2300
                             #region 消息表
2289 2301
                             Model.T_Msg_List msg = new Model.T_Msg_List();
2290 2302
                             msg.Type = (int)Model.MSGType.workorder;//处理
@@ -2298,6 +2310,30 @@ namespace CallCenterApi.Interface.Controllers.workorder
2298 2310
 
2299 2311
                             new BLL.T_Msg_List().Add(msg);
2300 2312
                             #endregion
2313
+                            #region 派单后发送微信推送
2314
+                            //if (clid != 0)
2315
+                            //{
2316
+                            //    if (model.State == 1)
2317
+                            //    {//已派单状态
2318
+                            //        var modelUser2 = sysUserAccountBll.GetModel(clid);  //被指派人
2319
+                            //        if (modelUser2 != null)
2320
+                            //        {
2321
+                            //            if (!string.IsNullOrEmpty(modelUser2.F_WxOpenId))
2322
+                            //            {
2323
+                            //                var dicv = dicvalueBll.GetModel(model.TypeClass.Value);
2324
+                            //                string content = string.Empty;
2325
+                            //                var wotype = "";
2326
+                            //                if (dicv != null)
2327
+                            //                {
2328
+                            //                    wotype = dicv.F_Name;
2329
+                            //                    content = "客户" + model.Customer + "提出的工单已派单,请及时处理";
2330
+                            //                }
2331
+                            //                WxHelper.SendWechatMsg1(model.WorkOrderID, "你有新的工单需要处理", wotype, content, orderid.ToString(), modelUser2.F_WxOpenId);
2332
+                            //            }
2333
+                            //        }
2334
+                            //    }
2335
+                            //}
2336
+                            #endregion
2301 2337
                             return true;
2302 2338
                         }
2303 2339
                     }

+ 3 - 3
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Properties/PublishProfiles/sycw.pubxml.user

@@ -34,13 +34,13 @@
34 34
       <publishTime>03/18/2019 14:14:53</publishTime>
35 35
     </File>
36 36
     <File Include="bin/CallCenterApi.Interface.dll">
37
-      <publishTime>03/22/2019 17:35:59</publishTime>
37
+      <publishTime>04/12/2019 14:22:25</publishTime>
38 38
     </File>
39 39
     <File Include="bin/CallCenterApi.Model.dll">
40 40
       <publishTime>03/22/2019 14:19:05</publishTime>
41 41
     </File>
42 42
     <File Include="bin/CallCenterAPI.WechatSDK.dll">
43
-      <publishTime>03/21/2019 11:41:52</publishTime>
43
+      <publishTime>04/12/2019 14:22:20</publishTime>
44 44
     </File>
45 45
     <File Include="bin/ICSharpCode.SharpZipLib.dll">
46 46
       <publishTime>12/21/2018 11:09:32</publishTime>
@@ -175,7 +175,7 @@
175 175
       <publishTime>12/21/2018 11:09:29</publishTime>
176 176
     </File>
177 177
     <File Include="Configs/system.config">
178
-      <publishTime>03/21/2019 11:30:23</publishTime>
178
+      <publishTime>04/12/2019 11:15:51</publishTime>
179 179
     </File>
180 180
     <File Include="ExcelData/CustomerList_Mod.xls">
181 181
       <publishTime>12/21/2018 11:09:29</publishTime>

BIN
文档/Sql/sql_20190322_开票信息增加状态字段.sql


+ 10 - 0
文档/weixindizhi.txt

@@ -0,0 +1,10 @@
1
+www.cnsycw.com
2
+
3
+sycw.zhuovi.com
4
+
5
+zhuovi.com
6
+
7
+
8
+¹«Ë¾¼ò½é:http://www.sanyuancw.com
9
+
10
+ITÈí¼þÓë·þÎñ https://17dz.com/jyb/index.html#/login

BIN
文档/三元财务对接文档.docx


BIN
文档/需求及问题文档/三元-问题沟通-20190327.doc


BIN
文档/需求及问题文档/系统问题-20190321.doc