Browse Source

日常提交

FoShanPG
44673626 2 years ago
parent
commit
23f2998d12
  1. 2
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Materials/MaterialDtoBase.cs
  2. 22
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQ_H/HQ_H_PlatformAppService.cs
  3. 13
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs
  4. 21
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs
  5. 23
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanExtendAppService.cs
  6. 18
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs
  7. 2
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
  8. 1
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleKBWithCodeDapperReportRepository.cs
  9. 68
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartDapperReportRepository.cs
  10. 2
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQFactoryUnSettledDetailDiffExportService.cs
  11. 15
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSettledDetailDiffExportService.cs
  12. 15
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHUnSettledDetailDiffExportService.cs
  13. 17
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/KanBanUnSettledExport.cs
  14. 19
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleKBWithCodeExportService.cs
  15. 19
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleSparePartExportService.cs
  16. 18
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleUnSparePartExportService.cs
  17. 43
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SyncFisService.cs
  18. 36
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs

2
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Materials/MaterialDtoBase.cs

@ -13,7 +13,7 @@ using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.Errors
{
public class ErrorBillDto
public class ErrorBillDto : AuditedEntityDtoBase<Guid>
{
/// <summary>
///错误单据号

22
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQ_H/HQ_H_PlatformAppService.cs

@ -16,6 +16,7 @@ using Volo.Abp.Application.Dtos;
using Volo.Abp.Caching;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Guids;
using Volo.Abp.Uow;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.CommonManagers;
@ -23,6 +24,7 @@ using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.HQ_M;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
using Win.Sfs.Shared.Filter;
namespace Win.Sfs.SettleAccount.Entities.HQ_H
@ -47,6 +49,7 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H
private readonly ISettleAccountBranchEfCoreRepository<HQ_M_PlatformVersion, Guid> _versionMRepository;
private readonly ISettleAccountBranchEfCoreRepository<HQ_M_Platform, Guid> _repositoryM;
private readonly ErpPartDapperRepository _erpdapperRepository;
/// <summary>
/// 构建方法
/// </summary>
@ -59,6 +62,7 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H
IDistributedCache<HQ_H_Platform> cache,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ErpPartDapperRepository erpdapperRepository,
ICommonManager commonManager,
ISettleAccountBranchEfCoreRepository<HQ_M_PlatformVersion, Guid> versionMRepository,
ISettleAccountBranchEfCoreRepository<HQ_M_Platform, Guid> repositoryM
@ -70,6 +74,7 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H
_repository = repository;
_versionMRepository = versionMRepository;
_repositoryM = repositoryM;
_erpdapperRepository = erpdapperRepository;
}
/// <summary>
@ -85,10 +90,12 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]
[UnitOfWork(false)]
[Authorize(SettleAccountPermissions.HQ_HPlatform.Create)]
public async Task<string> HQ_H_PlatformUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode)
{
ExportImporter _exportImporter = new ExportImporter();
var checkList = new List<ErrorExportDto>();
var result = await _exportImporter.UploadExcelImport<HQ_H_PlatformImportDto>(files, _excelImportService);
if (result == null || result.Count == 0)
@ -97,6 +104,21 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H
}
var entityList = ObjectMapper.Map<List<HQ_H_PlatformImportDto>, List<HQ_H_Platform>>(result);
//和物料主数据中SAP物料号检验是否存在
foreach (var itm in entityList)
{
if (!_erpdapperRepository.GetMaterialList().Any(p => p.CustomerPartCode == 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);
}
//删除版本
var _versionQuery = _versionRepository.Where(p => p.Version == version);
await _versionQuery.BatchDeleteAsync();

13
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.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<WmsHQHKanbanOutPutDetial> 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)
@ -446,6 +449,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]
//[UnitOfWork(false)]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
public async Task<string> ExcelImport([FromForm] IFormFileCollection files, string version)
{
@ -480,6 +484,15 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
}
}
////和物料主数据中SAP物料号检验是否存在
//foreach (var itm in filteResult)
//{
// 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)
{

21
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs

@ -78,6 +78,8 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
private readonly TaskJobService _service;
private readonly WmsDapperRepository _wmsDapper;
// private readonly ErpPartDapperRepository _erpdapperRepository;
/// <summary>
///
/// </summary>
@ -99,6 +101,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
WMSEfCoreRepository<TB_BILL> wmstbRespository,
IDistributedCache<WmsKanbanOutPutDetial> cache,
ISnowflakeIdGenerator snowflakeIdGenerator,
// ErpPartDapperRepository erpdapperRepository,
ICommonManager commonManager,
WmsDapperRepository wmsDapper
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
@ -110,6 +113,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
_wmsefRespository = wmsefRespository;
_excelImportService = excelImportService;
_dapper = dapper;
// _erpdapperRepository = erpdapperRepository;
_wmsDapper = wmsDapper;
}
@ -752,6 +756,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]
//[UnitOfWork(false)]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
public async Task<string> ExcelImport([FromForm] IFormFileCollection files, string version)
{
@ -776,6 +781,22 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
checkList.Add(new ErrorExportDto(version, "大众看板出库单导入", string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入模板中看板号{0}的结算数量为0,影响出库请检查!", itm.Kanban), string.Empty));
}
}
////和物料主数据中SAP物料号检验是否存在
//foreach (var itm in filteResult)
//{
// 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);
}
//发现导入模板中存在空行,直接过滤掉
var filteResult = result.Where(p =>!string.IsNullOrEmpty(p.Kanban));

