添加上次保养时间 报修列表创建时间倒叙
This commit is contained in:
@@ -17,9 +17,11 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
public string execute_user_id{ get; set; }
|
||||
public string execute_user_id_id { get; set; }
|
||||
public string repeat_time { get; set; }
|
||||
public string last_execute_time { get; set; }
|
||||
|
||||
public DateTime? date_repeat_time { get; set; }
|
||||
public DateTime? date_create_time { get; set; }
|
||||
public DateTime? date_execute_time { get; set; }
|
||||
public DateTime? date_last_execute_time { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -270,6 +270,7 @@ namespace Tnb.EquipMgr
|
||||
.LeftJoin<UserEntity>((a,b)=>a.apply_user_id==b.Id)
|
||||
.LeftJoin<UserEntity>((a,b,c)=>a.repairer_id==c.Id)
|
||||
.Where(a=>a.equip_id==input.equip_id)
|
||||
.OrderByDescending(a=>a.create_time)
|
||||
.Select((a,b,c) => new EquipRepairRecordQueryOutput
|
||||
{
|
||||
id = a.id,
|
||||
@@ -323,6 +324,7 @@ namespace Tnb.EquipMgr
|
||||
.LeftJoin<DictionaryDataEntity>((a,b,c,d,e,f)=>e.Id==f.DictionaryTypeId && a.status==f.EnCode)
|
||||
.WhereIF(!string.IsNullOrEmpty(input.equip_info),(a,b,c,d)=>d.code.Contains(input.equip_info) || d.name.Contains(input.equip_info))
|
||||
.WhereIF(!string.IsNullOrEmpty(input.status),(a,b,c,d)=>statusList.Contains(a.status))
|
||||
.OrderByDescending(a=>a.create_time)
|
||||
.Select((a,b,c,d,e,f) => new PadRepairListOutput
|
||||
{
|
||||
id = a.id,
|
||||
|
||||
@@ -80,7 +80,8 @@ namespace Tnb.EquipMgr
|
||||
repeat_user_id = d.RealName,
|
||||
repeat_user_id_id = a.repeat_user_id,
|
||||
result_remark = a.result_remark,
|
||||
repeat_remark = a.repeat_remark
|
||||
repeat_remark = a.repeat_remark,
|
||||
date_last_execute_time = SqlFunc.Subqueryable<EqpMaintainRecordH>().Where(x=>a.equip_id==x.equip_id && a.execute_time!=null).OrderByDesc(x=>x.execute_time).Select(x=>x.execute_time)
|
||||
})
|
||||
.OrderByDescending(a=>a.create_time)
|
||||
.Mapper(a =>
|
||||
@@ -89,6 +90,7 @@ namespace Tnb.EquipMgr
|
||||
a.create_time = a.date_create_time == null ? "" : a.date_create_time.Value.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
a.execute_time = a.date_execute_time == null ? "" : a.date_execute_time.Value.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
a.repeat_time = a.date_repeat_time == null ? "" : a.date_repeat_time.Value.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
a.last_execute_time = a.date_last_execute_time == null ? "" : a.date_last_execute_time.Value.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
})
|
||||
.ToPagedListAsync((input?.currentPage ?? 1), (input?.pageSize ?? 50));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user