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 6a8734d5..2cd7c85c 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFKanbanAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFKanbanAppService.cs
@@ -520,6 +520,42 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
}
return ApplicationConsts.SuccessStr;
}
+ ///
+ /// 导出
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("Export")]
+ //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
+ virtual public async Task ExportAsync(WmsKanbanOutPutDetialRequestDto input)
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
+ 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
+ {
+ Name = _fileName,
+ Content = result
+ }
+ );
+ return _fileName;
+
+
+
+ }
}
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 dddc6bee..5781f7de 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs
@@ -527,6 +527,42 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
await _wmsVersionRepository.InsertAsync(_version, true);
}
return ApplicationConsts.SuccessStr;
+ }
+ ///
+ /// 导出
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("Export")]
+ //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
+ virtual public async Task ExportAsync(WmsKanbanOutPutDetialRequestDto input)
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
+ 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
+ {
+ Name = _fileName,
+ Content = result
+ }
+ );
+ return _fileName;
+
+
+
}
}
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 55679d6e..33c7a068 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs
@@ -518,6 +518,42 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
}
return ApplicationConsts.SuccessStr;
}
+ ///
+ /// 导出
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("Export")]
+ //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
+ virtual public async Task ExportAsync(WmsKanbanOutPutDetialRequestDto input)
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
+ 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
+ {
+ Name = _fileName,
+ Content = result
+ }
+ );
+ return _fileName;
+
+
+
+ }
}
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 32c824f2..2f2482d0 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs
@@ -550,6 +550,45 @@ into temp1
}
return ApplicationConsts.SuccessStr;
}
+
+ ///
+ /// 导出
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("Export")]
+ //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
+ virtual public async Task ExportAsync(WmsKanbanOutPutDetialRequestDto input)
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
+ 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
+ {
+ Name = _fileName,
+ Content = result
+ }
+ );
+ return _fileName;
+
+
+
+ }
+
+
}
}
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 1d64d8a7..53d962d9 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs
@@ -585,5 +585,43 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
}
+ ///
+ /// 导出
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("Export")]
+ //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
+ virtual public async Task ExportAsync(WmsKanbanOutPutDetialRequestDto input)
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
+ 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
+ {
+ Name = _fileName,
+ Content = result
+ }
+ );
+ return _fileName;
+
+
+
+ }
+
+
}
}
\ No newline at end of file
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 04946399..083459ed 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs
@@ -134,16 +134,10 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task> GetListAsync( WmsKanbanOutPutRequestDto input)
{
-
-
-
//input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
var entities = await _wmsVersionRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
-
var totalCount = await GetCountAsync(input);
-
-
return new PagedResultDto(totalCount, entities);
}
@@ -763,5 +757,55 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
}
+ ///
+ /// 导出
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("Export")]
+ //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
+ virtual public async Task ExportAsync(WmsKanbanOutPutDetialRequestDto input)
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
+ 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
+ {
+ Name = _fileName,
+ Content = result
+ }
+ );
+ return _fileName;
+
+
+
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
}
}
\ No newline at end of file
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 42530ab6..fba12e6d 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanExtendAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanExtendAppService.cs
@@ -276,7 +276,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
itm.Version,
string.Empty,
string.Empty,
- itm.InvoiceQty,
+ itm.InvoiceQty+itm.ClaimQty+itm.CP7ScrapQty,
tm1==null?0:tm1.Qty,
itm.InvoiceQty,
string.Empty,
@@ -425,7 +425,42 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
return true;
}
+ ///
+ /// 导出
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("Export")]
+ //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
+ virtual public async Task ExportAsync(WmsKanbanOutPutDetialRequestDto input)
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
+ 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
+ {
+ Name = _fileName,
+ Content = result
+ }
+ );
+ return _fileName;
+
+
+
+ }
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 60abb997..4a57875f 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs
@@ -1,8 +1,11 @@
using EFCore.BulkExtensions;
+using Magicodes.ExporterAndImporter.Core;
+using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
+using Shouldly;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -591,7 +594,42 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
}
+ ///
+ /// 导出
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("Export")]
+ //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
+ virtual public async Task ExportAsync(WmsKanbanOutPutDetialRequestDto input)
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
+ 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
+ {
+ Name = _fileName,
+ Content = result
+ }
+ );
+ return _fileName;
+
+
+
+ }
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 d0642581..7bc42c29 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs
@@ -580,5 +580,44 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
}
+
+ ///
+ /// 导出
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("Export")]
+ //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
+ virtual public async Task ExportAsync(WmsKanbanOutPutDetialRequestDto input)
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
+ 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
+ {
+ Name = _fileName,
+ Content = result
+ }
+ );
+ return _fileName;
+
+
+
+ }
+
+
}
}
\ No newline at end of file
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 fbfc7070..4a6856b0 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs
@@ -1,8 +1,11 @@
using EFCore.BulkExtensions;
+using Magicodes.ExporterAndImporter.Core;
+using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
+using Shouldly;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -484,6 +487,42 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
await _wmsVersionRepository.InsertAsync(_version, true);
}
return ApplicationConsts.SuccessStr;
+ }
+ ///
+ /// 导出
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("Export")]
+ //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
+ virtual public async Task ExportAsync(WmsKanbanOutPutDetialRequestDto input)
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
+ 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
+ {
+ Name = _fileName,
+ Content = result
+ }
+ );
+ return _fileName;
+
+
+
}
}
}
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 9527fb78..1ee03dad 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs
@@ -407,7 +407,42 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
}
+ ///
+ /// 导出
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("Export")]
+ //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
+ virtual public async Task ExportAsync(WmsKanbanOutPutDetialRequestDto input)
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
+ 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
+ {
+ Name = _fileName,
+ Content = result
+ }
+ );
+ return _fileName;
+
+
+
+ }
// 物料 物料组 物料描述 物料号 期间 单位 出库数量 结算数量
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 4e4e3b2f..455305b1 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMKanbanAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMKanbanAppService.cs
@@ -1,8 +1,11 @@
using EFCore.BulkExtensions;
+using Magicodes.ExporterAndImporter.Core;
+using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
+using Shouldly;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -435,6 +438,42 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
return ApplicationConsts.SuccessStr;
}
+ ///
+ /// 导出
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("Export")]
+ //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
+ virtual public async Task ExportAsync(WmsKanbanOutPutDetialRequestDto input)
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
+ 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
+ {
+ Name = _fileName,
+ Content = result
+ }
+ );
+ return _fileName;
+
+
+
+ }
}
}
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 f65d2df7..084ed770 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs
@@ -1,8 +1,11 @@
using EFCore.BulkExtensions;
+using Magicodes.ExporterAndImporter.Core;
+using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
+using Shouldly;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -532,5 +535,42 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
}
return ApplicationConsts.SuccessStr;
}
+
+ ///
+ /// 导出
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("Export")]
+ //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
+ virtual public async Task ExportAsync(WmsKanbanOutPutDetialRequestDto input)
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
+ 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
+ {
+ Name = _fileName,
+ Content = result
+ }
+ );
+ 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 2b7173cc..289b673a 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml
@@ -1843,6 +1843,13 @@
+
+
+ 导出
+
+
+
+
红旗F平台备件-出库
@@ -1925,6 +1932,13 @@
上传的文件(前端已经限制只能上传一个附件)
+
+
+ 导出
+
+
+
+
红旗H平台准时化-出库
@@ -2000,6 +2014,13 @@
+
+
+ 导出
+
+
+
+
红旗M平台备件-出库
@@ -2082,6 +2103,13 @@
+
+
+ 导出
+
+
+
+
wms出库
@@ -2171,6 +2199,13 @@
+
+
+ 导出
+
+
+
+
大众看板-出库
@@ -2246,6 +2281,13 @@
+
+
+ 导出
+
+
+
+
wms出库
@@ -2321,6 +2363,13 @@
+
+
+ 导出
+
+
+
+
结算包与散件对应关系服务
@@ -2955,6 +3004,13 @@
+
+
+ 导出
+
+
+
+
大众看板-出库
@@ -3030,6 +3086,13 @@
+
+
+ 导出
+
+
+
+
wms出库-M平台
@@ -3105,6 +3168,13 @@
+
+
+ 导出
+
+
+
+
红旗H平台备件-出库
@@ -3187,6 +3257,13 @@
+
+
+ 导出
+
+
+
+
大众看板-出库
@@ -3262,6 +3339,13 @@
+
+
+ 导出
+
+
+
+
@@ -3352,6 +3436,13 @@
+
+
+ 导出
+
+
+
+
区域相关应用服务
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs
index 4e46dc76..9c8833f3 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs
@@ -286,31 +286,42 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
}
// 交货单号 实际发货日期 KENN号 底盘号 物料号 物料描述 客户物料 组件组物料 组件组物料描述 物料组(车型) 定价 金额 结算平台未结数量 大众R3未结数量 差异金额 差异数量 漏结标识 漏结期间 说明
+
+ [ExporterHeader(DisplayName = "组件组物料", IsIgnore = true)]
+
[ImporterHeader(Name = "组件组物料",IsIgnore =true)]
public string ParentMaterialCode { set; get; }
+ [ExporterHeader(DisplayName = "交货单号")]
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
+ [ExporterHeader(DisplayName = "条码号")]
[ImporterHeader(Name = "条码号")]
//KENN号
public string Kanban { set; get; }
-
+ [ExporterHeader(DisplayName = "物料号")]
[ImporterHeader(Name = "物料号")]
//物料号
public string MaterialCode { set; get; }
+ [ExporterHeader(DisplayName = "物料描述")]
[ImporterHeader(Name = "物料描述")]
//物料描述
public string MaterialDesc { set; get; }
+ [ExporterHeader(DisplayName = "物料组(车型)")]
[ImporterHeader(Name = "物料组(车型)")]
//物料组(车型)
public string MaterialGroup { set; get; }
+ [ExporterHeader(DisplayName = "出库库位")]
[ImporterHeader(Name = "出库库位",IsIgnore =true)]
//出库库位
public string OutPut { set; get; }
+ [ExporterHeader(DisplayName = "入库库位")]
[ImporterHeader(Name = "入库库位", IsIgnore = true)]
//入库库位
public string InPut { set; get; }
+ [ExporterHeader(DisplayName = "状态")]
[ImporterHeader(Name = "状态",IsIgnore =true)]
public int State { get; set; }
+ [ExporterHeader(DisplayName = "客户物料")]
[ImporterHeader(Name = "客户物料")]
///
/// 扩展字段1
@@ -319,6 +330,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
///
/// 扩展字段2
///
+ [ExporterHeader(DisplayName = "订单日期")]
[ImporterHeader(Name = "订单日期")]
public string Extend2 { set; get; }
///
@@ -326,17 +338,20 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
///
[ImporterHeader(Name = "版本号", IsIgnore = true)]
public string Version { set; get; }
+ [ExporterHeader(DisplayName = "结算数量")]
[ImporterHeader(Name = "结算数量")]
public decimal Qty { set; get; }
-
+ [ExporterHeader(DisplayName = "单据")]
[ImporterHeader(Name = "单据", IsIgnore = true)]
public string BillNum { set; get; }
-
+ [ExporterHeader(DisplayName = "任务", IsIgnore = true)]
[ImporterHeader(Name = "任务", IsIgnore = true)]
public Guid TaskId { set; get; }
+ [ExporterHeader(DisplayName = "开票单价")]
[ImporterHeader(Name = "开票单价")]
public decimal Price { set; get; }
+ [ExporterHeader(DisplayName = "开票金额")]
[ImporterHeader(Name = "开票金额")]
public decimal Amt { set; get; }
diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs
index 741e8a54..8c919fae 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs
@@ -44,10 +44,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public decimal SocketQty { get; set; }
//[ExporterHeader(DisplayName = "数量差")]
//public decimal DiffQty { get; set; }
- //[ExporterHeader(DisplayName = "CP7报废")]
- //public decimal CP7ScrapQty { get; set; }
- //[ExporterHeader(DisplayName = "索赔/退货")]
- //public decimal ClaimQty { get; set; }
+ [ExporterHeader(DisplayName = "CP7报废")]
+ public decimal CP7ScrapQty { get; set; }
+ [ExporterHeader(DisplayName = "索赔/退货")]
+ public decimal ClaimQty { get; set; }
[ExporterHeader(DisplayName = "定价")]
public decimal SalePrice { get; set; }
[ExporterHeader(DisplayName = "价格差异")]
@@ -213,6 +213,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" temp1.SapMaterialGroup,\n" +
" temp1.InvoicePrice - ISNULL( temp2.Price, 0 ) AS DiffPrice,\n" +
" temp2.Price AS SalePrice \n" +
+
+ ", temp1.ClaimQty \n"+
+ ",temp1.CP7ScrapQty \n"+
+
" FROM\n" +
" (\n" +
" SELECT\n" +
@@ -223,7 +227,15 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" b.InvoicePrice,\n" +
" g.MaterialCode AS SapMaterialCode,\n" +
" g.MaterialDesc,\n" +
- " g.EstimateTypeDesc AS SapMaterialGroup \n" +
+ " g.EstimateTypeDesc AS SapMaterialGroup, \n" +
+
+ " CASE WHEN e.Type = 'CP7报废' THEN \n"+
+ " isnull(e.Qty, 0) ELSE 0 \n"+
+ " END AS CP7ScrapQty, \n"+
+ " CASE WHEN e.Type = '索赔' THEN \n"+
+ " isnull(e.Qty, 0) ELSE 0 \n"+
+ " END AS ClaimQty \n"+
+
" FROM\n" +
" (\n" +
" SELECT\n" +