Browse Source

Merge branch 'master' of http://dev.ccwin-in.com:3000/BoXu.Zheng/BeiJinSettleAccount

master
zhaoxinyu 12 months ago
parent
commit
6d3083c63d
  1. 19
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs
  2. 21
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CurdBaseAppService.cs
  3. 20
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs
  4. 24
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SeEdiCompareExportBaseService.cs

19
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs

@ -389,15 +389,16 @@ namespace Win.Sfs.SettleAccount.Bases
string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx";
byte[] result = null;
switch (input.FileType)
{
case 0:
result = await _csv.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
break;
case 1:
result = await _excel.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
break;
}
//switch (input.FileType)
//{
// case 0:
// result = await _csv.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
// break;
// case 1:
// result = await _excel.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
// break;
//}
result = await _excel.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制

21
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CurdBaseAppService.cs

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Reflection;
@ -73,15 +73,16 @@ namespace Win.Sfs.SettleAccount.Bases
string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx";
byte[] result = null;
switch (input.FileType)
{
case 0:
result = await _csv.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
break;
case 1:
result = await _excel.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
break;
}
//switch (input.FileType)
//{
// case 0:
// result = await _csv.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
// break;
// case 1:
// result = await _excel.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
// break;
//}
result = await _excel.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制

20
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs

@ -114,15 +114,17 @@ namespace Win.Sfs.SettleAccount.Bases
string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx";
byte[] result = null;
switch (input.FileType)
{
case 0:
result = await _csv.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
break;
case 1:
result = await _excel.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
break;
}
//switch (input.FileType)
//{
// case 0:
// result = await _csv.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
// break;
// case 1:
// result = await _excel.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
// break;
//}
result = await _excel.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制

24
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SeEdiCompareExportBaseService.cs

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

Loading…
Cancel
Save