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

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
@@ -1,14 +1,11 @@
using BLL;
using MiniExcelLibs;
using Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Web;
namespace FineUIPro.Web.HJGL.PreDesign
@@ -16,7 +13,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
public partial class PrePipeline : PageBase
{
public int pageSize = 20;
public static DataTable GridDataTable=new DataTable ();
public static DataTable GridDataTable = new DataTable();
protected void Page_Load(object sender, EventArgs e)
{
@@ -24,11 +21,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.InitTreeMenu();//加载树
HJGL_PipelineComponentService.InitMainItemDownList(drpState,true);
HJGL_PipelineComponentService.InitMainItemDownProductionStateList(drpProductionState,true);
HJGL_PipelineComponentService.InitMainItemDownList(drpState, true);
HJGL_PipelineComponentService.InitMainItemDownProductionStateList(drpProductionState, true);
var pipeline = (from x in Funs.DB.HJGL_Pipeline
where x.ProjectId == this.CurrUser.LoginProjectId
where x.ProjectId == this.CurrUser.LoginProjectId
select x.FlowingSection).Distinct().ToList();
this.drpFlowingSection.DataTextField = "Value";
this.drpFlowingSection.DataValueField = "Value";
@@ -84,8 +81,8 @@ namespace FineUIPro.Web.HJGL.PreDesign
//}
//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)
@@ -98,7 +95,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
tn1.NodeID = q.UnitWorkId;
tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
tn1.ToolTip = "施工单位:" + unitNamesUnitIds;
tn1.CommandName = 1+"|"+Funs.GetEndPageNumber(a, pageSize);
tn1.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
tn1.EnableClickEvent = true;
tn1.EnableExpandEvent = true;
rootNode1.Nodes.Add(tn1);
@@ -149,18 +146,18 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
}
}
private void BindNodes(TreeNode node)
{
{
List<Model.HJGL_Pipeline> pipeline = new List<Model.HJGL_Pipeline>();
var pipelines = from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.PipeArea == "1" select x;
var pipelines = from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.PipeArea == "1" select x;
pipeline = (from x in pipelines
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
orderby x.PipelineCode
select x).ToList();
int pageindex =int.Parse(node.CommandName.Split('|')[0]);
int pageCount= int.Parse(node.CommandName.Split('|')[1]);
int pageindex = int.Parse(node.CommandName.Split('|')[0]);
int pageCount = int.Parse(node.CommandName.Split('|')[1]);
if (pageindex <= pageCount)
{
pipeline = pipeline.Skip(pageSize * (pageindex - 1)).Take(pageSize).ToList();
@@ -174,9 +171,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
newNode.NodeID = item.PipelineId;
newNode.EnableClickEvent = true;
node.Nodes.Add(newNode);
}
if (pageindex <pageCount)
if (pageindex < pageCount)
{
TreeNode newNode = new TreeNode();
newNode.Text = "加载";
@@ -187,8 +184,8 @@ namespace FineUIPro.Web.HJGL.PreDesign
node.Nodes.Add(newNode);
}
}
}
#endregion
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
@@ -222,7 +219,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
if (pipeline != null)
{
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID;
}
}
}
else if (e.CommandName == "加载")
{
@@ -241,9 +238,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 数据绑定
/// </summary>
private void BindGrid()
{
if (tvControlItem.SelectedNode==null) return;
if (tvControlItem.SelectedNode == null) return;
string strSql = @" SELECT distinct com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,com.Remark,
com.PipelineId, punit.UnitName AS PreUnit,aunit.UnitName AS AssembleUnit,com.IsPrint,
com.QRCode,com.State,com.ProductionState,pipe.PlanStartDate,pipe.FlowingSection,com.DrawingName,com.ReceiveDate,
@@ -264,14 +261,14 @@ namespace FineUIPro.Web.HJGL.PreDesign
listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
}
else if (tvControlItem.SelectedNode.CommandName=="管线")
else if (tvControlItem.SelectedNode.CommandName == "管线")
{
strSql += " and com.PipelineId = @PipelineId ";
listStr.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
}
if (drpWeldingDailyCode.SelectedValue!=Const._Null &&!string.IsNullOrEmpty(drpWeldingDailyCode.SelectedValue))
if (drpWeldingDailyCode.SelectedValue != Const._Null && !string.IsNullOrEmpty(drpWeldingDailyCode.SelectedValue))
{
strSql += " and joint.WeldingDailyId = @WeldingDailyId ";
listStr.Add(new SqlParameter("@WeldingDailyId", drpWeldingDailyCode.SelectedValue));
@@ -283,7 +280,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
listStr.Add(new SqlParameter("@PipelineComponentCode", "%" + this.txtPipelineComponentCode.Text.Trim() + "%"));
}
if (drpState.SelectedValue!=Const._Null)
if (drpState.SelectedValue != Const._Null)
{
strSql += " AND com.State =@State";
listStr.Add(new SqlParameter("@State", drpState.SelectedValue));
@@ -374,10 +371,10 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
HJGL_PipelineComponentService.UpdateIsPrint(Grid1.SelectedRowIDArray); //打印后修改打印状态
}
}
}
private bool Print(string[] PipelineComponentId)
{
{
BLL.FastReportService.ResetData();
var result = HJGL_PipelineComponentService.GetPrintModelByPipelineComponentIds(PipelineComponentId, null, false);
@@ -388,7 +385,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
else
{
ShowNotify("请查看组件是否上传二维码!", MessageBoxIcon.Question);
ShowNotify("请查看组件是否上传二维码!", MessageBoxIcon.Question);
return false;
}
BLL.FastReportService.AddFastreportTable(tb);
@@ -587,7 +584,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
return txt;
}
}
return StateName;
}
protected void btnImportQRCode_Click(object sender, EventArgs e)
@@ -606,7 +603,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
return;
}
var SingleName = (from x in Funs.DB.HJGL_Pipeline_Component where x.PipelineComponentId == id select (x.DrawingName)).FirstOrDefault();
var filemodel = BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName,"3", this.CurrUser.LoginProjectId);
var filemodel = BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName, "3", this.CurrUser.LoginProjectId);
if (filemodel != null)
{
string httpUrl = filemodel.FilePath;
@@ -624,19 +621,19 @@ namespace FineUIPro.Web.HJGL.PreDesign
protected void btnAccept_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIDArray.Length>0)
if (Grid1.SelectedRowIDArray.Length > 0)
{
foreach (var item in Grid1.SelectedRowIDArray)
{
var model = HJGL_PipelineComponentService.GetPipelineComponentById(item);
if (model.ProductionState==2)
if (model.ProductionState == 2)
{
BLL.APIPipelineComponentService.GetComponentConfirmArrival(PipelineComponentId: item, this.CurrUser.PersonId,""); ;
BLL.APIPipelineComponentService.GetComponentConfirmArrival(PipelineComponentId: item, this.CurrUser.PersonId, ""); ;
}
}
ShowNotify("操作成功",MessageBoxIcon.Success);
ShowNotify("操作成功", MessageBoxIcon.Success);
BindGrid();
}
else
@@ -672,20 +669,20 @@ namespace FineUIPro.Web.HJGL.PreDesign
protected void btnOut_Click(object sender, EventArgs e)
{
if (GridDataTable!=null)
if (GridDataTable != null)
{
var q = (from x in GridDataTable.AsEnumerable()
select new
{
= x.Field<string>("PipelineComponentCode"),
= x.Field<string>("BoxNumber"),
= ConvertState(x.Field<object>("State")),
= ConvertProductionState(x.Field<object>("ProductionState")),
线 = x.Field<DateTime?>("PlanStartDate"),
= x.Field<string>("DrawingName"),
= x.Field<string>("PersonName"),
= x.Field<DateTime?>("ReceiveDate"),
});
{
= x.Field<string>("PipelineComponentCode"),
= x.Field<string>("BoxNumber"),
= ConvertState(x.Field<object>("State")),
= ConvertProductionState(x.Field<object>("ProductionState")),
线 = x.Field<DateTime?>("PlanStartDate"),
= x.Field<string>("DrawingName"),
= x.Field<string>("PersonName"),
= x.Field<DateTime?>("ReceiveDate"),
});
string path = Funs.RootPath + @"File\Excel\Temp\PrePipeline.xlsx";
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
@@ -704,7 +701,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
File.Delete(path);
}
}
}