diff --git a/DataBase/版本日志/SGGLDB_V2026-10-16-xiaj.sql b/DataBase/版本日志/SGGLDB_V2026-10-16-xiaj.sql new file mode 100644 index 00000000..09425cd7 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2026-10-16-xiaj.sql @@ -0,0 +1,15 @@ + +update Sys_Menu +set MenuName='¼ǷÖÁ÷ˮÈÕ־' +where MenuName like '%µ÷Ö%' +go + + +--¹«˾¼¶£º»ý·ְñ +IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '94128BC0-75E3-4E27-9629-8775066DAFE7') +BEGIN + INSERT INTO dbo.Sys_Menu (MenuId, MenuName,Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed) + VALUES (N'94128BC0-75E3-4E27-9629-8775066DAFE7', N'»ý·ְñ', 'Score/Standings.aspx', 25, N'416F0A73-FB3D-4AAC-BC76-3820F52382D9', N'Menu_S_HSSE', 1,1, 1); +END +GO + diff --git a/DataBase/版本日志/SGGLDB_V2026-10-16-xiaj(View_SitePerson_PersonList).sql b/DataBase/版本日志/SGGLDB_V2026-10-16-xiaj(View_SitePerson_PersonList).sql new file mode 100644 index 00000000..ce434d5b --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2026-10-16-xiaj(View_SitePerson_PersonList).sql @@ -0,0 +1,46 @@ + + +ALTER VIEW [dbo].[View_SitePerson_PersonList] +AS + +SELECT + Person.PersonId, + Person.ProjectId, + Person.IsUsed, + Person.IsForeign, + Person.IsOutside, + Person.BlackList, + Person.CardNo, + Person.PersonName, + su.Score, + Person.UnitId, + Unit.UnitName, + WorkAreaName= STUFF((SELECT ',' + UnitWorkName FROM dbo.WBS_UnitWork where PATINDEX('%,' + RTRIM(UnitWorkId) + ',%',',' +Person.WorkAreaId + ',')>0 FOR XML PATH('')), 1, 1,''), + TeamGroup.TeamGroupName, + Person.InTime, + Person.OutTime, + (CASE Person.IsUsed WHEN 'TRUE' THEN 'ÊÇ' ELSE '·ñ' END) AS IsUsedName, + Person.IdentityCard, + Person.TeamGroupId, + Person.WorkPostId, + Post.WorkPostName, + Person.IdcardType, + Person.PhotoUrl, + edu.TrainCount, + PoliticsStatus.dictName AS PoliticsStatusName + --,Person.PostTrainingRoleId, + --PostRole.Name AS PostTrainingRoleName +FROM SitePerson_Person AS Person +LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = Person.UnitId +LEFT JOIN ScoreUser AS su ON su.IdentityCard = Person.IdentityCard AND su.Year=YEAR(GETDATE()) +LEFT JOIN ProjectData_TeamGroup AS TeamGroup ON TeamGroup.TeamGroupId=Person.TeamGroupId +LEFT JOIN Base_WorkPost AS Post ON Post.WorkPostId = Person.WorkPostId +LEFT JOIN RealName_BasicData AS PoliticsStatus ON PoliticsStatus.dictCode = Person.PoliticsStatus AND PoliticsStatus.DictTypeCode='POLITICAL_LANDSCAPE' +LEFT JOIN (select PersonId,count(PersonId)as TrainCount from EduTrain_TrainRecordDetail group by PersonId) as edu on edu.PersonId= Person.PersonId +--LEFT JOIN PostTraining_Role AS PostRole ON PostRole.Id = Person.PostTrainingRoleId + + + +GO + + diff --git a/DataBase/版本日志/SGGLDB_V2026-10-16-xiaj(View_SitePerson_Person).sql b/DataBase/版本日志/SGGLDB_V2026-10-16-xiaj(View_SitePerson_Person).sql new file mode 100644 index 00000000..640607b6 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2026-10-16-xiaj(View_SitePerson_Person).sql @@ -0,0 +1,119 @@ + + +ALTER VIEW [dbo].[View_SitePerson_Person] +AS +SELECT Person.PersonId, + Person.CardNo, + Person.PersonName, + su.Score, + Person.Sex, + (Case Person.Sex WHEN '1' THEN 'ÄÐ' WHEN '2' THEN 'Ů' ELSE '' END) AS SexName, + Person.IdentityCard, + Person.Address, + Person.ProjectId, + Person.UnitId, + Person.Birthday, + Person.TeamGroupId, + Person.WorkAreaId, + Person.WorkPostId, + Person.InTime, + Person.OutTime, + Person.OutResult, + Person.Telephone, + Person.PositionId, + Person.PostTitleId, + Person.InstitutionalDivisionId, + Person.EmployeeCategoryId, + Person.EmployeeSubgroupId, + Person.DepartId, + Person.PhotoUrl, + Person.IsUsed, + Person.Remarks, + (CASE Person.IsUsed WHEN 'TRUE' THEN 'ÊÇ' ELSE '·ñ' END) AS IsUsedName, + Person.IsCardUsed, + (CASE Person.IsCardUsed WHEN 'TRUE' THEN 'ÊÇ' ELSE '·ñ' END) AS IsCardUsedName, + Person.PersonIndex, + Project.ProjectCode, + Project.ProjectName, + Unit.UnitCode, + Unit.UnitName, + TeamGroup.TeamGroupName, + --WorkArea.UnitWorkCode AS WorkAreaCode, + WorkAreaCode= STUFF((SELECT ',' + UnitWorkCode FROM dbo.WBS_UnitWork where PATINDEX('%,' + RTRIM(UnitWorkId) + ',%',',' +Person.WorkAreaId + ',')>0 FOR XML PATH('')), 1, 1,''), + --WorkArea.UnitWorkName AS WorkAreaName + WorkAreaName= STUFF((SELECT ',' + UnitWorkName FROM dbo.WBS_UnitWork where PATINDEX('%,' + RTRIM(UnitWorkId) + ',%',',' +Person.WorkAreaId + ',')>0 FOR XML PATH('')), 1, 1,''), + Post.WorkPostName, + Position.PositionName, + Title.PostTitleName, + Depart.DepartName, + EmployeeCategory.CategoryName as EmployeeCategoryName, + EmployeeSubgroup.SubgroupName as EmployeeSubgroupName, + Division.Name as InstitutionalDivisionName, + Post.PostType, + Post.IsHsse, + (SELECT COUNT(*) FROM EduTrain_TrainRecordDetail T WHERE T.PersonId=Person.PersonId) AS TrainCount, + Person.AuditorId, + sysUser.UserName AS AuditorName, + Person.AuditorDate, + Person.IDCardUrl, + Person.IsForeign, + case when Person.IsForeign=1 then 'ÊÇ' else '·ñ' end as IsForeignStr, + Person.IdcardType, + BasicData1.dictName as IdcardTypeName, + Person.IdcardStartDate, + Person.IdcardEndDate, + Person.IdcardForever, + case when Person.IdcardForever='Y' then 'ÊÇ' else '·ñ' end as IdcardForeverStr, + Person.PoliticsStatus, + BasicData2.dictName as PoliticsStatusName, + Person.IdcardAddress, + Person.Nation, + BasicData3.dictName as NationName, + Person.EduLevel, + BasicData4.dictName as EduLevelName, + Person.MaritalStatus, + BasicData5.dictName as MaritalStatusName, + Person.CountryCode, + Country.cname as CountryName, + Person.ProvinceCode, + City.cname as ProvinceName, + Person.MainCNProfessionalId, + CNProfessional.ProfessionalName as MainCNProfessionalName, + Person.ViceCNProfessionalId, + '' as ViceCNProfessionalName, + Person.IsOutside, + case when Person.IsOutside=1 then 'ÊÇ' else '·ñ' end as IsOutsideStr, + Person.BlackList, + Person.BlackReason, + Person.States, + sysUser.StarLevelId, + StarLevel.StarMark, + StarLevel.LevelValue + +FROM SitePerson_Person AS Person +LEFT JOIN Base_Project AS Project ON Project.ProjectId=Person.ProjectId +LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = Person.UnitId +LEFT JOIN ScoreUser AS su ON su.IdentityCard = Person.IdentityCard AND su.Year=YEAR(GETDATE()) +LEFT JOIN ProjectData_TeamGroup AS TeamGroup ON TeamGroup.TeamGroupId=Person.TeamGroupId +--LEFT JOIN WBS_UnitWork AS WorkArea ON WorkArea.UnitWorkId = Person.WorkAreaId +LEFT JOIN Base_WorkPost AS Post ON Post.WorkPostId = Person.WorkPostId +LEFT JOIN Base_Position AS Position ON Position.PositionId = Person.PositionId +Left JOIN Base_PostTitle AS Title ON Title.PostTitleId = Person.PostTitleId +Left JOIN Base_Depart AS Depart ON Depart.DepartId = Person.DepartId +Left JOIN Base_EmployeeCategory AS EmployeeCategory ON EmployeeCategory.CategoryId = Person.EmployeeCategoryId +Left JOIN Base_EmployeeSubgroup AS EmployeeSubgroup ON EmployeeSubgroup.SubgroupId = Person.EmployeeSubgroupId +Left JOIN Base_InstitutionalDivision AS Division ON Division.Id = Person.InstitutionalDivisionId +Left JOIN Sys_User AS sysUser ON sysUser.UserId = Person.AuditorId +Left JOIN RealName_BasicData AS BasicData1 ON BasicData1.dictCode = Person.IdcardType +Left JOIN RealName_BasicData AS BasicData2 ON BasicData2.dictCode = Person.PoliticsStatus +Left JOIN RealName_BasicData AS BasicData3 ON BasicData3.dictCode = Person.Nation +Left JOIN RealName_BasicData AS BasicData4 ON BasicData4.dictCode = Person.EduLevel +Left JOIN RealName_BasicData AS BasicData5 ON BasicData5.dictCode = Person.MaritalStatus +Left JOIN RealName_Country AS Country ON Country.CountryId = Person.CountryCode +Left JOIN RealName_City AS City ON City.provinceCode = Person.ProvinceCode +Left JOIN Base_CNProfessional AS CNProfessional ON CNProfessional.CNProfessionalId = Person.MainCNProfessionalId +Left JOIN Base_StarLevel AS StarLevel ON sysUser.StarLevelId = StarLevel.StarLevelId + +GO + + diff --git a/SGGL/BLL/Score/ScoreUserService.cs b/SGGL/BLL/Score/ScoreUserService.cs index 85655bf1..c234975c 100644 --- a/SGGL/BLL/Score/ScoreUserService.cs +++ b/SGGL/BLL/Score/ScoreUserService.cs @@ -1,5 +1,4 @@ using Model; -using NPOI.SS.UserModel; using System; using System.Collections.Generic; using System.Linq; @@ -20,7 +19,6 @@ namespace BLL { return Funs.DB.ScoreUser.FirstOrDefault(e => e.Id == Id); } - /// /// 根据证件号码获取人员今年上一条得分记录 /// @@ -55,17 +53,27 @@ namespace BLL /// 人员得分实体 public static void AddScoreUser(Model.ScoreUser model) { - Model.ScoreUser newModel = new Model.ScoreUser(); - newModel.Id = model.Id; - newModel.Year = model.Year; - newModel.IdentityCard = model.IdentityCard; - newModel.UserName = model.UserName; - newModel.Score = model.Score; - newModel.CompileDate = model.CompileDate; - newModel.DataSourceId = model.DataSourceId; - newModel.CheckDate = model.CheckDate; - Funs.DB.ScoreUser.InsertOnSubmit(newModel); - Funs.DB.SubmitChanges(); + var su = Funs.DB.ScoreUser.FirstOrDefault(e => e.IdentityCard == model.IdentityCard && e.Year == model.Year); + if (su != null) + {//已存在,修改人员今年得分值 + su.Score = model.Score; + su.CompileDate = model.CompileDate; + Funs.DB.SubmitChanges(); + } + else + { + Model.ScoreUser newModel = new Model.ScoreUser(); + newModel.Id = model.Id; + newModel.Year = model.Year; + newModel.IdentityCard = model.IdentityCard; + newModel.UserName = model.UserName; + newModel.Score = model.Score; + newModel.CompileDate = model.CompileDate; + newModel.DataSourceId = model.DataSourceId; + newModel.CheckDate = model.CheckDate; + Funs.DB.ScoreUser.InsertOnSubmit(newModel); + Funs.DB.SubmitChanges(); + } } /// diff --git a/SGGL/BLL/SysManage/UnitService.cs b/SGGL/BLL/SysManage/UnitService.cs index ca65e2d5..7a090232 100644 --- a/SGGL/BLL/SysManage/UnitService.cs +++ b/SGGL/BLL/SysManage/UnitService.cs @@ -153,7 +153,9 @@ namespace BLL /// public static List GetUnitDropDownList() { - var list = (from x in Funs.DB.Base_Unit select x).OrderBy(x => x.UnitCode).ToList(); + var list = (from x in Funs.DB.Base_Unit + orderby x.IsThisUnit descending, x.UnitCode ascending + select x).ToList(); return list; } @@ -163,7 +165,10 @@ namespace BLL /// public static List GetThisUnitDropDownList() { - var list = (from x in Funs.DB.Base_Unit where x.UnitId == Const.UnitId_XJYJ select x).ToList(); + var list = (from x in Funs.DB.Base_Unit + where x.UnitId == Const.UnitId_XJYJ + orderby x.IsThisUnit descending, x.UnitCode ascending + select x).ToList(); return list; } @@ -181,7 +186,10 @@ namespace BLL var unitIdList = GetChildrenUnitId(unitId); if (unitIdList.Count() > 0) { - unitList = (from x in Funs.DB.Base_Unit where unitIdList.Contains(x.UnitId) || x.UnitId == unitId select x).ToList(); + unitList = (from x in Funs.DB.Base_Unit + where unitIdList.Contains(x.UnitId) || x.UnitId == unitId + orderby x.IsThisUnit descending, x.UnitCode ascending + select x).ToList(); } return unitList; } @@ -212,12 +220,14 @@ namespace BLL { var list = (from x in Funs.DB.Base_Unit where x.IsBranch == true - select x).OrderBy(x => x.UnitCode).ToList(); + orderby x.IsThisUnit descending, x.UnitCode ascending + select x).ToList(); if (isThisUnit) { list = (from x in Funs.DB.Base_Unit where x.IsBranch == true || x.UnitId == Const.UnitId_XJYJ - select x).OrderBy(x => x.UnitCode).ToList(); + orderby x.IsThisUnit descending, x.UnitCode ascending + select x).ToList(); } return list; } @@ -237,15 +247,16 @@ namespace BLL units = (from x in db.Base_Unit join y in db.Project_ProjectUnit on x.UnitId equals y.UnitId where y.ProjectId == projectId + orderby x.IsThisUnit descending, x.UnitCode ascending select x).ToList(); } else { units = (from x in db.Base_Unit - orderby x.UnitCode + orderby x.IsThisUnit descending, x.UnitCode ascending select x).ToList(); } - units = units.OrderBy(x => x.UnitCode).ToList(); + //units = units.OrderBy(x => x.UnitCode).ToList(); return units; } } @@ -263,7 +274,7 @@ namespace BLL join y in db.Project_ProjectUnit on x.UnitId equals y.UnitId where y.ProjectId == projectId - orderby x.UnitCode + orderby x.IsThisUnit descending, x.UnitCode ascending select x).ToList(); return q; } @@ -282,7 +293,7 @@ namespace BLL join y in db.Project_ProjectUnit on x.UnitId equals y.UnitId where y.ProjectId == projectId && (y.UnitType == unitType || string.IsNullOrEmpty(unitType)) - orderby x.UnitCode + orderby x.IsThisUnit descending, x.UnitCode ascending select x).ToList(); return q; } @@ -301,7 +312,7 @@ namespace BLL join y in db.Project_ProjectUnit on x.UnitId equals y.UnitId where y.ProjectId == projectId && (y.UnitType == BLL.Const.ProjectUnitType_2 || y.UnitType == BLL.Const.ProjectUnitType_1) - orderby x.UnitCode + orderby x.IsThisUnit descending, x.UnitCode ascending select x).ToList(); return q; } @@ -320,7 +331,7 @@ namespace BLL join y in db.Project_ProjectUnit on x.UnitId equals y.UnitId where y.ProjectId == projectId && (x.UnitId != unitId || unitId == null) - orderby x.UnitCode + orderby x.IsThisUnit descending, x.UnitCode ascending select x).ToList(); return q; } @@ -333,7 +344,7 @@ namespace BLL join y in db.Project_ProjectUnit on x.UnitId equals y.UnitId where y.ProjectId == projectId && (unitId == null || x.UnitId != unitId) && (key == null || x.UnitCode.Contains(key) || x.UnitName.Contains(key)) - orderby x.UnitCode + orderby x.IsThisUnit descending, x.UnitCode ascending select x).ToList(); return q; } @@ -421,7 +432,10 @@ namespace BLL public static List GetMainAndSubUnitList() { //return (from x in Funs.DB.Base_Unit where x.IsThisUnit == true || x.IsBranch == true orderby x.IsThisUnit descending select x).ToList(); - return (from x in Funs.DB.Base_Unit where x.IsThisUnit == true || x.IsBranch == true select x).ToList(); + return (from x in Funs.DB.Base_Unit + where x.IsThisUnit == true || x.IsBranch == true + orderby x.IsThisUnit descending, x.UnitCode ascending + select x).ToList(); } #region 单位表下拉框 @@ -557,11 +571,11 @@ namespace BLL using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString)) { var q = (from x in db.Base_Unit - join y in db.Project_ProjectUnit - on x.UnitId equals y.UnitId + join y in db.Project_ProjectUnit on x.UnitId equals y.UnitId where y.ProjectId == projectId && (y.UnitType == BLL.Const.ProjectUnitType_1 || y.UnitType == BLL.Const.ProjectUnitType_2) && (y.OutTime == null || y.OutTime >= Convert.ToDateTime(DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString() + "-01")) - select x).OrderBy(x => x.UnitCode).ToList(); + orderby x.IsThisUnit descending, x.UnitCode ascending + select x).ToList(); return q; } } @@ -620,16 +634,17 @@ namespace BLL using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString)) { var q = (from x in db.Base_Unit - orderby x.UnitCode + orderby x.IsThisUnit descending, x.UnitCode ascending select x).ToList(); if (!string.IsNullOrEmpty(projectId)) { q = (from x in q join y in db.Project_ProjectUnit on x.UnitId equals y.UnitId where (y.ProjectId == projectId && y.UnitType != Const.ProjectUnitType_2) + orderby x.IsThisUnit descending, x.UnitCode ascending select x).ToList(); } - q = q.OrderByDescending(x => x.UnitCode).ToList(); + //q = q.OrderByDescending(x => x.UnitCode).ToList(); return q; } } @@ -741,7 +756,8 @@ namespace BLL join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId where x.ProjectId == projectId //where (x.UnitType == Const.ProjectUnitType_1 || x.UnitType == Const.ProjectUnitType_2) - orderby y.UnitCode + //orderby y.UnitCode + orderby y.IsThisUnit descending, y.UnitCode ascending select y).ToList(); ListItem[] list = new ListItem[q.Count()]; for (int i = 0; i < list.Count(); i++) @@ -805,7 +821,8 @@ namespace BLL var q = (from x in Funs.DB.Project_ProjectUnit join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId where x.ProjectId == projectId - orderby y.UnitCode + //orderby y.UnitCode + orderby y.IsThisUnit descending, y.UnitCode ascending select y).ToList(); ListItem[] list = new ListItem[q.Count()]; for (int i = 0; i < list.Count(); i++) @@ -827,8 +844,9 @@ namespace BLL join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId join z in Funs.DB.ProjectData_WorkArea on y.UnitId equals z.UnitId where x.ProjectId == projectId && (y.UnitId == unitId || z.SupervisorUnitId == unitId) && x.UnitType == BLL.Const.ProjectUnitType_2 - orderby y.UnitCode - select y).Distinct().ToList(); + //orderby y.UnitCode + orderby y.IsThisUnit descending, y.UnitCode ascending + select y).Distinct().ToList(); return q; } @@ -844,7 +862,8 @@ namespace BLL join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId join z in Funs.DB.ProjectData_WorkArea on y.UnitId equals z.UnitId where x.ProjectId == projectId && (y.UnitId == unitId || z.SupervisorUnitId == unitId) && x.UnitType == BLL.Const.ProjectUnitType_2 - orderby y.UnitCode + //orderby y.UnitCode + orderby y.IsThisUnit descending, y.UnitCode ascending select y).Distinct().ToList(); ListItem[] list = new ListItem[q.Count()]; for (int i = 0; i < q.Count(); i++) @@ -852,7 +871,7 @@ namespace BLL list[i] = new ListItem(q[i].UnitName ?? "", q[i].UnitId.ToString()); } return list; - } + } /// /// 获取登陆用户分包单位名称项 @@ -861,7 +880,7 @@ namespace BLL /// /// /// - public static void InitSubUnitNameDownList(FineUIPro.DropDownList dropName, string projectId,string unitId, bool isShowPlease) + public static void InitSubUnitNameDownList(FineUIPro.DropDownList dropName, string projectId, string unitId, bool isShowPlease) { dropName.DataValueField = "Value"; dropName.DataTextField = "Text"; @@ -883,8 +902,9 @@ namespace BLL { var q = (from x in Funs.DB.Project_ProjectUnit join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId - where x.ProjectId == projectId && y.UnitId == unitId && x.UnitType == BLL.Const.ProjectUnitType_2 - orderby y.UnitCode + where x.ProjectId == projectId && y.UnitId == unitId && x.UnitType == BLL.Const.ProjectUnitType_2 + //orderby y.UnitCode + orderby y.IsThisUnit descending, y.UnitCode ascending select y).Distinct().ToList(); ListItem[] list = new ListItem[q.Count()]; for (int i = 0; i < q.Count(); i++) @@ -952,7 +972,10 @@ namespace BLL { using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString)) { - var q = (from x in db.Base_Unit where x.UnitId != BLL.Const.UnitId_XJYJ orderby x.UnitCode select x).ToList(); + var q = (from x in db.Base_Unit + where x.UnitId != BLL.Const.UnitId_XJYJ + orderby x.IsThisUnit descending, x.UnitCode ascending + select x).ToList(); return q; } } @@ -961,7 +984,9 @@ namespace BLL { dropName.DataValueField = "UnitId"; dropName.DataTextField = "UnitName"; - dropName.DataSource = (from x in Funs.DB.Base_Unit orderby x.UnitCode select x).ToList(); + dropName.DataSource = (from x in Funs.DB.Base_Unit + orderby x.IsThisUnit descending, x.UnitCode ascending + select x).ToList(); dropName.DataBind(); if (isShowPlease) { diff --git a/SGGL/BLL/SysManage/UserService.cs b/SGGL/BLL/SysManage/UserService.cs index 335df22d..01ef0af7 100644 --- a/SGGL/BLL/SysManage/UserService.cs +++ b/SGGL/BLL/SysManage/UserService.cs @@ -492,7 +492,6 @@ namespace BLL orderby x.UserName select x).ToList(); } - } else { diff --git a/SGGL/BLL/ZHGL/DataSync/HJGLData_HJGLService.cs b/SGGL/BLL/ZHGL/DataSync/HJGLData_HJGLService.cs index 3abc0b40..15362666 100644 --- a/SGGL/BLL/ZHGL/DataSync/HJGLData_HJGLService.cs +++ b/SGGL/BLL/ZHGL/DataSync/HJGLData_HJGLService.cs @@ -150,35 +150,12 @@ namespace BLL { var q = GetTodayData(); var data = new HJGLData(); - if (CommonService.GetIsThisUnit().CollCropCode== "91410200170644116B") - { - return GetELECLTodayHJGLData_HJGL(); - } if (q != null && q.State == Const.CNCEC_State_S) data = StatisticalData(); else data = StatisticalData(); return data; } - /// - /// 获取十一化建焊接数据 - /// - /// - public static HJGLData GetELECLTodayHJGLData_HJGL() - { - var data = new HJGLData(); - string baseurl = "http://36.99.162.230:9493/sgglapi/api/CNCECServer/PostGetHJGLData"; - string token = Const.sysglyId; - string response = Funs.RequestPost(baseurl, token, ""); - var json = JsonConvert.DeserializeObject(response) as JObject; - if (json != null && json["code"]?.ToString()=="1") - { - var str = json["data"]?.ToString(); - if (str != null) data = JsonConvert.DeserializeObject(str); - } - return data; - - } public static HJGLData_HJGL GetTodayData() { diff --git a/SGGL/FineUIPro.Web/Check/HSE/CheckProblemEdit.aspx.cs b/SGGL/FineUIPro.Web/Check/HSE/CheckProblemEdit.aspx.cs index 62d9f494..bf4790f2 100644 --- a/SGGL/FineUIPro.Web/Check/HSE/CheckProblemEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Check/HSE/CheckProblemEdit.aspx.cs @@ -1,6 +1,5 @@ using BLL; using Model; -using NPOI.SS.Formula.Functions; using System; namespace FineUIPro.Web.Check.HSE @@ -55,35 +54,45 @@ namespace FineUIPro.Web.Check.HSE var model = CheckProblemSafetyService.GetCheckProblemById(this.CheckId); if (model != null) { - this.drpUnit.SelectedValue = model.UnitId; - this.drpRectificationUser.Items.Clear(); - BLL.UserService.InitUserUnitIdDropDownList(this.drpRectificationUser, this.drpUnit.SelectedValue, true); - this.drpPMUser.Items.Clear(); - BLL.UserService.InitUserUnitIdDropDownList(this.drpPMUser, this.drpUnit.SelectedValue, true); + if (!string.IsNullOrWhiteSpace(model.UnitId)) + { + this.drpUnit.SelectedValue = model.UnitId; + this.drpRectificationUser.Items.Clear(); + BLL.UserService.InitUserUnitIdDropDownList(this.drpRectificationUser, model.UnitId, true); + this.drpPMUser.Items.Clear(); + BLL.UserService.InitUserUnitIdDropDownList(this.drpPMUser, model.UnitId, true); - BLL.ProjectService.InitProjectDropDownList(this.drpProject, model.UnitId, true); + BLL.ProjectService.InitProjectDropDownList(this.drpProject, model.UnitId, true); + } if (!string.IsNullOrWhiteSpace(model.ProjectId)) { this.drpProject.SelectedValue = model.ProjectId; - } - if (!string.IsNullOrWhiteSpace(model.ProjectName)) - { - this.drpProject.Text = model.ProjectName; - } - var pro = BLL.ProjectService.GetProjectByProjectId(model.ProjectId); - if (pro != null) - { + + var pro = BLL.ProjectService.GetProjectByProjectId(model.ProjectId); this.txtAddress.Text = pro.ProjectAddress; + this.drpRectificationUser.Items.Clear(); + BLL.UserService.InitUserDropDownList(this.drpRectificationUser, model.ProjectId, true); this.drpPMUser.Items.Clear(); BLL.UserService.InitUserDropDownList(this.drpPMUser, model.ProjectId, true); } + else if (!string.IsNullOrWhiteSpace(model.ProjectName)) + { + this.drpProject.Text = model.ProjectName; + } + //var pro = BLL.ProjectService.GetProjectByProjectId(model.ProjectId); + //if (pro != null) + //{ + // this.txtAddress.Text = pro.ProjectAddress; + // this.drpPMUser.Items.Clear(); + // BLL.UserService.InitUserDropDownList(this.drpPMUser, model.ProjectId, true); + //} this.drpClassify.SelectedValue = model.ClassifyId; BLL.SafetyProblemClassifyItemService.InitClassifyItemDownList(this.drpClassifyItem, model.ClassifyId, true); if (!string.IsNullOrWhiteSpace(model.ClassifyItemId)) { this.drpClassifyItem.SelectedValue = model.ClassifyItemId; - } + } this.drpNature.SelectedValue = model.NatureId; BLL.SafetyProblemNatureItemService.InitNatureItemDownList(this.drpNatureItem, model.NatureId, true); if (!string.IsNullOrWhiteSpace(model.NatureItemId)) @@ -143,8 +152,8 @@ namespace FineUIPro.Web.Check.HSE { //受检单位 UnitService.InitBranchUnitDropDownList(this.drpUnit, false); - //受检项目 - ProjectService.InitProjectDropDownList(this.drpProject, true); + ////受检项目 + //ProjectService.InitProjectDropDownList(this.drpProject, true); //问题分类 SafetyProblemClassifyService.InitClassifyDropDownList(this.drpClassify, false); //问题性质 @@ -158,9 +167,9 @@ namespace FineUIPro.Web.Check.HSE /// protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e) { - //this.drpProject.Items.Clear(); - ////受检项目 - //BLL.ProjectService.InitProjectDropDownList(this.drpProject, this.drpUnit.SelectedValue, true); + this.drpProject.Items.Clear(); + //受检项目 + BLL.ProjectService.InitProjectDropDownList(this.drpProject, this.drpUnit.SelectedValue, true); this.drpRectificationUser.Items.Clear(); BLL.UserService.InitUserUnitIdDropDownList(this.drpRectificationUser, this.drpUnit.SelectedValue, true); @@ -182,6 +191,8 @@ namespace FineUIPro.Web.Check.HSE if (pro != null) { this.txtAddress.Text = pro.ProjectAddress; + this.drpRectificationUser.Items.Clear(); + BLL.UserService.InitUserDropDownList(this.drpRectificationUser, proId, true); this.drpPMUser.Items.Clear(); BLL.UserService.InitUserDropDownList(this.drpPMUser, proId, true); } @@ -386,7 +397,6 @@ namespace FineUIPro.Web.Check.HSE ////增加一条编码记录 //BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.SafetyCheckProblemMenuId, model.ProjectId, null, model.CheckId, model.CheckDate); - } else { @@ -477,7 +487,8 @@ namespace FineUIPro.Web.Check.HSE else { log.CurrentScore = 100 + log.Score; - } + } + log.CurrentScore = log.CurrentScore < 0 ? 0 : log.CurrentScore; BLL.ScoreFlowLogService.AddScoreFlowLog(log); //增加人员记分情况 diff --git a/SGGL/FineUIPro.Web/Check/HSE/CheckProblemIn.aspx.cs b/SGGL/FineUIPro.Web/Check/HSE/CheckProblemIn.aspx.cs index 7e0b540c..c6f8b798 100644 --- a/SGGL/FineUIPro.Web/Check/HSE/CheckProblemIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Check/HSE/CheckProblemIn.aspx.cs @@ -759,7 +759,8 @@ namespace FineUIPro.Web.Check.HSE { log.CurrentScore = 100 + log.Score; } - + log.CurrentScore = log.CurrentScore < 0 ? 0 : log.CurrentScore; + BLL.ScoreFlowLogService.AddScoreFlowLog(log); ScoreUser su = new ScoreUser(); diff --git a/SGGL/FineUIPro.Web/Check/QMS/CheckProblemEdit.aspx.cs b/SGGL/FineUIPro.Web/Check/QMS/CheckProblemEdit.aspx.cs index 72c79903..e4ed0f67 100644 --- a/SGGL/FineUIPro.Web/Check/QMS/CheckProblemEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Check/QMS/CheckProblemEdit.aspx.cs @@ -54,11 +54,32 @@ namespace FineUIPro.Web.Check.QMS var model = CheckProblemQualityService.GetCheckProblemById(this.CheckId); if (model != null) { - this.drpUnit.SelectedValue = model.UnitId; - BLL.ProjectService.InitProjectDropDownList(this.drpProject, model.UnitId, true); + if (!string.IsNullOrWhiteSpace(model.UnitId)) + { + this.drpUnit.SelectedValue = model.UnitId; + this.drpRectificationUser.Items.Clear(); + BLL.UserService.InitUserUnitIdDropDownList(this.drpRectificationUser, model.UnitId, true); + this.drpPMUser.Items.Clear(); + BLL.UserService.InitUserUnitIdDropDownList(this.drpPMUser, model.UnitId, true); + this.drpQCUser.Items.Clear(); + BLL.UserService.InitUserUnitIdDropDownList(this.drpQCUser, model.UnitId, true); + + BLL.ProjectService.InitProjectDropDownList(this.drpProject, model.UnitId, true); + } + //this.drpUnit.SelectedValue = model.UnitId; + //BLL.ProjectService.InitProjectDropDownList(this.drpProject, model.UnitId, true); if (!string.IsNullOrWhiteSpace(model.ProjectId)) { this.drpProject.SelectedValue = model.ProjectId; + + var pro = BLL.ProjectService.GetProjectByProjectId(model.ProjectId); + this.txtAddress.Text = pro.ProjectAddress; + this.drpRectificationUser.Items.Clear(); + BLL.UserService.InitUserDropDownList(this.drpRectificationUser, model.ProjectId, true); + this.drpPMUser.Items.Clear(); + BLL.UserService.InitUserDropDownList(this.drpPMUser, model.ProjectId, true); + this.drpQCUser.Items.Clear(); + BLL.UserService.InitUserUnitIdDropDownList(this.drpQCUser, model.ProjectId, true); } else if (!string.IsNullOrWhiteSpace(model.ProjectName)) { @@ -133,8 +154,8 @@ namespace FineUIPro.Web.Check.QMS { //受检单位 UnitService.InitBranchUnitDropDownList(this.drpUnit, false); - //受检项目 - ProjectService.InitProjectDropDownList(this.drpProject, true); + ////受检项目 + //ProjectService.InitProjectDropDownList(this.drpProject, true); //问题分类 QualityProblemClassifyService.InitClassifyDropDownList(this.drpClassify, false); //问题性质 @@ -148,9 +169,9 @@ namespace FineUIPro.Web.Check.QMS /// protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e) { - //this.drpProject.Items.Clear(); - ////受检项目 - //BLL.ProjectService.InitProjectDropDownList(this.drpProject, this.drpUnit.SelectedValue, true); + this.drpProject.Items.Clear(); + //受检项目 + BLL.ProjectService.InitProjectDropDownList(this.drpProject, this.drpUnit.SelectedValue, true); this.drpRectificationUser.Items.Clear(); BLL.UserService.InitUserUnitIdDropDownList(this.drpRectificationUser, this.drpUnit.SelectedValue, true); @@ -174,6 +195,8 @@ namespace FineUIPro.Web.Check.QMS if (pro != null) { this.txtAddress.Text = pro.ProjectAddress; + this.drpRectificationUser.Items.Clear(); + BLL.UserService.InitUserDropDownList(this.drpRectificationUser, proId, true); this.drpPMUser.Items.Clear(); BLL.UserService.InitUserDropDownList(this.drpPMUser, proId, true); this.drpQCUser.Items.Clear(); diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 8c7d7999..0769da83 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -3267,6 +3267,7 @@ + @@ -17886,6 +17887,13 @@ imageUp.ashx + + Standings.aspx + ASPXCodeBehind + + + Standings.aspx + ScoreFlowLog.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/Global.asax.cs b/SGGL/FineUIPro.Web/Global.asax.cs index 795045c7..0798f5ac 100644 --- a/SGGL/FineUIPro.Web/Global.asax.cs +++ b/SGGL/FineUIPro.Web/Global.asax.cs @@ -1,17 +1,12 @@ namespace FineUIPro.Web { using BLL; - using FineUIPro.Web.Score; using Model; - using NPOI.SS.Formula.Functions; using System; - using System.Collections.Generic; using System.Configuration; - using System.Data.SqlClient; using System.Globalization; using System.Linq; using System.Text; - using System.Windows.Forms; public class Global : System.Web.HttpApplication { @@ -26,7 +21,7 @@ try { Funs.RootPath = Server.MapPath("~/"); - + // 日志文件所在目录 ErrLogInfo.DefaultErrLogFullPath = Server.MapPath("~/ErrLog.txt"); Funs.ConnString = ConfigurationManager.AppSettings["ConnectionString"]; @@ -60,7 +55,7 @@ //定义一个定时器,并开启和配置相关属性 System.Timers.Timer Wtimer = new System.Timers.Timer(); //执行任务的周期 ,60分钟 - Wtimer.Interval =1000 * 60 * 60; //120000; + Wtimer.Interval = 1000 * 60 * 60; //120000; Wtimer.Enabled = true; Wtimer.Start(); Wtimer.Elapsed += new System.Timers.ElapsedEventHandler(Wtimer_Elapsed); @@ -74,9 +69,10 @@ void Wtimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { //考试大于等于80分通过,且没有加过分的记录,加分 - var testRecordList = (from x in Funs.DB.View_Training_TestRecord where x.TestScores >= 80 - && !Funs.DB.ScoreFlowLog.Any(log => log.DataSourceId == x.TestRecordId) - orderby x.TestStartTime select x).ToList(); + var testRecordList = (from x in Funs.DB.View_Training_TestRecord + where x.TestScores >= 80 && !Funs.DB.ScoreFlowLog.Any(log => log.DataSourceId == x.TestRecordId) + orderby x.TestStartTime + select x).ToList(); foreach (var item in testRecordList) { //查找最新一条积分记录 @@ -137,6 +133,7 @@ newlog.CurrentScore = 102; } } + newlog.CurrentScore = newlog.CurrentScore < 0 ? 0 : newlog.CurrentScore; BLL.ScoreFlowLogService.AddScoreFlowLog(newlog); //人员记分情况 @@ -203,6 +200,7 @@ newlog.CurrentScore = 102; } } + newlog.CurrentScore = newlog.CurrentScore < 0 ? 0 : newlog.CurrentScore; BLL.ScoreFlowLogService.AddScoreFlowLog(newlog); //人员记分情况 @@ -257,6 +255,7 @@ { newlog.CurrentScore = 102; } + newlog.CurrentScore = newlog.CurrentScore < 0 ? 0 : newlog.CurrentScore; BLL.ScoreFlowLogService.AddScoreFlowLog(newlog); //人员记分情况 @@ -327,6 +326,7 @@ newlog.CurrentScore = 102; } } + newlog.CurrentScore = newlog.CurrentScore < 0 ? 0 : newlog.CurrentScore; BLL.ScoreFlowLogService.AddScoreFlowLog(newlog); //人员记分情况 @@ -393,6 +393,7 @@ newlog.CurrentScore = 102; } } + newlog.CurrentScore = newlog.CurrentScore < 0 ? 0 : newlog.CurrentScore; BLL.ScoreFlowLogService.AddScoreFlowLog(newlog); //人员记分情况 @@ -459,6 +460,7 @@ newlog.CurrentScore = 102; } } + newlog.CurrentScore = newlog.CurrentScore < 0 ? 0 : newlog.CurrentScore; BLL.ScoreFlowLogService.AddScoreFlowLog(newlog); //人员记分情况 @@ -512,6 +514,7 @@ { newlog.CurrentScore = 102; } + newlog.CurrentScore = newlog.CurrentScore < 0 ? 0 : newlog.CurrentScore; BLL.ScoreFlowLogService.AddScoreFlowLog(newlog); //人员记分情况 @@ -541,7 +544,7 @@ } protected void Application_BeginRequest(object sender, EventArgs e) - { + { } protected void Application_AuthenticateRequest(object sender, EventArgs e) @@ -601,8 +604,8 @@ { if (errLog != null) { - db.Sys_ErrLogInfo.InsertOnSubmit(newErr); - db.SubmitChanges(); + db.Sys_ErrLogInfo.InsertOnSubmit(newErr); + db.SubmitChanges(); } ErrLogInfo.WriteLog(newErr.ErrLogId, ex, errLog == null ? null : errLog.ToString()); diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx index af9ef53f..1de2a24c 100644 --- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx @@ -116,11 +116,15 @@ FieldType="String" HeaderText="姓名" HeaderTextAlign="Center" TextAlign="Center"> + + <%-- --%> + FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="120px"> @@ -128,9 +132,9 @@ <%-- --%> - <%-- - --%> + --%> @@ -146,7 +150,7 @@ FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="入场时间" HeaderTextAlign="Center" TextAlign="Center"> - <%-- --%> + HeaderText="单位类型" HeaderTextAlign="Center" TextAlign="Center"> @@ -78,11 +78,14 @@ + + + FieldType="String" HeaderText="项目岗位" HeaderTextAlign="Center" TextAlign="Center"> @@ -91,7 +94,7 @@ + FieldType="String" HeaderText="在岗" HeaderTextAlign="Center" TextAlign="Center"> diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectUser.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectUser.aspx.cs index 9539f333..944eebd7 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectUser.aspx.cs +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectUser.aspx.cs @@ -55,11 +55,12 @@ namespace FineUIPro.Web.ProjectData { if (this.drpProject.Items.Count() > 0) { - string strSql = @"SELECT DISTINCT ProjectUser.ProjectUserId,ProjectUser.ProjectId,ProjectUser.UserId,ProjectUser.WorkAreaId,Users.UserCode,Users.UserName,ProjectUser.UnitId,Unit.UnitCode,Unit.UnitName,ProjectUnit.UnitType,sysConst.ConstText AS UnitTypeName,ProjectUser.RoleId,ProjectUser.IsPost,(CASE WHEN ProjectUser.IsPost = 1 THEN '在岗' ELSE '离岗' END) AS IsPostName,WorkPost.WorkPostName,UnitCode" + string strSql = @"SELECT DISTINCT ProjectUser.ProjectUserId,su.Score,ProjectUser.ProjectId,ProjectUser.UserId,ProjectUser.WorkAreaId,Users.UserCode,Users.UserName,ProjectUser.UnitId,Unit.UnitCode,Unit.UnitName,ProjectUnit.UnitType,sysConst.ConstText AS UnitTypeName,ProjectUser.RoleId,ProjectUser.IsPost,(CASE WHEN ProjectUser.IsPost = 1 THEN '在岗' ELSE '离岗' END) AS IsPostName,WorkPost.WorkPostName,UnitCode" + @" ,RoleName= STUFF(( SELECT ',' + RoleName FROM dbo.Sys_Role where PATINDEX('%,' + RTRIM(RoleId) + ',%',',' +ProjectUser.RoleId + ',')>0 FOR XML PATH('')), 1, 1,'')" + @" FROM Project_ProjectUser AS ProjectUser " + @" LEFT JOIN Base_Project AS Project ON ProjectUser.ProjectId = Project.ProjectId " + @" LEFT JOIN Sys_User AS Users ON ProjectUser.UserId = Users.UserId " + + @" LEFT JOIN ScoreUser AS su ON su.IdentityCard = Users.IdentityCard AND su.Year=YEAR(GETDATE()) " + @" LEFT JOIN Sys_Role AS Role ON ProjectUser.RoleId = Role.RoleId " + @" LEFT JOIN Project_ProjectUnit AS ProjectUnit ON ProjectUser.UnitId = ProjectUnit.UnitId AND ProjectUser.ProjectId= ProjectUnit.ProjectId " + @" LEFT JOIN Base_Unit AS Unit ON ProjectUser.UnitId = Unit.UnitId " diff --git a/SGGL/FineUIPro.Web/Score/ScoreFlowLog.aspx b/SGGL/FineUIPro.Web/Score/ScoreFlowLog.aspx index 175dbdb3..5599d639 100644 --- a/SGGL/FineUIPro.Web/Score/ScoreFlowLog.aspx +++ b/SGGL/FineUIPro.Web/Score/ScoreFlowLog.aspx @@ -6,7 +6,7 @@ - 得分扣分记录流水日志 + 记分流水日志 @@ -14,7 +14,98 @@ - + + + + + + + + <%-- + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + --%> + + + + + + + + + + + <%-- @@ -27,84 +118,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%-- - --%> - - - - - - - - - - - + --%> diff --git a/SGGL/FineUIPro.Web/Score/ScoreFlowLog.aspx.cs b/SGGL/FineUIPro.Web/Score/ScoreFlowLog.aspx.cs index 92f0c488..59c53f9d 100644 --- a/SGGL/FineUIPro.Web/Score/ScoreFlowLog.aspx.cs +++ b/SGGL/FineUIPro.Web/Score/ScoreFlowLog.aspx.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; using System.Text; using AspNet = System.Web.UI.WebControls; @@ -26,6 +25,20 @@ namespace FineUIPro.Web.Score ViewState["ProjectId"] = value; } } + /// + /// 单位主键 + /// + public string UnitId + { + get + { + return (string)ViewState["UnitId"]; + } + set + { + ViewState["UnitId"] = value; + } + } #endregion #region 加载 /// @@ -43,15 +56,20 @@ namespace FineUIPro.Web.Score { this.ProjectId = Request.Params["projectId"]; } - ////权限按钮方法 - this.ucTree.UnitId = this.CurrUser.UnitId; - this.ucTree.ProjectId = this.ProjectId; - if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + this.UnitId = this.CurrUser.UnitId; + if (CommonService.IsSuperAdminManage(this.CurrUser.UserId) || (!string.IsNullOrWhiteSpace(this.UnitId) && this.UnitId == Const.UnitId_XJYJ)) { - this.panelLeftRegion.Hidden = true; - ////权限按钮方法 - this.GetButtonPower(); + this.UnitId = !string.IsNullOrWhiteSpace(this.CurrUser.LastUnitId) ? this.CurrUser.LastUnitId : Const.UnitId_XJYJ; } + //////权限按钮方法 + //this.ucTree.UnitId = this.CurrUser.UnitId; + //this.ucTree.ProjectId = this.ProjectId; + //if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + //{ + // this.panelLeftRegion.Hidden = true; + // ////权限按钮方法 + // this.GetButtonPower(); + //} if (this.CurrUser != null && this.CurrUser.PageSize.HasValue) { @@ -63,49 +81,71 @@ namespace FineUIPro.Web.Score } } - /// - /// 加载树 - /// - /// - /// - protected void changeTree(object sender, EventArgs e) - { - this.ProjectId = this.ucTree.ProjectId; - this.BindGrid(); - this.GetButtonPower(); - } + ///// + ///// 加载树 + ///// + ///// + ///// + //protected void changeTree(object sender, EventArgs e) + //{ + // this.ProjectId = this.ucTree.ProjectId; + // this.BindGrid(); + // this.GetButtonPower(); + //} /// /// 绑定数据 /// private void BindGrid() { - if (string.IsNullOrEmpty(this.ProjectId)) - { - return; - } - string strSql = "select flowLog.Id, flowLog.Year, flowLog.IdentityCard, flowLog.UserName, flowLog.Type, (case when flowLog.Type=0 then '扣分' else '加分' end) as TypeName,flowLog.Score, flowLog.CurrentScore, flowLog.Item, flowLog.LogContent, flowLog.UserId, flowLog.PersonId, flowLog.UnitId, flowLog.ProjectId, flowLog.UnitName, flowLog.ProjectName, flowLog.Remark, flowLog.CompileDate, flowLog.CompileMan, flowLog.CompileManId from ScoreFlowLog flowLog WHERE 1=1 "; + //if (string.IsNullOrEmpty(this.ProjectId)) + //{ + // return; + //} + StringBuilder sb = new StringBuilder(); + sb.Append("SELECT flowLog.Id, flowLog.Year, flowLog.IdentityCard, flowLog.UserName, flowLog.Type, (case when flowLog.Type=0 then '扣分' else '加分' end) as TypeName,flowLog.Score, flowLog.CurrentScore, flowLog.Item, flowLog.LogContent, flowLog.UserId, flowLog.PersonId, flowLog.UnitId, flowLog.ProjectId, flowLog.UnitName, flowLog.ProjectName, flowLog.Remark, flowLog.CompileDate, flowLog.CompileMan, flowLog.CompileManId "); + sb.Append("FROM ScoreFlowLog AS flowLog WITH(NOLOCK) "); + sb.Append("WHERE 1=1 "); + List listStr = new List(); - strSql += " AND flowLog.ProjectId = @ProjectId"; - listStr.Add(new SqlParameter("@ProjectId", this.ProjectId)); + if (!string.IsNullOrEmpty(this.ProjectId)) + {//项目级 + sb.Append("AND flowLog.ProjectId = @ProjectId "); + listStr.Add(new SqlParameter("@ProjectId", this.ProjectId)); + } + else if (!string.IsNullOrEmpty(this.UnitId) && this.UnitId != Const.UnitId_XJYJ) + {//分公司 + sb.Append("AND flowLog.UnitId = @UnitId "); + listStr.Add(new SqlParameter("@UnitId", this.UnitId)); + } if (!string.IsNullOrEmpty(this.txtName.Text.Trim())) { - strSql += " AND flowLog.UserName like @name"; + sb.Append("AND flowLog.UserName like @name "); listStr.Add(new SqlParameter("@name", "%" + this.txtName.Text.Trim() + "%")); } - if (!string.IsNullOrEmpty(this.drpType.SelectedValue)) + if (!string.IsNullOrEmpty(this.txtIdentityCard.Text.Trim())) { - strSql += " AND flowLog.Type = @type"; - listStr.Add(new SqlParameter("@type", this.drpType.SelectedValue)); + sb.Append("AND flowLog.IdentityCard like @IdentityCard "); + listStr.Add(new SqlParameter("@IdentityCard", "%" + this.txtIdentityCard.Text.Trim() + "%")); } - if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId)) + if (!string.IsNullOrWhiteSpace(this.rbType.SelectedValue)) { - strSql += " AND flowLog.UnitId =@unitId"; - listStr.Add(new SqlParameter("@unitId", this.CurrUser.UnitId)); + sb.Append("AND flowLog.Type = @type "); + listStr.Add(new SqlParameter("@type", this.rbType.SelectedValue)); } + //if (!string.IsNullOrEmpty(this.drpType.SelectedValue)) + //{ + // sb.Append("AND flowLog.Type = @type "); + // listStr.Add(new SqlParameter("@type", this.drpType.SelectedValue)); + //} + //if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId)) + //{ + // sb.Append("AND flowLog.UnitId =@unitId "); + // listStr.Add(new SqlParameter("@unitId", this.CurrUser.UnitId)); + //} SqlParameter[] parameter = listStr.ToArray(); - DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + DataTable tb = SQLHelper.GetDataTableRunText(sb.ToString(), parameter); Grid1.RecordCount = tb.Rows.Count; var table = this.GetPagedDataTable(Grid1, tb); @@ -201,7 +241,7 @@ namespace FineUIPro.Web.Score { Response.ClearContent(); string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("人员记分流水日志表" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("记分流水日志" + filename, System.Text.Encoding.UTF8) + ".xls"); Response.ContentType = "application/excel"; Response.ContentEncoding = System.Text.Encoding.UTF8; this.Grid1.PageSize = 500; diff --git a/SGGL/FineUIPro.Web/Score/ScoreFlowLog.aspx.designer.cs b/SGGL/FineUIPro.Web/Score/ScoreFlowLog.aspx.designer.cs index 973e790f..35739e65 100644 --- a/SGGL/FineUIPro.Web/Score/ScoreFlowLog.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Score/ScoreFlowLog.aspx.designer.cs @@ -41,42 +41,6 @@ namespace FineUIPro.Web.Score /// protected global::FineUIPro.Panel Panel1; - /// - /// panelLeftRegion 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Panel panelLeftRegion; - - /// - /// ContentPanel1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.ContentPanel ContentPanel1; - - /// - /// ucTree 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree; - - /// - /// panelCenterRegion 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Panel panelCenterRegion; - /// /// Grid1 控件。 /// @@ -105,13 +69,22 @@ namespace FineUIPro.Web.Score protected global::FineUIPro.TextBox txtName; /// - /// drpType 控件。 + /// txtIdentityCard 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DropDownList drpType; + protected global::FineUIPro.TextBox txtIdentityCard; + + /// + /// rbType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rbType; /// /// ToolbarFill1 控件。 diff --git a/SGGL/FineUIPro.Web/Score/Standings.aspx b/SGGL/FineUIPro.Web/Score/Standings.aspx new file mode 100644 index 00000000..192fcd36 --- /dev/null +++ b/SGGL/FineUIPro.Web/Score/Standings.aspx @@ -0,0 +1,81 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Standings.aspx.cs" Inherits="FineUIPro.Web.Score.Standings" %> + +<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %> + + + + + + 积分榜 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/Score/Standings.aspx.cs b/SGGL/FineUIPro.Web/Score/Standings.aspx.cs new file mode 100644 index 00000000..e6472bea --- /dev/null +++ b/SGGL/FineUIPro.Web/Score/Standings.aspx.cs @@ -0,0 +1,200 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.Score +{ + public partial class Standings : PageBase + { + #region 项目主键 + /// + /// 项目主键 + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false); + this.drpYear.SelectedValue = DateTime.Now.Year.ToString(); + + this.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId) + { + this.ProjectId = Request.Params["projectId"]; + } + + if (this.CurrUser != null && this.CurrUser.PageSize.HasValue) + { + Grid1.PageSize = this.CurrUser.PageSize.Value; + } + this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + this.BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + StringBuilder sb = new StringBuilder(); + sb.Append("SELECT tba.Id,tba.Year,tba.IdentityCard,tba.UserName,tba.Score,tba.CompileDate "); + sb.Append("FROM ScoreUser AS tba WITH(NOLOCK) "); + sb.Append("WHERE 1=1 "); + + List listStr = new List(); + if (!string.IsNullOrWhiteSpace(this.drpYear.SelectedValue) && this.drpYear.SelectedValue != Const._Null) + { + sb.Append("AND tba.Year = @Year "); + listStr.Add(new SqlParameter("@Year", this.drpYear.SelectedValue)); + } + if (!string.IsNullOrEmpty(this.txtName.Text.Trim())) + { + sb.Append("AND tba.UserName like @name "); + listStr.Add(new SqlParameter("@name", "%" + this.txtName.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(this.txtIdentityCard.Text.Trim())) + { + sb.Append("AND tba.IdentityCard like @IdentityCard "); + listStr.Add(new SqlParameter("@IdentityCard", "%" + this.txtIdentityCard.Text.Trim() + "%")); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(sb.ToString(), parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + /// + /// 改变索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 分页下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 导出按钮 + /// 导出按钮 + ///
+ /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("积分榜" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + this.Grid1.PageSize = 500; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + + /// + /// 导出方法 + /// + /// + /// + private string GetGridTableHtml(Grid grid) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + sb.AppendFormat("", column.HeaderText); + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("lblNumber") as AspNet.Label).Text; + } + if (column.ColumnID == "tfI") + { + html = (row.FindControl("lbI") as AspNet.Label).Text; + } + //sb.AppendFormat("", html); + sb.AppendFormat("", html); + } + + sb.Append(""); + } + + sb.Append("
{0}
{0}{0}
"); + + return sb.ToString(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Score/Standings.aspx.designer.cs b/SGGL/FineUIPro.Web/Score/Standings.aspx.designer.cs new file mode 100644 index 00000000..674f838f --- /dev/null +++ b/SGGL/FineUIPro.Web/Score/Standings.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Score +{ + + + public partial class Standings + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpYear 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpYear; + + /// + /// txtName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtName; + + /// + /// txtIdentityCard 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtIdentityCard; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// lbI 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lbI; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/SysManage/UserList.aspx b/SGGL/FineUIPro.Web/SysManage/UserList.aspx index a13fe89e..b345bf14 100644 --- a/SGGL/FineUIPro.Web/SysManage/UserList.aspx +++ b/SGGL/FineUIPro.Web/SysManage/UserList.aspx @@ -64,31 +64,34 @@ + FieldType="String" HeaderText="员工编号" HeaderTextAlign="Center" TextAlign="Center"> + FieldType="String" HeaderText="姓名" HeaderTextAlign="Center" TextAlign="Center"> + + <%-- --%> - - + FieldType="String" HeaderText="账号" HeaderTextAlign="Center" TextAlign="Center"> <%-- --%> - diff --git a/SGGL/FineUIPro.Web/SysManage/UserList.aspx.cs b/SGGL/FineUIPro.Web/SysManage/UserList.aspx.cs index 34dccc8e..5a2b5050 100644 --- a/SGGL/FineUIPro.Web/SysManage/UserList.aspx.cs +++ b/SGGL/FineUIPro.Web/SysManage/UserList.aspx.cs @@ -44,9 +44,10 @@ ///
private void BindGrid() { - string strSql = $@"SELECT Users.UserId,Users.Account,Users.UserCode,Users.Password,Users.UserName,Depart.DepartName,Users.RoleId,Users.UnitId,Users.IsPost,CASE WHEN Users.IsPost=1 THEN '是' ELSE '否' END AS IsPostName,Users.IdentityCard,Users.Telephone,Users.IsOffice,UnitCode,Unit.UnitName,Unit.UnitCode + string strSql = $@"SELECT Users.UserId,Users.Account,Users.UserCode,Users.Password,Users.UserName,su.Score,Depart.DepartName,Users.RoleId,Users.UnitId,Users.IsPost,CASE WHEN Users.IsPost=1 THEN '是' ELSE '否' END AS IsPostName,Users.IdentityCard,Users.Telephone,Users.IsOffice,UnitCode,Unit.UnitName,Unit.UnitCode ,RoleName= STUFF(( SELECT ',' + RoleName FROM dbo.Sys_Role where PATINDEX('%,' + RTRIM(RoleId) + ',%',',' +Users.RoleId + ',')>0 FOR XML PATH('')), 1, 1,'') From dbo.Sys_User AS Users + LEFT JOIN ScoreUser AS su ON su.IdentityCard = Users.IdentityCard AND su.Year=YEAR(GETDATE()) LEFT JOIN Sys_Role AS Roles ON Roles.RoleId=Users.RoleId LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Users.UnitId LEFT JOIN Base_Depart AS Depart ON Depart.DepartId=Users.DepartId diff --git a/SGGL/FineUIPro.Web/common/PageBase.cs b/SGGL/FineUIPro.Web/common/PageBase.cs index 38e6e0bf..efe9cc5b 100644 --- a/SGGL/FineUIPro.Web/common/PageBase.cs +++ b/SGGL/FineUIPro.Web/common/PageBase.cs @@ -30,18 +30,26 @@ namespace FineUIPro.Web string password = string.Empty; if (HttpContext.Current != null && HttpContext.Current.Request != null) { - if (Request.Cookies["u"] != null) + //if (Request.Cookies["u"] != null) + //{ + // account = HttpUtility.UrlDecode(Request.Cookies["u"].Value); + //} + //if (Request.Cookies["p"] != null) + //{ + // password = Request.Cookies["p"].Value; + //} + if (HttpContext.Current.Request.Cookies["u"] != null) { - account = HttpUtility.UrlDecode(Request.Cookies["u"].Value); + account = HttpUtility.UrlDecode(HttpContext.Current.Request.Cookies["u"].Value); } - if (Request.Cookies["p"] != null) + if (HttpContext.Current.Request.Cookies["p"] != null) { - password = Request.Cookies["p"].Value; + password = HttpContext.Current.Request.Cookies["p"].Value; } } Session["CurrUser"] = BLL.Funs.DB.Sys_User.FirstOrDefault(x => x.Account == account && x.Password == Funs.EncryptionPassword(password)); } - + //var ssss = (Model.Sys_User)Session["CurrUser"]; return (Model.Sys_User)Session["CurrUser"]; } } diff --git a/SGGL/Model/APIItem/HSSE/StudyZoneItemItem.cs b/SGGL/Model/APIItem/HSSE/StudyZoneItemItem.cs index 2b549c06..b412e0f8 100644 --- a/SGGL/Model/APIItem/HSSE/StudyZoneItemItem.cs +++ b/SGGL/Model/APIItem/HSSE/StudyZoneItemItem.cs @@ -60,42 +60,42 @@ namespace Model get; set; } - // /// - // /// 开始时间 - // /// - //public DateTime? StartTime - // { - // get; - // set; - // } - // /// - // /// 学习时长(秒) - // /// - //public int? LearningTime - // { - // get; - // set; - // } - // /// - // /// 教材时长(秒) - // /// - // public int? AttachTime - // { - // get; - // set; - // } - // public DateTime? EndTime - // { - // get; - // set; - // } - // /// - // /// 视频进度(秒) - // /// - //public int? VideoProgress - // { - // get; - // set; - // } + // /// + // /// 开始时间 + // /// + //public DateTime? StartTime + // { + // get; + // set; + // } + // /// + // /// 学习时长(秒) + // /// + //public int? LearningTime + // { + // get; + // set; + // } + // /// + // /// 教材时长(秒) + // /// + // public int? AttachTime + // { + // get; + // set; + // } + // public DateTime? EndTime + // { + // get; + // set; + // } + // /// + // /// 视频进度(秒) + // /// + //public int? VideoProgress + // { + // get; + // set; + // } } } diff --git a/SGGL/WebAPI/Controllers/Person/PersonController.cs b/SGGL/WebAPI/Controllers/Person/PersonController.cs index 53218c3f..f3d3af1d 100644 --- a/SGGL/WebAPI/Controllers/Person/PersonController.cs +++ b/SGGL/WebAPI/Controllers/Person/PersonController.cs @@ -24,21 +24,24 @@ namespace WebAPI.Controllers { var personData = APIPersonService.getPersonByPersonId(personId); PersonInfoItem data = new PersonInfoItem(); - data.PersonId = personData.PersonId; - data.PersonName = personData.PersonName; - data.SexName = personData.SexName; - data.IdentityCard = personData.IdentityCard; - data.Telephone = personData.Telephone; - data.UnitName = personData.UnitName; - data.TeamGroupName = personData.TeamGroupName; - data.WorkPostName = personData.WorkPostName; - data.InTime = personData.InTime; - data.PhotoUrl = personData.PhotoUrl; - - //获取用户本年HSE分值、培训学时(待处理) - data.HSEScore = 0; - data.LearnHour = 0; + if (personData != null) + { + data.PersonId = personData.PersonId; + data.PersonName = personData.PersonName; + data.SexName = personData.SexName; + data.IdentityCard = personData.IdentityCard; + data.Telephone = personData.Telephone; + data.UnitName = personData.UnitName; + data.TeamGroupName = personData.TeamGroupName; + data.WorkPostName = personData.WorkPostName; + data.InTime = personData.InTime; + data.PhotoUrl = personData.PhotoUrl; + var userScore = ScoreUserService.GetScoreUserByIdentityCard(personData.IdentityCard, DateTime.Now.Year); + //获取用户本年HSE分值、培训学时(待处理) + data.HSEScore = userScore != null ? userScore.Score : 100; + data.LearnHour = 0; + } responeData.data = data; } catch (Exception ex)