From 5ba3955b4ac56e5ae900ab0d013319ce40751caf Mon Sep 17 00:00:00 2001 From: gaofei <181547018@qq.com> Date: Thu, 8 Sep 2022 09:05:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A8=E9=87=8F=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/BLL.csproj | 9 ++- .../HJGL/PersonManage/WelderQualifyService.cs | 61 +++++++++++++++++++ .../SitePerson/SitePerson_PersonService.cs | 2 + SGGL/BLL/Person/Person_PersonsService.cs | 14 ++--- .../CQMS/CQMSPersonManageController.cs | 18 ++++++ 5 files changed, 92 insertions(+), 12 deletions(-) diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 0b8a0c55..2018c84e 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -46,7 +46,7 @@ ..\packages\Apache.NMS.ActiveMQ.1.7.2\lib\net40\Apache.NMS.ActiveMQ.dll - ..\FineUIPro\Reference BLL\Aspose.Words.dll + bin\Debug\Aspose.Words.dll ..\packages\Portable.BouncyCastle.1.8.9\lib\net40\BouncyCastle.Crypto.dll @@ -56,7 +56,7 @@ False - ..\FineUIPro\FineUIPro.dll + bin\Debug\FineUIPro.dll ..\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll @@ -115,9 +115,8 @@ - - False - ..\FineUIPro\Reference BLL\ThoughtWorks.QRCode.dll + + bin\Debug\ThoughtWorks.QRCode.dll diff --git a/SGGL/BLL/HJGL/PersonManage/WelderQualifyService.cs b/SGGL/BLL/HJGL/PersonManage/WelderQualifyService.cs index 33db741d..1df4fd3e 100644 --- a/SGGL/BLL/HJGL/PersonManage/WelderQualifyService.cs +++ b/SGGL/BLL/HJGL/PersonManage/WelderQualifyService.cs @@ -125,5 +125,66 @@ namespace BLL Funs.DB.SubmitChanges(); } } + + #region 获取焊工合格项目信息列表 + public static List GetWelderQualifyListDataForApi(string personId, int index, int page) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + IQueryable q = db.View_Welder_WelderQualify; + List ids = new List(); + if (!string.IsNullOrEmpty(personId)) + { + q = q.Where(e => e.WelderId == personId); + } + var qq1 = from x in q + orderby x.PersonName + select new + { + x.WelderQualifyId, + x.IsAudit, + x.QualificationItem, + x.CheckDate, + x.LimitDate, + x.WeldingMethod, + x.MaterialType, + x.WeldingLocation, + x.Thickness, + x.Sizes, + x.Thickness2, + x.Sizes2, + x.WeldType, + x.IsCanWeldG, + x.Remark, + x.PersonName, + }; + var list = qq1.Skip(index * page).Take(page).ToList(); + + List listRes = new List(); + for (int i = 0; i < list.Count; i++) + { + Model.View_Welder_WelderQualify x = new Model.View_Welder_WelderQualify(); + x.WelderQualifyId = list[i].WelderQualifyId; + x.IsAudit = list[i].IsAudit; + x.QualificationItem = list[i].QualificationItem; + x.CheckDate = list[i].CheckDate; + x.LimitDate = list[i].LimitDate; + x.WeldingMethod = list[i].WeldingMethod; + x.MaterialType = list[i].MaterialType; + x.WeldingLocation = list[i].WeldingLocation; + x.Thickness = list[i].Thickness; + x.Sizes = list[i].Sizes; + x.Thickness2 = list[i].Thickness2; + x.Sizes2 = list[i].Sizes2; + x.WeldType = list[i].WeldType; + x.IsCanWeldG = list[i].IsCanWeldG; + x.Remark = list[i].Remark; + x.PersonName = list[i].PersonName; + listRes.Add(x); + } + return listRes; + } + } + #endregion } } diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs index a5343ed0..41191b4a 100644 --- a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs +++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs @@ -1110,6 +1110,7 @@ namespace BLL } #endregion + #region 更新焊工信息 public static void UpdateWelderForApi(Model.SitePerson_Person Welder) { @@ -1131,5 +1132,6 @@ namespace BLL db.SubmitChanges(); } } + #endregion } } \ No newline at end of file diff --git a/SGGL/BLL/Person/Person_PersonsService.cs b/SGGL/BLL/Person/Person_PersonsService.cs index 07ea7d14..5dacb470 100644 --- a/SGGL/BLL/Person/Person_PersonsService.cs +++ b/SGGL/BLL/Person/Person_PersonsService.cs @@ -43,7 +43,7 @@ namespace BLL /// 人员类型 /// /// - public static IEnumerable getListData(string unitId, string departId, string projetcId, string name, string idCard, string isPost,string personType, Grid Grid1) + public static IEnumerable getListData(string unitId, string departId, string projetcId, string name, string idCard, string isPost, string personType, Grid Grid1) { IQueryable getDataList = getDataLists.OrderBy(x => x.UnitId).ThenBy(x => x.DepartId); if (!string.IsNullOrEmpty(unitId) && unitId != Const._Null) @@ -96,9 +96,9 @@ namespace BLL x.JobNum, x.Account, x.IdentityCard, - Sex = x.Sex ?? "1", - x.Birthday, - x.UnitId, + Sex = x.Sex ?? "1", + x.Birthday, + x.UnitId, db.Base_Unit.First(u => u.UnitId == x.UnitId).UnitName, x.DepartId, db.Base_Depart.First(u => u.DepartId == x.DepartId).DepartName, @@ -118,10 +118,10 @@ namespace BLL x.Address, x.Telephone, x.EduLevel, - EduLevelName= BasicDataService.GetDictNameByDictCode(x.EduLevel), + EduLevelName = BasicDataService.GetDictNameByDictCode(x.EduLevel), x.Major, x.PersonType, - PersonTypeName=DropListService.getPersonTypeNameByValue(x.PersonType), + PersonTypeName = DropListService.getPersonTypeNameByValue(x.PersonType), x.ValidityDate, }; } @@ -1087,7 +1087,7 @@ namespace BLL where y.ProjectId == projectId && z.ProjectId == projectId where unitType == "" || unitTypes.Contains(z.UnitType) where unitId == "" || unitIds.Contains(z.UnitId) - where y.States == Const.State_1 + where y.States == Const.State_1 && y.RoleIds != null orderby z.UnitType descending, x.PersonName select x).ToList(); } diff --git a/SGGL/WebAPI/Controllers/CQMS/CQMSPersonManageController.cs b/SGGL/WebAPI/Controllers/CQMS/CQMSPersonManageController.cs index 523e419e..3dfb4e29 100644 --- a/SGGL/WebAPI/Controllers/CQMS/CQMSPersonManageController.cs +++ b/SGGL/WebAPI/Controllers/CQMS/CQMSPersonManageController.cs @@ -78,5 +78,23 @@ namespace Mvc.Controllers }; APIUpLoadFileService.SaveAttachUrl(toDoItem); } + + /// + /// 焊工合格项目列表 + /// + /// + /// + /// + /// + /// + [HttpGet] + public ResponseData> WelderQualifyIndex(string personId, int index, int page) + { + ResponseData> res = new ResponseData>(); + + res.successful = true; + res.resultValue = BLL.WelderQualifyService.GetWelderQualifyListDataForApi(personId, index, page); + return res; + } } } \ No newline at end of file