111
This commit is contained in:
@@ -65,30 +65,32 @@ namespace FineUIPro.Web
|
||||
/// 当前现场总人数
|
||||
/// </summary>
|
||||
private void getSitePerson()
|
||||
{
|
||||
// var getallin = APIPageDataService.getPersonInOutNum(this.ProjectId, DateTime.Now);
|
||||
string sql = @"select c.ConstText,b.PostType,count( *) num from SitePerson_Person a left join Base_WorkPost b on a.WorkPostId=b.WorkPostId
|
||||
LEFT JOIN Sys_Const AS c ON c.ConstValue = b.PostType and c.GroupId = 'PostType' where IsUsed =1 and InTime<='" + DateTime.Now.ToString("yyyy-MM-dd") + "' and (OutTime is null or OutTime>'" + DateTime.Now.ToString("yyyy-MM-dd") + @"' )
|
||||
and a.ProjectId='" + this.CurrUser.LoginProjectId + @"' and a.AuditorDate is not null
|
||||
group by c.ConstText,b.PostType ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(sql, parameter);
|
||||
int allcount = 0;
|
||||
int mcount = 0;
|
||||
if (tb != null)
|
||||
{
|
||||
foreach (DataRow row in tb.Rows)
|
||||
{
|
||||
allcount += int.Parse(row["num"].ToString());
|
||||
if (!string.IsNullOrEmpty(row["ConstText"].ToString()) && row["ConstText"].ToString().Contains("管理"))
|
||||
{
|
||||
mcount += int.Parse(row["num"].ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
var getEmployInOutRecords = Funs.DB.T_d_EmployInOutRecord.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RecordDate.Value == DateTime.Now.Date).ToList();
|
||||
|
||||
this.divPersonNum.InnerHtml = allcount.ToString();
|
||||
// var getallin = APIPageDataService.getPersonInOutNum(this.ProjectId, DateTime.Now);
|
||||
//string sql = @"select c.ConstText,b.PostType,count( *) num from SitePerson_Person a left join Base_WorkPost b on a.WorkPostId=b.WorkPostId
|
||||
// LEFT JOIN Sys_Const AS c ON c.ConstValue = b.PostType and c.GroupId = 'PostType' where IsUsed =1 and InTime<='" + DateTime.Now.ToString("yyyy-MM-dd") + "' and (OutTime is null or OutTime>'" + DateTime.Now.ToString("yyyy-MM-dd") + @"' )
|
||||
// and a.ProjectId='" + this.CurrUser.LoginProjectId + @"' and a.AuditorDate is not null
|
||||
// group by c.ConstText,b.PostType ";
|
||||
// List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
// SqlParameter[] parameter = listStr.ToArray();
|
||||
// DataTable tb = SQLHelper.GetDataTableRunText(sql, parameter);
|
||||
// int allcount = 0;
|
||||
// int mcount = 0;
|
||||
// if (tb != null)
|
||||
// {
|
||||
// foreach (DataRow row in tb.Rows)
|
||||
// {
|
||||
// allcount += int.Parse(row["num"].ToString());
|
||||
// if (!string.IsNullOrEmpty(row["ConstText"].ToString()) && row["ConstText"].ToString().Contains("管理"))
|
||||
// {
|
||||
// mcount += int.Parse(row["num"].ToString());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
this.divPersonNum.InnerHtml = getEmployInOutRecords.Count().ToString();
|
||||
|
||||
if (CurrUser.LoginProjectId == "b11a16ea-148c-4bae-a5a1-32158b599482")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user