|
@ -1,4 +1,5 @@ |
|
|
using System; |
|
|
using System; |
|
|
|
|
|
using System.Collections.Generic; |
|
|
using System.ComponentModel.DataAnnotations; |
|
|
using System.ComponentModel.DataAnnotations; |
|
|
using System.Linq; |
|
|
using System.Linq; |
|
|
using Magicodes.ExporterAndImporter.Core.Extension; |
|
|
using Magicodes.ExporterAndImporter.Core.Extension; |
|
@ -10,6 +11,7 @@ using SettleAccount.Domain.BQ; |
|
|
using SettleAccount.Job.SignalR; |
|
|
using SettleAccount.Job.SignalR; |
|
|
using Win.Sfs.SettleAccount; |
|
|
using Win.Sfs.SettleAccount; |
|
|
using Win.Sfs.SettleAccount.Consts; |
|
|
using Win.Sfs.SettleAccount.Consts; |
|
|
|
|
|
using Win.Sfs.SettleAccount.Entities.BQ.Syncs; |
|
|
using Win.Sfs.SettleAccount.Reports; |
|
|
using Win.Sfs.SettleAccount.Reports; |
|
|
|
|
|
|
|
|
namespace SettleAccount.Job.Services.Report |
|
|
namespace SettleAccount.Job.Services.Report |
|
@ -58,7 +60,7 @@ namespace SettleAccount.Job.Services.Report |
|
|
maxRowNumberOnASheet = excelExporterAttribute.MaxRowNumberOnASheet > 0 ? excelExporterAttribute.MaxRowNumberOnASheet : maxRowNumberOnASheet; |
|
|
maxRowNumberOnASheet = excelExporterAttribute.MaxRowNumberOnASheet > 0 ? excelExporterAttribute.MaxRowNumberOnASheet : maxRowNumberOnASheet; |
|
|
} |
|
|
} |
|
|
//有EDI无发运
|
|
|
//有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 }) |
|
|
.GroupBy(t => new { t.PN, t.CustomerPartCodeNoSpace }) |
|
|
.Select(t => new TCompareReport() |
|
|
.Select(t => new TCompareReport() |
|
|
{ |
|
|
{ |
|
@ -79,9 +81,25 @@ namespace SettleAccount.Job.Services.Report |
|
|
t.SequenceNumber = GetSequenceNumberDate(t.SequenceNumber); |
|
|
t.SequenceNumber = GetSequenceNumberDate(t.SequenceNumber); |
|
|
t.Remark = string.IsNullOrEmpty(t.SequenceNumber) ? "PJIS出单,AJIS未上" : ""; |
|
|
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有发运
|
|
|
//无EDI有发运
|
|
|
var notHaveEdiHaveSeList = _settleAccountDbContext.Set<TSe>() |
|
|
var notHaveEdiHaveSeList = _settleAccountDbContext.Set<TSe>() |
|
|
.Where(t => t.BusinessType == businessType && t.BillTime >= seStartDateTime && t.BillTime <= seEndDateTime) |
|
|
.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) |
|
|
.Where(t => t.IsHaveEdiData == false) |
|
|
.GroupBy(t => new { t.PN, t.CustomerPartCodeNoSpace }) |
|
|
.GroupBy(t => new { t.PN, t.CustomerPartCodeNoSpace }) |
|
|
.Select(t => new TCompareReport() |
|
|
.Select(t => new TCompareReport() |
|
@ -89,7 +107,7 @@ namespace SettleAccount.Job.Services.Report |
|
|
Category = "JIS", |
|
|
Category = "JIS", |
|
|
WmsBillNum = t.Max(t => t.BillNum), |
|
|
WmsBillNum = t.Max(t => t.BillNum), |
|
|
MESConfigCode = t.Max(t => t.MESConfigCode), |
|
|
MESConfigCode = t.Max(t => t.MESConfigCode), |
|
|
ShippingDate = t.Max(t => t.BillTime), |
|
|
ShippingDate = t.Max(t => t.BillTime), |
|
|
PN = t.Max(t => t.PN), |
|
|
PN = t.Max(t => t.PN), |
|
|
Seq = t.Max(t => t.Seq), |
|
|
Seq = t.Max(t => t.Seq), |
|
|
PjsNum = t.Max(t => t.PjsNum), |
|
|
PjsNum = t.Max(t => t.PjsNum), |
|
@ -103,7 +121,7 @@ namespace SettleAccount.Job.Services.Report |
|
|
}).ToList(); |
|
|
}).ToList(); |
|
|
//有EDI有发运
|
|
|
//有EDI有发运
|
|
|
var ediGroup = from edi in _settleAccountDbContext.Set<TEdi>() |
|
|
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 |
|
|
group edi by new { edi.PN, edi.CustomerPartCodeNoSpace } into groupItem |
|
|
select new |
|
|
select new |
|
|
{ |
|
|
{ |
|
@ -116,7 +134,7 @@ namespace SettleAccount.Job.Services.Report |
|
|
LineStationCode = groupItem.Max(t => t.LineStationCode) |
|
|
LineStationCode = groupItem.Max(t => t.LineStationCode) |
|
|
}; |
|
|
}; |
|
|
var seGroup = from se in _settleAccountDbContext.Set<TSe>() |
|
|
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 |
|
|
group se by new { se.PN, se.CustomerPartCodeNoSpace } into groupItem |
|
|
select new |
|
|
select new |
|
|
{ |
|
|
{ |
|
@ -126,7 +144,7 @@ namespace SettleAccount.Job.Services.Report |
|
|
LU = groupItem.Max(t => t.LU), |
|
|
LU = groupItem.Max(t => t.LU), |
|
|
BillNum = groupItem.Max(t => t.BillNum), |
|
|
BillNum = groupItem.Max(t => t.BillNum), |
|
|
MESConfigCode = groupItem.Max(t => t.MESConfigCode), |
|
|
MESConfigCode = groupItem.Max(t => t.MESConfigCode), |
|
|
BillTime = groupItem.Max(t => t.BillTime), |
|
|
BillTime = groupItem.Max(t => t.BillTime), |
|
|
Seq = groupItem.Max(t => t.Seq), |
|
|
Seq = groupItem.Max(t => t.Seq), |
|
|
PjsNum = groupItem.Max(t => t.PjsNum), |
|
|
PjsNum = groupItem.Max(t => t.PjsNum), |
|
|
ToLoc = groupItem.Max(t => t.ToLoc), |
|
|
ToLoc = groupItem.Max(t => t.ToLoc), |
|
@ -147,7 +165,7 @@ namespace SettleAccount.Job.Services.Report |
|
|
SequenceNumber = edi.Extend3, |
|
|
SequenceNumber = edi.Extend3, |
|
|
ParType = edi.Extend2, |
|
|
ParType = edi.Extend2, |
|
|
MESConfigCode = se.MESConfigCode, |
|
|
MESConfigCode = se.MESConfigCode, |
|
|
ShippingDate = se.BillTime, |
|
|
ShippingDate = se.BillTime, |
|
|
PN = se.PN, |
|
|
PN = se.PN, |
|
|
Seq = se.Seq, |
|
|
Seq = se.Seq, |
|
|
PjsNum = se.PjsNum, |
|
|
PjsNum = se.PjsNum, |
|
|