mahao 1 year ago
parent
commit
949971a514
  1. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/CompareService.cs
  2. 10
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs
  3. 72
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeEdiCompareAppService.cs
  4. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs
  5. 11
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/JisBBACEidSeCompareReport.cs
  6. 118
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/PubSaSeCompareDiff.cs
  7. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeEdiCompareDiff.cs
  8. 35
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACSaSeEdiCompareExportService.cs
  9. 12
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACSeEdiCompareExportService.cs
  10. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisHBPOSaSeEdiCompareExportService.cs
  11. 16
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/MaiDanBBACSaSeCompareExportService.cs
  12. 16
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/MaiDanHBPOSaSeCompareExportService.cs
  13. 55
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs
  14. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeCompareExportBaseService.cs
  15. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeEdiCompareExportBaseService.cs
  16. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobAutoMapperProfile.cs

5
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/CompareService.cs

@ -1,6 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Diagnostics;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
@ -76,15 +75,13 @@ public class CompareService : ApplicationService
[HttpPost] [HttpPost]
public async Task<string> SaSeCompare(SaSeCompareRequestDto saSeCompareRequestDto) public async Task<string> SaSeCompare(SaSeCompareRequestDto saSeCompareRequestDto)
{ {
var isWuLiuRole = CurrentUser.IsInRole("物流") == true ? "物流" : "";
var businessTypeDisplayName = saSeCompareRequestDto.BusinessType.ToString(); var businessTypeDisplayName = saSeCompareRequestDto.BusinessType.ToString();
var attributeOfType = saSeCompareRequestDto.BusinessType.GetAttributeOfType<DisplayAttribute>(); var attributeOfType = saSeCompareRequestDto.BusinessType.GetAttributeOfType<DisplayAttribute>();
if (attributeOfType != null) if (attributeOfType != null)
{ {
businessTypeDisplayName = attributeOfType.Name; businessTypeDisplayName = attributeOfType.Name;
} }
var projectName = $"{isWuLiuRole}{businessTypeDisplayName}结算与发运数据对比"; var projectName = $"{businessTypeDisplayName}结算与发运数据对比";
var customConditionList = new List<CustomCondition>(); var customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = saSeCompareRequestDto.Version }); customConditionList.Add(new CustomCondition() { Name = "Version", Value = saSeCompareRequestDto.Version });

10
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs

@ -36,8 +36,14 @@ public class JisBBACSeEdiCompareAppService : ApplicationService, IInvocable
await HandDelEdiDataAsync().ConfigureAwait(false); await HandDelEdiDataAsync().ConfigureAwait(false);
var seDetailGroup = db.Set<BBAC_SE_DETAIL>().Where(t => t.IsHaveEdiData == false).GroupBy(t => new { t.PN, t.CustomerPartCodeNoSpace }).Select(t => new { t.Key.PN, t.Key.CustomerPartCodeNoSpace }); var seDetailGroup = db.Set<BBAC_SE_DETAIL>()
var ediDetailGroup = db.Set<BBAC_SE_EDI>().Where(t => t.IsDeleted == false).GroupBy(t => new { t.PN, t.CustomerPartCodeNoSpace }).Select(t => new { t.Key.PN, t.Key.CustomerPartCodeNoSpace }); .Where(t => t.IsHaveEdiData == false)
.GroupBy(t => new { t.PN, t.CustomerPartCodeNoSpace })
.Select(t => t.Key);
var ediDetailGroup = db.Set<BBAC_SE_EDI>()
.Where(t => t.IsDeleted == false)
.GroupBy(t => new { t.PN, t.CustomerPartCodeNoSpace })
.Select(t => t.Key);
var keyCodes = from se in seDetailGroup var keyCodes = from se in seDetailGroup
from edi in ediDetailGroup from edi in ediDetailGroup

72
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeEdiCompareAppService.cs

@ -25,6 +25,78 @@ public class JisHBPOSeEdiCompareAppService : ApplicationService, IInvocable
_serviceProvider = serviceProvider; _serviceProvider = serviceProvider;
} }
/// <summary>
/// 执行
/// </summary>
public async Task InvokeOld()
{
try
{
using var serviceScope = _serviceProvider.CreateScope();
var db = serviceScope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
await HandDelEdiDataAsync().ConfigureAwait(false);
var seDetailGroup = db.Set<HBPO_SE_DETAIL>()
.Where(t => t.IsHaveEdiData == false)
.GroupBy(t => new { t.PN, t.CustomerPartCodeNoSpace })
.Select(t => t.Key);
var ediDetailGroup = db.Set<HBPO_SE_EDI>()
.Where(t => t.IsDeleted == false && t.IsHaveSeData == false)
.GroupBy(t => new { t.PN, t.CustomerPartCodeNoSpace })
.Select(t => t.Key);
var keyCodes = (from se in seDetailGroup
from edi in ediDetailGroup
where se.PN == edi.PN && se.CustomerPartCodeNoSpace == edi.CustomerPartCodeNoSpace
select new { se.PN, se.CustomerPartCodeNoSpace }
).Take(5000).ToList();
if (keyCodes.Any())
{
var pnGroup = keyCodes.GroupBy(t => t.PN).Select(t => new { t.Key, CustomerPartCodeNoSpaces = t.Select(s => s.CustomerPartCodeNoSpace).Distinct() });
foreach (var item in pnGroup)
{
var pn = item.Key;
var lus = item.CustomerPartCodeNoSpaces;
}
}
var seDetailsQuery = from se in db.Set<HBPO_SE_DETAIL>()
from keyCode in keyCodes
where se.PN == keyCode.PN && se.CustomerPartCodeNoSpace == keyCode.CustomerPartCodeNoSpace && se.IsHaveEdiData == false
select se;
var ediDetailsQuery = from edi in db.Set<HBPO_SE_EDI>()
from keyCode in keyCodes
where edi.PN == keyCode.PN && edi.CustomerPartCodeNoSpace == keyCode.CustomerPartCodeNoSpace && edi.IsDeleted == false && edi.IsHaveSeData == false
select edi;
var seDetails = seDetailsQuery.Take(5000).ToList();
var ediDetails = ediDetailsQuery.Take(5000).ToList();
seDetails.ForEach(t => t.IsHaveEdiData = true);
ediDetails.ForEach(t => t.IsHaveSeData = true);
using var transaction = await db.Database.BeginTransactionAsync().ConfigureAwait(false);
try
{
await db.BulkUpdateAsync<HBPO_SE_DETAIL>(seDetails).ConfigureAwait(false);
await db.BulkUpdateAsync<HBPO_SE_EDI>(ediDetails).ConfigureAwait(false);
await transaction.CommitAsync().ConfigureAwait(false);
}
catch (Exception)
{
await transaction.RollbackAsync().ConfigureAwait(false);
throw;
}
}
catch (Exception)
{
throw;
}
}
/// <summary> /// <summary>
/// 执行 /// 执行
/// </summary> /// </summary>

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs

