| | |
| | | using WIDESEA_Core; |
| | | using WIDESEA_DTO; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_ITaskInfoService; |
| | | using WIDESEA_TaskInfoService; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_Core.Helper; |
| | | using Autofac.Core; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_BasicService; |
| | | using WIDESEA_DTO.Basic; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_IOutboundService; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.MES |
| | | { |
| | |
| | | [ApiController] |
| | | public class MesController : ControllerBase |
| | | { |
| | | private readonly IOutboundService _outboundService; |
| | | private readonly ITaskService _taskService; |
| | | private readonly IOutMESOrderService _outMESOrderService; |
| | | |
| | | public MesController(IOutboundService outboundService, ITaskService taskService) |
| | | public MesController(ITaskService taskService,IOutMESOrderService outMESOrderService) |
| | | { |
| | | _outboundService = outboundService; |
| | | _taskService = taskService; |
| | | _outMESOrderService = outMESOrderService; |
| | | } |
| | | /// <summary> |
| | | /// æ¥æ¶MESé¢æè®¡å |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("ReceiveOutBound"), AllowAnonymous] |
| | | |
| | | public WebResponseContent ReceiveOutBound([FromBody] OutMESOrderDTO outMESOrderDTO) |
| | | { |
| | | return _outMESOrderService.ReceiveOutBound(outMESOrderDTO); |
| | | } |
| | | /// <summary> |
| | | /// MESèªå¨å«ææ¥å£ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | /// <summary> |
| | | [HttpPost, HttpGet, Route("ReceiveAutoIssue"), AllowAnonymous] |
| | | public WebResponseContent ReceiveAutoIssue([FromBody] MESAutoIssueDTO autoIssueDTO) |
| | | { |
| | | return _taskService.ReceiveAutoIssue(autoIssueDTO); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¥æ¶MESæµè¯æ¶åºåº |
| | | /// MESæå¨å«ææ¥å£ |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("TestToolOut"), AllowAnonymous, MethodParamsValidate] |
| | | public MesResponseContent TestToolOut([FromBody] Root<TestToolOutModel> model) |
| | | /// <summary> |
| | | [HttpPost, HttpGet, Route("ReceiveManualIssue"), AllowAnonymous] |
| | | public WebResponseContent ReceiveManualIssue([FromBody] MESAutoIssueDTO autoIssueDTO) |
| | | { |
| | | return _taskService.TestToolOut(model.Content); |
| | | return _taskService.ReceiveAutoIssue(autoIssueDTO); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¥æ¶MESæµè¯æ¶éåº |
| | | /// MES空æ/使å¼å«æ¥å£ |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("TestToolBack"), AllowAnonymous, MethodParamsValidate] |
| | | public MesResponseContent TestToolBack([FromBody] Root<TestToolBackModel> model) |
| | | /// <summary> |
| | | [HttpPost, HttpGet, Route("ReceiveReturnIssue"), AllowAnonymous] |
| | | public WebResponseContent ReceiveReturnIssue([FromBody] MESAutoIssueDTO autoIssueDTO) |
| | | { |
| | | return _taskService.TestToolBack(model.Content); |
| | | return _taskService.ReceiveAutoIssue(autoIssueDTO); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æµè¯æ¶æ¥åº |
| | | /// æå/åæåä¿¡æ¯åæ¥æ¥å£ |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("TestToolScrap"), AllowAnonymous, MethodParamsValidate] |
| | | public MesResponseContent TestScrap([FromBody] Root<TestToolScrap> model) |
| | | /// <summary> |
| | | [HttpPost, HttpGet, Route("ReceiveProCodeInfo"), AllowAnonymous] |
| | | public WebResponseContent ReceiveProCodeInfo([FromBody] MESAutoIssueDTO autoIssueDTO) |
| | | { |
| | | return _taskService.TestScrap(model.Content); |
| | | return _taskService.ReceiveAutoIssue(autoIssueDTO); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// MESå·¥å忢æ¥å£ |
| | | /// </summary> |
| | | /// <param name="toolSynInfo"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("TestSynStock"), AllowAnonymous] |
| | | public WebResponseContent TestSynStock([FromBody] TestToolSynInfo toolSynInfo) |
| | | { |
| | | return _taskService.TestSynStock(toolSynInfo); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åºæ¿åºåº |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("SubstrateOut"), AllowAnonymous] |
| | | public MesResponseContent SubstrateOut([FromBody] Root<SubstrateOutModel> model) |
| | | [HttpPost, HttpGet, Route("ReceiveProOrderStop"), AllowAnonymous] |
| | | public WebResponseContent ReceiveProOrderStop([FromBody] MESAutoIssueDTO autoIssueDTO) |
| | | { |
| | | 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> |
| | | /// ç©æåºåºï¼WMS忥åºåºç©ææ¹æ¬¡è³MES |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("UploadMesMaterialLotaAcept"), AllowAnonymous] |
| | | public WebResponseContent UploadMesMaterialLotaAcept([FromBody] MesMaterialLotaAceptModel model) |
| | | { |
| | | return _taskService.UploadMesMaterialLotaAcept(model); |
| | | } |
| | | /// <summary> |
| | | /// MESæåå
å
ä¿¡æ¯æ¥æ¶ |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("BagInfoSync"), AllowAnonymous] |
| | | public MesResponseContent BagInfoSync([FromBody] Root<MesBagInfoModel> model) |
| | | { |
| | | return _taskService.BagInfoSync(model.Content); |
| | | } |
| | | /// <summary> |
| | | /// MESæåå¤å
ä¿¡æ¯æ¥æ¶ |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("BoxStockin"), AllowAnonymous] |
| | | public MesResponseContent BoxStockin([FromBody] Root<MesBoxInfoModel> model) |
| | | { |
| | | return _taskService.BoxStockin(model.Content); |
| | | } |
| | | /// <summary> |
| | | /// MESæååºåºæ¥å£è°ç¨ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("ShipmentOrderSync"), AllowAnonymous] |
| | | public WebResponseContent ShipmentOrderSync([FromBody] MesShipmentOrderSync model) |
| | | { |
| | | return _taskService.ShipmentOrderSync(model); |
| | | } |
| | | /// <summary> |
| | | /// æåè¿å·¥æåº |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost,Route("RworkTask"),AllowAnonymous] |
| | | public MesResponseContent RworkTask([FromBody] Root<RworkTaskModel> model) |
| | | { |
| | | return _taskService.RworkTask(model.Content); |
| | | } |
| | | /// <summary> |
| | | /// åºåæ¿åºåºåæ¥æ¥å£ |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("ProductOutBoundSync"), AllowAnonymous] |
| | | public WebResponseContent ProductOutBoundSync([FromBody] MesProductOutBound model) |
| | | { |
| | | return _outboundService.RworkOutboundOrderService.ProductOutBoundSync(model); |
| | | return _taskService.ReceiveAutoIssue(autoIssueDTO); |
| | | } |
| | | } |
| | | } |