From 35e4b8dcda93e4cfd702ae0e7bb66b4d9efeba73 Mon Sep 17 00:00:00 2001 From: 18942506660 <18942506660@A18942506660> Date: Wed, 15 Nov 2023 17:04:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=87=BA=E5=BA=93=E5=8D=95?= =?UTF-8?q?=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/WMS.Web.Domain/Entitys/OutStock.cs | 9 ++++++--- src/WMS.Web.Domain/Services/OutStockService.cs | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/WMS.Web.Domain/Entitys/OutStock.cs b/src/WMS.Web.Domain/Entitys/OutStock.cs index 95d0e28e..4a2b07fa 100644 --- a/src/WMS.Web.Domain/Entitys/OutStock.cs +++ b/src/WMS.Web.Domain/Entitys/OutStock.cs @@ -64,7 +64,7 @@ namespace WMS.Web.Domain.Entitys /// 同步成功或者失败 null 就是未同步 /// [Column("SuccessSync")] - public bool? SuccessSync { get; set; } + public Dictionary SuccessSync_Dic { get; set; } = new Dictionary(); /// /// 同步时间 /// @@ -96,9 +96,12 @@ namespace WMS.Web.Domain.Entitys /// 同步金蝶 /// /// - public void Sync(bool isSuccess, int operateId,string remark) + public void Sync(string sourcBilNo,bool isSuccess, int operateId,string remark) { - this.SuccessSync = isSuccess; + if (SuccessSync_Dic.ContainsKey(sourcBilNo)) + SuccessSync_Dic[sourcBilNo] = isSuccess; + else + SuccessSync_Dic.Add(sourcBilNo, isSuccess); this.Remark = remark; this.OperateId = operateId; this.SyncTime = DateTime.Now; diff --git a/src/WMS.Web.Domain/Services/OutStockService.cs b/src/WMS.Web.Domain/Services/OutStockService.cs index f58a1c0a..2c14cf05 100644 --- a/src/WMS.Web.Domain/Services/OutStockService.cs +++ b/src/WMS.Web.Domain/Services/OutStockService.cs @@ -114,7 +114,7 @@ namespace WMS.Web.Domain.Services { //下推金蝶 var res = await _erpService.Push(new Core.Dto.Erp.ErpPushDto() { }); - entity.Sync(res.IsSuccess, loginInfo.UserInfo.StaffId, res.Message); + entity.Sync("",res.IsSuccess, loginInfo.UserInfo.StaffId, res.Message); } var isSuccess = await _outStockRepositories.EditEntityList(list, true); if (!isSuccess) return Result.ReFailure(ResultCodes.DateWriteError);