20230831 WBS
This commit is contained in:
@@ -6,22 +6,7 @@ using System.Linq;
|
||||
namespace FineUIPro.Web.DigData
|
||||
{
|
||||
public partial class WBSDW : PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string WorkPackageCode
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["WorkPackageCode"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["WorkPackageCode"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
@@ -30,15 +15,13 @@ namespace FineUIPro.Web.DigData
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
////权限按钮方法
|
||||
this.ucTree.WorkPackageCode = this.WorkPackageCode;
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.WorkPackageCode = this.ucTree.WorkPackageCode;
|
||||
this.hdWorkPackageCode.Text = this.ucTree.WorkPackageCode;
|
||||
//新增UnitId
|
||||
//this.UnitId = this.ucTree.UnitId;
|
||||
////判断 当有WorkPackageCode的时候单位id为空
|
||||
@@ -58,29 +41,7 @@ namespace FineUIPro.Web.DigData
|
||||
this.gpJDGL.Hidden = true;
|
||||
this.gpHTGL.Hidden = true;
|
||||
this.gpLW.Hidden = true;
|
||||
foreach (var item in this.ckType.SelectedValueArray)
|
||||
{
|
||||
if (item == "HSSE")
|
||||
{
|
||||
this.gpHSSE.Hidden = false;
|
||||
}
|
||||
if (item == "CQMS")
|
||||
{
|
||||
this.gpCQMS.Hidden = false;
|
||||
}
|
||||
if (item == "JDGL")
|
||||
{
|
||||
this.gpJDGL.Hidden = false;
|
||||
}
|
||||
if (item == "HTGL")
|
||||
{
|
||||
this.gpHTGL.Hidden = false;
|
||||
}
|
||||
if (item == "LW")
|
||||
{
|
||||
this.gpLW.Hidden = false;
|
||||
}
|
||||
}
|
||||
SetData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -88,11 +49,71 @@ namespace FineUIPro.Web.DigData
|
||||
/// </summary>
|
||||
protected void initControlItem()
|
||||
{
|
||||
var getControlItem = from x in Funs.DB.WBS_ControlItemInit where x.WorkPackageCode == this.WorkPackageCode select x;
|
||||
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();
|
||||
cblControlItem.DataBind();
|
||||
SetData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 数据展示
|
||||
/// </summary>
|
||||
private void SetData()
|
||||
{
|
||||
string workPackageId = this.hdWorkPackageCode.Text;
|
||||
if (workPackageId == "1" || workPackageId == "2")
|
||||
{
|
||||
workPackageId = "Type" + workPackageId;
|
||||
}
|
||||
else
|
||||
{
|
||||
workPackageId="["+ workPackageId + "]";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(workPackageId))
|
||||
{
|
||||
foreach (var item in this.ckType.SelectedValueArray)
|
||||
{
|
||||
if (item == "HSSE")
|
||||
{
|
||||
this.gpHSSE.Hidden = false;
|
||||
this.lbExpertArgument.Text = (from x in Funs.DB.Solution_LargerHazardListItem
|
||||
join y in Funs.DB.Solution_LargerHazardList on x.LargerHazardListId equals y.LargerHazardListId
|
||||
where x.WorkPackageId.Contains(workPackageId) && y.States == Const.State_1
|
||||
select x).Count().ToString();
|
||||
}
|
||||
if (item == "CQMS")
|
||||
{
|
||||
this.gpCQMS.Hidden = false;
|
||||
var getDetail = 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.States == Const.State_1
|
||||
select x;
|
||||
int all = getDetail.Count();
|
||||
this.lbSpotCheck1.Text = all.ToString();
|
||||
|
||||
int okCount = getDetail.Where(x => x.IsOK == true).Count();
|
||||
this.lbSpotCheck2.Text = okCount.ToString();
|
||||
|
||||
this.lbSpotCheck.Text = all > 0 ? Math.Round(okCount * 1.0 / (all * 1.0)).ToString() : "0";
|
||||
}
|
||||
if (item == "JDGL")
|
||||
{
|
||||
this.gpJDGL.Hidden = false;
|
||||
}
|
||||
if (item == "HTGL")
|
||||
{
|
||||
this.gpHTGL.Hidden = false;
|
||||
}
|
||||
if (item == "LW")
|
||||
{
|
||||
this.gpLW.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user