zhangkun лет назад: 5
Родитель
Сommit
89f09251b2

+ 0 - 5
web/BaseCallCenter.Common/StringHelper.cs

@@ -310,11 +310,6 @@ namespace YTSoft.Common
310 310
         }
311 311
 
312 312
 
313
-        public static int ToInt32(this string str)
314
-        {
315
-            return Convert.ToInt32(str);
316
-        }
317
-
318 313
         public static decimal Todecimal(this string str)
319 314
         {
320 315
             return Convert.ToDecimal(str);

+ 4 - 4
web/BaseCallCenter.DAL/COM/T_Com_logAction.cs

@@ -373,13 +373,13 @@ namespace YTSoft.BaseCallCenter.DAL
373 373
         public static bool AddAction(string UserName, int id, string ActionName, string oldobj = "", string ContentNew = "操作记录",string module1="",string module2="")
374 374
         {
375 375
             Model.T_Com_LogAction modellog = new Model.T_Com_LogAction();
376
-            modellog.ActionName = ActionName;
377
-            modellog.AddUser = UserName;
376
+            modellog.ActionName = ActionName.ToMyString();
377
+            modellog.AddUser = UserName.ToMyString();
378 378
             modellog.AddUserId = id;
379 379
             modellog.Atime = DateTime.Now;
380 380
             modellog.ActionUrl = module1+"-"+ module2;
381
-            modellog.ContentNew = ContentNew;
382
-            modellog.ContentOld = oldobj;
381
+            modellog.ContentNew = ContentNew.ToMyString();
382
+            modellog.ContentOld = oldobj.ToMyString();
383 383
             modellog.TableId = id.ToMyString();
384 384
             modellog.TableName = module1+"—"+module2;
385 385
 

+ 1 - 1
web/BaseCallCenter.DAL/T_Wo_WorkOrderBase.cs

@@ -1438,7 +1438,7 @@ F_SERVICETYPE,F_DECLARATIONTIME,F_SERVICENATURE,F_SERVICEWAY,F_RETURNVISITMAN,F_
1438 1438
                                     modelNotice.OrderId = model.F_WORKORDERID;
1439 1439
                                     modelNotice.NoticeType = 0;
1440 1440
                                     modelNotice.NoticeState = 1;
1441
-                                    modelNotice.NoticeDeptName = historyModel.F_NEXTOWNERARRID;
1441
+                                    modelNotice.NoticeDeptName = historyModel.F_NEXTOWNERARRID.ToMyString();
1442 1442
                                     modelNotice.NoticeDeptId = historyModel.F_OPTBTNID.ToInt32();
1443 1443
                                     NoticeBll.Add(modelNotice);
1444 1444
                                 }

+ 16 - 0
web/BaseCallCenter.DBUtility/DbHelperSQL.cs

@@ -226,6 +226,7 @@ namespace YTSoft.DBUtility
226 226
                 catch (System.Data.SqlClient.SqlException e)
227 227
                 {
228 228
                     trans.Rollback();
229
+                    LogHelper.Default.WriteError(SQLString, e);
229 230
                     throw e;
230 231
                 }
231 232
             }
@@ -247,6 +248,7 @@ namespace YTSoft.DBUtility
247 248
                     catch (System.Data.SqlClient.SqlException e)
248 249
                     {
249 250
                         connection.Close();
251
+                        LogHelper.Default.WriteError(SQLString, e);
250 252
                         throw e;
251 253
                     }
252 254
                 }
@@ -425,6 +427,7 @@ namespace YTSoft.DBUtility
425 427
                 }
426 428
                 catch (System.Data.SqlClient.SqlException e)
427 429
                 {
430
+                    LogHelper.Default.WriteError(SQLString, e);
428 431
                     throw e;
429 432
                 }
430 433
                 finally
@@ -463,6 +466,7 @@ namespace YTSoft.DBUtility
463 466
                 }
464 467
                 catch (System.Data.SqlClient.SqlException e)
465 468
                 {
469
+                    LogHelper.Default.WriteError(SQLString, e);
466 470
                     throw e;
467 471
                 }