@ -43,10 +43,6 @@ public class JobAppService: ApplicationService
[UnitOfWork(false)] [UnitOfWork(false)]
public virtual async Task<PagedResultDto<JobDto>> GetListAsync(JobRequestDto input) public virtual async Task<PagedResultDto<JobDto>> GetListAsync(JobRequestDto input)
{ {
if (CurrentUser.IsInRole("物流") && input.Name.Contains("对比"))
{
input.Name = "物流" + input.Name;
}
var lists = await _service.GetListAsync(input).ConfigureAwait(false); var lists = await _service.GetListAsync(input).ConfigureAwait(false);
return new PagedResultDto<JobDto>(lists.Count, lists); return new PagedResultDto<JobDto>(lists.Count, lists);
} }

11
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/JisBBACEidSeCompareReport.cs

@ -1,7 +1,6 @@
using System; using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Magicodes.ExporterAndImporter.Core; using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
namespace Win.Sfs.SettleAccount.Reports; namespace Win.Sfs.SettleAccount.Reports;
@ -12,10 +11,6 @@ public class JisBBACEidSeCompareReport
{ {
} }
/// <summary>
/// JisBBAC Edi、发运对比导出
/// </summary>
[ExcelExporter(MaxRowNumberOnASheet = 500_000)]
public class JisBBACEidSeCompareExport public class JisBBACEidSeCompareExport
{ {
/// <summary> /// <summary>
@ -144,4 +139,10 @@ public class JisBBACEidSeCompareExport
[Display(Name = "差异说明")] [Display(Name = "差异说明")]
[ExporterHeader(DisplayName = "差异说明")] [ExporterHeader(DisplayName = "差异说明")]
public string DiffDesc { get; set; } public string DiffDesc { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "备注")]
[ExporterHeader(DisplayName = "备注")]
public string Remark { get; set; }
} }

118
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/PubSaSeCompareDiff.cs

