From fd50c46bb9bac864d2a02291e296c7a297fa95be Mon Sep 17 00:00:00 2001 From: mahao Date: Tue, 5 Sep 2023 10:40:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=B7=E6=A0=BC=E5=8D=95=E6=8C=89=E7=85=A7?= =?UTF-8?q?=E5=90=88=E5=90=8C=E6=97=A5=E6=9C=9F=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/Prices/PriceListDtoBase.cs | 18 ++++--- .../Entities/BQ/BBAC_SA_SERVICE.cs | 14 ++++-- .../Entities/BQ/HBPO_SA_SERVICE.cs | 19 ++++--- .../Entities/BQ/PUB_SA_SERVICE.cs | 23 +++++---- .../Entities/Prices/PriceListAppService.cs | 50 +------------------ .../Entities/Prices/PriceListAppServiceBJ.cs | 49 ------------------ .../Enums/EnumWMSSend.cs | 20 ++++++++ .../Reports/SaSeEdiCompareDiff.cs | 44 +++++++++++++++- 8 files changed, 110 insertions(+), 127 deletions(-) create mode 100644 code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/Enums/EnumWMSSend.cs diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs index 603e0cf8..17cac9b8 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs @@ -122,14 +122,12 @@ public class PriceListImportDto [ImporterHeader(IsIgnore = true)] [ExcelImporterHeadDesc(Row = 1, Cell = 1)] public string Date { get; set; } - /// /// 合同号 /// [ImporterHeader(IsIgnore = true)] [ExcelImporterHeadDesc(Row = 2, Cell = 1)] public string ContractNo { get; set; } - /// /// 零件号 /// @@ -137,30 +135,36 @@ public class PriceListImportDto [Required(ErrorMessage = "{0}是必填项")] [ImporterHeader(Name = "*Part No.")] public string PartNo { get; set; } - /// /// 价格 /// [ImporterHeader(Name = "Total Price (Old)")] - public string TotalPrice { get; set; } - + public decimal TotalPrice { get; set; } /// /// 开始时间 /// [ImporterHeader(Name = "*Valid From")] public DateTime ValidFrom { get; set; } - /// /// 结束时间 /// [ImporterHeader(Name = "*Valid To")] public DateTime ValidTo { get; set; } - /// /// 客户编码 /// [ImporterHeader(Name = "*Plant")] public string Plant { get; set; } + /// + /// ES1 + /// + [ImporterHeader(Name = "ES1")] + public string ES1 { get; set; } + /// + /// ES2 + /// + [ImporterHeader(Name = "ES2")] + public string ES2 { get; set; } } public class PriceListRequestDto : PagedAndSortedResultRequestDto diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs index 0c034354..180cac91 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs @@ -324,13 +324,13 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase { bbacSaDetails.ForEach(bbacSaDetail => { - var lus = bbacSaDetail.LU.Split(" ").ToList(); + var lus = bbacSaDetail.LU.Split(new string(' ', 4)).ToList(); bbacSaDetail.LU = lus[0].Replace(" ", ""); if (lus.Count > 1) { lus.RemoveAt(0); var luAssemble = lus.Select(t => t.Replace(" ", "")); - bbacSaDetail.LU += luAssemble.Aggregate(" ", (current, index) => current + index); + bbacSaDetail.LU += luAssemble.Aggregate(new string(' ', 6), (current, index) => current + index); } }); @@ -404,10 +404,16 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase bbacSaDetails.ForEach(bbacSaDetail => { //根据物料号、结算日期获取价格 - var priceListEntity = priceListEntitys.FirstOrDefault(t => t.LU == bbacSaDetail.LU && bbacSaDetail.SettleDate >= t.BeginTime && bbacSaDetail.SettleDate <= t.EndTime); + //根据物料号、结算日期获取价格 + var priceListEntity = priceListEntitys + .Where(t => t.LU == bbacSaDetail.LU) + .Where(t => bbacSaDetail.SettleDate >= t.BeginTime && bbacSaDetail.SettleDate <= t.EndTime) + .OrderByDescending(t => t.Date) + .ThenByDescending(t => t.CreationTime) + .FirstOrDefault(); bbacSaDetail.Price = priceListEntity?.Price ?? 0; - bbacSaDetail.PartCode = materialRelationshipEntitys.FirstOrDefault(t => t.SettleMaterialCode == bbacSaDetail.LU)?.ErpMaterialCode ?? bbacSaDetail.LU.Replace(" ", "-"); + bbacSaDetail.PartCode = materialRelationshipEntitys.FirstOrDefault(t => t.SettleMaterialCode == bbacSaDetail.LU)?.ErpMaterialCode ?? bbacSaDetail.LU.Replace(new string(' ', 6), "-"); }); #endregion diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs index 3c1bff65..8550ea42 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs @@ -1,9 +1,7 @@ using System; using System.Collections.Generic; -using System.Globalization; using System.Linq; using System.Threading.Tasks; -using DocumentFormat.OpenXml.Bibliography; using EFCore.BulkExtensions; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; @@ -286,13 +284,13 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase hbpoSaDetails.ForEach(hbpoSaDetail => { hbpoSaDetail.SetId(GuidGenerator.Create()); - var lus = hbpoSaDetail.LU.Split(" ").ToList(); + var lus = hbpoSaDetail.LU.Split(new string(' ', 4)).ToList(); hbpoSaDetail.LU = lus[0].Replace(" ", ""); if (lus.Count > 1) { lus.RemoveAt(0); var luAssemble = lus.Select(t => t.Replace(" ", "")); - hbpoSaDetail.LU += luAssemble.Aggregate(" ", (current, index) => current + index); + hbpoSaDetail.LU += luAssemble.Aggregate(new string(' ', 6), (current, index) => current + index); } hbpoSaDetail.CustomerPartCodeNoSpace = hbpoSaDetail.LU.Replace(" ", ""); hbpoSaDetail.Version = Version; @@ -354,13 +352,13 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase hbpoSaDetails.ForEach(hbpoSaDetail => { hbpoSaDetail.SetId(GuidGenerator.Create()); - List lus = hbpoSaDetail.LU.Split(" ").ToList(); + List lus = hbpoSaDetail.LU.Split(new string(' ', 4)).ToList(); hbpoSaDetail.LU = lus[0].Replace(" ", ""); if (lus.Count > 1) { lus.RemoveAt(0); var luAssemble = lus.Select(t => t.Replace(" ", "")); - hbpoSaDetail.LU += luAssemble.Aggregate(" ", (current, index) => current + index); + hbpoSaDetail.LU += luAssemble.Aggregate(new string(' ', 6), (current, index) => current + index); } hbpoSaDetail.BillNum = hbpoSaBillNum; @@ -376,10 +374,15 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase hbpoSaDetails.ForEach(hbpoSaDetail => { //根据物料号、结算日期获取价格 - var priceListEntity = priceListEntitys.FirstOrDefault(t => t.LU == hbpoSaDetail.LU && hbpoSaDetail.SettleDate >= t.BeginTime && hbpoSaDetail.SettleDate <= t.EndTime); + var priceListEntity = priceListEntitys + .Where(t => t.LU == hbpoSaDetail.LU) + .Where(t => hbpoSaDetail.SettleDate >= t.BeginTime && hbpoSaDetail.SettleDate <= t.EndTime) + .OrderByDescending(t => t.Date) + .ThenByDescending(t => t.CreationTime) + .FirstOrDefault(); hbpoSaDetail.Price = priceListEntity?.Price ?? 0; - hbpoSaDetail.PartCode = materialRelationshipEntitys.FirstOrDefault(t => t.SettleMaterialCode == hbpoSaDetail.LU)?.ErpMaterialCode ?? hbpoSaDetail.LU.Replace(" ", "-"); + hbpoSaDetail.PartCode = materialRelationshipEntitys.FirstOrDefault(t => t.SettleMaterialCode == hbpoSaDetail.LU)?.ErpMaterialCode ?? hbpoSaDetail.LU.Replace(new string(' ', 6), "-"); }); #endregion diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs index 592dbb43..25274cd8 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs @@ -5,12 +5,10 @@ using System.Linq; using System.Linq.Dynamic.Core; using System.Threading.Tasks; using EFCore.BulkExtensions; -using Magicodes.ExporterAndImporter.Core.Models; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -using OfficeOpenXml; using SettleAccount.Domain.BQ; using Volo.Abp; using Volo.Abp.Application.Dtos; @@ -25,7 +23,6 @@ using Win.Sfs.SettleAccount.Entities.Prices; using Win.Sfs.SettleAccount.ExcelImporter; using Win.Sfs.SettleAccount.ExportReports; using Win.Sfs.SettleAccount.MaterialRelationships; -using Win.Sfs.Shared.Filter; using Win.Sfs.Shared.RepositoryBase; namespace Win.Sfs.SettleAccount.Entities.BQ; @@ -398,13 +395,13 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase { pubSaDetails.ForEach(pubSaDetail => { - var lus = pubSaDetail.LU.Split(" ").ToList(); + var lus = pubSaDetail.LU.Split(new string(' ', 4)).ToList(); pubSaDetail.LU = lus[0].Replace(" ", ""); if (lus.Count > 1) { lus.RemoveAt(0); var luAssemble = lus.Select(t => t.Replace(" ", "")); - pubSaDetail.LU += luAssemble.Aggregate(" ", (current, index) => current + index); + pubSaDetail.LU += luAssemble.Aggregate(new string(' ', 6), (current, index) => current + index); } }); @@ -440,7 +437,6 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase importPubSaDetail.KeyCode = importPubSaDetail.PN + importPubSaDetail.LU; importPubSaDetail.Version = _version; importPubSaDetail.BusinessType = businessType; - importPubSaDetail.Site = "工厂"; }); var lus = pubSaDetails.Select(t => t.LU).Distinct().ToList(); if (businessType == EnumBusinessType.BeiJian) @@ -450,7 +446,12 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase pubSaDetails.ForEach(importPubSaDetail => { //根据物料号、结算日期获取价格 - var priceListEntity = priceListEntitys.Find(t => t.LU == importPubSaDetail.LU && importPubSaDetail.SettleDate >= t.BeginDate && importPubSaDetail.SettleDate <= t.EndDate); + var priceListEntity = priceListEntitys + .Where(t => t.LU == importPubSaDetail.LU) + .Where(t => importPubSaDetail.SettleDate >= t.BeginDate && importPubSaDetail.SettleDate <= t.EndDate) + .OrderByDescending(t => t.Date) + .ThenByDescending(t => t.CreationTime) + .FirstOrDefault(); importPubSaDetail.Price = priceListEntity?.Price ?? 0; }); } @@ -461,7 +462,11 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase pubSaDetails.ForEach(importPubSaDetail => { //根据物料号、结算日期获取价格 - var priceListEntity = priceListEntitys.FirstOrDefault(t => t.LU == importPubSaDetail.LU && importPubSaDetail.SettleDate >= t.BeginTime && importPubSaDetail.SettleDate <= t.EndTime); + var priceListEntity = priceListEntitys + .Where(t => t.LU == importPubSaDetail.LU) + .Where(t => importPubSaDetail.SettleDate >= t.BeginTime && importPubSaDetail.SettleDate <= t.EndTime) + .OrderByDescending(t => t.Date) + .FirstOrDefault(); importPubSaDetail.Price = priceListEntity?.Price ?? 0; }); } @@ -473,7 +478,7 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase var seAllMaterialRelationships = materialRelationshipEntitys.Union(materialRelationships); pubSaDetails.ForEach(pubSaDetail => { - pubSaDetail.PartCode = materialRelationshipEntitys.FirstOrDefault(t => t.SettleMaterialCode == pubSaDetail.LU)?.ErpMaterialCode ?? pubSaDetail.LU.Replace(" ", "-"); + pubSaDetail.PartCode = materialRelationshipEntitys.FirstOrDefault(t => t.SettleMaterialCode == pubSaDetail.LU)?.ErpMaterialCode ?? pubSaDetail.LU.Replace(new string(' ', 6), "-"); }); #endregion diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs index 85d64dd8..5b3dfb58 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs @@ -77,57 +77,9 @@ public class PriceListAppService : SettleAccountApplicationBase _checkls.Add("1046"); _checkls.Add("104T"); result = result.Where(p => _checkls.Contains(p.Plant)).ToList(); + result.ForEach(t => t.PartNo = t.PartNo + new string(' ', 6) + t.ES1 + t.ES2); var entityList = ObjectMapper.Map, List>(result); entityList = entityList.GroupBy(p => new { p.LU, p.ClientCode, p.BeginTime, p.EndTime }).Select(p => p.FirstOrDefault()).ToList(); - var contractNo = entityList.FirstOrDefault().ContractNo; - - #region 校验 - if (entityList.Any()) - { - var query = from item1 in entityList - join item2 in entityList - on new { item1.LU } equals new { item2.LU } - where (item1.BeginTime > item2.BeginTime && item1.EndTime < item2.EndTime) || (item2.BeginTime > item1.BeginTime && item2.EndTime < item1.EndTime) || (item1.BeginTime == item2.BeginTime && item1.EndTime != item2.EndTime) || (item1.BeginTime != item2.BeginTime && item1.EndTime == item2.EndTime) - select item1.LU; - var repeat = query.Distinct().ToList(); - foreach (var item in repeat) - { - checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, $"导入文件中物料号:{item},时间区间存在交集", string.Empty)); - } - } - if (checkList.Count > 0) - { - string fileName = await ExportErrorReportAsync(checkList).ConfigureAwait(false); - return new JsonResult(new { code = ApplicationConsts.ImportFailCode, message = "导入失败", fileName = fileName }); - } - #endregion - var lus = entityList.Select(p => p.LU); - - var prices = _priceListRepository.Where(t => lus.Contains(t.LU) && t.ContractNo != contractNo).ToList(); - if (prices.Any()) - { - var query = from item1 in entityList - join item2 in prices - on new { item1.LU } equals new { item2.LU } - where (item1.BeginTime >= item2.BeginTime && item1.EndTime <= item2.EndTime) || (item2.BeginTime >= item1.BeginTime && item2.EndTime <= item1.EndTime) - select item1.LU; - var repeat = query.Distinct().ToList(); - foreach (var item in repeat) - { - checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, $"导入文件中物料号:{item},时间区间与系统内数据存在交集", string.Empty)); - } - } - if (checkList.Count > 0) - { - string fileName = await ExportErrorReportAsync(checkList).ConfigureAwait(false); - return new JsonResult(new { code = ApplicationConsts.ImportFailCode, message = "导入失败", fileName = fileName }); - } - - var priceListModelEntitys = _priceListRepository.Where(t => t.ContractNo == contractNo && lus.Contains(t.LU)).ToList(); - if (priceListModelEntitys.Any()) - { - await _priceListRepository.DeleteManyAsync(priceListModelEntitys).ConfigureAwait(false); - } foreach (var item in entityList) { diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs index 5f02b23f..1e2c5e16 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs @@ -57,55 +57,6 @@ public class PriceListAppServiceBJ : SettleAccountApplicationBase var entityList = ObjectMapper.Map, List>(result); entityList = entityList.GroupBy(p => new { p.LU, p.ClientCode, p.BeginDate, p.EndDate }).Select(p => p.FirstOrDefault()).ToList(); - var contractNo = entityList.FirstOrDefault().ContractNo; - - #region 校验 - if (entityList.Any()) - { - var query = from item1 in entityList - join item2 in entityList - on new { item1.LU } equals new { item2.LU } - where (item1.BeginDate > item2.BeginDate && item1.EndDate < item2.EndDate) || (item2.BeginDate > item1.BeginDate && item2.EndDate < item1.EndDate) || (item1.BeginDate == item2.BeginDate && item1.EndDate != item2.EndDate) || (item1.BeginDate != item2.BeginDate && item1.EndDate == item2.EndDate) - select item1.LU; - var repeat = query.Distinct().ToList(); - foreach (var item in query) - { - checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, $"导入文件中物料号:{item},时间区间存在交集", string.Empty)); - } - } - if (checkList.Count > 0) - { - string fileName = await ExportErrorReportAsync(checkList).ConfigureAwait(false); - return new JsonResult(new { code = ApplicationConsts.ImportFailCode, message = "导入失败", fileName = fileName }); - } - #endregion - var lus = entityList.Select(p => p.LU); - - var prices = _repository.Where(t => lus.Contains(t.LU) && t.ContractNo != contractNo).ToList(); - if (prices.Any()) - { - var query = from item1 in entityList - join item2 in prices - on new { item1.LU } equals new { item2.LU } - where (item1.BeginDate >= item2.BeginDate && item1.EndDate <= item2.EndDate) || (item2.BeginDate >= item1.BeginDate && item2.EndDate <= item1.EndDate) - select item1.LU; - var repeat = query.Distinct().ToList(); - foreach (var item in repeat) - { - checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, $"导入文件中物料号:{item},时间区间与系统内数据存在交集", string.Empty)); - } - } - if (checkList.Count > 0) - { - string fileName = await ExportErrorReportAsync(checkList).ConfigureAwait(false); - return new JsonResult(new { code = ApplicationConsts.ImportFailCode, message = "导入失败", fileName = fileName }); - } - - var priceListModelEntitys = _repository.Where(t => t.ContractNo == contractNo && lus.Contains(t.LU)).ToList(); - if (priceListModelEntitys.Any()) - { - await _repository.DeleteManyAsync(priceListModelEntitys).ConfigureAwait(false); - } foreach (var item in entityList) { diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/Enums/EnumWMSSend.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/Enums/EnumWMSSend.cs new file mode 100644 index 00000000..010c54af --- /dev/null +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/Enums/EnumWMSSend.cs @@ -0,0 +1,20 @@ +using System.ComponentModel.DataAnnotations; + +namespace Win.Sfs.SettleAccount.Enums; + +/// +/// WMS发运 +/// +public enum EnumWMSSend +{ + /// + /// 未定义 + /// + [Display(Name = "未定义")] + None = 0, + /// + /// WMS多发 + /// + [Display(Name = "WMS多发")] + WMSRepeat = 1, +} diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeEdiCompareDiff.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeEdiCompareDiff.cs index bd15faa1..e1d5dd0d 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeEdiCompareDiff.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/SaSeEdiCompareDiff.cs @@ -206,6 +206,27 @@ public class SaSeEdiCompareDetailExportJisBBAC : SaSeEdiCompareDetailExport, ISa [ValueMapping("无结算有发运(有EDI数据)", 5)] [ValueMapping("无结算有发运(无EDI数据)", 6)] public EnumSaSeEdiCompareCategory Category { get; set; } + [Display(Name = "WMS多发")] + [ExporterHeader(DisplayName = "WMS多发")] + [ValueMapping("", 0)] + [ValueMapping("WMS多发", 1)] + public EnumWMSSend WMSSend + { + get + { + return (Category, SaSeQty < 0) switch + { + (EnumSaSeEdiCompareCategory.HaveSaHaveSeHaveEdi, true) => EnumWMSSend.WMSRepeat, + (EnumSaSeEdiCompareCategory.HaveSaHaveSeNotHaveEdi, true) => EnumWMSSend.WMSRepeat, + _ => EnumWMSSend.None + }; + } + } + [Display(Name = "价格信息")] + [ExporterHeader(DisplayName = "价格信息")] + [ValueMapping("有价格信息", true)] + [ValueMapping("无价格信息", false)] + public bool IsHavePrice => FixPrice != null && FixPrice != 0; /// /// 交货单号 /// @@ -297,7 +318,7 @@ public class SaSeEdiCompareDetailExportJisBBAC : SaSeEdiCompareDetailExport, ISa [ExporterHeader(DisplayName = "Edi数量")] public decimal EdiQty { get; set; } /// - /// 结算与EDI量差 + /// 结算与WMS发货量差 /// [ExporterHeader(DisplayName = "结算与WMS发货量差")] public decimal SaSeQty => SAQty - SEQty; @@ -366,6 +387,27 @@ public class SaSeEdiCompareDetailExportJisHBPO : SaSeEdiCompareDetailExport, ISa [ValueMapping("无结算有发运(有EDI数据)", 5)] [ValueMapping("无结算有发运(无EDI数据)", 6)] public EnumSaSeEdiCompareCategory Category { get; set; } + [Display(Name = "WMS多发")] + [ExporterHeader(DisplayName = "WMS多发")] + [ValueMapping("", 0)] + [ValueMapping("WMS多发", 1)] + public EnumWMSSend WMSSend + { + get + { + return (Category, SaSeQty < 0) switch + { + (EnumSaSeEdiCompareCategory.HaveSaHaveSeHaveEdi, true) => EnumWMSSend.WMSRepeat, + (EnumSaSeEdiCompareCategory.HaveSaHaveSeNotHaveEdi, true) => EnumWMSSend.WMSRepeat, + _ => EnumWMSSend.None + }; + } + } + [Display(Name = "价格信息")] + [ExporterHeader(DisplayName = "价格信息")] + [ValueMapping("有价格信息", true)] + [ValueMapping("无价格信息", false)] + public bool IsHavePrice => FixPrice != null && FixPrice != 0; /// /// 交货单号 ///