首页数据绑定

This commit is contained in:
2023-02-14 15:52:33 +08:00
parent 09194dae85
commit cab3443c9f
3 changed files with 94 additions and 33 deletions
@@ -69,7 +69,7 @@ namespace FineUIPro.Web.common
private void getPersonWorkTime()
{
this.divSafeWorkTime.InnerHtml = "0000000000";
var ProjectTotal = (from x in Funs.DB.HSSE_MonthReportItem
var ProjectTotal = (from x in Funs.DB.HSSE_MonthReportItem
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
where y.ProjectId == this.ProjectId && "安全生产人工时数" == x.ReportItem
select x.YearTotal).Sum();
@@ -120,8 +120,8 @@ namespace FineUIPro.Web.common
{
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' and IsUsed =1 and InTime<='" + DateTime.Now.ToString("yyyy-MM-dd") + "' and (OutTime is null or OutTime>'" + DateTime.Now.ToString("yyyy-MM-dd") + @"' )
where ProjectId='" + this.ProjectId + @"'
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();