468 472
                 finally
@@ -494,6 +498,7 @@ namespace YTSoft.DBUtility
494 498
                 }
495 499
                 catch (System.Data.SqlClient.SqlException e)
496 500
                 {
501
+                    LogHelper.Default.WriteError(strSQL, e);
497 502
                     throw e;
498 503
                 }
499 504
                 finally
@@ -535,6 +540,7 @@ namespace YTSoft.DBUtility
535 540
                     catch (System.Data.SqlClient.SqlException e)
536 541
                     {
537 542
                         connection.Close();
543
+                        LogHelper.Default.WriteError(SQLString, e);
538 544
                         throw e;
539 545
                     }
540 546
                 }
@@ -567,6 +573,7 @@ namespace YTSoft.DBUtility
567 573
                     catch (System.Data.SqlClient.SqlException e)
568 574
                     {
569 575
                         connection.Close();
576
+                        LogHelper.Default.WriteError(SQLString, e);
570 577
                         throw e;
571 578
                     }
572 579
                 }
@@ -593,6 +600,7 @@ namespace YTSoft.DBUtility
593 600
             }
594 601
             catch (System.Data.SqlClient.SqlException e)
595 602
             {
603
+                LogHelper.Default.WriteError(strSQL, e);
596 604
                 throw e;
597 605
             }
598 606
 
@@ -620,6 +628,7 @@ namespace YTSoft.DBUtility
620 628
                 }
621 629
                 catch (System.Data.SqlClient.SqlException ex)
622 630
                 {
631
+                    LogHelper.Default.WriteError(SQLString, ex);
623 632
                     throw new Exception(ex.Message);
624 633
                 }
625 634
                 return ds;
@@ -644,6 +653,7 @@ namespace YTSoft.DBUtility
644 653
                 }
645 654
                 catch (System.Data.SqlClient.SqlException ex)
646 655
                 {
656
+                    LogHelper.Default.WriteError(SQLString, ex);
647 657
                     throw new Exception(ex.Message);
648 658
                 }
649 659
                 return ds;
@@ -672,6 +682,7 @@ namespace YTSoft.DBUtility
672 682
             }
673 683
             catch (System.Data.SqlClient.SqlException ex)
674 684
             {
685
+                LogHelper.Default.WriteError(SQLString, ex);
675 686
                 throw new Exception(ex.Message);
676 687
             }
677 688
             return ds;
@@ -707,6 +718,7 @@ namespace YTSoft.DBUtility
707 718
                     }
708 719
                     catch (System.Data.SqlClient.SqlException e)
709 720
                     {
721
+                        LogHelper.Default.WriteError(SQLString,e);
710 722
                         throw e;
711 723
                     }
712 724
                 }
@@ -738,6 +750,7 @@ namespace YTSoft.DBUtility
738 750
                 catch (System.Data.SqlClient.SqlException e)
739 751
                 {
740 752
                     trans.Rollback();
753
+                    LogHelper.Default.WriteError(SQLString, e);
741 754
                     throw e;
742 755
                 }
743 756
             }
@@ -774,6 +787,7 @@ namespace YTSoft.DBUtility
774 787
                     catch
775 788
                     {
776 789
                         trans.Rollback();
790
+                      
777 791
                         return 0;
778 792
                     }
779 793
                 }
@@ -844,6 +858,7 @@ namespace YTSoft.DBUtility
844 858
                     catch
845 859
                     {
846 860
                         trans.Rollback();
861
+                       
847 862
                         throw;
848 863
                     }
849 864
                 }
@@ -895,6 +910,7 @@ namespace YTSoft.DBUtility
895 910
                     catch
896 911
                     {
897 912
                         trans.Rollback();
913
+
898 914
                         return 0;
899 915
                     }
900 916
                 }

+ 17 - 0
web/BaseCallCenter.Model/Enum/SSOEnum.cs

