This commit is contained in:
2026-06-12 14:54:42 +08:00
parent 8632ef62d5
commit b52bab4c84
@@ -80,7 +80,8 @@ namespace FineUIPro.Web.HJGL.HotProessManage
protected void btnAudit_Click(object sender, EventArgs e) protected void btnAudit_Click(object sender, EventArgs e)
{ {
bool isEmptyPostHeatingDate = false; bool isEmptyPostHeatingDate = false;//后热日期是否为空
bool isEmptyHotData = false;//热处理数据
string message = string.Empty; string message = string.Empty;
errorInfos = string.Empty; errorInfos = string.Empty;
try try
@@ -179,7 +180,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
{ {
errorInfos += (i + 2) + "行, [施工号、管线号和焊口号] 不能为空|"; errorInfos += (i + 2) + "行, [施工号、管线号和焊口号] 不能为空|";
} }
if(ds.Tables[0].Rows[i]["后热日期"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["后热日期"].ToString())) if (ds.Tables[0].Rows[i]["后热日期"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["后热日期"].ToString()))
{ {
try try
{ {
@@ -193,12 +194,12 @@ namespace FineUIPro.Web.HJGL.HotProessManage
} }
else else
{ {
isEmptyPostHeatingDate = false; //isEmptyPostHeatingDate = false;
errorInfos += (i + 2) + "行, [后热日期]或热处理数据,不能为空|"; //errorInfos += (i + 2) + "行, [后热日期]或热处理数据,不能为空|";
} }
if (ds.Tables[0].Rows[i]["测温点编号"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["测温点编号"].ToString())) if (ds.Tables[0].Rows[i]["测温点编号"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["测温点编号"].ToString()))
{ {
isEmptyHotData = true;
} }
else else
{ {
@@ -210,6 +211,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (ds.Tables[0].Rows[i]["热处理温度℃(要求)"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["热处理温度℃(要求)"].ToString())) if (ds.Tables[0].Rows[i]["热处理温度℃(要求)"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["热处理温度℃(要求)"].ToString()))
{ {
isEmptyHotData = true;
} }
else else
{ {
@@ -221,6 +223,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (ds.Tables[0].Rows[i]["热处理温度℃(实际)"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["热处理温度℃(实际)"].ToString())) if (ds.Tables[0].Rows[i]["热处理温度℃(实际)"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["热处理温度℃(实际)"].ToString()))
{ {
isEmptyHotData = true;
} }
else else
{ {
@@ -232,6 +235,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (ds.Tables[0].Rows[i]["恒温时间h(要求)"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["恒温时间h(要求)"].ToString())) if (ds.Tables[0].Rows[i]["恒温时间h(要求)"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["恒温时间h(要求)"].ToString()))
{ {
isEmptyHotData = true;
} }
else else
{ {
@@ -243,6 +247,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (ds.Tables[0].Rows[i]["恒温时间h(实际)"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["恒温时间h(实际)"].ToString())) if (ds.Tables[0].Rows[i]["恒温时间h(实际)"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["恒温时间h(实际)"].ToString()))
{ {
isEmptyHotData = true;
} }
else else
{ {
@@ -257,10 +262,11 @@ namespace FineUIPro.Web.HJGL.HotProessManage
try try
{ {
DateTime date = Convert.ToDateTime(ds.Tables[0].Rows[i]["热处理日期"].ToString()); DateTime date = Convert.ToDateTime(ds.Tables[0].Rows[i]["热处理日期"].ToString());
isEmptyHotData = true;
} }
catch (Exception) catch (Exception)
{ {
errorInfos += (i + 2) + "行, [热处理日期] 必须为日期型|"; errorInfos += (i + 2) + "行, [热处理日期] 必须为日期型|";
} }
} }
else else
@@ -273,6 +279,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (ds.Tables[0].Rows[i]["记录曲线图编号"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["记录曲线图编号"].ToString())) if (ds.Tables[0].Rows[i]["记录曲线图编号"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["记录曲线图编号"].ToString()))
{ {
isEmptyHotData = true;
} }
else else
{ {
@@ -284,6 +291,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (ds.Tables[0].Rows[i]["热电偶数量/个"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["热电偶数量/个"].ToString())) if (ds.Tables[0].Rows[i]["热电偶数量/个"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["热电偶数量/个"].ToString()))
{ {
isEmptyHotData = true;
} }
else else
{ {
@@ -295,6 +303,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (ds.Tables[0].Rows[i]["加热范围/mm"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["加热范围/mm"].ToString())) if (ds.Tables[0].Rows[i]["加热范围/mm"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["加热范围/mm"].ToString()))
{ {
isEmptyHotData = true;
} }
else else
{ {
@@ -306,6 +315,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (ds.Tables[0].Rows[i]["保温范围/mm"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["保温范围/mm"].ToString())) if (ds.Tables[0].Rows[i]["保温范围/mm"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["保温范围/mm"].ToString()))
{ {
isEmptyHotData = true;
} }
else else
{ {
@@ -317,6 +327,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (ds.Tables[0].Rows[i]["保温厚度/mm"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["保温厚度/mm"].ToString())) if (ds.Tables[0].Rows[i]["保温厚度/mm"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["保温厚度/mm"].ToString()))
{ {
isEmptyHotData = true;
} }
else else
{ {
@@ -332,6 +343,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
{ {
DateTime date = Convert.ToDateTime(ds.Tables[0].Rows[i]["热处理开始时间"].ToString()); DateTime date = Convert.ToDateTime(ds.Tables[0].Rows[i]["热处理开始时间"].ToString());
stockIn.ReviewDate = date; stockIn.ReviewDate = date;
isEmptyHotData = true;
} }
catch (Exception) catch (Exception)
{ {
@@ -352,6 +364,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
{ {
DateTime date = Convert.ToDateTime(ds.Tables[0].Rows[i]["热处理完成时间"].ToString()); DateTime date = Convert.ToDateTime(ds.Tables[0].Rows[i]["热处理完成时间"].ToString());
stockIn.ReviewDate = date; stockIn.ReviewDate = date;
isEmptyHotData = true;
} }
catch (Exception) catch (Exception)
{ {
@@ -365,6 +378,10 @@ namespace FineUIPro.Web.HJGL.HotProessManage
errorInfos += (i + 2) + "行, [热处理完成时间] 不能为空|"; errorInfos += (i + 2) + "行, [热处理完成时间] 不能为空|";
} }
} }
if (isEmptyPostHeatingDate == false && isEmptyHotData == false)
{
errorInfos += (i + 2) + "行, [后热日期或热处理数据] 不能为空|";
}
#endregion #endregion
} }
if (!string.IsNullOrEmpty(errorInfos)) if (!string.IsNullOrEmpty(errorInfos))