From 20f099aee8715510406bf46c5e8ff4a8f5d532df Mon Sep 17 00:00:00 2001 From: yanjinhui <3306209981@qq.com> Date: 星期三, 02 四月 2025 16:27:19 +0800 Subject: [PATCH] 111 --- 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743555395910.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743555372954.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743562028103.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/Controllers/System/Sys_RoleController.cs | 3 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743575997026.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743555260571.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743576017025.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743576003026.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743555123354.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743576015030.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743575999035.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_SystemServices/Sys_UserService.cs | 103 +++++++++++++++++-------- 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743575995036.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743576007027.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743555145885.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743576001036.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743576005027.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/51dcb60a86eb571dca49c55e983918b.jpg | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_DTO/SerialPort/AddUserDTO.cs | 36 ++++++++ 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743575985033.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743555310550.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743575993033.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743575991033.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743576011032.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743575983021.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Model/Models/System/Sys_User.cs | 4 /dev/null | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Common/BaiDuFaceHelper.cs | 50 +++++++++--- 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/Snipaste_2025-04-02_14-19-25.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743576009033.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743576013029.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743575987026.png | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/WIDESEAWCS_Server.csproj | 1 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/59293addef4da93a4de193c42fc3c21.jpg | 0 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Server/wwwroot/image/1743575989030.png | 0 35 files changed, 146 insertions(+), 51 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Common/BaiDuFaceHelper.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Common/BaiDuFaceHelper.cs" index 712efe8..3063316 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Common/BaiDuFaceHelper.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Common/BaiDuFaceHelper.cs" @@ -17,14 +17,18 @@ /// <returns></returns> public static string GetAccessToken() { - string url = string.Format("https://aip.baidubce.com/oauth/2.0/token?client_id={0}&client_secret={1}&grant_type={2}", "TqFQHXSNt6Z7cPQ4vDBfBNjq", "0cli6I6s8JFz3qM1Czi5ciRpDqrJuVvm", "client_credentials"); - string returnStr = BDWebRequest(url, "", "POST"); + //string url = string.Format("https://aip.baidubce.com/oauth/2.0/token?client_id={0}&client_secret={1}&grant_type={2}", "TqFQHXSNt6Z7cPQ4vDBfBNjq", "0cli6I6s8JFz3qM1Czi5ciRpDqrJuVvm", "client_credentials"); + //string returnStr = BDWebRequest(url, "", "POST"); - NLog.LogManager.GetCurrentClassLogger().Trace("鐧惧害浜鸿劯璇嗗埆杩斿洖锛�" + returnStr); - BDToken token = JsonConvert.DeserializeObject<BDToken>(returnStr); - token.getdate = DateTime.Now.ToString(); + //NLog.LogManager.GetCurrentClassLogger().Trace("鐧惧害浜鸿劯璇嗗埆杩斿洖锛�" + returnStr); + //BDToken token = JsonConvert.DeserializeObject<BDToken>(returnStr); + //token.getdate = DateTime.Now.ToString(); - return token.access_token; + //return token.access_token; + + + var str = "24.83aee44079e5a27530bc72d5ec7049a3.2592000.1746152354.282335-118294290"; + return str; } public static string BDWebRequest(string url, string data, string method) @@ -113,16 +117,38 @@ /// </summary> /// <param name="path">鏂囦欢璺緞</param> /// <returns>base64缂栫爜淇℃伅锛屼笉甯︽枃浠跺ご</returns> - public static string GetFileContentAsBase64(string path) + //public static string GetFileContentAsBase64(string path) + //{ + // using (FileStream filestream = new FileStream(path, FileMode.Open)) + // { + // byte[] arr = new byte[filestream.Length]; + // filestream.Read(arr, 0, (int)filestream.Length); + // string base64 = Convert.ToBase64String(arr); + // return base64; + // } + //} + public static string GetFileContentAsBase64(string filePath) { - using (FileStream filestream = new FileStream(path, FileMode.Open)) + // 鍙繚鐣欐枃浠跺悕锛岄伩鍏嶈矾寰勯敊璇� + string fileName = Path.GetFileName(filePath); + + // 鑾峰彇鏂囦欢鐨勫畬鏁磋矾寰� + string fullPath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "image", fileName); + + if (!File.Exists(fullPath)) + { + throw new FileNotFoundException("鏂囦欢涓嶅瓨鍦細" + fullPath); + } + + using (FileStream filestream = new FileStream(fullPath, FileMode.Open, FileAccess.Read)) { byte[] arr = new byte[filestream.Length]; - filestream.Read(arr, 0, (int)filestream.Length); - string base64 = Convert.ToBase64String(arr); - return base64; + filestream.Read(arr, 0, arr.Length); + return Convert.ToBase64String(arr); } } + + /// <summary> /// 浜鸿劯娉ㄥ唽 @@ -261,7 +287,7 @@ /// <summary> /// 鐢ㄦ埛缁刬d锛屾爣璇嗕竴缁勭敤鎴凤紙鐢辨暟瀛椼�佸瓧姣嶃�佷笅鍒掔嚎缁勬垚锛夛紝闀垮害闄愬埗48B /// </summary> - public int group_id { get; set; } + public string group_id { get; set; } /// <summary> /// 鐢ㄦ埛id锛堢敱鏁板瓧銆佸瓧姣嶃�佷笅鍒掔嚎缁勬垚锛夛紝瀵瑰簲绯荤粺璐﹀彿 /// </summary> diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_DTO/SerialPort/AddUserDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_DTO/SerialPort/AddUserDTO.cs" index 5b4e875..ec3c6c2 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_DTO/SerialPort/AddUserDTO.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_DTO/SerialPort/AddUserDTO.cs" @@ -8,20 +8,50 @@ { public class AddUserDTO { + /// <summary> + /// 鐢ㄦ埛id鐢ㄦ潵淇敼 + /// </summary> + public int id { get; set; } + public string username { get; set; } - public int log_id { get; set; } + public string usertruename { get; set; } - //public string facetoken { get; set; } + /// <summary> + /// 鐧惧害浜戝垎缁� + /// </summary> + // public int log_id { get; set; } + public string phoneno { get; set; } + /// <summary> + /// 缁勫埆 + /// </summary> public int roleid { get; set; } + /// <summary> + /// 鐢ㄦ埛绫诲埆 + /// </summary> public string rolename { get; set; } + /// <summary> + /// 鏄惁鍚敤 + /// </summary> public byte enable { get; set; } - public string path { get; set; } + + /// <summary> + /// 涓婁紶鍥剧墖鍚� + /// </summary> + public string?path { get; set; } + + + /// <summary> + /// 鍥剧墖token + /// </summary> + //public string ?face_token { get; set; } + + } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Model/Models/System/Sys_User.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Model/Models/System/Sys_User.cs" index b4faebc..aaac391 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Model/Models/System/Sys_User.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Model/Models/System/Sys_User.cs" @@ -22,8 +22,8 @@ [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "鐢ㄦ埛ID")] public int User_Id { get; set; } - [SugarColumn( IsNullable = true, ColumnDescription = "浜鸿劯璇嗗埆id")] - public int Log_id { get; set; } + [SugarColumn( IsNullable = true, ColumnDescription = "浜鸿劯璇嗗埆")] + public string Log_id { get; set; } [SugarColumn(Length = 100, IsNullable = true, ColumnDescription = "浜鸿劯璇嗗埆token")] diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/Controllers/System/Sys_RoleController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/Controllers/System/Sys_RoleController.cs" index e8a5639..8f18ed9 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/Controllers/System/Sys_RoleController.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/Controllers/System/Sys_RoleController.cs" @@ -52,7 +52,8 @@ [HttpPost, Route("getUserTreePermission")] public IActionResult GetUserTreePermission(int roleId) { - return Json(Service.GetUserTreePermission(roleId)); + var ss = Service.GetUserTreePermission(roleId); + return Json(ss); } [HttpPost, Route("savePermission")] diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/WIDESEAWCS_Server.csproj" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/WIDESEAWCS_Server.csproj" index 78f2d98..b06d2db 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/WIDESEAWCS_Server.csproj" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/WIDESEAWCS_Server.csproj" @@ -67,7 +67,6 @@ <ItemGroup> <Folder Include="Controllers\BasicInfo\" /> - <Folder Include="wwwroot\image\" /> </ItemGroup> </Project> diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492051182.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492051182.png" deleted file mode 100644 index 3da449a..0000000 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492051182.png" +++ /dev/null Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492244242.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492244242.png" deleted file mode 100644 index fe1dbc9..0000000 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492244242.png" +++ /dev/null Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492263811.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492263811.png" deleted file mode 100644 index 1e18320..0000000 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492263811.png" +++ /dev/null Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492568523.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492568523.png" deleted file mode 100644 index ab48213..0000000 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492568523.png" +++ /dev/null Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492760375.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492760375.png" deleted file mode 100644 index 5464776..0000000 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492760375.png" +++ /dev/null Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492791698.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492791698.png" deleted file mode 100644 index ef57e37..0000000 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492791698.png" +++ /dev/null Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492809549.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492809549.png" deleted file mode 100644 index 5d7be73..0000000 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492809549.png" +++ /dev/null Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492833343.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492833343.png" deleted file mode 100644 index 2f8b755..0000000 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743492833343.png" +++ /dev/null Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743555123354.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743555123354.png" new file mode 100644 index 0000000..2e7403a --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743555123354.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743555145885.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743555145885.png" new file mode 100644 index 0000000..ebef766 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743555145885.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743555260571.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743555260571.png" new file mode 100644 index 0000000..ea48144 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743555260571.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743555310550.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743555310550.png" new file mode 100644 index 0000000..7782dda --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743555310550.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743555372954.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743555372954.png" new file mode 100644 index 0000000..1138fe6 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743555372954.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743555395910.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743555395910.png" new file mode 100644 index 0000000..2754914 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743555395910.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743562028103.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743562028103.png" new file mode 100644 index 0000000..9bd0d9b --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743562028103.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575983021.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575983021.png" new file mode 100644 index 0000000..9bd0d9b --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575983021.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575985033.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575985033.png" new file mode 100644 index 0000000..ab3b7ea --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575985033.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575987026.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575987026.png" new file mode 100644 index 0000000..aebd6a3 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575987026.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575989030.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575989030.png" new file mode 100644 index 0000000..b803030 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575989030.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575991033.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575991033.png" new file mode 100644 index 0000000..8f7c822 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575991033.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575993033.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575993033.png" new file mode 100644 index 0000000..e963a6c --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575993033.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575995036.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575995036.png" new file mode 100644 index 0000000..e6fb049 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575995036.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575997026.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575997026.png" new file mode 100644 index 0000000..c9d3b64 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575997026.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575999035.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575999035.png" new file mode 100644 index 0000000..7183ed2 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743575999035.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576001036.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576001036.png" new file mode 100644 index 0000000..dac1ec3 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576001036.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576003026.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576003026.png" new file mode 100644 index 0000000..9929f26 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576003026.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576005027.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576005027.png" new file mode 100644 index 0000000..2ec77b7 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576005027.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576007027.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576007027.png" new file mode 100644 index 0000000..2dee351 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576007027.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576009033.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576009033.png" new file mode 100644 index 0000000..fdf896d --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576009033.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576011032.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576011032.png" new file mode 100644 index 0000000..f603e4d --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576011032.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576013029.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576013029.png" new file mode 100644 index 0000000..ce95a9c --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576013029.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576015030.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576015030.png" new file mode 100644 index 0000000..e1d678d --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576015030.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576017025.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576017025.png" new file mode 100644 index 0000000..e76b8df --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/1743576017025.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/51dcb60a86eb571dca49c55e983918b.jpg" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/51dcb60a86eb571dca49c55e983918b.jpg" new file mode 100644 index 0000000..fc0853f --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/51dcb60a86eb571dca49c55e983918b.jpg" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/59293addef4da93a4de193c42fc3c21.jpg" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/59293addef4da93a4de193c42fc3c21.jpg" new file mode 100644 index 0000000..a989db4 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/59293addef4da93a4de193c42fc3c21.jpg" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/Snipaste_2025-04-02_14-19-25.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/Snipaste_2025-04-02_14-19-25.png" new file mode 100644 index 0000000..8dc8740 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Server/wwwroot/image/Snipaste_2025-04-02_14-19-25.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_SystemServices/Sys_UserService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_SystemServices/Sys_UserService.cs" index 88ddcee..2f18d6d 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_SystemServices/Sys_UserService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_SystemServices/Sys_UserService.cs" @@ -20,6 +20,7 @@ using WIDESEAWCS_DTO.Telescopic; using WIDESEAWCS_Common; using Newtonsoft.Json; +using OfficeOpenXml.FormulaParsing.Excel.Functions.Math; namespace WIDESEAWCS_SystemServices { @@ -463,7 +464,7 @@ return new WebResponseContent { Status = false, Message = "鏁版嵁涓虹┖" }; } - var query = sys.LeftJoin<Dt_FaceRecognition>((a, b) => a.Log_id == b.ID); + var query = sys.LeftJoin<Dt_FaceRecognition>((a, b) => a.Log_id == b.GroupID); if (!string.IsNullOrEmpty(paginationDTO.searchKeyword)) { query = query.Where((a, b) => @@ -481,6 +482,8 @@ var result = query.Select((a, b) => new { + a.UserPwd, + a.Log_id, a.User_Id, a.UserName, a.UserTrueName, @@ -514,17 +517,27 @@ } } - + /// <summary> + /// 娣诲姞鐢ㄦ埛 + /// </summary> + /// <param name="addUserDTO"></param> + /// <returns></returns> public WebResponseContent AdduserData(AddUserDTO addUserDTO) { try { + if (addUserDTO == null) + { + return new WebResponseContent { Status = false, Message = "璇锋眰鏁版嵁涓虹┖锛屽彲鑳芥槸 JSON 瑙f瀽澶辫触" }; + } + var face = _faceRecognitionRepository.QueryData().Select(x => x.GroupID).FirstOrDefault(); ; var baiduResult = BaiDuFaceHelper.AddUser(new BDUserInfo { ImgPath = addUserDTO.path, user_id = addUserDTO.username, - group_id = addUserDTO.log_id // 杩欓噷搴旇濉櫨搴︿汉鑴稿簱鍒嗙粍 + group_id = face // 杩欓噷搴旇濉櫨搴︿汉鑴稿簱鍒嗙粍 + // group_id = baiduResult.result.log_id }); @@ -532,20 +545,24 @@ if (baiduResult == null || baiduResult.error_code != 0) { return new WebResponseContent { Status = false, Data = "浜鸿劯娉ㄥ唽澶辫触锛�" + baiduResult.error_msg }; + + } // 鍒涘缓鐢ㄦ埛鏁版嵁 var sys = new Sys_User { UserName = addUserDTO.username, + UserTrueName=addUserDTO.usertruename, HeadImageUrl=addUserDTO.path, - Log_id = addUserDTO.log_id, + Log_id = face, Face_token = baiduResult.result.face_token, PhoneNo = addUserDTO.phoneno, Role_Id = addUserDTO.roleid, RoleName = addUserDTO.rolename, Enable = addUserDTO.enable, - UserPwd= "j79rYYvCz4vdhcboB1Ausg==" + UserPwd= "j79rYYvCz4vdhcboB1Ausg==", + CreateDate=DateTime.Now }; BaseDal.AddData(sys); return new WebResponseContent { Status = true, Data = sys }; @@ -558,48 +575,70 @@ } + + /// <summary> + /// 鏇存柊鐢ㄦ埛 + /// </summary> + /// <param name="addUserDTO"></param> + /// <returns></returns> public WebResponseContent UpuserData(AddUserDTO addUserDTO) { try { - - var baiduResult = BaiDuFaceHelper.AddUser(new BDUserInfo + var sys = BaseDal.QueryData(x => x.User_Id == addUserDTO.id).FirstOrDefault(); + + if (sys == null) { - ImgPath = addUserDTO.path, - user_id = addUserDTO.username, - group_id = addUserDTO.log_id // 杩欓噷搴旇濉櫨搴︿汉鑴稿簱鍒嗙粍 - }); - - - // 鍒ゆ柇鐧惧害杩斿洖鏄惁鎴愬姛 - if (baiduResult == null || baiduResult.error_code != 0) + return new WebResponseContent { Status = false, Message = "娌℃壘鍒拌鐢ㄦ埛" }; + } + var face = _faceRecognitionRepository.QueryData().Select(x => x.GroupID).FirstOrDefault(); + // 鍒ゆ柇鏄惁闇�瑕佹洿鏂颁汉鑴稿浘鐗� + string faceToken = null; + if (!string.IsNullOrEmpty(addUserDTO.path)) // 濡傛灉浼犱簡鍥剧墖璺緞锛屾墠鏇存柊浜鸿劯淇℃伅 { - return new WebResponseContent { Status = false, Data = "浜鸿劯鏇存柊澶辫触锛�" + baiduResult.error_msg }; + var baiduResult = BaiDuFaceHelper.AddUser(new BDUserInfo + { + ImgPath = addUserDTO.path, + user_id = addUserDTO.username, + group_id = face // 杩欓噷搴旇濉櫨搴︿汉鑴稿簱鍒嗙粍 + }); + + // 鍒ゆ柇鐧惧害杩斿洖鏄惁鎴愬姛 + if (baiduResult == null || baiduResult.error_code != 0) + { + return new WebResponseContent { Status = false, Data = "浜鸿劯浠ュ瓨鍦紝涓嶈閲嶅涓婁紶锛�" + baiduResult.error_msg }; + } + // 鑾峰彇鏇存柊鍚庣殑 Face_token + faceToken = baiduResult.result.face_token; } - // 鏇存柊鐢ㄦ埛鏁版嵁 - var sys = new Sys_User - { - UserName = addUserDTO.username, - HeadImageUrl = addUserDTO.path, - Log_id = addUserDTO.log_id, - Face_token = baiduResult.result.face_token, - PhoneNo = addUserDTO.phoneno, - Role_Id = addUserDTO.roleid, - RoleName = addUserDTO.rolename, - Enable = addUserDTO.enable, - }; + // 鏌ヨ鐜版湁鐢ㄦ埛 + + + // 鏇存柊鏌ヨ鍒扮殑鐢ㄦ埛鏁版嵁 + sys.UserName = addUserDTO.username; + sys.UserTrueName = addUserDTO.usertruename; + sys.HeadImageUrl = addUserDTO.path; // 鏇存柊澶村儚璺緞锛堝鏋滄湁鏂拌矾寰勶級 + sys.Log_id = face; + //sys.Face_token = faceToken ?? addUserDTO.face_token; // 濡傛灉娌℃湁鏇存柊鍥剧墖锛屼繚鎸佸師鏈� Face_token + sys.Face_token = faceToken; // 濡傛灉娌℃湁鏇存柊鍥剧墖锛屼繚鎸佸師鏈� Face_token + sys.PhoneNo = addUserDTO.phoneno; + sys.Role_Id = addUserDTO.roleid; + sys.RoleName = addUserDTO.rolename; + sys.Enable = addUserDTO.enable; + + // 鏇存柊鏁版嵁搴� BaseDal.UpdateData(sys); return new WebResponseContent { Status = true, Data = sys }; } catch (Exception ex) { - - return new WebResponseContent { Status = false, Message = "澶辫触" + ex }; + return new WebResponseContent { Status = false, Message = "澶辫触锛�" + ex.Message }; } - } + + /// <summary> /// 鍒犻櫎 @@ -611,7 +650,7 @@ try { - string apiResult = BaiDuFaceHelper.DeleteUser(deleteUserDTO); + string apiResult = BaiDuFaceHelper.DeleteUser(deleteUserDTO);//鍙缁檛oken鍜宭og_id // 2. 瑙f瀽杩斿洖缁撴灉锛屽垽鏂垹闄ゆ槸鍚︽垚鍔� dynamic resultObj = JsonConvert.DeserializeObject(apiResult); -- Gitblit v1.9.3