首检添加数据看板
This commit is contained in:
@@ -1,14 +1,7 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.ComponentModel;
|
||||
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;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
|
||||
namespace ZR.Admin.WebApi.Controllers
|
||||
@@ -36,7 +29,7 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
[HttpGet("get_workorder_list")]
|
||||
public IActionResult QueryWmAGV_list([FromQuery] QueryAGVparam parm)
|
||||
{
|
||||
if(parm == null)
|
||||
if (parm == null)
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
@@ -50,14 +43,14 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
/// <param name="workorder_id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("GetTask")]
|
||||
public IActionResult QueryAGVTask(string workorder_id)
|
||||
public IActionResult QueryAGVTask(string workorder_id)
|
||||
{
|
||||
if(string.IsNullOrEmpty(workorder_id))
|
||||
if (string.IsNullOrEmpty(workorder_id))
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
|
||||
var response= _WmAGVService.QueryAGVTask(workorder_id);
|
||||
var response = _WmAGVService.QueryAGVTask(workorder_id);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
@@ -68,20 +61,21 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
/// <param name="task"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("add_task")]
|
||||
public IActionResult AddAGVTask([FromBody] AgvTask task)
|
||||
public IActionResult AddAGVTask([FromBody] AgvTask task)
|
||||
{
|
||||
string msg = null;
|
||||
if(task == null)
|
||||
if (task == null)
|
||||
{
|
||||
|
||||
return SUCCESS(null);
|
||||
}
|
||||
// task.ToCreate();
|
||||
int result= _WmAGVService.AddAGVTask(task);
|
||||
if(result == 0)
|
||||
// task.ToCreate();
|
||||
int result = _WmAGVService.AddAGVTask(task);
|
||||
if (result == 0)
|
||||
{
|
||||
msg = "插入失败";
|
||||
}else if(result == 1)
|
||||
}
|
||||
else if (result == 1)
|
||||
{
|
||||
msg = "新增成功";
|
||||
}
|
||||
@@ -98,10 +92,10 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
/// <param name="taskId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("deleteTask")]
|
||||
public IActionResult DeleteTask(string taskId)
|
||||
public IActionResult DeleteTask(string taskId)
|
||||
{
|
||||
|
||||
if(string.IsNullOrEmpty(taskId))
|
||||
if (string.IsNullOrEmpty(taskId))
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
@@ -116,13 +110,13 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
/// <param name="taskId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("get_agv_position")]
|
||||
public IActionResult GetAGV_position_list(AgvLocation location)
|
||||
public IActionResult GetAGV_position_list(AgvLocation location)
|
||||
{
|
||||
if(location == null)
|
||||
if (location == null)
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
var response= _WmAGVService.GetAGV_position_list(location);
|
||||
var response = _WmAGVService.GetAGV_position_list(location);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
@@ -135,26 +129,26 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
/// <returns></returns>
|
||||
[HttpGet("generate_agv_task")]
|
||||
[Log(Title = "AGV调度")]
|
||||
public IActionResult GenerateAgvTask(string taskid,int flag)
|
||||
public IActionResult GenerateAgvTask(string taskid, int flag)
|
||||
{
|
||||
string msg = "任务调度成功";
|
||||
if(string.IsNullOrEmpty(taskid))
|
||||
{
|
||||
|
||||
if (string.IsNullOrEmpty(taskid))
|
||||
{
|
||||
|
||||
return SUCCESS(null);
|
||||
}
|
||||
|
||||
string status = _WmAGVService.GenerateAgvTask(taskid,flag);
|
||||
string status = _WmAGVService.GenerateAgvTask(taskid, flag);
|
||||
|
||||
return ToResponse(new ApiResult(200, msg, status));
|
||||
}
|
||||
|
||||
// cancelTask
|
||||
[HttpGet("cancel_agv_task")]
|
||||
public IActionResult CancelAGVTask(string taskId, int flag)
|
||||
public IActionResult CancelAGVTask(string taskId, int flag)
|
||||
{
|
||||
string msg = "取消任务成功";
|
||||
if(string.IsNullOrEmpty(taskId))
|
||||
if (string.IsNullOrEmpty(taskId))
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user