@ -47,11 +47,6 @@ public class PubSaSeCompareDiff
[Display(Name = "发货数量")] [Display(Name = "发货数量")]
public decimal? SEQty { get; set; } public decimal? SEQty { get; set; }
/// <summary> /// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
public decimal? FixPrice { get; set; }
/// <summary>
/// 生产号 /// 生产号
/// </summary> /// </summary>
[Display(Name = "生产号")] [Display(Name = "生产号")]
@ -299,12 +294,6 @@ public class PubSaSeCompareDetailExportZhiGongJianBBAC : PubSaSeCompareDetailExp
[ValueMapping("否", false)] [ValueMapping("否", false)]
public bool MateType => DiffQty == 0; public bool MateType => DiffQty == 0;
/// <summary> /// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
[ExporterHeader(DisplayName = "定价")]
public virtual decimal? FixPrice { get; set; }
/// <summary>
/// WMS目标库位 /// WMS目标库位
/// </summary> /// </summary>
[Display(Name = "WMS目标库位")] [Display(Name = "WMS目标库位")]
@ -318,18 +307,6 @@ public class PubSaSeCompareDetailExportZhiGongJianBBAC : PubSaSeCompareDetailExp
public string ToErpLocCode { get; set; } public string ToErpLocCode { get; set; }
} }
/// <summary>
/// 直供件BBAC结算与发运对比明细物流
/// </summary>
public class PubSaSeCompareDetailExportZhiGongJianBBACWuLiu : PubSaSeCompareDetailExportZhiGongJianBBAC
{
/// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
[ExporterHeader(IsIgnore = true)]
public override decimal? FixPrice { get; set; }
}
/// <summary> /// <summary>
/// 直供件HBPO结算与发运对比明细 /// 直供件HBPO结算与发运对比明细
@ -420,12 +397,6 @@ public class PubSaSeCompareDetailExportZhiGongJianHBPO : PubSaSeCompareDetailExp
[ValueMapping("否", false)] [ValueMapping("否", false)]
public bool MateType => DiffQty == 0; public bool MateType => DiffQty == 0;
/// <summary> /// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
[ExporterHeader(DisplayName = "定价")]
public virtual decimal? FixPrice { get; set; }
/// <summary>
/// WMS目标库位 /// WMS目标库位
/// </summary> /// </summary>
[Display(Name = "WMS目标库位")] [Display(Name = "WMS目标库位")]
@ -439,19 +410,6 @@ public class PubSaSeCompareDetailExportZhiGongJianHBPO : PubSaSeCompareDetailExp
public string ToErpLocCode { get; set; } public string ToErpLocCode { get; set; }
} }
/// <summary>
/// 直供件HBPO结算与发运对比明细物流
/// </summary>
public class PubSaSeCompareDetailExportZhiGongJianHBPOWuLiu : PubSaSeCompareDetailExportZhiGongJianHBPO
{
/// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
[ExporterHeader(IsIgnore = true)]
public override decimal? FixPrice { get; set; }
}
/// <summary> /// <summary>
/// 买单件BBAC结算与发运对比明细 /// 买单件BBAC结算与发运对比明细
/// </summary> /// </summary>
@ -543,12 +501,6 @@ public class PubSaSeCompareDetailExportMaiDanJianBBAC : PubSaSeCompareDetailExpo
[ValueMapping("否", false)] [ValueMapping("否", false)]
public bool MateType => DiffQty == 0; public bool MateType => DiffQty == 0;
/// <summary> /// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
[ExporterHeader(DisplayName = "定价")]
public virtual decimal? FixPrice { get; set; }
/// <summary>
/// WMS目标库位 /// WMS目标库位
/// </summary> /// </summary>
[Display(Name = "WMS目标库位")] [Display(Name = "WMS目标库位")]
@ -562,19 +514,6 @@ public class PubSaSeCompareDetailExportMaiDanJianBBAC : PubSaSeCompareDetailExpo
public string ToErpLocCode { get; set; } public string ToErpLocCode { get; set; }
} }
/// <summary>
/// 买单件BBAC结算与发运对比明细物流
/// </summary>
public class PubSaSeCompareDetailExportMaiDanJianBBACWuLiu : PubSaSeCompareDetailExportMaiDanJianBBAC
{
/// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
[ExporterHeader(IsIgnore = true)]
public override decimal? FixPrice { get; set; }
}
/// <summary> /// <summary>
/// 买单件HBPO结算与发运对比明细 /// 买单件HBPO结算与发运对比明细
/// </summary> /// </summary>
@ -666,12 +605,6 @@ public class PubSaSeCompareDetailExportMaiDanJianHBPO : PubSaSeCompareDetailExpo
[ValueMapping("否", false)] [ValueMapping("否", false)]
public bool MateType => DiffQty == 0; public bool MateType => DiffQty == 0;
/// <summary> /// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
[ExporterHeader(DisplayName = "定价")]
public virtual decimal? FixPrice { get; set; }
/// <summary>
/// WMS目标库位 /// WMS目标库位
/// </summary> /// </summary>
[Display(Name = "WMS目标库位")] [Display(Name = "WMS目标库位")]
@ -685,19 +618,6 @@ public class PubSaSeCompareDetailExportMaiDanJianHBPO : PubSaSeCompareDetailExpo
public string ToErpLocCode { get; set; } public string ToErpLocCode { get; set; }
} }
/// <summary>
/// 买单件HBPO结算与发运对比明细物流
/// </summary>
public class PubSaSeCompareDetailExportMaiDanJianHBPOWuLiu : PubSaSeCompareDetailExportMaiDanJianHBPO
{
/// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
[ExporterHeader(IsIgnore = true)]
public override decimal? FixPrice { get; set; }
}
/// <summary> /// <summary>
/// 备件结算与发运对比明细 /// 备件结算与发运对比明细
/// </summary> /// </summary>
@ -788,12 +708,6 @@ public class PubSaSeCompareDetailExportBeiJian : PubSaSeCompareDetailExport, IPu
[ValueMapping("否", false)] [ValueMapping("否", false)]
public bool MateType => DiffQty == 0; public bool MateType => DiffQty == 0;
/// <summary> /// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
[ExporterHeader(DisplayName = "定价")]
public virtual decimal? FixPrice { get; set; }
/// <summary>
/// WMS目标库位 /// WMS目标库位
/// </summary> /// </summary>
[Display(Name = "WMS目标库位")] [Display(Name = "WMS目标库位")]
@ -807,19 +721,6 @@ public class PubSaSeCompareDetailExportBeiJian : PubSaSeCompareDetailExport, IPu
public string ToErpLocCode { get; set; } public string ToErpLocCode { get; set; }
} }
/// <summary>
/// 备件结算与发运对比明细物流
/// </summary>
public class PubSaSeCompareDetailExportBeiJianWuLiu : PubSaSeCompareDetailExportBeiJian
{
/// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
[ExporterHeader(IsIgnore = true)]
public override decimal? FixPrice { get; set; }
}
/// <summary> /// <summary>
/// 印度件结算与发运对比明细 /// 印度件结算与发运对比明细
/// </summary> /// </summary>
@ -909,12 +810,6 @@ public class PubSaSeCompareDetailExportYinDuJian : PubSaSeCompareDetailExport, I
[ValueMapping("否", false)] [ValueMapping("否", false)]
public bool MateType => DiffQty == 0; public bool MateType => DiffQty == 0;
/// <summary> /// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
[ExporterHeader(DisplayName = "定价")]
public virtual decimal? FixPrice { get; set; }
/// <summary>
/// WMS目标库位 /// WMS目标库位
/// </summary> /// </summary>
[Display(Name = "WMS目标库位")] [Display(Name = "WMS目标库位")]
@ -927,16 +822,3 @@ public class PubSaSeCompareDetailExportYinDuJian : PubSaSeCompareDetailExport, I
[ExporterHeader(DisplayName = "ERP目标库位")] [ExporterHeader(DisplayName = "ERP目标库位")]
public string ToErpLocCode { get; set; } public string ToErpLocCode { get; set; }
} }
/// <summary>
/// 印度件结算与发运对比明细物流
/// </summary>
public class PubSaSeCompareDetailExportYinDuJianWuLiu : PubSaSeCompareDetailExportYinDuJian
{
/// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
[ExporterHeader(IsIgnore = true)]
public override decimal? FixPrice { get; set; }
}

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

@ -67,11 +67,6 @@ public class SaSeEdiCompareDiff
[Display(Name = "Eid数量")] [Display(Name = "Eid数量")]
public decimal? EdiQty { get; set; } public decimal? EdiQty { get; set; }
/// <summary> /// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
public decimal? FixPrice { get; set; }
/// <summary>
/// 生产号 /// 生产号
/// </summary> /// </summary>
[Display(Name = "生产号")] [Display(Name = "生产号")]

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

