Browse Source

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

master
学 赵 1 year ago
parent
commit
d5e54a7722
  1. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/assets/docs/test.md
  2. 25
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/fa-yun.js
  3. 27
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/finance.js
  4. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs
  5. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeEdiCompareSumReport.cs
  6. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACSaSeEdiCompareExportService.cs
  7. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACSeEdiCompareExportService.cs
  8. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisHBPOSaSeEdiCompareExportService.cs
  9. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisHBPOSeEdiCompareExportService.cs
  10. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/MaiDanBBACSaSeCompareExportService.cs
  11. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/MaiDanHBPOSaSeCompareExportService.cs
  12. 48
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs
  13. 44
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeCompareExportBaseService.cs
  14. 23
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeEdiCompareExportBaseService.cs
  15. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SeEdiCompareExportBaseService.cs

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/assets/docs/test.md

@ -1,5 +1,5 @@
Markdown Markdown
======== =========
## flowchart ## flowchart

25
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/fa-yun.js

@ -363,7 +363,30 @@ export default function (businessType) {
default: [ default: [
{ {
logic: "and", logic: "and",
column: "wmsBillNum", column: "shippingDate",
action: "biggerThanOrEqual",
value: null,
readOnly: true,
title: "发货开始",
},
{
logic: "and",
column: "shippingDate",
action: "smallThan",
value: null,
readOnly: true,
title: "发运结束",
},
{
logic: "and",
column: "factoryPartCode",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "pn",
action: "like", action: "like",
value: null, value: null,
readOnly: true, readOnly: true,

27
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/finance.js

@ -19,16 +19,25 @@ export default {
const businessType = route.meta.businessType; const businessType = route.meta.businessType;
const config = useConfig(businessType, "cai-wu"); const config = useConfig(businessType, "cai-wu");
const onCommand = async (item, rows) => { const onCommand = async (item, rows) => {
if (item.path === "approval" || item.path === "reject" || item.path === "receive") { if (item.path === "approval" || item.path === "reject" || item.path === "receive" || item.path === "sync") {
if (rows.length > 0) { if (rows.length > 0) {
const message = let message = null;
item.path === "approval" let url = null;
? `确认审核通过选中的${rows.length}行数据吗?` let data = rows.map((o) => o.invbillNum);
: item.path === "reject" if (item.path === "approval") {
? `确认退回选中的${rows.length}行数据吗?` message = `确认审核通过选中的${rows.length}行数据吗?`;
: `确认选中的${rows.length}行数据客户已收票吗?`; url = config.edit.approvalUrl;
const data = item.path === "approval" ? rows.map((o) => o.invbillNum) : item.path === "reject" ? rows[0]["invGroupNum"] : rows.map((o) => o.invbillNum); } else if (item.path === "reject") {
const url = item.path === "approval" ? config.edit.approvalUrl : item.path === "reject" ? config.edit.rejectUrl : config.edit.receivedUrl; message = `确认退回选中的${rows.length}行数据吗?`;
data = rows[0]["invGroupNum"];
url = config.edit.rejectUrl;
} else if (item.path === "receive") {
message = `确认选中的${rows.length}行数据客户已收票吗?`;
url = config.edit.receivedUrl;
} else if (item.path === "sync") {
message = `确认选中的${rows.length}行数据同步到QAD吗?`;
url = "settleaccount/invoice_service/submit-to-qad";
}
await appListRef.value.onClick(async () => await request(url, data, { method: "POST" }), message, true); await appListRef.value.onClick(async () => await request(url, data, { method: "POST" }), message, true);
} }
} else if (item.path === "export-group") { } else if (item.path === "export-group") {

7
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs

@ -318,7 +318,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[Display(Name = "Delivery Date")] [Display(Name = "Delivery Date")]
[ImporterHeader(Name = "Delivery Date")] [ImporterHeader(Name = "Delivery Date")]
public DateTime SettleDate { set; get; } public DateTime SettleDate { set; get; }
/// <summary> /// <summary>
/// 客户零件号 /// 客户零件号
/// </summary> /// </summary>
@ -326,7 +325,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[Required(ErrorMessage = "{0}不能为空")] [Required(ErrorMessage = "{0}不能为空")]
[ImporterHeader(Name = "Material")] [ImporterHeader(Name = "Material")]
public string LU { get; set; } public string LU { get; set; }
/// <summary> /// <summary>
/// 生产号 /// 生产号
/// </summary> /// </summary>
@ -334,14 +332,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[ImporterHeader(Name = "External Delivery ID")] [ImporterHeader(Name = "External Delivery ID")]
[Required(ErrorMessage = "{0}不能为空")] [Required(ErrorMessage = "{0}不能为空")]
public string PN { get; set; } public string PN { get; set; }
/// <summary> /// <summary>
/// 数量 /// 数量
/// </summary> /// </summary>
[Display(Name = "数量")] [Display(Name = "数量")]
[ImporterHeader(Name = "Item")] [ImporterHeader(Name = "Original Delivery Quantity")]
public decimal Qty { get; set; } public decimal Qty { get; set; }
/// <summary> /// <summary>
/// 结算分组号 /// 结算分组号
/// </summary> /// </summary>
@ -349,7 +345,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[ImporterHeader(Name = "External Delivery ID")] [ImporterHeader(Name = "External Delivery ID")]
[Required(ErrorMessage = "{0}不能为空")] [Required(ErrorMessage = "{0}不能为空")]
public string GroupNum { get; set; } public string GroupNum { get; set; }
/// <summary> /// <summary>
/// Supplier /// Supplier
/// </summary> /// </summary>

5
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeEdiCompareSumReport.cs

@ -41,6 +41,11 @@ namespace Win.Sfs.SettleAccount.Reports
[ExporterHeader(DisplayName = "Edi数量")] [ExporterHeader(DisplayName = "Edi数量")]
public decimal EdiQty { get; set; } public decimal EdiQty { get; set; }
/// <summary> /// <summary>
/// 结算与发运数量差
/// </summary>
[ExporterHeader(DisplayName = "WMS发货与EDI数量差")]
public decimal SaSeQty => SAQty - SEQty;
/// <summary>
/// 结算与EDI量差 /// 结算与EDI量差
/// </summary> /// </summary>
[ExporterHeader(DisplayName = "结算与EDI量差")] [ExporterHeader(DisplayName = "结算与EDI量差")]

7
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACSaSeEdiCompareExportService.cs

@ -58,7 +58,7 @@ namespace SettleAccount.Job.Services.Report
} }
/// <summary> /// <summary>
/// 导出 /// 输出JisBBAC结算、发运、Edi比对报表
/// </summary> /// </summary>
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property) public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property)
{ {
@ -123,6 +123,11 @@ namespace SettleAccount.Job.Services.Report
/// <summary> /// <summary>
/// 获取比对数据 /// 获取比对数据
/// </summary> /// </summary>
/// <remarks>
/// 获取全量有结算无发运的数据
/// 获取全量无结算有发运的数据
/// 获取当期有结算有发运的数据
/// </remarks>
public List<SaSeEdiCompareDiff> GetEdiSeSaCompareData(int version, DateTime seStartDateTime, DateTime seEndDateTime) public List<SaSeEdiCompareDiff> GetEdiSeSaCompareData(int version, DateTime seStartDateTime, DateTime seEndDateTime)
{ {
//结算 //结算

2
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACSeEdiCompareExportService.cs

@ -40,7 +40,7 @@ namespace SettleAccount.Job.Services.Report
} }
/// <summary> /// <summary>
/// 导出 /// 输出JisBBAC发运、Edi比对报表
/// </summary> /// </summary>
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property) public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property)
{ {

2
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisHBPOSaSeEdiCompareExportService.cs

@ -57,7 +57,7 @@ namespace SettleAccount.Job.Services.Report
} }
/// <summary> /// <summary>
/// 导出 /// 输出JisHBPO结算、发运、Edi比对报表
/// </summary> /// </summary>
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property) public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property)
{ {

2
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisHBPOSeEdiCompareExportService.cs

@ -37,7 +37,7 @@ namespace SettleAccount.Job.Services.Report
} }
/// <summary> /// <summary>
/// 导出 /// 输出JisHBPO发运、Edi比对报表
/// </summary> /// </summary>
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property) public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property)
{ {

2
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/MaiDanBBACSaSeCompareExportService.cs

@ -58,7 +58,7 @@ namespace SettleAccount.Job.Services.Report
} }
/// <summary> /// <summary>
/// 导出 /// 输出买单件BBAC结算、发运比对报表
/// </summary> /// </summary>
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property) public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property)
{ {

2
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/MaiDanHBPOSaSeCompareExportService.cs

@ -58,7 +58,7 @@ namespace SettleAccount.Job.Services.Report
} }
/// <summary> /// <summary>
/// 导出 /// 输出买单件HBPO结算、发运比对报表
/// </summary> /// </summary>
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property) public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property)
{ {

48
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs

@ -55,15 +55,17 @@ namespace SettleAccount.Job.Services.Report
} }
/// <summary> /// <summary>
/// 导出 /// 输出比对报表
/// 输出报表 /// </summary>
/// <remarks>
/// 直供件BBAC、直供件HBPO、配件、印度件输出比对报表
/// 结算核对明细输出 /// 结算核对明细输出
/// 结算核对汇总输出 /// 结算核对汇总输出
/// 有结算有发货明细输出 /// 有结算有发货明细输出
/// 有结算有发货汇总输出 /// 有结算有发货汇总输出
/// 有结算无发货明细输出 /// 有结算无发货明细输出
/// 有结算无发货汇总输出 /// 有结算无发货汇总输出
/// </summary> /// </remarks>
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property) public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property)
{ {
var version = int.Parse(property.Where(p => p.Name == "Version").FirstOrDefault().Value); var version = int.Parse(property.Where(p => p.Name == "Version").FirstOrDefault().Value);
@ -162,6 +164,11 @@ namespace SettleAccount.Job.Services.Report
/// <summary> /// <summary>
/// 获取比对数据 /// 获取比对数据
/// </summary> /// </summary>
/// <remarks>
/// 获取全量有结算无发运的数据
/// 获取全量无结算有发运的数据
/// 获取当期有结算有发运的数据
/// </remarks>
private List<SaSeCompareDiff> GetSaSeCompareData(EnumBusinessType businessType, int version) private List<SaSeCompareDiff> GetSaSeCompareData(EnumBusinessType businessType, int version)
{ {
//印度件LU对比 //印度件LU对比
@ -171,6 +178,19 @@ namespace SettleAccount.Job.Services.Report
} }
//结算 //结算
var saGroup = from sa in _settleAccountDbContext.Set<PUB_SA_DETAIL>() var saGroup = from sa in _settleAccountDbContext.Set<PUB_SA_DETAIL>()
where sa.BusinessType == businessType
group sa by new { sa.PN, sa.CustomerPartCodeNoSpace } into groupItem
select new
{
groupItem.Key.PN,
groupItem.Key.CustomerPartCodeNoSpace,
Qty = groupItem.Sum(t => t.Qty),
Version = groupItem.Max(t => t.Version),
LU = groupItem.Max(t => t.LU),
SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode)
};
var saGroupByMappingType = from sa in _settleAccountDbContext.Set<PUB_SA_DETAIL>()
where sa.BusinessType == businessType && sa.MappingType == EnumMappingType.None where sa.BusinessType == businessType && sa.MappingType == EnumMappingType.None
group sa by new { sa.PN, sa.CustomerPartCodeNoSpace } into groupItem group sa by new { sa.PN, sa.CustomerPartCodeNoSpace } into groupItem
select new select new
@ -214,7 +234,7 @@ namespace SettleAccount.Job.Services.Report
}; };
//有结算无发运 //有结算无发运
var haveSaNotHaveSeList = (from sa in saGroup var haveSaNotHaveSeList = (from sa in saGroupByMappingType
join se in seGroup join se in seGroup
on new { sa.PN, sa.CustomerPartCodeNoSpace } equals new { se.PN, se.CustomerPartCodeNoSpace } on new { sa.PN, sa.CustomerPartCodeNoSpace } equals new { se.PN, se.CustomerPartCodeNoSpace }
into temp into temp
@ -275,13 +295,27 @@ namespace SettleAccount.Job.Services.Report
} }
/// <summary> /// <summary>
/// 获取比对数据 /// 获取比对数据印度件
/// 印度件根据客户零件号对比
/// </summary> /// </summary>
/// <remarks>
/// 印度件根据客户零件号对比
/// </remarks>
private List<SaSeCompareDiff> GetSaSeCompareDataYinDu(int version) private List<SaSeCompareDiff> GetSaSeCompareDataYinDu(int version)
{ {
//结算 //结算
var saGroup = from sa in _settleAccountDbContext.Set<PUB_SA_DETAIL>() var saGroup = from sa in _settleAccountDbContext.Set<PUB_SA_DETAIL>()
where sa.BusinessType == EnumBusinessType.YinDuJian
group sa by new { sa.CustomerPartCodeNoSpace } into groupItem
select new
{
groupItem.Key.CustomerPartCodeNoSpace,
Qty = groupItem.Sum(t => t.Qty),
Version = groupItem.Max(t => t.Version),
LU = groupItem.Max(t => t.LU),
SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode)
};
var saGroupByMappingType = from sa in _settleAccountDbContext.Set<PUB_SA_DETAIL>()
where sa.BusinessType == EnumBusinessType.YinDuJian && sa.MappingType == EnumMappingType.None where sa.BusinessType == EnumBusinessType.YinDuJian && sa.MappingType == EnumMappingType.None
group sa by new { sa.CustomerPartCodeNoSpace } into groupItem group sa by new { sa.CustomerPartCodeNoSpace } into groupItem
select new select new
@ -322,7 +356,7 @@ namespace SettleAccount.Job.Services.Report
}; };
//有结算无发运 //有结算无发运
var haveSaNotHaveSeList = (from sa in saGroup var haveSaNotHaveSeList = (from sa in saGroupByMappingType
join se in seGroup join se in seGroup
on sa.CustomerPartCodeNoSpace equals se.CustomerPartCodeNoSpace on sa.CustomerPartCodeNoSpace equals se.CustomerPartCodeNoSpace
into temp into temp

44
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeCompareExportBaseService.cs

@ -38,12 +38,30 @@ namespace SettleAccount.Job.Services.Report
/// <summary> /// <summary>
/// 获取结算、发运比对数据 /// 获取结算、发运比对数据
/// </summary> /// </summary>
/// <remarks>
/// 获取全量有结算无发运的数据
/// 获取全量无结算有发运的数据
/// 获取当期有结算有发运的数据
/// </remarks>
public List<SaSeCompareDiff> GetSaSeCompareDataJis<TSaDetail, TSeDetail>(EnumBusinessType businessType, int version, DateTime seStartDateTime, DateTime seEndDateTime) public List<SaSeCompareDiff> GetSaSeCompareDataJis<TSaDetail, TSeDetail>(EnumBusinessType businessType, int version, DateTime seStartDateTime, DateTime seEndDateTime)
where TSaDetail : SA_BASE where TSaDetail : SA_BASE
where TSeDetail : JisSeBase where TSeDetail : JisSeBase
{ {
//结算 //结算
var saGroup = from sa in _settleAccountDbContext.Set<TSaDetail>() var saGroup = from sa in _settleAccountDbContext.Set<TSaDetail>()
where sa.BusinessType == businessType
group sa by new { sa.PN, sa.CustomerPartCodeNoSpace } into groupItem
select new
{
groupItem.Key.PN,
groupItem.Key.CustomerPartCodeNoSpace,
Qty = groupItem.Sum(t => t.Qty),
Version = groupItem.Max(t => t.Version),
LU = groupItem.Max(t => t.LU),
SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode)
};
var saGroupByMappingType = from sa in _settleAccountDbContext.Set<TSaDetail>()
where sa.BusinessType == businessType && sa.MappingType == EnumMappingType.None where sa.BusinessType == businessType && sa.MappingType == EnumMappingType.None
group sa by new { sa.PN, sa.CustomerPartCodeNoSpace } into groupItem group sa by new { sa.PN, sa.CustomerPartCodeNoSpace } into groupItem
select new select new
@ -87,7 +105,7 @@ namespace SettleAccount.Job.Services.Report
}; };
//有结算无发运 //有结算无发运
var haveSaNotHaveSeList = (from sa in saGroup var haveSaNotHaveSeList = (from sa in saGroupByMappingType
join se in seGroup join se in seGroup
on new { sa.PN, sa.CustomerPartCodeNoSpace } equals new { se.PN, se.CustomerPartCodeNoSpace } on new { sa.PN, sa.CustomerPartCodeNoSpace } equals new { se.PN, se.CustomerPartCodeNoSpace }
into temp into temp
@ -147,6 +165,12 @@ namespace SettleAccount.Job.Services.Report
return haveSaHaveSeList.Union(haveSaNotHaveSeList).Union(notHaveSaHaveSeList).ToList(); return haveSaHaveSeList.Union(haveSaNotHaveSeList).Union(notHaveSaHaveSeList).ToList();
} }
/// <summary>
/// 区分比对类型
/// </summary>
/// <remarks>
/// 根据 是否有结算、是否有发运数据区分类型<see cref="EnumPubSaSeCompareCategory"/>
/// </remarks>
public virtual void HandlePubSaSeCompareDiffList(List<SaSeCompareDiff> saSeCompareDiffs) public virtual void HandlePubSaSeCompareDiffList(List<SaSeCompareDiff> saSeCompareDiffs)
{ {
saSeCompareDiffs.ForEach(p => saSeCompareDiffs.ForEach(p =>
@ -189,6 +213,12 @@ namespace SettleAccount.Job.Services.Report
/// <summary> /// <summary>
/// 二次比对 /// 二次比对
/// </summary> /// </summary>
/// <remarks>
/// 检索出有 有结算无发运 和 无结算有发运的数据
/// 根据厂内零件号替换关系替换发运数据的厂内零件号
/// 再次对比
/// </remarks>
/// <returns>二次对比上的数据</returns>
public virtual List<SaSeCompareDiff> HandleSecondCompare(List<SaSeCompareDiff> saSeCompareDiffs, EnumBusinessType businessType) public virtual List<SaSeCompareDiff> HandleSecondCompare(List<SaSeCompareDiff> saSeCompareDiffs, EnumBusinessType businessType)
{ {
//二次匹配上的记录 //二次匹配上的记录
@ -275,8 +305,10 @@ namespace SettleAccount.Job.Services.Report
/// <summary> /// <summary>
/// 结算数据处理 /// 结算数据处理
/// 结算详情表写入库位、替换零件号
/// </summary> /// </summary>
/// <remarks>
/// 对比上发运的结算数据写入库位、替换零件号(开票使用)
/// </remarks>
public virtual void HandleSaDetails<TCanSa, TNotSa>(List<SaSeCompareDiff> saSeCompareDiffs, EnumBusinessType businessType, int version) public virtual void HandleSaDetails<TCanSa, TNotSa>(List<SaSeCompareDiff> saSeCompareDiffs, EnumBusinessType businessType, int version)
where TCanSa : SA_CAN_BASE where TCanSa : SA_CAN_BASE
where TNotSa : SA_NOT_BASE where TNotSa : SA_NOT_BASE
@ -319,8 +351,10 @@ namespace SettleAccount.Job.Services.Report
/// <summary> /// <summary>
/// 处理结算数据 /// 处理结算数据
/// 结算、发运对比上的数据修改结算详情表匹配类型
/// </summary> /// </summary>
/// <remarks>
/// 对比上发运的结算数据修改匹配类型
/// </remarks>
public virtual void HandleSaDetailsMain<T>(List<SaSeCompareDiff> saSeCompareDiffs, EnumBusinessType businessType, int version) where T : SA_BASE public virtual void HandleSaDetailsMain<T>(List<SaSeCompareDiff> saSeCompareDiffs, EnumBusinessType businessType, int version) where T : SA_BASE
{ {
var haveSaHaveSes = saSeCompareDiffs.FindAll(t => t.Category == EnumPubSaSeCompareCategory.HaveSaHaveSe); var haveSaHaveSes = saSeCompareDiffs.FindAll(t => t.Category == EnumPubSaSeCompareCategory.HaveSaHaveSe);
@ -353,6 +387,9 @@ namespace SettleAccount.Job.Services.Report
/// <summary> /// <summary>
/// 创建导出文件结构 /// 创建导出文件结构
/// </summary> /// </summary>
/// <remarks>
/// 根据导出Excel配置的最大行数分Sheel
/// </remarks>
public ExcelExporter BindExcelExporter<T>(List<T> saSeCompareDetailExports, string businessTypeDisplayName) where T : SaSeCompareDetailReport, new() public ExcelExporter BindExcelExporter<T>(List<T> saSeCompareDetailExports, string businessTypeDisplayName) where T : SaSeCompareDetailReport, new()
{ {
//详情Sheet行数 //详情Sheet行数
@ -467,6 +504,5 @@ namespace SettleAccount.Job.Services.Report
{ {
_hubContext.Clients.All.ServerToClient("SaSeCompare", "refresh", ""); _hubContext.Clients.All.ServerToClient("SaSeCompare", "refresh", "");
} }
} }
} }

23
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeEdiCompareExportBaseService.cs

@ -34,6 +34,12 @@ namespace SettleAccount.Job.Services.Report
_settleAccountDbContext = settleAccountDbContext; _settleAccountDbContext = settleAccountDbContext;
} }
/// <summary>
/// 区分比对类型
/// </summary>
/// <remarks>
/// 根据 是否有结算、是否有发运、是否有Edi数据区分类型<see cref="EnumSaSeEdiCompareCategory"/>
/// </remarks>
public virtual void HandleSaSeEdiCompareDiffList(List<SaSeEdiCompareDiff> ediSeSaCompareDiffs) public virtual void HandleSaSeEdiCompareDiffList(List<SaSeEdiCompareDiff> ediSeSaCompareDiffs)
{ {
ediSeSaCompareDiffs.ForEach(p => ediSeSaCompareDiffs.ForEach(p =>
@ -75,6 +81,12 @@ namespace SettleAccount.Job.Services.Report
/// <summary> /// <summary>
/// 二次比对 /// 二次比对
/// </summary> /// </summary>
/// <remarks>
/// 检索出有 有结算无发运 和 无结算有发运的数据
/// 根据厂内零件号替换关系替换发运数据的厂内零件号
/// 再次对比
/// </remarks>
/// <returns>二次对比上的数据</returns>
public virtual List<SaSeEdiCompareDiff> HandleSecondCompare(List<SaSeEdiCompareDiff> saSeEdiCompareDiffs, EnumBusinessType businessType) public virtual List<SaSeEdiCompareDiff> HandleSecondCompare(List<SaSeEdiCompareDiff> saSeEdiCompareDiffs, EnumBusinessType businessType)
{ {
//二次匹配上的记录 //二次匹配上的记录
@ -133,8 +145,10 @@ namespace SettleAccount.Job.Services.Report
/// <summary> /// <summary>
/// 结算数据处理 /// 结算数据处理
/// 写入库位、替换零件号
/// </summary> /// </summary>
/// <remarks>
/// 比对上发有发运的结算数据写入库位、替换零件号
/// </remarks>
public virtual void HandleSaDetails<TCanSa, TNotSa>(List<SaSeEdiCompareDiff> saSeEdiCompareDiff, EnumBusinessType businessType, int version) public virtual void HandleSaDetails<TCanSa, TNotSa>(List<SaSeEdiCompareDiff> saSeEdiCompareDiff, EnumBusinessType businessType, int version)
where TCanSa : SA_CAN_BASE where TCanSa : SA_CAN_BASE
where TNotSa : SA_NOT_BASE where TNotSa : SA_NOT_BASE
@ -177,8 +191,10 @@ namespace SettleAccount.Job.Services.Report
/// <summary> /// <summary>
/// 处理结算数据 /// 处理结算数据
/// 结算、发运对比上的数据修改结算详情表匹配类型
/// </summary> /// </summary>
/// <remarks>
/// 比对上的有发运的结算数据写入匹配类型
/// </remarks>
public virtual void HandleSaDetailsMain<T>(List<SaSeEdiCompareDiff> saSeEdiCompareDiff, EnumBusinessType businessType, int version) where T : SA_BASE public virtual void HandleSaDetailsMain<T>(List<SaSeEdiCompareDiff> saSeEdiCompareDiff, EnumBusinessType businessType, int version) where T : SA_BASE
{ {
var haveSaHaveSes = saSeEdiCompareDiff.FindAll(t => t.Category == EnumSaSeEdiCompareCategory.HaveSaHaveSeHaveEdi || t.Category == EnumSaSeEdiCompareCategory.HaveSaHaveSeNotHaveEdi); var haveSaHaveSes = saSeEdiCompareDiff.FindAll(t => t.Category == EnumSaSeEdiCompareCategory.HaveSaHaveSeHaveEdi || t.Category == EnumSaSeEdiCompareCategory.HaveSaHaveSeNotHaveEdi);
@ -211,6 +227,9 @@ namespace SettleAccount.Job.Services.Report
/// <summary> /// <summary>
/// 创建导出文件结构 /// 创建导出文件结构
/// </summary> /// </summary>
/// <remarks>
/// 根据单Sheel最大行数配置分Sheel页导出
/// </remarks>
public ExcelExporter BindExcelExporter<T>(List<T> saSeEdiCompareDetailExports, string businessTypeDisplayName) where T : SaSeEdiCompareDetailReport, new() public ExcelExporter BindExcelExporter<T>(List<T> saSeEdiCompareDetailExports, string businessTypeDisplayName) where T : SaSeEdiCompareDetailReport, new()
{ {
//详情Sheet行数 //详情Sheet行数

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

@ -39,9 +39,10 @@ namespace SettleAccount.Job.Services.Report
/// 获取发运、Eid比对数据 /// 获取发运、Eid比对数据
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// 输出全量的无发运的Edi数据 /// 检索全量无发运的Edi数据
/// 输出全量的无Edi的发运数据 /// 检索全量无Edi的发运数据
/// 输出检索时间段内的有Edi有发运的数据 /// 检索时间段内有Edi有发运的数据
/// 根据导出Excel配置的最大行数分Sheel
/// </remarks> /// </remarks>
public ExcelExporter GetSeEdiCompareData<TSe, TEdi, TCompareReport>(DateTime seStartDateTime, DateTime seEndDateTime, EnumBusinessType businessType) public ExcelExporter GetSeEdiCompareData<TSe, TEdi, TCompareReport>(DateTime seStartDateTime, DateTime seEndDateTime, EnumBusinessType businessType)
where TSe : JisSeBase where TSe : JisSeBase

Loading…
Cancel
Save