SVN-Revision: r783
This commit is contained in:
wyf
2025-06-25 03:36:04 +00:00
parent aac58256e6
commit 899c673146
2 changed files with 14 additions and 4 deletions
+1 -1
View File
@@ -1655,7 +1655,7 @@ namespace Lskj.PubBomImport
continue; continue;
} }
DataRow row = columnsTable.Rows.Cast<DataRow>().Where(x => (x["excelFieldName"] + "").Equals(headerName)).FirstOrDefault(); DataRow row = columnsTable.Rows.Cast<DataRow>().Where(x => (x["excelFieldName"] + "").Equals(headerName)).FirstOrDefault();
headerName = row != null ? row["clientFieldName"] + "" : headerName; headerName = row != null ? row["clientFieldName"] + "" : "";
if (string.IsNullOrWhiteSpace(headerName)) if (string.IsNullOrWhiteSpace(headerName))
{ {
continue; continue;
+13 -3
View File
@@ -59,6 +59,7 @@ namespace Lskj.PubBomImport
{ {
string fileName = selectRow[Model.AfterBomFieldName] + ""; string fileName = selectRow[Model.AfterBomFieldName] + "";
string dirPath = selectRow["BomFieldNameDir"] + ""; string dirPath = selectRow["BomFieldNameDir"] + "";
//string productId = selectRow["BomMxMainProduct"] + "";
FileInfo fileInfo = new FileInfo(dirPath); FileInfo fileInfo = new FileInfo(dirPath);
if (fileInfo != null) if (fileInfo != null)
{ {
@@ -1227,7 +1228,13 @@ namespace Lskj.PubBomImport
} }
if (labelRemark == null) if (labelRemark == null)
{ {
throw new Exception("变更数据异常,请检查"); this.Invoke(new Action(() =>
{
this.DialogResult = DialogResult.OK;
this.Close();
ImportTimer?.Dispose();
}));
return;
} }
string dirPath = labelRemark.filepath; string dirPath = labelRemark.filepath;
FileInfo parentInfo = null; FileInfo parentInfo = null;
@@ -1821,8 +1828,8 @@ namespace Lskj.PubBomImport
if (mxRow != null) if (mxRow != null)
{ {
string mxFileName = mxRow[Model.AfterBomFieldName] + ""; string mxFileName = mxRow[Model.AfterBomFieldName] + "";
string mxDirPath = mxRow["BomFieldNameDir"] + "";
string productId = mxRow["BomMxMainProduct"] + ""; string productId = mxRow["BomMxMainProduct"] + "";
string mxDirPath = mxRow["BomFieldNameDir"] + "";
string addState = mxRow["BomMxAddState"] + ""; string addState = mxRow["BomMxAddState"] + "";
if (string.IsNullOrEmpty(productId)) if (string.IsNullOrEmpty(productId))
{ {
@@ -3619,7 +3626,10 @@ namespace Lskj.PubBomImport
for (int j = firstRow.FirstCellNum; j < cellCount; j++) for (int j = firstRow.FirstCellNum; j < cellCount; j++)
{ {
ICell cell = row.GetCell(j); ICell cell = row.GetCell(j);
if (dataRow.Table.Columns.Count - 1 < dataRowIndex) break; if (dataRow.Table.Columns.Count - 1 < dataRowIndex)
{
break;
}
if (cell != null && cell.IsMergedCell) if (cell != null && cell.IsMergedCell)
{ {
CellRangeAddress mergrRange = FindMergedRegion(sheet, i, j); CellRangeAddress mergrRange = FindMergedRegion(sheet, i, j);