From 74561782534a9f9eea9684cbe2f14ce101c19def Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Tue, 28 Nov 2023 13:52:02 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs index 8a82159f..70566372 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs @@ -97,7 +97,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs } //var ediReturnQuery = db.Set().FromSqlRaw("SELECT a.* FROM Set_BBAC_SE_DETAIL a right join (SELECT PN,CustomerPartCodeNoSpace,sum(Qty) as Qty FROM Set_BBAC_SE_DETAIL group by PN,CustomerPartCodeNoSpace having sum(Qty)=0) b on a.PN=b.PN and a.CustomerPartCodeNoSpace=b.CustomerPartCodeNoSpace"); - var ediReturnQuery = db.Set().FromSqlRaw("select * from (SELECT a.* FROM [dbo].[Set_BBAC_SE_EDI] a right join (SELECT PN,CustomerPartCodeNoSpace,sum(Qty) as Qty FROM Set_BBAC_SE_DETAIL group by PN,CustomerPartCodeNoSpace having sum(Qty)=0) b on a.PN=b.PN and a.CustomerPartCodeNoSpace=b.CustomerPartCodeNoSpace and a.IsHaveSeData=1) c where c.id is not null"); + var ediReturnQuery = db.Set().FromSqlRaw("select * from (SELECT a.* FROM [dbo].[Set_BBAC_SE_EDI] a right join (SELECT PN,CustomerPartCodeNoSpace,sum(Qty) as Qty FROM Set_BBAC_SE_DETAIL where BusinessType=1 group by PN,CustomerPartCodeNoSpace having sum(Qty)=0) b on a.PN=b.PN and a.CustomerPartCodeNoSpace=b.CustomerPartCodeNoSpace and a.IsHaveSeData=1) c where c.id is not null"); var ediReturnEntities = ediReturnQuery.ToList(); if(ediReturnEntities.Count>0) { From 3f004de99b6a9645d23ddba70ee27ad98516acc4 Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Tue, 28 Nov 2023 14:12:01 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/BQ/Dtos/BBAC_SE_DETAIL_DTO.cs | 7 +++++++ .../Entities/BQ/Dtos/HBPO_SE_DETAIL_DTO.cs | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_DETAIL_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_DETAIL_DTO.cs index 4f272903..2529d035 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_DETAIL_DTO.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_DETAIL_DTO.cs @@ -280,6 +280,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos [ExporterHeader(DisplayName = "发货人")] public string Oper { get; set; } + /// + /// 数量 + /// + [Display(Name = "数量")] + [ExporterHeader(DisplayName = "数量")] + public decimal Qty { get; set; } + /// /// 排序单号 /// diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SE_DETAIL_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SE_DETAIL_DTO.cs index 507d2769..bf89d3ef 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SE_DETAIL_DTO.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SE_DETAIL_DTO.cs @@ -280,6 +280,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos [ExporterHeader(DisplayName = "发货人")] public string Oper { get; set; } + /// + /// 数量 + /// + [Display(Name = "数量")] + [ExporterHeader(DisplayName = "数量")] + public decimal Qty { get; set; } + /// /// 排序单号 /// From 1d33bb03ee0c1dd7526517c230a98d93f46d9da7 Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Tue, 28 Nov 2023 14:30:42 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E5=8F=98=E5=8A=A8=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=8F=91=E8=BF=90=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SettleAccount.HttpApi.Host/wwwroot/models/vmi/log.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/log.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/log.js index 15b9f7bd..f09dbd84 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/log.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/log.js @@ -54,21 +54,21 @@ export default function () { default: [ { logic: "and", - column: "changedTime", + column: "billTime", action: "biggerThanOrEqual", value: null, readOnly: true, - title: "变动开始", + title: "发运开始", default: dayjs().subtract(1, "month").startOf("day").format("YYYY-MM-DD HH:mm:ss"), clearable: false, }, { logic: "and", - column: "changedTime", + column: "billTime", action: "smallThan", value: null, readOnly: true, - title: "变动结束", + title: "发运结束", default: dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss"), clearable: false, }, From 02ab3626ab79f1134e7e0b3272588c9fd32a7dac Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Tue, 28 Nov 2023 16:58:08 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=80=80=E8=B4=A7?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E6=9C=89EDI=E6=95=B0=E6=8D=AE=E5=88=A4?= =?UTF-8?q?=E6=96=AD=EF=BC=8C=E5=90=8E=E6=9B=B4=E6=96=B0=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs index 70566372..42aa0808 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs @@ -104,7 +104,15 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs ediReturnEntities.ForEach(t => t.IsHaveSeData = false); await db.BulkUpdateAsync(ediReturnEntities).ConfigureAwait(false); } - + + var seReturnQuery = db.Set().FromSqlRaw("select * from (SELECT a.* FROM [dbo].[Set_BBAC_SE_DETAIL] a right join (select PN,CustomerPartCodeNoSpace,COUNT(*) as hj,sum(Qty) as Qty,sum(CAST(IsHaveEdiData AS int)) as haveedi from Set_BBAC_SE_DETAIL where BusinessType=1 group by PN,CustomerPartCodeNoSpace having count(*)>sum(CAST(IsHaveEdiData AS int)) and count(*)>=3 and sum(CAST(IsHaveEdiData AS int))>=1) b on a.PN=b.PN and a.CustomerPartCodeNoSpace=b.CustomerPartCodeNoSpace and a.IsHaveEdiData=0) c where c.id is not null "); + var seReturnEntities = seReturnQuery.ToList(); + if (seReturnEntities.Count > 0) + { + seReturnEntities.ForEach(t => t.IsHaveEdiData = true); + await db.BulkUpdateAsync(seReturnEntities).ConfigureAwait(false); + } + } /// From 24202168475cc8554e3fc74dbba68ebb73d046ff Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Wed, 29 Nov 2023 10:23:09 +0800 Subject: [PATCH 5/7] =?UTF-8?q?Qad=E5=8F=91=E7=A5=A8=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=8F=91=E7=A5=A8=E6=97=B6=E9=97=B4=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wwwroot/models/settle/sync.js | 4 +++ .../BQ/Syncs/JisBBACSeEdiCompareAppService.cs | 34 ++++++++++--------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/sync.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/sync.js index 807a1b75..d08be8ed 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/sync.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/sync.js @@ -7,6 +7,10 @@ export default function () { type: "object", properties: { taskState, + creationTime: { + title: "发票时间", + type: "datetime", + }, taskId: { title: "任务Id", type: "string", diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs index 42aa0808..c20759b5 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs @@ -94,24 +94,26 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs { await transaction.RollbackAsync().ConfigureAwait(false); } - - } - //var ediReturnQuery = db.Set().FromSqlRaw("SELECT a.* FROM Set_BBAC_SE_DETAIL a right join (SELECT PN,CustomerPartCodeNoSpace,sum(Qty) as Qty FROM Set_BBAC_SE_DETAIL group by PN,CustomerPartCodeNoSpace having sum(Qty)=0) b on a.PN=b.PN and a.CustomerPartCodeNoSpace=b.CustomerPartCodeNoSpace"); - var ediReturnQuery = db.Set().FromSqlRaw("select * from (SELECT a.* FROM [dbo].[Set_BBAC_SE_EDI] a right join (SELECT PN,CustomerPartCodeNoSpace,sum(Qty) as Qty FROM Set_BBAC_SE_DETAIL where BusinessType=1 group by PN,CustomerPartCodeNoSpace having sum(Qty)=0) b on a.PN=b.PN and a.CustomerPartCodeNoSpace=b.CustomerPartCodeNoSpace and a.IsHaveSeData=1) c where c.id is not null"); - var ediReturnEntities = ediReturnQuery.ToList(); - if(ediReturnEntities.Count>0) - { - ediReturnEntities.ForEach(t => t.IsHaveSeData = false); - await db.BulkUpdateAsync(ediReturnEntities).ConfigureAwait(false); - } - var seReturnQuery = db.Set().FromSqlRaw("select * from (SELECT a.* FROM [dbo].[Set_BBAC_SE_DETAIL] a right join (select PN,CustomerPartCodeNoSpace,COUNT(*) as hj,sum(Qty) as Qty,sum(CAST(IsHaveEdiData AS int)) as haveedi from Set_BBAC_SE_DETAIL where BusinessType=1 group by PN,CustomerPartCodeNoSpace having count(*)>sum(CAST(IsHaveEdiData AS int)) and count(*)>=3 and sum(CAST(IsHaveEdiData AS int))>=1) b on a.PN=b.PN and a.CustomerPartCodeNoSpace=b.CustomerPartCodeNoSpace and a.IsHaveEdiData=0) c where c.id is not null "); - var seReturnEntities = seReturnQuery.ToList(); - if (seReturnEntities.Count > 0) - { - seReturnEntities.ForEach(t => t.IsHaveEdiData = true); - await db.BulkUpdateAsync(seReturnEntities).ConfigureAwait(false); + //var ediReturnQuery = db.Set().FromSqlRaw("SELECT a.* FROM Set_BBAC_SE_DETAIL a right join (SELECT PN,CustomerPartCodeNoSpace,sum(Qty) as Qty FROM Set_BBAC_SE_DETAIL group by PN,CustomerPartCodeNoSpace having sum(Qty)=0) b on a.PN=b.PN and a.CustomerPartCodeNoSpace=b.CustomerPartCodeNoSpace"); + var ediReturnQuery = db.Set().FromSqlRaw("select * from (SELECT a.* FROM [dbo].[Set_BBAC_SE_EDI] a right join (SELECT PN,CustomerPartCodeNoSpace,sum(Qty) as Qty FROM Set_BBAC_SE_DETAIL where BusinessType=1 group by PN,CustomerPartCodeNoSpace having sum(Qty)=0) b on a.PN=b.PN and a.CustomerPartCodeNoSpace=b.CustomerPartCodeNoSpace and a.IsHaveSeData=1) c where c.id is not null"); + var ediReturnEntities = ediReturnQuery.ToList(); + if (ediReturnEntities.Count > 0) + { + ediReturnEntities.ForEach(t => t.IsHaveSeData = false); + await db.BulkUpdateAsync(ediReturnEntities).ConfigureAwait(false); + } + + var seReturnQuery = db.Set().FromSqlRaw("select * from (SELECT a.* FROM [dbo].[Set_BBAC_SE_DETAIL] a right join (select PN,CustomerPartCodeNoSpace,COUNT(*) as hj,sum(Qty) as Qty,sum(CAST(IsHaveEdiData AS int)) as haveedi from Set_BBAC_SE_DETAIL where BusinessType=1 group by PN,CustomerPartCodeNoSpace having count(*)>sum(CAST(IsHaveEdiData AS int)) and count(*)>=3 and sum(CAST(IsHaveEdiData AS int))>=1) b on a.PN=b.PN and a.CustomerPartCodeNoSpace=b.CustomerPartCodeNoSpace and a.IsHaveEdiData=0) c where c.id is not null "); + var seReturnEntities = seReturnQuery.ToList(); + if (seReturnEntities.Count > 0) + { + seReturnEntities.ForEach(t => t.IsHaveEdiData = true); + await db.BulkUpdateAsync(seReturnEntities).ConfigureAwait(false); + } + } + } From 15b31633e6dfe305aa617743db041eac43327b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Wed, 29 Nov 2023 11:20:36 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E8=B5=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SettleAccount.Application/Bases/PD_SERVICE.cs | 15 +++++++++++++++ .../Entities/BQ/Syncs/PendingDeductionService.cs | 1 - 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs index 2ff046cf..02c75ed1 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs @@ -287,13 +287,28 @@ namespace Win.Sfs.SettleAccount.Bases //[Route("mainquery")] public virtual async Task> MainQueryAsync(TRequestMainInput input) { + var invs= await _invRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount).ConfigureAwait(false); + var invbills = invs.Select(p => p.InvbillNum).ToList(); + var entitys = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount).ConfigureAwait(false); + + entitys=entitys.Where(p => invbills.Contains(p.BillNum)).ToList(); + var totalCount = await _repository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false); var dtos = ObjectMapper.Map, List>(entitys); + + + dtos = dtos.Where(p => invbills.Contains(p.BillNum)).ToList(); + + + + var entity= entitys.FirstOrDefault(); var invoices =entitys.Select(p => p.BillNum); var entities=_invRepository.Where(p => invoices.Contains(p.InvbillNum)).ToList(); + + foreach (var itm in dtos) { var pd = entities.FirstOrDefault(p => p.InvbillNum == itm.BillNum); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs index 147a3e6c..7fdc2d2a 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs @@ -350,7 +350,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs } foreach (var item in bbacinvList) { - if (item.State == SettleBillState.已提交QAD) { item.State = SettleBillState.红冲发票; From bfe9d3ce3a6e478d8e7f612ec6400363646cc66c Mon Sep 17 00:00:00 2001 From: mahao Date: Wed, 29 Nov 2023 11:30:35 +0800 Subject: [PATCH 7/7] up --- .../Entities/BQ/Syncs/JisHBPOSeSyncAppService.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncAppService.cs index 49fc92ef..c7cd7b74 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncAppService.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Volo.Abp.Uow; +using Volo.Abp.Validation; using Win.Sfs.SettleAccount.Entities.BQ.Vmi; using Win.Sfs.SettleAccount.EntityFrameworkCore; @@ -39,6 +40,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs /// /// 执行JisHBPO发运同步 /// + [DisableValidation] [UnitOfWork(IsDisabled = true)] public virtual async Task Invoke(IServiceProvider serviceProvider) {