@@ -0,0 +1,17 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Runtime.Serialization;
6
+
7
+namespace YTSoft.BaseCallCenter.Model
8
+{
9
+
10
+    public enum SSOEnum:int
11
+    {
12
+         没有登录=1,
13
+         没有权限=2,
14
+         成功
15
+            
16
+    }
17
+}

+ 1 - 0
web/BaseCallCenter.Model/YTSoft.BaseCallCenter.Model.csproj

@@ -51,6 +51,7 @@
51 51
     <Compile Include="COM\T_Com_Class.cs" />
52 52
     <Compile Include="COM\T_Com_Tag.cs" />
53 53
     <Compile Include="COM\T_Com_logAction.cs" />
54
+    <Compile Include="Enum\SSOEnum.cs" />
54 55
     <Compile Include="HW\T_HW_DutyNumber.cs" />
55 56
     <Compile Include="KF\quick_msgs_log.cs" />
56 57
     <Compile Include="KF\kf_quick_msgs.cs" />

+ 1 - 1
web/YTSoft.BaseCallCenter.MVCWeb/Controllers/BaseController.cs

@@ -374,7 +374,7 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
374 374
             modellog.Atime = DateTime.Now;
375 375
             modellog.ActionUrl = string.Format("/{0}/{1}", RouteData.Values["controller"], RouteData.Values["action"]);
376 376
             modellog.ContentNew = ContentNew;
377
-            modellog.ContentOld = oldobj;
377
+            modellog.ContentOld = oldobj.ToMyString();
378 378
             modellog.TableId = id.ToMyString();
379 379
             modellog.TableName = TableName.ToLower();
380 380
 

+ 59 - 54
web/YTSoft.BaseCallCenter.MVCWeb/Controllers/DefaultController.cs

@@ -1,5 +1,6 @@
1 1
 using System;
2 2
 using System.Collections.Generic;
3
+using System.Configuration;
3 4
 using System.Data;
4 5
 using System.Linq;
5 6
 using System.Text;
@@ -25,6 +26,9 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
25 26
                 userInfo.F_UserName = cookies["Name"];
26 27
 
27 28
             }
29
+            //TimeSpan ts = DateTime.Now - new DateTime(1999, 1, 1, 0, 0, 0, 0);
30
+            //int db = ts.TotalSeconds.ToInt32();
31
+            userInfo.ExtensionCode = ConfigurationManager.AppSettings["sso"].ToMyString();
28 32
            // userInfo.F_UserName = SystemInfo.GetCpuPerformancevalue();
29 33
             return View(userInfo);
30 34
         }
@@ -238,54 +242,57 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
238 242
 
239 243
         public ActionResult SSO()
