Browse Source

红旗一轿手工出库单、自定义发货出库单、一次性销售出库单、大众备件无单号出库单加上了SAP检验

FoShanPG
44673626 3 years ago
parent
commit
64b7b7718a
  1. 13
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSCusomerKanbanAppService.cs
  2. 12
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs
  3. 18
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs
  4. 13
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOneTimeSaleOutputAppService.cs

13
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSCusomerKanbanAppService.cs

@ -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)
{

12
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs

@ -75,6 +75,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
private readonly IExcelImportAppService _excelImportService;
private readonly TaskJobService _service;
private readonly ErpPartDapperRepository _erpdapperRepository;
/// <summary>
///
/// </summary>
@ -94,6 +95,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
IDistributedCache<WmsSharePartOutPutDetial> cache,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager,
ErpPartDapperRepository erpdapperRepository,
ISettleAccountBranchEfCoreRepository<WmsSharePart90OutPutDetial, Guid> wmsRepository90,
ISettleAccountBranchEfCoreRepository<WmsSharePart90OutPut, Guid> wmsVersionRepository90,
WmsDapperRepository wmsDapper
@ -109,6 +111,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
_wmsRepository90 = wmsRepository90;
_wmsVersionRepository90 = wmsVersionRepository90;
_erpdapperRepository = erpdapperRepository;
}
private async Task<long> GetCountAsync(WmsSharePartOutPutDetialRequestDto input)
@ -674,6 +677,15 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
checkList.Add(new ErrorExportDto(version, "大众备件出库单导入", string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入模板中物料号{0}结算数量为0,影响出库请检查!", itm.MaterialCode), string.Empty));
}
}
//和物料主数据中SAP物料号检验是否存在
foreach (var itm in result)
{
if (!_erpdapperRepository.GetMaterialList().Any(p => p.MaterialCode == itm.MaterialCode))
{
checkList.Add(new ErrorExportDto(version, "大众备件出库单导入", string.Empty, string.Empty, itm.MaterialCode, string.Empty, string.Format("物料主数据不存在当前导入的物料号{0}!", itm.MaterialCode), string.Empty));
}
}
if (checkList.Count > 0)
{
return await ExportErrorReportAsync(checkList);

18
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs

@ -51,7 +51,9 @@ using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
namespace Win.Sfs.SettleAccount.Entities.WMS
{
/// <summary>
/// 红旗一轿手工出库单
/// </summary>
[Route("api/settleaccount/WmsHQKBOutput")]
//[AllowAnonymous]
[Authorize(SettleAccountPermissions.WMSHQ.Default)]
@ -77,6 +79,8 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
private readonly TaskJobService _service;
private readonly WmsDapperRepository _wmsDapper;
private readonly ErpPartDapperRepository _erpdapperRepository;
/// <summary>
///
/// </summary>
@ -97,6 +101,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
IDistributedCache<WmsHQWithOutKanbanOutPutDetial> cache,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager,
ErpPartDapperRepository erpdapperRepository,
WmsDapperRepository wmsDapper
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
{
@ -108,6 +113,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
_excelImportService = excelImportService;
_dapper = dapper;
_wmsDapper = wmsDapper;
_erpdapperRepository = erpdapperRepository;
}
private async Task<long> GetCountAsync(WmsKanbanOutPutDetialRequestDto input)
@ -280,6 +286,16 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
checkList.Add(new ErrorExportDto(version, "红旗一轿出库单导入", string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入模板中SAP编码{0}的是否备件请填写是或否,影响出库请检查!", itm.SapMaterialCode), string.Empty));
}
}
//和物料主数据中SAP物料号检验是否存在
foreach (var itm in _list)
{
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));
}
}
if (checkList.Count > 0)
{
return await ExportErrorReportAsync(checkList);

13
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOneTimeSaleOutputAppService.cs

@ -50,6 +50,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
private readonly TaskJobService _service;
private readonly WmsDapperRepository _wmsDapper;
private readonly ErpPartDapperRepository _erpdapperRepository;
/// <summary>
///
/// </summary>
@ -70,6 +71,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
IDistributedCache<WmsOneTimeSaleOutPutDetial> cache,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager,
ErpPartDapperRepository erpdapperRepository,
WmsDapperRepository wmsDapper
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
{
@ -81,6 +83,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
_excelImportService = excelImportService;
_dapper = dapper;
_wmsDapper = wmsDapper;
_erpdapperRepository = erpdapperRepository;
}
private async Task<long> GetCountAsync(WmsOneTimeSaleOutPutDetialRequestDto input)
@ -229,6 +232,16 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
{
checkList.Add(new ErrorExportDto(version, "一次性寄售销售导入", string.Empty, string.Empty, string.Empty, string.Empty, "导入模板中第一页签没有数据,请检查!", string.Empty));
}
//和物料主数据中SAP物料号检验是否存在
foreach (var itm in _list)
{
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));
}
}
if (checkList.Count > 0)
{
return await ExportErrorReportAsync(checkList);

Loading…
Cancel
Save