首页大屏幕
This commit is contained in:
@@ -166,16 +166,41 @@ namespace FineUIPro.Web.common
|
||||
this.divSafeWorkTime.InnerHtml = "0000000000";
|
||||
}
|
||||
///整改单
|
||||
var getRectify =from x in Funs.DB.Check_RectifyNotices
|
||||
where x.States !=Const.State_0 && x.States != null && x.ProjectId != null
|
||||
select x;
|
||||
int allcout = getRectify.Count();
|
||||
if (allcout > 0)
|
||||
//var getRectify =from x in Funs.DB.Check_RectifyNotices
|
||||
// where x.States !=Const.State_0 && x.States != null && x.ProjectId != null
|
||||
// select x;
|
||||
//int allcout = getRectify.Count();
|
||||
//if (allcout > 0)
|
||||
//{
|
||||
// this.divAllRectify.InnerHtml = allcout.ToString();
|
||||
// int ccount = getRectify.Where(x => x.States == "5").Count();
|
||||
// this.divRectifyRate.InnerHtml = Math.Round(ccount * 1.0 / allcout * 100, 1).ToString();
|
||||
//}
|
||||
|
||||
|
||||
var getRectify = from x in Funs.DB.View_Hazard_HazardRegister
|
||||
where x.States != Const.State_0 && x.States != Const.State_R && x.States != null
|
||||
group x by x.States into g
|
||||
select new { g.Key, Count = g.Count() };
|
||||
var allcout = getRectify.ToList();
|
||||
if (allcout.Count > 0)
|
||||
{
|
||||
this.divAllRectify.InnerHtml = allcout.ToString();
|
||||
int ccount = getRectify.Where(x => x.States == "5").Count();
|
||||
this.divRectifyRate.InnerHtml = Math.Round(ccount * 1.0 / allcout * 100, 1).ToString();
|
||||
int total = 0;
|
||||
int finish = 0;
|
||||
foreach (var item in allcout)
|
||||
{
|
||||
total += item.Count;
|
||||
if (item.Key.ToString() == "3")
|
||||
{
|
||||
finish += item.Count;
|
||||
}
|
||||
}
|
||||
|
||||
this.divAllRectify.InnerHtml = total.ToString();
|
||||
//this.divUCRectify.InnerHtml = (total - finish).ToString();
|
||||
this.divRectifyRate.InnerHtml = Math.Round(finish * 1.0 / total * 100, 1).ToString() ;
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -229,6 +254,9 @@ namespace FineUIPro.Web.common
|
||||
///问题总数
|
||||
int AllCount = getJointCheckDetail.Count() + getCheckControl.Count();
|
||||
this.divCQMSAllNum.InnerHtml = AllCount.ToString();
|
||||
|
||||
|
||||
|
||||
if (AllCount > 0)
|
||||
{
|
||||
///问题完成数
|
||||
@@ -240,20 +268,28 @@ namespace FineUIPro.Web.common
|
||||
CRectificationRate = Math.Round(CCount * 1.0 / AllCount * 100, 1);
|
||||
}
|
||||
}
|
||||
|
||||
var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail
|
||||
join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
|
||||
where y.ControlPoint != "C" && y.ControlPoint != "CR" && x.IsOK != null
|
||||
select x;
|
||||
int AllSpotCount = getSpotCheckDetail.Count();
|
||||
if (AllSpotCount > 0)
|
||||
var inspectionManagements = from x in Funs.DB.View_CQMS_InspectionManagementDetail select x;
|
||||
if (inspectionManagements.Count() > 0)
|
||||
{
|
||||
int okSpotCount = getSpotCheckDetail.Where(x => x.IsOK == true).Count();
|
||||
if (okSpotCount > 0)
|
||||
int okInspectionManagements = inspectionManagements.Where(x => x.IsOnceQualified == true).Count();
|
||||
if (okInspectionManagements > 0)
|
||||
{
|
||||
CQualifiedRate = Math.Round(okSpotCount * 1.0 / AllSpotCount * 100, 1);
|
||||
CQualifiedRate = Math.Round(okInspectionManagements * 1.0 / inspectionManagements.Count() * 100, 1);
|
||||
}
|
||||
}
|
||||
//var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail
|
||||
// join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
|
||||
// where y.ControlPoint != "C" && y.ControlPoint != "CR" && x.IsOK != null
|
||||
// select x;
|
||||
//int AllSpotCount = getSpotCheckDetail.Count();
|
||||
//if (AllSpotCount > 0)
|
||||
//{
|
||||
// int okSpotCount = getSpotCheckDetail.Where(x => x.IsOK == true).Count();
|
||||
// if (okSpotCount > 0)
|
||||
// {
|
||||
// CQualifiedRate = Math.Round(okSpotCount * 1.0 / AllSpotCount * 100, 1);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user