240 244
         {
245
+            bool res = false; //标记是否登录
241 246
 
242
-           string[] headerNames = Request.Headers.AllKeys;
243
-            foreach (string strtemp in headerNames)
244
-            {
245
-
246
-
247
-                string value = Request.Headers.Get(strtemp);
248
-                LogHelper.Default.WriteInfo(strtemp + ":" + value);
249
-            }
250 247
 
251
-            string strReturn = "success";
252
-            bool res = false; //标记是否登录
253
-            bool power = false;
254 248
             string LoginName=Request.Headers.Get("OAM_REMOTE_USER");
255
-            //string LoginName1 = ""; 
256
-            //if (Request.Headers.GetValues("OAM_REMOTE_USER") != null)
257
-            //{
258
-            //    LoginName1= Request.Headers.GetValues("OAM_REMOTE_USER").FirstOrDefault(); 
259
-            //}
260
-            //string LoginName2 = Request.Headers["OAM_REMOTE_USER"].ToMyString();
261 249
             LogHelper.Default.WriteInfo("LoginName:" + LoginName.ToMyString());
262
-            //LogHelper.Default.WriteInfo("LoginName1:" + LoginName1.ToMyString());
263
-            //LogHelper.Default.WriteInfo("LoginName2:" + LoginName2.ToMyString());
264 250
             if (!string.IsNullOrEmpty(LoginName))
265 251
             {
266 252
                
267 253
                 if (!"Anonymous".Equals(LoginName))
268 254
                 {
269 255
                     res = true;
256
+                    TimeSpan ts = DateTime.Now - new DateTime(1999, 1, 1, 0, 0, 0, 0);
257
+
258
+                    string key = DESEncrypt.Encrypt(ts.TotalSeconds.ToString(), "SSO" + LoginName);
259
+                    return new RedirectResult(string.Format("{2}/default/SSOShow?userid={0}&key={1}", LoginName, key, ConfigurationManager.AppSettings["domain"]));
270 260
                 }
271 261
             }
272 262
 
273
-            //正常登录
274
-            if (res)
263
+            return View();
264
+        }
265
+        public ActionResult SSOShow()
266
+        {
267
+
268
+            ReturnData rd = new ReturnData { code = -1, msg = "默认错误" };
269
+            string userid = Request.QueryString["userid"].ToMyString();
270
+            string key = Request.QueryString["key"].ToMyString();
271
+
272
+            if (userid != "" && key != "")
275 273
             {
276
-                DataTable dt = new DataTable();
277
-                try
274
+                TimeSpan ts = DateTime.Now - new DateTime(1999, 1, 1, 0, 0, 0, 0);
275
+                int tsInt = ts.TotalSeconds.ToInt32();
276
+
277
+                int tsKey = DESEncrypt.Decrypt(key, "SSO" + userid).ToInt32();
278
+                LogHelper.Default.WriteInfo("tsInt:" + tsInt.ToMyString());
279
+                LogHelper.Default.WriteInfo("tsKey:" + tsKey.ToMyString());
280
+                if (tsInt - tsKey < 10)
278 281
                 {
279
-                    DataSet ds = busUserInfo.GetList(" F_UserCode=" + LoginName);
280
-                    if (ds != null)
282
+                    DataTable dt = new DataTable();
283
+                    try
281 284
                     {
282
-                        dt = ds.Tables[0];
283
-                        if (dt != null && dt.Rows.Count > 0)
285
+                        DataSet ds = busUserInfo.GetList(" F_UserCode=" + userid);
286
+
287
+                        if (ds != null && ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
284 288
                         {
285
-                            power = true;
289
+                            dt = ds.Tables[0];
290
+
291
+                            rd.code = 0;
292
+                            rd.msg = "成功";
286 293
                             //记住用户名每3个月更换一次
287 294
                             HttpCookie cookie = new HttpCookie("platform");
288
-                            cookie.Values.Add("Name", LoginName);
295
+                            cookie.Values.Add("Name", userid);
289 296
                             cookie.Values.Add("islocal", "0");
290 297
                             cookie.Expires = System.DateTime.Now.AddMonths(3);
291 298
                             Response.Cookies.Add(cookie);
@@ -314,7 +321,7 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
314 321
                             new BLL.T_Sys_LoginLogs().Add(new Model.T_Sys_LoginLogs()
315 322
                             {
316 323
                                 F_LoginName = dt.Rows[0]["F_UserName"].ToString(),
317
-                                F_LoginId =dt.Rows[0]["F_UserId"].ToInt32(),
324
+                                F_LoginId = dt.Rows[0]["F_UserId"].ToInt32(),
318 325
                                 F_Result = "单点登录成功",
319 326
                                 F_LoginIP = Common.DTRequest.GetIP(),
320 327
                                 F_Hostname = Common.DTRequest.GetIP(),
@@ -329,43 +336,41 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
329 336
                             bll.UpdateWXId("ExtensionCode", extensionphone.ToInt32(), dt.Rows[0]["F_UserId"].ToInt32());
330 337
 
331 338
                         }
332
-                    }
339
+                        else
340
+                        {
341
+                            rd.msg = "没有权限";
342
+                        }
333 343
 
334 344
 
345
+                    }
346
+                    catch (Exception ex)
347
+                    {
348
+                        rd.msg = "error";
349
+                        LogHelper.Default.WriteError(ex.Message, ex);
350
+                    }
351
+                    finally
352
+                    {
353
+                        dt.Clear();
354
+                        dt.Dispose();
355
+                    }
335 356
                 }
336
-                catch (Exception ex)
337
-                {
338
-                    LogHelper.Default.WriteError(ex.Message, ex);
339
-                }
340
-                finally
357
+                else
341 358
                 {
342
-                    dt.Clear();
343
-                    dt.Dispose();
359
+                    rd.msg = "非法路径";
344 360
                 }
345 361
             }
346 362
             else
347 363
             {
348
-                //没有登录 跳转到集团登录页
364
+                rd.msg = "没有登录";
349 365
             }
350 366
 
351
-
352
-       
353
-            if (!res)
354
-            {
355
-                strReturn = "没有登录";
356
-            }
357
-            else if (!power)
367
+            if (rd.code == 0)
358 368
             {
359
-                strReturn = "没有权限";
360
-            }
361
-            ViewBag.Return = strReturn;
362
-            if (strReturn == "success")
363
-            {
364
-                return View();
365
-                //return RedirectToAction("Index", "Main");
369
+                return RedirectToAction("Index", "Main");
366 370
             }
367 371
             else
368
-            return View();
372
+                return View(rd);
369 373
         }
374
+
370 375
     }
371 376
 }

