20240430 质量综合管理导入导出

This commit is contained in:
2024-04-30 23:33:49 +08:00
parent 475d273bc5
commit 5a47e8145b
106 changed files with 2666 additions and 498 deletions
@@ -175,7 +175,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
where x.IsSpecial == true
select x;
for (int i = 0; i < ir; i++)
for (int i = 1; i < ir; i++)
{
string row0 = pds.Rows[i][0].ToString();
if (string.IsNullOrEmpty(row0))
@@ -275,6 +275,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|";
}
else
{
try
{
int t = Convert.ToInt32(row8);
}
catch (Exception)
{
result += (i + 2).ToString() + "," + "标志编号" + "," + "[" + row8 + "]错误!" + "|";
}
}
}
if (!string.IsNullOrEmpty(result))
{
@@ -421,12 +432,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
where x.IsSpecial == true
select x;
for (int i = 0; i < ir; i++)
for (int i = 1; i < ir; i++)
{
Model.Comprehensive_SpecialEquipment oldViewInfo = new Model.Comprehensive_SpecialEquipment();
string row0 = pds.Rows[i][0].ToString().Trim();
string row1 = pds.Rows[i][1].ToString().Trim();
oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == pds.Rows[i][8].ToString().Trim()
oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == Funs.GetNewInt(pds.Rows[i][8].ToString().Trim())
).FirstOrDefault();
if (oldViewInfo == null)
{
@@ -441,7 +452,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
des.MonitoringReportNumber = Funs.GetNewInt(pds.Rows[i][5].ToString().Trim());
des.PositionNum = pds.Rows[i][6].ToString().Trim();
des.ReportTime = Funs.GetNewDateTime(pds.Rows[i][7].ToString().Trim());
des.RemarkCode = pds.Rows[i][8].ToString().Trim();
des.RemarkCode = Funs.GetNewInt(pds.Rows[i][8].ToString().Trim());
des.CompileMan = this.CurrUser.UserId;
des.Status = BLL.Const.Comprehensive_Compile;
BLL.SpecialEquipmentServices.AddEquipment(des);