liyuanyuan лет назад: 4
Родитель
Сommit
c19d563829

+ 4 - 3
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/App_Start/ActionAttribute.cs

@@ -11,7 +11,8 @@ namespace CallCenterApi.Interface
11 11
     {
12 12
         public override void OnActionExecuting(ActionExecutingContext filterContext)
13 13
         {
14
-            if (filterContext.Controller.ToString().ToLower() != "login")
14
+            string[] cotr = new string[] { "login", "home" };
15
+            if (!cotr.Contains(filterContext.Controller.ToString().ToLower()))
15 16
             {
16 17
                 try
17 18
                 {
@@ -24,8 +25,8 @@ namespace CallCenterApi.Interface
24 25
                 }
25 26
                 catch
26 27
                 {
27
-                    filterContext.Result = new ContentResult() { Content = new AjaxResult { state = ResultTypes.notoken.ToString(), message = "授权过期,请联系厂家" }.ToJson() };
28
-                    return;
28
+                    //filterContext.Result = new ContentResult() { Content = new AjaxResult { state = ResultTypes.notoken.ToString(), message = "授权过期,请联系厂家" }.ToJson() };
29
+                    //return;
29 30
                 }
30 31
             }
31 32
             base.OnActionExecuting(filterContext);

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/CallCenterApi.Interface.csproj

@@ -16,7 +16,7 @@
16 16
     <RootNamespace>CallCenterApi.Interface</RootNamespace>
17 17
     <AssemblyName>CallCenterApi.Interface</AssemblyName>
18 18
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
19
-    <UseIISExpress>true</UseIISExpress>
19
+    <UseIISExpress>false</UseIISExpress>
20 20
     <IISExpressSSLPort />
21 21
     <IISExpressAnonymousAuthentication />
22 22
     <IISExpressWindowsAuthentication />

+ 5 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Configs/system.config

@@ -35,4 +35,9 @@
35 35
   <add key="password" value="Bing123456" />
36 36
   <!-- 文件保存位置 -->
37 37
   <add key="saveloc" value="\upload_wav\" />
38
+
39
+
40
+  <add key="datedue" value="2021-11-12 23:59:59" />
41
+
42
+  <add key="remind" value="7" />
38 43
 </appSettings>

+ 12 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/Login/LoginController.cs

@@ -35,6 +35,15 @@ namespace CallCenterApi.Interface.Controllers
35 35
                     return Error("账号不能为空!");
36 36
                 if (string.IsNullOrEmpty(login.Password))
37 37
                     return Error("密码不能为空!");
38
+
39
+              
40
+                var dtime = DateTime.Parse(Configs.GetValue("datedue"));
41
+
42
+                if (dtime < DateTime.Now)
43
+                {
44
+                    return Error("授权过期,请联系系统厂家!");
45
+                }
46
+
38 47
                 Model.T_Sys_UserAccount loginUser = new BLL.T_Sys_UserAccount().LoginGetModel(login.Username, login.Password);
39 48
 
40 49
                 if (loginUser != null)
@@ -73,10 +82,11 @@ namespace CallCenterApi.Interface.Controllers
73 82
                     var token = FormsPrincipal<Cache.Models.CurrentUserInfo>.GetCookieValue(currentUserInfo.F_UserCode, currentUserInfo);
74 83
 
75 84
                     //放入缓存
76
-                   // CacheHelper.Insert(token, currentUserInfo, 1440);
85
+                    // CacheHelper.Insert(token, currentUserInfo, 1440);
77 86
                     return Success("登录成功", new
78 87
                     {
79
-                        token = token
88
+                        token = token,
89
+                        authdate = (dtime - DateTime.Now).TotalDays < Int32.Parse(Configs.GetValue("remind")) ? dtime.ToString("yyyy-MM-dd HH:mm:ss") : ""
80 90
                     });
81 91
 
82 92
 

+ 2 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/MedicalFollowup/FollowUpController.cs

@@ -275,7 +275,7 @@ namespace CallCenterApi.Interface.Controllers.MedicalFollowup
275 275
             
276 276
             DataTable dt = new DataTable();
277 277
 
278
-            dt = busSF_BINGRENQK.GetALLListById(" T1.BINGRENZYID='" + id+"'", "", 0, 1);
278
+            dt = busSF_BINGRENQK.GetALLListById(" T1.BINGRENZYID='" + id+"'", "CYRQ desc", 0, 1);
279 279
             var obj = new
280 280
             {
281 281
                 state = "success",
@@ -1457,7 +1457,7 @@ namespace CallCenterApi.Interface.Controllers.MedicalFollowup
1457 1457
           //  int idint = Convert.ToInt32(id);
1458 1458
             DataTable dt = new DataTable();
1459 1459
 
1460
-            dt = taskDetailBLL.GetALLListById(" T1.BINGRENZYID='" + id+"'", "", 0, 1);
1460
+            dt = taskDetailBLL.GetALLListById(" T1.BINGRENZYID='" + id+"'", " CYRQ desc", 0, 1);
1461 1461
             var obj = new
1462 1462
             {
1463 1463
                 state = "success",

+ 7 - 3
codegit/CallCenterCommon/CallCenter.Utility/Configs/Configs.cs

@@ -9,9 +9,7 @@ namespace CallCenter.Utility
9 9
 
10 10
         static Configs()
11 11
         {
12
-            xDoc = new System.Xml.XmlDocument();
13
-            xDoc.Load(HttpContext.Current.Server.MapPath("~/Configs/system.config"));
14
-            xNode = xDoc.SelectSingleNode("//appSettings");
12
+            
15 13
         }
16 14
 
17 15
 
@@ -22,6 +20,9 @@ namespace CallCenter.Utility
22 20
         /// <param name="key"></param>
23 21
         public static string GetValue(string key)
24 22
         {
23
+            xDoc = new System.Xml.XmlDocument();
24
+            xDoc.Load(HttpContext.Current.Server.MapPath("~/Configs/system.config"));
25
+            xNode = xDoc.SelectSingleNode("//appSettings");
25 26
             var xElem1 = (System.Xml.XmlElement)xNode.SelectSingleNode("//add[@key='" + key + "']");
26 27
             return xElem1?.GetAttribute("value") ?? "";
27 28
         }
@@ -32,6 +33,9 @@ namespace CallCenter.Utility
32 33
         /// <param name="value">要修改为的值</param>
33 34
         public static void SetValue(string key, string value)
34 35
         {
36
+            xDoc = new System.Xml.XmlDocument();
37
+            xDoc.Load(HttpContext.Current.Server.MapPath("~/Configs/system.config"));
38
+            xNode = xDoc.SelectSingleNode("//appSettings");
35 39
 
36 40
             System.Xml.XmlElement xElem1;
37 41
             System.Xml.XmlElement xElem2;