From 6462172f438357eb9311d31507f4df9d648eb886 Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Wed, 8 Mar 2023 11:23:40 +0800 Subject: [PATCH] =?UTF-8?q?20230308=E6=B4=BE=E9=81=A3=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HSSE/SitePerson/SitePerson_PersonItemService.cs | 5 +++-- SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 2 +- SGGL/FineUIPro.Web/Person/DepartPerson.aspx.cs | 13 ++++--------- SGGL/FineUIPro.Web/common/Menu_CQMS.xml | 1 + SGGL/FineUIPro.Web/common/Menu_HJGL.xml | 11 ++++++----- SGGL/FineUIPro.Web/common/Menu_HSSE.xml | 1 + SGGL/FineUIPro.Web/common/Menu_SysSet.xml | 1 + SGGL/FineUIPro.Web/common/Menu_ZHGL.xml | 10 ++++++++++ SGGL/FineUIPro.Web/indexProject.aspx.cs | 2 +- 9 files changed, 28 insertions(+), 18 deletions(-) diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonItemService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonItemService.cs index 69faccb3..fd9af7d8 100644 --- a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonItemService.cs +++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonItemService.cs @@ -194,11 +194,12 @@ namespace BLL newitem.IdentityCard = getPerson.IdentityCard; if (!getPerson.MultiProject.HasValue || getPerson.MultiProject == false) { + var getdate = newitem.InTime.HasValue ? newitem.InTime.Value.AddDays(-1) : DateTime.Now; ///未离场项目 先离场 - OutPersonItem(newitem.PersonId, null, DateTime.Now); + OutPersonItem(newitem.PersonId, null, getdate); } - var getPersonItem = db.SitePerson_PersonItem.FirstOrDefault(x => x.PersonId == getPerson.PersonId + var getPersonItem = db.SitePerson_PersonItem.FirstOrDefault(x => x.PersonId == getPerson.PersonId && x.ProjectId == newitem.ProjectId && x.InTime <= newitem.InTime && (x.OutTime > newitem.InTime || !x.OutTime.HasValue)); if (getPersonItem != null) { diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 4d90bb32..7897b6fe 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -12857,7 +12857,7 @@ True 0 / - http://localhost:2087/ + http://localhost:7022/ False False diff --git a/SGGL/FineUIPro.Web/Person/DepartPerson.aspx.cs b/SGGL/FineUIPro.Web/Person/DepartPerson.aspx.cs index da3926d4..0d0f4552 100644 --- a/SGGL/FineUIPro.Web/Person/DepartPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/DepartPerson.aspx.cs @@ -324,17 +324,12 @@ namespace FineUIPro.Web.Person if (getPerson != null && getPerson.IsPost == true) { var getcuuProject = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.IdentityCard == getPerson.IdentityCard && x.States == Const.ProjectPersonStates_1); - if (getcuuProject == null || getPerson.MultiProject == true) + if (getcuuProject != null && (getPerson.MultiProject == false|| !getPerson.MultiProject.HasValue)) { - ////人员直接派遣时候 - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectPersonEdit.aspx?PersonId={0}&Type=P", Grid1.SelectedRowID, "查看 - "))); - } - else - { - var getProjectName = ProjectService.GetProjectNameByProjectId(getcuuProject.ProjectId) ?? ""; - Alert.ShowInParent("当前人员已在项目:"+getProjectName+"任职,请选择不在项目的人员派遣!", MessageBoxIcon.Warning); - return; + SitePerson_PersonService.SetSitePerson_PersonStates(getcuuProject.SitePersonId, Const.ProjectPersonStates_2, DateTime.Now); } + ////人员直接派遣时候 + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectPersonEdit.aspx?PersonId={0}&Type=P", Grid1.SelectedRowID, "查看 - "))); } else { diff --git a/SGGL/FineUIPro.Web/common/Menu_CQMS.xml b/SGGL/FineUIPro.Web/common/Menu_CQMS.xml index c460a9f5..a090e6ed 100644 --- a/SGGL/FineUIPro.Web/common/Menu_CQMS.xml +++ b/SGGL/FineUIPro.Web/common/Menu_CQMS.xml @@ -50,6 +50,7 @@ + diff --git a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml index 1ea05d70..65eed927 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml @@ -33,11 +33,6 @@ - - - - - @@ -46,6 +41,11 @@ + + + + + @@ -60,5 +60,6 @@ + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml index 23039e37..7cb44c71 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml @@ -100,6 +100,7 @@ + diff --git a/SGGL/FineUIPro.Web/common/Menu_SysSet.xml b/SGGL/FineUIPro.Web/common/Menu_SysSet.xml index 7bb24492..51d04b55 100644 --- a/SGGL/FineUIPro.Web/common/Menu_SysSet.xml +++ b/SGGL/FineUIPro.Web/common/Menu_SysSet.xml @@ -28,6 +28,7 @@ + diff --git a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml index f83c931c..a3c02166 100644 --- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml @@ -15,6 +15,16 @@ + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/indexProject.aspx.cs b/SGGL/FineUIPro.Web/indexProject.aspx.cs index 6d42a7b9..71d4b2d7 100644 --- a/SGGL/FineUIPro.Web/indexProject.aspx.cs +++ b/SGGL/FineUIPro.Web/indexProject.aspx.cs @@ -596,7 +596,7 @@ namespace FineUIPro.Web protected void btnHome_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(this.CurrUser.LastProjectId) - && ((this.CurrUser.UnitId == Const.UnitId_SEDIN && this.CurrUser.IsOffice == true) || this.CurrUser.PersonId == Const.sysglyId || this.CurrUser.PersonId == Const.hfnbdId)) + && ((this.CurrUser.UnitId == Const.UnitId_SEDIN && (this.CurrUser.IsOffice == true || this.CurrUser.RoleIds != null)) || this.CurrUser.PersonId == Const.sysglyId || this.CurrUser.PersonId == Const.hfnbdId)) { Person_PersonsService.UpdateLastUserInfo(this.CurrUser.PersonId, null, true, this.CurrUser.LoginProjectId); this.CurrUser.LastProjectId = this.CurrUser.LoginProjectId;