浏览代码

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

duhongyu 6 年之前
父节点
当前提交
ffff54b710

文件差异内容过多而无法显示
+ 23 - 5
codegit/CallCenterApi/CallCenterApi.DAL/T_Wo_WorkOrder.cs


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

426
                 //userAccountModel.F_CreateOn = DateTime.Now;
426
                 //userAccountModel.F_CreateOn = DateTime.Now;
427
 
427
 
428
                 //if (input.SeartGroupID != 0)
428
                 //if (input.SeartGroupID != 0)
429
-                userAccountModel.F_SeartGroupID = input.GroupId;
430
-                var GroupIDList = input.GroupId.Split('|');
431
                 userAccountModel.F_SeartGroup = "";
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
                             if (manage != null)
1831
                             if (manage != null)
1832
                             {
1832
                             {
1833
                                 model.F_QuestionType = manage.F_QuestionName;
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
                         {
1932
                         {
1925
                             model.F_CreateBy = creatname.F_WorkNumber; ;//添加人
1933
                             model.F_CreateBy = creatname.F_WorkNumber; ;//添加人
1926
                             model.F_CreateName = creatname.F_UserName; ;//添加人
1934
                             model.F_CreateName = creatname.F_UserName; ;//添加人
1935
+                            model.CreateName = creatname.F_UserName + "(" + creatname.F_WorkNumber + ")";
1927
                         }
1936
                         }
1928
 
1937
 
1929
                     }
1938
                     }
2990
                 if (clus != null)
2999
                 if (clus != null)
2991
                 {
3000
                 {
2992
                     touser = clus.F_UserCode;
3001
                     touser = clus.F_UserCode;
2993
-                    tousername = clus.F_UserName + "(" + touser + ")";
3002
+                    tousername = clus.F_UserName + "(" + clus.F_WorkNumber + ")";
2994
                 }
3003
                 }
2995
                 if (sms != 0)
3004
                 if (sms != 0)