@ -16,6 +16,7 @@ using Volo.Abp.DependencyInjection;
using Volo.Abp.ObjectMapping; using Volo.Abp.ObjectMapping;
using Win.Sfs.BaseData.ImportExcelCommon; using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount; using Win.Sfs.SettleAccount;
using Win.Sfs.SettleAccount.Entities.BQ;
using Win.Sfs.SettleAccount.Reports; using Win.Sfs.SettleAccount.Reports;
namespace SettleAccount.Job.Services.Report namespace SettleAccount.Job.Services.Report
@ -72,33 +73,48 @@ namespace SettleAccount.Job.Services.Report
var seEndDateTime = DateTime.Parse(strSeEndDateTime); var seEndDateTime = DateTime.Parse(strSeEndDateTime);
var filename = exportName.FirstOrDefault(); var filename = exportName.FirstOrDefault();
var isWuLiu = filename.StartsWith("物流"); var isWuLiu = filename.StartsWith("物流");
var ediSeSaCompareDiffs = GetEdiSeSaCompareData(version, seStartDateTime, seEndDateTime); var saSeEdiCompareDiffs = GetEdiSeSaCompareData(version, seStartDateTime, seEndDateTime);
HandleSaSeEdiCompareDiffList(ediSeSaCompareDiffs); HandleSaSeEdiCompareDiffList(saSeEdiCompareDiffs);
#region 二次对比
//二次匹配上的记录
var secondMatchHaveSaHaveSes = HandleSecondCompare(saSeEdiCompareDiffs, businessType);
if (secondMatchHaveSaHaveSes.Any())
{
//二次匹配 匹配上的厂内零件号、PN
var secondMatchFPartCodePNs = secondMatchHaveSaHaveSes.Select(t => new { t.ReplaceFactoryPartCode, t.PN });
saSeEdiCompareDiffs.RemoveAll<SaSeEdiCompareDiff>(t => secondMatchFPartCodePNs.Contains(new { t.ReplaceFactoryPartCode, t.PN }));
saSeEdiCompareDiffs.AddRange(secondMatchHaveSaHaveSes);
//二次对比比对上的数据入库
var seCDetailEntitys = _objectMapper.Map<List<SaSeEdiCompareDiff>, List<BBAC_SEC_DETAIL>>(secondMatchHaveSaHaveSes);
_settleAccountDbContext.Set<BBAC_SEC_DETAIL>().AddRange(seCDetailEntitys);
}
#endregion
#region 结算数据处理 #region 结算数据处理
HandleSaDetails<BBAC_CAN_SA_DETAIL, BBAC_NOT_SA_DETAIL>(ediSeSaCompareDiffs, businessType, version); HandleSaDetails<BBAC_CAN_SA_DETAIL, BBAC_NOT_SA_DETAIL>(saSeEdiCompareDiffs, businessType, version);
#endregion #endregion
if (string.IsNullOrEmpty(lu) == false) if (string.IsNullOrEmpty(lu) == false)
{ {
ediSeSaCompareDiffs = ediSeSaCompareDiffs.FindAll(p => p.CustomerPartCode == lu); saSeEdiCompareDiffs = saSeEdiCompareDiffs.FindAll(p => p.CustomerPartCode == lu);
} }
if (string.IsNullOrEmpty(pn) == false) if (string.IsNullOrEmpty(pn) == false)
{ {
ediSeSaCompareDiffs = ediSeSaCompareDiffs.FindAll(p => p.PN == pn); saSeEdiCompareDiffs = saSeEdiCompareDiffs.FindAll(p => p.PN == pn);
} }
ediSeSaCompareDiffs = ediSeSaCompareDiffs.OrderBy(t => t.Category).ToList(); saSeEdiCompareDiffs = saSeEdiCompareDiffs.OrderBy(t => t.Category).ToList();
var excelExporter = new ExcelExporter(); var excelExporter = new ExcelExporter();
if (isWuLiu) if (isWuLiu)
{ {
var items = _objectMapper.Map<List<SaSeEdiCompareDiff>, List<SaSeEdiCompareDetailExportJisBBACWuLiu>>(ediSeSaCompareDiffs); var items = _objectMapper.Map<List<SaSeEdiCompareDiff>, List<SaSeEdiCompareDetailExportJisBBACWuLiu>>(saSeEdiCompareDiffs);
excelExporter = BindExcelExporter<SaSeEdiCompareDetailExportJisBBACWuLiu>(items, businessTypeDisplayName); excelExporter = BindExcelExporter<SaSeEdiCompareDetailExportJisBBACWuLiu>(items, businessTypeDisplayName);
} }
else else
{ {
var items = _objectMapper.Map<List<SaSeEdiCompareDiff>, List<SaSeEdiCompareDetailExportJisBBAC>>(ediSeSaCompareDiffs); var items = _objectMapper.Map<List<SaSeEdiCompareDiff>, List<SaSeEdiCompareDetailExportJisBBAC>>(saSeEdiCompareDiffs);
excelExporter = BindExcelExporter<SaSeEdiCompareDetailExportJisBBAC>(items, businessTypeDisplayName); excelExporter = BindExcelExporter<SaSeEdiCompareDetailExportJisBBAC>(items, businessTypeDisplayName);
} }
@ -126,7 +142,6 @@ namespace SettleAccount.Job.Services.Report
groupItem.Key.CustomerPartCodeNoSpace, groupItem.Key.CustomerPartCodeNoSpace,
Qty = groupItem.Sum(t => t.Qty), Qty = groupItem.Sum(t => t.Qty),
LU = groupItem.Max(t => t.LU), LU = groupItem.Max(t => t.LU),
Price = groupItem.Max(t => t.Price),
SettleDate = groupItem.Max(t => t.SettleDate), SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode), PartCode = groupItem.Max(t => t.PartCode),
}; };
@ -190,7 +205,6 @@ namespace SettleAccount.Job.Services.Report
SAQty = sa.Qty, SAQty = sa.Qty,
SEQty = seEdi.Qty, SEQty = seEdi.Qty,
EdiQty = seEdi.EdiQty, EdiQty = seEdi.EdiQty,
FixPrice = sa.Price,
ToLocCode = seEdi.ToLoc, ToLocCode = seEdi.ToLoc,
ToErpLocCode = seEdi.ErpToLoc, ToErpLocCode = seEdi.ErpToLoc,
SeCustomerPartCode = seEdi.CustomerPartCodeNoSpace, SeCustomerPartCode = seEdi.CustomerPartCodeNoSpace,
@ -214,7 +228,6 @@ namespace SettleAccount.Job.Services.Report
SAQty = sa.Qty, SAQty = sa.Qty,
SEQty = seEdi.Qty, SEQty = seEdi.Qty,
EdiQty = seEdi.EdiQty, EdiQty = seEdi.EdiQty,
FixPrice = sa.Price,
ToLocCode = seEdi.ToLoc, ToLocCode = seEdi.ToLoc,
ToErpLocCode = seEdi.ErpToLoc, ToErpLocCode = seEdi.ErpToLoc,
SeCustomerPartCode = seEdi.CustomerPartCodeNoSpace, SeCustomerPartCode = seEdi.CustomerPartCodeNoSpace,

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

