现场PBL修改后代码提交
This commit is contained in:
@@ -4,6 +4,8 @@ using DOAN.Model.PBL;
|
||||
using DOAN.Service.PBL.IService;
|
||||
using DOAN.Admin.WebApi.Filters;
|
||||
using DOAN.ServiceCore.Middleware;
|
||||
using DOAN.Infrastructure.PLC;
|
||||
using System.Collections.Generic;
|
||||
|
||||
//创建时间:2024-09-23
|
||||
namespace DOAN.Admin.WebApi.Controllers.PBL
|
||||
@@ -21,30 +23,51 @@ namespace DOAN.Admin.WebApi.Controllers.PBL
|
||||
this.mesInteraction = mesInteraction;
|
||||
}
|
||||
|
||||
//TODO 测试传感器地址
|
||||
[HttpGet("test_plc")]
|
||||
[DoanPlcActionFilter]
|
||||
public IActionResult TestPLc(string address, PLCTool pLCTool)
|
||||
{
|
||||
var response = mesInteraction.TestPLc(address, pLCTool);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
//TODO 接受工单 亮灯
|
||||
|
||||
[HttpPost("mes_light_up")]
|
||||
[DoanPlcActionFilter]
|
||||
public IActionResult MESLightUp([FromBody] LightUpDto light)
|
||||
public IActionResult MESLightUp([FromBody] LightUpDto light, PLCTool pLCTool)
|
||||
{
|
||||
var response= mesInteraction.MESLightUp(light);
|
||||
try
|
||||
{
|
||||
var response = mesInteraction.MESLightUp(light, pLCTool);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return ToResponse(500, e.Message);
|
||||
}
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
//TODO 扫码灭灯
|
||||
[HttpGet("mes_light_down")]
|
||||
[DoanPlcActionFilter]
|
||||
public IActionResult MESLightDown(string scan_code)
|
||||
public IActionResult MESLightDown(string scan_code, PLCTool pLCTool)
|
||||
{
|
||||
var response = mesInteraction.MESLightDown(scan_code);
|
||||
try
|
||||
{
|
||||
var response = mesInteraction.MESLightDown(scan_code, pLCTool);
|
||||
|
||||
return SUCCESS(response);
|
||||
return SUCCESS(response);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return ToResponse(500, e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user