Browse Source

双汇工单删除 公关经理调整 密码修改

duhongyu 5 years ago
parent
commit
7ce1a310e7

+ 2 - 2
codegit/CallCenterApi/CallCenterApi.DAL/T_Bus_WorkOrder.cs

@@ -446,10 +446,10 @@ namespace CallCenterApi.DAL
446 446
         /// <summary>
447 447
         /// 批量删除数据
448 448
         /// </summary>
449
-        public bool DeleteList(string F_Idlist)
449
+        public bool DeleteList(string F_Idlist,string user)
450 450
         {
451 451
             StringBuilder strSql = new StringBuilder();
452
-            strSql.Append("update  T_Bus_WorkOrder set F_IsDelete=1");
452
+            strSql.Append("update  T_Bus_WorkOrder set F_IsDelete=1,F_DeleteUser='"+user+ "',F_DeleteTime='"+DateTime .Now.ToString ("yyyy-MM-dd HH:mm:ss")+"'");
453 453
             strSql.Append(" where F_Id in (" + F_Idlist + ")  ");
454 454
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
455 455
             if (rows > 0)

+ 5 - 3
codegit/CallCenterApi/CallCenterApi.DB/DbHelperSQL.cs

@@ -558,7 +558,6 @@ namespace CallCenterApi.DB
558 558
         /// <returns>DataSet</returns>
559 559
         public static DataSet Query(string SQLString)
560 560
         {
561
-
562 561
             using (SqlConnection connection = new SqlConnection(connectionString))
563 562
             {
564 563
                 DataSet ds = new DataSet();
@@ -986,6 +985,7 @@ namespace CallCenterApi.DB
986 985
             using (SqlConnection connection = new SqlConnection(connectionString))
987 986
             {
988 987
                 SqlCommand cmd = new SqlCommand();
988
+                cmd.CommandTimeout = 500;
989 989
                 PrepareCommand(cmd, connection, null, SQLString, cmdParms);
990 990
                 using (SqlDataAdapter da = new SqlDataAdapter(cmd))
991 991
                 {
@@ -1039,7 +1039,7 @@ namespace CallCenterApi.DB
1039 1039
                 conn.Open();
1040 1040
             cmd.Connection = conn;
1041 1041
             cmd.CommandText = cmdText;
1042
-            cmd.CommandTimeout = 300;
1042
+            cmd.CommandTimeout = 600;
1043 1043
             if (trans != null)
1044 1044
                 cmd.Transaction = trans;
1045 1045
             cmd.CommandType = CommandType.Text;//cmdType;
@@ -1115,6 +1115,7 @@ namespace CallCenterApi.DB
1115 1115
                 connection.Open();
1116 1116
                 SqlDataAdapter sqlDA = new SqlDataAdapter();
1117 1117
                 sqlDA.SelectCommand = BuildQueryCommand(connection, storedProcName, parameters);
1118
+              
1118 1119
                 sqlDA.Fill(dataSet, tableName);
1119 1120
                 connection.Close();
1120 1121
                 return dataSet;
@@ -1147,6 +1148,7 @@ namespace CallCenterApi.DB
1147 1148
         {
1148 1149
             SqlCommand command = new SqlCommand(storedProcName, connection);
1149 1150
             command.CommandType = CommandType.StoredProcedure;
1151
+            command.CommandTimeout = 500;
1150 1152
             foreach (SqlParameter parameter in parameters)
1151 1153
             {
1152 1154
                 if (parameter != null)
@@ -1299,7 +1301,7 @@ namespace CallCenterApi.DB
1299 1301
                 new SqlParameter("@SqlTable",SqlDbType.VarChar,1000),
1300 1302
                 new SqlParameter("@SqlPK",SqlDbType.VarChar,50),
1301 1303
                 new SqlParameter("@SqlField",SqlDbType.VarChar,1000),
1302
-                new SqlParameter("@SqlWhere",SqlDbType.VarChar,1000),
1304
+                new SqlParameter("@SqlWhere",SqlDbType.VarChar,-1),
1303 1305
                 new SqlParameter("@SqlOrder",SqlDbType.VarChar,200),
1304 1306
                 new SqlParameter("@PageSize",SqlDbType.Int),
1305 1307
                 new SqlParameter("@PageIndex",SqlDbType.Int),

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

@@ -1143,7 +1143,7 @@ namespace CallCenterApi.Interface.Controllers
1143 1143
                     return Error("请输入密码");
1144 1144
                 if (string.IsNullOrWhiteSpace(usercode))
1145 1145
                     return Error("账号错误");
1146
-                var model = sysUserAccountBll.GetModel(int.Parse(usercode));
1146
+                var model = sysUserAccountBll.GetModel(usercode);
1147 1147
                 if (model == null) return Error("此用户不存在");
1148 1148
                 if (!model.F_Password.Equals(oldPwd)) return Error("原密码不正确");
1149 1149
                 model.F_Password = pwd;

+ 7 - 6
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/BusinessController.cs

@@ -469,7 +469,7 @@ namespace CallCenterApi.Interface.Controllers.report
469 469
         private string User(string DeptName )
470 470
         {
471 471
             string user="";
472
-             if (DeptName== "京津"|| DeptName == "豫南" || DeptName == "豫北")
472
+             if (DeptName== "京津"|| DeptName == "豫南" || DeptName == "豫北" || DeptName == "吉林")
473 473
             {
474 474
                 var usermodel = new BLL.T_Sys_UserAccount().GetModel("8009");
475 475
                 if (usermodel != null)
@@ -482,21 +482,22 @@ namespace CallCenterApi.Interface.Controllers.report
482 482
                 if (usermodel != null)
483 483
                     user = usermodel.F_UserName;
484 484
             }
485
-            else if ( DeptName == "川渝" || DeptName == "湘赣" || DeptName == "西北" || DeptName == "华南")
485
+            else if ( DeptName == "川渝" || DeptName == "湘赣" || DeptName == "陕宁" || DeptName == "晋蒙" || DeptName == "华南")
486 486
             {
487
-                var usermodel = new BLL.T_Sys_UserAccount().GetModel("8011");
487
+                var usermodel = new BLL.T_Sys_UserAccount().GetModel("822353");
488 488
                 if (usermodel != null)
489 489
                     user = usermodel.F_UserName;
490 490
             }
491
-            else if (DeptName == "安徽" || DeptName == "湖北" || DeptName == "晋蒙"  || DeptName == "云贵" || DeptName == "陕宁")
491
+            else if (DeptName == "安徽" || DeptName == "湖北" || DeptName == "西北" || DeptName == "云贵" )
492 492
             {
493
-                
494 493
                 var usermodel = new BLL.T_Sys_UserAccount().GetModel("8012");
495 494
                 if (usermodel != null)
496 495
                     user = usermodel.F_UserName;
497 496
             }
498
-            else if (DeptName == "吉林" || DeptName == "辽宁" || DeptName == "黑龙江" || DeptName == "河北" || DeptName == "江苏" )
497
+            else if ( DeptName == "辽宁" || DeptName == "黑龙江" || DeptName == "河北" || DeptName == "江苏" )
499 498
             {
499
+              
500
+
500 501
                 var usermodel = new BLL.T_Sys_UserAccount().GetModel("822249");
501 502
                 if (usermodel != null)
502 503
                     user = usermodel.F_UserName;

File diff suppressed because it is too large
+ 34 - 25
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs


+ 30 - 24
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkorderAppController.cs

@@ -1254,51 +1254,57 @@ namespace CallCenterApi.Interface.Controllers.workorder
1254 1254
         /// 获取处理专员下的大区人员
1255 1255
         /// </summary>
1256 1256
         /// <returns></returns>
1257
-        private string  HandleUser(Model.T_Sys_UserAccount ua)
1257
+        private string HandleUser(Model.T_Sys_UserAccount ua)
1258 1258
         {
1259 1259
             string dept = "";
1260
-          if (ua .F_UserCode  == "8009")
1260
+            if (ua.F_UserCode == "8009")
1261 1261
             {
1262
-                Model .T_Sys_Department dept1 = new BLL.T_Sys_Department().GetModelList ("F_DeptName='京津'").FirstOrDefault();
1262
+                Model.T_Sys_Department dept1 = new BLL.T_Sys_Department().GetModelList("F_DeptName='京津'").FirstOrDefault();
1263 1263
                 Model.T_Sys_Department dept2 = new BLL.T_Sys_Department().GetModelList("F_DeptName='豫南'").FirstOrDefault();
1264 1264
                 Model.T_Sys_Department dept3 = new BLL.T_Sys_Department().GetModelList("F_DeptName='豫北'").FirstOrDefault();
1265
-                Model.T_Sys_Department dept4 = new BLL.T_Sys_Department().GetModelList("F_DeptName='黑龙江'").FirstOrDefault();
1266 1265
                 Model.T_Sys_Department dept5 = new BLL.T_Sys_Department().GetModelList("F_DeptName='吉林'").FirstOrDefault();
1267
-                Model.T_Sys_Department dept6 = new BLL.T_Sys_Department().GetModelList("F_DeptName='辽宁'").FirstOrDefault();
1268
-                dept += dept1.F_DeptId + "," + dept2.F_DeptId + "," + dept3.F_DeptId + "," + dept4.F_DeptId + "," + dept5.F_DeptId + "," + dept6.F_DeptId;
1266
+                dept += dept1.F_DeptId + "," + dept2.F_DeptId + "," + dept3.F_DeptId + "," + dept5.F_DeptId;
1269 1267
             }
1270
-            if (ua.F_UserCode == "8010")
1268
+            else if (ua.F_UserCode == "8010")
1271 1269
             {
1272 1270
                 Model.T_Sys_Department dept1 = new BLL.T_Sys_Department().GetModelList("F_DeptName='山东'").FirstOrDefault();
1273 1271
                 Model.T_Sys_Department dept2 = new BLL.T_Sys_Department().GetModelList("F_DeptName='华东'").FirstOrDefault();
1274
-                Model.T_Sys_Department dept3 = new BLL.T_Sys_Department().GetModelList("F_DeptName='江苏'").FirstOrDefault();
1275
-                Model.T_Sys_Department dept4 = new BLL.T_Sys_Department().GetModelList("F_DeptName='河北'").FirstOrDefault();
1276
-                dept += dept1.F_DeptId + "," + dept2.F_DeptId + "," + dept3.F_DeptId + "," + dept4.F_DeptId  ;
1272
+                dept += dept1.F_DeptId + "," + dept2.F_DeptId;
1277 1273
             }
1278
-            if (ua.F_UserCode == "8011")
1274
+            else if (ua.F_UserCode == "822249")
1279 1275
             {
1280
-                Model.T_Sys_Department dept1 = new BLL.T_Sys_Department().GetModelList("F_DeptName='华南'").FirstOrDefault();
1281
-                Model.T_Sys_Department dept2 = new BLL.T_Sys_Department().GetModelList("F_DeptName='川渝'").FirstOrDefault();
1282
-                Model.T_Sys_Department dept3 = new BLL.T_Sys_Department().GetModelList("F_DeptName='湘赣'").FirstOrDefault();
1283
-                Model.T_Sys_Department dept4 = new BLL.T_Sys_Department().GetModelList("F_DeptName='西北'").FirstOrDefault();
1276
+                Model.T_Sys_Department dept1 = new BLL.T_Sys_Department().GetModelList("F_DeptName='辽宁'").FirstOrDefault();
1277
+                Model.T_Sys_Department dept2 = new BLL.T_Sys_Department().GetModelList("F_DeptName='江苏'").FirstOrDefault();
1278
+                Model.T_Sys_Department dept3 = new BLL.T_Sys_Department().GetModelList("F_DeptName='黑龙江'").FirstOrDefault();
1279
+                Model.T_Sys_Department dept4 = new BLL.T_Sys_Department().GetModelList("F_DeptName='北'").FirstOrDefault();
1284 1280
 
1285 1281
                 dept += dept1.F_DeptId + "," + dept2.F_DeptId + "," + dept3.F_DeptId + "," + dept4.F_DeptId;
1286 1282
             }
1287
-            if (ua.F_UserCode == "8012")
1283
+
1284
+            else if (ua.F_UserCode == "822353")
1288 1285
             {
1286
+                Model.T_Sys_Department dept2 = new BLL.T_Sys_Department().GetModelList("F_DeptName='川渝'").FirstOrDefault();
1287
+                Model.T_Sys_Department dept3 = new BLL.T_Sys_Department().GetModelList("F_DeptName='湘赣'").FirstOrDefault();
1289 1288
                 Model.T_Sys_Department dept1 = new BLL.T_Sys_Department().GetModelList("F_DeptName='陕宁'").FirstOrDefault();
1290
-                Model.T_Sys_Department dept2 = new BLL.T_Sys_Department().GetModelList("F_DeptName='晋蒙'").FirstOrDefault();
1291
-                Model.T_Sys_Department dept3 = new BLL.T_Sys_Department().GetModelList("F_DeptName='鄂皖'").FirstOrDefault();
1289
+                Model.T_Sys_Department dept4 = new BLL.T_Sys_Department().GetModelList("F_DeptName='晋蒙'").FirstOrDefault();
1290
+                Model.T_Sys_Department dept5 = new BLL.T_Sys_Department().GetModelList("F_DeptName='华南'").FirstOrDefault();
1291
+                dept += dept1.F_DeptId + "," + dept2.F_DeptId + "," + dept3.F_DeptId + "," + dept4.F_DeptId + "," + dept5.F_DeptId;
1292
+            }
1293
+            else if (ua.F_UserCode == "8012")
1294
+            {
1295
+                Model.T_Sys_Department dept1 = new BLL.T_Sys_Department().GetModelList("F_DeptName='湖北'").FirstOrDefault();
1296
+                Model.T_Sys_Department dept2 = new BLL.T_Sys_Department().GetModelList("F_DeptName='安徽'").FirstOrDefault();
1297
+                Model.T_Sys_Department dept3 = new BLL.T_Sys_Department().GetModelList("F_DeptName='西北'").FirstOrDefault();
1292 1298
                 Model.T_Sys_Department dept4 = new BLL.T_Sys_Department().GetModelList("F_DeptName='云贵'").FirstOrDefault();
1293 1299
 
1294 1300
                 dept += dept1.F_DeptId + "," + dept2.F_DeptId + "," + dept3.F_DeptId + "," + dept4.F_DeptId;
1295 1301
             }
1296 1302
             return dept;
1297
-           
1303
+
1298 1304
         }
1299 1305
 
1300
-       
1301
-     
1306
+
1307
+
1302 1308
         /// <summary>
1303 1309
         /// 删除工单
1304 1310
         /// </summary>
@@ -1311,8 +1317,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
1311 1317
                     int userId = CurrentUser.UserData.F_UserId;
1312 1318
             if (userId != 0)
1313 1319
             {
1314
-
1315
-                if (ids != null && ids.Length > 0)
1320
+                    Model.T_Sys_UserAccount ua = userBLL.GetModel(userId);
1321
+                    if (ids != null && ids.Length > 0)
1316 1322
                 {
1317 1323
                     bool res = true;
1318 1324
                     string idd = " ";
@@ -1323,7 +1329,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1323 1329
 
1324 1330
                     if (!string.IsNullOrEmpty(idd.Trim()))
1325 1331
                         {
1326
-                            if (workorderBLL.DeleteList(idd.TrimEnd(',')))
1332
+                            if (workorderBLL.DeleteList(idd.TrimEnd(','),ua.F_UserCode ))
1327 1333
                             {
1328 1334
                                 return Success("设置成功");
1329 1335