Commit 0079fa2d by xin.yang

fix bug

parent 816766fb
...@@ -85,7 +85,7 @@ namespace Siger.Middlelayer.Utility.ImportEntities ...@@ -85,7 +85,7 @@ namespace Siger.Middlelayer.Utility.ImportEntities
[ExcelColumn("*工装名称")] [ExcelColumn("*工装名称")]
public string FixtureTool { get; set; } public string FixtureTool { get; set; }
[ExcelColumn("*产品名称")] [ExcelColumn("*产品编号")]
public string Product { get; set; } public string Product { get; set; }
[ExcelColumn("备注")] [ExcelColumn("备注")]
......
...@@ -152,7 +152,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -152,7 +152,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
{ {
rowIndex++; rowIndex++;
if (string.IsNullOrEmpty(item.FixtureTool) || string.IsNullOrEmpty(item.Product) || string.IsNullOrEmpty(item.Product)) if (string.IsNullOrEmpty(item.FixtureTool) || string.IsNullOrEmpty(item.Product))
{ {
errors.Add($"{rowIndex},{(int)RequestEnum.ParameterMiss}"); errors.Add($"{rowIndex},{(int)RequestEnum.ParameterMiss}");
} }
...@@ -161,7 +161,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -161,7 +161,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
{ {
errors.Add($"{rowIndex},{(int)RequestEnum.FixtureToolNotFound}"); errors.Add($"{rowIndex},{(int)RequestEnum.FixtureToolNotFound}");
} }
var product = _context.siger_project_product.FirstOrDefault(q => q.projectid == projectid && q.status == (int)RowState.Valid && q.name == item.Product); var product = _context.siger_project_product.FirstOrDefault(q => q.projectid == projectid && q.status == (int)RowState.Valid && q.code == item.Product);
if (product == null) if (product == null)
{ {
errors.Add($"{rowIndex},{(int)RequestEnum.ProductNotFound}"); errors.Add($"{rowIndex},{(int)RequestEnum.ProductNotFound}");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment