Przeglądaj źródła

用户管理修改,工号改编号,综合查询时间筛选,问题类别显示

duhongyu 6 lat temu
rodzic
commit
ffff54b710

Plik diff jest za duży
+ 23 - 5
codegit/CallCenterApi/CallCenterApi.DAL/T_Wo_WorkOrder.cs


+ 16 - 13
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs

@@ -426,25 +426,28 @@ namespace CallCenterApi.Interface.Controllers
426 426
                 //userAccountModel.F_CreateOn = DateTime.Now;
427 427
 
428 428
                 //if (input.SeartGroupID != 0)
429
-                userAccountModel.F_SeartGroupID = input.GroupId;
430
-                var GroupIDList = input.GroupId.Split('|');
431 429
                 userAccountModel.F_SeartGroup = "";
432
-                if (GroupIDList.Length  >0)
430
+                if (!string .IsNullOrEmpty (input.GroupId))
433 431
                 {
434
-                    foreach (var it in GroupIDList)
432
+                    userAccountModel.F_SeartGroupID = input.GroupId;
433
+                    var GroupIDList = input.GroupId.Split('|');
434
+                    if (GroupIDList.Length > 0)
435 435
                     {
436
-                        Model.T_Sys_SeatGroup sm = new BLL.T_Sys_SeatGroup().GetModel(int.Parse(it));
437
-                        if (sm != null)
436
+                        foreach (var it in GroupIDList)
438 437
                         {
439
-                            if (userAccountModel.F_SeartGroup != "")
440
-                            {
441
-                                userAccountModel.F_SeartGroup = userAccountModel.F_SeartGroup + "|" + sm.F_ZXZName;
442
-                            }
443
-                            else
438
+                            Model.T_Sys_SeatGroup sm = new BLL.T_Sys_SeatGroup().GetModel(int.Parse(it));
439
+                            if (sm != null)
444 440
                             {
445
-                                userAccountModel.F_SeartGroup = sm.F_ZXZName;
446
-                            }
441
+                                if (userAccountModel.F_SeartGroup != "")
442
+                                {
443
+                                    userAccountModel.F_SeartGroup = userAccountModel.F_SeartGroup + "|" + sm.F_ZXZName;
444
+                                }
445
+                                else
446
+                                {
447
+                                    userAccountModel.F_SeartGroup = sm.F_ZXZName;
448
+                                }
447 449
 
450
+                            }
448 451
                         }
449 452
                     }
450 453
                 }

+ 15 - 6
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -1831,6 +1831,14 @@ namespace CallCenterApi.Interface.Controllers.weixin
1831 1831
                             if (manage != null)
1832 1832
                             {
1833 1833
                                 model.F_QuestionType = manage.F_QuestionName;
1834
+                                if (manage.F_Label == "3")
1835
+                                {
1836
+                                    Model.T_Wo_QuestionManage Manage1 = quesBLL.GetModel(int.Parse(manage.F_ParentId.ToString()));//获取问题类别
1837
+                                    Model.T_Wo_QuestionManage Manage2 = quesBLL.GetModel(int.Parse(Manage1.F_ParentId.ToString()));//获取问题类别
1838
+                                    model.F_QuestionTypeone = Manage2.F_QuestionName;//问题类别1
1839
+                                    model.F_QuestionTypetwo = Manage1.F_QuestionName;//问题类别2
1840
+
1841
+                                }
1834 1842
                             }
1835 1843
 
1836 1844
                         }
@@ -1924,6 +1932,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
1924 1932
                         {
1925 1933
                             model.F_CreateBy = creatname.F_WorkNumber; ;//添加人
1926 1934
                             model.F_CreateName = creatname.F_UserName; ;//添加人
1935
+                            model.CreateName = creatname.F_UserName + "(" + creatname.F_WorkNumber + ")";
1927 1936
                         }
1928 1937
 
1929 1938
                     }
@@ -2990,7 +2999,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
2990 2999
                 if (clus != null)
2991 3000
                 {
2992 3001
                     touser = clus.F_UserCode;
2993
-                    tousername = clus.F_UserName + "(" + touser + ")";
3002
+                    tousername = clus.F_UserName + "(" + clus.F_WorkNumber + ")";
2994 3003
                 }
2995 3004
                 if (sms != 0)
2996 3005
                 {
@@ -3011,12 +3020,12 @@ namespace CallCenterApi.Interface.Controllers.weixin
3011 3020
                     if (string.IsNullOrEmpty(users))
3012 3021
                     {
3013 3022
                         users = l.F_UserCode;
3014
-                        tousername = l.F_UserName + "(" + l.F_UserCode + ")";
3023
+                        tousername = l.F_UserName + "(" + l.F_WorkNumber + ")";
3015 3024
                     }
3016 3025
                     else
3017 3026
                     {
3018 3027
                         users = users + "," + l.F_UserCode;
3019
-                        tousername = tousername + "," + l.F_UserName + "(" + l.F_UserCode + ")";
3028
+                        tousername = tousername + "," + l.F_UserName + "(" + l.F_WorkNumber + ")";
3020 3029
                     }
3021 3030
                      if (sms != 0)
3022 3031
                   {
@@ -3041,7 +3050,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
3041 3050
                         if (string.IsNullOrEmpty(htouser))
3042 3051
                         {
3043 3052
                             htouser =  clus.F_UserCode;
3044
-                            htousername =  clus.F_UserName + "(" + clus.F_UserCode + ")";
3053
+                            htousername =  clus.F_UserName + "(" + clus.F_WorkNumber + ")";
3045 3054
                         }
3046 3055
                     }
3047 3056
                 }
