From a322a2fa62a120226bc6506b9cb041a2f57e0d12 Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Sat, 8 Jul 2023 09:58:44 +0800 Subject: [PATCH] =?UTF-8?q?20230708=E4=BF=AE=E6=94=B9=E6=9C=AC=E9=83=A8?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=B8=8B=E6=8B=89=E6=A1=86=E5=8F=AA=E8=AF=BB?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E8=80=83=E5=8B=A4=E4=BA=8C=E6=AC=A1?= =?UTF-8?q?=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; + } } }