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

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

310
         }
310
         }
311
 
311
 
312
 
312
 
313
-        public static int ToInt32(this string str)
314
-        {
315
-            return Convert.ToInt32(str);
316
-        }
317
-
318
         public static decimal Todecimal(this string str)
313
         public static decimal Todecimal(this string str)
319
         {
314
         {
320
             return Convert.ToDecimal(str);
315
             return Convert.ToDecimal(str);

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

373
         public static bool AddAction(string UserName, int id, string ActionName, string oldobj = "", string ContentNew = "操作记录",string module1="",string module2="")
373
         public static bool AddAction(string UserName, int id, string ActionName, string oldobj = "", string ContentNew = "操作记录",string module1="",string module2="")
374
         {
374
         {
375
             Model.T_Com_LogAction modellog = new Model.T_Com_LogAction();
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
             modellog.AddUserId = id;
378
             modellog.AddUserId = id;
379
             modellog.Atime = DateTime.Now;
379
             modellog.Atime = DateTime.Now;
380
             modellog.ActionUrl = module1+"-"+ module2;
380
             modellog.ActionUrl = module1+"-"+ module2;
381
-            modellog.ContentNew = ContentNew;
382
-            modellog.ContentOld = oldobj;
381
+            modellog.ContentNew = ContentNew.ToMyString();
382
+            modellog.ContentOld = oldobj.ToMyString();
383
             modellog.TableId = id.ToMyString();
383
             modellog.TableId = id.ToMyString();
384
             modellog.TableName = module1+"—"+module2;
384
             modellog.TableName = module1+"—"+module2;
385
 
385
 

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

1438
                                     modelNotice.OrderId = model.F_WORKORDERID;
1438
                                     modelNotice.OrderId = model.F_WORKORDERID;
1439
                                     modelNotice.NoticeType = 0;
1439
                                     modelNotice.NoticeType = 0;
1440
                                     modelNotice.NoticeState = 1;
1440
                                     modelNotice.NoticeState = 1;
1441
-                                    modelNotice.NoticeDeptName = historyModel.F_NEXTOWNERARRID;
1441
+                                    modelNotice.NoticeDeptName = historyModel.F_NEXTOWNERARRID.ToMyString();
1442
                                     modelNotice.NoticeDeptId = historyModel.F_OPTBTNID.ToInt32();
1442
                                     modelNotice.NoticeDeptId = historyModel.F_OPTBTNID.ToInt32();
1443
                                     NoticeBll.Add(modelNotice);
1443
                                     NoticeBll.Add(modelNotice);
1444
                                 }
1444
                                 }

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

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

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

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

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

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

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

1
 using System;
1
 using System;
2
 using System.Collections.Generic;
2
 using System.Collections.Generic;
3
+using System.Configuration;
3
 using System.Data;
4
 using System.Data;
4
 using System.Linq;
5
 using System.Linq;
5
 using System.Text;
6
 using System.Text;
25
                 userInfo.F_UserName = cookies["Name"];
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
            // userInfo.F_UserName = SystemInfo.GetCpuPerformancevalue();
32
            // userInfo.F_UserName = SystemInfo.GetCpuPerformancevalue();
29
             return View(userInfo);
33
             return View(userInfo);
30
         }
34
         }
238
 
242
 
239
         public ActionResult SSO()
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
             string LoginName=Request.Headers.Get("OAM_REMOTE_USER");
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
             LogHelper.Default.WriteInfo("LoginName:" + LoginName.ToMyString());
249
             LogHelper.Default.WriteInfo("LoginName:" + LoginName.ToMyString());
262
-            //LogHelper.Default.WriteInfo("LoginName1:" + LoginName1.ToMyString());
263
-            //LogHelper.Default.WriteInfo("LoginName2:" + LoginName2.ToMyString());
264
             if (!string.IsNullOrEmpty(LoginName))
250
             if (!string.IsNullOrEmpty(LoginName))
