增加字段
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using WMS.Web.Core;
|
||||
using WMS.Web.Domain.Values;
|
||||
@@ -64,7 +65,12 @@ namespace WMS.Web.Domain.Entitys
|
||||
/// 同步成功或者失败 null 就是未同步
|
||||
/// </summary>
|
||||
[Column("SuccessSync")]
|
||||
public Dictionary<string, bool?> SuccessSync_Dic { get; set; } = new Dictionary<string, bool?>();
|
||||
public bool? SuccessSync { get; set; }
|
||||
/// <summary>
|
||||
/// 同步成功失败的源订单号
|
||||
/// </summary>
|
||||
[Column("SuccessSyncFail")]
|
||||
public List<string> SuccessSyncFail { get; set; }=new List<string>();
|
||||
/// <summary>
|
||||
/// 同步时间
|
||||
/// </summary>
|
||||
@@ -96,12 +102,11 @@ namespace WMS.Web.Domain.Entitys
|
||||
/// 同步金蝶
|
||||
/// </summary>
|
||||
/// <param name="operateId"></param>
|
||||
public void Sync(string sourcBilNo,bool isSuccess, int operateId,string remark)
|
||||
public void Sync(List<string> sourcBilNos, bool isSuccess, int operateId, string remark)
|
||||
{
|
||||
if (SuccessSync_Dic.ContainsKey(sourcBilNo))
|
||||
SuccessSync_Dic[sourcBilNo] = isSuccess;
|
||||
else
|
||||
SuccessSync_Dic.Add(sourcBilNo, isSuccess);
|
||||
SuccessSyncFail.AddRange(sourcBilNos);
|
||||
SuccessSyncFail.Distinct();
|
||||
this.SuccessSync = isSuccess;
|
||||
this.Remark = remark;
|
||||
this.OperateId = operateId;
|
||||
this.SyncTime = DateTime.Now;
|
||||
|
||||
@@ -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(new List<string>(),res.IsSuccess, loginInfo.UserInfo.StaffId, res.Message);
|
||||
}
|
||||
var isSuccess = await _outStockRepositories.EditEntityList(list, true);
|
||||
if (!isSuccess) return Result.ReFailure(ResultCodes.DateWriteError);
|
||||
|
||||
@@ -81,6 +81,10 @@ namespace WMS.Web.Repositories.Configuration
|
||||
ent.ToTable("t_wms_outstock");
|
||||
ent.HasKey(x => x.Id);
|
||||
|
||||
ent.Property(f => f.SuccessSyncFail).HasConversion(
|
||||
v => JsonConvert.SerializeObject(v),
|
||||
v => JsonConvert.DeserializeObject<List<string>>(v));
|
||||
|
||||
ent.HasMany(p => p.Details)
|
||||
.WithOne()
|
||||
.HasForeignKey(p => p.Fid)
|
||||
|
||||
Reference in New Issue
Block a user