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

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
@@ -29,18 +29,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage
public static List<HJGL_PipeLineMat> matList = new List<HJGL_PipeLineMat>();
public enum ButtonState { Check=0,Import=1,Save=2}
public enum ButtonState { Check = 0, Import = 1, Save = 2 }
public static int State;
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
@@ -93,7 +93,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
var table = this.GetPagedDataTable(Grid2, tb);
Grid2.DataSource = table;
Grid2.DataBind();
}
#region
@@ -153,7 +153,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
responeData.message = "导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列";
return responeData;
}
// DataRow[] dv = pds.Select("主项编号 <>'' and 管线号 <>'' and 材料编码 <>'' and 数量 <>''and 管线划分<>'' ");
// DataRow[] dv = pds.Select("主项编号 <>'' and 管线号 <>'' and 材料编码 <>'' and 数量 <>''and 管线划分<>'' ");
DataRow[] dv = pds.Select(" 管线号 <>'' and 材料编码 <>'' and 数量 <>'' ");
//导入数据库
@@ -168,7 +168,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
string unitworkId = string.Empty;
unitworkId = Request.Params["UnitWorkId"];
string PipeArea=string.Empty;//管线划分 1工厂预制 2现场施工
string PipeArea = string.Empty;//管线划分 1工厂预制 2现场施工
if (dv[i]["管线号"] != null && !string.IsNullOrEmpty(dv[i]["管线号"].ToString()))
{
@@ -176,7 +176,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (pipeline.Count() > 0)
{
item.PipelineId = pipeline.First().PipelineId;
PipeArea=pipeline.First().PipeArea;
PipeArea = pipeline.First().PipeArea;
}
else
{
@@ -261,7 +261,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
result.Add((i + 2) + "Line, [数量] 不能为空</br>");
}
if (PipeArea=="1")
if (PipeArea == "1")
{
if (dv[i]["预制组件"] != null && !string.IsNullOrEmpty(dv[i]["预制组件"].ToString()))
{
@@ -315,7 +315,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
if (result.Count > 0)
{
{
// result = result.Substring(0, result.LastIndexOf("|"));
errorInfos = string.Join("|", result.Distinct());
//Alert alert = new Alert();
@@ -325,14 +325,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
responeData.code = 0;
responeData.message = errorInfos;
}
return responeData;
}
private Model.ResponeData AddDatasetToSQL(List<dynamic> pds, int count)
{
Model.ResponeData responeData = new Model.ResponeData();
List<string> result = new List<string>();
if (count < 4)
{
responeData.code = 0;
@@ -373,7 +373,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
result.Add((i + 2) + "Line, [管线号] 不能为空</br>");
}
if (pds[i].C != null && !string.IsNullOrEmpty(pds[i].C.ToString()))
{
@@ -421,7 +421,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (!item.PrefabricatedComponents.Contains("-")) //预制组件关联的有图纸,图纸名称又是根据组件名称截取的
{
result.Add((i + 2) + "Line, [预制组件] 不合规</br>");
}
}
}
else
{
@@ -434,7 +434,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
matList.Add(item);
}
#endregion
}
@@ -533,7 +533,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// <param name="e"></param>
protected void btnImport_Click(object sender, EventArgs e)
{
if (State== (int)ButtonState.Check)
if (State == (int)ButtonState.Check)
{
ShowNotify("请先审核");
return;
@@ -655,12 +655,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning);
}
}
public void AddHJGL_PipeLineMat(List<HJGL_PipeLineMat> matList)
public void AddHJGL_PipeLineMat(List<HJGL_PipeLineMat> matList)
{
foreach (var item in matList)
{
var pipeLineMat = from x in Funs.DB.HJGL_PipeLineMat where x.MaterialCode == item.MaterialCode && x.PipelineId == item.PipelineId &&x.PrefabricatedComponents==item.PrefabricatedComponents select x;
if (pipeLineMat.Count() == 0|| pipeLineMat==null)
var pipeLineMat = from x in Funs.DB.HJGL_PipeLineMat where x.MaterialCode == item.MaterialCode && x.PipelineId == item.PipelineId && x.PrefabricatedComponents == item.PrefabricatedComponents select x;
if (pipeLineMat.Count() == 0 || pipeLineMat == null)
{
item.PipeLineMatId = SQLHelper.GetNewID(typeof(Model.HJGL_PipeLineMat));
BLL.PipelineMatService.AddPipeLineMat(item);
@@ -673,5 +673,5 @@ namespace FineUIPro.Web.HJGL.WeldingManage
BLL.HJGL_PipelineComponentService.SyncPipelineComponentByMatId(item.PipeLineMatId);
}
}
}
}
}