SVN r551
SVN-Revision: r551
This commit is contained in:
@@ -27,6 +27,7 @@ using System.Text.RegularExpressions;
|
|||||||
using Lskj.Util;
|
using Lskj.Util;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using Lskj.Control.Model;
|
using Lskj.Control.Model;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
|
||||||
namespace Lskj.PubBomImport
|
namespace Lskj.PubBomImport
|
||||||
{
|
{
|
||||||
@@ -1507,7 +1508,12 @@ namespace Lskj.PubBomImport
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
string execGuid = sourceRow["qms_wjgg_uuid"] + "";
|
string execGuid = sourceRow["qms_wjgg_uuid"] + "";
|
||||||
|
string productid = sourceRow["qms_wjgg_productid"] + "";
|
||||||
|
int.TryParse(sourceRow["fileId"] + "", out int copyFileId);
|
||||||
|
int.TryParse(sourceRow["qms_wjgg_fileId"] + "", out int coverFileId);
|
||||||
|
int.TryParse(sourceRow["qms_wjgg_iscover"] + "", out int coverTag);
|
||||||
Model = frmMain.Model;
|
Model = frmMain.Model;
|
||||||
DataRow execRow = BaseImpl.GetDataRowResult($"select * from p_bomImportExecTab where isnull(success,0) = 0 and guid = '{execGuid}'");
|
DataRow execRow = BaseImpl.GetDataRowResult($"select * from p_bomImportExecTab where isnull(success,0) = 0 and guid = '{execGuid}'");
|
||||||
if (execRow != null)
|
if (execRow != null)
|
||||||
@@ -1526,12 +1532,21 @@ namespace Lskj.PubBomImport
|
|||||||
if (result == 1)
|
if (result == 1)
|
||||||
{
|
{
|
||||||
BaseImpl.ExecSqlValue($"update p_bomImportExecTab set success = 1 where guid = '{execGuid}'");
|
BaseImpl.ExecSqlValue($"update p_bomImportExecTab set success = 1 where guid = '{execGuid}'");
|
||||||
|
List<SqlParameter> sqlParamList = new List<SqlParameter>();
|
||||||
|
sqlParamList.Add(new SqlParameter("@copyFileId", SqlDbType.Int) { Value = copyFileId });
|
||||||
|
sqlParamList.Add(new SqlParameter("@copyToModule", SqlDbType.VarChar, 100) { Value = "1000202" });
|
||||||
|
sqlParamList.Add(new SqlParameter("@copyToIdValue", SqlDbType.VarChar, 100) { Value = productid });
|
||||||
|
sqlParamList.Add(new SqlParameter("@coverFileId", SqlDbType.Int) { Value = coverFileId });
|
||||||
|
sqlParamList.Add(new SqlParameter("@coverTag", SqlDbType.Int) { Value = coverTag });
|
||||||
|
BaseImpl.ExecProcedure("p_CopyAttcFileInfo", sqlParamList.ToArray());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new Exception($"保存Bom失败\r\n{tipMsg}");
|
throw new Exception($"保存Bom失败\r\n{tipMsg}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
SetProcessBar(100, 100);
|
||||||
|
SetProcessLabelAllMsg($"总进度:1/1");
|
||||||
this.DialogResult = DialogResult.OK;
|
this.DialogResult = DialogResult.OK;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -1588,6 +1603,7 @@ namespace Lskj.PubBomImport
|
|||||||
string fileId = sourceRow["qms_laddf_FileId"] + "";
|
string fileId = sourceRow["qms_laddf_FileId"] + "";
|
||||||
string execGuid = sourceRow["qms_laddf_Exec"] + "";
|
string execGuid = sourceRow["qms_laddf_Exec"] + "";
|
||||||
int childIndex = sourceTable.Rows.IndexOf(sourceRow);
|
int childIndex = sourceTable.Rows.IndexOf(sourceRow);
|
||||||
|
int nowCount = 1 + childIndex;
|
||||||
int allCount = (int)((decimal)(childIndex) / (sourceTable.Rows.Count) * 100);
|
int allCount = (int)((decimal)(childIndex) / (sourceTable.Rows.Count) * 100);
|
||||||
int finishCount = (int)((decimal)(1 + childIndex) / (sourceTable.Rows.Count) * 100);
|
int finishCount = (int)((decimal)(1 + childIndex) / (sourceTable.Rows.Count) * 100);
|
||||||
Model = frmMain.Model;
|
Model = frmMain.Model;
|
||||||
@@ -1636,6 +1652,8 @@ namespace Lskj.PubBomImport
|
|||||||
throw new Exception($"Bom明细附件{productid}获取失败\r\nBom导入失败");
|
throw new Exception($"Bom明细附件{productid}获取失败\r\nBom导入失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
SetProcessBar(100, finishCount);
|
||||||
|
SetProcessLabelAllMsg($"总进度:{nowCount + 1}/{sourceTable.Rows.Count + 1}");
|
||||||
}
|
}
|
||||||
this.DialogResult = DialogResult.OK;
|
this.DialogResult = DialogResult.OK;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user