23
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanExtendAppService.cs

@ -51,7 +51,9 @@ using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
namespace Win.Sfs.SettleAccount.Entities.WMS
{
/// <summary>
/// 大众无条码看板出库单
/// </summary>
[Route("api/settleaccount/wmskanbanoutputextend")]
//[AllowAnonymous]
[Authorize(SettleAccountPermissions.WMSJIT.Default)]
@ -70,6 +72,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
private readonly WMSEfCoreRepository<TB_BILL> _wmstbRespository;
private readonly ISettleAccountBranchEfCoreRepository<TaskJob, Guid> _job;
private readonly IExcelImportAppService _excelImportService;
private readonly ErpPartDapperRepository _erpdapperRepository;
private readonly TaskJobService _service;
@ -94,6 +97,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
KanbanUnSettledDapperRepository dapper,
WMSEfCoreRepository<TB_BILL> wmstbRespository,
IDistributedCache<WmsWithOutKanbanOutPutDetial> cache,
//ErpPartDapperRepository erpdapperRepository,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager,
WmsDapperRepository wmsDapper
@ -107,6 +111,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
_excelImportService = excelImportService;
_dapper = dapper;
_wmsDapper = wmsDapper;
// _erpdapperRepository = erpdapperRepository;
}
private async Task<long> GetCountAsync(WmsKanbanOutPutDetialRequestDto input)
@ -237,6 +242,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
[HttpPost]
[Route("ExcelImportWithOutKanban")]
[DisableRequestSizeLimit]
//[UnitOfWork(false)]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
public async Task<string> ExcelImportWithOutKanban([FromForm] IFormFileCollection files, string version)
{
@ -315,8 +321,21 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
// _lsCopy.Add(_detail);
//}
//_lst.AddRange(_lsCopy.ToArray());
var checkList = new List<ErrorExportDto>();
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.ExtendExcelImport<WmsWithOutKanbanOutPutDetial>(files, _excelImportService);
////和物料主数据中SAP物料号检验是否存在
//foreach (var itm in result)
//{
// 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);
//}
List<WmsWithOutKanbanOutPutDetial> _lst = new List<WmsWithOutKanbanOutPutDetial>();
var _lsCopy = new List<WmsWithOutKanbanOutPutDetial>();
foreach (var itm in result)
@ -354,7 +373,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
select itm1;
var errList = error.GroupBy(p => new { p.BillNum }).Select(p => new { BillNum = p.Key.BillNum, Number = p.Sum(itm => itm.Qty) });
var checkList = new List<ErrorExportDto>();
foreach (var itm in errList)
{
checkList.Add(new ErrorExportDto() { Message = string.Format("出库单号:{0}重复记录数:{1}条", itm.BillNum, itm.Number) });

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

@ -44,6 +44,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
private readonly WMSEfCoreRepository<TB_BILL> _wmstbRespository;
private readonly ISettleAccountBranchEfCoreRepository<TaskJob, Guid> _job;
private readonly IExcelImportAppService _excelImportService;
//private readonly ErpPartDapperRepository _erpdapperRepository;
private readonly TaskJobService _service;
/// <summary>
@ -69,6 +70,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
IExcelImportAppService excelImportService,
IDistributedCache<WmsSharePart90OutPutDetial> cache,
ISnowflakeIdGenerator snowflakeIdGenerator,
// ErpPartDapperRepository erpdapperRepository,
WmsDapperRepository wmsDapper,
ICommonManager commonManager
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
@ -80,6 +82,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
_wmsVersionRepository = wmsVersionRepository;
_wmsefRespository = wmsefRespository;
_wmsDapper = wmsDapper;
// _erpdapperRepository = erpdapperRepository;
}
private async Task<long> GetCountAsync(WmsSharePartOutPutDetialRequestDto input)
@ -480,6 +483,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]
//[UnitOfWork(false)]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
public async Task<string> ExcelImport([FromForm] IFormFileCollection files, string version)
{
@ -507,6 +511,20 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
checkList.Add(new ErrorExportDto(version, "大众备件出库单导入", string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入模板中订单号{0}结算数量为0,影响出库请检查!", itm.OrderBillNum), string.Empty));
}
}
//和物料主数据中SAP物料号检验是否存在
//foreach (var itm in filteResult)
//{
// 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);
}
List<WmsSharePart90OutPutDetial> _lst = new List<WmsSharePart90OutPutDetial>();
var _lsCopy = new List<WmsSharePart90OutPutDetial>();

