diff --git a/SGGL/BLL/Common/YunMouHelper.cs b/SGGL/BLL/Common/YunMouHelper.cs index 169e1a4e..27d543b1 100644 --- a/SGGL/BLL/Common/YunMouHelper.cs +++ b/SGGL/BLL/Common/YunMouHelper.cs @@ -358,6 +358,7 @@ namespace BLL.Common string faceImageBase64 = ImageToByte64String(filename, System.Drawing.Imaging.ImageFormat.Jpeg); // 图片的base64编码 string data = "{\"employeeNo\":\"" + employeeNo + "\",\"personName\":\"" + personName + "\",\"faceImageBase64\":\"" + faceImageBase64 + "\",\"verifyImage\":true}"; string result = Post(YunMouUrl + "api/v1/open/basic/persons/update", data, "application/json;charset=UTF-8", access_token); + ErrLogInfo.WriteLog(personName + result); var j2 = JsonConvert.DeserializeObject(result); return j2.code; } diff --git a/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs b/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs index 7c8e0d29..5e1c779e 100644 --- a/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs +++ b/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs @@ -198,6 +198,7 @@ namespace BLL InOutWay = personInOut.InOutWay ?? Const.InOutWay_Other, WorkAreaId = personInOut.WorkAreaId, WorkAreaName = personInOut.WorkAreaName, + IdentityCard = personInOut.IdentityCard, OldID = personInOut.OldID, Address = personInOut.Address, Remark = personInOut.Remark, @@ -210,7 +211,7 @@ namespace BLL { personIds.Add(personInOut.IdentityCard); } - newPersonInOutList.Add(personInOut); + newPersonInOutList.Add(newPersonInOut); } List person_Peoples = new List(); @@ -244,7 +245,7 @@ namespace BLL } } - if (!getPerson.OutTime.HasValue || getPerson.OutTime > DateTime.Now) + if (getPerson!=null && (!getPerson.OutTime.HasValue || getPerson.OutTime > DateTime.Now)) { //// 插入当日记录表 needInsertPersonInOutList.Add(newPersonInOut); @@ -398,7 +399,7 @@ namespace BLL foreach (var newPersonInOut in newPersonInOutList) { var getPUnit = getPUnitS.FirstOrDefault(x => x.UnitId == newPersonInOut.UnitId); - if (getPUnit.UnitType != Const.ProjectUnitType_3 && getPUnit.UnitType != Const.ProjectUnitType_4 && getPUnit.IsSynchro == true) + if (getPUnit!=null&&getPUnit.UnitType != Const.ProjectUnitType_3 && getPUnit.UnitType != Const.ProjectUnitType_4 && getPUnit.IsSynchro == true) { if (getRealNameP != null && newPersonInOut.ChangeTime.HasValue) { diff --git a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNotices.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNotices.aspx.cs index 13e4c10e..7903b060 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNotices.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNotices.aspx.cs @@ -7,6 +7,7 @@ using System.Data.SqlClient; using System.IO; using System.Linq; using System.Text; +using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.HSSE.Check { @@ -342,6 +343,59 @@ namespace FineUIPro.Web.HSSE.Check Response.Write(GetGridTableHtml(Grid1)); Response.End(); } + public static string GetGridTableHtml(Grid grid) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + sb.Append(""); + sb.Append(""); + + foreach (GridColumn column in grid.Columns) + { + if (column.ColumnID != "Actions" && !column.Hidden) + { + sb.AppendFormat("", column.HeaderText); + } + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + if (column.ColumnID != "Actions" && !column.Hidden) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber" && (row.FindControl("labNumber") as AspNet.Label) != null) + { + html = (row.FindControl("labNumber") as AspNet.Label).Text; + } + if (column.ColumnID == "CheckManNames" && (row.FindControl("Label2") as AspNet.Label) != null) + { + html = (row.FindControl("Label2") as AspNet.Label).Text; + } + // 处理CheckBox + if (html.Contains("f-grid-static-checkbox")) + { + if (!html.Contains("f-checked")) + { + html = "×"; + } + else + { + html = "√"; + } + } + sb.AppendFormat("", html); + // sb.AppendFormat("", html); + } + } + + sb.Append(""); + } + sb.Append("
{0}
{0}{0}
"); + return sb.ToString(); + } #endregion protected void rbStates_SelectedIndexChanged(object sender, EventArgs e) diff --git a/SGGL/WebAPI/Controllers/PersonController.cs b/SGGL/WebAPI/Controllers/PersonController.cs index 35243ee1..fd9533c1 100644 --- a/SGGL/WebAPI/Controllers/PersonController.cs +++ b/SGGL/WebAPI/Controllers/PersonController.cs @@ -476,8 +476,9 @@ namespace WebAPI.Controllers { var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.IdentityCard == person.IdentityCard.Trim() && x.ProjectId == person.ProjectId); if (getPerson != null && getPerson.PersonId != person.PersonId) + //if (getPerson != null && getPerson.SitePersonId != person.SitePersonId) { - responeData.code = 2; + responeData.code = 2; responeData.message = "人员身份证号码已存在!"; } else @@ -785,7 +786,7 @@ namespace WebAPI.Controllers catch (Exception ex) { responeData.code = 0; - responeData.message = ex.Message; + responeData.message = ex.StackTrace; } } return responeData;