|
@@ -5014,7 +5014,7 @@ public class OrderController : BaseController
|
|
|
/// <param name="file"></param>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost("import-externalcitizens")]
|
|
|
- public async Task<object> ImportExternalcitizens(IFormFile file)
|
|
|
+ public async Task<object> ImportExternalcitizens([FromBody]IFormFile file,bool? needresult)
|
|
|
{
|
|
|
using (var stream = new MemoryStream())
|
|
|
{
|
|
@@ -5024,6 +5024,7 @@ public class OrderController : BaseController
|
|
|
int errorCount = 0;
|
|
|
int addCount = 0;
|
|
|
//int modifyCount = 0;
|
|
|
+ List<ExternalCitizensExcelContent> listreturn = new List<ExternalCitizensExcelContent>();
|
|
|
if (list != null && list.Count > 0)
|
|
|
{
|
|
|
count = list.Count;
|
|
@@ -5039,6 +5040,10 @@ public class OrderController : BaseController
|
|
|
if (!string.IsNullOrEmpty(id))
|
|
|
{
|
|
|
addCount++;
|
|
|
+ if (needresult==true)
|
|
|
+ {
|
|
|
+ listreturn.Add(item);
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -5047,6 +5052,10 @@ public class OrderController : BaseController
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ if (needresult == true)
|
|
|
+ {
|
|
|
+ listreturn.Add(item);
|
|
|
+ }
|
|
|
//_mapper.Map(item, externalcitizens);
|
|
|
//await _externalCitizensRepository.UpdateAsync(externalcitizens, HttpContext.RequestAborted);
|
|
|
//modifyCount++;
|
|
@@ -5058,7 +5067,7 @@ public class OrderController : BaseController
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- return new { Count = count, ErrorCount = errorCount, AddCount = addCount/*, ModifyCount = modifyCount*/ };
|
|
|
+ return new { Count = count, ErrorCount = errorCount, AddCount = addCount,ResultList = listreturn /*, ModifyCount = modifyCount*/ };
|
|
|
}
|
|
|
}
|
|
|
|