From ce2c20171c84ea27feeb975c78e41d55a56d3562 Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 28 Apr 2022 11:17:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/WMS/WMSCusomerKanbanAppService.cs | 15 +++++++++++++++ .../Entities/WMS/WMSHQFKanbanAppService.cs | 7 +++++++ .../Entities/WMS/WMSHQFSharePartAppService .cs | 10 ++++++++++ .../Entities/WMS/WMSHQHKanbanAppService.cs | 5 +++++ .../Entities/WMS/WMSHQHSharePartAppService.cs | 5 +++++ .../Entities/WMS/WMSJitAppService.cs | 9 +++++++-- .../Entities/WMS/WMSKanbanAppService.cs | 5 +++++ .../Entities/WMS/WMSKanbanExtendAppService.cs | 6 +++++- .../Entities/WMS/WMSSharePart90AppService.cs | 5 +++++ .../Entities/WMS/WMSSharePartAppService.cs | 5 +++++ .../Entities/WMS/WmsHQCarAppService.cs | 5 +++++ .../Entities/WMS/WmsHQKBOutputAppService.cs | 12 ++++++++++++ .../Entities/WMS/WmsHQMKanbanAppService.cs | 11 +++++++++++ .../Entities/WMS/WmsHQMSharePartAppService.cs | 11 +++++++++++ .../Report/UnSettleDiffDapperRepository.cs | 2 +- .../Report/UnSettledDetailDapperRepository.cs | 2 +- 16 files changed, 110 insertions(+), 5 deletions(-) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSCusomerKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSCusomerKanbanAppService.cs index b265ce18..9e7cb4cc 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSCusomerKanbanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSCusomerKanbanAppService.cs @@ -363,6 +363,14 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts [UnitOfWork(false)] public async Task WmsCustomerKanbanOutPutPass(WmsJitRequestDto input) { + if (DateTime.Now.ToString("yyyyMM") != input.AccountDate.ToString("yyyyMM")) + { + throw new BusinessException("8989", "填写过账日期应该为当月!"); + + } + + + var sql = "DECLARE @return_value int\n" + "EXEC @return_value = [dbo].[p_wms_output]\n" + " @billnum = N'{0}',\n" + @@ -389,6 +397,13 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts [UnitOfWork(false)] public async Task WmsCustomerKanbanOutPutCancel(WmsJitRequestDto input) { + if (DateTime.Now.ToString("yyyyMM") != input.AccountDate.ToString("yyyyMM")) + { + throw new BusinessException("8989", "填写过账日期应该为当月!"); + + } + + if (input.Guids != null && input.Guids.Count() > 0) { List _ls = new List(); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFKanbanAppService.cs index 588d8740..a01ee600 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFKanbanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFKanbanAppService.cs @@ -356,6 +356,13 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts [UnitOfWork(false)] public async Task WmsHQFKanbanOutPutPass(WmsJitRequestDto input) { + if (DateTime.Now.ToString("yyyyMM") != input.AccountDate.ToString("yyyyMM")) + { + throw new BusinessException("8989", "填写过账日期应该为当月!"); + + } + + var sql = "DECLARE @return_value int\n" + "EXEC @return_value = [dbo].[p_wms_output]\n" + " @billnum = N'{0}',\n" + diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs index 5781f7de..693d4b59 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs @@ -325,6 +325,11 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts [UnitOfWork(false)] public async Task WmsSharePartOutPutPass(WmsJitRequestDto input) { + if (DateTime.Now.ToString("yyyyMM") != input.AccountDate.ToString("yyyyMM")) + { + throw new BusinessException("8989", "填写过账日期应该为当月!"); + + } if (input.Guids != null) { List _ls = new List(); @@ -364,6 +369,11 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts [UnitOfWork(false)] public async Task WmsOutPutDelete(WmsJitRequestDto input) { + if (DateTime.Now.ToString("yyyyMM") != input.AccountDate.ToString("yyyyMM")) + { + throw new BusinessException("8989", "填写过账日期应该为当月!"); + + } var count = _wmsRepository.Count(p => p.BillNum == input.BillNum && p.State != 0); if (count > 0) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs index 04a978f4..9ed84f29 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs @@ -354,6 +354,11 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts [UnitOfWork(false)] public async Task WmsHQHKanbanOutPutPass(WmsJitRequestDto input) { + if (DateTime.Now.ToString("yyyyMM") != input.AccountDate.ToString("yyyyMM")) + { + throw new BusinessException("8989", "填写过账日期应该为当月!"); + + } var sql = "DECLARE @return_value int\n" + "EXEC @return_value = [dbo].[p_wms_output]\n" + " @billnum = N'{0}',\n" + diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs index 4fb05505..5ffb8d76 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs @@ -381,6 +381,11 @@ into temp1 [UnitOfWork(false)] public async Task WmsSharePartOutPutPass(WmsJitRequestDto input) { + if (DateTime.Now.ToString("yyyyMM") != input.AccountDate.ToString("yyyyMM")) + { + throw new BusinessException("8989", "填写过账日期应该为当月!"); + + } if (input.Guids != null) { List _ls = new List(); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs index 716ab540..9e649371 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs @@ -489,8 +489,13 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts [Authorize(SettleAccountPermissions.WMSJIT.Create)] public async Task WmsJitOutPutPass(WmsJitRequestDto input) { - - var sql = "DECLARE @return_value int\n" + + if (DateTime.Now.ToString("yyyyMM") != input.AccountDate.ToString("yyyyMM")) + { + throw new BusinessException("8989", "填写过账日期应该为当月!"); + + } + + var sql = "DECLARE @return_value int\n" + "EXEC @return_value = [dbo].[p_wms_output]\n" + " @billnum = N'{0}',\n" + " @type = 0,\n" + diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs index 70a2ef3f..b20a1fb6 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs @@ -395,6 +395,11 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts [UnitOfWork(false)] public async Task WmsKanbanOutPutPass(WmsJitRequestDto input) { + if (DateTime.Now.ToString("yyyyMM") != input.AccountDate.ToString("yyyyMM")) + { + throw new BusinessException("8989", "填写过账日期应该为当月!"); + + } if (input.Guids != null) { List _ls = new List(); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanExtendAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanExtendAppService.cs index 7dc0d918..a17f382a 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanExtendAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanExtendAppService.cs @@ -511,7 +511,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS // checkList.Add(new ErrorExportDto() { Message = string.Format("物料号:{0}出库数量大于结算数量或寄售库存数量!",itm.SapMaterialCode) }); //} - + //if (checkList.Count > 0) //{ @@ -519,7 +519,11 @@ namespace Win.Sfs.SettleAccount.Entities.WMS // return await ExportErrorReportAsync(checkList, "校验失败.xlsx"); //} + if (DateTime.Now.ToString("yyyyMM") != input.AccountDate.ToString("yyyyMM")) + { + throw new BusinessException("8989", "填写过账日期应该为当月!"); + } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs index 2d80abdf..8f99fce9 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs @@ -374,6 +374,11 @@ namespace Win.Sfs.SettleAccount.Entities.WMS [UnitOfWork(false)] public async Task WmsSharePartOutPutPass(WmsJitRequestDto input) { + if (DateTime.Now.ToString("yyyyMM") != input.AccountDate.ToString("yyyyMM")) + { + throw new BusinessException("8989", "填写过账日期应该为当月!"); + + } if (input.Guids != null) { List _ls = new List(); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs index 52f6714b..5c39382f 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs @@ -514,6 +514,11 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts [UnitOfWork(false)] public async Task WmsSharePartOutPutPass(WmsJitRequestDto input) { + if (DateTime.Now.ToString("yyyyMM") != input.AccountDate.ToString("yyyyMM")) + { + throw new BusinessException("8989", "填写过账日期应该为当月!"); + + } if (input.Guids != null) { List _ls = new List(); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs index a34156be..6c75b09d 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs @@ -314,6 +314,11 @@ namespace Win.Sfs.SettleAccount.Entities.WMS [UnitOfWork(false)] public async Task WmsSharePartOutPutPass(WmsJitRequestDto input) { + if (DateTime.Now.ToString("yyyyMM") != input.AccountDate.ToString("yyyyMM")) + { + throw new BusinessException("8989", "填写过账日期应该为当月!"); + + } if (input.Guids != null) { List _ls = new List(); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs index 4db7f750..d55be809 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs @@ -376,6 +376,11 @@ namespace Win.Sfs.SettleAccount.Entities.WMS // return await ExportErrorReportAsync(checkList,"校验失败.xlsx"); //} + if (DateTime.Now.ToString("yyyyMM") != input.AccountDate.ToString("yyyyMM")) + { + throw new BusinessException("8989", "填写过账日期应该为当月!"); + + } if (_ls.Count() > 0) { @@ -404,6 +409,13 @@ namespace Win.Sfs.SettleAccount.Entities.WMS [UnitOfWork(false)] public async Task WmsKanbanOutPutCancel(WmsJitRequestDto input) { + + if (DateTime.Now.ToString("yyyyMM") != input.AccountDate.ToString("yyyyMM")) + { + throw new BusinessException("8989", "填写过账日期应该为当月!"); + + } + if (input.Guids != null && input.Guids.Count() > 0) { List _ls = new List(); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMKanbanAppService.cs index 455305b1..e05fcb17 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMKanbanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMKanbanAppService.cs @@ -11,6 +11,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using Volo.Abp; using Volo.Abp.Application.Dtos; using Volo.Abp.Caching; using Volo.Abp.Domain.Repositories; @@ -272,6 +273,11 @@ namespace Win.Sfs.SettleAccount.Entities.WMS [UnitOfWork(false)] public async Task WmsHQMKanbanOutPutPass(WmsJitRequestDto input) { + if (DateTime.Now.ToString("yyyyMM") != input.AccountDate.ToString("yyyyMM")) + { + throw new BusinessException("8989", "填写过账日期应该为当月!"); + + } var sql = "DECLARE @return_value int\n" + "EXEC @return_value = [dbo].[p_wms_output]\n" + " @billnum = N'{0}',\n" + @@ -297,6 +303,11 @@ namespace Win.Sfs.SettleAccount.Entities.WMS [Route("WmsHQMKanbanOutPut-Cancel")] public async Task WmsHQMKanbanOutPutCancel(WmsJitRequestDto input) { + if (DateTime.Now.ToString("yyyyMM") != input.AccountDate.ToString("yyyyMM")) + { + throw new BusinessException("8989", "填写过账日期应该为当月!"); + + } if (input.Guids != null && input.Guids.Count() > 0) { List _ls = new List(); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs index 084ed770..c4c7ecf7 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs @@ -11,6 +11,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using Volo.Abp; using Volo.Abp.Application.Dtos; using Volo.Abp.Caching; using Volo.Abp.Domain.Repositories; @@ -313,6 +314,11 @@ namespace Win.Sfs.SettleAccount.Entities.WMS [UnitOfWork(false)] public async Task WmsSharePartOutPutPass(WmsJitRequestDto input) { + if (DateTime.Now.ToString("yyyyMM") != input.AccountDate.ToString("yyyyMM")) + { + throw new BusinessException("8989", "填写过账日期应该为当月!"); + + } if (input.Guids != null) { List _ls = new List(); @@ -375,6 +381,11 @@ namespace Win.Sfs.SettleAccount.Entities.WMS [Route("WmsSharePartOutPut-Cancel")] public async Task WmsSharePartOutPutCancel(WmsJitRequestDto input) { + + + + + if (input.Guids != null && input.Guids.Count() > 0) { List _ls = new List(); diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettleDiffDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettleDiffDapperRepository.cs index 50417fcf..6b35ab4d 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettleDiffDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettleDiffDapperRepository.cs @@ -343,7 +343,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report - var _query = DbConnection.Query(_sql); + var _query = DbConnection.Query(_sql, null, null, true, 1200, null); return _query.ToList(); } diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs index d7736639..8a768f14 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs @@ -360,7 +360,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report string _sql = string.Format(sqlString, str, version); ; - var _query = DbConnection.Query(_sql); + var _query = DbConnection.Query (_sql, null, null, true, 1200, null); ; var _list = _query.ToList();