+ 19 - 2
web/YTSoft.BaseCallCenter.MVCWeb/Controllers/HW/CallRecordController.cs

@@ -50,6 +50,14 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
50 50
             if (!string.IsNullOrEmpty(workOrderNum))
51 51
             {
52 52
                 callScreenModel.WorkOrderBaseModel = orderBLL.GetModel(int.Parse(workOrderNum.ToString()));
53
+                if (callScreenModel.WorkOrderBaseModel==null)
54
+                {
55
+                    callScreenModel.WorkOrderBaseModel = new Model.T_Wo_WorkOrderBase()
56
+                    {
57
+                        CustomerBaseModel = new T_Cus_CustomerBase { F_CustomerId = 0 },
58
+                        F_WORKORDERID = 0
59
+                    };
60
+                }
53 61
                 //如果电话号码不为空
54 62
                 if (callScreenModel.WorkOrderBaseModel != null && !string.IsNullOrEmpty(callScreenModel.WorkOrderBaseModel.F_CUSTOMERTELEPHONE))
55 63
                 {
@@ -108,6 +116,15 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
108 116
             if (!string.IsNullOrEmpty(workOrderNum))
109 117
             {
110 118
                 callScreenModel.WorkOrderBaseModel = orderBLL.GetModel(int.Parse(workOrderNum.ToString()));
119
+                if (callScreenModel.WorkOrderBaseModel == null)
120
+                {
121
+                    callScreenModel.WorkOrderBaseModel = new Model.T_Wo_WorkOrderBase()
122
+                    {
123
+                        CustomerBaseModel = new T_Cus_CustomerBase { F_CustomerId = 0 },
124
+                        F_WORKORDERID = 0
125
+                    };
126
+                }
127
+               
111 128
                 //如果电话号码不为空
112 129
                 if (callScreenModel.WorkOrderBaseModel != null && !string.IsNullOrEmpty(callScreenModel.WorkOrderBaseModel.F_CUSTOMERTELEPHONE))
113 130
                 {
@@ -346,12 +363,12 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
346 363
             }
347 364
             if (CustomerBaseModel.F_CustomerId > 0)
348 365
             {
349
-                AddAction("t_cus_customerbase", CustomerBaseModel.F_CustomerId.ToMyString(), "更新客户信息", CustomerBaseModel.F_CustomerName);
366
+                AddAction("t_cus_customerbase", CustomerBaseModel.F_CustomerId.ToMyString(), "更新客户信息", CustomerBaseModel.F_CustomerName.ToMyString());
350 367
                 AddAction("t_cus_customerbase", CustomerBaseModel.F_CustomerId.ToMyString(), "更新客户信息", "数据:" + JsonConvert.SerializeObject(CustomerBaseModel), "关键信息");
351 368
             }
352 369
             else
353 370
             {
354
-                AddAction("t_cus_customerbase", CustomerBaseModel.F_Telephone, "添加客户信息", CustomerBaseModel.F_CustomerName);
371
+                AddAction("t_cus_customerbase", CustomerBaseModel.F_Telephone, "添加客户信息", CustomerBaseModel.F_CustomerName.ToMyString());
355 372
                 AddAction("t_cus_customerbase", CustomerBaseModel.F_Telephone, "添加客户信息","数据:"+JsonConvert.SerializeObject(CustomerBaseModel), "关键信息");
356 373
             }
357 374
             return cusBLL.UpdateCusInfoModel(CustomerBaseModel);

+ 4 - 1
web/YTSoft.BaseCallCenter.MVCWeb/Controllers/MainController.cs

@@ -105,7 +105,10 @@ namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
105 105
                                     childMenuList.Add(childModel);
106 106
                                 }
107 107
                                 levelModel.ChildMenuModelList = childMenuList;
108
-
108
+                                if (levelModel.F_Name.Contains("微信客服") || levelModel.F_Name.Contains("微博客服"))
109
+                                {
110
+                                    levelModel.F_OptUrl += F_PId;
111
+                                        }
109 112
                                 menuModelList.Add(levelModel);
110 113
                             }
111 114
 

+ 3 - 1
web/YTSoft.BaseCallCenter.MVCWeb/Controllers/Report/ReportController.cs

@@ -11,6 +11,7 @@ using System.Web.Script.Serialization;
11 11
 using YTSoft.BaseCallCenter.Model;
12 12
 using YTSoft.BaseCallCenter.MVCWeb.Commons;
13 13
 using YTSoft.BaseCallCenter.MVCWeb.Models;
14
+using YTSoft.Common;
14 15
 
15 16
 namespace YTSoft.BaseCallCenter.MVCWeb.Controllers
16 17
 {
@@ -646,7 +647,7 @@ BType, case when (isnull(BusinessType,0)>0 or isnull(F_ServiceType,0)>0) then '
646 647
 
647 648
                 }
648 649
             }
