调整同步金蝶
This commit is contained in:
@@ -62,12 +62,12 @@ namespace WMS.Web.Domain.Entitys
|
||||
[Column("CreateTime")]
|
||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||
/// <summary>
|
||||
/// 同步成功或者失败 null 就是未同步
|
||||
/// 同步成功或者失败 默认是失败状态
|
||||
/// </summary>
|
||||
[Column("SuccessSync")]
|
||||
public bool? SuccessSync { get; set; }
|
||||
public bool SuccessSync { get; set; } = false;
|
||||
/// <summary>
|
||||
/// 同步失败的源订单号
|
||||
/// 同步失败的源订单号(默认就包含所有来源单号)
|
||||
/// </summary>
|
||||
[Column("SuccessSyncFail")]
|
||||
public List<string> SuccessSyncFail { get; set; }=new List<string>();
|
||||
@@ -86,7 +86,7 @@ namespace WMS.Web.Domain.Entitys
|
||||
/// </summary>
|
||||
public List<OutStockDetails> Details = new List<OutStockDetails>();
|
||||
/// <summary>
|
||||
/// 创建
|
||||
/// 创建(需要在明细都生成后最后调用)
|
||||
/// </summary>
|
||||
/// <param name="creatorId"></param>
|
||||
public void Create(int creatorId, OutStockTask task)
|
||||
@@ -97,16 +97,28 @@ namespace WMS.Web.Domain.Entitys
|
||||
this.ReceiptCustomerId = task.ReceiptCustomerId;
|
||||
this.CreatorId = creatorId;
|
||||
this.CreateTime = DateTime.Now;
|
||||
this.SuccessSync = false;
|
||||
this.SuccessSyncFail = this.Details.SelectMany(s => s.ErpDetails).GroupBy(g => g.SourceBillNo).Select(s=>s.Key).ToList();
|
||||
}
|
||||
/// <summary>
|
||||
/// 同步金蝶
|
||||
/// 同步金蝶(成功)
|
||||
/// </summary>
|
||||
/// <param name="operateId"></param>
|
||||
public void Sync(List<string> sourcBilNos, bool isSuccess, int operateId, string remark)
|
||||
public void SyncSuccess(string sourcNos, int operateId)
|
||||
{
|
||||
SuccessSyncFail.AddRange(sourcBilNos);
|
||||
SuccessSyncFail.Distinct();
|
||||
this.SuccessSync = isSuccess;
|
||||
this.SuccessSyncFail.Remove(sourcNos);
|
||||
this.SuccessSync = true;
|
||||
this.Remark = "";
|
||||
this.OperateId = operateId;
|
||||
this.SyncTime = DateTime.Now;
|
||||
}
|
||||
/// <summary>
|
||||
/// 同步金蝶(失败)
|
||||
/// </summary>
|
||||
/// <param name="operateId"></param>
|
||||
public void SyncFail(string remark,int operateId)
|
||||
{
|
||||
this.SuccessSync = false;
|
||||
this.Remark = remark;
|
||||
this.OperateId = operateId;
|
||||
this.SyncTime = DateTime.Now;
|
||||
|
||||
Reference in New Issue
Block a user