Extend missing product information on table fill
This commit is contained in:
parent
b06df453d2
commit
ade18e5e40
@ -60,7 +60,10 @@ public class ExcelReader : IReader, IDisposable
|
||||
continue;
|
||||
}
|
||||
|
||||
Product product = new(currentSku);
|
||||
Product product = new(currentSku)
|
||||
{
|
||||
Name = $"Распознанный артикул"
|
||||
};
|
||||
|
||||
if (readResult.ContainsKey(product))
|
||||
{
|
||||
|
@ -167,6 +167,7 @@ public class ExcelWriter : IWriter, IDisposable
|
||||
int skuColumn = _skuCell.Column;
|
||||
int groupColumn = _programLineCell.Column;
|
||||
int nameColumn = _nameCell.Column;
|
||||
Product product = positionAmount.Key;
|
||||
|
||||
int row = worksheetCells[worksheetRows.Count, skuColumn]
|
||||
.End[XlDirection.xlUp]
|
||||
@ -182,18 +183,13 @@ public class ExcelWriter : IWriter, IDisposable
|
||||
previous.Copy(current);
|
||||
current.ClearContents();
|
||||
|
||||
worksheetCells[row, groupColumn].Value2 = positionAmount.Key.ProductLines.FirstOrDefault() ?? string.Empty;
|
||||
worksheetCells[row, nameColumn].Value2 = positionAmount.Key.Name;
|
||||
worksheetCells[row, groupColumn].Value2 = product.ProductLines.FirstOrDefault() ?? string.Empty;
|
||||
worksheetCells[row, nameColumn].Value2 = $"{product.Name} не найден ({product.ProductSku})";
|
||||
|
||||
worksheetCells[row, skuColumn].Value2 = "???";
|
||||
if (_oldSkuCell != null)
|
||||
{
|
||||
worksheetCells[row, skuColumn].Value2 = "Не найден";
|
||||
worksheetCells[row, _oldSkuCell.Column].Value2 = positionAmount.Key.ProductSku;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
worksheetCells[row, skuColumn].Value2 = positionAmount.Key.ProductSku;
|
||||
worksheetCells[row, _oldSkuCell.Column].Value2 = product.ProductSku;
|
||||
}
|
||||
|
||||
foreach (int column in columns)
|
||||
|
Loading…
Reference in New Issue
Block a user