2
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs

@ -282,7 +282,7 @@ namespace Win.Sfs.SettleAccount
{
CreateMap<ErrorBill, ErrorBillDto>().ReverseMap();
CreateMap<ErrorBill, ErrorBillRequestDto>().ReverseMap();
CreateMap<ErrorBill, ErrorBillImportDto>().ReverseMap();
CreateMap<ErrorBillImportDto, ErrorBill>().ReverseMap();
CreateMap<ErrorBill, ErrorBillExportDto>().ReverseMap();
}

1
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleKBWithCodeDapperReportRepository.cs

@ -244,6 +244,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
}
return _lst;
}

68
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartDapperReportRepository.cs

@ -165,7 +165,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" temp1.发货数量,\n" +
" temp1.发货与开票差异,\n" +
" ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) 实际交货数量,\n" +
" ISNULL( temp1.发货数量, 0 ) - ISNULL( temp1.开票数量, 0 ) - ISNULL( temp3.Qty, 0 ) AS 实际交货与开票差异,\n" +
" ISNULL( temp1.发货数量, 0 ) - ISNULL( temp1.开票数量, 0 ) - ISNULL( temp3.Qty, 0 )-ISNULL( TEMP5.Qty, 0 ) AS 实际交货与开票差异,\n" +
" ISNULL( temp3.Qty, 0 ) 退货数量,\n" +
" ISNULL( TEMP5.Qty, 0 ) 往期已结 \n" +
" FROM\n" +
@ -422,6 +422,43 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
var list12 = DbConnection.Query<CompareExtend1>(string.Format(sql11, version));
//看板号为空的情况下,取外部单号的值
// var sql12 = " SELECT DISTINCT \n" +
//" t1.* \n" +
//" FROM \n" +
//" ( \n" +
//" SELECT \n" +
//" a.ExternalKanbanNumber AS ExternalKanbanNumber, \n" +
//" a.KanbanNumber AS KanbanNumber, \n" +
//" CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate, \n" +
//" HQHKanBan, \n" +
//" b2.MaterialCode \n" +
//" FROM \n" +
//" Set_UnHQSettleAccount a \n" +
//" LEFT JOIN Set_material b2 ON a.MaterialCode = b2.CustomerPartCode \n" +
//" WHERE \n" +
//" Version = '{0}' \n" +
//" AND HQHKanBan is null \n" +
//" ) t1 \n" +
//" LEFT JOIN ( \n" +
//" SELECT \n" +
//" HQHKanBan, \n" +
//" MaterialCode \n" +
//" FROM \n" +
//" Set_UnHQSettleAccount a \n" +
//" WHERE \n" +
//" Version = '{0}' \n" +
//" AND HQHKanBan is null \n" +
//" GROUP BY \n" +
//" HQHKanBan, \n" +
//" MaterialCode \n" +
//" HAVING \n" +
//" COUNT ( * ) > 1 \n" +
//" ) t2 ON t1.HQHKanBan = t2.HQHKanBan \n" +
//" AND t1.MaterialCode = t2.MaterialCode ";
// var list13 = DbConnection.Query<CompareExtend1>(string.Format(sql12, version));
List<CompareExtend1> _lscopy = new List<CompareExtend1>();
@ -753,7 +790,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
/// <summary>
/// 大众备件未结(带单号),包含有发货有结算(条件:发货数量大于结算数据)也整合到大众备件未结中
/// 用于--寄售未结比对WMS库存
/// 用于--寄售未结比对WMS库存(因为日期传参问题,单独拿出)
/// </summary>
/// <param name="purchaseOrderNo"></param>
/// <param name="version"></param>
@ -1203,6 +1240,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
/// <summary>
/// 大众备件未结(带单号),包含有发货有结算(条件:发货数量大于结算数据)也整合到大众备件未结中
/// 用于备件未结统计
/// </summary>
/// <param name="purchaseOrderNo"></param>
/// <param name="version"></param>
@ -1250,13 +1288,13 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" temp1.物料代码,\n" +
" temp1.物料描述,\n" +
" temp1.发货数量,\n" +
" temp1.开票数量,\n" +
" temp1.已结数量,\n" +
" temp1.收货与交货差异,\n" +
" ISNULL( temp3.Qty, 0 ) 退货数量,\n" +
" ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) 未结数量,\n" +
" ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) - ISNULL( temp1.开票数量, 0 ) 实际发货数量,\n" +
" ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) - ISNULL( temp1.已结数量, 0 ) 实际发货数量,\n" +
" ISNULL( TEMP2.Price, 0 ) AS 定价,\n" +
" ISNULL( TEMP2.Price, 0 ) * ( ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) - ISNULL( temp1.开票数量, 0 ) ) 实际发货总金额 \n" +
" ISNULL( TEMP2.Price, 0 ) * ( ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) - ISNULL( temp1.已结数量, 0 ) ) 实际发货总金额 \n" +
" FROM\n" +
" (\n" +
" SELECT\n" +
@ -1264,11 +1302,11 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" NULL AS 交货日期,\n" +
" a.PurchaseOrderNo AS 采购订单号,\n" +
" c.MaterialCode AS SAP编码,\n" +
" c.CustomerPartCode AS 物料代码,\n" +
" a.MaterialCode AS 物料代码,\n" +
" c.MaterialDesc AS 物料描述,\n" +
" c.EstimateTypeDesc AS 物料组,\n" +
" ISNULL( a.ReceiptQty, 0 ) AS 发货数量,\n" +
" ISNULL( b.Qty, 0 ) AS 开票数量,\n" +
" ISNULL( b.Qty, 0 ) AS 已结数量,\n" +
" ( ISNULL( a.ReceiptQty, 0 ) - ISNULL( b.Qty, 0 ) ) AS 收货与交货差异 \n" +
" FROM\n" +
" (\n" +
@ -1308,13 +1346,13 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" temp1.物料代码,\n" +
" temp1.物料描述,\n" +
" temp1.发货数量,\n" +
" temp1.开票数量,\n" +
" temp1.已结数量,\n" +
" temp1.收货与交货差异,\n" +
" ISNULL( temp3.Qty, 0 ) 退货数量,\n" +
" ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) 未结数量,\n" +
" ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) - ISNULL( temp1.开票数量, 0 ) 实际发货数量,\n" +
" ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) - ISNULL( temp1.已结数量, 0 ) 实际发货数量,\n" +
" ISNULL( TEMP2.Price, 0 ) AS 定价,\n" +
" ISNULL( TEMP2.Price, 0 ) * (ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) - ISNULL( temp1.开票数量, 0 ) ) 实际发货总金额 \n" +
" ISNULL( TEMP2.Price, 0 ) * (ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) - ISNULL( temp1.已结数量, 0 ) ) 实际发货总金额 \n" +
" FROM\n" +
" (\n" +
" SELECT\n" +
@ -1322,11 +1360,11 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" NULL AS 交货日期,\n" +
" a.PurchaseOrderNo AS 采购订单号,\n" +
" c.MaterialCode AS SAP编码,\n" +
" c.CustomerPartCode AS 物料代码,\n" +
" a.MaterialCode AS 物料代码,\n" +
" c.MaterialDesc AS 物料描述,\n" +
" c.EstimateTypeDesc AS 物料组,\n" +
" ISNULL( a.ReceiptQty, 0 ) AS 发货数量,\n" +
" ISNULL( b.ReceiptQty, 0 ) AS 开票数量,\n" +
" ISNULL( b.ReceiptQty, 0 ) AS 已结数量,\n" +
" ( ISNULL( b.ReceiptQty, 0 ) - ISNULL( a.ReceiptQty, 0 ) ) AS 收货与交货差异 \n" +
" FROM\n" +
" (\n" +
@ -1652,6 +1690,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ExporterHeader(DisplayName = "发货数量")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "往期已结")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "开票数量")]
public decimal { set; get; }
@ -1719,8 +1759,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ExporterHeader(DisplayName = "发货数量")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "开票数量", IsIgnore = true)]
public decimal { set; get; }
[ExporterHeader(DisplayName = "已结数量")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "收货与交货差异", IsIgnore = true)]

