80 lines
3.1 KiB
C#
80 lines
3.1 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using WalkingTec.Mvvm.Core;
|
|
using WalkingTec.Mvvm.Core.Extensions;
|
|
using HHWMS.Web.Models.Agv;
|
|
|
|
namespace HHWMS.Web
|
|
{
|
|
/// <summary>
|
|
/// AGV 任务日志列表(只读:状态变更 + 报文留痕,来源 AgvTaskLog 表)
|
|
/// </summary>
|
|
public partial class AgvTaskLogListVM : BasePagedListVM<AgvTaskLog_View, AgvTaskLogSearcher>
|
|
{
|
|
protected override List<GridAction> InitGridAction()
|
|
{
|
|
return new List<GridAction>
|
|
{
|
|
this.MakeStandardAction("AgvTaskLog", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "agv", dialogWidth: 900),
|
|
};
|
|
}
|
|
|
|
protected override IEnumerable<IGridColumn<AgvTaskLog_View>> InitGridHeader()
|
|
{
|
|
return new List<GridColumn<AgvTaskLog_View>>
|
|
{
|
|
this.MakeGridHeader(x => x.TaskNo).SetWidth(170),
|
|
this.MakeGridHeader(x => x.OrderId).SetWidth(170),
|
|
this.MakeGridHeader(x => x.FromStatus).SetWidth(90),
|
|
this.MakeGridHeader(x => x.ToStatus).SetWidth(90),
|
|
this.MakeGridHeader(x => x.Event).SetWidth(110),
|
|
this.MakeGridHeader(x => x.Direction).SetWidth(80),
|
|
this.MakeGridHeader(x => x.EventTime).SetWidth(150),
|
|
this.MakeGridHeader(x => x.DurationMs).SetWidth(90),
|
|
this.MakeGridHeader(x => x.Operator).SetWidth(90),
|
|
this.MakeGridHeader(x => x.RequestJson).SetWidth(180),
|
|
this.MakeGridHeader(x => x.ResponseJson).SetWidth(180),
|
|
this.MakeGridHeader(x => x.Remark),
|
|
this.MakeGridHeader(x => x.CreateTime).SetWidth(150),
|
|
this.MakeGridHeaderAction(width: 100)
|
|
};
|
|
}
|
|
|
|
public override IOrderedQueryable<AgvTaskLog_View> GetSearchQuery()
|
|
{
|
|
var query = DC.Set<AgvTaskLog>()
|
|
.CheckContain(Searcher.TaskNo, x => x.TaskNo)
|
|
.CheckEqual(Searcher.Direction, x => x.Direction)
|
|
.CheckContain(Searcher.Event, x => x.Event)
|
|
.CheckContain(Searcher.RequestJson, x => x.RequestJson)
|
|
.CheckContain(Searcher.ResponseJson, x => x.ResponseJson)
|
|
.Select(x => new AgvTaskLog_View
|
|
{
|
|
ID = x.ID,
|
|
TaskNo = x.TaskNo,
|
|
OrderId = x.OrderId,
|
|
FromStatus = x.FromStatus,
|
|
ToStatus = x.ToStatus,
|
|
Event = x.Event,
|
|
Direction = x.Direction,
|
|
EventTime = x.EventTime,
|
|
DurationMs = x.DurationMs,
|
|
Operator = x.Operator,
|
|
RequestJson = x.RequestJson,
|
|
ResponseJson = x.ResponseJson,
|
|
Remark = x.Remark,
|
|
CreateTime = x.CreateTime
|
|
})
|
|
.OrderByDescending(x => x.CreateTime);
|
|
return query;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 任务日志列表行视图
|
|
/// </summary>
|
|
public class AgvTaskLog_View : AgvTaskLog
|
|
{
|
|
}
|
|
}
|