首检添加数据看板
This commit is contained in:
@@ -1,18 +1,12 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Model.mes.md;
|
||||
using ZR.Service.mes.md;
|
||||
using ZR.Service.MES.md;
|
||||
using ZR.Service.MES.md.IService;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
namespace ZR.Admin.WebApi.Controllers.MES.md
|
||||
{
|
||||
[Route("mes/md/BOM")]
|
||||
public class MdBOMController :BaseController
|
||||
public class MdBOMController : BaseController
|
||||
{
|
||||
IMdBOMService mdBOMService;
|
||||
public MdBOMController(IMdBOMService mdBOMService)
|
||||
@@ -29,7 +23,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.md
|
||||
/// <param name="productName">产品名称</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
public IActionResult List(int pageNum, int pageSize, string productCode = "", string productName = "")
|
||||
public IActionResult List(int pageNum, int pageSize, string productCode = "", string productName = "")
|
||||
{
|
||||
(int, List<MdBom>) data = mdBOMService.GetAll(productCode, productName, pageNum, pageSize);
|
||||
|
||||
@@ -42,7 +36,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.md
|
||||
/// <param name="queryString">productCode码</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("queryBOM")]
|
||||
public IActionResult List(string queryString="")
|
||||
public IActionResult List(string queryString = "")
|
||||
{
|
||||
List<MdBom> data = mdBOMService.QueryBOM(queryString);
|
||||
|
||||
@@ -54,7 +48,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.md
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("getunitList")]
|
||||
public IActionResult GetAllunitList()
|
||||
public IActionResult GetAllunitList()
|
||||
{
|
||||
List<MdUnit> data = mdBOMService.GetAllunitList();
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
@@ -67,21 +61,21 @@ namespace ZR.Admin.WebApi.Controllers.MES.md
|
||||
/// <param name="bom"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("addBom")]
|
||||
public IActionResult AddBOM([FromBody] MdBom bomItem)
|
||||
public IActionResult AddBOM([FromBody] MdBom bomItem)
|
||||
{
|
||||
if(bomItem!=null&&bomItem.Id!=null)
|
||||
if (bomItem != null && bomItem.Id != null)
|
||||
bomItem.ToCreate(HttpContext);
|
||||
if (bomItem.ParentProductId == 0)
|
||||
bomItem.ParentProductId = null;
|
||||
int result=mdBOMService.AddBom(bomItem);
|
||||
int result = mdBOMService.AddBom(bomItem);
|
||||
return ToResponse(new ApiResult(200, "success", result));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改bom数据
|
||||
/// </summary>
|
||||
/// <param name="bomItem"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// 修改bom数据
|
||||
/// </summary>
|
||||
/// <param name="bomItem"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("updateBom")]
|
||||
public IActionResult UpdateBOM([FromBody] MdBom bomItem)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,16 +1,7 @@
|
||||
using CSRedis;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Model.mes.md;
|
||||
using ZR.Model.mes.md.DTO;
|
||||
using ZR.Service.mes.md;
|
||||
using ZR.Service.mes.md.IService;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
{
|
||||
|
||||
@@ -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
|
||||
@@ -17,9 +14,9 @@ namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
{
|
||||
this.workproroute = workproroute;
|
||||
}
|
||||
|
||||
|
||||
[HttpGet("list")]
|
||||
public IActionResult List(int pageNum, int pageSize, string ProrouteCode="", string ProrouteName="")
|
||||
public IActionResult List(int pageNum, int pageSize, string ProrouteCode = "", string ProrouteName = "")
|
||||
{
|
||||
|
||||
(int, List<MdTechnologicalProroute>) data = workproroute.GetAll(ProrouteCode, ProrouteName, pageNum, pageSize);
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Collections.Generic;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Model.mes.md;
|
||||
using ZR.Model.mes.md.DTO;
|
||||
@@ -55,7 +51,8 @@ namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
[HttpPost("addUnit")]
|
||||
public IActionResult AddUnitmeasure([FromBody] MdUnit paramss)
|
||||
{
|
||||
if(paramss == null) {
|
||||
if (paramss == null)
|
||||
{
|
||||
return ToResponse(new ApiResult((int)ResultCode.NO_DATA, "null"));
|
||||
}
|
||||
paramss.ToCreate(HttpContext);
|
||||
@@ -117,7 +114,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +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;
|
||||
using ZR.Service.MES.md.IService;
|
||||
|
||||
namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
@@ -70,11 +66,11 @@ namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpGet("getWorkshopList")]
|
||||
public IActionResult GetWorkshopList(int worklineId=0)
|
||||
public IActionResult GetWorkshopList(int worklineId = 0)
|
||||
{
|
||||
List<MdWorkshop> MdWorkshopList= worklineService.GetMdWorkshops(worklineId);
|
||||
List<MdWorkshop> MdWorkshopList = worklineService.GetMdWorkshops(worklineId);
|
||||
return SUCCESS(MdWorkshopList);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +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.Model.System.Dto;
|
||||
using ZR.Service.mes.md;
|
||||
using ZR.Service.mes.md.IService;
|
||||
|
||||
namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
@@ -58,7 +54,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
[HttpPost("updateWorkshop")]
|
||||
public IActionResult UpdateWorkshop([FromBody] MdWorkshop workshop)
|
||||
{
|
||||
if(workshop!=null)
|
||||
if (workshop != null)
|
||||
workshop.ToUpdate(HttpContext);
|
||||
int result = mdWorkshopService.UpdateWorkshop(workshop);
|
||||
return SUCCESS(result);
|
||||
@@ -73,7 +69,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
int result = mdWorkshopService.deleteWorkshop(ids.ToArray());
|
||||
return ToResponse(result);
|
||||
}
|
||||
return null;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
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;
|
||||
using ZR.Service.MES.md;
|
||||
|
||||
namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
{
|
||||
@@ -61,7 +57,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.md
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpGet("getworkLineList")]
|
||||
public IActionResult GetworkLineList()
|
||||
|
||||
Reference in New Issue
Block a user