From 91f00944927b0e31245b13105c34ef6a369eeaba Mon Sep 17 00:00:00 2001 From: mahao Date: Thu, 29 Jun 2023 16:21:32 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E5=9B=9E=E5=86=B2=20Details=20=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=8F=96=E5=90=84=E8=87=AA=E7=9A=84=E7=89=A9=E5=93=81?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Notes/BackFlushNotes/BackFlushNoteAppService.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/BackFlushNotes/BackFlushNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/BackFlushNotes/BackFlushNoteAppService.cs index 07e300af2..3706029de 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/BackFlushNotes/BackFlushNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/BackFlushNotes/BackFlushNoteAppService.cs @@ -58,7 +58,12 @@ public class BackFlushNoteAppService : { if (backFlushNotes != null && backFlushNotes.Count > 0) { + // 主零件号 var itemCodes = backFlushNotes.Select(t => t.ItemCode); + // 从零件号 + var detailsItemCodes = backFlushNotes.SelectMany(t => t.Details).Select(t => t.ItemCode); + itemCodes = itemCodes.Concat(detailsItemCodes).Distinct(); + List itemBasicDtos = await _itemBasicAppService.GetByCodesAsync(itemCodes).ConfigureAwait(false); backFlushNotes.ForEach(t => @@ -70,8 +75,12 @@ public class BackFlushNoteAppService : t.ItemDesc2 = itemBasicDto.Desc2; t.Details.ForEach(tDetail => { - tDetail.ItemDesc1 = itemBasicDto.Desc1; - tDetail.ItemDesc2 = itemBasicDto.Desc2; + var detailsItemBasicDto = itemBasicDtos.FirstOrDefault(w => w.Code == tDetail.ItemCode); + if (detailsItemBasicDto != null) + { + tDetail.ItemDesc1 = detailsItemBasicDto.Desc1; + tDetail.ItemDesc2 = detailsItemBasicDto.Desc2; + } }); } }); From a2639d7d94c2de1e1434319a180034bad6d9191d Mon Sep 17 00:00:00 2001 From: "boxu.zheng" Date: Thu, 29 Jun 2023 16:25:32 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E5=8F=91=E6=96=99=20?= =?UTF-8?q?=E5=92=8C=20=E7=9B=98=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Balances/BalanceManager.cs | 18 +++++++++--------- .../Balances/BalanceValidateExtension.cs | 9 ++++----- .../BackFlusNotes/IBackFlushNoteAppService.cs | 2 +- .../BackFlushNotes/BackFlushNoteAppService.cs | 8 ++++---- .../Notes/CountNotes/CountNoteAppService.cs | 2 ++ .../Requests/CountAdjustRequestEventHandler.cs | 6 ++++++ 6 files changed, 26 insertions(+), 19 deletions(-) diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceManager.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceManager.cs index a7babf41a..d0c19e6a6 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceManager.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceManager.cs @@ -451,14 +451,14 @@ public class BalanceManager : DomainService, IBalanceManager { expression = expression.And(p => p.ExpireDate > DateTime.Now); } - //筛选有效库区 - if (validLocationAreas.Any() ) - { - if (!string.IsNullOrEmpty(validLocationAreas[0])) - { - expression = expression.And(p => validLocationAreas.Contains(p.LocationArea)); - } - } + //筛选有效库区 2023-6-29 李智慧 王旭 袁静雯 确认不需要做区域校验 + //if (validLocationAreas.Any()) + //{ + // if (!string.IsNullOrEmpty(validLocationAreas[0])) + // { + // expression = expression.And(p => validLocationAreas.Contains(p.LocationArea)); + // } + //} var allBalances = await (await _balanceRepository.GetDbSetAsync().ConfigureAwait(false)) .Where(expression) @@ -606,7 +606,7 @@ public class BalanceManager : DomainService, IBalanceManager Logger.LogDebug($"{traceId}:RequestQty:{requestQty},RemainQty:{remainingQty},AvailableQty:{balanceQty},RecommendQty:{recommendQty}"); return recommendQty; } - + /// /// 计算推荐库位 /// diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceValidateExtension.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceValidateExtension.cs index aafbf6dba..85dc6083d 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceValidateExtension.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceValidateExtension.cs @@ -108,13 +108,12 @@ public static class BalanceValidateExtension /// public static List SortByFifo(this List balances) { - return balances .OrderBy(p => p.Lot) - .ThenBy(p => p.ArriveDate) - .ThenByDescending(p => p.Qty) - .ThenBy(p => p.LocationCode) - .ThenBy(p => p.PackingCode) + //.ThenBy(p => p.ArriveDate) + //.ThenByDescending(p => p.Qty) + //.ThenBy(p => p.LocationCode) + //.ThenBy(p => p.PackingCode) .ToList(); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/BackFlusNotes/IBackFlushNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/BackFlusNotes/IBackFlushNoteAppService.cs index 2de4b8ab2..84c8f5aa8 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/BackFlusNotes/IBackFlushNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/BackFlusNotes/IBackFlushNoteAppService.cs @@ -9,5 +9,5 @@ ISfsStoreMasterReadOnlyAppServiceBase> CreateManyAsync(List inputs); - Task> GetListByProductRecycleNumber(string number); + Task> GetListByProductRecycleNumberAsync(string number); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/BackFlushNotes/BackFlushNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/BackFlushNotes/BackFlushNoteAppService.cs index 07e300af2..506fbad1a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/BackFlushNotes/BackFlushNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/BackFlushNotes/BackFlushNoteAppService.cs @@ -32,7 +32,7 @@ public class BackFlushNoteAppService : { var entities = ObjectMapper.Map, List>(inputs); - entities = await ProcessingBackFlushNoteData(entities).ConfigureAwait(false); + entities = await ProcessingBackFlushNoteDataAsync(entities).ConfigureAwait(false); entities = await _backFlushNoteManager.CreateManyAsync(entities).ConfigureAwait(false); @@ -42,7 +42,7 @@ public class BackFlushNoteAppService : } [HttpGet("by-product-recyle-number")] - public async Task> GetListByProductRecycleNumber(string number) + public async Task> GetListByProductRecycleNumberAsync(string number) { var entities = await _repository.GetListAsync(t => t.ProductRecycleNumber == number, true) .ConfigureAwait(false); @@ -54,12 +54,12 @@ public class BackFlushNoteAppService : /// 处理数据 /// /// - private async Task> ProcessingBackFlushNoteData(List backFlushNotes) + private async Task> ProcessingBackFlushNoteDataAsync(List backFlushNotes) { if (backFlushNotes != null && backFlushNotes.Count > 0) { var itemCodes = backFlushNotes.Select(t => t.ItemCode); - List itemBasicDtos = await _itemBasicAppService.GetByCodesAsync(itemCodes).ConfigureAwait(false); + var itemBasicDtos = await _itemBasicAppService.GetByCodesAsync(itemCodes).ConfigureAwait(false); backFlushNotes.ForEach(t => { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs index 042e52d93..d6a62e406 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs @@ -95,6 +95,8 @@ public class CountNoteAppService : detail.LocationGroup = locationDto.LocationGroupCode; detail.LocationErpCode = locationDto.ErpLocationCode; detail.WarehouseCode = locationDto.WarehouseCode; + detail.PackingCode=detail.PackingCode ?? ""; + detail.Lot = detail.Lot ?? ""; detail.ItemCode = itemcBasicDto.Code; detail.ItemDesc1 = itemcBasicDto.Desc1; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CountAdjustRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CountAdjustRequestEventHandler.cs index e927211b9..c26fbd720 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CountAdjustRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CountAdjustRequestEventHandler.cs @@ -50,6 +50,12 @@ public class CountAdjustRequestEventHandler { if (entity.DirectCreateNote) { + entity.Details.ForEach(p => + { + p.PackingCode = p.PackingCode ?? ""; + p.Lot = p.Lot ?? ""; + p.ContainerCode = p.ContainerCode ?? ""; + }); await ThawBalancesAsync(entity).ConfigureAwait(false); var note = await BuildCountAdjustNoteCreateInputAsync(entity).ConfigureAwait(false); From 96624a17cedfb046fcdec8b1f80d1ddaedfed6f4 Mon Sep 17 00:00:00 2001 From: "boxu.zheng" Date: Thu, 29 Jun 2023 16:30:30 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E6=94=B9=E5=9B=9E=E5=8E=BB=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Balances/BalanceValidateExtension.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceValidateExtension.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceValidateExtension.cs index 85dc6083d..a512067eb 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceValidateExtension.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceValidateExtension.cs @@ -110,10 +110,10 @@ public static class BalanceValidateExtension { return balances .OrderBy(p => p.Lot) - //.ThenBy(p => p.ArriveDate) - //.ThenByDescending(p => p.Qty) - //.ThenBy(p => p.LocationCode) - //.ThenBy(p => p.PackingCode) + .ThenBy(p => p.ArriveDate) + .ThenByDescending(p => p.Qty) + .ThenBy(p => p.LocationCode) + .ThenBy(p => p.PackingCode) .ToList(); } From 42d7a298e258560b240d6fa90e0d4f5805286155 Mon Sep 17 00:00:00 2001 From: mahao Date: Thu, 29 Jun 2023 16:34:47 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E5=9B=9E=E5=86=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Notes/BackFlushNotes/BackFlushNoteAppService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/BackFlushNotes/BackFlushNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/BackFlushNotes/BackFlushNoteAppService.cs index 81c317550..6fd68de17 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/BackFlushNotes/BackFlushNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/BackFlushNotes/BackFlushNoteAppService.cs @@ -54,7 +54,7 @@ public class BackFlushNoteAppService : /// 处理数据 /// /// - private async Task> ProcessingBackFlushNoteData(List backFlushNotes) + private async Task> ProcessingBackFlushNoteDataAsync(List backFlushNotes) { if (backFlushNotes != null && backFlushNotes.Count > 0) { From 73e223c56be32ae0c0b564d890ea033e155bb92d Mon Sep 17 00:00:00 2001 From: mahao Date: Fri, 30 Jun 2023 11:19:48 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E5=BA=93=E5=AD=98=E4=BD=99=E9=A2=9D?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=A9=E5=93=81=E5=9F=BA=E7=A1=80=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DTOs/BalanceUpdateItemBasicInfoDto.cs | 45 +++++++++++++++++++ .../Balances/IBalanceAppService.cs | 6 +++ .../Balances/BalanceAppService.cs | 36 +++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/Balances/DTOs/BalanceUpdateItemBasicInfoDto.cs diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/Balances/DTOs/BalanceUpdateItemBasicInfoDto.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/Balances/DTOs/BalanceUpdateItemBasicInfoDto.cs new file mode 100644 index 000000000..3b40cfb2e --- /dev/null +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/Balances/DTOs/BalanceUpdateItemBasicInfoDto.cs @@ -0,0 +1,45 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace Win_in.Sfs.Wms.Inventory.Application.Contracts; + +/// +/// 库存更新物品基础信息 +/// +public class BalanceUpdateItemBasicInfoDto +{ + /// + /// 库存更新物品基础信息 + /// + public List BalanceUpdateItemBasicInfos { get; set; } +} + +/// +/// 库存更新物品基础信息 +/// +public class BalanceUpdateItemBasicInfo +{ + /// + /// 物品编码 + /// + [Display(Name = "物品编码")] + public string ItemCode { get; set; } + + /// + /// 物品名称 + /// + [Display(Name = "物品名称")] + public string ItemName { get; set; } + + /// + /// 物品描述1 + /// + [Display(Name = "物品描述1")] + public string ItemDesc1 { get; set; } + + /// + /// 物品描述2 + /// + [Display(Name = "物品描述2")] + public string ItemDesc2 { get; set; } +} diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/Balances/IBalanceAppService.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/Balances/IBalanceAppService.cs index 9c6dcd45c..cf79d0628 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/Balances/IBalanceAppService.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/Balances/IBalanceAppService.cs @@ -151,4 +151,10 @@ public interface IBalanceAppService string lot, string locationCode, EnumInventoryStatus status); + + /// + /// 库存余额更新物品基础信息 + /// + Task UpdateItemBasicInfoAsync(BalanceUpdateItemBasicInfoDto balanceUpdateItemBasicInfoDto); + } diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs index bcfbbed1c..b7aae9a1b 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs @@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using Volo.Abp; using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Repositories; using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Domain; @@ -650,4 +651,39 @@ public class BalanceAppService } #endregion Get + + /// + /// 库存余额更新物品基础信息 + /// + [HttpPost("update/item-basic-info")] + public async Task UpdateItemBasicInfoAsync(BalanceUpdateItemBasicInfoDto balanceUpdateItemBasicInfoDto) + { + // 物品编码 + var itemCodes = balanceUpdateItemBasicInfoDto.BalanceUpdateItemBasicInfos?.Select(c => c.ItemCode); + if (itemCodes == null || itemCodes.Any() == false) + { + return; + } + + // 获取库存余额 + var entitys = await _repository.GetListAsync(p => + itemCodes.Contains(p.ItemCode)).ConfigureAwait(false); + if (entitys.Count <= 0) + { + return; + } + + // 库存余额更新物品基础信息 + entitys.ForEach(entity => + { + var balanceUpdateItemBasicInfo = balanceUpdateItemBasicInfoDto.BalanceUpdateItemBasicInfos.FirstOrDefault(t => t.ItemCode == entity.ItemCode); + + entity.ItemName = balanceUpdateItemBasicInfo.ItemName; + entity.ItemDesc1 = balanceUpdateItemBasicInfo.ItemDesc1; + entity.ItemDesc2 = balanceUpdateItemBasicInfo.ItemDesc2; + }); + + await _repository.UpdateManyAsync(entitys).ConfigureAwait(false); + } + } From 19a9870af922070abf545f9be63df0b39dadfa30 Mon Sep 17 00:00:00 2001 From: mahao Date: Fri, 30 Jun 2023 11:54:15 +0800 Subject: [PATCH 6/7] tj --- .../Balances/BalanceAppService.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs index b7aae9a1b..a758992e6 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs @@ -660,6 +660,7 @@ public class BalanceAppService { // 物品编码 var itemCodes = balanceUpdateItemBasicInfoDto.BalanceUpdateItemBasicInfos?.Select(c => c.ItemCode); + itemCodes = itemCodes?.Where(t => string.IsNullOrWhiteSpace(t) == false); if (itemCodes == null || itemCodes.Any() == false) { return; @@ -674,14 +675,18 @@ public class BalanceAppService } // 库存余额更新物品基础信息 - entitys.ForEach(entity => - { - var balanceUpdateItemBasicInfo = balanceUpdateItemBasicInfoDto.BalanceUpdateItemBasicInfos.FirstOrDefault(t => t.ItemCode == entity.ItemCode); + var entitysGroup = entitys.GroupBy(t => t.ItemCode); - entity.ItemName = balanceUpdateItemBasicInfo.ItemName; - entity.ItemDesc1 = balanceUpdateItemBasicInfo.ItemDesc1; - entity.ItemDesc2 = balanceUpdateItemBasicInfo.ItemDesc2; - }); + foreach (var entity in entitysGroup) + { + var balanceUpdateItemBasicInfo = balanceUpdateItemBasicInfoDto.BalanceUpdateItemBasicInfos.FirstOrDefault(t => t.ItemCode == entity.Key); + foreach (var item in entity) + { + item.ItemName = balanceUpdateItemBasicInfo.ItemName; + item.ItemDesc1 = balanceUpdateItemBasicInfo.ItemDesc1; + item.ItemDesc2 = balanceUpdateItemBasicInfo.ItemDesc2; + } + } await _repository.UpdateManyAsync(entitys).ConfigureAwait(false); } From 18bf21143f54fc1795e44db5bfc730ebccf4ad17 Mon Sep 17 00:00:00 2001 From: mahao Date: Fri, 30 Jun 2023 13:21:02 +0800 Subject: [PATCH 7/7] tj --- .../Balances/BalanceAppService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs index a758992e6..4d1ebb37b 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs @@ -682,9 +682,9 @@ public class BalanceAppService var balanceUpdateItemBasicInfo = balanceUpdateItemBasicInfoDto.BalanceUpdateItemBasicInfos.FirstOrDefault(t => t.ItemCode == entity.Key); foreach (var item in entity) { - item.ItemName = balanceUpdateItemBasicInfo.ItemName; - item.ItemDesc1 = balanceUpdateItemBasicInfo.ItemDesc1; - item.ItemDesc2 = balanceUpdateItemBasicInfo.ItemDesc2; + item.ItemName = balanceUpdateItemBasicInfo.ItemName ?? item.ItemName; + item.ItemDesc1 = balanceUpdateItemBasicInfo.ItemDesc1 ?? item.ItemDesc1; + item.ItemDesc2 = balanceUpdateItemBasicInfo.ItemDesc2 ?? item.ItemDesc2; } }