wms:agv:init
This commit is contained in:
parent
26e32f18fa
commit
591c902b32
@ -3,6 +3,7 @@ using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Admin.WebApi.Filters;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
using ZR.Service.Business;
|
||||
using ZR.Service.Business.IBusinessService;
|
||||
using ZR.Service.mes.wms;
|
||||
using ZR.Service.mes.wms.IService;
|
||||
@ -114,9 +115,15 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
/// <param name="taskId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("get_agv_position")]
|
||||
public IActionResult GetTask(string taskId)
|
||||
public IActionResult GetAGV_position_list(AgvLocation location)
|
||||
{
|
||||
if(location == null)
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
var response= _WmAGVService.GetAGV_position_list(location);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ namespace ZR.Model.MES.wms.Dto
|
||||
public class QueryAGVPosition
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
public class AGVtaskDto
|
||||
{
|
||||
|
||||
@ -17,5 +17,7 @@ namespace ZR.Service.mes.wms.IService
|
||||
int AddAGVTask(AgvTask task);
|
||||
|
||||
int DeleteTask(string taskId);
|
||||
|
||||
List<AgvLocation> GetAGV_position_list(AgvLocation location);
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,10 +104,21 @@ namespace ZR.Service.Business
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 6 获取agv 起点和终点
|
||||
/// </summary>
|
||||
/// <param name="location"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public List<AgvLocation> GetAGV_position_list(AgvLocation location)
|
||||
{
|
||||
var predicate = Expressionable.Create<AgvLocation>()
|
||||
.AndIF(string.IsNullOrEmpty(location.Area), it => it.Area == location.Area)
|
||||
.AndIF(location.Type > -1, it => it.Type == location.Type)
|
||||
.AndIF(string.IsNullOrEmpty(location.Coordinate), it => it.Coordinate == location.Coordinate);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return Context.Queryable<AgvLocation>().Where(predicate.ToExpression()).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user