9/8
This commit is contained in:
@@ -68,7 +68,13 @@ namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpGet("getworkstationList")]
|
||||
public IActionResult GetworkstationList()
|
||||
{
|
||||
List<MdWorkstation> workstations= deviceService.getworkstationList();
|
||||
return SUCCESS(workstations);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -77,5 +77,9 @@ namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
List<MdWorkshop> MdWorkshopList= worklineService.GetMdWorkshops(worklineId);
|
||||
return SUCCESS(MdWorkshopList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ZR.Model.mes.md;
|
||||
using ZR.Service.mes.md.IService;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
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
|
||||
{
|
||||
[Route("mes/md/Worksort")]
|
||||
public class MdWorksortController : BaseController
|
||||
{
|
||||
IMdWorksortService worksortService;
|
||||
|
||||
public MdWorksortController(IMdWorksortService worksortService)
|
||||
{
|
||||
this.worksortService = worksortService;
|
||||
}
|
||||
|
||||
[HttpGet("list")]
|
||||
public IActionResult List(int pageNum, int pageSize, string WorksortCode = "", string WorksortName = "")
|
||||
{
|
||||
|
||||
(int, List<MdWorksort>) data = worksortService.GetAll(WorksortCode, WorksortName, pageNum, pageSize);
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 插入车间
|
||||
/// </summary>
|
||||
/// <param name="worksort"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("addWorksort")]
|
||||
public IActionResult AddWorksort([FromBody] MdWorksort worksort)
|
||||
{
|
||||
if (worksort != null)
|
||||
worksort.ToCreate(HttpContext);
|
||||
int result = worksortService.AddWorksort(worksort);
|
||||
return SUCCESS(result);
|
||||
}
|
||||
|
||||
|
||||
[HttpPost("updateWorksort")]
|
||||
public IActionResult UpdateWorksort([FromBody] MdWorksort worksort)
|
||||
{
|
||||
if (worksort != null)
|
||||
worksort.ToUpdate(HttpContext);
|
||||
int result = worksortService.UpdateWorksort(worksort);
|
||||
return SUCCESS(result);
|
||||
}
|
||||
|
||||
|
||||
[HttpPost("delWorksort")]
|
||||
public IActionResult deleteWorksort([FromBody] List<int> ids)
|
||||
{
|
||||
if (ids != null)
|
||||
{
|
||||
int result = worksortService.deleteWorksort(ids.ToArray());
|
||||
return ToResponse(result);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -5,10 +5,11 @@ using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Model.mes.md;
|
||||
using ZR.Service.mes.md;
|
||||
using ZR.Service.mes.md.IService;
|
||||
using ZR.Service.MES.md;
|
||||
|
||||
namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
{
|
||||
|
||||
|
||||
[Route("mes/md/workstation")]
|
||||
public class MdWorkstationController : BaseController
|
||||
{
|
||||
@@ -60,9 +61,14 @@ namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
[HttpGet("getworkLineList")]
|
||||
public IActionResult GetworkLineList()
|
||||
{
|
||||
List<MdWorkline> MdWorkshopList = workstationService.GetworkLineList();
|
||||
return SUCCESS(MdWorkshopList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user