修改状态获取方法

optimize
jianghaiqing 1 year ago
parent 79ce8d382b
commit 131fe767b9

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

@ -1531,6 +1531,8 @@ namespace Myshipping.Application
//在获取运行表已有的记录
var runList = InnerGetRunListBySingleBusiness(messageInfo);
int lastWFSortNo = 0;
int calcNum = 1;
var resultList = statuList.Join(runList, l => l.WFPKId, r => r.WFPKId,
(l, r) => {
@ -1550,7 +1552,8 @@ namespace Myshipping.Application
ShowName = b.ShowName,
IsYield = false,
StatusSKUCode = b.StatusSKUCode,
ActRemark = b.ActRemark
ActRemark = b.ActRemark,
WFSortNo = l.SortNo
});
if(b.SubStatusList != null && b.SubStatusList.Count > 0)
@ -1562,7 +1565,8 @@ namespace Myshipping.Application
ShowName = c.ShowName,
IsYield = false,
StatusSKUCode = b.StatusSKUCode,
ActRemark = b.ActRemark
ActRemark = b.ActRemark,
WFSortNo = l.SortNo
}).ToList());
}
});
@ -1578,13 +1582,32 @@ namespace Myshipping.Application
ActDate = b.ActDate,
ActVal = b.ActVal,
StatusSKUCode = b.StatusSKUCode,
ActRemark = b.ActRemark
ActRemark = b.ActRemark,
WFSortNo = l.SortNo
}).ToList();
}
}
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;

Loading…
Cancel
Save