|
|
@ -69,6 +69,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
private readonly WMSEfCoreRepository<TB_BILL> _wmstbRespository; |
|
|
|
private readonly ISettleAccountBranchEfCoreRepository<TaskJob, Guid> _job; |
|
|
|
private readonly IExcelImportAppService _excelImportService; |
|
|
|
private readonly ErpPartDapperRepository _erpdapperRepository; |
|
|
|
|
|
|
|
|
|
|
|
private readonly TaskJobService _service; |
|
|
@ -92,6 +93,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
WMSEfCoreRepository<TB_BILL> wmstbRespository, |
|
|
|
IDistributedCache<WmsCustomerKanbanOutPutDetial> cache, |
|
|
|
ISnowflakeIdGenerator snowflakeIdGenerator, |
|
|
|
ErpPartDapperRepository erpdapperRepository, |
|
|
|
ICommonManager commonManager |
|
|
|
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager) |
|
|
|
{ |
|
|
@ -101,6 +103,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
_wmsVersionRepository = wmsVersionRepository; |
|
|
|
_wmsefRespository = wmsefRespository; |
|
|
|
_excelImportService = excelImportService; |
|
|
|
_erpdapperRepository = erpdapperRepository; |
|
|
|
} |
|
|
|
|
|
|
|
private async Task<long> GetCountAsync(WmsKanbanOutPutDetialRequestDto input) |
|
|
@ -478,6 +481,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
{ |
|
|
|
checkList.Add(new ErrorExportDto(version, "自定义出库单导入", string.Empty, string.Empty, string.Empty, string.Empty, "导入模板中第一页签没有数据,请检查!", string.Empty)); |
|
|
|
} |
|
|
|
|
|
|
|
if (checkList.Count > 0) |
|
|
|
{ |
|
|
|
return await ExportErrorReportAsync(checkList); |
|
|
@ -486,6 +490,15 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
|
|
|
|
var filteResult = result.Where(p =>!string.IsNullOrEmpty(p.SapMaterialCode));//过滤掉物料号为空的数据
|
|
|
|
|
|
|
|
//和物料主数据中SAP物料号检验是否存在
|
|
|
|
foreach (var itm in filteResult) |
|
|
|
{ |
|
|
|
if (!_erpdapperRepository.GetMaterialList().Any(p => p.MaterialCode == itm.SapMaterialCode)) |
|
|
|
{ |
|
|
|
checkList.Add(new ErrorExportDto(version, "自定义出库单导入", string.Empty, string.Empty, itm.SapMaterialCode, string.Empty, string.Format("物料主数据不存在当前导入的物料号{0}!", itm.SapMaterialCode), string.Empty)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//检验2:导入模板中的结算数据是否为0
|
|
|
|
foreach (var itm in filteResult) |
|
|
|
{ |
|
|
|