查询任务执行列表
附加每个任务是检查还是保养
This commit is contained in:
@@ -222,6 +222,8 @@ namespace DOAN.Admin.WebApi.Controllers
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取任务执行绑定的巡检任务和点检任务绑定的设备
|
||||
/// </summary>
|
||||
@@ -244,6 +246,7 @@ namespace DOAN.Admin.WebApi.Controllers
|
||||
/// 获取设备绑定的检查项
|
||||
/// </summary>
|
||||
/// <param name="fk_device_id">device_rel_account_inspect表的fk_account_id 属性</param>
|
||||
/// <param name="planType">保养,检查</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("get_bind_inspect")]
|
||||
public IActionResult AchieveDevicebindInspect(int? fk_account_id,string fkPlanId,int planType)
|
||||
|
||||
@@ -156,5 +156,10 @@ namespace DOAN.Model.MES.dev.Dto
|
||||
[ExcelColumn(Name = "更新时间", Format = "yyyy-MM-dd HH:mm:ss")]
|
||||
[ExcelColumnName("更新时间")]
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
[ExcelColumn(Name = "保养或检查")]
|
||||
[ExcelColumnName("保养或检查")]
|
||||
public int InnerType { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ namespace DOAN.Service.MES.dev
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询任务执行列表
|
||||
/// 附加每个任务是检查还是保养
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
@@ -66,7 +67,21 @@ namespace DOAN.Service.MES.dev
|
||||
double minutes = timeDifference.TotalMinutes;
|
||||
double roundedMinutes = Math.Round(minutes, 1);
|
||||
item.ConsumeTime = roundedMinutes;
|
||||
|
||||
}
|
||||
int InnerType=0;
|
||||
if (item.Type==1)
|
||||
{
|
||||
InnerType = Context.Queryable<DeviceRouteInspectionPlan>().Where(it => it.Id == item.PlanId)
|
||||
.Select(it => it.InnerType??0).First();
|
||||
}else if (item.Type==2)
|
||||
{
|
||||
InnerType = Context.Queryable<DevicePointInspectionPlan>().Where(it => it.Id == item.PlanId)
|
||||
.Select(it => it.InnerType ?? 0).First();
|
||||
}
|
||||
item.InnerType = InnerType;
|
||||
|
||||
|
||||
}
|
||||
|
||||
return response;
|
||||
|
||||
Reference in New Issue
Block a user