From f99c1becb0bbde82796e15d27e11ac4965c56468 Mon Sep 17 00:00:00 2001
From: qwj <qwjzorro@163.com>
Date: 星期一, 28 八月 2023 09:28:39 +0800
Subject: [PATCH] Merge branch 'master' of http://47.108.235.38:8080/r/DocumentService

---
 DocumentServiceAPI.Application/UserAndLogin/LogInController.cs |   49 +++++++++++++++++++++++++------------------------
 1 files changed, 25 insertions(+), 24 deletions(-)

diff --git a/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs b/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs
index 2eed030..b9c52fd 100644
--- a/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs
+++ b/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs
@@ -1,5 +1,7 @@
 锘縰sing DocumentServiceAPI.Application.UserAndLogin.Services;
 using DocumentServiceAPI.Application.UserAndLogin.ViewMode;
+using DocumentServiceAPI.Model.cyDocumentModel;
+using DocumentServiceAPI.Model.UserInfoModel;
 using DocumentServiceAPI.Utility;
 using Furion.DynamicApiController;
 using Furion.JsonSerialization;
@@ -74,7 +76,7 @@
                         case 0:
                             throw Oops.Oh($"璐︽埛鎴栬�呭瘑鐮侀敊璇�");
                         case 1:
-                        if (!needtoken)
+                        if (!IsTokenPass)
                         {
                             needtoken = await _userService.CheckPsw(Tender[0].TenderId, Tender[0].EmployeeID, Parma.PassWord);
 
@@ -193,34 +195,33 @@
 
         }
 
-
-
-
-
-
-     
-
         /// <summary>
-        /// 鑾峰彇鍏徃鍒楄〃
+        /// 鏄惁鏄敤鎴风鎴凤紝鎴栬�呮槸鍛樺伐
         /// </summary>
-        /// <returns>鐧诲綍淇℃伅</returns>      
-        public bool GetUnitList()
+        /// <param name="ITCode">璐﹀彿</param>
+        /// <returns>  杩斿洖true 浠h〃鏄紝 false浠h〃涓嶆槸</returns>
+        [HttpGet("IDIsEmployee")]
+        public async Task<bool> IDIsEmployee(string ITCode, [FromServices] ISqlSugarClient db)
         {
+          var ad=  ITCode.TryValidate(ValidationTypes.PhoneNumber);
+            if(!ad.IsValid)
+            {
+                throw Oops.Oh("璇疯緭鍏ユ纭殑璐﹀彿");
+            }
+              
+          var count= await db.Queryable<TenantInfo>().Where(x=>x.ItCode==ITCode&&x.IsEn==true&&x.IsDel==false).WithCache(600).CountAsync();
+            if (count > 0)
+                return true;
+            count=await db.Queryable<Document_EmployeeInfo>().Where(x=>x.UserName==ITCode).WithCache(600).CountAsync();
+            if (count > 0)
+                return true;
+            return false;
 
-            return true;
         }
-        /// <summary>
-        /// 鑾峰彇鍏徃鍒楄〃
-        /// </summary>
-        /// <returns>鐧诲綍淇℃伅</returns>
-        public bool GetTenantInfoList()
-        {
 
-            return true;
-        }
-        public string Get()
-        {
-            return $"Hello {nameof(Furion)}";
-        }
+
+
+
+
     }
 }

--
Gitblit v1.9.1