649
-            catch (Exception ex) { }
650
+            catch (Exception ex) { LogHelper.Default.WriteError(ex.Message, ex); }
650 651
             finally { dt.Clear();dt.Dispose(); }
651 652
             return JsonConvert.SerializeObject(dataModel);
652 653
         }
@@ -3453,6 +3454,7 @@ BType, case when (isnull(BusinessType,0)>0 or isnull(F_ServiceType,0)>0) then '
3453 3454
         public string WorkOrderTypeUserMathChartData(DateTime? NowDateTime, string dateParty)
3454 3455
         {
3455 3456
             WorkOrderTypeUserMathModel resultModel = new WorkOrderTypeUserMathModel();
3457
+            resultModel.bottom = "";
3456 3458
             //数据结果集
3457 3459
             ResponseData dataModel = new ResponseData();
3458 3460
             string startDate = "";

+ 21 - 11
web/YTSoft.BaseCallCenter.MVCWeb/Filter/CheckPermissionFilter.cs

@@ -1,5 +1,6 @@
1 1
 using System;
2 2
 using System.Collections.Generic;
3
+using System.Configuration;
3 4
 using System.Linq;
4 5
 using System.Web;
5 6
 using System.Web.Mvc;
@@ -31,33 +32,42 @@ public class CheckPermissionFilter : IAuthorizationFilter
31 32
             return;
32 33
         }
33 34
         // 判断是否登录或登录已超时 需要重新登录
34
-        
35 35
 
36
+        bool islocal = false;//是否需要走单点登录  true 不需要  false 需要
36 37
         string LoginName = filterContext.HttpContext.Request.Headers.Get("OAM_REMOTE_USER");
