|
|
@ -90,17 +90,18 @@ public class PriceListAppService : SettleAccountApplicationBase<PriceList> |
|
|
|
var query = from item1 in entityList |
|
|
|
join item2 in entityList |
|
|
|
on new { item1.LU } equals new { item2.LU } |
|
|
|
where (item1.BeginTime > item2.BeginTime && item1.EndTime < item2.EndTime) || (item2.BeginTime > item1.BeginTime && item2.EndTime < item1.EndTime) |
|
|
|
select item1; |
|
|
|
foreach (var item in query) |
|
|
|
where (item1.BeginTime >= item2.BeginTime && item1.EndTime <= item2.EndTime) || (item2.BeginTime >= item1.BeginTime && item2.EndTime <= item1.EndTime) |
|
|
|
select item1.LU; |
|
|
|
var repeat = query.Distinct().ToList(); |
|
|
|
foreach (var item in repeat) |
|
|
|
{ |
|
|
|
checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, $"导入文件中物料号:{item.LU},时间区间存在交集", string.Empty)); |
|
|
|
checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, $"导入文件中物料号:{item},时间区间存在交集", string.Empty)); |
|
|
|
} |
|
|
|
} |
|
|
|
if (checkList.Count > 0) |
|
|
|
{ |
|
|
|
string fileName = await ExportErrorReportAsync(checkList).ConfigureAwait(false); |
|
|
|
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, fileName = fileName }); |
|
|
|
return new JsonResult(new { code = ApplicationConsts.ImportFailCode, message = "导入失败", fileName = fileName }); |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
var lus = entityList.Select(p => p.LU); |
|
|
|