2
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQFactoryUnSettledDetailDiffExportService.cs

@ -125,7 +125,7 @@ namespace SettleAccount.Job.Services.Report
ExcelExporter _exporter = new ExcelExporter();//导出Excel
var result = _exporter.Append(_ls.ToList(), "红旗系统未对比对红旗主机厂未结")
.SeparateBySheet()
.Append(_ls_reversal.ToList(), "红旗主机厂未结比对红旗系统未")
.Append(_ls_reversal.ToList(), "红旗主机厂未结比对红旗系统未")
.ExportAppendDataAsByteArray();
result.ShouldNotBeNull();
_fileContainer.SaveAsync(_filename, result.Result, true);

15
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSettledDetailDiffExportService.cs

@ -11,6 +11,8 @@ using Volo.Abp.BlobStoring;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Uow;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount;
using Win.Sfs.SettleAccount.Errors;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
namespace SettleAccount.Job.Services.Report
@ -24,6 +26,7 @@ namespace SettleAccount.Job.Services.Report
private readonly HQHSettledDetailDapperRepository _dapperRepository;
private readonly ErpPartDapperRepository _erpdapperRepository;
private readonly IBlobContainer<MyFileContainer> _fileContainer;
private readonly ISettleAccountBranchEfCoreRepository<ErrorBill, Guid> _errorListRepository;
private readonly OutputService _outputService;
private readonly InputService _inputService;
@ -32,7 +35,7 @@ namespace SettleAccount.Job.Services.Report
ErpPartDapperRepository erpdapperRepository,
HQHSettledDetailDapperRepository dapperRepository,
ISettleAccountBranchEfCoreRepository<ErrorBill, Guid> errorListRepository,
OutputService outputService,
InputService inputService
, IBlobContainer<MyFileContainer> fileContainer
@ -43,6 +46,7 @@ namespace SettleAccount.Job.Services.Report
_erpdapperRepository = erpdapperRepository;
_fileContainer = fileContainer;
_dapperRepository = dapperRepository;
_errorListRepository = errorListRepository;
}
[UnitOfWork(false)]
@ -136,7 +140,16 @@ namespace SettleAccount.Job.Services.Report
}
}
//应用屏蔽错误信息功能,将其屏蔽的信息从生成的列表中排除掉,20220629
var _checkList = _errorListRepository.ToList();
var query = from itm in _ls
join itm1 in _checkList on new { ChassisNumber = itm., MaterialCode = itm., WmsBillNum = itm. }
equals new { ChassisNumber = itm1.BillNum, MaterialCode = itm1.CustomerMaterialCode, WmsBillNum = itm1.WmsBillNum } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm;
_ls = query.ToList();
//_outputService.Export<HQHSettledDetailDiff>(id, _filename, _ls);

