8efe030f47
为收敛当前分支代码范围并统一人员服务目录,移除历史模块与静态资源,减少无效代码和目录分散带来的维护成本。
124 lines
4.8 KiB
C#
124 lines
4.8 KiB
C#
using BLL;
|
|
using System;
|
|
using System.Data;
|
|
using System.Linq;
|
|
|
|
namespace FineUIPro.Web.DigData
|
|
{
|
|
public partial class WBSDW : PageBase
|
|
{
|
|
/// <summary>
|
|
/// 加载页面
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
}
|
|
}
|
|
|
|
protected void changeTree(object sender, EventArgs e)
|
|
{
|
|
this.hdWorkPackageCode.Text = this.ucTree.WorkPackageCode;
|
|
initControlItem();
|
|
}
|
|
|
|
|
|
protected void ckType_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
this.gpCQMS.Hidden = true;
|
|
this.gpLW.Hidden = true;
|
|
SetData();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 加载工作包
|
|
/// </summary>
|
|
protected void initControlItem()
|
|
{
|
|
var getControlItem = from x in Funs.DB.WBS_ControlItemInit
|
|
where x.WorkPackageCode == this.hdWorkPackageCode.Text
|
|
select x;
|
|
cblControlItem.DataValueField = "ControlItemCode";
|
|
cblControlItem.DataTextField = "ControlItemContent";
|
|
cblControlItem.DataSource = getControlItem;
|
|
cblControlItem.DataBind();
|
|
SetData();
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void cblControlItem_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
SetData();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 数据展示
|
|
/// </summary>
|
|
private void SetData()
|
|
{
|
|
string workPackageId = this.hdWorkPackageCode.Text;
|
|
string controlItemAndCycleId = this.cblControlItem.SelectedValue;
|
|
if (workPackageId == "1" || workPackageId == "2")
|
|
{
|
|
workPackageId = "Type" + workPackageId;
|
|
}
|
|
else
|
|
{
|
|
workPackageId = "[" + workPackageId + "]";
|
|
}
|
|
if (!string.IsNullOrEmpty(workPackageId))
|
|
{
|
|
foreach (var item in this.ckType.SelectedValueArray)
|
|
{
|
|
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 x.WorkPackageId.Contains(workPackageId) && y.State == "8"
|
|
select x;
|
|
if (!string.IsNullOrEmpty(controlItemAndCycleId))
|
|
{
|
|
getSpotCheckDetail = getSpotCheckDetail.Where(x => x.WorkPackageId.Contains(controlItemAndCycleId));
|
|
}
|
|
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 = all > 0 ? Math.Round(onesOKCount * 100.0 / (all * 1.0)).ToString() + "%" : "0%";
|
|
|
|
/// 资料验收合格项目
|
|
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%";
|
|
|
|
//// 质量检查问题整改率
|
|
var getCheck_CheckControl = from x in Funs.DB.Check_CheckControl
|
|
where x.WorkPackageId.Contains(workPackageId)
|
|
select x;
|
|
if (!string.IsNullOrEmpty(controlItemAndCycleId))
|
|
{
|
|
getCheck_CheckControl = getCheck_CheckControl.Where(x => x.WorkPackageId.Contains(controlItemAndCycleId));
|
|
}
|
|
this.lbCheckControlCount.Text = getCheck_CheckControl.Count().ToString();
|
|
|
|
}
|
|
if (item == "LW")
|
|
{
|
|
this.gpLW.Hidden = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|