大数据数据绑定
This commit is contained in:
@@ -26,7 +26,8 @@ namespace BLL
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Base_Project> getDataLists = from x in db.Base_Project
|
||||
select x;
|
||||
where x.ProjectState == Const.ProjectState_1
|
||||
select x;
|
||||
|
||||
/// <summary>
|
||||
/// 质量数据仓库
|
||||
@@ -38,7 +39,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getDataDWList( string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1)
|
||||
{
|
||||
var getDataList = from x in Funs.DB.Base_Project select x;
|
||||
IQueryable<Model.Base_Project> getDataList = getDataLists;
|
||||
if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null)
|
||||
{
|
||||
getDataList = getDataList.Where(x => x.ProjectId == projectId);
|
||||
@@ -56,13 +57,87 @@ namespace BLL
|
||||
x.ProjectId,
|
||||
x.ProjectName,
|
||||
x.ProjectCode,
|
||||
Rate1 = "0%", //质量验收问题整改率
|
||||
Rate2 = "0%", //控制点完成率
|
||||
Rate3 = "0%", //质量检查问题整改率
|
||||
Rate4 = "0%", //管道焊接一次合格率
|
||||
Rate1 = getSpotCheckRate(x.ProjectId), //质量验收问题整改率
|
||||
Rate2 = getSpotCheckDataRate(x.ProjectId), //控制点完成率
|
||||
Rate3 = getCheckControlStates(x.ProjectId), //质量检查问题整改率
|
||||
Rate4 = getFirstPassRate(x.ProjectId), //管道焊接一次合格率
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 质量验收问题整改率
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static string getSpotCheckRate(string projectId)
|
||||
{
|
||||
|
||||
//// 实体验收 资料验收
|
||||
var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail
|
||||
join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode
|
||||
where (y.ProjectId == projectId || projectId == null) && y.State == "8"
|
||||
select x;
|
||||
int all = getSpotCheckDetail.Count();
|
||||
// this.lbSpotCheck1.Text = all.ToString();
|
||||
int onesOKCount = getSpotCheckDetail.Where(x => x.IsOnesOK == true).Count(); //一次合格
|
||||
// this.lbSpotCheck2.Text= okCount.ToString();
|
||||
|
||||
return all > 0 ? Math.Round(onesOKCount * 100.0 / (all * 1.0)).ToString() + "%" : "0%";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 控制点完成率
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static string getSpotCheckDataRate(string projectId)
|
||||
{
|
||||
var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail
|
||||
join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode
|
||||
where (y.ProjectId == projectId || projectId == null) && y.State == "8"
|
||||
select x;
|
||||
/// 资料验收合格项目
|
||||
var getOKSpotCheckDetail = getSpotCheckDetail.Where(x => x.IsOK == true);
|
||||
int okYSCount = getOKSpotCheckDetail.Count(); //验收合格
|
||||
int okDateCount = getSpotCheckDetail.Where(x => x.IsDataOK == "1").Count(); //资料合格
|
||||
return okYSCount > 0 ? Math.Round(okDateCount * 100.0 / (okYSCount * 1.0)).ToString() + "%" : "0%";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 质量检查问题整改率
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static string getCheckControlStates(string projectId)
|
||||
{
|
||||
var getCheck_CheckControl = from x in Funs.DB.Check_CheckControl
|
||||
where (x.ProjectId == projectId || projectId == null)
|
||||
select x;
|
||||
int allCheckControlCount = getCheck_CheckControl.Count();
|
||||
int okCheckControlCount = getCheck_CheckControl.Where(x => x.State == "7").Count(); ///已整改
|
||||
return allCheckControlCount > 0 ? Math.Round(okCheckControlCount * 100.0 / (allCheckControlCount * 1.0)).ToString() + "%" : "0%";
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 管道焊接一次合格率
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static string getFirstPassRate(string projectId)
|
||||
{
|
||||
var getJots = from x in Funs.DB.HJGL_Batch_NDEItem
|
||||
join y in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals y.TrustBatchItemId
|
||||
join z in Funs.DB.HJGL_Batch_PointBatchItem on y.PointBatchItemId equals z.PointBatchItemId
|
||||
join a in Funs.DB.HJGL_Batch_NDE on x.NDEID equals a.NDEID
|
||||
where z.PointDate != null && z.PointState == "1" && y.RepairRecordId == null
|
||||
&& (a.ProjectId == projectId || projectId == null)
|
||||
select x;
|
||||
int allHJCount = getJots.Count();
|
||||
var getOk = getJots.Where(x => x.CheckResult == "1");
|
||||
int okHJCount = getOk.Count();
|
||||
return allHJCount > 0 ? Math.Round(okHJCount * 100.0 / (allHJCount * 1.0)).ToString() + "%" : "0%";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,8 @@ namespace BLL
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Base_Project> getDataLists = from x in db.Base_Project
|
||||
select x;
|
||||
where x.ProjectState == Const.ProjectState_1
|
||||
select x;
|
||||
|
||||
/// <summary>
|
||||
/// 安全数据仓库
|
||||
@@ -38,7 +39,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getDataDWList( string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1)
|
||||
{
|
||||
var getDataList = from x in Funs.DB.Base_Project select x;
|
||||
IQueryable<Model.Base_Project> getDataList = getDataLists;
|
||||
if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null)
|
||||
{
|
||||
getDataList = getDataList.Where(x => x.ProjectId == projectId);
|
||||
@@ -56,13 +57,48 @@ namespace BLL
|
||||
x.ProjectId,
|
||||
x.ProjectName,
|
||||
x.ProjectCode,
|
||||
Count1=0, //人员数量
|
||||
Count2 =0, //安全人工时
|
||||
Count3 =0, //安全培训次数
|
||||
ProblemRate = "0%", //安全巡检整改率
|
||||
Count1=db.SitePerson_Person.Where(p=>p.ProjectId == x.ProjectId && p.States == Const.ProjectPersonStates_1).Count(), //人员数量
|
||||
Count2 = getProjecctSafeHours(x.ProjectId), //安全人工时
|
||||
Count3 =db.EduTrain_TrainRecord.Where(p => p.ProjectId == x.ProjectId && p.States == BLL.Const.State_2).Count(), //安全培训次数
|
||||
ProblemRate = getProblemRate(x.ProjectId), //安全巡检整改率
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 安全人工时
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static int getProjecctSafeHours(string projectId)
|
||||
{
|
||||
int count = 0;
|
||||
var getPersonInOutNumber = (from x in Funs.DB.SitePerson_PersonInOutNumber
|
||||
where (x.ProjectId == projectId || projectId == null)
|
||||
select x).OrderByDescending(x => x.InOutDate).FirstOrDefault();
|
||||
if (getPersonInOutNumber != null)
|
||||
{
|
||||
count = getPersonInOutNumber.WorkHours ?? 0;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 安全问题整改率
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static string getProblemRate(string projectId)
|
||||
{
|
||||
var getAllHazardRegister = from x in Funs.DB.HSSE_Hazard_HazardRegister
|
||||
where (x.ProjectId == projectId || projectId == null)
|
||||
&& x.States != null && x.States != "4" && x.States != "0"
|
||||
select x;
|
||||
int allHazardCount = getAllHazardRegister.Count();
|
||||
int cHazardCount = getAllHazardRegister.Where(x => x.States == "3").Count();
|
||||
return allHazardCount > 0 ? Math.Round(cHazardCount * 100.0 / (allHazardCount * 1.0)).ToString() + "%" : "0%";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ namespace BLL
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Base_Project> getDataLists = from x in db.Base_Project
|
||||
select x;
|
||||
select x;
|
||||
|
||||
/// <summary>
|
||||
/// 进度数据仓库
|
||||
@@ -36,7 +36,7 @@ namespace BLL
|
||||
/// <param name="endTime"></param>
|
||||
/// <param name="Grid1"></param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getDataDWList( string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1)
|
||||
public static IEnumerable getDataDWList(string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1)
|
||||
{
|
||||
var getDataList = from x in Funs.DB.Base_Project select x;
|
||||
if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null)
|
||||
@@ -56,10 +56,44 @@ namespace BLL
|
||||
x.ProjectId,
|
||||
x.ProjectName,
|
||||
x.ProjectCode,
|
||||
JDRate = "0%", //项目进度完成百分比
|
||||
JDRate = getJDRate(x.ProjectId, startTime, endTime), //项目进度完成百分比
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 进度百分比
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string getJDRate(string projectId, DateTime? startTime, DateTime? endTime)
|
||||
{
|
||||
double totalSJCost = 0; ////累计实际费用
|
||||
decimal totalPlanCost = 0; ////计划费用
|
||||
var getViewWorkPackageParentDetail = from x in Funs.DB.View_WBS_WorkPackageParentDetail
|
||||
where (x.ProjectId == projectId || projectId == null) && (x.ParentId == "1" || x.ParentId == "2")
|
||||
select x;
|
||||
if (startTime.HasValue)
|
||||
{
|
||||
getViewWorkPackageParentDetail = getViewWorkPackageParentDetail.Where(x => x.Months >= startTime);
|
||||
}
|
||||
if (endTime.HasValue)
|
||||
{
|
||||
getViewWorkPackageParentDetail = getViewWorkPackageParentDetail.Where(x => x.Months <= endTime);
|
||||
}
|
||||
if (getViewWorkPackageParentDetail.Count() > 0)
|
||||
{
|
||||
totalSJCost = getViewWorkPackageParentDetail.Sum(x => x.TotalThisValue ?? 0);
|
||||
}
|
||||
|
||||
var getUnitWork = from x in Funs.DB.WBS_UnitWork where x.ProjectId == projectId select x;
|
||||
if (getUnitWork.Count() > 0)
|
||||
{
|
||||
totalPlanCost = getUnitWork.Sum(x => x.PlanCost ?? 0);
|
||||
}
|
||||
|
||||
///项目进度完成百分比
|
||||
decimal s = Convert.ToDecimal(totalSJCost);
|
||||
return totalPlanCost > 0 ? Math.Round(s / totalPlanCost).ToString() + "%" : "0%";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,10 +21,10 @@
|
||||
EmptyText="请选择项目" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" EmptyText="开始日期"
|
||||
ID="txtStartTime" EnableEdit="false">
|
||||
ID="txtStartTime" EnableEdit="false" Hidden="true">
|
||||
</f:DatePicker>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" EmptyText="结束日期"
|
||||
ID="txtEndTime" EnableEdit="false">
|
||||
ID="txtEndTime" EnableEdit="false" Hidden="true">
|
||||
</f:DatePicker>
|
||||
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
||||
</f:ToolbarFill>
|
||||
@@ -50,7 +50,7 @@
|
||||
<f:RenderField Width="150px" ColumnID="ProjectCode" DataField="ProjectCode"
|
||||
FieldType="String" HeaderText="项目号" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="200px" ColumnID="ProjectName" DataField="ProjectName"
|
||||
<f:RenderField Width="250px" ColumnID="ProjectName" DataField="ProjectName"
|
||||
FieldType="String" HeaderText="项目名称" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="Rate1" DataField="Rate1"
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
EmptyText="请选择项目" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" EmptyText="开始日期"
|
||||
ID="txtStartTime" EnableEdit="false">
|
||||
ID="txtStartTime" EnableEdit="false" Hidden="true">
|
||||
</f:DatePicker>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" EmptyText="结束日期"
|
||||
ID="txtEndTime" EnableEdit="false">
|
||||
ID="txtEndTime" EnableEdit="false" Hidden="true">
|
||||
</f:DatePicker>
|
||||
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
||||
</f:ToolbarFill>
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
EmptyText="请选择项目" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" EmptyText="开始日期"
|
||||
ID="txtStartTime" EnableEdit="false">
|
||||
ID="txtStartTime" EnableEdit="false" Hidden="true">
|
||||
</f:DatePicker>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" EmptyText="结束日期"
|
||||
ID="txtEndTime" EnableEdit="false">
|
||||
ID="txtEndTime" EnableEdit="false" Hidden="true">
|
||||
</f:DatePicker>
|
||||
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
||||
</f:ToolbarFill>
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
EmptyText="请选择项目" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" EmptyText="开始日期"
|
||||
ID="txtStartTime" EnableEdit="false">
|
||||
ID="txtStartTime" EnableEdit="false" Hidden="true">
|
||||
</f:DatePicker>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" EmptyText="结束日期"
|
||||
ID="txtEndTime" EnableEdit="false">
|
||||
ID="txtEndTime" EnableEdit="false" Hidden="true">
|
||||
</f:DatePicker>
|
||||
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
||||
</f:ToolbarFill>
|
||||
|
||||
@@ -76,9 +76,9 @@
|
||||
</f:Label>
|
||||
<f:Label ID="lbSpotCheckDataRate" runat="server" Label="控制点完成率">
|
||||
</f:Label>
|
||||
<f:Label ID="Label2" runat="server" Label="质量检查问题整改率">
|
||||
<f:Label ID="lbCheckControlStates" runat="server" Label="质量检查问题整改率">
|
||||
</f:Label>
|
||||
<f:Label ID="Label10" runat="server" Label="管道焊接一次合格率">
|
||||
<f:Label ID="lbFirstPassRate" runat="server" Label="管道焊接一次合格率">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.HJGL.WeldingReport;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlTypes;
|
||||
@@ -67,27 +69,14 @@ namespace FineUIPro.Web.DigData
|
||||
this.lbSitePersons.Text = (from x in Funs.DB.SitePerson_Person
|
||||
where x.ProjectId == this.ProjectId //&& y.States == Const.State_1
|
||||
select x).Count().ToString();
|
||||
var getPersonInOutNumber = (from x in Funs.DB.SitePerson_PersonInOutNumber
|
||||
where x.ProjectId == this.ProjectId
|
||||
select x).OrderByDescending(x => x.InOutDate).FirstOrDefault();
|
||||
if (getPersonInOutNumber != null)
|
||||
{
|
||||
this.lbWorkHours.Text = (getPersonInOutNumber.WorkHours ?? 0).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.lbWorkHours.Text = "0";
|
||||
}
|
||||
///安全工时
|
||||
this.lbWorkHours.Text = HSEDataDWService.getProjecctSafeHours(this.ProjectId).ToString();
|
||||
///安全教育
|
||||
this.lbEduCount.Text = (from x in Funs.DB.EduTrain_TrainRecord
|
||||
where x.ProjectId == this.ProjectId && x.States == BLL.Const.State_2
|
||||
select x).Count().ToString();
|
||||
|
||||
var getAllHazardRegister = from x in Funs.DB.HSSE_Hazard_HazardRegister
|
||||
where x.ProjectId == this.ProjectId && x.States != null && x.States != "4" && x.States != "0"
|
||||
select x;
|
||||
int allHazardCount = getAllHazardRegister.Count();
|
||||
int cHazardCount = getAllHazardRegister.Where(x => x.States == "3").Count();
|
||||
this.lbRectifyRate.Text = allHazardCount > 0 ? Math.Round(cHazardCount * 100.0 / (allHazardCount * 1.0)).ToString() + "%" : "0%";
|
||||
///问题整改
|
||||
this.lbRectifyRate.Text = HSEDataDWService.getProblemRate(this.ProjectId);
|
||||
|
||||
this.lbMeetingCount.Text = (Funs.DB.Meeting_AttendMeeting.Where(x => x.ProjectId == this.ProjectId && x.States == BLL.Const.State_2).Count()
|
||||
+ Funs.DB.Meeting_ClassMeeting.Where(x => x.ProjectId == this.ProjectId && x.States == BLL.Const.State_2).Count()
|
||||
@@ -108,74 +97,21 @@ namespace FineUIPro.Web.DigData
|
||||
if (item == "CQMS")
|
||||
{
|
||||
this.gpCQMS.Hidden = false;
|
||||
//// 实体验收 资料验收
|
||||
var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail
|
||||
join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode
|
||||
where y.ProjectId == this.ProjectId && y.State == "8"
|
||||
select x;
|
||||
int all = getSpotCheckDetail.Count();
|
||||
// this.lbSpotCheck1.Text = all.ToString();
|
||||
int onesOKCount = getSpotCheckDetail.Where(x => x.IsOnesOK == true).Count(); //一次合格
|
||||
// this.lbSpotCheck2.Text= okCount.ToString();
|
||||
///质量验收问题整改率
|
||||
this.lbSpotCheckRate.Text = CQMSDataDWService.getSpotCheckRate(this.ProjectId);
|
||||
///控制点完成率
|
||||
this.lbSpotCheckDataRate.Text = CQMSDataDWService.getSpotCheckDataRate(this.ProjectId);
|
||||
|
||||
this.lbSpotCheckRate.Text = all > 0 ? Math.Round(onesOKCount * 100.0 / (all * 1.0)).ToString() + "%" : "0%";
|
||||
//// 质量检查问题整改率
|
||||
this.lbCheckControlStates.Text = CQMSDataDWService.getCheckControlStates(this.ProjectId);
|
||||
|
||||
/// 资料验收合格项目
|
||||
var getOKSpotCheckDetail = getSpotCheckDetail.Where(x => x.IsOK == true);
|
||||
int okYSCount = getOKSpotCheckDetail.Count(); //验收合格
|
||||
int okDateCount = getSpotCheckDetail.Where(x => x.IsDataOK == "1").Count(); //资料合格
|
||||
this.lbSpotCheckDataRate.Text = okYSCount > 0 ? Math.Round(okDateCount * 100.0 / (okYSCount * 1.0)).ToString() + "%" : "0%";
|
||||
|
||||
///实体质量问题整改率
|
||||
//int allNoOk = all - onesOKCount; ///问题数
|
||||
//int oKCount = getSpotCheckDetail.Where(x => x.IsOK == true).Count(); //合格数
|
||||
//int zgCount = oKCount - onesOKCount; ///整改数
|
||||
//this.lbSpotCheckOkRate.Text = allNoOk > 0 ? Math.Round(zgCount * 100.0 / (allNoOk * 1.0)).ToString() + "%" : "0%";
|
||||
|
||||
////控制点
|
||||
//var getControlItemAndCycle=from x in Funs.DB.WBS_ControlItemAndCycle
|
||||
// where x.ProjectId == this.ProjectId && x.WorkPackageId.Contains(workPackageId)
|
||||
// && (controlItemAndCycleId == null || x.WorkPackageId.Contains(controlItemAndCycleId))
|
||||
// && x.ControlPoint.Contains("A") && x.CheckNum >0
|
||||
// select x;
|
||||
/////A级控制点总量
|
||||
//int allControlItemCount = getControlItemAndCycle.Count();
|
||||
/////已完成A级控制点数
|
||||
//var getOKSpotCheckDetailCheckNum = from x in getOKSpotCheckDetail
|
||||
// group x by x.ControlItemAndCycleId
|
||||
// into g select new { g.First().ControlItemAndCycleId, num = g.Count() };
|
||||
|
||||
//var getOKControlItemAndCycle = from x in getControlItemAndCycle
|
||||
// join y in getOKSpotCheckDetailCheckNum on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
|
||||
// where x.CheckNum == y.num
|
||||
// select x;
|
||||
//int okControlItemCount= getOKControlItemAndCycle.Count();
|
||||
//this.lbControlItemRate.Text = allControlItemCount > 0 ? Math.Round(okControlItemCount * 100.0 / (allControlItemCount * 1.0)).ToString() + "%" : "0%";
|
||||
///焊接一次合格率
|
||||
this.lbFirstPassRate.Text = CQMSDataDWService.getFirstPassRate(this.ProjectId);
|
||||
}
|
||||
if (item == "JDGL")
|
||||
{
|
||||
this.gpJDGL.Hidden = false;
|
||||
|
||||
double totalSJCost = 0; ////累计实际费用
|
||||
decimal totalPlanCost = 0; ////计划费用
|
||||
var getViewWorkPackageParentDetail = from x in Funs.DB.View_WBS_WorkPackageParentDetail
|
||||
where x.ProjectId == this.ProjectId && (x.ParentId == "1" || x.ParentId == "2")
|
||||
select x;
|
||||
if (getViewWorkPackageParentDetail.Count() > 0)
|
||||
{
|
||||
totalSJCost = getViewWorkPackageParentDetail.Sum(x => x.TotalThisValue ?? 0);
|
||||
}
|
||||
|
||||
var getUnitWork = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.ProjectId select x;
|
||||
if (getUnitWork.Count() > 0)
|
||||
{
|
||||
totalPlanCost = getUnitWork.Sum(x => x.PlanCost ?? 0);
|
||||
}
|
||||
|
||||
///项目进度完成百分比
|
||||
decimal s = Convert.ToDecimal(totalSJCost);
|
||||
this.lbJDRate.Text = totalPlanCost > 0 ? Math.Round(s / totalPlanCost).ToString() + "%" : "0%";
|
||||
|
||||
this.lbJDRate.Text = JDGLDataDWService.getJDRate(this.ProjectId, null, null);
|
||||
}
|
||||
if (item == "HTGL")
|
||||
{
|
||||
|
||||
+4
-4
@@ -177,22 +177,22 @@ namespace FineUIPro.Web.DigData
|
||||
protected global::FineUIPro.Label lbSpotCheckDataRate;
|
||||
|
||||
/// <summary>
|
||||
/// Label2 控件。
|
||||
/// lbCheckControlStates 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label2;
|
||||
protected global::FineUIPro.Label lbCheckControlStates;
|
||||
|
||||
/// <summary>
|
||||
/// Label10 控件。
|
||||
/// lbFirstPassRate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label10;
|
||||
protected global::FineUIPro.Label lbFirstPassRate;
|
||||
|
||||
/// <summary>
|
||||
/// gpJDGL 控件。
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</Items>
|
||||
</f:GroupPanel>
|
||||
<f:GroupPanel runat="server" ID="gpHSSE" Title="安全数据" Layout="VBox" Hidden="true"
|
||||
Height="100px" AutoScroll="true">
|
||||
Height="120px" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" LabelWidth="180px">
|
||||
@@ -71,7 +71,7 @@
|
||||
</Items>
|
||||
</f:GroupPanel>
|
||||
<f:GroupPanel runat="server" ID="gpCQMS" Title="质量数据" Layout="VBox" Hidden="true"
|
||||
Height="150px" AutoScroll="true">
|
||||
Height="120px" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" LabelWidth="180px">
|
||||
@@ -86,18 +86,8 @@
|
||||
</f:Label>
|
||||
<f:Label ID="lbSpotCheckDataRate" runat="server" Label="施工资料同步率">
|
||||
</f:Label>
|
||||
<f:Label ID="Label2" runat="server" Label="质量问题数">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="lbControlItemRate" runat="server" Label="控制点完成率">
|
||||
</f:Label>
|
||||
<f:Label ID="Label1" runat="server" Label="质量检查问题整改率">
|
||||
</f:Label>
|
||||
<f:Label ID="lbSpotCheckOkRate" runat="server" Label="质量验收问题整改率">
|
||||
</f:Label>
|
||||
<f:Label ID="lbCheckControlCount" runat="server" Label="质量检查问题数量">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
|
||||
@@ -117,67 +117,29 @@ namespace FineUIPro.Web.DigData
|
||||
int okDateCount = getSpotCheckDetail.Where(x => x.IsDataOK == "1").Count(); //资料合格
|
||||
this.lbSpotCheckDataRate.Text = okYSCount > 0 ? Math.Round(okDateCount * 100.0 / (okYSCount * 1.0)).ToString() + "%" : "0%";
|
||||
|
||||
/////实体质量问题整改率
|
||||
//int allNoOk = all - onesOKCount; ///问题数
|
||||
//int oKCount = getSpotCheckDetail.Where(x => x.IsOK == true).Count(); //合格数
|
||||
//int zgCount = oKCount - onesOKCount; ///整改数
|
||||
//this.lbSpotCheckOkRate.Text = allNoOk > 0 ? Math.Round(zgCount * 100.0 / (allNoOk * 1.0)).ToString() + "%" : "0%";
|
||||
//// 质量检查问题整改率
|
||||
var getCheck_CheckControl = from x in Funs.DB.Check_CheckControl select x;
|
||||
|
||||
//////控制点
|
||||
//var getControlItemAndCycle = from x in Funs.DB.WBS_ControlItemAndCycle
|
||||
// where x.WorkPackageId.Contains(workPackageId)
|
||||
// && (controlItemAndCycleId == null || x.WorkPackageId.Contains(controlItemAndCycleId))
|
||||
// && x.ControlPoint.Contains("A") && x.CheckNum > 0
|
||||
// select x;
|
||||
/////A级控制点总量
|
||||
//int allControlItemCount = getControlItemAndCycle.Count();
|
||||
/////已完成A级控制点数
|
||||
//var getOKSpotCheckDetailCheckNum = from x in getOKSpotCheckDetail
|
||||
// group x by x.ControlItemAndCycleId
|
||||
// into g
|
||||
// select new { g.First().ControlItemAndCycleId, num = g.Count() };
|
||||
this.lbCheckControlCount.Text = getCheck_CheckControl.Count().ToString();
|
||||
|
||||
//var getOKControlItemAndCycle = from x in getControlItemAndCycle
|
||||
// join y in getOKSpotCheckDetailCheckNum on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
|
||||
// where x.CheckNum == y.num
|
||||
// select x;
|
||||
//int okControlItemCount = getOKControlItemAndCycle.Count();
|
||||
//this.lbControlItemRate.Text = allControlItemCount > 0 ? Math.Round(okControlItemCount * 100.0 / (allControlItemCount * 1.0)).ToString() + "%" : "0%";
|
||||
}
|
||||
if (item == "JDGL")
|
||||
{
|
||||
this.gpJDGL.Hidden = false;
|
||||
//double totalSJCost = 0; ////累计实际费用
|
||||
//decimal totalPlanCost = 0; ////计划费用
|
||||
//var getWorkPackageDetail = Funs.DB.View_WBS_WorkPackageDetail.FirstOrDefault(x => x.InitWorkPackageCode == workPackageId);
|
||||
//if (getWorkPackageDetail != null)
|
||||
//var getViewWorkPackageParentDetail = from x in Funs.DB.View_WBS_WorkPackageParentDetail
|
||||
// where (x.ParentId == "1" || x.ParentId == "2")
|
||||
// select x;
|
||||
//if (getViewWorkPackageParentDetail.Count() > 0)
|
||||
//{
|
||||
// ///末级节点
|
||||
// var getMaxSJCost = Funs.DB.View_WBS_WorkPackageDetail.Where(x => x.InitWorkPackageCode == workPackageId).OrderByDescending(x => x.Months).FirstOrDefault();
|
||||
// if (getMaxSJCost != null)
|
||||
// {
|
||||
// totalSJCost = getMaxSJCost.TotalThisValue ?? 0;
|
||||
// totalPlanCost = getMaxSJCost.PlanCost ?? 0;
|
||||
// }
|
||||
// totalSJCost = getViewWorkPackageParentDetail.Sum(x => x.TotalThisValue ?? 0);
|
||||
//}
|
||||
//else
|
||||
|
||||
//var getUnitWork = from x in Funs.DB.WBS_UnitWork select x;
|
||||
//if (getUnitWork.Count() > 0)
|
||||
//{
|
||||
// ///非末级节点
|
||||
// var getMaxSJCost = Funs.DB.View_WBS_WorkPackageParentDetail.Where(x => x.InitWorkPackageCode == workPackageId).OrderByDescending(x => x.Months).FirstOrDefault();
|
||||
// if (getMaxSJCost != null)
|
||||
// {
|
||||
// totalSJCost = getMaxSJCost.TotalThisValue ?? 0;
|
||||
// totalPlanCost = getMaxSJCost.PlanCost ?? 0;
|
||||
// }
|
||||
//}
|
||||
////// 根 节点 建筑工程 安装工程
|
||||
//if (workPackageId == "1" || workPackageId == "2")
|
||||
//{
|
||||
// var getUnitWorkByType = from x in Funs.DB.WBS_UnitWork where x.ProjectType == workPackageId select x;
|
||||
// if (getUnitWorkByType.Count() > 0)
|
||||
// {
|
||||
// totalPlanCost = getUnitWorkByType.Sum(x => x.PlanCost ?? 0);
|
||||
// }
|
||||
// totalPlanCost = getUnitWork.Sum(x => x.PlanCost ?? 0);
|
||||
//}
|
||||
|
||||
/////项目进度完成百分比
|
||||
|
||||
+2
-29
@@ -204,40 +204,13 @@ namespace FineUIPro.Web.DigData
|
||||
protected global::FineUIPro.Label lbSpotCheckDataRate;
|
||||
|
||||
/// <summary>
|
||||
/// Label2 控件。
|
||||
/// lbCheckControlCount 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// lbControlItemRate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbControlItemRate;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// lbSpotCheckOkRate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbSpotCheckOkRate;
|
||||
protected global::FineUIPro.Label lbCheckControlCount;
|
||||
|
||||
/// <summary>
|
||||
/// gpJDGL 控件。
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:NullReferenceException
|
||||
错误信息:未将对象引用设置到对象的实例。
|
||||
错误堆栈:
|
||||
在 BLL.HSEDataDWService.getProjecctSafeHours(String projectId) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\DigData\HSEDataDWService.cs:行号 79
|
||||
在 Read_<>f__AnonymousType92`7(ObjectMaterializer`1 )
|
||||
在 System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReader`2.MoveNext()
|
||||
在 (IEnumerator )
|
||||
在 FineUIPro.Grid.CRTRkdQFrrBRFQuCddjZPswlTORP(IEnumerable , Boolean )
|
||||
在 (Grid , IEnumerable , Boolean )
|
||||
在 FineUIPro.Grid.DataBind(Boolean keepCurrentData)
|
||||
在 (Grid , Boolean )
|
||||
在 FineUIPro.Grid.DataBind()
|
||||
在 FineUIPro.Web.DigData.HSEDataDW.BindGrid() 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\DigData\HSEDataDW.aspx.cs:行号 40
|
||||
在 FineUIPro.Web.DigData.HSEDataDW.Page_Load(Object sender, EventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\DigData\HSEDataDW.aspx.cs:行号 25
|
||||
在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
|
||||
在 System.EventHandler.Invoke(Object sender, EventArgs e)
|
||||
在 System.Web.UI.Control.OnLoad(EventArgs e)
|
||||
在 System.Web.UI.Control.LoadRecursive()
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:09/18/2023 10:52:05
|
||||
出错文件:http://localhost:8513/DigData/HSEDataDW.aspx
|
||||
IP地址:::1
|
||||
操作人员:JT
|
||||
|
||||
出错时间:09/18/2023 10:52:05
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:ThreadAbortException
|
||||
错误信息:正在中止线程。
|
||||
错误堆栈:
|
||||
在 System.Runtime.CompilerServices.RuntimeHelpers._CompileMethod(IRuntimeMethodInfo method)
|
||||
在 System.Reflection.Emit.DynamicMethod.CreateDelegate(Type delegateType, Object target)
|
||||
在 System.Linq.Expressions.Compiler.LambdaCompiler.CreateDelegate()
|
||||
在 System.Linq.Expressions.Compiler.LambdaCompiler.Compile(LambdaExpression lambda, DebugInfoGenerator debugInfoGenerator)
|
||||
在 System.Data.Linq.SqlClient.Funcletizer.Localizer.MakeLocal(Expression e)
|
||||
在 System.Data.Linq.SqlClient.Funcletizer.Localizer.Visit(Expression exp)
|
||||
在 System.Data.Linq.SqlClient.ExpressionVisitor.VisitBinary(BinaryExpression b)
|
||||
在 System.Data.Linq.SqlClient.ExpressionVisitor.Visit(Expression exp)
|
||||
在 System.Data.Linq.SqlClient.Funcletizer.Localizer.Visit(Expression exp)
|
||||
在 System.Data.Linq.SqlClient.ExpressionVisitor.VisitBinary(BinaryExpression b)
|
||||
在 System.Data.Linq.SqlClient.ExpressionVisitor.Visit(Expression exp)
|
||||
在 System.Data.Linq.SqlClient.Funcletizer.Localizer.Visit(Expression exp)
|
||||
在 System.Data.Linq.SqlClient.ExpressionVisitor.VisitLambda(LambdaExpression lambda)
|
||||
在 System.Data.Linq.SqlClient.ExpressionVisitor.Visit(Expression exp)
|
||||
在 System.Data.Linq.SqlClient.Funcletizer.Localizer.Visit(Expression exp)
|
||||
在 System.Data.Linq.SqlClient.ExpressionVisitor.VisitUnary(UnaryExpression u)
|
||||
在 System.Data.Linq.SqlClient.ExpressionVisitor.Visit(Expression exp)
|
||||
在 System.Data.Linq.SqlClient.Funcletizer.Localizer.Visit(Expression exp)
|
||||
在 System.Data.Linq.SqlClient.ExpressionVisitor.VisitExpressionList(ReadOnlyCollection`1 original)
|
||||
在 System.Data.Linq.SqlClient.ExpressionVisitor.VisitMethodCall(MethodCallExpression m)
|
||||
在 System.Data.Linq.SqlClient.ExpressionVisitor.Visit(Expression exp)
|
||||
在 System.Data.Linq.SqlClient.Funcletizer.Localizer.Visit(Expression exp)
|
||||
在 System.Data.Linq.SqlClient.ExpressionVisitor.VisitExpressionList(ReadOnlyCollection`1 original)
|
||||
在 System.Data.Linq.SqlClient.ExpressionVisitor.VisitMethodCall(MethodCallExpression m)
|
||||
在 System.Data.Linq.SqlClient.ExpressionVisitor.Visit(Expression exp)
|
||||
在 System.Data.Linq.SqlClient.Funcletizer.Localizer.Visit(Expression exp)
|
||||
在 System.Data.Linq.SqlClient.Funcletizer.Funcletize(Expression expression)
|
||||
在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
|
||||
在 System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression)
|
||||
在 System.Linq.Queryable.Count[TSource](IQueryable`1 source)
|
||||
在 BLL.GetDataService.CorrectingPersonInOutNumber(String projectId) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\OpenService\GetDataService.cs:行号 140
|
||||
在 BLL.MonitorService.DoSynchData() 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\OpenService\MonitorService.cs:行号 2129
|
||||
在 BLL.MonitorService.ColligateFormConfirmProcessEve(Object sender, ElapsedEventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\OpenService\MonitorService.cs:行号 110
|
||||
出错时间:09/18/2023 11:28:51
|
||||
出错时间:09/18/2023 11:28:51
|
||||
|
||||
|
||||
Reference in New Issue
Block a user