查询任务执行列表
附加每个任务是检查还是保养
This commit is contained in:
@@ -221,6 +221,8 @@ namespace DOAN.Admin.WebApi.Controllers
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取任务执行绑定的巡检任务和点检任务绑定的设备
|
/// 获取任务执行绑定的巡检任务和点检任务绑定的设备
|
||||||
@@ -244,6 +246,7 @@ namespace DOAN.Admin.WebApi.Controllers
|
|||||||
/// 获取设备绑定的检查项
|
/// 获取设备绑定的检查项
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="fk_device_id">device_rel_account_inspect表的fk_account_id 属性</param>
|
/// <param name="fk_device_id">device_rel_account_inspect表的fk_account_id 属性</param>
|
||||||
|
/// <param name="planType">保养,检查</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("get_bind_inspect")]
|
[HttpGet("get_bind_inspect")]
|
||||||
public IActionResult AchieveDevicebindInspect(int? fk_account_id,string fkPlanId,int planType)
|
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")]
|
[ExcelColumn(Name = "更新时间", Format = "yyyy-MM-dd HH:mm:ss")]
|
||||||
[ExcelColumnName("更新时间")]
|
[ExcelColumnName("更新时间")]
|
||||||
public DateTime? UpdatedTime { get; set; }
|
public DateTime? UpdatedTime { get; set; }
|
||||||
|
|
||||||
|
[ExcelColumn(Name = "保养或检查")]
|
||||||
|
[ExcelColumnName("保养或检查")]
|
||||||
|
public int InnerType { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ namespace DOAN.Service.MES.dev
|
|||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查询任务执行列表
|
/// 查询任务执行列表
|
||||||
|
/// 附加每个任务是检查还是保养
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="parm"></param>
|
/// <param name="parm"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
@@ -66,7 +67,21 @@ namespace DOAN.Service.MES.dev
|
|||||||
double minutes = timeDifference.TotalMinutes;
|
double minutes = timeDifference.TotalMinutes;
|
||||||
double roundedMinutes = Math.Round(minutes, 1);
|
double roundedMinutes = Math.Round(minutes, 1);
|
||||||
item.ConsumeTime = roundedMinutes;
|
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;
|
return response;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace DOAN.Service.MES.dev.IService
|
|||||||
|
|
||||||
int ExecutionTask_point(string id);
|
int ExecutionTask_point(string id);
|
||||||
|
|
||||||
|
|
||||||
List<DeviceAccount> AchieveTaskbindDevice(string id);
|
List<DeviceAccount> AchieveTaskbindDevice(string id);
|
||||||
|
|
||||||
List<DeviceInspect> AchieveDevicebindInspect(int fk_device_id, string fkPlanId, int planType);
|
List<DeviceInspect> AchieveDevicebindInspect(int fk_device_id, string fkPlanId, int planType);
|
||||||
|
|||||||
Reference in New Issue
Block a user