SVN r769
SVN-Revision: r769
This commit is contained in:
@@ -64,11 +64,11 @@ namespace Lskj.PubBomImport
|
|||||||
{
|
{
|
||||||
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileInfo.Name).Trim();
|
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileInfo.Name).Trim();
|
||||||
GetFileCodeInfo(fileNameWithoutExtension, out string sourceCode, out string sourceName, out string sourceBB, out int sourceBC);
|
GetFileCodeInfo(fileNameWithoutExtension, out string sourceCode, out string sourceName, out string sourceBB, out int sourceBC);
|
||||||
if (sourceCode.StartsWith("ZZQD"))
|
//if (sourceCode.StartsWith("ZZQD"))
|
||||||
{
|
//{
|
||||||
throw new Exception($"不允许补充ZZQD文件{sourceCode}\r\n请进行变更");
|
// throw new Exception($"不允许补充ZZQD文件{sourceCode}\r\n请进行变更");
|
||||||
}
|
//}
|
||||||
else if (sourceCode.StartsWith("MX"))
|
if (sourceCode.StartsWith("MX"))
|
||||||
{
|
{
|
||||||
throw new Exception($"不允许补充MX文件{sourceCode}\r\n请进行变更");
|
throw new Exception($"不允许补充MX文件{sourceCode}\r\n请进行变更");
|
||||||
}
|
}
|
||||||
@@ -2517,10 +2517,10 @@ namespace Lskj.PubBomImport
|
|||||||
{
|
{
|
||||||
string code = (parentRow["物料编码"] + "").Trim();
|
string code = (parentRow["物料编码"] + "").Trim();
|
||||||
int codeCount = mxCodeRows.Where(n => (n["物料编码"] + "").Trim().StartsWith(code)).Count();
|
int codeCount = mxCodeRows.Where(n => (n["物料编码"] + "").Trim().StartsWith(code)).Count();
|
||||||
if (codeCount > 1)//只允许存在一个
|
//if (codeCount > 1)//只允许存在一个
|
||||||
{
|
//{
|
||||||
throw new Exception($"文件中的物料编码{code}重复,请修改");
|
// throw new Exception($"文件中的物料编码{code}重复,请修改");
|
||||||
}
|
//}
|
||||||
DataRow childRow = childTable.NewRow();
|
DataRow childRow = childTable.NewRow();
|
||||||
foreach (string item in fieldDic)
|
foreach (string item in fieldDic)
|
||||||
{
|
{
|
||||||
@@ -3619,6 +3619,7 @@ namespace Lskj.PubBomImport
|
|||||||
for (int j = firstRow.FirstCellNum; j < cellCount; j++)
|
for (int j = firstRow.FirstCellNum; j < cellCount; j++)
|
||||||
{
|
{
|
||||||
ICell cell = row.GetCell(j);
|
ICell cell = row.GetCell(j);
|
||||||
|
if (dataRow.Table.Columns.Count - 1 < dataRowIndex) break;
|
||||||
if (cell != null && cell.IsMergedCell)
|
if (cell != null && cell.IsMergedCell)
|
||||||
{
|
{
|
||||||
CellRangeAddress mergrRange = FindMergedRegion(sheet, i, j);
|
CellRangeAddress mergrRange = FindMergedRegion(sheet, i, j);
|
||||||
@@ -3637,6 +3638,7 @@ namespace Lskj.PubBomImport
|
|||||||
{
|
{
|
||||||
if (row.GetCell(j) != null) //同理,没有数据的单元格都默认是null
|
if (row.GetCell(j) != null) //同理,没有数据的单元格都默认是null
|
||||||
{
|
{
|
||||||
|
|
||||||
dataRow[dataRowIndex] = GetCellValue(row.GetCell(j));
|
dataRow[dataRowIndex] = GetCellValue(row.GetCell(j));
|
||||||
dataRowIndex += 1;
|
dataRowIndex += 1;
|
||||||
}
|
}
|
||||||
@@ -4167,4 +4169,16 @@ namespace Lskj.PubBomImport
|
|||||||
SoureMode, SoureObj, autoPick, Billdocument_Id, custom_ProductDescrip, bomFlag, encapsulation, serialnumber,
|
SoureMode, SoureObj, autoPick, Billdocument_Id, custom_ProductDescrip, bomFlag, encapsulation, serialnumber,
|
||||||
lsidx_id, workorderid, providerid, mx_ProductId, amountLoss, ProductSx, lstr1, lstr2, productidbak,
|
lsidx_id, workorderid, providerid, mx_ProductId, amountLoss, ProductSx, lstr1, lstr2, productidbak,
|
||||||
cltype, parentbillno, lskjimport_errorFlag, clProductId, bom_workordername, bom_workordernameTm, isbcp,
|
cltype, parentbillno, lskjimport_errorFlag, clProductId, bom_workordername, bom_workordernameTm, isbcp,
|
||||||
tamount,
|
tamount, xn_tig, historyVer, bombb, bombc
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
ProductId, Famount, Amount, '{zzqdCode}', amountx, ProcedureID, WorkingProcedure, Bak, Ver,
|
||||||
|
SoureMode, SoureObj, autoPick, Billdocument_Id, custom_ProductDescrip, bomFlag, encapsulation, serialnumber,
|
||||||
|
lsidx_id, workorderid, providerid, mx_ProductId, amountLoss, ProductSx, lstr1, lstr2, productidbak,
|
||||||
|
cltype, parentbillno, lskjimport_errorFlag, clProductId, bom_workordername, bom_workordernameTm, isbcp,
|
||||||
|
tamount, xn_tig, historyVer, bombb, bombc
|
||||||
|
FROM bom_BillListTab WHERE Billdocument_Id = (select top 1 billdocument_id from bom_BillTab where productid = '{topProductId}') and bak like 'ZZQD%';";
|
||||||
|
SqlHelper.ExecuteNonQuery(sql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user