@ -93,6 +93,11 @@ namespace SettleAccount.Job.Services.Report
MateType = "否", MateType = "否",
DiffDesc = "WMS漏发货EDI有订单" DiffDesc = "WMS漏发货EDI有订单"
}).ToList(); }).ToList();
haveEdiNotHaveSeList.ForEach(t =>
{
t.SequenceNumber = GetSequenceNumberDate(t.SequenceNumber);
t.Remark = string.IsNullOrEmpty(t.SequenceNumber) ? "PJIS出单,AJIS未上" : "";
});
//无EDI有发运 //无EDI有发运
var notHaveEdiHaveSeList = _settleAccountDbContext.Set<BBAC_SE_DETAIL>().Where(t => t.IsHaveEdiData == false) var notHaveEdiHaveSeList = _settleAccountDbContext.Set<BBAC_SE_DETAIL>().Where(t => t.IsHaveEdiData == false)
.GroupBy(t => new { t.PN, t.CustomerPartCodeNoSpace }) .GroupBy(t => new { t.PN, t.CustomerPartCodeNoSpace })
@ -170,6 +175,7 @@ namespace SettleAccount.Job.Services.Report
MateType = se.Qty == edi.Qty ? "是" : "否", MateType = se.Qty == edi.Qty ? "是" : "否",
DiffDesc = "WMS有发货EDI有订单" DiffDesc = "WMS有发货EDI有订单"
}).ToList(); }).ToList();
haveEdiHaveSeList.ForEach(t => t.SequenceNumber = GetSequenceNumberDate(t.SequenceNumber));
haveEdiNotHaveSeList.AddRange(haveEdiHaveSeList); haveEdiNotHaveSeList.AddRange(haveEdiHaveSeList);
haveEdiNotHaveSeList.Reverse(); haveEdiNotHaveSeList.Reverse();
@ -205,6 +211,12 @@ namespace SettleAccount.Job.Services.Report
{ {
this._hubContext.Clients.All.ServerToClient("SaSeCompare", "refresh", ""); this._hubContext.Clients.All.ServerToClient("SaSeCompare", "refresh", "");
} }
private string GetSequenceNumberDate(string sequenceNumber)
{
var sequenceNumberDate = sequenceNumber != null && sequenceNumber.Length >= 12 ? sequenceNumber[^12..^4] : sequenceNumber;
return sequenceNumberDate;
}
#endregion #endregion
} }
} }

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

@ -141,7 +141,6 @@ namespace SettleAccount.Job.Services.Report
groupItem.Key.CustomerPartCodeNoSpace, groupItem.Key.CustomerPartCodeNoSpace,
Qty = groupItem.Sum(t => t.Qty), Qty = groupItem.Sum(t => t.Qty),
LU = groupItem.Max(t => t.LU), LU = groupItem.Max(t => t.LU),
Price = groupItem.Max(t => t.Price),
SettleDate = groupItem.Max(t => t.SettleDate), SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode), PartCode = groupItem.Max(t => t.PartCode),
}; };
@ -205,7 +204,6 @@ namespace SettleAccount.Job.Services.Report
SAQty = sa.Qty, SAQty = sa.Qty,
SEQty = seEdi.Qty, SEQty = seEdi.Qty,
EdiQty = seEdi.EdiQty, EdiQty = seEdi.EdiQty,
FixPrice = sa.Price,
ToLocCode = seEdi.ToLoc, ToLocCode = seEdi.ToLoc,
ToErpLocCode = seEdi.ErpToLoc, ToErpLocCode = seEdi.ErpToLoc,
SeCustomerPartCode = seEdi.CustomerPartCodeNoSpace, SeCustomerPartCode = seEdi.CustomerPartCodeNoSpace,
@ -229,7 +227,6 @@ namespace SettleAccount.Job.Services.Report
SAQty = sa.Qty, SAQty = sa.Qty,
SEQty = seEdi.Qty, SEQty = seEdi.Qty,
EdiQty = seEdi.EdiQty, EdiQty = seEdi.EdiQty,
FixPrice = sa.Price,
ToLocCode = seEdi.ToLoc, ToLocCode = seEdi.ToLoc,
ToErpLocCode = seEdi.ErpToLoc, ToErpLocCode = seEdi.ErpToLoc,
SeCustomerPartCode = seEdi.CustomerPartCodeNoSpace, SeCustomerPartCode = seEdi.CustomerPartCodeNoSpace,

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

