From e2da671c2fce9bfc993546bd8c39032aebe14ada Mon Sep 17 00:00:00 2001 From: 10191 <506754232@qq.com> Date: Sun, 31 Aug 2025 10:54:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=84=8A=E5=B7=A5=E6=9B=B4=E6=96=B0=E5=A4=B4?= =?UTF-8?q?=E5=83=8F=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HJGL_DS/BLL/API/APIBaseServices.cs | 1 + HJGL_DS/BLL/API/APIWeldServices.cs | 96 +++++++++++++++++++ .../PersonManage/HJGL_PersonManageService.cs | 13 ++- HJGL_DS/Model/APIItem/WelderItem.cs | 13 +-- HJGL_DS/WebAPI/Controllers/WeldController.cs | 34 +++++++ .../WebAPI/Filter/TestPermissionAttribute.cs | 2 + 6 files changed, 152 insertions(+), 7 deletions(-) diff --git a/HJGL_DS/BLL/API/APIBaseServices.cs b/HJGL_DS/BLL/API/APIBaseServices.cs index 3764a49..0e2214f 100644 --- a/HJGL_DS/BLL/API/APIBaseServices.cs +++ b/HJGL_DS/BLL/API/APIBaseServices.cs @@ -429,6 +429,7 @@ y in db.Project_Welder on x.WED_ID equals y.WED_ID item.LimitDate = p.LimitDate; item.IdentityCard = p.IdentityCard; item.AttachUrl = p.AttachUrl; + item.PhotoUrl = p.PhotoUrl; item.IsFaceTrain = p.IsFaceTrain; res.Add(item); diff --git a/HJGL_DS/BLL/API/APIWeldServices.cs b/HJGL_DS/BLL/API/APIWeldServices.cs index b4fd91b..8b3b19a 100644 --- a/HJGL_DS/BLL/API/APIWeldServices.cs +++ b/HJGL_DS/BLL/API/APIWeldServices.cs @@ -402,5 +402,101 @@ namespace BLL.API } + /// + /// 项目焊工 + /// + /// + /// + public static Model.ResponeData getProjectWelder(string projectId) + { + Model.ResponeData respone = new ResponeData(); + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var q = from pw in db.Project_Welder + join w in db.HJGL_BS_Welder on pw.WED_ID equals w.WED_ID + where pw.ProjectId == projectId + where w.PhotoUrl !=null && pw.ExchangeTime ==null + select w; + List res = new List(); + foreach (var p in q) + { + WelderItem item = new WelderItem(); + item.WED_ID = p.WED_ID; + item.WED_Unit = p.WED_Unit; + item.EDU_ID = p.EDU_ID; + item.SE_EquipmentID = p.SE_EquipmentID; + item.NP_NondestructivePersonID = p.NP_NondestructivePersonID; + item.WED_Code = p.WED_Code; + item.WED_Name = p.WED_Name; + item.WED_UserType = p.WED_UserType; + item.WED_Sex = p.WED_Sex; + item.WED_Birthday = p.WED_Birthday; + item.WED_WorkCode = p.WED_WorkCode; + item.WED_Class = p.WED_Class; + item.WED_TotalDin = p.WED_TotalDin; + item.WED_TotalJoint = p.WED_TotalJoint; + item.WED_ExtendDin = p.WED_ExtendDin; + item.WED_ExtendJoint = p.WED_ExtendJoint; + item.WED_RepairJoint = p.WED_RepairJoint; + item.WED_IfOnGuard = p.WED_IfOnGuard; + item.WED_Remark = p.WED_Remark; + item.WED_TotalFilm = p.WED_TotalFilm; + item.WED_PassFilm = p.WED_PassFilm; + item.WED_ExtendTotalFilm = p.WED_ExtendTotalFilm; + item.WED_ExtendPassFilm = p.WED_ExtendPassFilm; + item.ProjectId = p.ProjectId; + item.ThicknessMax = p.ThicknessMax; + item.ThicknessMin = p.ThicknessMin; + item.SizesMax = p.SizesMax; + item.SizesMin = p.SizesMin; + item.RecordDate = p.RecordDate; + item.MyFinger = p.MyFinger; + item.SignatureUrl = p.SignatureUrl; + item.Education = p.Education; + item.WED_States = p.WED_States; + item.IsOAM = p.IsOAM; + item.LimitDate = p.LimitDate; + item.IdentityCard = p.IdentityCard; + item.AttachUrl = p.AttachUrl; + item.PhotoUrl = p.PhotoUrl; + item.IsFaceTrain = p.IsFaceTrain; + res.Add(item); + } + respone.data = res; + } + return respone; + } + + + + #region 更新人员数据交换时间 + /// + /// 更新人员数据交换时间 + /// + /// 人员ID + /// 交换类型 + /// + public static Model.ResponeData getUpdateWelderExchangeTime(string wedId, string projectId) + { + var responeData = new Model.ResponeData(); + try + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var getPerson = db.Project_Welder.FirstOrDefault(e => e.ProjectId == projectId && e.WED_ID == wedId); + getPerson.ExchangeTime = DateTime.Now; + db.SubmitChanges(); + } + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + ErrLogInfo.WriteLog(ex, "更新人员数据交换时间", "PersonController.getUpdatePersonExchangeTime"); + } + return responeData; + } + #endregion + } } diff --git a/HJGL_DS/BLL/HJGL/PersonManage/HJGL_PersonManageService.cs b/HJGL_DS/BLL/HJGL/PersonManage/HJGL_PersonManageService.cs index 6e3c733..7d13d37 100644 --- a/HJGL_DS/BLL/HJGL/PersonManage/HJGL_PersonManageService.cs +++ b/HJGL_DS/BLL/HJGL/PersonManage/HJGL_PersonManageService.cs @@ -92,12 +92,23 @@ namespace BLL newWelder.AttachUrl = welder.AttachUrl; newWelder.SignatureUrl = welder.SignatureUrl; newWelder.IsFaceTrain = welder.IsFaceTrain; - newWelder.MaxHanTiao = welder.MaxHanTiao; newWelder.MaxWeldingWire = welder.MaxWeldingWire; newWelder.IsOAM = welder.IsOAM; + db.SubmitChanges(); + var pw = from x in db.Project_Welder + where x.WED_ID == welder.WED_ID + select x; + foreach(var w in pw) + { + w.ExchangeTime = null; + } + db.SubmitChanges(); + + + } } diff --git a/HJGL_DS/Model/APIItem/WelderItem.cs b/HJGL_DS/Model/APIItem/WelderItem.cs index 5646343..8c4017d 100644 --- a/HJGL_DS/Model/APIItem/WelderItem.cs +++ b/HJGL_DS/Model/APIItem/WelderItem.cs @@ -5,10 +5,10 @@ using System; namespace Model.APIItem { public class WelderItem - { /** - * 人员id - */ - + { + /** + * 人员id + */ public string WED_ID { get; set; } /** @@ -249,9 +249,10 @@ namespace Model.APIItem - public string AttachUrl { get; set; } + public string AttachUrl { get; set; } + public string PhotoUrl { get; set; } - public bool? IsFaceTrain { get; set; } + public bool? IsFaceTrain { get; set; } } } diff --git a/HJGL_DS/WebAPI/Controllers/WeldController.cs b/HJGL_DS/WebAPI/Controllers/WeldController.cs index 0188acc..ab5dc9f 100644 --- a/HJGL_DS/WebAPI/Controllers/WeldController.cs +++ b/HJGL_DS/WebAPI/Controllers/WeldController.cs @@ -178,5 +178,39 @@ namespace WebAPI.Controllers return respone; } + + + [HttpGet] + public Model.ResponeData getProjectWelder(string projectId) + { + Model.ResponeData respone = new ResponeData(); + try + { + + return APIWeldServices.getProjectWelder(projectId); + } + catch (Exception e) + { + respone.code = 0; + respone.message = e.Message; + } + return respone; + } + [HttpGet] + public Model.ResponeData getUpdateWelderExchangeTime(string wedId,string projectId) + { + Model.ResponeData respone = new ResponeData(); + try + { + + return APIWeldServices.getUpdateWelderExchangeTime(wedId,projectId); + } + catch (Exception e) + { + respone.code = 0; + respone.message = e.Message; + } + return respone; + } } } \ No newline at end of file diff --git a/HJGL_DS/WebAPI/Filter/TestPermissionAttribute.cs b/HJGL_DS/WebAPI/Filter/TestPermissionAttribute.cs index 2360e78..f076573 100644 --- a/HJGL_DS/WebAPI/Filter/TestPermissionAttribute.cs +++ b/HJGL_DS/WebAPI/Filter/TestPermissionAttribute.cs @@ -178,6 +178,8 @@ namespace WebAPI.Filter //"Weld*getUsingPlanById", //"Weld*welderQueIsPass", //"Weld*addUsingPlan", + "Weld*getProjectWelder", + "Weld*getUpdateWelderExchangeTime", }; ///