This commit is contained in:
2023-09-04 19:38:45 +08:00
parent 6c19bf6a3e
commit dece3781ec
55 changed files with 2730 additions and 971 deletions
+20 -8
View File
@@ -93,8 +93,9 @@ namespace FineUIPro.Web.common
}
}
}
}
if (sumMonthCount>0)
}
if (sumMonthCount>0)
{
this.divSafeWorkTime.InnerHtml = sumMonthCount.ToString("0000000000"); ;
}
@@ -142,22 +143,24 @@ namespace FineUIPro.Web.common
/// 劳务统计
/// </summary>
private void getSitePerson()
{
{
var getEmployInOutRecords = Funs.DB.T_d_EmployInOutRecord.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RecordDate.Value == DateTime.Now.Date).ToList();
string sql = @"select c.ConstText,b.PostType,count( *) num from SitePerson_Person a left join Base_WorkPost b on a.WorkPostId=b.WorkPostId
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.ProjectId + @"' 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 allcount = getEmployInOutRecords.Count();
int mcount = 0;
if (tb != null)
{
foreach (DataRow row in tb.Rows)
{
allcount += int.Parse(row["num"].ToString());
//allcount += int.Parse(row["num"].ToString());
if (!string.IsNullOrEmpty(row["ConstText"].ToString()) && row["ConstText"].ToString().Contains("管理"))
{
mcount += int.Parse(row["num"].ToString());
@@ -165,9 +168,18 @@ namespace FineUIPro.Web.common
}
}
this.divALLPerson.InnerHtml = allcount.ToString();
this.divGLPerson.InnerHtml = mcount.ToString();
this.divZYPerson.InnerHtml = (allcount - mcount).ToString();
if (allcount > mcount)
{
this.divGLPerson.InnerHtml = mcount.ToString();
this.divZYPerson.InnerHtml = (allcount - mcount).ToString();
}
else
{
this.divGLPerson.InnerHtml = allcount.ToString();
this.divZYPerson.InnerHtml = "0";
}
if (CurrUser.LoginProjectId == "b11a16ea-148c-4bae-a5a1-32158b599482")
{