SVN-Revision: r686
This commit is contained in:
wyf
2025-06-06 05:13:24 +00:00
parent 7806d6aa4c
commit 8c07d0a2c7
+12 -12
View File
@@ -366,7 +366,6 @@ namespace Lskj.PubBomImport
if (fileInfo != null)
{
DataRow maxRow = maxfileRowDic.ContainsKey(fileInfo.Name) ? maxfileRowDic[fileInfo.Name] : null;
string uploadFileId = "";
if (maxRow != null)//如果存在则不允许上传
{
throw new Exception("已存在附件无法新增");
@@ -383,7 +382,7 @@ namespace Lskj.PubBomImport
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileInfo.Name).Trim();
GetOtherFileCodeInfo(fileInfo.Name, out string code, out string spec, out string name, out string extension, out string bb, out int bc);
SetProcessBar(0, allCount);
bool isUpload = UploadFileToAudit(fileInfo.FullName, code, speciesno, out string msg, out uploadFileId);
bool isUpload = UploadFileToAudit(fileInfo.FullName, code, speciesno, out string msg, out string uploadFileId);
if (!isUpload)
{
throw new Exception($"{fileNameWithoutExtension}附件上传失败\r\n{msg}");
@@ -394,18 +393,15 @@ namespace Lskj.PubBomImport
{
selectRow["qms_laddf_uploadtag"] = 1;
}
if (selectRow.Table.Columns.Contains("qms_laddf_FileId"))
{
int.TryParse(uploadFileId, out int qms_laddf_FileId);
selectRow["qms_laddf_FileId"] = qms_laddf_FileId;
}
}));
SetProcessBar(100, finishCount);
SetProcessLabelAllMsg($"总进度:{nowCount + 1}/{selectRows.Count + 1}");
}
StaticControl.RightMenuGridView.GridControl.Invoke(new Action(() =>
{
if (selectRow.Table.Columns.Contains("qms_laddf_FileId"))
{
int.TryParse(uploadFileId, out int qms_laddf_FileId);
selectRow["qms_laddf_FileId"] = qms_laddf_FileId;
}
}));
}
else
{
@@ -503,6 +499,10 @@ namespace Lskj.PubBomImport
}
StaticControl.RightMenuGridView.GridControl.Invoke(new Action(() =>
{
if (selectRow.Table.Columns.Contains("qms_laddf_uploadtag"))
{
selectRow["qms_laddf_uploadtag"] = 1;
}
if (selectRow.Table.Columns.Contains("qms_laddf_FileId"))
{
int.TryParse(uploadFileId, out int qms_laddf_FileId);
@@ -568,6 +568,7 @@ namespace Lskj.PubBomImport
FrmBillInfo frmBillInfo = new FrmBillInfo();
string bomOtherAddMode = selectRows[0]["qms_laddf_mode"] + "";
string speciesno = selectRows[0]["BomAddSpeciesNo"] + "";
string productId = selectRows[0]["BomMxMainProduct"] + "";
string oldProductId = selectRows[0]["BomAddOldProductId"] + "";
GridControlEx gridControlEx = null;
if (StaticControl.BomUnionPage != null && StaticControl.BomUnionPage.Tag is GridControlEx gridDetailControl)
@@ -626,7 +627,7 @@ namespace Lskj.PubBomImport
}
else
{
if (!oldProductId.Trim().Equals(code))
if (!productId.Trim().Equals(code))
{
throw new Exception($"{fileInfo.Name}\r\n编码与文件名不匹配");
}
@@ -668,7 +669,6 @@ namespace Lskj.PubBomImport
frmMain.FirstRowIndex = index;
foreach (DataRow selectRow in selectRows)
{
string productId = selectRow["BomMxMainProduct"] + "";
int childIndex = selectRows.IndexOf(selectRow);
int nowCount = 1 + childIndex;
int allCount = (int)((decimal)(1 + childIndex) / (selectRows.Count + 1) * 100);