首检添加数据看板
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Model.mes.md;
|
||||
using ZR.Service.mes.md;
|
||||
using ZR.Service.mes.md.IService;
|
||||
namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
{
|
||||
@@ -12,9 +9,9 @@ namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
public class MdDeviceController : BaseController
|
||||
{
|
||||
IMdDeviceService deviceService;
|
||||
public MdDeviceController(IMdDeviceService deviceService)
|
||||
public MdDeviceController(IMdDeviceService deviceService)
|
||||
{
|
||||
this.deviceService = deviceService;
|
||||
this.deviceService = deviceService;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,9 +30,9 @@ namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpPost("addDevice")]
|
||||
public IActionResult AddDevice([FromBody]MdDevice device)
|
||||
public IActionResult AddDevice([FromBody] MdDevice device)
|
||||
{
|
||||
if (device != null)
|
||||
device.ToCreate(HttpContext);
|
||||
@@ -44,7 +41,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
}
|
||||
|
||||
[HttpPost("updateDevice")]
|
||||
public IActionResult UpdateDevice([FromBody]MdDevice device)
|
||||
public IActionResult UpdateDevice([FromBody] MdDevice device)
|
||||
{
|
||||
if (device != null)
|
||||
{
|
||||
@@ -65,15 +62,15 @@ namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
return ToResponse(result);
|
||||
}
|
||||
return null;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpGet("getworkstationList")]
|
||||
public IActionResult GetworkstationList()
|
||||
{
|
||||
List<MdWorkstation> workstations= deviceService.getworkstationList();
|
||||
return SUCCESS(workstations);
|
||||
List<MdWorkstation> workstations = deviceService.getworkstationList();
|
||||
return SUCCESS(workstations);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user