|
|
@ -1,8 +1,10 @@ |
|
|
|
using System; |
|
|
|
using System.ComponentModel.DataAnnotations; |
|
|
|
using System.Linq; |
|
|
|
using Magicodes.ExporterAndImporter.Core.Extension; |
|
|
|
using Magicodes.ExporterAndImporter.Excel; |
|
|
|
using Microsoft.AspNetCore.SignalR; |
|
|
|
using Microsoft.OpenApi.Extensions; |
|
|
|
using SettleAccount.Bases; |
|
|
|
using SettleAccount.Domain.BQ; |
|
|
|
using SettleAccount.Job.SignalR; |
|
|
@ -36,11 +38,12 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
/// <summary>
|
|
|
|
/// 获取发运、Eid比对数据
|
|
|
|
/// </summary>
|
|
|
|
public ExcelExporter GetSeEdiCompareData<TSe, TEdi, TCompareReport>(DateTime seStartDateTime, DateTime seEndDateTime, string businessTypeDisplayName) |
|
|
|
public ExcelExporter GetSeEdiCompareData<TSe, TEdi, TCompareReport>(DateTime seStartDateTime, DateTime seEndDateTime, EnumBusinessType businessType) |
|
|
|
where TSe : JisSeBase |
|
|
|
where TEdi : SE_EDI |
|
|
|
where TCompareReport : SeEidCompareReport, new() |
|
|
|
{ |
|
|
|
var businessTypeDisplayName = businessType.GetAttributeOfType<DisplayAttribute>()?.Name ?? businessType.ToString(); |
|
|
|
// Sheet行数
|
|
|
|
var maxRowNumberOnASheet = AppConst.DefaultRowNumberOnASheet; |
|
|
|
var excelExporterAttribute = typeof(TCompareReport).GetAttribute<ExcelExporterAttribute>(inherit: true); |
|
|
@ -72,7 +75,9 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
t.Remark = string.IsNullOrEmpty(t.SequenceNumber) ? "PJIS出单,AJIS未上" : ""; |
|
|
|
}); |
|
|
|
//无EDI有发运
|
|
|
|
var notHaveEdiHaveSeList = _settleAccountDbContext.Set<TSe>().Where(t => t.IsHaveEdiData == false) |
|
|
|
var notHaveEdiHaveSeList = _settleAccountDbContext.Set<TSe>() |
|
|
|
.Where(t => t.BusinessType == businessType) |
|
|
|
.Where(t => t.IsHaveEdiData == false) |
|
|
|
.GroupBy(t => new { t.PN, t.CustomerPartCodeNoSpace }) |
|
|
|
.Select(t => new TCompareReport() |
|
|
|
{ |
|
|
@ -107,7 +112,7 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
LineStationCode = groupItem.Max(t => t.LineStationCode) |
|
|
|
}; |
|
|
|
var seGroup = from se in _settleAccountDbContext.Set<TSe>() |
|
|
|
where se.IsHaveEdiData == true && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime |
|
|
|
where se.BusinessType == businessType && se.IsHaveEdiData == true && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime |
|
|
|
group se by new { se.PN, se.CustomerPartCodeNoSpace } into groupItem |
|
|
|
select new |
|
|
|
{ |
|
|
|