using AutoMapper.Configuration.Annotations;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO;
using WIDESEA_IStoragIntegrationServices;
namespace WIDESEA_WMSServer.Controllers;
[Route("bdc")]
[ApiController]
public class MESController : Controller
{
private readonly IMESService _MESService;
private readonly IHttpContextAccessor _httpContextAccessor;
public MESController(IMESService MESService, IHttpContextAccessor httpContextAccessor)
{
_httpContextAccessor = httpContextAccessor;
_MESService = MESService;
}
///
/// 车身过点
///
///
///
[HttpPost, Route("PassPoint"), AllowAnonymous]
public WebResponseContent PassPoint([FromBody] RequestTaskDto json)
{
return _MESService.PassPoint(json);
}
///
/// 预绑定工单
///
///
///
[HttpPost, Route("prebind"), AllowAnonymous]
public WebResponseContent prebind([FromBody] object json)
{
return _MESService.prebind(json);
}
///
/// 涂装工单
///
///
///
[HttpPost, Route("painting/pushWorkOrderInfo"), AllowAnonymous]
public WebResponseContent pushWorkOrderInfo([FromBody] object json)
{
return _MESService.pushWorkOrderInfo(json);
}
///
/// 总装工单
///
///
///
[HttpPost, Route("order/pushOrderInfo"), AllowAnonymous]
public WebResponseContent pushOrderInfo([FromBody] object json)
{
return _MESService.pushOrderInfo(json);
}
///
/// 工单排撤
///
///
///
[HttpPost, Route("painting/removeWorkOrderInfo"), AllowAnonymous]
public WebResponseContent removeWorkOrderInfo([FromBody] object json)
{
return _MESService.removeWorkOrderInfo(json);
}
///
/// BDC请求焊装车身信息
///
///
///
[HttpPost, Route("issuedCharacter"), AllowAnonymous]
public WebResponseContent issuedCharacter(string rfidPrint, string station, string palletCode)
{
return _MESService.issuedCharacter(rfidPrint, station, palletCode);
}
///
/// BDC请求车身特征
///
///
///
[HttpPost, Route("getCharacteristic"), AllowAnonymous]
public WebResponseContent getCharacteristic([FromBody] RequestTaskDto json)
{
return _MESService.getCharacteristic(json);
}
static object lockInfo = new object();
///
/// MES拉动锁车
///
///
///
[HttpPost, Route("order/pullLock"), AllowAnonymous]
public WebResponseContent pullLock([FromBody] object json)
{
lock (lockInfo)
{
return _MESService.pullLock(json);
}
}
///
/// MES同步订单特征
///
///
///
[HttpPost, Route("order/syncOrderFeature"), AllowAnonymous]
public WebResponseContent syncOrderFeature([FromBody] object json)
{
return _MESService.syncOrderFeature(json);
}
///
/// 车身绑定工单 焊-涂、涂-总工单绑定
///
///
///
[HttpPost, Route("bindWorkOrder"), AllowAnonymous]
public WebResponseContent bindWorkOrder(string station, string rfid)
{
return _MESService.bindWorkOrder(station, rfid);
}
}