20230901事故记录加wbs挂载字段

This commit is contained in:
2023-09-01 11:07:05 +08:00
parent ba6774dbae
commit 0f0da8e8bf
7 changed files with 51 additions and 94 deletions
+15 -9
View File
@@ -1,4 +1,5 @@
using BLL;
using FineUIPro.Web.CQMS.WBS;
using System;
using System.Data;
using System.Linq;
@@ -21,15 +22,7 @@ namespace FineUIPro.Web.DigData
protected void changeTree(object sender, EventArgs e)
{
this.hdWorkPackageCode.Text = this.ucTree.WorkPackageCode;
//新增UnitId
//this.UnitId = this.ucTree.UnitId;
////判断 当有WorkPackageCode的时候单位id为空
//if (!string.IsNullOrEmpty(this.WorkPackageCode))
//{
// this.UnitId = "";
//}
// this.BindGrid();
this.hdWorkPackageCode.Text = this.ucTree.WorkPackageCode;
initControlItem();
}
@@ -59,12 +52,23 @@ namespace FineUIPro.Web.DigData
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;
@@ -83,6 +87,7 @@ namespace FineUIPro.Web.DigData
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
&& (controlItemAndCycleId == null || x.WorkPackageId.Contains(controlItemAndCycleId))
select x).Count().ToString();
}
if (item == "CQMS")
@@ -91,6 +96,7 @@ namespace FineUIPro.Web.DigData
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
&& (controlItemAndCycleId == null || x.WorkPackageId.Contains(controlItemAndCycleId))
select x;
int all = getDetail.Count();
this.lbSpotCheck1.Text = all.ToString();