|
|
@ -1,4 +1,5 @@ |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.ComponentModel.DataAnnotations; |
|
|
|
using System.Linq; |
|
|
|
using Magicodes.ExporterAndImporter.Core.Extension; |
|
|
@ -10,6 +11,7 @@ using SettleAccount.Domain.BQ; |
|
|
|
using SettleAccount.Job.SignalR; |
|
|
|
using Win.Sfs.SettleAccount; |
|
|
|
using Win.Sfs.SettleAccount.Consts; |
|
|
|
using Win.Sfs.SettleAccount.Entities.BQ.Syncs; |
|
|
|
using Win.Sfs.SettleAccount.Reports; |
|
|
|
|
|
|
|
namespace SettleAccount.Job.Services.Report |
|
|
@ -58,7 +60,7 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
maxRowNumberOnASheet = excelExporterAttribute.MaxRowNumberOnASheet > 0 ? excelExporterAttribute.MaxRowNumberOnASheet : maxRowNumberOnASheet; |
|
|
|
} |
|
|
|
//有EDI无发运
|
|
|
|
var haveEdiNotHaveSeList = _settleAccountDbContext.Set<TEdi>().Where(t => t.IsHaveSeData == false) |
|
|
|
var haveEdiNotHaveSeList = _settleAccountDbContext.Set<TEdi>().Where(t => t.IsHaveSeData == false && t.State==0) |
|
|
|
.GroupBy(t => new { t.PN, t.CustomerPartCodeNoSpace }) |
|
|
|
.Select(t => new TCompareReport() |
|
|
|
{ |
|
|
@ -79,9 +81,25 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
t.SequenceNumber = GetSequenceNumberDate(t.SequenceNumber); |
|
|
|
t.Remark = string.IsNullOrEmpty(t.SequenceNumber) ? "PJIS出单,AJIS未上" : ""; |
|
|
|
}); |
|
|
|
|
|
|
|
List<EnumProTpe> proType = new List<EnumProTpe>(); |
|
|
|
proType.Add(EnumProTpe.Jit发货); |
|
|
|
proType.Add(EnumProTpe.Jit补发订单); |
|
|
|
proType.Add(EnumProTpe.Jis发货); |
|
|
|
proType.Add(EnumProTpe.Jis补发订单); |
|
|
|
proType.Add(EnumProTpe.Jit备件); |
|
|
|
proType.Add(EnumProTpe.Jis备件); |
|
|
|
proType.Add(EnumProTpe.Jit买单件); |
|
|
|
proType.Add(EnumProTpe.Jis买单件); |
|
|
|
proType.Add(EnumProTpe.无); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//无EDI有发运
|
|
|
|
var notHaveEdiHaveSeList = _settleAccountDbContext.Set<TSe>() |
|
|
|
.Where(t => t.BusinessType == businessType && t.BillTime >= seStartDateTime && t.BillTime <= seEndDateTime) |
|
|
|
.Where(t=>t.State==0) |
|
|
|
.Where(t => proType.Contains(t.ProType)) |
|
|
|
.Where(t => t.IsHaveEdiData == false) |
|
|
|
.GroupBy(t => new { t.PN, t.CustomerPartCodeNoSpace }) |
|
|
|
.Select(t => new TCompareReport() |
|
|
@ -103,7 +121,7 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
}).ToList(); |
|
|
|
//有EDI有发运
|
|
|
|
var ediGroup = from edi in _settleAccountDbContext.Set<TEdi>() |
|
|
|
where edi.IsDeleted == false && edi.IsHaveSeData == true |
|
|
|
where edi.IsDeleted == false && edi.IsHaveSeData == true && edi.State == 0 |
|
|
|
group edi by new { edi.PN, edi.CustomerPartCodeNoSpace } into groupItem |
|
|
|
select new |
|
|
|
{ |
|
|
@ -116,7 +134,7 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
LineStationCode = groupItem.Max(t => t.LineStationCode) |
|
|
|
}; |
|
|
|
var seGroup = from se in _settleAccountDbContext.Set<TSe>() |
|
|
|
where se.BusinessType == businessType && se.IsHaveEdiData == true && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime |
|
|
|
where se.BusinessType == businessType && se.IsHaveEdiData == true && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime && se.State==0 && proType.Contains(se.ProType) |
|
|
|
group se by new { se.PN, se.CustomerPartCodeNoSpace } into groupItem |
|
|
|
select new |
|
|
|
{ |
|
|
|