@@ -3058,11 +3067,11 @@ namespace CallCenterApi.Interface.Controllers.weixin
3058 3067
                         else
3059 3068
                         {
3060 3069
                             htouser = htouser + "," + l.F_UserCode;
3061
-                            htousername = htousername + "," + l.F_UserName + "(" + l.F_UserCode + ")";
3070
+                            htousername = htousername + "," + l.F_UserName + "(" + l.F_WorkNumber  + ")";
3062 3071
                         }
3063 3072
                     }
3064 3073
                 }
3065
-                AddLog(model.F_ID, (int)EnumWorkOrderState.assign, "审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, htouser, hclbm, nowUser, overtime, sms, creat,2);
3074
+                AddLog(model.F_ID, (int)EnumWorkOrderState.assign, htousername+ "高层待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, htouser, hclbm, nowUser, overtime, sms, creat,2);
3066 3075
             }
3067 3076
            
3068 3077
             #endregion

+ 35 - 11
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs

@@ -178,6 +178,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
178 178
                             if (GetParticipateID() != "")
179 179
                             {
180 180
                                 sql += " and  T_Wo_WorkOrder.F_ID in ( " + GetParticipateID() + ") ";
181
+                                sql += " and F_State =" + (int)EnumWorkOrderState.assign;
181 182
                             }
182 183
                         }
183 184
                         else
@@ -1886,7 +1887,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1886 1887
         public string GetParticipateID()