37
-        HttpCookie cookies = filterContext.HttpContext.Request.Cookies["platform"];
38
-        bool islocal = false;
39
-        if (cookies != null && cookies.HasKeys)
38
+        
39
+        HttpCookie loginInfoCookies = filterContext.HttpContext.Request.Cookies["BaseCallCenter_T_User"];//用户信息
40
+        if (loginInfoCookies != null)
41
+        {
42
+            islocal = true;
43
+        }
44
+        else
40 45
         {
41
-            if (!string.IsNullOrEmpty(cookies["islocal"]))
46
+            HttpCookie cookies = filterContext.HttpContext.Request.Cookies["platform"];
47
+            if (cookies != null && cookies.HasKeys)
42 48
             {
43
-                if (cookies["islocal"] == "1")
49
+                if (!string.IsNullOrEmpty(cookies["islocal"]))
44 50
                 {
45
-                    //有值,说明是本地登录
46
-                    islocal = true;
51
+                    if (cookies["islocal"] == "1")
52
+                    {
53
+                        //有值,说明是本地登录
54
+                        islocal = true;
55
+                    }
47 56
                 }
48 57
             }
49 58
         }
50 59
         if (islocal)
51 60
         {
52
-            //本地登录过滤器不做任何处理
61
+            //本地登录过滤器不做任何处理  已经登录 过滤器不做任何处理
53 62
         }
54
-        else   if (pageUrl.Contains("default") || pageUrl == "/")
63
+        else if (pageUrl.Contains("default") || pageUrl == "/")
55 64
         {
56 65
             //通用路径过滤器不做任何处理
57 66
         }
58 67
         else  if (string.IsNullOrEmpty(LoginName)|| LoginName.Equals("Anonymous"))
59 68
         {
60
-            filterContext.Result = new RedirectResult("https://portal.zzmetro.cn:4443/ZZMSsoLogin/zzmteroLogin.jsp");
69
+            //filterContext.Result = new RedirectResult("https://portal.zzmetro.cn:4443/ZZMSsoLogin/zzmteroLogin.jsp");
70
+            filterContext.Result = new RedirectResult(ConfigurationManager.AppSettings["sso"].ToMyString());
61 71
         }
62 72
 
63 73
     }

+ 1 - 1
web/YTSoft.BaseCallCenter.MVCWeb/Views/Default/Login.cshtml

@@ -61,7 +61,7 @@
61 61
       </div>
62 62
     </div>
63 63
     <div class="copy-right" style=" color:White;">
64
-      <a onclick="clickLoginIn();">单点登录</a>© 版权所有 郑州市轨道交通
64
+      <a href="@Model.ExtensionCode">单点登录</a>© 版权所有 郑州市轨道交通
65 65
     </div>
66 66
   </div>
67 67
   <!-- 加载js文件-->

+ 87 - 0
web/YTSoft.BaseCallCenter.MVCWeb/Views/Default/SSOShow.cshtml

