代码无效引用清理,试压包资料界面看板修改

This commit is contained in:
2025-10-10 14:33:21 +08:00
parent 87fb529521
commit 55b798135c
933 changed files with 5897 additions and 7541 deletions
@@ -14,7 +14,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
public int pageSize = PipelineService.pageSize;
//public Dictionary<string, string> dicSeclectPipeLine = new Dictionary<string, string>();
//public static List<Model.Tw_PipeMatMatchOutput> tw_PipeMatMatchOutputs ;
public static decimal Rate = 0;
public static decimal Rate = 0;
public string WarehouseCode
{
get
@@ -77,7 +77,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
if (!IsPostBack)
{
tw_PipeMatMatchOutputs=new List<Model.Tw_PipeMatMatchOutput>();
tw_PipeMatMatchOutputs = new List<Model.Tw_PipeMatMatchOutput>();
PipeArea = Request.Params["PipeArea"];
if (PipeArea == "2")
{
@@ -89,10 +89,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
HJGL_MaterialService.materialStockItems_FIELD = new List<Model.MaterialStockItem>();
HJGL_MaterialService.materialStockItems_SHOP = new List<Model.MaterialStockItem>();
dicSeclectPipeLine=new Dictionary<string, string>();
dicSeclectPipeLine = new Dictionary<string, string>();
var pipeline = (from x in Funs.DB.HJGL_Pipeline
where x.ProjectId == this.CurrUser.LoginProjectId
select x.FlowingSection).Distinct().ToList();
where x.ProjectId == this.CurrUser.LoginProjectId
select x.FlowingSection).Distinct().ToList();
this.drpFlowingSection.DataTextField = "Value";
this.drpFlowingSection.DataValueField = "Value";
this.drpFlowingSection.DataSource = pipeline;
@@ -150,15 +150,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//}
//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)
{
foreach (var q in unitWork1)
{
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == PipeArea select x).Count();
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
TreeNode tn1 = new TreeNode();
@@ -183,7 +183,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
foreach (var q in unitWork2)
{
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == PipeArea select x).Count();
// var NowComPipelineCode = PipelineService.GetNoComPipelinesByUnitWordId(q.UnitWorkId);
// var NowComPipelineCode = PipelineService.GetNoComPipelinesByUnitWordId(q.UnitWorkId);
//int a = NowComPipelineCode.Count();
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
TreeNode tn2 = new TreeNode();
@@ -196,9 +196,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
tn2.ToolTip = "施工单位:" + unitNamesUnitIds;
tn2.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
tn2.EnableExpandEvent = true;
tn2.EnableClickEvent= true;
tn2.EnableClickEvent = true;
tn2.EnableCheckBox = false;
rootNode2.Nodes.Add(tn2);
if (a > 0)
{
@@ -220,15 +220,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//}
var CompleteInOutPlanDetail_RelationList = from x in Funs.DB.Tw_InOutPlanDetail_Relation
join y in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals y.Id
where y.State==(int)TwConst.State. && y.WarehouseCode == WarehouseCode
select x;
join y in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals y.Id
where y.State == (int)TwConst.State. && y.WarehouseCode == WarehouseCode
select x;
var pipeline = (from x in Funs.DB.HJGL_Pipeline
join y in CompleteInOutPlanDetail_RelationList on x.PipelineId equals y.PipelineId into temp
from y in temp.DefaultIfEmpty()
where y == null && x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
from y in temp.DefaultIfEmpty()
where y == null && x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
orderby x.PipelineCode
select x).ToList();
if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.SelectedValue != Const._Null)
@@ -253,10 +253,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
continue;
}*/
TreeNode newNode = new TreeNode();
newNode.Text = item.PipelineCode ;
newNode.Text = item.PipelineCode;
newNode.NodeID = item.PipelineId;
newNode.CommandName = "管线";
newNode.EnableClickEvent = true;
newNode.EnableClickEvent = true;
node.Nodes.Add(newNode);
}
if (pageindex < pageCount)
@@ -306,7 +306,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
else
{
// this.BindGrid();
// this.BindGrid();
}
}
@@ -331,7 +331,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
// 2.获取当前分页数据
Grid1.DataSource = dt;
Grid1.DataBind();
}
}
void BindGrid2()
{
//var result = tw_PipeMatMatchOutputs
@@ -362,16 +362,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Rate = Math.Round((decimal)output.Average(item => item.MatchRate) * 100, 2);
lbRate.Text = "匹配率:" + Rate.ToString() + "%";
}*/
var selectList = new List<string>() ;
var selectList = new List<string>();
for (int i = 0; i < Grid2.Rows.Count; i++)
{
var model = Grid2.Rows[i].DataItem as Tw_PipeMatchOutput;
if (model.MatchRate >=1)
if (model.MatchRate >= 1)
{
Grid2.Rows[i].RowCssClass = "green";
selectList.Add(model.PipelineId);
}
else
{
@@ -381,7 +381,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
if (cbSelectCom.Checked)
{
Grid2.SelectedRowIDArray= selectList.ToArray();
Grid2.SelectedRowIDArray = selectList.ToArray();
}
}
@@ -430,11 +430,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
var model = Grid1.Rows[i].DataItem as Tw_PipeMatMatchOutput;
if (model?.MatchRate < 1 || model?.MatchRate==null)
if (model?.MatchRate < 1 || model?.MatchRate == null)
{
Grid1.Rows[i].RowCssClass = "red";
}
}
}
@@ -562,10 +562,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
protected void btnAddPipelineMatchMat_Click(object sender, EventArgs e)
{
var selectNodes= tvControlItem.GetCheckedNodes();
var selectNodes = tvControlItem.GetCheckedNodes();
foreach (var node in selectNodes)
{
if (dicSeclectPipeLine.Where(x => x.Key == node.NodeID).Count() == 0 && node.CommandName== "管线")
{
if (dicSeclectPipeLine.Where(x => x.Key == node.NodeID).Count() == 0 && node.CommandName == "管线")
{
dicSeclectPipeLine.Add(node.NodeID, node.Text);
}
@@ -573,7 +573,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
tw_PipeMatMatchOutputs = TwArrivalStatisticsService.GetPipeMatMatch(this.CurrUser.LoginProjectId, dicSeclectPipeLine.Keys.ToList(), WarehouseCode);
BindGrid3();
BindGrid2();
BindGrid2();
}
protected void btnDeletePipelineMatchMat_Click(object sender, EventArgs e)
@@ -594,31 +594,32 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
protected void btnGenTask_Click(object sender, EventArgs e)
{ if (Grid2.SelectedRowIDArray.Count() > 0)
{
if (Grid2.SelectedRowIDArray.Count() > 0)
{
SaveTask();
ShowNotify("生成任务单成功!", MessageBoxIcon.Warning);
// Alert.Show("生成任务单成功!", MessageBoxIcon.Warning);
Grid1.DataSource = null;
Grid1.DataBind();
Grid2.DataSource = null;
Grid2.DataBind();
Grid3.DataSource = null;
Grid3.DataBind();
// Alert.Show("生成任务单成功!", MessageBoxIcon.Warning);
Grid1.DataSource = null;
Grid1.DataBind();
Grid2.DataSource = null;
Grid2.DataBind();
Grid3.DataSource = null;
Grid3.DataBind();
}
else
{
ShowNotify("请先选择需要发起任单的管线!", MessageBoxIcon.Warning);
}
}
private void SaveTask()
{
var weldingRods = from x in Funs.DB.Base_Consumables where x.ConsumablesType == "2" select x;
var weldingWires = from x in Funs.DB.Base_Consumables where x.ConsumablesType == "1" select x;
var selectRowId = (from x in Funs.DB.View_HJGL_NoWeldJointFind
where Grid2.SelectedRowIDArray.ToList().Contains(x.PipelineId) && x.WeldingDailyId == null &&
x.WeldTaskId == null && x.WeldingMethodCode != null
where Grid2.SelectedRowIDArray.ToList().Contains(x.PipelineId) && x.WeldingDailyId == null &&
x.WeldTaskId == null && x.WeldingMethodCode != null
select x).ToList();
Dictionary<string, string> unitworkTaskCode = new Dictionary<string, string>();
@@ -626,9 +627,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Dictionary<int, string> matchPipeline = new Dictionary<int, string>();
foreach (var rowIndex in Grid2.SelectedRowIndexArray)
{
matchPipeline.Add(rowIndex+1, Grid2.Rows[rowIndex].RowID);
matchPipeline.Add(rowIndex + 1, Grid2.Rows[rowIndex].RowID);
}
if (PipeArea=="1") //工厂预制的管线,则只选择预制口
if (PipeArea == "1") //工厂预制的管线,则只选择预制口
{
selectRowId = selectRowId.Where(x => x.JointAttribute == "预制口").ToList();
}
@@ -640,14 +641,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
NewTask.ProjectId = this.CurrUser.LoginProjectId;
NewTask.UnitWorkId = PipelineService.GetPipelineByPipelineId(weldjoint.PipelineId)?.UnitWorkId;
NewTask.UnitId = this.CurrUser.UnitId;
if (unitworkTaskCode.FirstOrDefault(x=>x.Key== NewTask.UnitWorkId).Value!=null)
if (unitworkTaskCode.FirstOrDefault(x => x.Key == NewTask.UnitWorkId).Value != null)
{
NewTask.TaskCode = unitworkTaskCode.FirstOrDefault(x => x.Key == NewTask.UnitWorkId).Value;
}
else
{
NewTask.TaskCode = BLL.WeldTaskService.GetTaskCodeByDate(this.CurrUser.LoginProjectId, DateTime.Now.Date.ToString("yyyy-MM-dd"), NewTask.UnitWorkId, this.CurrUser.UnitId);
unitworkTaskCode.Add(NewTask.UnitWorkId, NewTask.TaskCode);
unitworkTaskCode.Add(NewTask.UnitWorkId, NewTask.TaskCode);
}
if (unitworkSerialNumber.FirstOrDefault(x => x.Key == NewTask.UnitWorkId).Value != null)
@@ -661,7 +662,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
NewTask.WeldTaskId = SQLHelper.GetNewID();
NewTask.WeldJointId = weldjoint.WeldJointId;
NewTask.WeldJointId = weldjoint.WeldJointId;
var oldWeldTask = BLL.WeldTaskService.GetWeldTaskByWeldJointId(NewTask.WeldJointId);
if (oldWeldTask != null)
{
@@ -671,7 +672,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Model.HJGL_WeldJoint weldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(NewTask.WeldJointId);
if (weldJoint != null)
{
NewTask.PipeLineSortIndex = matchPipeline.FirstOrDefault(x => x.Value == weldJoint.PipelineId).Key;
NewTask.PipeLineSortIndex = matchPipeline.FirstOrDefault(x => x.Value == weldJoint.PipelineId).Key;
NewTask.WeldingRod = weldJoint.WeldingRod;
NewTask.WeldingWire = weldJoint.WeldingWire;
//获取可替代焊丝焊条
@@ -738,7 +739,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
BLL.WeldJointService.UpdateWeldJoint(weldJoint);
BLL.WeldTaskService.AddWeldTask(NewTask);
}
}
private bool IsCoverClass(string wpsClass, string matClass)
{