@ -72,7 +72,6 @@ namespace SettleAccount.Job.Services.Report
var seStartDateTime = DateTime.Parse(strSeStartDateTime); var seStartDateTime = DateTime.Parse(strSeStartDateTime);
var seEndDateTime = DateTime.Parse(strSeEndDateTime); var seEndDateTime = DateTime.Parse(strSeEndDateTime);
var filename = exportName.FirstOrDefault(); var filename = exportName.FirstOrDefault();
var isWuLiu = filename.StartsWith("物流");
var pubSaSeCompareDiffs = GetSaSeCompareData(version, seStartDateTime, seEndDateTime); var pubSaSeCompareDiffs = GetSaSeCompareData(version, seStartDateTime, seEndDateTime);
HandlePubSaSeCompareDiffList(pubSaSeCompareDiffs); HandlePubSaSeCompareDiffList(pubSaSeCompareDiffs);
@ -106,16 +105,8 @@ namespace SettleAccount.Job.Services.Report
} }
pubSaSeCompareDiffs = pubSaSeCompareDiffs.OrderBy(t => t.Category).ToList(); pubSaSeCompareDiffs = pubSaSeCompareDiffs.OrderBy(t => t.Category).ToList();
var excelExporter = new ExcelExporter(); var excelExporter = new ExcelExporter();
if (isWuLiu) var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportMaiDanJianBBAC>>(pubSaSeCompareDiffs);
{ excelExporter = BindExcelExporter<PubSaSeCompareDetailExportMaiDanJianBBAC>(items, businessTypeDisplayName);
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportMaiDanJianBBACWuLiu>>(pubSaSeCompareDiffs);
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportMaiDanJianBBACWuLiu>(items, businessTypeDisplayName);
}
else
{
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportMaiDanJianBBAC>>(pubSaSeCompareDiffs);
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportMaiDanJianBBAC>(items, businessTypeDisplayName);
}
var result = excelExporter.ExportAppendDataAsByteArray(); var result = excelExporter.ExportAppendDataAsByteArray();
result.ShouldNotBeNull(); result.ShouldNotBeNull();
@ -141,7 +132,6 @@ namespace SettleAccount.Job.Services.Report
groupItem.Key.CustomerPartCodeNoSpace, groupItem.Key.CustomerPartCodeNoSpace,
Qty = groupItem.Sum(t => t.Qty), Qty = groupItem.Sum(t => t.Qty),
LU = groupItem.Max(t => t.LU), LU = groupItem.Max(t => t.LU),
Price = groupItem.Max(t => t.Price),
SettleDate = groupItem.Max(t => t.SettleDate), SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode), PartCode = groupItem.Max(t => t.PartCode),
}; };
@ -174,7 +164,6 @@ namespace SettleAccount.Job.Services.Report
PN = sa.PN, PN = sa.PN,
SAQty = sa.Qty, SAQty = sa.Qty,
SEQty = se.Qty, SEQty = se.Qty,
FixPrice = sa.Price,
ToLocCode = se.ToLoc, ToLocCode = se.ToLoc,
ToErpLocCode = se.ErpToLoc, ToErpLocCode = se.ErpToLoc,
SeCustomerPartCode = se.CustomerPartCodeNoSpace, SeCustomerPartCode = se.CustomerPartCodeNoSpace,
@ -196,7 +185,6 @@ namespace SettleAccount.Job.Services.Report
PN = se.PN, PN = se.PN,
SAQty = sa.Qty, SAQty = sa.Qty,
SEQty = se.Qty, SEQty = se.Qty,
FixPrice = sa.Price,
ToLocCode = se.ToLoc, ToLocCode = se.ToLoc,
ToErpLocCode = se.ErpToLoc, ToErpLocCode = se.ErpToLoc,
SeCustomerPartCode = se.CustomerPartCodeNoSpace, SeCustomerPartCode = se.CustomerPartCodeNoSpace,

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

@ -72,7 +72,6 @@ namespace SettleAccount.Job.Services.Report
var seStartDateTime = DateTime.Parse(strSeStartDateTime); var seStartDateTime = DateTime.Parse(strSeStartDateTime);
var seEndDateTime = DateTime.Parse(strSeEndDateTime); var seEndDateTime = DateTime.Parse(strSeEndDateTime);
var filename = exportName.FirstOrDefault(); var filename = exportName.FirstOrDefault();
var isWuLiu = filename.StartsWith("物流");
var pubSaSeCompareDiffs = GetSaSeCompareData(version, seStartDateTime, seEndDateTime); var pubSaSeCompareDiffs = GetSaSeCompareData(version, seStartDateTime, seEndDateTime);
HandlePubSaSeCompareDiffList(pubSaSeCompareDiffs); HandlePubSaSeCompareDiffList(pubSaSeCompareDiffs);
@ -106,16 +105,8 @@ namespace SettleAccount.Job.Services.Report
} }
pubSaSeCompareDiffs = pubSaSeCompareDiffs.OrderBy(t => t.Category).ToList(); pubSaSeCompareDiffs = pubSaSeCompareDiffs.OrderBy(t => t.Category).ToList();
var excelExporter = new ExcelExporter(); var excelExporter = new ExcelExporter();
if (isWuLiu) var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportMaiDanJianHBPO>>(pubSaSeCompareDiffs);
{ excelExporter = BindExcelExporter<PubSaSeCompareDetailExportMaiDanJianHBPO>(items, businessTypeDisplayName);
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportMaiDanJianHBPOWuLiu>>(pubSaSeCompareDiffs);
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportMaiDanJianHBPOWuLiu>(items, businessTypeDisplayName);
}
else
{
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportMaiDanJianHBPO>>(pubSaSeCompareDiffs);
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportMaiDanJianHBPO>(items, businessTypeDisplayName);
}
var result = excelExporter.ExportAppendDataAsByteArray(); var result = excelExporter.ExportAppendDataAsByteArray();
result.ShouldNotBeNull(); result.ShouldNotBeNull();
@ -141,7 +132,6 @@ namespace SettleAccount.Job.Services.Report
groupItem.Key.CustomerPartCodeNoSpace, groupItem.Key.CustomerPartCodeNoSpace,
Qty = groupItem.Sum(t => t.Qty), Qty = groupItem.Sum(t => t.Qty),
LU = groupItem.Max(t => t.LU), LU = groupItem.Max(t => t.LU),
Price = groupItem.Max(t => t.Price),
SettleDate = groupItem.Max(t => t.SettleDate), SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode), PartCode = groupItem.Max(t => t.PartCode),
}; };
@ -174,7 +164,6 @@ namespace SettleAccount.Job.Services.Report
PN = sa.PN, PN = sa.PN,
SAQty = sa.Qty, SAQty = sa.Qty,
SEQty = se.Qty, SEQty = se.Qty,
FixPrice = sa.Price,
ToLocCode = se.ToLoc, ToLocCode = se.ToLoc,
ToErpLocCode = se.ErpToLoc, ToErpLocCode = se.ErpToLoc,
SeCustomerPartCode = se.CustomerPartCodeNoSpace, SeCustomerPartCode = se.CustomerPartCodeNoSpace,
@ -196,7 +185,6 @@ namespace SettleAccount.Job.Services.Report
PN = se.PN, PN = se.PN,
SAQty = sa.Qty, SAQty = sa.Qty,
SEQty = se.Qty, SEQty = se.Qty,
FixPrice = sa.Price,
ToLocCode = se.ToLoc, ToLocCode = se.ToLoc,
ToErpLocCode = se.ErpToLoc, ToErpLocCode = se.ErpToLoc,
SeCustomerPartCode = se.CustomerPartCodeNoSpace, SeCustomerPartCode = se.CustomerPartCodeNoSpace,

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

