1、项目环境设置
2、大屏数据调优
This commit is contained in:
@@ -7,6 +7,7 @@ using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Threading.Tasks;
|
||||
using FineUIPro.Web.ProjectData;
|
||||
using FineUIPro.Web.DataShow;
|
||||
|
||||
namespace FineUIPro.Web.common
|
||||
{
|
||||
@@ -87,12 +88,12 @@ namespace FineUIPro.Web.common
|
||||
var inspectionMachineList = (from x in db.Comprehensive_InspectionMachine where x.ProjectId == projectId select x).ToList();
|
||||
|
||||
//质量
|
||||
var cqmsProjectData = (from x in Funs.DB.Project_CQMSData_CQMS
|
||||
var cqmsProjectData = (from x in db.Project_CQMSData_CQMS
|
||||
where x.ProjectId == projectId
|
||||
select x).OrderByDescending(x => x.ReportDate).FirstOrDefault();
|
||||
//质量培训人数
|
||||
//var cqmsTrainPersonNum = cqmsProjectData.TrainPersonNum;
|
||||
var cqmsTrainPersonNum = Funs.DB.Comprehensive_InspectionPerson.Where(x => x.IsTrain == true && x.ProjectId == projectId).Count();
|
||||
var cqmsTrainPersonNum = db.Comprehensive_InspectionPerson.Where(x => x.IsTrain == true && x.ProjectId == projectId).Count();
|
||||
|
||||
//var getJointCheckDetail = from x in Funs.DB.Check_JointCheckDetail
|
||||
// join y in Funs.DB.Check_JointCheck on x.JointCheckId equals y.JointCheckId
|
||||
@@ -142,6 +143,17 @@ namespace FineUIPro.Web.common
|
||||
double inspectionPersonRate = inspectionPersonIsCheckOk > 0 ? Math.Round((100 * (double)(inspectionPersonIsCheckOk / inspectionPerson)), 2) : 0;
|
||||
double inspectionMachineRate = inspectionMachineIsCheckOk > 0 ? Math.Round((100 * (double)(inspectionMachineIsCheckOk / inspectionMachine)), 2) : 0;
|
||||
|
||||
//项目进度计划
|
||||
var scheduleList = (from x in db.Sys_Schedule
|
||||
where x.ProjectId == projectId
|
||||
orderby x.SortId
|
||||
select new
|
||||
{
|
||||
date = x.ScheduleDate,
|
||||
title = x.ScheduleName,
|
||||
description = x.ScheduleName,
|
||||
isClosed = DateTime.Now > x.ScheduleDate
|
||||
}).ToList();
|
||||
// 构造返回数据
|
||||
var returnData = new
|
||||
{
|
||||
@@ -203,9 +215,13 @@ namespace FineUIPro.Web.common
|
||||
projectEndDate = string.Format("{0:yyyy-MM-dd}", project.EndDate),//项目到期时间
|
||||
projectEndDays = endDays > 0 ? endDays : 0,//合同倒计时
|
||||
},
|
||||
//xmjdData = new {//项目进度计划【待汇总】
|
||||
|
||||
//},
|
||||
xmjdData = scheduleList.Select(x => new
|
||||
{//项目进度计划
|
||||
x.isClosed,
|
||||
date = ((DateTime)x.date).ToString("yyyy-MM-dd"),
|
||||
x.title,
|
||||
x.description
|
||||
}),
|
||||
dangerousProject = new
|
||||
{//危大工程管控数据
|
||||
approvalCompleted = hsseData.CompletedNum ?? 0,//审批完成
|
||||
|
||||
Reference in New Issue
Block a user