焊接优化
This commit is contained in:
@@ -204,9 +204,8 @@ namespace FineUIPro.Web.CheckManage
|
||||
//单号
|
||||
string ndtTypeId = e.Node.NodeID.Split('|')[0];
|
||||
var checks = (from x in Funs.DB.View_Batch_NDE
|
||||
where x.NDEDate < Convert.ToDateTime(this.txtNDEDateMonth.Text.Trim() + "-01").AddMonths(1)
|
||||
&& x.NDEDate >= Convert.ToDateTime(this.txtNDEDateMonth.Text.Trim() + "-01").AddMonths(-1)
|
||||
&& x.ProjectId == this.CurrUser.LoginProjectId && x.NDECode.Contains(this.txtSearchCode.Text.Trim())
|
||||
where
|
||||
x.ProjectId == this.CurrUser.LoginProjectId && x.NDECode.Contains(this.txtSearchCode.Text.Trim())
|
||||
&& x.InstallationId.ToString() == e.Node.NodeID.Split('|')[1]
|
||||
&& x.UnitId == e.Node.ParentNode.ParentNode.NodeID
|
||||
&& x.DetectionTypeId == ndtTypeId
|
||||
@@ -217,6 +216,15 @@ namespace FineUIPro.Web.CheckManage
|
||||
var q = (from x in Funs.DB.View_NoReportNdt select x.NDEID).ToList().Distinct();
|
||||
checks = checks.Where(x => q.Contains(x.NDEID)).ToList();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtSearchCode.Text.Trim()))
|
||||
{
|
||||
checks=checks.Where(x => x.NDECode.Contains(this.txtSearchCode.Text.Trim())).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
checks = checks.Where(x => x.NDEDate < Convert.ToDateTime(this.txtNDEDateMonth.Text.Trim() + "-01").AddMonths(1)
|
||||
&& x.NDEDate >= Convert.ToDateTime(this.txtNDEDateMonth.Text.Trim() + "-01").AddMonths(-1)).ToList();
|
||||
}
|
||||
foreach (var check in checks)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
|
||||
@@ -156,9 +156,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
|
||||
//单号
|
||||
string ndtTypeId = node.NodeID.Split('|')[0];
|
||||
var repairs = (from x in Funs.DB.View_RepairRecord
|
||||
where x.NoticeDate < Convert.ToDateTime(this.txtRepairMonth.Text.Trim() + "-01").AddMonths(1)
|
||||
&& x.NoticeDate >= Convert.ToDateTime(this.txtRepairMonth.Text.Trim() + "-01").AddMonths(-1)
|
||||
&& x.ProjectId == this.CurrUser.LoginProjectId && x.RepairRecordCode.Contains(this.txtSearchCode.Text.Trim())
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.RepairRecordCode.Contains(this.txtSearchCode.Text.Trim())
|
||||
&& x.InstallationId.ToString() == node.NodeID
|
||||
&& x.UnitId == node.ParentNode.NodeID
|
||||
orderby x.RepairRecordCode descending
|
||||
@@ -171,7 +169,16 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
|
||||
{
|
||||
repairs = repairs.Where(x => x.TrustBatchItemId != null).ToList();
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtSearchCode.Text.Trim()))
|
||||
{
|
||||
repairs = repairs.Where(x => x.RepairRecordCode.Contains(this.txtSearchCode.Text.Trim())).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
repairs = repairs.Where(x => x.NoticeDate < Convert.ToDateTime(this.txtRepairMonth.Text.Trim() + "-01").AddMonths(1)
|
||||
&& x.NoticeDate >= Convert.ToDateTime(this.txtRepairMonth.Text.Trim() + "-01").AddMonths(-1)
|
||||
).ToList();
|
||||
}
|
||||
foreach (var r in repairs)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
|
||||
Reference in New Issue
Block a user