@ -99,7 +99,6 @@ namespace SettleAccount.Job.Services.Report
businessTypeDisplayName = attributeOfType.Name; businessTypeDisplayName = attributeOfType.Name;
} }
var filename = exportName.FirstOrDefault(); var filename = exportName.FirstOrDefault();
var isWuLiu = filename.StartsWith("物流");
//var pubSaSeCompareDiffs = _pubSaSeCompareDapperRepository.GetDetailDiffReportList(strBusinessType, version, seStartDateTime, seEndDateTime); //var pubSaSeCompareDiffs = _pubSaSeCompareDapperRepository.GetDetailDiffReportList(strBusinessType, version, seStartDateTime, seEndDateTime);
var pubSaSeCompareDiffs = GetSaSeCompareData(businessType, version, DateTime.Parse(seStartDateTime), DateTime.Parse(seEndDateTime)); var pubSaSeCompareDiffs = GetSaSeCompareData(businessType, version, DateTime.Parse(seStartDateTime), DateTime.Parse(seEndDateTime));
@ -140,58 +139,26 @@ namespace SettleAccount.Job.Services.Report
{ {
case EnumBusinessType.ZhiGongJianBBAC: case EnumBusinessType.ZhiGongJianBBAC:
{ {
if (isWuLiu) var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportZhiGongJianBBAC>>(pubSaSeCompareDiffs);
{ excelExporter = BindExcelExporter<PubSaSeCompareDetailExportZhiGongJianBBAC>(items, businessTypeDisplayName);
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportZhiGongJianBBACWuLiu>>(pubSaSeCompareDiffs);
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportZhiGongJianBBACWuLiu>(items, businessTypeDisplayName);
}
else
{
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportZhiGongJianBBAC>>(pubSaSeCompareDiffs);
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportZhiGongJianBBAC>(items, businessTypeDisplayName);
}
} }
break; break;
case EnumBusinessType.ZhiGongJianHBPO: case EnumBusinessType.ZhiGongJianHBPO:
{ {
if (isWuLiu) var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportZhiGongJianHBPO>>(pubSaSeCompareDiffs);
{ excelExporter = BindExcelExporter<PubSaSeCompareDetailExportZhiGongJianHBPO>(items, businessTypeDisplayName);
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportZhiGongJianHBPOWuLiu>>(pubSaSeCompareDiffs);
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportZhiGongJianHBPOWuLiu>(items, businessTypeDisplayName);
}
else
{
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportZhiGongJianHBPO>>(pubSaSeCompareDiffs);
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportZhiGongJianHBPO>(items, businessTypeDisplayName);
}
} }
break; break;
case EnumBusinessType.BeiJian: case EnumBusinessType.BeiJian:
{ {
if (isWuLiu) var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportBeiJian>>(pubSaSeCompareDiffs);
{ excelExporter = BindExcelExporter<PubSaSeCompareDetailExportBeiJian>(items, businessTypeDisplayName);
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportBeiJianWuLiu>>(pubSaSeCompareDiffs);
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportBeiJianWuLiu>(items, businessTypeDisplayName);
}
else
{
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportBeiJian>>(pubSaSeCompareDiffs);
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportBeiJian>(items, businessTypeDisplayName);
}
} }
break; break;
case EnumBusinessType.YinDuJian: case EnumBusinessType.YinDuJian:
{ {
if (isWuLiu) var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportYinDuJian>>(pubSaSeCompareDiffs);
{ excelExporter = BindExcelExporter<PubSaSeCompareDetailExportYinDuJian>(items, businessTypeDisplayName);
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportYinDuJianWuLiu>>(pubSaSeCompareDiffs);
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportYinDuJianWuLiu>(items, businessTypeDisplayName);
}
else
{
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportYinDuJian>>(pubSaSeCompareDiffs);
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportYinDuJian>(items, businessTypeDisplayName);
}
} }
break; break;
default: default:
@ -228,7 +195,6 @@ namespace SettleAccount.Job.Services.Report
groupItem.Key.CustomerPartCodeNoSpace, groupItem.Key.CustomerPartCodeNoSpace,
Qty = groupItem.Sum(t => t.Qty), Qty = groupItem.Sum(t => t.Qty),
LU = groupItem.Max(t => t.LU), LU = groupItem.Max(t => t.LU),
Price = groupItem.Max(t => t.Price),
SettleDate = groupItem.Max(t => t.SettleDate), SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode), PartCode = groupItem.Max(t => t.PartCode),
}; };
@ -261,7 +227,6 @@ namespace SettleAccount.Job.Services.Report
PN = sa.PN, PN = sa.PN,
SAQty = sa.Qty, SAQty = sa.Qty,
SEQty = se.Qty, SEQty = se.Qty,
FixPrice = sa.Price,
ToLocCode = se.ToLocCode, ToLocCode = se.ToLocCode,
ToErpLocCode = se.ToErpLocCode, ToErpLocCode = se.ToErpLocCode,
SeCustomerPartCode = se.CustomerPartCodeNoSpace, SeCustomerPartCode = se.CustomerPartCodeNoSpace,
@ -283,7 +248,6 @@ namespace SettleAccount.Job.Services.Report
PN = se.PN, PN = se.PN,
SAQty = sa.Qty, SAQty = sa.Qty,
SEQty = se.Qty, SEQty = se.Qty,
FixPrice = sa.Price,
ToLocCode = se.ToLocCode, ToLocCode = se.ToLocCode,
ToErpLocCode = se.ToErpLocCode, ToErpLocCode = se.ToErpLocCode,
SeCustomerPartCode = se.CustomerPartCodeNoSpace, SeCustomerPartCode = se.CustomerPartCodeNoSpace,
@ -310,7 +274,6 @@ namespace SettleAccount.Job.Services.Report
groupItem.Key.CustomerPartCodeNoSpace, groupItem.Key.CustomerPartCodeNoSpace,
Qty = groupItem.Sum(t => t.Qty), Qty = groupItem.Sum(t => t.Qty),
LU = groupItem.Max(t => t.LU), LU = groupItem.Max(t => t.LU),
Price = groupItem.Max(t => t.Price),
SettleDate = groupItem.Max(t => t.SettleDate), SettleDate = groupItem.Max(t => t.SettleDate),
PartCode = groupItem.Max(t => t.PartCode), PartCode = groupItem.Max(t => t.PartCode),
}; };
@ -341,7 +304,6 @@ namespace SettleAccount.Job.Services.Report
CustomerOfflineTime = sa.SettleDate, CustomerOfflineTime = sa.SettleDate,
SAQty = sa.Qty, SAQty = sa.Qty,
SEQty = se.Qty, SEQty = se.Qty,
FixPrice = sa.Price,
ToLocCode = se.ToLocCode, ToLocCode = se.ToLocCode,
ToErpLocCode = se.ToErpLocCode, ToErpLocCode = se.ToErpLocCode,
SeCustomerPartCode = se.CustomerPartCodeNoSpace, SeCustomerPartCode = se.CustomerPartCodeNoSpace,
@ -362,7 +324,6 @@ namespace SettleAccount.Job.Services.Report
CustomerOfflineTime = sa.SettleDate, CustomerOfflineTime = sa.SettleDate,
SAQty = sa.Qty, SAQty = sa.Qty,
SEQty = se.Qty, SEQty = se.Qty,
FixPrice = sa.Price,
ToLocCode = se.ToLocCode, ToLocCode = se.ToLocCode,
ToErpLocCode = se.ToErpLocCode, ToErpLocCode = se.ToErpLocCode,
SeCustomerPartCode = se.CustomerPartCodeNoSpace, SeCustomerPartCode = se.CustomerPartCodeNoSpace,

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

