From a322a2fa62a120226bc6506b9cb041a2f57e0d12 Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Sat, 8 Jul 2023 09:58:44 +0800 Subject: [PATCH 01/30] =?UTF-8?q?20230708=E4=BF=AE=E6=94=B9=E6=9C=AC?= =?UTF-8?q?=E9=83=A8=E9=A1=B9=E7=9B=AE=E4=B8=8B=E6=8B=89=E6=A1=86=E5=8F=AA?= =?UTF-8?q?=E8=AF=BB=E9=97=AE=E9=A2=98=EF=BC=8C=E8=80=83=E5=8B=A4=E4=BA=8C?= =?UTF-8?q?=E6=AC=A1=E5=86=99=E5=85=A5=E6=96=B9=E6=B3=95=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/FineUIPro.Web/ErrLog.txt | 65 ------------------- SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 2 +- .../HSSE/SitePerson/PersonInfo.aspx.cs | 42 +++++++++++- SGGL/FineUIPro.Web/index.aspx.cs | 5 +- 4 files changed, 44 insertions(+), 70 deletions(-) diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index 381ffe46..e69de29b 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -1,65 +0,0 @@ - -错误信息开始=====> -错误类型:NullReferenceException -错误信息:未将对象引用设置到对象的实例。 -错误堆栈: - 在 BLL.ServerService.GetCNCECToken() 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\ServerService.cs:行号 32 - 在 BLL.ServerService.GetToken() 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\ServerService.cs:行号 85 - 在 BLL.ServerService.PushCNCEC(String JsonBody, String apiurl) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\ServerService.cs:行号 58 - 在 BLL.HSSEData_HSSEService.PushCNCEC(String Id) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\HSSEData_HSSEService.cs:行号 517 - 在 FineUIPro.Web.ZHGL.DataSync.HSSEData_HSSEEdit.btnSyn_Click(Object sender, EventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\ZHGL\DataSync\HSSEData_HSSEEdit.aspx.cs:行号 516 - 在 FineUIPro.Button.OnClick(EventArgs e) - 在 (Button , EventArgs ) - 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:07/05/2023 09:52:50 -出错文件:http://localhost:2146/ZHGL/DataSync/HSSEData_HSSEEdit.aspx?Id=0925a698-9188-455c-8b86-32e3b1e88680 -IP地址:::1 -操作人员:JT - -出错时间:07/05/2023 09:52:50 - - -错误信息开始=====> -错误类型:NullReferenceException -错误信息:未将对象引用设置到对象的实例。 -错误堆栈: - 在 BLL.ServerService.GetCNCECToken() 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\ServerService.cs:行号 32 - 在 BLL.ServerService.GetToken() 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\ServerService.cs:行号 85 - 在 BLL.ServerService.PushCNCEC(String JsonBody, String apiurl) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\ServerService.cs:行号 58 - 在 BLL.HSSEData_HSSEService.PushCNCEC(String Id) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\HSSEData_HSSEService.cs:行号 517 - 在 FineUIPro.Web.ZHGL.DataSync.HSSEData_HSSEEdit.btnSyn_Click(Object sender, EventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\ZHGL\DataSync\HSSEData_HSSEEdit.aspx.cs:行号 516 - 在 FineUIPro.Button.OnClick(EventArgs e) - 在 (Button , EventArgs ) - 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:07/05/2023 10:00:45 -出错文件:http://localhost:2146/ZHGL/DataSync/HSSEData_HSSEEdit.aspx?Id=0925a698-9188-455c-8b86-32e3b1e88680 -IP地址:::1 -操作人员:JT - -出错时间:07/05/2023 10:00:45 - - -错误信息开始=====> -错误类型:NullReferenceException -错误信息:未将对象引用设置到对象的实例。 -错误堆栈: - 在 FineUIPro.Web.SysManage.SysConstSet.btnApply_Click(Object sender, EventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\SysManage\SysConstSet.aspx.cs:行号 972 - 在 FineUIPro.Button.OnClick(EventArgs e) - 在 (Button , EventArgs ) - 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:07/05/2023 10:05:10 -出错文件:http://localhost:2146/SysManage/SysConstSet.aspx -IP地址:::1 -操作人员:JT - -出错时间:07/05/2023 10:05:10 - diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 2f3854be..aef88e34 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -13943,7 +13943,7 @@ True 0 / - http://localhost:2146/ + http://localhost:10703/ False False diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx.cs index 0eb3af86..785a5f03 100644 --- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx.cs @@ -1,6 +1,9 @@ using BLL; +using FineUIPro.Web.DataShow; +using Model; using System; using System.Linq; +using System.Runtime.InteropServices.ComTypes; using System.Text; using AspNet = System.Web.UI.WebControls; @@ -327,15 +330,48 @@ namespace FineUIPro.Web.HSSE.SitePerson protected void btnInRealName_Click(object sender, EventArgs e) { - foreach (var item in Grid1.Rows) + int count = 0; + IQueryable getDataList = Funs.DB.SitePerson_PersonInOut.Where(x => x.ProjectId == this.CurrUser.LoginProjectId); + if (this.rbInOutWay.SelectedValue != "0") { - var getInOut = Funs.DB.SitePerson_PersonInOut.FirstOrDefault(x => x.PersonInOutId == item.RowID); + getDataList = getDataList.Where(x => x.InOutWay == this.rbInOutWay.SelectedValue); + } + if (!string.IsNullOrEmpty(this.drpUnit.SelectedValue) && this.drpUnit.SelectedValue != Const._Null) + { + getDataList = getDataList.Where(x => x.UnitId == this.drpUnit.SelectedValue); + } + if (!string.IsNullOrEmpty(this.txtPersonName.Text)) + { + getDataList = getDataList.Where(x => x.PersonName.Contains(this.txtPersonName.Text.Trim())); + } + if (!string.IsNullOrEmpty(this.txtIdCard.Text)) + { + getDataList = getDataList.Where(x => x.IdentityCard.Contains(this.txtIdCard.Text.Trim())); + } + + DateTime? startDate = Funs.GetNewDateTime(this.txtStartDate.Text); + DateTime? endDate = Funs.GetNewDateTime(this.txtEndDate.Text); + if (startDate.HasValue) + { + getDataList = getDataList.Where(x => x.ChangeTime >= startDate); + } + if (endDate.HasValue) + { + getDataList = getDataList.Where(x => x.ChangeTime <= endDate); + } + + foreach (var item in getDataList) + { + var getInOut = Funs.DB.SitePerson_PersonInOut.FirstOrDefault(x => x.PersonInOutId == item.PersonInOutId); if (getInOut != null) { - getInOut.PersonInOutId = SQLHelper.GetNewID(); + item.PersonInOutId = SQLHelper.GetNewID(); PersonInOutService.InsertPersonInOutNowNow(getInOut); + count++; } } + + Alert.ShowInTop("写入考勤" + count.ToString() + "条。", MessageBoxIcon.Success); } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/index.aspx.cs b/SGGL/FineUIPro.Web/index.aspx.cs index 183f41eb..92e9bb9a 100644 --- a/SGGL/FineUIPro.Web/index.aspx.cs +++ b/SGGL/FineUIPro.Web/index.aspx.cs @@ -53,7 +53,10 @@ namespace FineUIPro.Web if (!IsPostBack) { - //this.CurrUser.LoginProjectId = null; + if (this.CurrUser != null) + { + this.CurrUser.LoginProjectId = null; + } } } From bfa693d306a7229b7352fb7327aa5ba240daa818 Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Sun, 9 Jul 2023 11:17:12 +0800 Subject: [PATCH 02/30] =?UTF-8?q?20230709=E9=A1=B9=E7=9B=AE=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E8=B0=83=E6=95=B4=E5=8D=95=E4=BD=8D=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E9=99=90=E5=88=B6=E6=94=BE=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../版本日志/{ => 已更新脚本}/SGGLDB_V2023-06-26.sql | 0 .../版本日志/{ => 已更新脚本}/SGGLDB_V2023-06-27.sql | 0 .../{ => 已更新脚本}/SGGLDB_V2023-06-27修改明细.txt | 0 .../版本日志/{ => 已更新脚本}/SGGLDB_V2023-06-28.sql | 0 .../{ => 已更新脚本}/SGGLDB_V2023-06-28修改明细.txt | 0 .../版本日志/{ => 已更新脚本}/SGGLDB_V2023-06-29.sql | 0 .../{ => 已更新脚本}/SGGLDB_V2023-06-29修改明细.txt | 0 .../版本日志/{ => 已更新脚本}/SGGLDB_V2023-06-30.sql | 0 .../版本日志/{ => 已更新脚本}/SGGLDB_V2023-07-03.sql | 0 .../版本日志/{ => 已更新脚本}/SGGLDB_V2023-07-04.sql | 0 SGGL/BLL/Person/Person_PersonsService.cs | 2 +- SGGL/BLL/ZHGL/RealName/SynchroSetService.cs | 5 +++-- SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 2 +- SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs | 11 ++++------- 14 files changed, 9 insertions(+), 11 deletions(-) rename DataBase/版本日志/{ => 已更新脚本}/SGGLDB_V2023-06-26.sql (100%) rename DataBase/版本日志/{ => 已更新脚本}/SGGLDB_V2023-06-27.sql (100%) rename DataBase/版本日志/{ => 已更新脚本}/SGGLDB_V2023-06-27修改明细.txt (100%) rename DataBase/版本日志/{ => 已更新脚本}/SGGLDB_V2023-06-28.sql (100%) rename DataBase/版本日志/{ => 已更新脚本}/SGGLDB_V2023-06-28修改明细.txt (100%) rename DataBase/版本日志/{ => 已更新脚本}/SGGLDB_V2023-06-29.sql (100%) rename DataBase/版本日志/{ => 已更新脚本}/SGGLDB_V2023-06-29修改明细.txt (100%) rename DataBase/版本日志/{ => 已更新脚本}/SGGLDB_V2023-06-30.sql (100%) rename DataBase/版本日志/{ => 已更新脚本}/SGGLDB_V2023-07-03.sql (100%) rename DataBase/版本日志/{ => 已更新脚本}/SGGLDB_V2023-07-04.sql (100%) diff --git a/DataBase/版本日志/SGGLDB_V2023-06-26.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-26.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-26.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-26.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-06-27.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-27.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-27.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-27.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-06-27修改明细.txt b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-27修改明细.txt similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-27修改明细.txt rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-27修改明细.txt diff --git a/DataBase/版本日志/SGGLDB_V2023-06-28.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-28.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-28.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-28.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-06-28修改明细.txt b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-28修改明细.txt similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-28修改明细.txt rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-28修改明细.txt diff --git a/DataBase/版本日志/SGGLDB_V2023-06-29.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-29.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-29.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-29.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-06-29修改明细.txt b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-29修改明细.txt similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-29修改明细.txt rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-29修改明细.txt diff --git a/DataBase/版本日志/SGGLDB_V2023-06-30.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-30.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-30.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-30.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-07-03.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-07-03.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-07-03.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-07-03.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-07-04.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-07-04.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-07-04.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-07-04.sql diff --git a/SGGL/BLL/Person/Person_PersonsService.cs b/SGGL/BLL/Person/Person_PersonsService.cs index 43cabbc3..c27e2085 100644 --- a/SGGL/BLL/Person/Person_PersonsService.cs +++ b/SGGL/BLL/Person/Person_PersonsService.cs @@ -1031,7 +1031,7 @@ namespace BLL Model.Person_Persons newPerson = db.Person_Persons.FirstOrDefault(e => e.PersonId == person.PersonId); if (newPerson != null) { - //newPerson.UnitId = person.UnitId; + newPerson.UnitId = person.UnitId; //newPerson.DepartId = person.DepartId; // newPerson.WorkPostId = person.WorkPostId; // newPerson.JobNum = person.JobNum; diff --git a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs index b1a4cf6f..5ae369f5 100644 --- a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs +++ b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs @@ -1518,12 +1518,13 @@ namespace BLL 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 + where 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 && pu.IsSynchro == true + && z.JTproCode.Length> 0 + && pu.IsSynchro == true orderby x.ChangeTime descending select new { diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index aef88e34..7a5a3206 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -13943,7 +13943,7 @@ True 0 / - http://localhost:10703/ + http://localhost:4243/ False False diff --git a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs index 09fac7d5..2fa70f00 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs @@ -82,6 +82,10 @@ namespace FineUIPro.Web.Person this.InitDropDownList(); if (!string.IsNullOrEmpty(this.SitePersonId)) { + if (!CommonService.IsMainUnitOrAdmin(this.CurrUser.PersonId)) + { + this.drpUnit.Readonly = true; + } SetProjectPerson(); SetPersonInfoByIdCard(this.txtIdentityCard.Text.Trim()); } @@ -162,10 +166,6 @@ namespace FineUIPro.Web.Person getInitGridInOut(); getInitGridContract(); } - else - { - this.drpUnit.Readonly = false; - } } } @@ -176,7 +176,6 @@ namespace FineUIPro.Web.Person private void SetPersonInfo(Model.Person_Persons person) { this.PersonId = person.PersonId; - this.drpUnit.Readonly = true; if (person.IsCardNoOK == true) { this.txtIdentityCard.Readonly = true; @@ -209,7 +208,6 @@ namespace FineUIPro.Web.Person } else { - this.drpUnit.Readonly = false; Alert.ShowInParent("当前人员所属单位【" + name + "】不在该项目单位中,请重新选择所属单位!", MessageBoxIcon.Warning); } } @@ -403,7 +401,6 @@ namespace FineUIPro.Web.Person if (!string.IsNullOrEmpty(UnitId)) { this.drpUnit.SelectedValue = UnitId; - this.drpUnit.Readonly = true; } else { From a873d6c064246f6d5caa5deee123e353b2d20757 Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Mon, 10 Jul 2023 18:10:50 +0800 Subject: [PATCH 03/30] 20230710 --- SGGL/BLL/Common/Funs.cs | 6 +- .../OfficeCheck/Check/CheckNoticeService.cs | 10 +- SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 2 +- .../OfficeCheck/Check/CheckContentEdit.aspx | 101 +++++++++--------- .../Check/CheckContentEdit.aspx.cs | 42 ++++---- .../Check/CheckContentEdit.aspx.designer.cs | 18 ---- .../OfficeCheck/Check/CheckInfo.aspx | 40 +++---- .../OfficeCheck/Check/CheckInfo.aspx.cs | 14 +-- .../Check/CheckInfo.aspx.designer.cs | 54 ---------- .../OfficeCheck/Check/CheckNotice.aspx.cs | 2 +- .../OfficeCheck/Check/CheckNoticeEdit.aspx.cs | 33 +++--- .../OfficeCheck/Check/CheckReport.aspx | 26 ++--- .../OfficeCheck/Check/CheckReport.aspx.cs | 6 +- .../Check/CheckReport.aspx.designer.cs | 90 +++++++--------- 14 files changed, 175 insertions(+), 269 deletions(-) diff --git a/SGGL/BLL/Common/Funs.cs b/SGGL/BLL/Common/Funs.cs index 59a84938..6b82667b 100644 --- a/SGGL/BLL/Common/Funs.cs +++ b/SGGL/BLL/Common/Funs.cs @@ -1213,15 +1213,15 @@ namespace BLL { if (score >= 80) { - value = "ϸ"; + value = "Aϸ"; } else if (score >= 71 && score <= 79) { - value = "ϸ"; + value = "Bϸ"; } else if (score <= 70) { - value = "ϸ"; + value = "Cϸ"; } } return value; diff --git a/SGGL/BLL/OfficeCheck/Check/CheckNoticeService.cs b/SGGL/BLL/OfficeCheck/Check/CheckNoticeService.cs index 82a372c2..4738fca9 100644 --- a/SGGL/BLL/OfficeCheck/Check/CheckNoticeService.cs +++ b/SGGL/BLL/OfficeCheck/Check/CheckNoticeService.cs @@ -25,19 +25,18 @@ namespace BLL public static void AddCheckNotice(Model.ProjectSupervision_CheckNotice checkNotice) { Model.ProjectSupervision_CheckNotice newCheckNotice = new Model.ProjectSupervision_CheckNotice(); - newCheckNotice.CheckNoticeId = checkNotice.CheckNoticeId; - //newCheckNotice.SubjectUnitId = checkNotice.SubjectUnitId; + newCheckNotice.CheckNoticeId = checkNotice.CheckNoticeId; newCheckNotice.SubjectUnitAdd = checkNotice.SubjectUnitAdd; newCheckNotice.SubjectUnitMan = checkNotice.SubjectUnitMan; newCheckNotice.SubjectUnitTel = checkNotice.SubjectUnitTel; newCheckNotice.CheckStartTime = checkNotice.CheckStartTime; - newCheckNotice.CheckEndTime = checkNotice.CheckEndTime; - //newCheckNotice.SubjectObject = checkNotice.SubjectObject; + newCheckNotice.CheckEndTime = checkNotice.CheckEndTime; newCheckNotice.CheckTeamLeader = checkNotice.CheckTeamLeader; newCheckNotice.CompileMan = checkNotice.CompileMan; newCheckNotice.CompileDate = checkNotice.CompileDate; newCheckNotice.CheckTeamLeaderName = checkNotice.CheckTeamLeaderName; newCheckNotice.UnitId = checkNotice.UnitId; + newCheckNotice.DepartId = checkNotice.DepartId; newCheckNotice.SexName = checkNotice.SexName; newCheckNotice.SubjectProjectId = checkNotice.SubjectProjectId; Funs.DB.ProjectSupervision_CheckNotice.InsertOnSubmit(newCheckNotice); @@ -48,7 +47,7 @@ namespace BLL { Model.ProjectSupervision_CheckTeam newCheckTeam = new Model.ProjectSupervision_CheckTeam { - CheckTeamId = SQLHelper.GetNewID(typeof(Model.ProjectSupervision_CheckTeam)) + CheckTeamId = SQLHelper.GetNewID() }; ; newCheckTeam.CheckNoticeId = newCheckNotice.CheckNoticeId; @@ -84,6 +83,7 @@ namespace BLL newCheckNotice.CompileDate = checkNotice.CompileDate; newCheckNotice.CheckTeamLeaderName = checkNotice.CheckTeamLeaderName; newCheckNotice.UnitId = checkNotice.UnitId; + newCheckNotice.DepartId = checkNotice.DepartId; newCheckNotice.SexName = checkNotice.SexName; newCheckNotice.SubjectProjectId = checkNotice.SubjectProjectId; Funs.DB.SubmitChanges(); diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 7a5a3206..b9528076 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -13943,7 +13943,7 @@ True 0 / - http://localhost:4243/ + http://localhost:6562/ False False diff --git a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx index c6c3ea7b..22489796 100644 --- a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx +++ b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx @@ -45,7 +45,7 @@ @@ -55,13 +55,13 @@ HeaderTextAlign="Center" TextAlign="Center" Width="60px"> + HeaderTextAlign="Center" TextAlign="Left" Width="150px"> + HeaderTextAlign="Center" TextAlign="Left" Width="400px" ExpandUnusedSpace="true"> + HeaderTextAlign="Center" TextAlign="Left" Width="300px" > @@ -71,21 +71,21 @@ + HeaderTextAlign="Center" TextAlign="Left" Width="100px" FieldType="Double"> + HeaderTextAlign="Center" TextAlign="Left" Width="100px" FieldType="Double"> + HeaderTextAlign="Center" TextAlign="Left" Width="100px" FieldType="Double"> @@ -96,25 +96,20 @@ - + - - - - - - - + <%-- --%> + - - - + + + @@ -131,6 +126,12 @@ \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx.cs b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx.cs index 50dc2389..2589fa6b 100644 --- a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx.cs @@ -46,27 +46,26 @@ namespace FineUIPro.Web.OfficeCheck.Check if (checkInfo != null) { this.drpSubjectProject.SelectedValue = checkInfo.SubjectProjectId; + this.txtCheckLeader.Text = Person_PersonsService.GetPersonsNameById(checkInfo.CheckTeamLeader); + this. txtSubjectUnitMan.Text= Person_PersonsService.GetPersonsNameById(checkInfo.SubjectUnitMan); } + this.txtCheckMan.Text = this.CurrUser.PersonName; + this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.txtSubjectUnitDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); - var table1 = BLL.CheckTable1Service.GetCheckTable1ByCheckNoticeId(this.CheckNoticeId); + var table1 = BLL.CheckTable1Service.GetCheckTable1ByCheckNoticeId(this.CheckNoticeId); if (table1 != null) { if (!string.IsNullOrEmpty(table1.SubjectProjectId)) { this.drpSubjectProject.SelectedValue = table1.SubjectProjectId; } - if (!string.IsNullOrEmpty(table1.CheckMan)) - { - this.txtCheckMan.Text = table1.CheckMan; - } - else - { - this.txtCheckMan.Text = this.CurrUser.PersonName; - } + this.txtCheckMan.Text = table1.CheckMan; this.txtCheckLeader.Text = table1.CheckLeader; this.txtSubjectUnitMan.Text = table1.SubjectUnitMan; this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", table1.CheckDate); this.txtSubjectUnitDate.Text = string.Format("{0:yyyy-MM-dd}", table1.SubjectUnitDate); + if (table1.Total100Score.HasValue) { this.lbTotal100Score.Text = "本表百分制得分 = (实查项实得分之和/实查项应得满分之和*100) " + table1.Total100Score + " 分"; @@ -76,14 +75,14 @@ namespace FineUIPro.Web.OfficeCheck.Check this.lbTotal100Score.Text = "本表百分制得分 = (实查项实得分之和/实查项应得满分之和*100) 分"; } - if (table1.TotalLastScore.HasValue) - { - this.lbTotalLastScore.Text = "综合评定得分 = 本表得分 - 负面清单罚分 = " + table1.TotalLastScore + " 分"; - } - else - { - this.lbTotalLastScore.Text = "综合评定得分 = 本表得分 - 负面清单罚分 = 分"; - } + //if (table1.TotalLastScore.HasValue) + //{ + // this.lbTotalLastScore.Text = "综合评定得分 = 本表得分 - 负面清单罚分 = " + table1.TotalLastScore + " 分"; + //} + //else + //{ + // this.lbTotalLastScore.Text = "综合评定得分 = 本表得分 - 负面清单罚分 = 分"; + //} this.lbEvaluationResult.Text = table1.EvaluationResult; } @@ -142,6 +141,7 @@ namespace FineUIPro.Web.OfficeCheck.Check } this.Grid1.DataBind(); } + /// /// 合计值 /// @@ -229,7 +229,7 @@ namespace FineUIPro.Web.OfficeCheck.Check if (checks == null) { Model.ProjectSupervision_Check1 newCheck = new Model.ProjectSupervision_Check1(); - newCheck.ID = SQLHelper.GetNewID(typeof(Model.ProjectSupervision_Check1)); + newCheck.ID = SQLHelper.GetNewID(); newCheck.SortIndex = Funs.GetNewInt(values.Value("SortIndex")); newCheck.CheckItem = values.Value("CheckItem"); newCheck.CheckStandard = values.Value("CheckStandard"); @@ -245,7 +245,7 @@ namespace FineUIPro.Web.OfficeCheck.Check else { Model.ProjectSupervision_Check1 newCheck = new Model.ProjectSupervision_Check1(); - newCheck.ID = SQLHelper.GetNewID(typeof(Model.ProjectSupervision_Check1)); + newCheck.ID = SQLHelper.GetNewID(); newCheck.SortIndex = checks.SortIndex; newCheck.CheckItem = checks.CheckItem; newCheck.CheckStandard = values.Value("CheckStandard"); @@ -286,7 +286,7 @@ namespace FineUIPro.Web.OfficeCheck.Check totalGetScore = totalBaseScore - totalDeletScore; decimal sS = (totalGetScore / totalBaseScore) * 100; total100Score = Math.Round(sS, 2); - totalLastScore = (total100Score - Funs.GetNewDecimalOrZero(this.hdTotalDeletScore6_7.Text)); + totalLastScore = total100Score; //total100Score - Funs.GetNewDecimalOrZero(this.hdTotalDeletScore6_7.Text)); } } @@ -309,7 +309,7 @@ namespace FineUIPro.Web.OfficeCheck.Check table1.TotalLastScore = totalLastScore; table1.EvaluationResult = Funs.ReturnEvaluationResultByScore(table1.TotalLastScore); table1.CheckNoticeId = this.CheckNoticeId; - table1.CheckItemId = SQLHelper.GetNewID(typeof(Model.ProjectSupervision_CheckTable1)); + table1.CheckItemId = SQLHelper.GetNewID(); BLL.CheckTable1Service.AddCheckTable1(table1); ShowNotify("保存成功!", MessageBoxIcon.Success); diff --git a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx.designer.cs index 75952462..937a6269 100644 --- a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx.designer.cs @@ -140,24 +140,6 @@ namespace FineUIPro.Web.OfficeCheck.Check /// protected global::FineUIPro.Label lbTotal100Score; - /// - /// hdTotalDeletScore6_7 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.HiddenField hdTotalDeletScore6_7; - - /// - /// lbTotalLastScore 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label lbTotalLastScore; - /// /// lbEvaluationResult 控件。 /// diff --git a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckInfo.aspx b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckInfo.aspx index 86a4e8d8..1013b150 100644 --- a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckInfo.aspx +++ b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckInfo.aspx @@ -52,9 +52,9 @@ --%> - + + <%----%> + + - + - - - diff --git a/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx.cs index fba96f7f..cbde1d5b 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx.cs +++ b/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx.cs @@ -3,6 +3,7 @@ using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Data; +using System.IO; using System.Linq; using System.Web.UI.WebControls; @@ -27,7 +28,7 @@ namespace FineUIPro.Web.JDGL.Check private void BindGrid() { - DataTable table = BLL.WorkPackageService.GetAllTreeDataTable(this.CurrUser.LoginProjectId); + DataTable table = BLL.WorkPackageService.GetAllTreeDataTable(this.CurrUser.LoginProjectId, string.Empty); Grid1.DataSource = table; Grid1.DataBind(); for (int i = 0; i < this.Grid1.Rows.Count; i++) @@ -38,7 +39,7 @@ namespace FineUIPro.Web.JDGL.Check cbIsMileStone.Visible = false; foreach (GridColumn column in Grid1.Columns) { - if (column.ColumnIndex != 0) + if (column.ColumnIndex != 0 && column.ColumnIndex != 1) { this.Grid1.Rows[i].CellCssClasses[column.ColumnIndex] = "f-grid-cell-uneditable"; } @@ -98,7 +99,7 @@ namespace FineUIPro.Web.JDGL.Check Model.WBS_WorkPackage workPackage = workPackages.FirstOrDefault(x => x.WorkPackageId == this.Grid1.Rows[i].DataKeys[2].ToString()); if (workPackage != null) { - string weights = values.Value("Weights"); + string weights = values.Value("JDWeights"); string unit = values.Value("Unit"); string planProjectQuantity = values.Value("PlanProjectQuantity"); string realProjectQuantity = values.Value("RealProjectQuantity"); @@ -107,7 +108,7 @@ namespace FineUIPro.Web.JDGL.Check string realStartDate = values.Value("RealStartDate"); string preWorkCode = values.Value("PreWorkCode"); System.Web.UI.WebControls.CheckBox cbIsMileStone = (System.Web.UI.WebControls.CheckBox)(this.Grid1.Rows[i].FindControl("cbIsMileStone")); - workPackage.Weights = Funs.GetNewDecimal(weights); + workPackage.JDWeights = Funs.GetNewDecimal(weights); workPackage.Unit = unit; workPackage.PlanProjectQuantity = Funs.GetNewDecimal(planProjectQuantity); workPackage.RealProjectQuantity = Funs.GetNewDecimal(realProjectQuantity); @@ -171,5 +172,190 @@ namespace FineUIPro.Web.JDGL.Check } } #endregion + + #region 导出(excel按钮) + protected void btnOutExcel_Click(object sender, EventArgs e) + { + if (this.Grid1.Rows.Count > 0) + { + try + { + DataTable table = BLL.WorkPackageService.GetAllTreeDataTable(this.CurrUser.LoginProjectId, "Out"); + string projectNmae = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); + if (!string.IsNullOrEmpty(projectNmae)) + { + projectNmae = "(" + projectNmae + ")"; + } + string rootPath = Server.MapPath("~/"); + string initTemplatePath = string.Empty; + string uploadfilepath = string.Empty; + string newUrl = string.Empty; + string filePath = string.Empty; + initTemplatePath = Const.JDPlanTemplateUrl; + uploadfilepath = rootPath + initTemplatePath; + newUrl = uploadfilepath.Replace(".xls", projectNmae + ".xls"); + File.Copy(uploadfilepath, newUrl); + // 第一步:读取文件流 + NPOI.SS.UserModel.IWorkbook workbook; + using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read)) + { + workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream); + } + + // 创建单元格样式 + NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); + cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.None; + cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.None; + cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.None; + cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.None; + cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; + cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + var font = workbook.CreateFont(); + font.FontHeightInPoints = 12; + font.IsBold = true; + //font.FontHeightInPoints = (short)8.5;字号为小数时要转为short + cellStyle0.SetFont(font); + + // 第二步:创建新数据行 + NPOI.SS.UserModel.ISheet sheet = workbook.GetSheet("Sheet1"); + NPOI.SS.UserModel.IRow row1 = sheet.CreateRow(1); + NPOI.SS.UserModel.ICell cell2; + // 添加测试数据 + cell2 = row1.CreateCell(14); + cell2.CellStyle = cellStyle0; + cell2.SetCellValue("123"); + var font2 = workbook.CreateFont(); + font2.FontHeightInPoints = 10; + + + + // 创建单元格样式 + NPOI.SS.UserModel.ICellStyle cellStyle1 = workbook.CreateCellStyle(); + cellStyle1.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle1.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle1.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle1.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle1.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; + cellStyle1.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + var font3 = workbook.CreateFont(); + font3.FontHeightInPoints = 14; + cellStyle1.SetFont(font3); + + NPOI.SS.UserModel.ICellStyle cellStyle2 = workbook.CreateCellStyle(); + cellStyle2.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle2.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle2.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle2.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle2.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Left; + cellStyle2.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle2.SetFont(font3); + + int rowCount = 1; + NPOI.SS.UserModel.IRow row; + NPOI.SS.UserModel.ICell cell; + + #region 填充内容 + foreach (DataRow tr in table.Rows) + { + row = sheet.CreateRow(rowCount); + cell = row.CreateCell(0); + cell.CellStyle = cellStyle2; + cell.SetCellValue(tr["Code"].ToString()); + cell = row.CreateCell(1); + cell.CellStyle = cellStyle2; + cell.SetCellValue(tr["Name"].ToString()); + cell = row.CreateCell(2); + cell.CellStyle = cellStyle1; + cell.SetCellValue(tr["PreWorkCode"].ToString()); + cell = row.CreateCell(3); + cell.CellStyle = cellStyle1; + if (!string.IsNullOrEmpty(tr["IsMileStone"].ToString()) && Convert.ToBoolean(tr["IsMileStone"].ToString()) == true) + { + cell.SetCellValue("是"); + } + cell = row.CreateCell(4); + cell.CellStyle = cellStyle1; + if (!string.IsNullOrEmpty(tr["JDWeights"].ToString())) + { + cell.SetCellValue(decimal.Round(Convert.ToDecimal(tr["JDWeights"]), 2).ToString("0.##")); + } + cell = row.CreateCell(5); + cell.CellStyle = cellStyle1; + cell.SetCellValue(tr["Unit"].ToString()); + cell = row.CreateCell(6); + cell.CellStyle = cellStyle1; + if (!string.IsNullOrEmpty(tr["PlanProjectQuantity"].ToString())) + { + cell.SetCellValue(decimal.Round(Convert.ToDecimal(tr["PlanProjectQuantity"]), 2).ToString("0.##")); + } + cell = row.CreateCell(7); + cell.CellStyle = cellStyle1; + if (!string.IsNullOrEmpty(tr["PlanCost"].ToString())) + { + cell.SetCellValue(decimal.Round(Convert.ToDecimal(tr["PlanCost"]), 2).ToString("0.##")); + } + cell = row.CreateCell(8); + cell.CellStyle = cellStyle1; + if (!string.IsNullOrEmpty(tr["RealProjectQuantity"].ToString())) + { + cell.SetCellValue(decimal.Round(Convert.ToDecimal(tr["RealProjectQuantity"]), 2).ToString("0.##")); + } + cell = row.CreateCell(9); + cell.CellStyle = cellStyle1; + if (tr["PlanStartDate"] != null) + { + cell.SetCellValue(string.Format("{0:yyyy-MM-dd}", tr["PlanStartDate"])); + } + cell = row.CreateCell(10); + cell.CellStyle = cellStyle1; + if (tr["PlanEndDate"] != null) + { + cell.SetCellValue(string.Format("{0:yyyy-MM-dd}", tr["PlanEndDate"])); + } + cell = row.CreateCell(11); + cell.CellStyle = cellStyle1; + if (tr["RealStartDate"] != null) + { + cell.SetCellValue(string.Format("{0:yyyy-MM-dd}", tr["RealStartDate"])); + } + cell = row.CreateCell(12); + cell.CellStyle = cellStyle1; + if (tr["RealEndDate"] != null) + { + cell.SetCellValue(string.Format("{0:yyyy-MM-dd}", tr["RealEndDate"])); + } + rowCount++; + } + #endregion + // 第三步:写入文件流 + using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write)) + { + workbook.Write(stream); + workbook.Close(); + } + string fileName = Path.GetFileName(newUrl); + FileInfo info = new FileInfo(newUrl); + long fileSize = info.Length; + Response.Clear(); + Response.ContentType = "application/x-zip-compressed"; + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.AddHeader("Content-Length", fileSize.ToString()); + Response.TransmitFile(newUrl, 0, fileSize); + Response.Flush(); + Response.Close(); + File.Delete(newUrl); + } + catch (Exception ex) + { + + throw ex; + } + } + else + { + ShowNotify("没有数据,无法导出!", MessageBoxIcon.Warning); + } + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx.designer.cs index 656badf1..0da2811c 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx.designer.cs @@ -75,6 +75,15 @@ namespace FineUIPro.Web.JDGL.Check { /// protected global::FineUIPro.Button btnSave; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// txtPreWorkCode 控件。 /// @@ -103,13 +112,13 @@ namespace FineUIPro.Web.JDGL.Check { protected global::System.Web.UI.WebControls.CheckBox cbIsMileStone; /// - /// nbWeights 控件。 + /// nbJDWeights 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.NumberBox nbWeights; + protected global::FineUIPro.NumberBox nbJDWeights; /// /// txtUnit 控件。