Przeglądaj źródła

坐席固定,地区修改,综合查询添加筛选,指派上传附件

duhongyu 6 lat temu
rodzic
commit
e60d07ff68

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/CallOutOptController.cs

@@ -22,7 +22,7 @@ namespace CallCenterApi.Interface.Controllers
22 22
                 string userseatgroupid = CurrentUser.UserData.F_SeartGroupID.ToString();
23 23
                 if (userseatgroupid != "" && userseatgroupid != "0")
24 24
                 {
25
-                    Model.T_Sys_SeatGroup smodel = new BLL.T_Sys_SeatGroup().GetModel(int.Parse(userseatgroupid));
25
+                    Model.T_Sys_SeatGroup smodel = new BLL.T_Sys_SeatGroup().GetModel(12);
26 26
                     if (smodel != null)
27 27
                     {
28 28
                         zipcode = smodel.F_ZXAtt.Trim();

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/RegionCategoryController.cs

@@ -56,7 +56,7 @@ namespace CallCenterApi.Interface.Controllers.customer
56 56
             }
57 57
             if (!string.IsNullOrEmpty(keywords.Trim()))
58 58
             {
59
-                List<Model.T_RegionCategory> userModel = regionBLL.GetModelList(" F_RegionName like '%" + keywords.Trim() + "%'");
59
+                List<Model.T_RegionCategory> userModel = regionBLL.GetModelList(" F_RegionName like '%" + keywords.Trim() + "%'"+ "and F_Layer = " + F_Layer);
60 60
                 if (userModel != null)
61 61
                 {
62 62
                     return Success("加载成功", userModel);

Plik diff jest za duży
+ 952 - 73
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/WOReportController.cs


+ 23 - 19
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -838,9 +838,10 @@ namespace CallCenterApi.Interface.Controllers.weixin
838 838
         /// <summary>
839 839
         ///综合查询列表
840 840
         /// </summary>
841
-        public ActionResult GetComprehensive(string OpenId,string code, string cusname, string keywords, string cusphone, string companyname, string province, string city,
841
+        public ActionResult GetComprehensive(string OpenId,string code, string createby,string cusname, string keywords, string cusphone, string companyname, string province, string city,
842 842
             string country, string township, string category, string salebase, string touser, int source = 0, int state = -1, int type = 0, int pageindex = 1, int pagesize = 10)
843 843
         {
844
+            
844 845
             if (!string.IsNullOrEmpty(OpenId))
845 846
             {
846 847
                 //  Model.T_Sys_UserAccount ua = userAccountBLL.GetModel(userId);
@@ -858,6 +859,8 @@ namespace CallCenterApi.Interface.Controllers.weixin
858 859
                     sql += $" and F_State=" + state;
859 860
                 if (source > 0)//工单来源
860 861
                     sql += $" and F_Source=" + source;
862
+                if (!string.IsNullOrWhiteSpace(createby))//创建人
863
+                    sql += $" and F_CreateBy like '%" + createby.Trim() + "%'";
861 864
                 if (!string.IsNullOrWhiteSpace(touser))//参与人
862 865
                     sql += $" and F_DealBy like '%" + touser.Trim() + "%'";
863 866
                 if (!string.IsNullOrWhiteSpace(code))//工单编号
@@ -1332,7 +1335,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
1332 1335
             {
1333 1336
                 cont = "大区经理未审批流转市场管理科";
1334 1337
             }
1335
-             var res = AssignWO(ua, model, Input[0], cont, 37, 0, 0, 0, 0, 0, 0, time.ToString());
1338
+             var res = AssignWO(ua, model, Input[0], cont,"", 37, 0, 0, 0, 0, 0, 0, time.ToString());
1336 1339
             
1337 1340
           
1338 1341
             return res;
@@ -1350,20 +1353,18 @@ namespace CallCenterApi.Interface.Controllers.weixin
1350 1353
                 {
1351 1354
                     return Error("该账号已在别的设备登录,请及时修改密码重新登录。");
1352 1355
                 }
1353
-                string sql = "";
1354
-                if (id > 0)
1356
+                if (id <= 0)
1355 1357
                 {
1356
-                    sql += $" ( F_ID like '%" + id + "%' ) ";
1357
-                }
1358
-                else
1359 1358
                     return Error("请输入正确的id");
1360
-                var list = new List<Model.T_Wo_WorkOrder>();
1361
-                if (!string.IsNullOrWhiteSpace(sql))
1362
-                {
1363
-                    sql += " and F_IsDelete=0";
1364
-                    list = woBLL .GetModelList(sql);
1365 1359
                 }
1366
-                var itemlasts = itembll.GetModelList("  F_WoID="  +id + " ");
1360
+                DataTable FileUrl = new DataTable();
1361
+                var list = new List<Model.T_Wo_WorkOrder>();
1362
+                var model = woBLL .GetModel(id);
1363
+                if (model != null)
1364
+                    list.Add(model);
1365
+                var itemlasts = itembll.GetModelList("  F_WoID=" + +id + " ");
1366
+                ; var configfj = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='FileUrlPath' ").FirstOrDefault();
1367
+                FileUrl = GetFileData(model.F_Files, configfj.F_ParamValue);
1367 1368
 
1368 1369
                 if (list.Count > 0)
1369 1370
                 {
@@ -1375,6 +1376,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
1375 1376
                             state = "success",
1376 1377
                             message = "成功",
1377 1378
                             rows = Input,
1379
+                            FileUrl,
1378 1380
                             total = itemlasts,
1379 1381
                         };
1380 1382
 
@@ -2442,7 +2444,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
2442 2444
             model.F_Description = input.F_Description;//问题描述
2443 2445
             model.F_ZX_Area = input.F_ZX_Area;// 大区
2444 2446
             model.F_ZX_Branch = input.F_ZX_Branch;//分公司
2445
-            model.F_Files = "0";//附件上传ids
2447
+            model.F_Files =model .F_Files;//附件上传ids
2446 2448
             model.F_DealType = input.F_DealType;//处理方式:当即办理、电话转接、网络转办(点选)
2447 2449
             model.F_Canal = input.F_Canal;//处理方式:当即办理、电话转接、网络转办(点选)
2448 2450
             #endregion
@@ -2662,7 +2664,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
2662 2664
                                     deptname1 = deptmodel1.F_DeptName + "-";
2663 2665
                                 }
2664 2666
                                 AddLog(modlelist.F_ID, 0, deptname1 + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create,"",0, ua, 0, 0);
2665
-                                var res = AssignWO(ua, modlelist, input, "流转市场管理科", 37, 0, overtime, sms);
2667
+                                var res = AssignWO(ua, modlelist, input, "流转市场管理科", "", 37, 0, overtime, sms);
2666 2668
                                 if (res)
2667 2669
                                 return Success("添加成功");
2668 2670
                                 else
@@ -2759,7 +2761,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
2759 2761
         /// </summary>
2760 2762
         /// <returns></returns>
2761 2763
         [WechatActionFilter]
2762
-        public ActionResult AssignWorkOrder(string OpenId, long orderid, string cont, WorkOrdeDeptment deptment, int isvisit = 1,
2764
+        public ActionResult AssignWorkOrder(string OpenId, long orderid, string cont, WorkOrdeDeptment deptment, string F_Files, int isvisit = 1,
2763 2765
             int  overtime = 0, int sms = 0, int clbm = 0, int clid = 0,int isApprovalp=0, int hclbm = 0, int hclid = 0)
2764 2766
         {
2765 2767
 
@@ -2849,7 +2851,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
2849 2851
 
2850 2852
                     if (model != null)
2851 2853
                     {
2852
-                        var res = AssignWO(ua, model, input, cont, clbm, clid, overtime, sms, isApprovalp, hclbm, hclid);
2854
+                        var res = AssignWO(ua, model, input, cont, F_Files, clbm, clid, overtime, sms, isApprovalp, hclbm, hclid);
2853 2855
                         if (res)
2854 2856
                             return Success("转派成功");
2855 2857
                         else
@@ -2865,7 +2867,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
2865 2867
         /// <summary>
2866 2868
         /// 转派工单
2867 2869
         /// </summary>
2868
-        public bool AssignWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, WorkOrderNewInput input, string cont, int clbm = 0, int clid = 0, int  overtime = 0, int sms = 0, int isApprovalp = 0,int hclbm = 0, int hclid = 0, string creat = "")
2870
+        public bool AssignWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, WorkOrderNewInput input, string cont, string F_Files, int clbm = 0, int clid = 0, int  overtime = 0, int sms = 0, int isApprovalp = 0,int hclbm = 0, int hclid = 0, string creat = "")
2869 2871
         {
2870 2872
            
2871 2873
             string smscont = "";
@@ -2996,6 +2998,8 @@ namespace CallCenterApi.Interface.Controllers.weixin
2996 2998
                 //   model.F_DealBy = touser;
2997 2999
                 model.F_State = wostate;
2998 3000
                 model.F_limit = overtime;
3001
+                if (!string.IsNullOrEmpty(F_Files))
3002
+                    model.F_Files = F_Files;
2999 3003
                 //处理内容
3000 3004
                 if (!string.IsNullOrEmpty(cont))
3001 3005
                     model.F_DealContent += cont + ";";
@@ -3976,7 +3980,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
3976 3980
                         {
3977 3981
                             deptname1 = deptmodel1.F_DeptName + "-";
3978 3982
                         }
3979
-                        var res = AssignWO(ua, model, input, "流转市场管理科", 37, 0, model.F_limit, 0);
3983
+                        var res = AssignWO(ua, model, input, "流转市场管理科","", 37, 0, model.F_limit, 0);
3980 3984
                         if (res)
3981 3985
                             return Success("保存成功");
3982 3986
                         else

+ 40 - 24
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs

@@ -1108,7 +1108,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1108 1108
             {
1109 1109
                 cont = "大区经理未审批流转市场管理科";
1110 1110
             }
1111
-            var res = AssignWO(ua, model, Input[0], cont, 37, 0, 0, 0, 0, 0, 0, time.ToString());
1111
+            var res = AssignWO(ua, model, Input[0], cont,"", 37, 0, 0, 0, 0, 0, 0, time.ToString());
1112 1112
 
1113 1113
 
1114 1114
             return res;
@@ -1963,6 +1963,19 @@ namespace CallCenterApi.Interface.Controllers.workorder
1963 1963
             }
1964 1964
             return str;
1965 1965
         }
1966
+        public DataTable GetFileData(string ids, string prefix)
1967
+        {
1968
+            DataTable dt = new DataTable();
1969
+            if (!string.IsNullOrEmpty(ids))
1970
+            {
1971
+                dt = DbHelperSQL.Query("select * from T_Sys_Accessories where F_FileId in (" + ids + ")").Tables[0];
1972
+                foreach (DataRow dr in dt.Rows)
1973
+                {
1974
+                    dr["F_FileUrl"] = prefix + dr["F_FileUrl"].ToString();
1975
+                }
1976
+            }
1977
+            return dt;
1978
+        }
1966 1979
         /// <summary>
1967 1980
         /// 查询工单详情
1968 1981
         /// </summary>
@@ -1971,22 +1984,20 @@ namespace CallCenterApi.Interface.Controllers.workorder
1971 1984
             int userId = CurrentUser.UserData.F_UserId;
1972 1985
             if (userId != 0)
1973 1986
             {
1987
+                DataTable FileUrl = new DataTable();
1974 1988
                 Model.T_Sys_UserAccount ua = sysUserAccountBll.GetModel(userId);
1975
-                string sql = "";
1976
-                if (id > 0)
1989
+             
1990
+                if (id <= 0)
1977 1991
                 {
1978
-                    sql += $" ( F_ID like '%" + id + "%' ) ";
1979
-                }
1980
-                else
1981 1992
                     return Error("请输入正确的id");
1982
-                var list = new List<Model.T_Wo_WorkOrder>();
1983
-                if (!string.IsNullOrWhiteSpace(sql))
1984
-                {
1985
-                    sql += " and F_IsDelete=0";
1986
-                    list = workOrder.GetModelList(sql);
1987 1993
                 }
1994
+                var list = new List<Model.T_Wo_WorkOrder>();
1995
+                 var   model = workOrder.GetModel(id);
1996
+                if (model != null)
1997
+                    list.Add(model);
1988 1998
                  var itemlasts = itembll.GetModelList("  F_WoID=" + +id + " ");
1989
-                 
1999
+;                var configfj = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='FileUrlPath' ").FirstOrDefault();
2000
+                FileUrl = GetFileData(model.F_Files , configfj.F_ParamValue);
1990 2001
                 if (list.Count > 0)
1991 2002
                 {
1992 2003
                     List<WorkOrderNewInput> Input = modeltooip(list);
@@ -1997,7 +2008,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
1997 2008
                             state = "success",
1998 2009
                             message = "成功",
1999 2010
                             rows = Input,
2000
-                            total= ItemList( itemlasts),
2011
+                            FileUrl,
2012
+                            total = ItemList( itemlasts),
2001 2013
                         };
2002 2014
 
2003 2015
                         return Content(obj.ToJson()); 
@@ -2110,7 +2122,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2110 2122
         /// <summary>
2111 2123
         ///综合查询列表
2112 2124
         /// </summary>
2113
-        public ActionResult GetComprehensive(string code, string cusname,string keywords, string cusphone, string companyname, string province, string city,
2125
+        public ActionResult GetComprehensive(string code, string cusname,string createby,string keywords, string cusphone, string companyname, string province, string city,
2114 2126
             string country, string township,string category,string salebase, string touser, int source = 0,int state=-1, int type = 0, int pageindex = 1, int pagesize = 10)
2115 2127
         {
2116 2128
             int userId = CurrentUser.UserData.F_UserId;
@@ -2125,6 +2137,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
2125 2137
                    sql += $" and F_State=" + state;
2126 2138
                 if (source > 0)//工单来源
2127 2139
                     sql += $" and F_Source=" + source;
2140
+                if (!string.IsNullOrWhiteSpace(createby))//创建人
2141
+                    sql += $" and F_CreateBy like '%" + createby.Trim() + "%'";
2128 2142
                 if (!string.IsNullOrWhiteSpace(touser))//参与人
2129 2143
                     sql += $" and F_DealBy like '%" + touser.Trim() + "%'";
2130 2144
                 if (!string.IsNullOrWhiteSpace(code))//工单编号
@@ -3213,7 +3227,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
3213 3227
                             else
3214 3228
                             {
3215 3229
                                 AddLog(modlelist.F_ID, 0, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, "", 0, ua, 0, 0);
3216
-                                var res = AssignWO(ua, modlelist, input, "流转市场管理科", 37, 0, 0, 0);
3230
+                                var res = AssignWO(ua, modlelist, input, "流转市场管理科","", 37, 0, 0, 0);
3217 3231
                                 if (res)
3218 3232
                                     return Success("添加成功");
3219 3233
                                 else
@@ -3444,7 +3458,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
3444 3458
                                 {
3445 3459
                                     deptname1 = deptmodel1.F_DeptName + "-";
3446 3460
                                 }
3447
-                                var res = AssignWO(ua, model, input, "流转市场管理科", 37, 0, model.F_limit, 0);
3461
+                                var res = AssignWO(ua, model, input, "流转市场管理科","", 37, 0, model.F_limit, 0);
3448 3462
                                 if (res)
3449 3463
                                     return Success("保存成功");
3450 3464
                                 else
@@ -4109,7 +4123,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
4109 4123
             else
4110 4124
             {
4111 4125
                 model.F_WorkOrderCode = model.F_WorkOrderCode;//工单编号
4112
-                model.F_Source = input .F_Source.ToString();//工单来源
4126
+                model.F_Source = model.F_Source.ToString();//工单来源
4113 4127
             }
4114 4128
                 #region 基本字段
4115 4129
                 if (type == 2)
@@ -4181,7 +4195,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
4181 4195
             model.F_Description = input.F_Description;//问题描述
4182 4196
             model.F_ZX_Area = input.F_ZX_Area;// 大区
4183 4197
             model.F_ZX_Branch = input.F_ZX_Branch;//分公司
4184
-            model.F_Files = "0";//附件上传ids
4198
+            model.F_Files = model.F_Files;//附件上传ids
4185 4199
             model.F_DealType = input.F_DealType;//处理方式:当即办理、电话转接、网络转办(点选)
4186 4200
             #endregion
4187 4201
             model.F_QuestionType = input.F_QuestionType;//问题类别(投诉抽捡和咨询类别不一样)
@@ -4314,7 +4328,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
4314 4328
         /// 创建工单时指派
4315 4329
         /// </summary>
4316 4330
         /// <returns></returns>
4317
-        public ActionResult Createass(WorkOrderNewInput input, string cont, WorkOrdeDeptment deptment, int isvisit = 1,
4331
+        public ActionResult Createass(WorkOrderNewInput input, string cont, WorkOrdeDeptment deptment,string F_Files, int isvisit = 1,
4318 4332
           int overtime = 0, int sms = 0, int clbm = 0, int clid = 0)
4319 4333
         {
4320 4334
             int userId = CurrentUser.UserData.F_UserId;
@@ -4458,7 +4472,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
4458 4472
                         }
4459 4473
 
4460 4474
                         AddLog(modlelist.F_ID, modlelist.F_State.Value, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "添加工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, "", 0, ua, 0, 0);
4461
-                        var res = AssignWO(ua, modlelist, inputs, cont, clbm, clid, overtime, sms);
4475
+                        var res = AssignWO(ua, modlelist, inputs, cont, F_Files, clbm, clid, overtime, sms);
4462 4476
                             if (res)
4463 4477
                                 return Success("转派成功");
4464 4478
                             else
@@ -4577,7 +4591,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
4577 4591
                         {
4578 4592
                             deptname = deptmodel.F_DeptName + "-";
4579 4593
                         }
4580
-                        AddLog(modlelist.F_ID, modlelist.F_State.Value, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "添加工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.end, "", 0, ua, 0, 0);
4594
+                        AddLog(modlelist.F_ID, modlelist.F_State.Value, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "添加工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, "", 0, ua, 0, 0);
4581 4595
                         var res = Overorder(ua, modlelist, 1);
4582 4596
                         if (res)
4583 4597
                             return Success("完结成功");
@@ -4599,7 +4613,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
4599 4613
         /// </summary>
4600 4614
         /// <returns></returns>
4601 4615
         [Authority]
4602
-        public ActionResult AssignWorkOrder(long orderid, string cont, WorkOrdeDeptment deptment, int isvisit=1,
4616
+        public ActionResult AssignWorkOrder(long orderid, string cont, WorkOrdeDeptment deptment,string F_Files, int isvisit=1,
4603 4617
             int  overtime =0,int sms=0,int clbm = 0, int clid = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0)
4604 4618
         {
4605 4619
             int userId = CurrentUser.UserData.F_UserId;
@@ -4690,7 +4704,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
4690 4704
                    
4691 4705
                     if (model != null)
4692 4706
                     {
4693
-                        var res = AssignWO(ua, model, input,cont, clbm, clid, overtime, sms, isApprovalp, hclbm, hclid);
4707
+                        var res = AssignWO(ua, model, input,cont, F_Files,clbm, clid, overtime, sms, isApprovalp, hclbm, hclid);
4694 4708
                         if (res)
4695 4709
                             return Success("转派成功");
4696 4710
                         else
@@ -5665,7 +5679,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
5665 5679
         /// <summary>
5666 5680
         /// 转派工单
5667 5681
         /// </summary>
5668
-        public bool AssignWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, WorkOrderNewInput input, string cont, int clbm = 0, int clid = 0, int  overtime = 0, int sms = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0, string creat = "")
5682
+        public bool AssignWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, WorkOrderNewInput input, string cont, string F_Files, int clbm = 0, int clid = 0, int  overtime = 0, int sms = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0, string creat = "")
5669 5683
         {
5670 5684
             string smscont = "";
5671 5685
             if (model.F_Type == "1")
@@ -5800,6 +5814,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
5800 5814
                 if (!string.IsNullOrEmpty(cont))
5801 5815
                     model.F_DealContent += cont + ";";
5802 5816
                 InToworkModel(model, input);
5817
+                if (!string.IsNullOrEmpty(F_Files))
5818
+                    model.F_Files = F_Files;
5803 5819
                 workOrder.Update(model);
5804 5820
                 #endregion
5805 5821
                 #region 推送消息