1887 1888
         {
1888 1889
             string str = string.Empty;
1889
-            str = "select F_WoID from T_Wo_WorkOrderItem_New where  F_OptType in( 1,7)";
1890
+            str = "select F_WoID from T_Wo_WorkOrderItem_New where  F_OptType in(1)";
1890 1891
 
1891 1892
             ;
1892 1893
             return str;
@@ -2170,9 +2171,18 @@ namespace CallCenterApi.Interface.Controllers.workorder
2170 2171
             int userId = CurrentUser.UserData.F_UserId;
2171 2172
             if (userId != 0)
2172 2173
             {
2174
+                string msg = "";
2173 2175
                   if (id <=0)
2174 2176
                     return Error("请输入正确的id");
2175
-                var itemlasts = itembll.GetModelList("  F_ItemType=" + type + " and  F_WoID=" + id + " ");
2177
+                  if(type ==1)
2178
+                {
2179
+                    msg = "0,1,7,8";
2180
+                }
2181
+                  else
2182
+                {
2183
+                    msg = "" + type;
2184
+                }
2185
+                var itemlasts = itembll.GetModelList("  F_ItemType in(" + msg + ") and  F_WoID=" + id + " ");
2176 2186
                 if (itemlasts != null)
2177 2187
                 {
2178 2188
                         var obj = new
@@ -2197,7 +2207,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2197 2207
         /// <summary>
2198 2208
         ///综合查询列表
2199 2209
         /// </summary>
2200
-        public ActionResult GetComprehensive(string code, string cusname,string createby,string keywords, string cusphone, string companyname, string province, string city,
2210
+        public ActionResult GetComprehensive(string code, string cusname,string createby, string starttime, string endtime, string keywords, string cusphone, string companyname, string province, string city,
2201 2211
             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)
2202 2212
         {
2203 2213
             int userId = CurrentUser.UserData.F_UserId;
@@ -2212,12 +2222,25 @@ namespace CallCenterApi.Interface.Controllers.workorder
2212 2222
                    sql += $" and F_State=" + state;
2213 2223
                 if (source > 0)//工单来源
2214 2224
                     sql += $" and F_Source=" + source;
2225
+
2215 2226
                 if (!string.IsNullOrWhiteSpace(createby))//创建人
2216
-                    sql += $" and F_CreateBy like '%" + createby.Trim() + "%'";
2227
+                {
2228
+                    string F_WorkNumber = "";
2229
+                        Model.T_Sys_UserAccount user = sysUserAccountBll.GetworkModel(createby);
2230
+                        if (user !=null )
2231
+                        {
2232
+                        F_WorkNumber = user.F_UserCode;
2233
+                        }
2234
+                    sql += $"and F_CreateBy  in("+createby+","+ F_WorkNumber+") ";
2235
+                }
2217 2236
                 if (!string.IsNullOrWhiteSpace(touser))//参与人
2218 2237
                     sql += $" and F_DealBy like '%" + touser.Trim() + "%'";
2219 2238
                 if (!string.IsNullOrWhiteSpace(code))//工单编号
2220 2239
                     sql += $" and F_WorkOrderCode like '%" + code.Trim() + "%'";
2240
+                if (starttime.Trim() != "" && starttime != "undefined")
2241
+                    sql += " and datediff(day,F_CreateOn,'" + starttime + "')<=0 ";
2242
+                if (endtime.Trim() != "" && endtime != "undefined")
2243
+                    sql += " and datediff(day,F_CreateOn,'" + endtime + "')>=0   ";
2221 2244
                 if (!string.IsNullOrWhiteSpace(keywords))//关键字搜索
2222 2245
                     sql += $"  and  (F_QuestionType like '%" + keywords.Trim()
2223 2246
                          + "%' or F_ZX_Area like '%" + keywords.Trim() + "%' or F_ZX_Branch like '%" + keywords.Trim() 
@@ -4011,6 +4034,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
4011 4034
                         {
4012 4035
                             model.F_CreateBy = creatname.F_WorkNumber; ;//添加人
4013 4036
                             model.F_CreateName = creatname.F_UserName ; ;//添加人
4037
+                            model.CreateName = creatname.F_UserName + "(" + creatname.F_WorkNumber + ")";
4014 4038
                         }
4015 4039
                     }
4016 4040
                     model.F_UpdateBy = model1[i].F_UpdateBy;//修改人工号
@@ -5924,7 +5948,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
5924 5948
                 if (clus != null)
5925 5949
                 {
5926 5950
                     touser = clus.F_UserCode;
5927
-                    tousername = clus.F_UserName + "(" + touser + ")";
5951
+                    tousername = clus.F_UserName + "(" + clus.F_WorkNumber + ")";
5928 5952
                     if (sms != 0)
5929 5953
                     {
5930 5954
                         if (!string .IsNullOrEmpty (clus.F_Mobile.Trim ()))
@@ -5946,12 +5970,12 @@ namespace CallCenterApi.Interface.Controllers.workorder
5946 5970
                     if (string.IsNullOrEmpty(users))
5947 5971
                     {
5948 5972
                         users = l.F_UserCode;
5949
-                        tousername = l.F_UserName + "(" + l.F_UserCode + ")";
5973
+                        tousername = l.F_UserName + "(" + l.F_WorkNumber + ")";
5950 5974
                     }
5951 5975
                     else
5952 5976
                     {
5953 5977
                         users = users + "," + l.F_UserCode;
5954
-                        tousername = tousername + "," + l.F_UserName + "(" + l.F_UserCode + ")";
5978
+                        tousername = tousername + "," + l.F_UserName + "(" + l.F_WorkNumber + ")";
5955 5979
                     }
5956 5980
                     if (sms != 0)
5957 5981
                     {
@@ -5975,7 +5999,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
5975 5999
                         if (string.IsNullOrEmpty(htouser))
5976 6000
                         {
5977 6001
                             htouser = clus.F_UserCode;
5978
-                            htousername = clus.F_UserName + "(" + clus.F_UserCode + ")";
6002
+                            htousername = clus.F_UserName + "(" + clus.F_WorkNumber + ")";
5979 6003
                         }
5980 6004
                     }
5981 6005
                 }
@@ -5987,16 +6011,16 @@ namespace CallCenterApi.Interface.Controllers.workorder
5987 6011
                         if (string.IsNullOrEmpty(htouser))
5988 6012
                         {
5989 6013
                             htouser = l.F_UserCode;
5990
-                            htousername = l.F_UserName + "(" + l.F_UserCode + ")";
6014
+                            htousername = l.F_UserName + "(" + l.F_WorkNumber + ")";
5991 6015
                         }
5992 6016
                         else
5993 6017
                         {
5994 6018
                             htouser = htouser + "," + l.F_UserCode;
5995
-                            htousername = htousername + "," + l.F_UserName + "(" + l.F_UserCode + ")";
6019
+                            htousername = htousername + "," + l.F_UserName + "(" + l.F_WorkNumber  + ")";
5996 6020
                         }
5997 6021
                     }
5998 6022
                 }
5999
-                AddLog(model.F_ID, (int)EnumWorkOrderState.assign, "审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, htouser, hclbm, nowUser, overtime, sms, creat,2);
6023
+                AddLog(model.F_ID, (int)EnumWorkOrderState.assign,htousername+ "高层待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, htouser, hclbm, nowUser, overtime, sms, creat,2);
6000 6024
             }
6001 6025
             #endregion
6002 6026
             #region 工单处理

+ 7 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/WorkOrderNewInput.cs

@@ -713,6 +713,13 @@ namespace CallCenterApi.Interface.Models.Input
713 713
             get; set;
714 714
         }
715 715
         /// <summary>
716
+        /// 添加人工号
717
+        /// </summary>
718
+        public string CreateName
719
+        {
720
+            get; set;
721
+        }
722
+        /// <summary>
716 723
         /// 添加时间
717 724
         /// </summary>
718 725
         public DateTime? F_CreateOn