SVN-Revision: r729
This commit is contained in:
wyf
2025-06-13 10:11:07 +00:00
parent 63ffd1c539
commit ce0642fe61
+16 -3
View File
@@ -1186,11 +1186,16 @@ namespace Lskj.PubBomImport
}
string topProductId = "";
ControlModel topModel = StaticControl.RightMenuMyControl.ControlModels.Where(n => n.LabelText.Equals("顶级编码")).FirstOrDefault();
if (topModel == null)
if (topModel != null)
{
MessageUtil.Show($"顶级编码不存在");
topProductId = StaticControl.RightMenuMyControl.GetControlValue(topModel);
}
topProductId = StaticControl.RightMenuMyControl.GetControlValue(topModel);
if (string.IsNullOrEmpty(topProductId))
{
MessageUtil.Show($"顶级编码不能为空");
}
DataTable dataTable = SqlHelper.ExecuteDataTable($"select * from FileAttachmentMapping where MaterialCode = '{topProductId}'");
GetFileCodeInfo(beforeName, out string beforeSourceCode, out string beforeSourceName, out string beforeSourceBB, out int beforeSourceBC);
List<LabelRemarkEdit> labelRemarkList = new List<LabelRemarkEdit>();
List<ControlModel> uploadModels = StaticControl.RightMenuMyControl.ControlModels.Where(n => n.FileUploadControl).ToList();
@@ -1221,6 +1226,10 @@ namespace Lskj.PubBomImport
continue;
}
parentInfo = new FileInfo(dirPath);
//if (true)
//{
//}
//如果是QD文件
if (parentInfo != null && (parentInfo.Name.Trim().StartsWith("QD")))
{
@@ -1533,6 +1542,10 @@ namespace Lskj.PubBomImport
{
//throw new Exception($"MX明细中不包含文件{childCode}");
GetFileCodeInfo(childCode, out string childsourceCode, out string childsourceName, out string childsourceBB, out int childsourceBC);
if (childsourceBC > 0)
{
throw new Exception($"{childsourceCode}的版次为{childsourceBC},版次不允许大于0");
}
if (childCode.StartsWith("QD"))
{
DataRow childRow = childTable.NewRow();