using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using WIDESEA_Core.Attributes; using WIDESEA_Core; using WIDESEA_DTO.ERP; using WIDESEA_DTO; using WIDESEA_External.ERPService; using WIDESEA_IBasicService; using WIDESEA_DTO.PLS; using WIDESEA_External.Model; using WIDESEA_External.IPLSService; namespace WIDESEA_WMSServer.Controllers.PLS { [Route("api/Pls")] [ApiController] public class PlsController:ControllerBase { private readonly IBasicService _basicService; private readonly IInvokePLSService _invokePLSService; public PlsController(IBasicService basicService,IInvokePLSService invokePLSService) { _basicService = basicService; _invokePLSService = invokePLSService; } /// /// 接收PLS同步VMI物料信息 /// /// /// [HttpPost, Route("ReceiveVMIMaterial"), AllowAnonymous, MethodParamsValidate] public ApiResponseContent ReceiveVMIMaterial([FromBody] VMIItemCodeInfo vmiModel) { WebResponseContent content = _basicService.MaterielInfoService.ReceiveVMIMaterial(vmiModel); if (content.Status) { return ApiResponseContent.Instance.OK(); } else { return ApiResponseContent.Instance.Error(); } } /// /// MO票状态上报PLS /// /// [HttpPost, Route("InvokeMoInboundStatuApi"), AllowAnonymous] public string InvokeMoInboundStatuApi([FromBody] ReturnMoInboundStatuModel moInboundStatuModel) { return _invokePLSService.InvokeMoInboundStatuApi(moInboundStatuModel); } } }