15
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHUnSettledDetailDiffExportService.cs

@ -10,6 +10,8 @@ using TaskJob.Interfaces;
using Volo.Abp.BlobStoring;
using Volo.Abp.DependencyInjection;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount;
using Win.Sfs.SettleAccount.Errors;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
namespace SettleAccount.Job.Services.Report
@ -26,12 +28,13 @@ namespace SettleAccount.Job.Services.Report
private readonly OutputService _outputService;
private readonly InputService _inputService;
private readonly ISettleAccountBranchEfCoreRepository<ErrorBill, Guid> _errorListRepository;
public HQHUnSettledDetailDiffExportService(
ErpPartDapperRepository erpdapperRepository,
HQHSettledDetailDapperRepository dapperRepository,
ISettleAccountBranchEfCoreRepository<ErrorBill, Guid> errorListRepository,
OutputService outputService,
InputService inputService
, IBlobContainer<MyFileContainer> fileContainer
@ -42,6 +45,7 @@ namespace SettleAccount.Job.Services.Report
_erpdapperRepository = erpdapperRepository;
_fileContainer = fileContainer;
_dapperRepository = dapperRepository;
_errorListRepository = errorListRepository;
}
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> p_list)
@ -79,7 +83,16 @@ namespace SettleAccount.Job.Services.Report
}
}
//应用屏蔽错误信息功能,将其屏蔽的信息从生成的列表中排除掉,20220629
var _checkList = _errorListRepository.ToList();
var query = from itm in _ls
join itm1 in _checkList on new { ChassisNumber = itm., MaterialCode = itm., WmsBillNum = itm. }
equals new { ChassisNumber = itm1.BillNum, MaterialCode = itm1.CustomerMaterialCode, WmsBillNum = itm1.WmsBillNum } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm;
_ls = query.ToList();
ExcelExporter _exporter = new ExcelExporter();//导出Excel

17
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/KanBanUnSettledExport.cs

