修复bug

This commit is contained in:
18942506660
2023-11-27 11:28:40 +08:00
parent d150317c04
commit 1198e01805
3 changed files with 15 additions and 11 deletions

View File

@@ -85,7 +85,7 @@ namespace WMS.Web.Domain.Entitys
/// 同步失败的源订单号(默认就包含所有来源单号)
/// </summary>
[Column("SuccessSyncFail")]
public List<string> SuccessSyncFail { get; set; }=new List<string>();
public List<int> SuccessSyncFail { get; set; } = new List<int>();
/// <summary>
/// 同步时间
/// </summary>
@@ -104,7 +104,7 @@ namespace WMS.Web.Domain.Entitys
/// 创建(需要在明细都生成后最后调用)
/// </summary>
/// <param name="creatorId"></param>
public void Create(int creatorId, OutStockTask task,int method)
public void Create(int creatorId, OutStockTask task, int method)
{
this.TaskId = task.Id;
this.Type = task.Type;
@@ -119,20 +119,22 @@ namespace WMS.Web.Domain.Entitys
{
//只有销售出库才需要同步金蝶
this.SuccessSync = false;
this.SuccessSyncFail = this.Details.SelectMany(s => s.ErpDetails).GroupBy(g => g.SourceBillNo).Select(s => s.Key).ToList();
}else
this.SuccessSyncFail = this.Details.SelectMany(s => s.ErpDetails).GroupBy(g => g.Erp_DetailId).Select(s => s.Key).ToList();
}
else
{
this.SuccessSync = true;
this.SuccessSyncFail = new List<string>();
this.SuccessSyncFail = new List<int>();
}
}
/// <summary>
/// 同步金蝶(成功)
/// </summary>
/// <param name="operateId"></param>
public void SyncSuccess(string sourcNos, int operateId)
public void SyncSuccess(List<int> erpDetailIds, int operateId)
{
this.SuccessSyncFail.Remove(sourcNos);
foreach (var e in erpDetailIds)
this.SuccessSyncFail.Remove(e);
this.SuccessSync = true;
this.Remark = "";
this.OperateId = operateId;
@@ -142,7 +144,7 @@ namespace WMS.Web.Domain.Entitys
/// 同步金蝶(失败)
/// </summary>
/// <param name="operateId"></param>
public void SyncFail(string remark,int operateId)
public void SyncFail(string remark, int operateId)
{
this.SuccessSync = false;
this.Remark = remark;