From ef1adc6201a2aa0f32d826da978db2f9d10cd9da Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 9 Mar 2022 08:56:31 +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 --- .../WMS/WmsOutputSumInterfaceAppService.cs | 24 +++++++------- .../Entities/WMS/WmsUnInterface.cs | 11 ------- .../SettleAccount.Application.xml | 7 ++++ .../Report/ErpSumOutputDapperRepository.cs | 33 ++++++++++--------- 4 files changed, 36 insertions(+), 39 deletions(-) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOutputSumInterfaceAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOutputSumInterfaceAppService.cs index 09317794..3d0b70c1 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOutputSumInterfaceAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOutputSumInterfaceAppService.cs @@ -80,22 +80,22 @@ namespace Win.Sfs.SettleAccount.Entities.WMS _excelImportService = excelImportService; } - [HttpPost] - [Route("ExcelImport")] - [UnitOfWork(false)] - //[Authorize(SettleAccountPermissions.PriceLists.Create)] - virtual public async Task ImportAsync([FromForm] IFormFileCollection files, string version,string accountDate) - { - ExportImporter _exportImporter = new ExportImporter(); + //[HttpPost] + //[Route("ExcelImport")] + //[UnitOfWork(false)] + ////[Authorize(SettleAccountPermissions.PriceLists.Create)] + //virtual public async Task ImportAsync([FromForm] IFormFileCollection files, string version,string accountDate) + //{ + // ExportImporter _exportImporter = new ExportImporter(); - var result = await _exportImporter.UploadExcelImport(files, _excelImportService); - var _list = result.Where(p => p.实际出库数量 != 0).ToList(); + // var result = await _exportImporter.UploadExcelImport(files, _excelImportService); + // var _list = result.Where(p => p.实际出库数量 != 0).ToList(); - _dapper.InsertWmsSum(_list, version,DateTime.Parse(accountDate)); + // _dapper.InsertWmsSum(_list, version,DateTime.Parse(accountDate)); - return ApplicationConsts.SuccessStr; - } + // return ApplicationConsts.SuccessStr; + //} /// /// 准时化出库主表 /// diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs index 5875aecb..43e3d620 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs @@ -104,10 +104,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS } } await _wmsRepository.GetDbContext().BulkInsertAsync(_lst); - return ApplicationConsts.SuccessStr; - - } @@ -147,18 +144,13 @@ namespace Win.Sfs.SettleAccount.Entities.WMS virtual public async Task ExportAsync(WmsRequestDetailReportDto input) { - var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, int.MaxValue, 0, true); IExporter _excel = new ExcelExporter(); byte[] result = null; - var _fileName = string.Format("汇总合计报表_{0}.xlsx", Guid.NewGuid().ToString()); result = await _excel.ExportAsByteArray(entities); - - result.ShouldNotBeNull(); - //保存导出文件到服务器存成二进制 await _excelImportService.SaveBlobAsync( new SaveExcelImportInputDto @@ -168,9 +160,6 @@ namespace Win.Sfs.SettleAccount.Entities.WMS } ); return _fileName; - - - } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml index 295199a7..6a62379c 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml @@ -4297,6 +4297,13 @@ 上传的文件(前端已经限制只能上传一个附件) + + + 红旗未结核对 + + 上传的文件(前端已经限制只能上传一个附件) + + 红旗工厂备件明细 diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/ErpSumOutputDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/ErpSumOutputDapperRepository.cs index 1de5c519..fb4e28c8 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/ErpSumOutputDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/ErpSumOutputDapperRepository.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Volo.Abp.DependencyInjection; using Volo.Abp.Domain.Repositories.Dapper; using Volo.Abp.EntityFrameworkCore; +using Win.Sfs.SettleAccount.Entities; namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report { @@ -167,7 +168,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report - public virtual void InsertWmsSum(List p_list,string version,DateTime accountDate) + public virtual void InsertWmsSum(List p_list,string version,DateTime accountDate) { StringBuilder _buffer = new StringBuilder(); var billnum ="S" +DateTime.Now.ToString("yyyyMMddhhmmss"); @@ -224,27 +225,27 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report sql = string.Format(sql, taskid, - itm.行号, - itm.结算单, + itm.LineNumber.ToString(), + itm.BillNum, "ZKE1", "1001", "00", - itm.销售渠道, - itm.客户代码, - itm.客户代码, - itm.结算编码, - itm.物料号, + itm.SaleCode, + itm.ClientCode, + itm.ClientCode, + itm.SettleCode, + itm.MaterialCode, "1000", string.Empty, - itm.已出库金额, - itm.实际出库数量, + itm.Price, + itm.OutputQty, - itm.客户, - itm.物料组编码, - itm.物料组车型, - itm.出库类型, - itm.开票单价, + itm.Client, + itm.MaterialGroupCode, + itm.MaterialGroup, + itm.Type, + itm.OutPutAmt, "0", billnum @@ -281,7 +282,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " , '{8}' \n" + " , {9} )"; - sql= string.Format(sql, + sql=string.Format(sql, taskid , "TA_WMS_JSKH" , count.ToString(),