From a8e40f4c7f3f18ba87baddecebef03325eb7e570 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Wed, 22 Jul 2026 10:13:44 +0800 Subject: [PATCH 1/2] 1 --- HJGL_DS/BLL/API/APIWeldServices.cs | 58 ++++++++++++++++---- HJGL_DS/WebAPI/Controllers/WeldController.cs | 23 +++++++- HJGL_DS/WebAPI/WebAPI.csproj | 2 +- HJGL_DS/WebAPI/WebAPI.csproj.user | 2 +- 4 files changed, 69 insertions(+), 16 deletions(-) diff --git a/HJGL_DS/BLL/API/APIWeldServices.cs b/HJGL_DS/BLL/API/APIWeldServices.cs index 8c26e80..bd2f877 100644 --- a/HJGL_DS/BLL/API/APIWeldServices.cs +++ b/HJGL_DS/BLL/API/APIWeldServices.cs @@ -109,7 +109,7 @@ namespace BLL.API UsingPlanItem planItem = new UsingPlanItem(); planItem.UsingPlanId = x.UsingPlanId; planItem.WeldId = x.WeldId; - planItem.UnitStoreId= BLL.UnitStoreService.GetUnitStoreNameById(x.UnitStoreId); + planItem.UnitStoreId = BLL.UnitStoreService.GetUnitStoreNameById(x.UnitStoreId); planItem.ProjectId = x.ProjectId; planItem.UsePosition = x.UsePosition; planItem.Amount = x.Amount; @@ -412,16 +412,16 @@ namespace BLL.API Model.ResponeData respone = new ResponeData(); using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - DateTime dateTime =DateTime.Parse("1753-01-02"); + DateTime dateTime = DateTime.Parse("1753-01-02"); if (!string.IsNullOrEmpty(date) && date != "null") { - dateTime = DateTime.Parse(date); + dateTime = DateTime.Parse(date); } var q = (from pw in db.Project_Welder - join w in db.HJGL_BS_Welder on pw.WED_ID equals w.WED_ID - where w.PhotoUrl !=null && pw.ExchangeTime > dateTime - select w).Distinct(); - + join w in db.HJGL_BS_Welder on pw.WED_ID equals w.WED_ID + where w.PhotoUrl != null && pw.ExchangeTime > dateTime + select w).Distinct(); + List res = new List(); foreach (var p in q) { @@ -466,9 +466,9 @@ namespace BLL.API item.PhotoUrl = p.PhotoUrl; item.IsFaceTrain = p.IsFaceTrain; item.ExchangeTime = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"); - res.Add(item); - } - respone.data = res; + res.Add(item); + } + respone.data = res; } return respone; } @@ -491,7 +491,7 @@ namespace BLL.API { var getPerson = db.Project_Welder.FirstOrDefault(e => e.ProjectId == projectId && e.WED_ID == wedId); getPerson.ExchangeTime = DateTime.Now; - db.SubmitChanges(); + db.SubmitChanges(); } } catch (Exception ex) @@ -504,5 +504,41 @@ namespace BLL.API } #endregion + #region 根据项目id获取焊工信息列表 + /// + /// 根据项目id获取焊工信息列表 + /// + /// 人员ID + /// 交换类型 + /// + public static Model.ResponeData getProjectWelderList(string projectId, int page, int pageSize) + { + var responeData = new Model.ResponeData(); + try + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var res = from x in db.Project_Welder + join y in db.HJGL_BS_Welder on x.WED_ID equals y.WED_ID + where x.ProjectId == projectId + select new + { + WED_Code = y.WED_Code, + WED_Name = y.WED_Name, + + }; + responeData.data = res.Skip(page * pageSize).Take(pageSize); + } + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + ErrLogInfo.WriteLog(ex, "根据项目id获取焊工信息列表", "WeldController.getProjectWelderList"); + } + return responeData; + } + #endregion + } } diff --git a/HJGL_DS/WebAPI/Controllers/WeldController.cs b/HJGL_DS/WebAPI/Controllers/WeldController.cs index 1e9ee17..8e54900 100644 --- a/HJGL_DS/WebAPI/Controllers/WeldController.cs +++ b/HJGL_DS/WebAPI/Controllers/WeldController.cs @@ -195,15 +195,32 @@ namespace WebAPI.Controllers } return respone; } - + [HttpGet] - public Model.ResponeData getUpdateWelderExchangeTime(string wedId,string projectId) + public Model.ResponeData getUpdateWelderExchangeTime(string wedId, string projectId) { Model.ResponeData respone = new ResponeData(); try { - return APIWeldServices.getUpdateWelderExchangeTime(wedId,projectId); + return APIWeldServices.getUpdateWelderExchangeTime(wedId, projectId); + } + catch (Exception e) + { + respone.code = 0; + respone.message = e.Message; + } + return respone; + } + + [HttpGet] + public Model.ResponeData getProjectWelderList(string projectId, int page, int pageSize) + { + Model.ResponeData respone = new ResponeData(); + try + { + + return APIWeldServices.getProjectWelderList(projectId, page, pageSize); } catch (Exception e) { diff --git a/HJGL_DS/WebAPI/WebAPI.csproj b/HJGL_DS/WebAPI/WebAPI.csproj index 2682b74..aabef7b 100644 --- a/HJGL_DS/WebAPI/WebAPI.csproj +++ b/HJGL_DS/WebAPI/WebAPI.csproj @@ -48,7 +48,7 @@ False - ..\..\..\..\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\bin\Newtonsoft.Json.dll + ..\..\..\..\赛鼎\SGGL_SeDin_New\SGGL\WebAPI\bin\Newtonsoft.Json.dll diff --git a/HJGL_DS/WebAPI/WebAPI.csproj.user b/HJGL_DS/WebAPI/WebAPI.csproj.user index 8cd7f1f..28be9c4 100644 --- a/HJGL_DS/WebAPI/WebAPI.csproj.user +++ b/HJGL_DS/WebAPI/WebAPI.csproj.user @@ -1,4 +1,4 @@ - + Release|Any CPU From 0fab034d6bbc5650b021774ff648fa66a51e18aa Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Wed, 22 Jul 2026 14:41:15 +0800 Subject: [PATCH 2/2] 1 --- HJGL_DS/BLL/Common/OpenAIhelper.cs | 2 +- HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user | 4 ++-- HJGL_DS/FineUIPro.Web/Web.config | 4 ++-- HJGL_DS/WebAPI/WebAPI.csproj.user | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/HJGL_DS/BLL/Common/OpenAIhelper.cs b/HJGL_DS/BLL/Common/OpenAIhelper.cs index da77afc..e0f9dc3 100644 --- a/HJGL_DS/BLL/Common/OpenAIhelper.cs +++ b/HJGL_DS/BLL/Common/OpenAIhelper.cs @@ -14,7 +14,7 @@ namespace BLL.Common { public class OpenAIhelper { - private const string ApiKey = "sk-a5014a22a49049d1b2179a6c0d8eec1c"; + private const string ApiKey = "sk-8bfd57eaf2c7438388ec584ac86dfb34"; private const string AIURL = "https://api.deepseek.com/chat/completions"; public static string ChatCompletion(string content) diff --git a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user index e3436b8..abef49a 100644 --- a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -1,8 +1,8 @@ - + true - Release|Any CPU + Debug|Any CPU diff --git a/HJGL_DS/FineUIPro.Web/Web.config b/HJGL_DS/FineUIPro.Web/Web.config index 3c98f31..1b40665 100644 --- a/HJGL_DS/FineUIPro.Web/Web.config +++ b/HJGL_DS/FineUIPro.Web/Web.config @@ -11,7 +11,7 @@ - + @@ -67,7 +67,7 @@ - + diff --git a/HJGL_DS/WebAPI/WebAPI.csproj.user b/HJGL_DS/WebAPI/WebAPI.csproj.user index 28be9c4..a48b337 100644 --- a/HJGL_DS/WebAPI/WebAPI.csproj.user +++ b/HJGL_DS/WebAPI/WebAPI.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU FolderProfile true