@ -10,6 +10,8 @@ using TaskJob.Interfaces;
using Volo.Abp.BlobStoring;
using Volo.Abp.DependencyInjection;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount;
using Win.Sfs.SettleAccount.Errors;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
namespace SettleAccount.Job.Services.Report
@ -20,8 +22,11 @@ namespace SettleAccount.Job.Services.Report
private readonly OutputService _outputService;
KanbanUnSettledDapperRepository _dapper;
private readonly IBlobContainer<MyFileContainer> _fileContainer;
private readonly ISettleAccountBranchEfCoreRepository<ErrorBill, Guid> _errorListRepository;
public KanBanUnSettledExport(KanbanUnSettledDapperRepository dapper, OutputService outputService,
public KanBanUnSettledExport(KanbanUnSettledDapperRepository dapper,
ISettleAccountBranchEfCoreRepository<ErrorBill, Guid> errorListRepository,
OutputService outputService,
IBlobContainer<MyFileContainer> fileContainer
)
@ -31,6 +36,7 @@ namespace SettleAccount.Job.Services.Report
_outputService = outputService;
_fileContainer = fileContainer;
_errorListRepository = errorListRepository;
}
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> p_list)
@ -93,7 +99,16 @@ namespace SettleAccount.Job.Services.Report
}
//应用屏蔽错误信息功能,将其屏蔽的信息从生成的列表中排除掉,20220629
var _checkList = _errorListRepository.ToList();
var query = from itm in _ls
join itm1 in _checkList on new { ChassisNumber = itm.Kanban, MaterialCode = itm.CustomerPartCode, WmsBillNum = itm.WmsBillNum }
equals new { ChassisNumber = itm1.BillNum, MaterialCode = itm1.CustomerMaterialCode, WmsBillNum = itm1.WmsBillNum } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm;
_ls = query.ToList();
//if (!string.IsNullOrEmpty(materialCode))

19
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleKBWithCodeExportService.cs

@ -6,23 +6,31 @@ using System.Threading.Tasks;
using TaskJob.EventArgs;
using TaskJob.Interfaces;
using Volo.Abp.DependencyInjection;
using Win.Sfs.SettleAccount;
using Win.Sfs.SettleAccount.Errors;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
namespace SettleAccount.Job.Services.Report
{
/// <summary>
/// 大众看板结算输出
/// </summary>
public class SettleKBWithCodeExportService : ITransientDependency, IExportJob
{
private readonly SettleKBWithCodeDapperReportRepository _dapper;
private readonly OutputService _outputService;
private readonly ErpPartDapperRepository _erpdapperRepository;
private readonly ISettleAccountBranchEfCoreRepository<ErrorBill, Guid> _errorListRepository;
public SettleKBWithCodeExportService(SettleKBWithCodeDapperReportRepository dapper,
ISettleAccountBranchEfCoreRepository<ErrorBill, Guid> errorListRepository,
OutputService outputService,
ErpPartDapperRepository erpdapperRepository)
{
_dapper = dapper;
_outputService = outputService;
_erpdapperRepository = erpdapperRepository;
_errorListRepository = errorListRepository;
}
@ -103,9 +111,18 @@ namespace SettleAccount.Job.Services.Report
}
//应用屏蔽错误信息功能,将其屏蔽的信息从生成的列表中排除掉,20220629
var _checkList = _errorListRepository.ToList();
var query = from itm in _list
join itm1 in _checkList on new { ChassisNumber = itm.Kanban, MaterialCode = itm.CustomerPartCode, WmsBillNum = itm.WMSDeliveryNote }
equals new { ChassisNumber = itm1.BillNum, MaterialCode = itm1.CustomerMaterialCode, WmsBillNum = itm1.WmsBillNum } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm;
_list = query.ToList();
_outputService.Export<SettleKBWithCode>(id, _filename, _list);
_outputService.Export<SettleKBWithCode>(id, _filename, _list.ToList());
return id.ToString();
}

19
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleSparePartExportService.cs