265
             {
251
             {
266
                
252
                
267
                 if (!"Anonymous".Equals(LoginName))
253
                 if (!"Anonymous".Equals(LoginName))
268
                 {
254
                 {
269
                     res = true;
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
                             //记住用户名每3个月更换一次
293
                             //记住用户名每3个月更换一次
287
                             HttpCookie cookie = new HttpCookie("platform");
294
                             HttpCookie cookie = new HttpCookie("platform");
288
-                            cookie.Values.Add("Name", LoginName);
295
+                            cookie.Values.Add("Name", userid);
289
                             cookie.Values.Add("islocal", "0");
296
                             cookie.Values.Add("islocal", "0");
290
                             cookie.Expires = System.DateTime.Now.AddMonths(3);
297
                             cookie.Expires = System.DateTime.Now.AddMonths(3);
291
                             Response.Cookies.Add(cookie);
298
                             Response.Cookies.Add(cookie);
314
                             new BLL.T_Sys_LoginLogs().Add(new Model.T_Sys_LoginLogs()
321
                             new BLL.T_Sys_LoginLogs().Add(new Model.T_Sys_LoginLogs()
315
                             {
322
                             {
316
                                 F_LoginName = dt.Rows[0]["F_UserName"].ToString(),
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
                                 F_Result = "单点登录成功",
325
                                 F_Result = "单点登录成功",
319
                                 F_LoginIP = Common.DTRequest.GetIP(),
326
                                 F_LoginIP = Common.DTRequest.GetIP(),
320
                                 F_Hostname = Common.DTRequest.GetIP(),
327
                                 F_Hostname = Common.DTRequest.GetIP(),
329
                             bll.UpdateWXId("ExtensionCode", extensionphone.ToInt32(), dt.Rows[0]["F_UserId"].ToInt32());
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
             else
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
             else
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
             if (!string.IsNullOrEmpty(workOrderNum))
50
             if (!string.IsNullOrEmpty(workOrderNum))
51
             {
51
             {
52
                 callScreenModel.WorkOrderBaseModel = orderBLL.GetModel(int.Parse(workOrderNum.ToString()));
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
                 if (callScreenModel.WorkOrderBaseModel != null && !string.IsNullOrEmpty(callScreenModel.WorkOrderBaseModel.F_CUSTOMERTELEPHONE))
62
                 if (callScreenModel.WorkOrderBaseModel != null && !string.IsNullOrEmpty(callScreenModel.WorkOrderBaseModel.F_CUSTOMERTELEPHONE))
55
                 {
63
                 {
108
             if (!string.IsNullOrEmpty(workOrderNum))
116
             if (!string.IsNullOrEmpty(workOrderNum))
109
             {
117
             {
110
                 callScreenModel.WorkOrderBaseModel = orderBLL.GetModel(int.Parse(workOrderNum.ToString()));
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
                 if (callScreenModel.WorkOrderBaseModel != null && !string.IsNullOrEmpty(callScreenModel.WorkOrderBaseModel.F_CUSTOMERTELEPHONE))
129
                 if (callScreenModel.WorkOrderBaseModel != null && !string.IsNullOrEmpty(callScreenModel.WorkOrderBaseModel.F_CUSTOMERTELEPHONE))
113
                 {
130
                 {
346
             }
363
             }
347
             if (CustomerBaseModel.F_CustomerId > 0)
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
                 AddAction("t_cus_customerbase", CustomerBaseModel.F_CustomerId.ToMyString(), "更新客户信息", "数据:" + JsonConvert.SerializeObject(CustomerBaseModel), "关键信息");
367
                 AddAction("t_cus_customerbase", CustomerBaseModel.F_CustomerId.ToMyString(), "更新客户信息", "数据:" + JsonConvert.SerializeObject(CustomerBaseModel), "关键信息");
351
             }
368
             }
352
             else
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
                 AddAction("t_cus_customerbase", CustomerBaseModel.F_Telephone, "添加客户信息","数据:"+JsonConvert.SerializeObject(CustomerBaseModel), "关键信息");
372
                 AddAction("t_cus_customerbase", CustomerBaseModel.F_Telephone, "添加客户信息","数据:"+JsonConvert.SerializeObject(CustomerBaseModel), "关键信息");
356
             }
373
             }
357
             return cusBLL.UpdateCusInfoModel(CustomerBaseModel);
374
             return cusBLL.UpdateCusInfoModel(CustomerBaseModel);

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

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

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

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

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

1
 using System;
1
 using System;
2
 using System.Collections.Generic;
2
 using System.Collections.Generic;
3
+using System.Configuration;
3
 using System.Linq;
4
 using System.Linq;
4
 using System.Web;
5
 using System.Web;
5
 using System.Web.Mvc;
6
 using System.Web.Mvc;
31
             return;
32
             return;
32
         }
33
         }
33
         // 判断是否登录或登录已超时 需要重新登录
34
         // 判断是否登录或登录已超时 需要重新登录
34
-        
35
 
35
 
36
+        bool islocal = false;//是否需要走单点登录  true 不需要  false 需要
36
         string LoginName = filterContext.HttpContext.Request.Headers.Get("OAM_REMOTE_USER");
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
         if (islocal)
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
         else  if (string.IsNullOrEmpty(LoginName)|| LoginName.Equals("Anonymous"))
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
       </div>
61
       </div>
62
     </div>
62
     </div>
63
     <div class="copy-right" style=" color:White;">
63
     <div class="copy-right" style=" color:White;">
64
-      <a onclick="clickLoginIn();">单点登录</a>© 版权所有 郑州市轨道交通
64
+      <a href="@Model.ExtensionCode">单点登录</a>© 版权所有 郑州市轨道交通
65
     </div>
65
     </div>
66
   </div>
66
   </div>
67
   <!-- 加载js文件-->
67
   <!-- 加载js文件-->

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

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
     <add key="UnobtrusiveJavaScriptEnabled" value="true" />
14
     <add key="UnobtrusiveJavaScriptEnabled" value="true" />
15
     <add key="sqllog" value="1" />
15
     <add key="sqllog" value="1" />
16
     <add key="filesuffix" value="png;jpg;jpeg;mp4;avi;mp3;pdf;doc;docx;wps;xls;xlsx;txt;RAR;zip;7z;ppt;pptx" />
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
   </appSettings>
19
   </appSettings>
18
   <connectionStrings>
20
   <connectionStrings>
19
    <!-- ZZMetro_CallCenter20200108--> 
21
    <!-- ZZMetro_CallCenter20200108--> 

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

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