From 7a2a8ffb93a3ef98ecf6f498838de9150fabc42b Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Tue, 13 Jun 2023 16:30:08 +0800 Subject: [PATCH] =?UTF-8?q?202306131=E3=80=81=E6=96=B0=E5=A2=9E=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=BA=A7=E6=B6=88=E6=81=AF=E5=BE=85=E5=8A=9E=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=8A=9F=E8=83=BD=E3=80=822=E3=80=81=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E9=A1=B9=E7=9B=AE=E5=8D=95=E4=BD=8D=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=AE=9E=E5=90=8D=E5=88=B6=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E3=80=823=E3=80=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=80=83=E8=AF=95=E5=90=88=E6=A0=BC=E8=87=AA=E5=8A=A8=E7=94=9F?= =?UTF-8?q?=E6=88=90=E5=8D=A1=E5=8F=B7=E5=8A=9F=E8=83=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_V2023-06-13.sql | 37 +++- .../版本日志/SGGLDB_V2023-06-13修改明细.txt | 5 + .../菜单初始化脚本/1-11待办(Menu_ToDo).sql | 9 + SGGL/BLL/Common/Const.cs | 5 + SGGL/BLL/HSSE/CostGoods/CostManageService.cs | 4 +- .../BLL/HSSE/SitePerson/PersonInOutService.cs | 2 +- .../SitePerson/SitePerson_PersonService.cs | 3 +- SGGL/BLL/OpenService/GetDataService.cs | 26 ++- SGGL/BLL/ProjectData/ProjectService.cs | 6 +- SGGL/BLL/ProjectData/ProjectUnitService.cs | 2 + SGGL/BLL/ZHGL/RealName/SynchroSetService.cs | 12 +- SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 11 +- .../HSSE/CostGoods/CostManageAudit.aspx.cs | 5 + .../HSSE/CostGoods/CostManageEdit.aspx.cs | 7 +- .../HSSE/SitePerson/PersonList.aspx | 2 + .../HSSE/SitePerson/PersonList.aspx.cs | 10 + .../SitePerson/PersonList.aspx.designer.cs | 9 + .../ProjectData/ProjectUnit.aspx | 180 +++++++++--------- .../ProjectData/ProjectUnit.aspx.cs | 3 +- .../ProjectData/ProjectUnitSave.aspx | 15 +- .../ProjectData/ProjectUnitSave.aspx.cs | 14 ++ .../ProjectUnitSave.aspx.designer.cs | 9 + .../ProjectData/ProjectUser.aspx.cs | 2 +- SGGL/FineUIPro.Web/SysManage/ProjectToDo.aspx | 89 +++++++++ .../SysManage/ProjectToDo.aspx.cs | 115 +++++++++++ .../SysManage/ProjectToDo.aspx.designer.cs | 125 ++++++++++++ .../SysManage/RoleListEdit.aspx.cs | 2 +- .../ZHGL/RealName/SynchroSet.aspx.cs | 4 +- SGGL/FineUIPro.Web/common/Menu_ToDo.xml | 5 + SGGL/FineUIPro.Web/common/PageBase.cs | 34 ++-- SGGL/FineUIPro.Web/indexProject.aspx | 21 +- SGGL/FineUIPro.Web/indexProject.aspx.cs | 44 ++++- .../indexProject.aspx.designer.cs | 103 +++++----- SGGL/Model/Model.cs | 48 +++++ SGGL/Model/ModelProc.cs | 17 +- SGGL/WebAPI/ErrLog.txt | 12 +- SGGL/WebAPI/WebAPI.csproj | 2 +- 37 files changed, 805 insertions(+), 194 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2023-06-13修改明细.txt create mode 100644 DataBase/菜单初始化脚本/1-11待办(Menu_ToDo).sql create mode 100644 SGGL/FineUIPro.Web/SysManage/ProjectToDo.aspx create mode 100644 SGGL/FineUIPro.Web/SysManage/ProjectToDo.aspx.cs create mode 100644 SGGL/FineUIPro.Web/SysManage/ProjectToDo.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/common/Menu_ToDo.xml diff --git a/DataBase/版本日志/SGGLDB_V2023-06-13.sql b/DataBase/版本日志/SGGLDB_V2023-06-13.sql index f8ac87c2..6dab7336 100644 --- a/DataBase/版本日志/SGGLDB_V2023-06-13.sql +++ b/DataBase/版本日志/SGGLDB_V2023-06-13.sql @@ -1,6 +1,3 @@ - - - ALTER VIEW [dbo].[View_HJGL_WeldJoint] AS SELECT jot.[ProjectId] --ĿId @@ -167,3 +164,37 @@ LEFT JOIN dbo.HJGL_Batch_PointBatch point ON point.PointBatchId = pointItem.Poin GO +ALTER TABLE CostGoods_CostManage ADD NextManId nvarchar(50) null +go +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'һID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CostGoods_CostManage', @level2type=N'COLUMN',@level2name=N'NextManId' +GO + +--ȡǰĿ +CREATE PROCEDURE [dbo].[Sp_Project_GetToDoItems] + @projectId NVARCHAR(50)=NULL, + @personId NVARCHAR(200)=NULL +AS +/*ȡǰ˱*/ +BEGIN +SELECT CostManageId AS DataId + ,'HSE' AS MenuName + ,('HSE'+ CONVERT(varchar(100),CostManage.CostManageDate, 23)+'') AS Content + ,PersonId + ,persons.PersonName + ,CostManage.CostManageDate AS DataTime + ,CONVERT(varchar(100),CostManage.CostManageDate, 23) AS DataTimeStr + ,(CASE WHEN CostManage.States = '0' THEN '../HSSE/CostGoods/CostManageEdit.aspx?CostManageId='+CostManageId + ELSE '../HSSE/CostGoods/CostManageAudit.aspx?CostManageId='+CostManageId END)AS PCUrl +FROM CostGoods_CostManage AS CostManage +LEFT JOIN Person_Persons AS persons ON CostManage.NextManId= persons.PersonId +WHERE CostManage.ProjectId=@projectId AND (CostManage.States = '0' or CostManage.States='1' ) + AND CostManage.NextManId =@personId +ORDER BY DataTime DESC +END + +GO + +ALTER TABLE Project_ProjectUnit ADD IsSynchro BIT NULL +GO +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʵͬ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_ProjectUnit', @level2type=N'COLUMN',@level2name=N'IsSynchro' +GO diff --git a/DataBase/版本日志/SGGLDB_V2023-06-13修改明细.txt b/DataBase/版本日志/SGGLDB_V2023-06-13修改明细.txt new file mode 100644 index 00000000..2dac6eee --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-06-13修改明细.txt @@ -0,0 +1,5 @@ +--ADD BY YangHongwei 2023-06-13 +1、新增项目级消息待办页面功能。 +2、新增项目单位是否同步实名制设置功能。 +3、优化考试合格自动生成卡号功能。 +--END \ No newline at end of file diff --git a/DataBase/菜单初始化脚本/1-11待办(Menu_ToDo).sql b/DataBase/菜单初始化脚本/1-11待办(Menu_ToDo).sql new file mode 100644 index 00000000..f0a29870 --- /dev/null +++ b/DataBase/菜单初始化脚本/1-11待办(Menu_ToDo).sql @@ -0,0 +1,9 @@ +--delete from Sys_ButtonToMenu where MenuId in (select MenuId from Sys_Menu where MenuType='Menu_ToDo') +--go +--delete from Sys_Menu where MenuType='Menu_ToDo' +--go + +--HSSE +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('AEBFEC10-DD23-4E95-A684-B291A681A5E8','Ϣ','SysManage/ProjectToDo.aspx',10,'0','Menu_ToDo',0,0,1) +GO diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 8d9736a5..43ffea3a 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -749,6 +749,11 @@ /// public const string Menu_PDigData = "Menu_PDigData"; + /// + /// 消息 + /// + public const string Menu_ToDo = "Menu_ToDo"; + #endregion #region 考勤方式定义 diff --git a/SGGL/BLL/HSSE/CostGoods/CostManageService.cs b/SGGL/BLL/HSSE/CostGoods/CostManageService.cs index a0f62926..a7041376 100644 --- a/SGGL/BLL/HSSE/CostGoods/CostManageService.cs +++ b/SGGL/BLL/HSSE/CostGoods/CostManageService.cs @@ -70,7 +70,8 @@ namespace BLL SubProject = costManage.SubProject, States = costManage.States, CompileMan = costManage.CompileMan, - CompileDate = costManage.CompileDate + CompileDate = costManage.CompileDate, + NextManId= costManage.NextManId, }; db.CostGoods_CostManage.InsertOnSubmit(newCostManage); @@ -105,6 +106,7 @@ namespace BLL newCostManage.States = costManage.States; newCostManage.CompileMan = costManage.CompileMan; newCostManage.CompileDate = costManage.CompileDate; + newCostManage.NextManId = costManage.NextManId; db.SubmitChanges(); } } diff --git a/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs b/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs index 45cc020c..1e3e5e85 100644 --- a/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs +++ b/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs @@ -223,7 +223,7 @@ namespace BLL /// 监理 业主 不进入 var getPUnit = db.Project_ProjectUnit.FirstOrDefault(x => x.ProjectId == newPersonInOut.ProjectId && x.UnitId == newPersonInOut.UnitId); - if (getPUnit.UnitType != Const.ProjectUnitType_3 && getPUnit.UnitType != Const.ProjectUnitType_4) + if (getPUnit.UnitType != Const.ProjectUnitType_3 && getPUnit.UnitType != Const.ProjectUnitType_4 && getPUnit.IsSynchro == true) { string proCode = ProjectService.GetContractNoByProjectId(newPersonInOut.ProjectId); var getRealNameP = db.RealName_Project.FirstOrDefault(x => x.ProCode == proCode); diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs index 356dfb93..b7822e9e 100644 --- a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs +++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs @@ -1,6 +1,7 @@ using FineUIPro; using Microsoft.SqlServer.Dts.Runtime; using Model; +using NPOI.HSSF.Record.Aggregates; using NPOI.SS.Formula.PTG; using System; using System.Collections; @@ -641,7 +642,7 @@ namespace BLL var getMaxCarNo = Funs.DB.SitePerson_Person.Where(x => x.ProjectId == projectId && x.CardNo.Contains(prefix)).Max(x => x.CardNo); if (!string.IsNullOrEmpty(getMaxCarNo) && getMaxCarNo.Length > 5) { - var getInt = Funs.GetNewInt(Funs.GetSubStr(getMaxCarNo, 5)); + var getInt = Funs.GetNewInt(getMaxCarNo.Substring(getMaxCarNo.Length-5)); if (getInt.HasValue) { cardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", getSitePerson.ProjectId, prefix); diff --git a/SGGL/BLL/OpenService/GetDataService.cs b/SGGL/BLL/OpenService/GetDataService.cs index c6a72765..16fd6d17 100644 --- a/SGGL/BLL/OpenService/GetDataService.cs +++ b/SGGL/BLL/OpenService/GetDataService.cs @@ -510,24 +510,34 @@ namespace BLL /// /// /// - public static void SendCarNo() + public static int SendCarNo(string projectId) { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { + int count = 0; var getPersons = from x in db.SitePerson_Person - where x.States == Const.State_1 && x.CardNo == null + where x.States == Const.State_1 && x.CardNo == null && x.ProjectId == projectId select x; foreach (var item in getPersons) { - - var isNull = db.EduTrain_TrainRecordDetail.FirstOrDefault(x => x.PersonId == item.PersonId); - if (isNull != null) ////未参加过培训的人员 + var isNull = db.EduTrain_TrainRecordDetail.FirstOrDefault(x => x.PersonId == item.PersonId && x.CheckResult ==true); + if (isNull != null) ////参加过培训的人员 { - item.CardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", item.ProjectId, UnitService.GetUnitCodeByUnitId(item.UnitId)); - db.SubmitChanges(); + string prefix = UnitService.GetUnitCodeByUnitId(item.UnitId) + "-"; + var getMaxCarNo = db.SitePerson_Person.Where(x => x.ProjectId == item.ProjectId && x.CardNo.Contains(prefix)).Max(x => x.CardNo); + if (!string.IsNullOrEmpty(getMaxCarNo) && getMaxCarNo.Length > 5) + { + var getInt = Funs.GetNewInt(getMaxCarNo.Substring(getMaxCarNo.Length - 5)); + if (getInt.HasValue) + { + item.CardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", item.ProjectId, prefix); + db.SubmitChanges(); + count++; + } + } } - } + return count; } } } diff --git a/SGGL/BLL/ProjectData/ProjectService.cs b/SGGL/BLL/ProjectData/ProjectService.cs index 8450ee44..5fc6aadc 100644 --- a/SGGL/BLL/ProjectData/ProjectService.cs +++ b/SGGL/BLL/ProjectData/ProjectService.cs @@ -337,10 +337,10 @@ } } - var pcount = from x in db.Sys_Log - where x.ProjectId != null && x.OperationTime > DateTime.Now.AddDays(-3) + var pcount = (from x in db.Sys_Log + where x.ProjectId != null && x.OperationTime > DateTime.Now.AddDays(-2) group x by x.ProjectId into g - select new { g.First().ProjectId, count = g.Count() }; + select new { g.First().ProjectId, count = g.Count() }).Distinct(); List getList = new List(); if (getProjects.Count() > 0) diff --git a/SGGL/BLL/ProjectData/ProjectUnitService.cs b/SGGL/BLL/ProjectData/ProjectUnitService.cs index 7e720208..23eb78cf 100644 --- a/SGGL/BLL/ProjectData/ProjectUnitService.cs +++ b/SGGL/BLL/ProjectData/ProjectUnitService.cs @@ -78,6 +78,7 @@ PlanCostB = projectUnit.PlanCostB, ContractRange = projectUnit.ContractRange, RealNamePushTime = projectUnit.RealNamePushTime, + IsSynchro = projectUnit.IsSynchro, }; db.Project_ProjectUnit.InsertOnSubmit(newProjectUnit); db.SubmitChanges(); @@ -100,6 +101,7 @@ newProjectUnit.PlanCostB = projectUnit.PlanCostB; newProjectUnit.ContractRange = projectUnit.ContractRange; newProjectUnit.RealNamePushTime = projectUnit.RealNamePushTime; + newProjectUnit.IsSynchro = projectUnit.IsSynchro; db.SubmitChanges(); } } diff --git a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs index 70ebb554..b1a4cf6f 100644 --- a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs +++ b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs @@ -762,7 +762,7 @@ namespace BLL && x.UnitType != null && (proCode == null || y.ContractNo == proCode) && u.CollCropCode != null && u.CollCropCode != "" - && z.JTproCode != null + && z.JTproCode != null && x.IsSynchro == true select new { unitId = x.UnitId, @@ -900,7 +900,7 @@ namespace BLL where z.ProCode != null && !x.RealNamePushTime.HasValue && x.TeamTypeId != null && (proCode == null || y.ContractNo == proCode) && u.CollCropCode != null && u.CollCropCode != "" - && z.JTproCode != null + && z.JTproCode != null && p.IsSynchro == true && p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4 select new { @@ -997,7 +997,7 @@ namespace BLL && y.ContractNo == proCode && v.TeamId.HasValue && ((type == Const.BtnModify && !x.RealNameUpdateTime.HasValue && x.RealNameAddTime.HasValue) || (type != Const.BtnModify && !x.RealNameAddTime.HasValue && x.States == Const.State_1 && Persons.HeadImage.Length > 0)) - && p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4 + && p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4 && p.IsSynchro == true && z.JTproCode != null select new { @@ -1517,12 +1517,13 @@ namespace BLL join z in Funs.DB.RealName_Project on x.ProCode equals z.ProCode join v in Funs.DB.ProjectData_TeamGroup on p.TeamGroupId equals v.TeamGroupId join r in Funs.DB.RealName_CollTeam on v.TeamId equals r.TeamId + join pu in Funs.DB.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { pu.UnitId, pu.ProjectId } where x.IdcardNumber != null && x.ChangeTime.HasValue && (proCode == null || x.ProCode == proCode) && v.TeamId.HasValue && r.TeamId.HasValue && p.States == Const.State_1 && !x.RealNamePushTime.HasValue - && z.JTproCode != null + && z.JTproCode != null && pu.IsSynchro == true orderby x.ChangeTime descending select new { @@ -1735,7 +1736,8 @@ namespace BLL join z in db.RealName_Project on y.ContractNo equals z.ProCode join v in db.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId join w in db.Base_WorkPost on x.WorkPostId equals w.WorkPostId - where personList.Contains(x.PersonId) && z.JTproCode != null + join p in db.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { p.UnitId, p.ProjectId } + where personList.Contains(x.PersonId) && z.JTproCode != null && p.IsSynchro == true select new { name = x.PersonName, diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 01905800..44199c5a 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -330,6 +330,7 @@ + @@ -1502,6 +1503,7 @@ + @@ -12953,6 +12955,13 @@ SysConstSet.aspx + + ProjectToDo.aspx + ASPXCodeBehind + + + ProjectToDo.aspx + Unit.aspx ASPXCodeBehind @@ -13870,7 +13879,7 @@ True 0 / - http://localhost:1541/ + http://localhost:8667/ False False diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageAudit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageAudit.aspx.cs index 9f2c0f2c..10a014c6 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageAudit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageAudit.aspx.cs @@ -197,6 +197,7 @@ namespace FineUIPro.Web.HSSE.CostGoods isAgree = false; NowFlow.Opinion = this.rblIsAgree.SelectedItem.Text + ","+ this.txtOpinion.Text; getCost.States = BLL.Const.State_0; + getCost.NextManId = getCost.CompileMan; BLL.CostManageService.UpdateCostManage(getCost); CostManageService.updateOpenCostManageFlowOperate(this.CostManageId); } @@ -208,9 +209,13 @@ namespace FineUIPro.Web.HSSE.CostGoods { NextFlow.OperaterId = this.drpNextMan.SelectedValue; BLL.CostManageService.updateCostManageFlowOperate(NextFlow); + + getCost.NextManId = this.drpNextMan.SelectedValue; + BLL.CostManageService.UpdateCostManage(getCost); } else { + getCost.NextManId = null; getCost.States = BLL.Const.State_2; BLL.CostManageService.UpdateCostManage(getCost); } diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.cs index 64a9cae0..f85a854b 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.cs @@ -313,7 +313,12 @@ namespace FineUIPro.Web.HSSE.CostGoods if (type == Const.BtnSubmit) { costManage.States = BLL.Const.State_1; - } + costManage.NextManId = this.drpNextMan.SelectedValue; + } + else + { + costManage.NextManId = costManage.CompileMan; + } var getCost= CostManageService.GetCostManageById(this.CostManageId); if (getCost != null) diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx index e5a883a1..433821fe 100644 --- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx @@ -110,6 +110,8 @@ + diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs index 60b12ccb..13499b37 100644 --- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs @@ -70,6 +70,10 @@ namespace FineUIPro.Web.HSSE.SitePerson this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); BLL.WorkPostService.InitWorkPostDropDownList(this.drpPost, true); this.InitTreeMenu();//加载树 + if (this.CurrUser.PersonId == Const.hfnbdId || this.CurrUser.PersonId == Const.sysglyId) + { + this.btnRefresh.Hidden = false; + } } } @@ -726,5 +730,11 @@ namespace FineUIPro.Web.HSSE.SitePerson PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../Person/ProjectPersonView.aspx?SitePersonId={0}", this.SitePersonId, "查看 - "))); } } + + protected void btnRefresh_Click(object sender, EventArgs e) + { + int count = GetDataService.SendCarNo(this.ProjectId); + Alert.ShowInTop("刷新完成"+ count.ToString()+"条。", MessageBoxIcon.Success); + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.designer.cs index cc9d9db8..fce5b39a 100644 --- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.designer.cs @@ -248,6 +248,15 @@ namespace FineUIPro.Web.HSSE.SitePerson /// protected global::FineUIPro.Button btnQR; + /// + /// btnRefresh 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnRefresh; + /// /// lbIsPost 控件。 /// diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectUnit.aspx b/SGGL/FineUIPro.Web/ProjectData/ProjectUnit.aspx index bf4b2c24..6e531d2d 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectUnit.aspx +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectUnit.aspx @@ -5,21 +5,19 @@ 项目单位 - + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/SysManage/ProjectToDo.aspx.cs b/SGGL/FineUIPro.Web/SysManage/ProjectToDo.aspx.cs new file mode 100644 index 00000000..63d56f7f --- /dev/null +++ b/SGGL/FineUIPro.Web/SysManage/ProjectToDo.aspx.cs @@ -0,0 +1,115 @@ +using BLL; +using FineUIPro.Web.DataShow; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.SysManage +{ + public partial class ProjectToDo : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack && this.CurrUser != null) + { + Funs.DropDownPageSize(this.ddlPageSize); + // 绑定表格 + this.BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + var getDataList = Funs.DB.Sp_Project_GetToDoItems( this.CurrUser.LoginProjectId, this.CurrUser.PersonId).ToList(); + Grid1.RecordCount = getDataList.Count(); + Grid1.DataSource = getDataList; + Grid1.DataBind(); + } + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + /// + /// 分页 + /// + /// + /// + 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(); + } + + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.EditData(); + } + + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑数据方法 + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + var getData = Funs.DB.Sp_Project_GetToDoItems(this.CurrUser.LoginProjectId, this.CurrUser.PersonId).FirstOrDefault(x => x.DataId == Grid1.SelectedRowID); + + if (getData != null) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面 + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("{0}", getData.PCUrl, "编辑 - "))); + } + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/SysManage/ProjectToDo.aspx.designer.cs b/SGGL/FineUIPro.Web/SysManage/ProjectToDo.aspx.designer.cs new file mode 100644 index 00000000..5f7d350c --- /dev/null +++ b/SGGL/FineUIPro.Web/SysManage/ProjectToDo.aspx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.SysManage +{ + + + public partial class ProjectToDo + { + + /// + /// 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; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + } +} diff --git a/SGGL/FineUIPro.Web/SysManage/RoleListEdit.aspx.cs b/SGGL/FineUIPro.Web/SysManage/RoleListEdit.aspx.cs index 123eef43..76706817 100644 --- a/SGGL/FineUIPro.Web/SysManage/RoleListEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/SysManage/RoleListEdit.aspx.cs @@ -30,7 +30,7 @@ namespace FineUIPro.Web.SysManage /// protected void Page_Load(object sender, EventArgs e) { - if (!IsPostBack) + if (!IsPostBack && this.CurrUser != null) { this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); this.RoleId = Request.Params["roleId"]; diff --git a/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.cs index bb265d3b..4f06e9b1 100644 --- a/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.cs @@ -448,7 +448,7 @@ namespace FineUIPro.Web.ZHGL.RealName join persons in Funs.DB.Person_Persons on x.PersonId equals persons.PersonId join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId join p in Funs.DB.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { p.UnitId, p.ProjectId } - where x.ProjectId == projectId + where x.ProjectId == projectId && p.IsSynchro == true && persons.IsCardNoOK == true && v.TeamId.HasValue && persons.HeadImage != null && persons.HeadImage.Length > 0 && !x.RealNameAddTime.HasValue @@ -495,7 +495,7 @@ namespace FineUIPro.Web.ZHGL.RealName var getIdentityCards = (from x in Funs.DB.SitePerson_Person join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId join p in Funs.DB.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { p.UnitId, p.ProjectId } - where x.ProjectId == projectId && v.TeamId.HasValue + where x.ProjectId == projectId && v.TeamId.HasValue && p.IsSynchro == true && !x.RealNameUpdateTime.HasValue //&& x.RealNameAddTime.HasValue && p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4 diff --git a/SGGL/FineUIPro.Web/common/Menu_ToDo.xml b/SGGL/FineUIPro.Web/common/Menu_ToDo.xml new file mode 100644 index 00000000..3102945e --- /dev/null +++ b/SGGL/FineUIPro.Web/common/Menu_ToDo.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/PageBase.cs b/SGGL/FineUIPro.Web/common/PageBase.cs index 23211d18..c9340e4d 100644 --- a/SGGL/FineUIPro.Web/common/PageBase.cs +++ b/SGGL/FineUIPro.Web/common/PageBase.cs @@ -23,22 +23,26 @@ namespace FineUIPro.Web { get { - if (Session["CurrUser"] == null) - { - string account = string.Empty; - string password = string.Empty; - if (Request.Cookies["u"] != null) - { - account = HttpUtility.UrlDecode(Request.Cookies["u"].Value); - } - if (Request.Cookies["p"] != null) - { - password = Request.Cookies["p"].Value; - } - Session["CurrUser"] = BLL.Funs.DB.Person_Persons.FirstOrDefault(x => x.Account == account && x.Password == Funs.EncryptionPassword(password)); - } - + if (Session["CurrUser"] == null) return null; return (Model.Person_Persons)Session["CurrUser"]; + + + //if (Session["CurrUser"] == null) + //{ + // string account = string.Empty; + // string password = string.Empty; + // if (Request.Cookies["u"] != null) + // { + // account = HttpUtility.UrlDecode(Request.Cookies["u"].Value); + // } + // if (Request.Cookies["p"] != null) + // { + // password = Request.Cookies["p"].Value; + // } + // Session["CurrUser"] = BLL.Funs.DB.Person_Persons.FirstOrDefault(x => x.Account == account && x.Password == Funs.EncryptionPassword(password)); + //} + + //return (Model.Person_Persons)Session["CurrUser"]; } } diff --git a/SGGL/FineUIPro.Web/indexProject.aspx b/SGGL/FineUIPro.Web/indexProject.aspx index b0001e7b..2603085a 100644 --- a/SGGL/FineUIPro.Web/indexProject.aspx +++ b/SGGL/FineUIPro.Web/indexProject.aspx @@ -11,6 +11,9 @@