@ -10,6 +10,8 @@ using TaskJob.Interfaces;
using Volo.Abp.BlobStoring;
using Volo.Abp.DependencyInjection;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount;
using Win.Sfs.SettleAccount.Errors;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
namespace SettleAccount.Job.Services.Report
@ -22,8 +24,12 @@ namespace SettleAccount.Job.Services.Report
private readonly IBlobContainer<MyFileContainer> _fileContainer;
private readonly WmsDapperRepository _wmsDapper;
private readonly ISettleAccountBranchEfCoreRepository<ErrorBill, Guid> _errorListRepository;
public SettleSparePartExportService(SettleSparePartDapperReportRepository dapper, ErpPartDapperRepository erpdapperRepository, OutputService outputService
public SettleSparePartExportService(SettleSparePartDapperReportRepository dapper,
ISettleAccountBranchEfCoreRepository<ErrorBill, Guid> errorListRepository,
ErpPartDapperRepository erpdapperRepository, OutputService outputService
, WmsDapperRepository wmsDapper
, IBlobContainer<MyFileContainer> fileContainer)
{
@ -32,6 +38,7 @@ namespace SettleAccount.Job.Services.Report
_erpdapperRepository = erpdapperRepository;
_fileContainer = fileContainer;
_wmsDapper = wmsDapper;
_errorListRepository = errorListRepository;
}
@ -135,6 +142,16 @@ namespace SettleAccount.Job.Services.Report
// _outputService.Export<SettleSparePartExport>(id, fileName, _ls);
//应用屏蔽错误信息功能,将其屏蔽的信息从生成的列表中排除掉,20220629
var _checkList = _errorListRepository.ToList();
var query = from itm in _ls
join itm1 in _checkList on new { ChassisNumber = itm., MaterialCode = itm., WmsBillNum = itm. }
equals new { ChassisNumber = itm1.BillNum, MaterialCode = itm1.CustomerMaterialCode, WmsBillNum = itm1.WmsBillNum } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm;
_ls = query.ToList();
ExcelExporter _exporter = new ExcelExporter();//导出Excel

18
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleUnSparePartExportService.cs

@ -10,6 +10,8 @@ using TaskJob.Interfaces;
using Volo.Abp.BlobStoring;
using Volo.Abp.DependencyInjection;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount;
using Win.Sfs.SettleAccount.Errors;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
namespace SettleAccount.Job.Services.Report
@ -21,9 +23,12 @@ namespace SettleAccount.Job.Services.Report
private readonly ErpPartDapperRepository _erpdapperRepository;
private readonly IBlobContainer<MyFileContainer> _fileContainer;
private readonly WmsDapperRepository _wmsDapper;
private readonly ISettleAccountBranchEfCoreRepository<ErrorBill, Guid> _errorListRepository;
public SettleUnSparePartExportService(SettleSparePartDapperReportRepository dapper, ErpPartDapperRepository erpdapperRepository, OutputService outputService
public SettleUnSparePartExportService(SettleSparePartDapperReportRepository dapper,
ISettleAccountBranchEfCoreRepository<ErrorBill, Guid> errorListRepository,
ErpPartDapperRepository erpdapperRepository, OutputService outputService
, WmsDapperRepository wmsDapper
, IBlobContainer<MyFileContainer> fileContainer)
{
@ -32,6 +37,7 @@ namespace SettleAccount.Job.Services.Report
_erpdapperRepository = erpdapperRepository;
_fileContainer = fileContainer;
_wmsDapper = wmsDapper;
_errorListRepository = errorListRepository;
}
@ -123,6 +129,16 @@ namespace SettleAccount.Job.Services.Report
}
}
//应用屏蔽错误信息功能,将其屏蔽的信息从生成的列表中排除掉,20220629
var _checkList = _errorListRepository.ToList();
var query = from itm in _reversels_withcode
join itm1 in _checkList on new { ChassisNumber = itm., MaterialCode = itm., WmsBillNum = itm. }
equals new { ChassisNumber = itm1.BillNum, MaterialCode = itm1.CustomerMaterialCode, WmsBillNum = itm1.WmsBillNum } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm;
_reversels_withcode = query.ToList();
ExcelExporter _exporter = new ExcelExporter();//导出Excel
var result = _exporter.Append(_reversels_withcode.ToList(), "大众备件未结明细")

43
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SyncFisService.cs

