From e660b83f535bf306b157416f3616776805169b19 Mon Sep 17 00:00:00 2001 From: mahao Date: Tue, 22 Aug 2023 11:58:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E9=9B=B6=E4=BB=B6=E5=85=B3?= =?UTF-8?q?=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MaterialRelationshipDtoBase.cs | 22 +++++++++++++++++++ .../MaterialRelationshipAppService.cs | 14 ++++++------ 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/MaterialRelationship/MaterialRelationshipDtoBase.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/MaterialRelationship/MaterialRelationshipDtoBase.cs index 285487a4..263a90b8 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/MaterialRelationship/MaterialRelationshipDtoBase.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/MaterialRelationship/MaterialRelationshipDtoBase.cs @@ -91,6 +91,12 @@ namespace Win.Sfs.SettleAccount.MaterialRelationships /// [Display(Name = "客户物料号")] public string SettleMaterialCode { get; set; } + + /// + /// 业务类别 + /// + [Display(Name = "业务类别")] + public EnumBusinessType BusinessType { get; set; } } /// @@ -115,6 +121,22 @@ namespace Win.Sfs.SettleAccount.MaterialRelationships /// [ExporterHeaderAttribute(DisplayName = "客户物料号")] public string SettleMaterialCode { get; set; } + + /// + /// 业务类别 + /// + [Display(Name = "业务类别")] + [ExporterHeaderAttribute(DisplayName = "业务类别")] + [ValueMapping("未定义", 0)] + [ValueMapping("JisBBAC", 1)] + [ValueMapping("JisHBPO", 2)] + [ValueMapping("直供件BBAC", 3)] + [ValueMapping("直供件HBPO", 4)] + [ValueMapping("买单件BBAC", 5)] + [ValueMapping("买单件HBPO", 6)] + [ValueMapping("备件", 7)] + [ValueMapping("印度件", 8)] + public EnumBusinessType BusinessType { get; set; } } /// 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 fe67b1ee..a4e1a608 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 @@ -54,8 +54,8 @@ public class MaterialRelationshipAppService : SettleAccountApplicationBase ImportAsync([FromForm] MaterialRelationshipImportRequestDto materialRelationshipImportRequestDto) { - ExportImporter _exportImporter = new ExportImporter(); - var result = await _exportImporter.UploadExcelImport(materialRelationshipImportRequestDto.Files, _excelImportService); + var _exportImporter = new ExportImporter(); + var result = await _exportImporter.UploadExcelImport(materialRelationshipImportRequestDto.Files, _excelImportService).ConfigureAwait(false); var _ls = ObjectMapper.Map, List>(result); List _errorList = new List(); var checkList = new List(); @@ -74,7 +74,7 @@ public class MaterialRelationshipAppService : SettleAccountApplicationBase 0) { - string fileName = await ExportErrorReportAsync(checkList); + string fileName = await ExportErrorReportAsync(checkList).ConfigureAwait(false); return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, fileName = fileName }); } foreach (var itm in _ls) @@ -83,12 +83,12 @@ public class MaterialRelationshipAppService : SettleAccountApplicationBase> GetListAsync(RequestDto input) { - var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true); - var totalCount = await _repository.GetCountByFilterAsync(input.Filters); + var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true).ConfigureAwait(false); + var totalCount = await _repository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false); var dtos = ObjectMapper.Map, List>(entities); return new PagedResultDto(totalCount, dtos); }