@@ -0,0 +1,87 @@
1
+@using YTSoft.BaseCallCenter.MVCWeb.Models;
2
+<!DOCTYPE html>
3
+<html lang="en">
4
+
5
+<head>
6
+  <meta charset="UTF-8" />
7
+  <title>郑州市轨道交通全媒体客服平台</title>
8
+  <meta name="keywords" content="郑州市轨道交通全媒体客服平台" />
9
+  <meta name="description" content="郑州市轨道交通全媒体客服平台" />
10
+  <meta name="renderer" content="webkit" />
11
+  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
12
+  <meta name="Author" content="larry" />
13
+  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
14
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
15
+  <meta name="apple-mobile-web-app-capable" content="yes" />
16
+  <meta name="format-detection" content="telephone=no" />
17
+  <link rel="Shortcut Icon" href="favicon.ico" />
18
+
19
+  <link href="~/Content/layui/css/layui.css" rel="stylesheet" />
20
+  <link rel="stylesheet" type="text/css" href="/Content/css/gobal.css" media="all" />
21
+  <link rel="stylesheet" type="text/css" href="/Content/css/animate.css" media="all" />
22
+  <link rel="stylesheet" type="text/css" href="/Content/css/metrologin.css" media="all" />
23
+</head>
24
+
25
+<body>
26
+  <div class="larry-main layui-layout animated shake larry-delay2" id="larry_login"
27
+    style="margin-top: 100px; margin-bottom:50px;">
28
+    <div class="title">
29
+      <img src="/Content/images/logo2.png" style="height:160px;" alt="">
30
+    </div>
31
+    <div class="user-info">
32
+      <div style="height:120px;">&nbsp;</div>
33
+      <div class="avatar" style=" width:250px; height:50px;">
34
+                      @if (Model.msg != "")
35
+                      {
36
+                        <p class="info" style="font-size:20pt;" value="@Model.msg">
37
+                           @Model.msg
38
+                        </p>
39
+                        <p class="info" style="font-size:20pt;">
40
+                            没有登录 提供单点登录,和主站登录的链接地址(这个界面要优化 优化完,这段删除) <br>
41
+                            下面的都可以展示没有权限 <br>
42
+                            没有权限 如果是没有权限,这个页面展示的没有权限的页面展示 <br>
43
+                            非法路径 如果是非正常访问 <br>
44
+                            error    错误页  也可以额展示没有权限 <br>
45
+                        </p>
46
+                      }
47
+                      else
48
+                      {
49
+                        <p class="info" style="font-size:20pt;">
50
+                            全媒体客服平台
51
+                        </p>
52
+                      }
53
+
54
+      </div>
55
+      <div class="layui-form" id="larry_form">
56
+
57
+      </div>
58
+    </div>
59
+    <div class="copy-right" style=" color:White;">
60
+      © 版权所有 郑州市轨道交通
61
+    </div>
62
+  </div>
63
+  <!-- 加载js文件-->
64
+
65
+  <script src="~/Content/layui/layui.js"></script>
66
+  <script src="~/Content/js/ytsoft.config.js"></script>
67
+  <script src="~/Content/js/jquery-1.8.3.min.js"></script>
68
+  <script src="~/Content/js/ytsoft.http.js"></script>
69
+
70
+  <div class="layui-layer-move">
71
+    <ul style="visibility: visible;" id="supersized" class="quality">
72
+      <li style="visibility: visible; opacity: 1;" class="slide-0 activeslide">
73
+        <a target="_blank">
74
+          <img id="bgimage1" src="/Content/images/login/2.jpg" style="width: 100%;" />          
75
+        </a>
76
+      </li>
77
+
78
+    </ul>
79
+  </div>
80
+  <script type="text/javascript">
81
+      $(function () {
82
+          alert(@Model.msg);
83
+      })
84
+</script>
85
+</body>
86
+
87
+</html>

+ 2 - 0
web/YTSoft.BaseCallCenter.MVCWeb/Web.config

@@ -14,6 +14,8 @@
14 14
     <add key="UnobtrusiveJavaScriptEnabled" value="true" />
15 15
     <add key="sqllog" value="1" />
16 16
     <add key="filesuffix" value="png;jpg;jpeg;mp4;avi;mp3;pdf;doc;docx;wps;xls;xlsx;txt;RAR;zip;7z;ppt;pptx" />
17
+    <add key="domain" value="http://10.200.46.27:801" />
18
+    <add key="sso" value="http://testidm.zzmetro.cn:7799/default/sso" />
17 19
   </appSettings>
18 20
   <connectionStrings>
19 21
    <!-- ZZMetro_CallCenter20200108--> 

+ 1 - 0
web/YTSoft.BaseCallCenter.MVCWeb/YTSoft.BaseCallCenter.MVCWeb.csproj

@@ -1608,6 +1608,7 @@
1608 1608
     <Content Include="Views\Order\OverOrderView.cshtml" />
1609 1609
     <Content Include="Views\Order\WorkOrderAllList.cshtml" />
1610 1610
     <Content Include="Views\Order\WorkOrderMyList.cshtml" />
1611
+    <Content Include="Views\Default\SSOShow.cshtml" />
1611 1612
   </ItemGroup>
1612 1613
   <ItemGroup>
1613 1614
     <ProjectReference Include="..\BaseCallCenter.BLL\YTSoft.BaseCallCenter.BLL.csproj">