修改状态获取方法

optimize
jianghaiqing 1 year ago
parent 79ce8d382b
commit 131fe767b9

@ -163,5 +163,15 @@ namespace Myshipping.Application
/// 触发器列表 /// 触发器列表
/// </summary> /// </summary>
public List<string> TriggerList { get; set; } public List<string> TriggerList { get; set; }
/// <summary>
/// 分组名称
/// </summary>
public string GroupName { get; set; }
/// <summary>
/// 服务流程排序值
/// </summary>
public int WFSortNo { get; set; }
} }
} }

@ -1530,7 +1530,9 @@ namespace Myshipping.Application
//在获取运行表已有的记录 //在获取运行表已有的记录
var runList = InnerGetRunListBySingleBusiness(messageInfo); var runList = InnerGetRunListBySingleBusiness(messageInfo);
int lastWFSortNo = 0;
int calcNum = 1;
var resultList = statuList.Join(runList, l => l.WFPKId, r => r.WFPKId, var resultList = statuList.Join(runList, l => l.WFPKId, r => r.WFPKId,
(l, r) => { (l, r) => {
@ -1550,7 +1552,8 @@ namespace Myshipping.Application
ShowName = b.ShowName, ShowName = b.ShowName,
IsYield = false, IsYield = false,
StatusSKUCode = b.StatusSKUCode, StatusSKUCode = b.StatusSKUCode,
ActRemark = b.ActRemark ActRemark = b.ActRemark,
WFSortNo = l.SortNo
}); });
if(b.SubStatusList != null && b.SubStatusList.Count > 0) if(b.SubStatusList != null && b.SubStatusList.Count > 0)
@ -1562,7 +1565,8 @@ namespace Myshipping.Application
ShowName = c.ShowName, ShowName = c.ShowName,
IsYield = false, IsYield = false,
StatusSKUCode = b.StatusSKUCode, StatusSKUCode = b.StatusSKUCode,
ActRemark = b.ActRemark ActRemark = b.ActRemark,
WFSortNo = l.SortNo
}).ToList()); }).ToList());
} }
}); });
@ -1578,13 +1582,32 @@ namespace Myshipping.Application
ActDate = b.ActDate, ActDate = b.ActDate,
ActVal = b.ActVal, ActVal = b.ActVal,
StatusSKUCode = b.StatusSKUCode, StatusSKUCode = b.StatusSKUCode,
ActRemark = b.ActRemark ActRemark = b.ActRemark,
WFSortNo = l.SortNo
}).ToList(); }).ToList();
} }
} }
return rltList; return rltList;
}).SelectMany(b=>b).ToList(); }).SelectMany(b => b).OrderBy(b => b.WFSortNo).Select(b => {
if(lastWFSortNo == 0)
{
b.GroupName = calcNum.ToString();
lastWFSortNo = b.WFSortNo;
}
else if(b.WFSortNo == lastWFSortNo)
{
b.GroupName = calcNum.ToString();
}
else
{
++calcNum;
lastWFSortNo = b.WFSortNo;
b.GroupName = calcNum.ToString();
}
return b;
}).OrderBy(b => b.WFSortNo).ThenBy(b=>b.ActSortNo).ToList();
result.succ = true; result.succ = true;

Loading…
Cancel
Save