@ -12,6 +12,8 @@ using Volo.Abp.BlobStoring;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Uow;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount;
using Win.Sfs.SettleAccount.Errors;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
namespace SettleAccount.Job.Services.Report
@ -28,6 +30,7 @@ namespace SettleAccount.Job.Services.Report
private readonly ErpPartDapperRepository _erpDapper;
private readonly SettleSparePartDapperReportRepository _sparepartdapper;
private readonly IBlobContainer<MyFileContainer> _fileContainer;
private readonly ISettleAccountBranchEfCoreRepository<ErrorBill, Guid> _errorListRepository;
public SyncFisService(
HQHSettledDetailDapperRepository hqkanbanDapper,
KanbanUnSettledDapperRepository kanbanDapper,
@ -36,6 +39,7 @@ namespace SettleAccount.Job.Services.Report
ErpPartDapperRepository erpDapper,
WmsDapperRepository wmsDapper,
SettleSparePartDapperReportRepository sparepartdapper,
ISettleAccountBranchEfCoreRepository<ErrorBill, Guid> errorListRepository,
IBlobContainer<MyFileContainer> fileContainer
)
{
@ -47,6 +51,7 @@ namespace SettleAccount.Job.Services.Report
_erpDapper = erpDapper;
_sparepartdapper = sparepartdapper;
_fileContainer = fileContainer;
_errorListRepository = errorListRepository;
}
[UnitOfWork(false)]
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> p_list)
@ -237,6 +242,17 @@ namespace SettleAccount.Job.Services.Report
}
}
//应用屏蔽错误信息功能,将其屏蔽的信息从生成的列表中排除掉,20220629
var _checkList = _errorListRepository.ToList();
var query = from itm in _ls
join itm1 in _checkList on new { ChassisNumber = itm.Kanban, MaterialCode = itm.CustomerPartCode, WmsBillNum = itm.WmsBillNum }
equals new { ChassisNumber = itm1.BillNum, MaterialCode = itm1.CustomerMaterialCode, WmsBillNum = itm1.WmsBillNum } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm;
_ls = query.ToList();
//DiffQty 为实际发货数量=发货数量-结算数量-退货数量 财务要求
var kanbanList = _ls.GroupBy(p => new { p.SapCode, p.MaterialDesc, p.MaterialGroup, p.CustomerPartCode })
@ -295,6 +311,17 @@ namespace SettleAccount.Job.Services.Report
}
}
//应用屏蔽错误信息功能,将其屏蔽的信息从生成的列表中排除掉,20220629
var _checkList = _errorListRepository.ToList();
var query = from itm in _ls
join itm1 in _checkList on new { ChassisNumber = itm., MaterialCode = itm., WmsBillNum = itm. }
equals new { ChassisNumber = itm1.BillNum, MaterialCode = itm1.CustomerMaterialCode, WmsBillNum = itm1.WmsBillNum } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm;
_ls = query.ToList();
var kanbanList = _ls.GroupBy(p => new { p.Sap编码, p., p., p. })
.Select(p => new UnSettledSum
{
@ -342,6 +369,22 @@ namespace SettleAccount.Job.Services.Report
_ls = _ls.Where(p => _groupList.Contains(p.SAP编码)).ToList();
}
}
//应用屏蔽错误信息功能,将其屏蔽的信息从生成的列表中排除掉,20220629
var _checkList = _errorListRepository.ToList();
var query = from itm in _ls
join itm1 in _checkList on new { ChassisNumber = itm., MaterialCode = itm., WmsBillNum = itm. }
equals new { ChassisNumber = itm1.BillNum, MaterialCode = itm1.CustomerMaterialCode, WmsBillNum = itm1.WmsBillNum } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm;
_ls = query.ToList();
//说明 为实际发货数量=发货数量-结算数量-退货数量 财务要求
var kanbanList = _ls.GroupBy(p => new { p.SAP编码, p., p. })
.Select(p => new UnSettledSum

36
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs

@ -286,6 +286,17 @@ equals new { ChassisNumber = itm1.BillNum, MaterialCode = itm1.MaterialCode, Wms
}
}
//应用屏蔽错误信息功能,将其屏蔽的信息从生成的列表中排除掉,20220629
var _checkList = _errorListRepository.ToList();
var query = from itm in _ls
join itm1 in _checkList on new { ChassisNumber = itm.Kanban, MaterialCode = itm.CustomerPartCode, WmsBillNum = itm.WmsBillNum }
equals new { ChassisNumber = itm1.BillNum, MaterialCode = itm1.CustomerMaterialCode, WmsBillNum = itm1.WmsBillNum } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm;
_ls = query.ToList();
//DiffQty 为实际发货数量=发货数量-结算数量-退货数量 财务要求
var kanbanList = _ls.GroupBy(p => new { p.SapCode, p.MaterialDesc, p.MaterialGroup, p.CustomerPartCode })
@ -344,6 +355,17 @@ equals new { ChassisNumber = itm1.BillNum, MaterialCode = itm1.MaterialCode, Wms
}
}
//应用屏蔽错误信息功能,将其屏蔽的信息从生成的列表中排除掉,20220629
var _checkList = _errorListRepository.ToList();
var query = from itm in _ls
join itm1 in _checkList on new { ChassisNumber = itm., MaterialCode = itm., WmsBillNum = itm. }
equals new { ChassisNumber = itm1.BillNum, MaterialCode = itm1.CustomerMaterialCode, WmsBillNum = itm1.WmsBillNum } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm;
_ls = query.ToList();
var kanbanList = _ls.GroupBy(p => new { p.Sap编码, p., p., p. })
.Select(p => new UnSettledSum
{
@ -391,6 +413,20 @@ equals new { ChassisNumber = itm1.BillNum, MaterialCode = itm1.MaterialCode, Wms
_ls = _ls.Where(p => _groupList.Contains(p.SAP编码)).ToList();
}
}
//应用屏蔽错误信息功能,将其屏蔽的信息从生成的列表中排除掉,20220629
var _checkList = _errorListRepository.ToList();
var query = from itm in _ls
join itm1 in _checkList on new { ChassisNumber = itm., MaterialCode = itm., WmsBillNum = itm. }
equals new { ChassisNumber = itm1.BillNum, MaterialCode = itm1.CustomerMaterialCode, WmsBillNum = itm1.WmsBillNum } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm;
_ls = query.ToList();
//说明 为实际发货数量=发货数量-结算数量-退货数量 财务要求
var kanbanList = _ls.GroupBy(p => new { p.SAP编码, p., p. })
.Select(p => new UnSettledSum

Loading…
Cancel
Save