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

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,11 +1,8 @@
using BLL;
using MiniExcelLibs;
using Model;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.IO;
using System.Linq;
@@ -65,7 +62,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
Pipeline_ComponentList.Clear();
}
errorInfos = string.Empty;
}
}
#endregion
@@ -130,11 +127,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData(string fileName)
{
// var rows =Funs.LINQToDataTable(MiniExcel.Query(fileName).ToList()) ;
// var rows =Funs.LINQToDataTable(MiniExcel.Query(fileName).ToList()) ;
var rows = MiniExcel.QueryAsDataTable(fileName, useHeaderRow: true);
Model.ResponeData responeData = new Model.ResponeData();
responeData = AddDatasetToSQL(rows, 3);
if (responeData.code==1)
if (responeData.code == 1)
{
ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
}
@@ -164,7 +161,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
Model.ResponeData responeData = new Model.ResponeData();
//string result = string.Empty;
List<string> result = new List<string> () ;
List<string> result = new List<string>();
int ic, ir;
ic = pds.Columns.Count;
ir = pds.Rows.Count;
@@ -198,7 +195,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
if (pipeline == null)
{
//result += "第" + (i + 2).ToString() + "行," + "不存在此管线号" + "|";
result.Add("不存在此管线号-"+ pipelinecode);
result.Add("不存在此管线号-" + pipelinecode);
continue;
}
}
@@ -217,13 +214,13 @@ namespace FineUIPro.Web.HJGL.PreDesign
continue;
}
}
}
if (result.Count>0)
}
if (result.Count > 0)
{
PipelineList.Clear();
// result = result.Substring(0, result.LastIndexOf("|"));
errorInfos = string .Join("|", result.Distinct()) ;
// result = result.Substring(0, result.LastIndexOf("|"));
errorInfos = string.Join("|", result.Distinct());
//Alert alert = new Alert();
//alert.Message = result;
//alert.Target = Target.Self;
@@ -235,23 +232,24 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
var dt = pds.AsEnumerable()
.GroupBy(x => new {
.GroupBy(x => new
{
pipelinecode = x.Field<string>("管线号"),
PipelineComponentCode = x.Field<string>("预制组件"),
// DrawingName = x.Field<string>("预制图纸名称"),
// DrawingName = x.Field<string>("预制图纸名称"),
})
.Select(x => new
{
pipelinecode = x.Key.pipelinecode,
PipelineComponentCode = x.Key.PipelineComponentCode,
// DrawingName = x.Key.DrawingName,
// DrawingName = x.Key.DrawingName,
QRCode = String.Join(";", x.Select(z => z.Field<string>("二维码信息")))
});
foreach (var item in dt)
{
var pipeline = PipelineService.GetPipelineByPipelineCode(this.CurrUser.LoginProjectId,item.pipelinecode.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""));
var hJGL_Pipeline_Component = HJGL_PipelineComponentService.GetPipelineComponentByCodeandpipelineId(item.PipelineComponentCode.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""), pipeline.PipelineId);
if (hJGL_Pipeline_Component!=null)
var pipeline = PipelineService.GetPipelineByPipelineCode(this.CurrUser.LoginProjectId, item.pipelinecode.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""));
var hJGL_Pipeline_Component = HJGL_PipelineComponentService.GetPipelineComponentByCodeandpipelineId(item.PipelineComponentCode.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""), pipeline.PipelineId);
if (hJGL_Pipeline_Component != null)
{
//model.Pipeline_ComponentQRCodeRootName rootName = new model.Pipeline_ComponentQRCodeRootName();
//rootName.QRCode = new List<model.Pipeline_ComponentQRCodeQRCodeItem>();
@@ -267,9 +265,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
hJGL_Pipeline_Component.QRCode = item.QRCode;
Pipeline_ComponentList.Add(hJGL_Pipeline_Component);
}
}
errorInfos = string.Empty;
@@ -345,10 +343,10 @@ namespace FineUIPro.Web.HJGL.PreDesign
var joint = BLL.WeldJointService.GetWeldJointsByWeldJointCode(item.PipelineId, QRCodeitem.Substring(1));
if (joint != null)
{
var ComponetJoint = BLL.HJGL_PipelineComponentjointService.GetHJGL_Pipeline_ComponentJointByWeldJointId(joint.WeldJointId);
if (ComponetJoint!=null)
var ComponetJoint = BLL.HJGL_PipelineComponentjointService.GetHJGL_Pipeline_ComponentJointByWeldJointId(joint.WeldJointId);
if (ComponetJoint != null)
{
ComponetJoint.PipelineComponentCode= item.PipelineComponentCode;
ComponetJoint.PipelineComponentCode = item.PipelineComponentCode;
ComponetJoint.PipelineComponentId = item.PipelineComponentId;
HJGL_PipelineComponentjointService.UpdateHJGL_Pipeline_ComponentJoint(ComponetJoint);
}
@@ -359,12 +357,12 @@ namespace FineUIPro.Web.HJGL.PreDesign
hJGL_Pipeline_ComponentJoint.PipelineComponentCode = item.PipelineComponentCode;
hJGL_Pipeline_ComponentJoint.PipelineComponentId = item.PipelineComponentId;
hJGL_Pipeline_ComponentJoint.WeldJointCode = joint.WeldJointCode;
hJGL_Pipeline_ComponentJoint.WeldJointId=joint.WeldJointId;
hJGL_Pipeline_ComponentJoint.WeldJointId = joint.WeldJointId;
hJGL_Pipeline_ComponentJoint.State = 0;
HJGL_PipelineComponentjointService.AddHJGL_Pipeline_ComponentJoint(hJGL_Pipeline_ComponentJoint);
}
}
}
}