@ -113,7 +113,6 @@ namespace SettleAccount.Job.Services.Report
CustomerOfflineTime = haveSaNotHaveSe.CustomerOfflineTime, CustomerOfflineTime = haveSaNotHaveSe.CustomerOfflineTime,
SAQty = haveSaNotHaveSe.SAQty, SAQty = haveSaNotHaveSe.SAQty,
SEQty = notHaveSaHaveSe.SEQty, SEQty = notHaveSaHaveSe.SEQty,
FixPrice = haveSaNotHaveSe.FixPrice,
PN = haveSaNotHaveSe.PN, PN = haveSaNotHaveSe.PN,
ToLocCode = notHaveSaHaveSe.ToLocCode, ToLocCode = notHaveSaHaveSe.ToLocCode,
ToErpLocCode = notHaveSaHaveSe.ToErpLocCode, ToErpLocCode = notHaveSaHaveSe.ToErpLocCode,

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

@ -116,7 +116,6 @@ namespace SettleAccount.Job.Services.Report
SAQty = haveSaNotHaveSe.SAQty, SAQty = haveSaNotHaveSe.SAQty,
SEQty = notHaveSaHaveSe.SEQty, SEQty = notHaveSaHaveSe.SEQty,
EdiQty = notHaveSaHaveSe.EdiQty, EdiQty = notHaveSaHaveSe.EdiQty,
FixPrice = haveSaNotHaveSe.FixPrice,
PN = haveSaNotHaveSe.PN, PN = haveSaNotHaveSe.PN,
ToLocCode = notHaveSaHaveSe.ToLocCode, ToLocCode = notHaveSaHaveSe.ToLocCode,
ToErpLocCode = notHaveSaHaveSe.ToErpLocCode, ToErpLocCode = notHaveSaHaveSe.ToErpLocCode,

8
code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobAutoMapperProfile.cs

@ -30,6 +30,8 @@ namespace SettleAccount.Job
{ {
CreateMap<SaSeEdiCompareDiff, SaSeEdiCompareDetailExportJisBBAC>(); CreateMap<SaSeEdiCompareDiff, SaSeEdiCompareDetailExportJisBBAC>();
CreateMap<SaSeEdiCompareDiff, SaSeEdiCompareDetailExportJisHBPO>(); CreateMap<SaSeEdiCompareDiff, SaSeEdiCompareDetailExportJisHBPO>();
CreateMap<SaSeEdiCompareDiff, BBAC_SEC_DETAIL>();
CreateMap<SaSeEdiCompareDiff, HBPO_SEC_DETAIL>();
} }
/// <summary> /// <summary>
@ -38,17 +40,11 @@ namespace SettleAccount.Job
private void CreateMapSaSeCompare() private void CreateMapSaSeCompare()
{ {
CreateMap<PubSaSeCompareDiff, PubSaSeCompareDetailExportZhiGongJianBBAC>(); CreateMap<PubSaSeCompareDiff, PubSaSeCompareDetailExportZhiGongJianBBAC>();
CreateMap<PubSaSeCompareDiff, PubSaSeCompareDetailExportZhiGongJianBBACWuLiu>();
CreateMap<PubSaSeCompareDiff, PubSaSeCompareDetailExportZhiGongJianHBPO>(); CreateMap<PubSaSeCompareDiff, PubSaSeCompareDetailExportZhiGongJianHBPO>();
CreateMap<PubSaSeCompareDiff, PubSaSeCompareDetailExportZhiGongJianHBPOWuLiu>();
CreateMap<PubSaSeCompareDiff, PubSaSeCompareDetailExportMaiDanJianBBAC>(); CreateMap<PubSaSeCompareDiff, PubSaSeCompareDetailExportMaiDanJianBBAC>();
CreateMap<PubSaSeCompareDiff, PubSaSeCompareDetailExportMaiDanJianBBACWuLiu>();
CreateMap<PubSaSeCompareDiff, PubSaSeCompareDetailExportMaiDanJianHBPO>(); CreateMap<PubSaSeCompareDiff, PubSaSeCompareDetailExportMaiDanJianHBPO>();
CreateMap<PubSaSeCompareDiff, PubSaSeCompareDetailExportMaiDanJianHBPOWuLiu>();
CreateMap<PubSaSeCompareDiff, PubSaSeCompareDetailExportBeiJian>(); CreateMap<PubSaSeCompareDiff, PubSaSeCompareDetailExportBeiJian>();
CreateMap<PubSaSeCompareDiff, PubSaSeCompareDetailExportBeiJianWuLiu>();
CreateMap<PubSaSeCompareDiff, PubSaSeCompareDetailExportYinDuJian>(); CreateMap<PubSaSeCompareDiff, PubSaSeCompareDetailExportYinDuJian>();
CreateMap<PubSaSeCompareDiff, PubSaSeCompareDetailExportYinDuJianWuLiu>();
CreateMap<PubSaSeCompareDiff, PUB_SEC_DETAIL>(); CreateMap<PubSaSeCompareDiff, PUB_SEC_DETAIL>();
} }
} }

Loading…
Cancel
Save