提交代码

This commit is contained in:
2023-11-23 18:52:01 +08:00
parent 1530dd850b
commit 56fe58fe54
19 changed files with 326 additions and 170 deletions
+14 -5
View File
@@ -53,6 +53,7 @@ namespace FineUIPro.Web.HJGL.NDT
{
GetButtonPower();
this.Type = Request.Params["Type"];
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);
this.txtNDEDateMonth.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.TrustBatchId = string.Empty;
@@ -148,8 +149,8 @@ namespace FineUIPro.Web.HJGL.NDT
//}
//else
//{
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
//}
if (unitWork1.Count() > 0)
@@ -195,7 +196,7 @@ namespace FineUIPro.Web.HJGL.NDT
private void BindNodes(TreeNode node)
{ ///&& x.TrustType == (this.Type == "R" ? "R" : null)
var p = from x in Funs.DB.HJGL_Batch_BatchTrust
where x.UnitWorkId == node.NodeID && Equals(x.TrustType, (this.Type == "R" ? "R" : null))
where x.UnitWorkId == node.NodeID && Equals(x.TrustType, (this.Type == "R" ? "R" : null))
&& x.TrustDate < Convert.ToDateTime(this.txtNDEDateMonth.Text.Trim() + "-01").AddMonths(1)
&& x.TrustDate >= Convert.ToDateTime(this.txtNDEDateMonth.Text.Trim() + "-01")
select x;
@@ -264,6 +265,10 @@ namespace FineUIPro.Web.HJGL.NDT
&& x.DetectionTypeId == ndtTypeId && x.DetectionRateId == item.DetectionRateId
orderby x.TrustBatchCode descending
select x;
if (this.drpUnit.SelectedValue != BLL.Const._Null)
{
trusts = trusts.Where(x => x.UnitId == this.drpUnit.SelectedValue).OrderBy(x => x.TrustBatchCode);
}
if (item.DetectionRateValue > 0) //探伤比例为0的批不显示
{
TreeNode newNode = new TreeNode();
@@ -300,6 +305,10 @@ namespace FineUIPro.Web.HJGL.NDT
&& x.DetectionTypeId == ndtTypeId && x.DetectionRateId == ndtRateId
orderby x.TrustBatchCode descending
select x;
if (this.drpUnit.SelectedValue != BLL.Const._Null)
{
trusts = trusts.Where(x => x.UnitId == this.drpUnit.SelectedValue).OrderBy(x => x.TrustBatchCode);
}
foreach (var trust in trusts)
{
TreeNode newNode = new TreeNode();
@@ -318,11 +327,11 @@ namespace FineUIPro.Web.HJGL.NDT
Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(trust.PointBatchId);
if (batch != null && batch.IsClosed == true)
{
newNode.Text = code;
newNode.Text = code + "【" + BLL.UnitService.GetUnitNameByUnitId(trust.UnitId) + "】";
}
else
{
newNode.Text = "<font color='#EE0000'>" + code + "</font>";
newNode.Text = "<font color='#EE0000'>" + code + "【" + BLL.UnitService.GetUnitNameByUnitId(trust.UnitId) + "】" + "</font>";
}
}
else