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);