焊接管理导入修改
This commit is contained in:
@@ -238,7 +238,93 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
pipeline.UnitId = unitWork.UnitId;
|
||||
}
|
||||
|
||||
string col0 = pds[i].A;
|
||||
string col0 = Convert.ToString(pds[i].A);
|
||||
string col1 = Convert.ToString(pds[i].B);
|
||||
string col2 = Convert.ToString(pds[i].C);
|
||||
string col3 = Convert.ToString(pds[i].D);
|
||||
string col4 = Convert.ToString(pds[i].E);
|
||||
string col5 = Convert.ToString(pds[i].F);
|
||||
string col6 = Convert.ToString(pds[i].G);
|
||||
string col19 = Convert.ToString(pds[i].U);
|
||||
string col20 = Convert.ToString(pds[i].V);
|
||||
string col21 = Convert.ToString(pds[i].W);
|
||||
string col22 = Convert.ToString(pds[i].X);
|
||||
string col23 = Convert.ToString(pds[i].Y);
|
||||
string col24 = Convert.ToString(pds[i].Z);
|
||||
string col25 = Convert.ToString(pds[i].AA);
|
||||
string col26 = Convert.ToString(pds[i].AB);
|
||||
string col27 = Convert.ToString(pds[i].AC);
|
||||
bool hasRequiredError = false;
|
||||
Action<string> addRequiredError = colName =>
|
||||
{
|
||||
result.Add("第" + (i + 1).ToString() + "行," + colName + "," + "此项为必填项!" + "|");
|
||||
hasRequiredError = true;
|
||||
};
|
||||
|
||||
if (string.IsNullOrEmpty(col0))
|
||||
{
|
||||
addRequiredError("管线号");
|
||||
}
|
||||
if (string.IsNullOrEmpty(col3))
|
||||
{
|
||||
addRequiredError("介质代号");
|
||||
}
|
||||
if (string.IsNullOrEmpty(col4))
|
||||
{
|
||||
addRequiredError("管道等级");
|
||||
}
|
||||
if (string.IsNullOrEmpty(col5))
|
||||
{
|
||||
addRequiredError("探伤比例");
|
||||
}
|
||||
if (string.IsNullOrEmpty(col6))
|
||||
{
|
||||
addRequiredError("探伤类型");
|
||||
}
|
||||
if (string.IsNullOrEmpty(col19))
|
||||
{
|
||||
addRequiredError("焊口号");
|
||||
}
|
||||
if (string.IsNullOrEmpty(col20))
|
||||
{
|
||||
addRequiredError("材质1");
|
||||
}
|
||||
if (string.IsNullOrEmpty(col21))
|
||||
{
|
||||
addRequiredError("材质2");
|
||||
}
|
||||
if (rbDiaType.SelectedValue == "1")
|
||||
{
|
||||
if (string.IsNullOrEmpty(col27))
|
||||
{
|
||||
addRequiredError("外径");
|
||||
}
|
||||
}
|
||||
else if (string.IsNullOrEmpty(col22))
|
||||
{
|
||||
addRequiredError("DN公称直径");
|
||||
}
|
||||
if (string.IsNullOrEmpty(col23))
|
||||
{
|
||||
addRequiredError("达因");
|
||||
}
|
||||
if (string.IsNullOrEmpty(col24))
|
||||
{
|
||||
addRequiredError("壁厚");
|
||||
}
|
||||
if (string.IsNullOrEmpty(col25))
|
||||
{
|
||||
addRequiredError("焊缝类型");
|
||||
}
|
||||
if (string.IsNullOrEmpty(col26))
|
||||
{
|
||||
addRequiredError("焊口属性");
|
||||
}
|
||||
if (hasRequiredError)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
string pipeLineId = string.Empty;
|
||||
if (string.IsNullOrEmpty(col0))
|
||||
{
|
||||
@@ -249,10 +335,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
pipeline.PipelineCode = col0;
|
||||
}
|
||||
|
||||
pipeline.SingleNumber = pds[i].B;
|
||||
pipeline.SingleName = pds[i].C;
|
||||
pipeline.SingleNumber = col1;
|
||||
pipeline.SingleName = col2;
|
||||
|
||||
string col3 = pds[i].D;
|
||||
if (string.IsNullOrEmpty(col3))
|
||||
{
|
||||
result.Add("第" + (i + 1).ToString() + "行," + "介质代号" + "," + "此项为必填项!" + "|");
|
||||
@@ -271,7 +356,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
pipeline.MediumName = col3;
|
||||
}
|
||||
}
|
||||
string col4 = pds[i].E;
|
||||
if (string.IsNullOrEmpty(col4))
|
||||
{
|
||||
result.Add("第" + (i + 1).ToString() + "行," + "管道等级" + "," + "此项为必填项!" + "|");
|
||||
@@ -290,7 +374,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
pipeline.PipingClassCode = col4;
|
||||
}
|
||||
}
|
||||
string col5 = pds[i].F;
|
||||
if (!string.IsNullOrEmpty(col5))
|
||||
{
|
||||
var DetectionRate = getDetectionRate.FirstOrDefault(x => x.DetectionRateValue.ToString() == col5.Replace("%", "") || x.DetectionRateCode == col5);
|
||||
@@ -310,7 +393,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
result.Add("第" + (i + 1).ToString() + "行," + "探伤比例" + "," + "此项为必填项!" + "|");
|
||||
}
|
||||
|
||||
string col6 = pds[i].G;
|
||||
if (!string.IsNullOrEmpty(col6))
|
||||
{
|
||||
string typeStr = col6.ToString();
|
||||
@@ -449,7 +531,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
pipeline.Remark = Convert.ToString(pds[i].T);
|
||||
|
||||
// 以下是焊口信息
|
||||
string col19 = Convert.ToString(pds[i].U);
|
||||
if (string.IsNullOrEmpty(col19))
|
||||
{
|
||||
result.Add("第" + (i + 1).ToString() + "行," + "焊口号" + "," + "此项为必填项!" + "|");
|
||||
@@ -468,12 +549,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
pipeline.WeldJointCode = col19;
|
||||
}
|
||||
|
||||
string col20 = "";
|
||||
if (pds[i].V != null)
|
||||
{
|
||||
col20 = pds[i].V.ToString();
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col20))
|
||||
{
|
||||
var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col20);
|
||||
@@ -493,12 +568,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
result.Add("第" + (i + 1).ToString() + "行," + "材质1" + "," + "此项为必填项!" + "|");
|
||||
}
|
||||
|
||||
string col21 = "";
|
||||
if (pds[i].W != null)
|
||||
{
|
||||
col21 = pds[i].W.ToString();
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col21))
|
||||
{
|
||||
var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col21);
|
||||
@@ -518,12 +587,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
result.Add("第" + (i + 1).ToString() + "行," + "材质2" + "," + "此项为必填项!" + "|");
|
||||
}
|
||||
|
||||
string col22 = Convert.ToString(pds[i].X);
|
||||
string col27 = "";
|
||||
if (pds[i].AC != null)
|
||||
{
|
||||
col27 = pds[i].AC.ToString();
|
||||
}
|
||||
if (rbDiaType.SelectedValue == "1")
|
||||
{
|
||||
if (!string.IsNullOrEmpty(col27))
|
||||
@@ -564,7 +627,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
|
||||
|
||||
var col23 = Convert.ToString(pds[i].Y);
|
||||
if (col23 != null)
|
||||
{
|
||||
try
|
||||
@@ -582,7 +644,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
result.Add("第" + (i + 1).ToString() + "行," + "达因" + "," + "此项为必填项!" + "|");
|
||||
}
|
||||
|
||||
var col24 = Convert.ToString(pds[i].Z);
|
||||
if (col24 != null)
|
||||
{
|
||||
// var Thickness = Convert.ToDecimal(col24);
|
||||
@@ -641,7 +702,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
|
||||
}
|
||||
|
||||
string col25 = Convert.ToString(pds[i].AA);
|
||||
if (!string.IsNullOrEmpty(col25))
|
||||
{
|
||||
var weldType = getWeldType.FirstOrDefault(x => x.WeldTypeCode == col25);
|
||||
@@ -699,7 +759,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
result.Add("第" + (i + 1).ToString() + "行," + "焊缝类型" + "," + "此项为必填项!" + "|");
|
||||
}
|
||||
string col26 = Convert.ToString(pds[i].AB);
|
||||
if (!string.IsNullOrEmpty(col26))
|
||||
{
|
||||
var JointAttribute = BLL.DropListService.HJGL_JointAttribute();
|
||||
@@ -1324,4 +1383,4 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user