diff --git a/SGGL/FineUIPro.Web/HSSE/SecuritySystem/SafetyOrganization.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SecuritySystem/SafetyOrganization.aspx.cs index 992291c7..465f1c0e 100644 --- a/SGGL/FineUIPro.Web/HSSE/SecuritySystem/SafetyOrganization.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/SecuritySystem/SafetyOrganization.aspx.cs @@ -119,7 +119,7 @@ namespace FineUIPro.Web.HSSE.SecuritySystem string strSql = @"SELECT p.PersonId,p.CardNo,p.PersonName,p.ProjectId,p.UnitId,w.WorkPostName,p.Telephone,w.Remark" + @" FROM SitePerson_Person AS P" + @" LEFT JOIN Base_WorkPost AS W ON P.WorkPostId =W.WorkPostId" - + @" WHERE w.PostType='1' AND p.ProjectId= '" + this.ProjectId + "' AND p.UnitId='" + unitIdSelect + "'"; + + @" WHERE w.PostType='1' AND p.ProjectId= '" + this.ProjectId + "' AND p.UnitId='" + unitIdSelect + "' and P.IsUsed=1 and P.OutTime is null"; List listStr = new List(); SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);