SVN r545
SVN-Revision: r545
This commit is contained in:
@@ -76,7 +76,7 @@ namespace Lskj.PubBomImport
|
||||
FileInfo childInfo = fileInfos.Where(n => n.Name.StartsWith(fileName)).FirstOrDefault();
|
||||
if (childInfo == null)
|
||||
{
|
||||
string fileSql = $"select webpath,sName from P_fm_FileTab where sName like '{fileName}%'";
|
||||
string fileSql = $"select webpath,sName from P_fm_FileTab where sName like '{fileName}%' and speciesno = '010106' and parentId in (select dirid from p_fm_directorytab where dllcoid = '1000202'";
|
||||
DataRow fileRow = BaseImpl.GetDataRowResult(fileSql);
|
||||
string webpath = fileRow != null ? fileRow["webpath"] + "" : "";
|
||||
string sName = fileRow != null ? fileRow["sName"] + "" : "";
|
||||
@@ -306,7 +306,7 @@ namespace Lskj.PubBomImport
|
||||
string fileName = (parentRow["图号"] + "").Trim();
|
||||
if (fileName.StartsWith("QD") || fileName.StartsWith("ZZQD"))
|
||||
{
|
||||
string fileSql = $"select webpath,sName from P_fm_FileTab where sName like '{fileName}%'";
|
||||
string fileSql = $"select webpath,sName from P_fm_FileTab where sName like '{fileName}%' and speciesno = '010106' and parentId in (select dirid from p_fm_directorytab where dllcoid = '1000202'";
|
||||
DataRow fileRow = BaseImpl.GetDataRowResult(fileSql);
|
||||
string webpath = fileRow != null ? fileRow["webpath"] + "" : "";
|
||||
string sName = fileRow != null ? fileRow["sName"] + "" : "";
|
||||
@@ -752,7 +752,7 @@ namespace Lskj.PubBomImport
|
||||
if (fileName.StartsWith("QD") || fileName.StartsWith("ZZQD"))
|
||||
{
|
||||
|
||||
string fileSql = $"select webpath,sName from P_fm_FileTab where sName like '{fileName}%'";
|
||||
string fileSql = $"select webpath,sName from P_fm_FileTab where sName like '{fileName}%' and speciesno = '010106' and parentId in (select dirid from p_fm_directorytab where dllcoid = '1000202')";
|
||||
DataRow fileRow = BaseImpl.GetDataRowResult(fileSql);
|
||||
string webpath = fileRow != null ? fileRow["webpath"] + "" : "";
|
||||
string sName = fileRow != null ? fileRow["sName"] + "" : "";
|
||||
@@ -1618,7 +1618,7 @@ namespace Lskj.PubBomImport
|
||||
int finishCount = (int)((decimal)(1 + childIndex) / (sourceTable.Rows.Count) * 100);
|
||||
Model = frmMain.Model;
|
||||
DataRow execRow = BaseImpl.GetDataRowResult($"select * from p_bomImportExecTab where isnull(success,0) = 0 and guid = '{execGuid}'");
|
||||
if (execRow != null)
|
||||
if (!string.IsNullOrEmpty(execGuid) && execRow != null)
|
||||
{
|
||||
string masterSql = execRow["masterSql"] + "";
|
||||
string detailSql = execRow["detailSql"] + "";
|
||||
@@ -1634,12 +1634,19 @@ namespace Lskj.PubBomImport
|
||||
if (result == 1)
|
||||
{
|
||||
BaseImpl.ExecSqlValue($"update p_bomImportExecTab set success = 1 where guid = '{execGuid}'");
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception($"保存Bom失败\r\n{tipMsg}");
|
||||
}
|
||||
}
|
||||
using (WebClient webClient = new WebClient())
|
||||
{
|
||||
try
|
||||
{
|
||||
int.TryParse(fileId, out int convertFileId);
|
||||
DataRow fileRow = BaseImpl.GetDataRowResult($"select webpath,sname from p_fm_filetab where fileId = '{fileId}'");
|
||||
if (fileRow != null)
|
||||
if (convertFileId > 0 && fileRow != null)
|
||||
{
|
||||
string webpath = fileRow["webpath"] + "";
|
||||
string sName = fileRow["sname"] + "";
|
||||
@@ -1649,10 +1656,6 @@ namespace Lskj.PubBomImport
|
||||
webClient.DownloadFile(url, tempFileName);
|
||||
bool isUpload = UploadFileToAudit(tempFileName, productid, "010106", out string msg, out string otherFieldId);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception($"Bom明细附件{productid}获取失败\r\nBom导入失败");
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
@@ -1660,12 +1663,6 @@ namespace Lskj.PubBomImport
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception($"保存Bom失败\r\n{tipMsg}");
|
||||
}
|
||||
}
|
||||
}
|
||||
this.DialogResult = DialogResult.OK;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in New Issue
Block a user