Commit 350a94ae by yiyu.li
parents ca524194 4cfcb355
......@@ -68,7 +68,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
if (string.IsNullOrEmpty(item.Fixture))
{
errors.Add($"{rowIndex}, {(int)RequestEnum.ParameterMiss}");
errors.Add($"{rowIndex},{(int)RequestEnum.ParameterMiss}");
}
var data = _context.siger_automation_fixture_tools_category.FirstOrDefault(q => q.projectId == projectid && q.status == (int)RowState.Valid && q.name == item.Fixture);
......
......@@ -221,11 +221,13 @@ namespace Siger.Middlelayer.WmsRepository.Repositories
if(!int.TryParse(loca.ID, out int id))
{
errors.Add($"{rowIndex},{(int)RequestEnum.PleaseInputNotZeroIntID}");
return new CommonImportResult(0, string.Join(";", errors));
}
if (string.IsNullOrEmpty(loca.StorageName))
{
errors.Add($"{rowIndex},{(int)RequestEnum.PleaseInputStorageName}");
return new CommonImportResult(0, string.Join(";", errors));
}
if (loca.Locations.Count != sonLocationTypes.Count)
......@@ -238,6 +240,7 @@ namespace Siger.Middlelayer.WmsRepository.Repositories
if (storage == null)
{
errors.Add($"{rowIndex},{(int)RequestEnum.StorageError}");
return new CommonImportResult(0, string.Join(";", errors));
}
else
{
......@@ -249,10 +252,12 @@ namespace Siger.Middlelayer.WmsRepository.Repositories
if(typeId.LocationType == 0)
{
errors.Add($"{rowIndex},{(int)RequestEnum.LocationLevelError}");
return new CommonImportResult(0, string.Join(";", errors));
}
if (string.IsNullOrEmpty(typeId.Location))
{
errors.Add($"{rowIndex},{(int)RequestEnum.PleaseInputLocation}");
return new CommonImportResult(0, string.Join(";", errors));
}
if(storage != null && typeId.LocationType > 0 && loca.ID.ToInt() > 0)
{
......@@ -262,16 +267,11 @@ namespace Siger.Middlelayer.WmsRepository.Repositories
if (locationIdExist != null || locations.Count(q => q.StorageName == loca.StorageName && q.ID == loca.ID) > 1)
{
errors.Add($"{rowIndex},{(int)RequestEnum.IDExist}");
break;
return new CommonImportResult(0, string.Join(";", errors));
}
}
}
if (errors.Any())
{
return new CommonImportResult(0, string.Join(";", errors));
}
list.Add(loca);
rowIndex++;
......
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