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