修改穿透页面

This commit is contained in:
2023-06-09 07:45:49 +08:00
parent a82f96f3d2
commit 10d032e347
3 changed files with 68 additions and 30 deletions
@@ -122,6 +122,20 @@ namespace FineUIPro.Web.DataShow
}
#endregion
/// <summary>
/// 定义变量
/// </summary>
private static IQueryable<Model.QualityAcceptanceItem> getDataItemLists = from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
join z in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals z.BreakdownProjectId
select new Model.QualityAcceptanceItem
{
InspectionDetailId = x.InspectionDetailId,
ProjectId = z.ProjectId,
CheckAcceptType = z.CheckAcceptType,
IsOnceQualified = y.IsOnceQualified
};
/// <summary>
/// 数量
/// </summary>
@@ -132,11 +146,7 @@ namespace FineUIPro.Web.DataShow
int cout1 = 0;
if (projectId != null)
{
var getT = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
join z in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals z.BreakdownProjectId
where z.ProjectId == projectId.ToString() && z.CheckAcceptType == this.rbType.SelectedValue
select x).Distinct().ToList();
var getT = getDataItemLists.Where(x => x.ProjectId == projectId.ToString() && x.CheckAcceptType == this.rbType.SelectedValue).Distinct().ToList();
cout1 = getT.Count();
}
return cout1;
@@ -152,11 +162,7 @@ namespace FineUIPro.Web.DataShow
int cout1 = 0;
if (projectId != null)
{
var getT = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
join z in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals z.BreakdownProjectId
where z.ProjectId == projectId.ToString() && z.CheckAcceptType == this.rbType.SelectedValue && y.IsOnceQualified == true
select x).Distinct().ToList();
var getT = getDataItemLists.Where(x => x.ProjectId == projectId.ToString() && x.CheckAcceptType == this.rbType.SelectedValue && x.IsOnceQualified == true).Distinct().ToList();
cout1 = getT.Count();
}
return cout1;
@@ -172,16 +178,8 @@ namespace FineUIPro.Web.DataShow
int cout1 = 0;
if (projectId != null)
{
var getT1 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
join z in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals z.BreakdownProjectId
where z.ProjectId == projectId.ToString() && z.CheckAcceptType == this.rbType.SelectedValue
select x).Distinct().ToList();
var getT2 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
join z in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals z.BreakdownProjectId
where z.ProjectId == projectId.ToString() && z.CheckAcceptType == this.rbType.SelectedValue && y.IsOnceQualified == true
select x).Distinct().ToList();
var getT1 = getDataItemLists.Where(x => x.ProjectId == projectId.ToString() && x.CheckAcceptType == this.rbType.SelectedValue).Distinct().ToList();
var getT2 = getDataItemLists.Where(x => x.ProjectId == projectId.ToString() && x.CheckAcceptType == this.rbType.SelectedValue && x.IsOnceQualified == true).Distinct().ToList();
cout1 = getT1.Count() - getT2.Count();
}
return cout1;
@@ -197,16 +195,8 @@ namespace FineUIPro.Web.DataShow
string rate = string.Empty;
if (projectId != null)
{
var getT1 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
join z in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals z.BreakdownProjectId
where z.ProjectId == projectId.ToString() && z.CheckAcceptType == this.rbType.SelectedValue
select x).Distinct().ToList();
var getT2 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
join z in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals z.BreakdownProjectId
where z.ProjectId == projectId.ToString() && z.CheckAcceptType == this.rbType.SelectedValue && y.IsOnceQualified == true
select x).Distinct().ToList();
var getT1 = getDataItemLists.Where(x => x.ProjectId == projectId.ToString() && x.CheckAcceptType == this.rbType.SelectedValue).Distinct().ToList();
var getT2 = getDataItemLists.Where(x => x.ProjectId == projectId.ToString() && x.CheckAcceptType == this.rbType.SelectedValue && x.IsOnceQualified == true).Distinct().ToList();
if (getT1.Count() > 0)
{
rate = Math.Round(getT2.Count() * 1.0 / getT1.Count() * 100, 2).ToString();