| | |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.MES |
| | | { |
| | | /// <summary> |
| | | /// MESæ¥å£ |
| | | /// </summary> |
| | | [Route("api/Mes")] |
| | | [ApiController] |
| | | public class MesController : ControllerBase |
| | | { |
| | | private readonly IPurchaseOrderRepository _purchaseOrderRepository; |
| | | private readonly IPurchaseOrderService _purchaseOrderService; |
| | | private readonly ISupplierInfoService _supplierInfoService; |
| | | private readonly IMaterielInfoService _materielInfoService; |
| | | private readonly IOutboundOrderService _outboundOrderService; |
| | | private readonly IOutboundService _outboundService; |
| | | private readonly ITaskService _taskService; |
| | | |
| | | public MesController(IPurchaseOrderRepository purchaseOrderRepository, IPurchaseOrderService purchaseOrderService, ISupplierInfoService supplierInfoService, IMaterielInfoService materielInfoService, IOutboundOrderService outboundOrderService, ITaskService taskService) |
| | | public MesController(IOutboundService outboundService, ITaskService taskService) |
| | | { |
| | | _purchaseOrderRepository = purchaseOrderRepository; |
| | | _purchaseOrderService = purchaseOrderService; |
| | | _supplierInfoService = supplierInfoService; |
| | | _materielInfoService = materielInfoService; |
| | | _outboundOrderService = outboundOrderService; |
| | | _outboundService = outboundService; |
| | | _taskService = taskService; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¥æ¶MESæµè¯æ¶åºåº |
| | | /// </summary> |
| | |
| | | { |
| | | return _taskService.TestToolOut(model.Content); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¥æ¶MESæµè¯æ¶éåº |
| | | /// </summary> |
| | |
| | | { |
| | | return _taskService.TestToolBack(model.Content); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æµè¯æ¶æ¥åº |
| | | /// </summary> |
| | |
| | | { |
| | | return _taskService.TestScrap(model.Content); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="toolSynInfo"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("TestSynStock"), AllowAnonymous] |
| | | public WebResponseContent TestSynStock([FromBody]TestToolSynInfo toolSynInfo) |
| | | public WebResponseContent TestSynStock([FromBody] TestToolSynInfo toolSynInfo) |
| | | { |
| | | return _taskService.TestSynStock(toolSynInfo); |
| | | } |
| | | [HttpPost, Route("testHttp"), AllowAnonymous, MethodParamsValidate] |
| | | public string TestScrap(string str) |
| | | |
| | | /// <summary> |
| | | /// åºæ¿åºåº |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("SubstrateOut"), AllowAnonymous] |
| | | public MesResponseContent SubstrateOut([FromBody] Root<SubstrateOutModel> model) |
| | | { |
| | | return HttpMesHelper.GetStr(str); |
| | | return _taskService.SubstrateOut(model.Content); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åºæ¿ä½æéåº |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("SubstrateBack"), AllowAnonymous] |
| | | public MesResponseContent SubstrateBack([FromBody] Root<SubstrateBackModel> model) |
| | | { |
| | | return _taskService.SubstrateBack(model.Content); |
| | | } |
| | | /// <summary> |
| | | /// PP大å·åºåº-è¿è¡åå· |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("PPSubsectionOut"), AllowAnonymous] |
| | | public MesResponseContent PPSubsectionOut([FromBody] Root<PPSubsectionOutModel> model) |
| | | { |
| | | return _taskService.PPSubsectionOut(model.Content); |
| | | } |
| | | /// <summary> |
| | | /// PPå°å·åºåº |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("PPCutOut"), AllowAnonymous] |
| | | public MesResponseContent PPCutOut([FromBody] Root<PPCutOutModle> model) |
| | | { |
| | | return _taskService.PPCutOut(model.Content); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// PPå
¥åº(大å·ãå°å·ãå¼ æ) |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("PPBack"), AllowAnonymous] |
| | | public MesResponseContent PPBack([FromBody] Root<PPBackModel> model) |
| | | { |
| | | return _taskService.PPBack(model.Content); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// PPåºåæ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("QueryPpByWidth"), AllowAnonymous] |
| | | public MesResponseContent QueryPpByWidth([FromBody] Root<QueryPpByWidthModel> model) |
| | | { |
| | | return _taskService.QueryPpByWidth(model.Content); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç©æåºåºï¼WMS忥åºåºç©ææ¹æ¬¡è³MES |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("UploadMesMaterialLotaAcept"), AllowAnonymous] |
| | | public WebResponseContent UploadMesMaterialLotaAcept([FromBody] MesMaterialLotaAceptModel model) |
| | | { |
| | | return _taskService.UploadMesMaterialLotaAcept(model); |
| | | } |
| | | /// <summary> |
| | | /// æåè¿å·¥æåº |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost,Route("RworkTask"),AllowAnonymous] |
| | | public MesResponseContent RworkTask([FromBody] RworkTaskModel model) |
| | | { |
| | | return _taskService.RworkTask(model); |
| | | } |
| | | |
| | | } |
| | | } |