From cd736ffcc4a6f3fe6f1b212f1c70cfa3481a60b6 Mon Sep 17 00:00:00 2001 From: mahao Date: Wed, 20 Sep 2023 10:12:46 +0800 Subject: [PATCH] up --- .../Entities/BQ/PUB_SA_SERVICE.cs | 33 +++++++++++++++++++ .../MaterialRelationshipAppService.cs | 4 +++ .../Entities/Prices/PriceListAppService.cs | 21 ++++++------ .../Entities/Prices/PriceListAppServiceBJ.cs | 10 ++++++ .../BQ/Syncs/TM_BJBMPT_OTHER_RECORD.cs | 2 +- 5 files changed, 59 insertions(+), 11 deletions(-) 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 e4027663..1416d7de 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 @@ -124,6 +124,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ /// /// 导入 /// + /// + /// 直供件BBAC、直供件HBPO、备件、印度件 + /// 业务结算数据导入 + /// [HttpPost] public async Task ImportAsync([FromForm] PUB_SAImportRequestDto pubSaImportRequestDto) { @@ -168,6 +172,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ /// /// 删除 /// + /// + /// 同时删除 + /// 结算主表、明细表 + /// 可结算主表、明细表 + /// 不可结算明细表(不可结算又没主表) + /// [HttpPost] public async Task DeleteListAsync(List ids) { @@ -230,6 +240,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ /// /// 直供件BBAC导入 /// + /// + /// 导入数据过滤 + /// * 筛选 Vendor 为15663496的数据 + /// HandleSaDetails方法处理导入的数据 + /// private async Task ImportZhiGongJianBBACAsync([FromForm] IFormFileCollection files) { #region 导入数据转换 @@ -359,6 +374,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ /// /// 数据校验 /// + /// + /// 验证结算分组号是否已存在 + /// 验证 + /// private async Task> CheckAsync(List pubSaDetails) { #region 数据校验 @@ -399,6 +418,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ /// /// 处理结算数据 /// + /// + /// 零件号(Lu)格式处理 + /// 零件号可能存在颜色码 颜色码和塑件码中间用同一用6个空格替换 + /// PN有0开头的数据过滤 '‘’符号 + /// private List HandleSaDetails(List pubSaDetails) { pubSaDetails.ForEach(pubSaDetail => @@ -419,6 +443,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ /// /// 结算数据分组Pn、Lu /// + /// + /// 导入文件中可能存在PN+LU相同的数据 + /// 根据PN+LU分组合计数量后导入 + /// private List GroupPnLu(List pubSaDetails) { return pubSaDetails.GroupBy(t => new { t.PN, t.LU }).Select(t => @@ -587,6 +615,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ /// /// 获取结算关联项 /// + /// + /// 根据结算主表Id获取关联的结算主表、结算明细表、可结算主表、可结算明细表、不可结算明细表要删除的数据 + /// 验证可结算主表状态 + /// 只有可结算主表状态为未结状态时才可以删除结算数据 + /// private async Task<(List pubSas, List pubSaDetails, List pubCanSas, List pubCanSaDetails, List pubNotSaDetails)> GetPubSaDelItemsAsync(Guid id) { //结算主表 diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs index f0ada4a6..7b2c5eb9 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs @@ -51,6 +51,10 @@ public class MaterialRelationshipAppService : SettleAccountApplicationBase /// 导入 /// + /// + /// 数据校验 + /// * 根据客户零件号分组判断是否有客户零件号重复的数据 + /// [HttpPost] public async Task ImportAsync([FromForm] MaterialRelationshipImportRequestDto materialRelationshipImportRequestDto) { 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 50b53d74..05f289c2 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 @@ -54,19 +54,19 @@ namespace Win.Sfs.SettleAccount.Entities.Prices } #region 导入、导出 - ///// - ///// 获取导入模板 - ///// - //[HttpPost("import-template")] - //public virtual async Task ImportTemplateAsync() - //{ - // await Task.CompletedTask; - // return new Microsoft.AspNetCore.Mvc.OkResult(); - //} - /// /// 导入 /// + /// + /// * 销售价格单筛选 Plant(客户编码) 为(1040、1046、104T)的数据 + /// * 客户零件号为 PartNo+6个空格+ES1+ES2 + /// * 根据 合同日期、客户编码、零件号、开始时间、结束时间分组导入(过滤重复数据) + /// 数据校验 + /// * 同一合同日期、客户编码、零件号 不能存在时间交集 + /// * 判断同一个零件号时间区间是否连续 + /// 作废旧合同日期的数据 + /// * 比较新导入的数据和数据库中老数据(同一零件号、旧合同日期的数据修改状态为作废) + /// [HttpPost] public virtual async Task ImportAsync([FromForm] IFormFileCollection files, string version) { @@ -247,6 +247,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices /// /// 修改实体 + /// 修改作废状态 /// [HttpPost] public async Task UpdateAsync(PriceListUpdateDto input) 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 ebf48587..45bba2cb 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 @@ -51,6 +51,16 @@ namespace Win.Sfs.SettleAccount.Entities.Prices /// /// 导入 /// + /// + /// * 备件价格单筛选 Plant(客户编码) 为(1049)的数据 + /// * 客户零件号为 PartNo+6个空格+ES1+ES2 + /// * 根据 合同日期、客户编码、零件号、开始时间、结束时间分组导入(过滤重复数据) + /// 数据校验 + /// * 同一合同日期、客户编码、零件号 不能存在时间交集 + /// * 判断同一个零件号时间区间是否连续 + /// 作废旧合同日期的数据 + /// * 比较新导入的数据和数据库中老数据(同一零件号、旧合同日期的数据修改状态为作废) + /// [HttpPost] public async Task ImportAsync([FromForm] IFormFileCollection files, string version) { diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_OTHER_RECORD.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_OTHER_RECORD.cs index d8db4a4d..22c7245f 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_OTHER_RECORD.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_OTHER_RECORD.cs @@ -11,7 +11,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs #if DEBUG [Table("TM_BJBMPT_OTHER_RECORD")] #else - [Table("EX_BJBMPT_JIS_RECORD")] + [Table("EX_BJBMPT_OTHER_RECORD")] #endif public class TM_BJBMPT_OTHER_RECORD {