From a3c6b691332869665f7e911b5a0c43e36e933037 Mon Sep 17 00:00:00 2001 From: gaofei <181547018@qq.com> Date: Wed, 8 Mar 2023 10:17:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A8=E9=87=8F?= =?UTF-8?q?=E5=B7=A1=E6=A3=80=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/CQMS/Check/CheckControlService.cs | 20 +++++++++---------- .../CQMS/Check/ChecklistEdit.aspx | 2 +- .../CQMS/PersonManage/WelderManage.aspx.cs | 6 +++++- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/SGGL/BLL/CQMS/Check/CheckControlService.cs b/SGGL/BLL/CQMS/Check/CheckControlService.cs index fd2cbdbd..371282a8 100644 --- a/SGGL/BLL/CQMS/Check/CheckControlService.cs +++ b/SGGL/BLL/CQMS/Check/CheckControlService.cs @@ -142,9 +142,9 @@ namespace BLL { if (state == Const.CheckControl_Compile || state == Const.CheckControl_ReCompile) //无是否同意 { - ListItem[] lis = new ListItem[2]; - lis[0] = new ListItem("总包负责人审核", Const.CheckControl_Audit1); - lis[1] = new ListItem("分包专业工程师回复", Const.CheckControl_Audit2); + ListItem[] lis = new ListItem[1]; + //lis[0] = new ListItem("总包负责人审核", Const.CheckControl_Audit1); + lis[0] = new ListItem("分包专业工程师回复", Const.CheckControl_Audit2); return lis; } else if (state == Const.CheckControl_Audit1)//有是否同意 @@ -156,9 +156,9 @@ namespace BLL } else if (state == Const.CheckControl_Audit2 || state == Const.CheckControl_ReCompile2)//无是否同意 { - ListItem[] lis = new ListItem[2]; - lis[0] = new ListItem("分包负责人审批", Const.CheckControl_Audit3); - lis[1] = new ListItem("总包专业工程师确认", Const.CheckControl_Audit4); + ListItem[] lis = new ListItem[1]; + //lis[0] = new ListItem("分包负责人审批", Const.CheckControl_Audit3); + lis[0] = new ListItem("总包专业工程师确认", Const.CheckControl_Audit4); return lis; } else if (state == Const.CheckControl_Audit3)//有是否同意 @@ -170,10 +170,10 @@ namespace BLL } else if (state == Const.CheckControl_Audit4)//有是否同意 { - ListItem[] lis = new ListItem[3]; - lis[0] = new ListItem("总包负责人确认", Const.CheckControl_Audit5);//是 加载 - lis[1] = new ListItem("审批完成", Const.CheckControl_Complete);//是 加载 - lis[2] = new ListItem("分包专业工程师重新回复", Const.CheckControl_ReCompile2);//否加载 + ListItem[] lis = new ListItem[2]; + //lis[0] = new ListItem("总包负责人确认", Const.CheckControl_Audit5);//是 加载 + lis[0] = new ListItem("审批完成", Const.CheckControl_Complete);//是 加载 + lis[1] = new ListItem("分包专业工程师重新回复", Const.CheckControl_ReCompile2);//否加载 return lis; } else if (state == Const.CheckControl_Audit5)//有是否同意 diff --git a/SGGL/FineUIPro.Web/CQMS/Check/ChecklistEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Check/ChecklistEdit.aspx index d5a88afc..4a09ea70 100644 --- a/SGGL/FineUIPro.Web/CQMS/Check/ChecklistEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Check/ChecklistEdit.aspx @@ -45,7 +45,7 @@ + > diff --git a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx.cs b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx.cs index 08543df8..59e51c48 100644 --- a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx.cs @@ -192,6 +192,10 @@ namespace FineUIPro.Web.CQMS.PersonManage rootNode.EnableClickEvent = true; this.tvControlItem.Nodes.Add(rootNode); var getWelders = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Welder && x.States == Const.ProjectPersonStates_1 && x.UnitId == item.UnitId && x.WelderCode.Contains(txtQueryWelderCode.Text.Trim()) select x).ToList(); + if (!string.IsNullOrEmpty(txtQueryWelderCode.Text.Trim())) + { + getWelders = getWelders.Where(x => x.WelderCode.Contains(txtQueryWelderCode.Text.Trim())).ToList(); + } foreach (var sitem in getWelders) { TreeNode tn = new TreeNode(); @@ -202,7 +206,7 @@ namespace FineUIPro.Web.CQMS.PersonManage } else { - tn.Text = sitem.PersonName+"【" + sitem.WelderCode + "】"; + tn.Text = sitem.PersonName + "【" + sitem.WelderCode + "】"; } tn.EnableClickEvent = true; rootNode.Nodes.Add(tn); From 6462172f438357eb9311d31507f4df9d648eb886 Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Wed, 8 Mar 2023 11:23:40 +0800 Subject: [PATCH 2/2] =?UTF-8?q?20230308=E6=B4=BE=E9=81=A3=E6=96=B9?= =?UTF-8?q?=E6=B3=95=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;