2996
                 {
3005
                 {
3011
                     if (string.IsNullOrEmpty(users))
3020
                     if (string.IsNullOrEmpty(users))
3012
                     {
3021
                     {
3013
                         users = l.F_UserCode;
3022
                         users = l.F_UserCode;
3014
-                        tousername = l.F_UserName + "(" + l.F_UserCode + ")";
3023
+                        tousername = l.F_UserName + "(" + l.F_WorkNumber + ")";
3015
                     }
3024
                     }
3016
                     else
3025
                     else
3017
                     {
3026
                     {
3018
                         users = users + "," + l.F_UserCode;
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
                      if (sms != 0)
3030
                      if (sms != 0)
3022
                   {
3031
                   {
3041
                         if (string.IsNullOrEmpty(htouser))
3050
                         if (string.IsNullOrEmpty(htouser))
3042
                         {
3051
                         {
3043
                             htouser =  clus.F_UserCode;
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
                         else
3067
                         else
3059
                         {
3068
                         {
3060
                             htouser = htouser + "," + l.F_UserCode;
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
             #endregion
3077
             #endregion

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

178
                             if (GetParticipateID() != "")
178
                             if (GetParticipateID() != "")
179
                             {
179
                             {
180
                                 sql += " and  T_Wo_WorkOrder.F_ID in ( " + GetParticipateID() + ") ";
180
                                 sql += " and  T_Wo_WorkOrder.F_ID in ( " + GetParticipateID() + ") ";
181
+                                sql += " and F_State =" + (int)EnumWorkOrderState.assign;
181
                             }
182
                             }
182
                         }
183
                         }
183
                         else
184
                         else
1886
         public string GetParticipateID()
1887
         public string GetParticipateID()
1887
         {
1888
         {
1888
             string str = string.Empty;
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
             return str;
1893
             return str;
2170
             int userId = CurrentUser.UserData.F_UserId;
2171
             int userId = CurrentUser.UserData.F_UserId;
2171
             if (userId != 0)
2172
             if (userId != 0)
2172
             {
2173
             {
2174
+                string msg = "";
2173
                   if (id <=0)
2175
                   if (id <=0)
2174
                     return Error("请输入正确的id");
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
                 if (itemlasts != null)
2186
                 if (itemlasts != null)
2177
                 {
2187
                 {
2178
                         var obj = new
2188
                         var obj = new
2197
         /// <summary>
2207
         /// <summary>
2198
         ///综合查询列表
2208
         ///综合查询列表
2199
         /// </summary>
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
             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)
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
             int userId = CurrentUser.UserData.F_UserId;
2213
             int userId = CurrentUser.UserData.F_UserId;
2212
                    sql += $" and F_State=" + state;
2222
                    sql += $" and F_State=" + state;
2213
                 if (source > 0)//工单来源
2223
                 if (source > 0)//工单来源
2214
                     sql += $" and F_Source=" + source;
2224
                     sql += $" and F_Source=" + source;
2225
+
2215
                 if (!string.IsNullOrWhiteSpace(createby))//创建人
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
                 if (!string.IsNullOrWhiteSpace(touser))//参与人
2236
                 if (!string.IsNullOrWhiteSpace(touser))//参与人
2218
                     sql += $" and F_DealBy like '%" + touser.Trim() + "%'";
2237
                     sql += $" and F_DealBy like '%" + touser.Trim() + "%'";
2219
                 if (!string.IsNullOrWhiteSpace(code))//工单编号
2238
                 if (!string.IsNullOrWhiteSpace(code))//工单编号
2220
                     sql += $" and F_WorkOrderCode like '%" + code.Trim() + "%'";
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
                 if (!string.IsNullOrWhiteSpace(keywords))//关键字搜索
2244
                 if (!string.IsNullOrWhiteSpace(keywords))//关键字搜索
2222
                     sql += $"  and  (F_QuestionType like '%" + keywords.Trim()
2245
                     sql += $"  and  (F_QuestionType like '%" + keywords.Trim()
2223
                          + "%' or F_ZX_Area like '%" + keywords.Trim() + "%' or F_ZX_Branch like '%" + keywords.Trim() 
2246
                          + "%' or F_ZX_Area like '%" + keywords.Trim() + "%' or F_ZX_Branch like '%" + keywords.Trim() 
4011
                         {
4034
                         {
4012
                             model.F_CreateBy = creatname.F_WorkNumber; ;//添加人
4035
                             model.F_CreateBy = creatname.F_WorkNumber; ;//添加人
4013
                             model.F_CreateName = creatname.F_UserName ; ;//添加人
4036
                             model.F_CreateName = creatname.F_UserName ; ;//添加人
4037
+                            model.CreateName = creatname.F_UserName + "(" + creatname.F_WorkNumber + ")";
4014
                         }
4038
                         }
4015
                     }
4039
                     }
4016
                     model.F_UpdateBy = model1[i].F_UpdateBy;//修改人工号
4040
                     model.F_UpdateBy = model1[i].F_UpdateBy;//修改人工号
5924
                 if (clus != null)
5948
                 if (clus != null)
5925
                 {
5949
                 {
5926
                     touser = clus.F_UserCode;
5950
                     touser = clus.F_UserCode;
5927
-                    tousername = clus.F_UserName + "(" + touser + ")";
5951
+                    tousername = clus.F_UserName + "(" + clus.F_WorkNumber + ")";
5928
                     if (sms != 0)
5952
                     if (sms != 0)
5929
                     {
5953
                     {
5930
                         if (!string .IsNullOrEmpty (clus.F_Mobile.Trim ()))
5954
                         if (!string .IsNullOrEmpty (clus.F_Mobile.Trim ()))
5946
                     if (string.IsNullOrEmpty(users))
5970
                     if (string.IsNullOrEmpty(users))
5947
                     {
5971
                     {
5948
                         users = l.F_UserCode;
5972
                         users = l.F_UserCode;
5949
-                        tousername = l.F_UserName + "(" + l.F_UserCode + ")";
5973
+                        tousername = l.F_UserName + "(" + l.F_WorkNumber + ")";
5950
                     }
5974
                     }
5951
                     else
5975
                     else
5952
                     {
5976
                     {
5953
                         users = users + "," + l.F_UserCode;
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
                     if (sms != 0)
5980
                     if (sms != 0)
5957
                     {
5981
                     {
5975
                         if (string.IsNullOrEmpty(htouser))
5999
                         if (string.IsNullOrEmpty(htouser))
5976
                         {
6000
                         {
5977
                             htouser = clus.F_UserCode;
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
                         if (string.IsNullOrEmpty(htouser))
6011
                         if (string.IsNullOrEmpty(htouser))
5988
                         {
6012
                         {
5989
                             htouser = l.F_UserCode;
6013
                             htouser = l.F_UserCode;
5990
-                            htousername = l.F_UserName + "(" + l.F_UserCode + ")";
6014
+                            htousername = l.F_UserName + "(" + l.F_WorkNumber + ")";
5991
                         }
6015
                         }
5992
                         else
6016
                         else
5993
                         {
6017
                         {
5994
                             htouser = htouser + "," + l.F_UserCode;
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
             #endregion
6025
             #endregion
6002
             #region 工单处理
6026
             #region 工单处理

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

713
             get; set;
713
             get; set;
714
         }
714
         }
715
         /// <summary>
715
         /// <summary>
716
+        /// 添加人工号
717
+        /// </summary>
718
+        public string CreateName
719
+        {
720
+            get; set;
721
+        }
722
+        /// <summary>
716
         /// 添加时间
723
         /// 添加时间
717
         /// </summary>
724
         /// </summary>
718
         public DateTime? F_CreateOn
725
         public DateTime? F_CreateOn