| | |
| | | using SqlSugar; |
| | | using System.Net; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_BasicService; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.Attributes; |
| | |
| | | private readonly WIDESEA_IBasicService.IInvokeMESService _invokeMESService; |
| | | |
| | | private readonly IESSApiService _eSSApiService; |
| | | public InboundOrderController(IInboundOrderService service, WIDESEA_IBasicService.IErpApiService erpApiService, WIDESEA_IBasicService.IInvokeMESService invokeMESService, IESSApiService eSSApiService) : base(service) |
| | | private readonly ILocationInfoService _locationInfoService; |
| | | private readonly IDailySequenceService _dailySequenceService; |
| | | public InboundOrderController(IInboundOrderService service, WIDESEA_IBasicService.IErpApiService erpApiService, WIDESEA_IBasicService.IInvokeMESService invokeMESService, IESSApiService eSSApiService, IDailySequenceService dailySequenceService, ILocationInfoService locationInfoService) : base(service) |
| | | { |
| | | this.erpApiService = erpApiService; |
| | | _invokeMESService = invokeMESService; |
| | | _eSSApiService = eSSApiService; |
| | | _dailySequenceService = dailySequenceService; |
| | | _locationInfoService = locationInfoService; |
| | | } |
| | | |
| | | [HttpPost, Route("Test"), AllowAnonymous, MethodParamsValidate] |
| | | public async Task<WebResponseContent> Test() |
| | | { |
| | | |
| | | var sddd = _locationInfoService.AssignLocation(); |
| | | var code = sddd.LocationCode; |
| | | // await _dailySequenceService.GetNextSequenceAsync(); |
| | | //erpApiService.GetSuppliersAsync(); |
| | | |
| | | //erpApiService.GetMaterialUnitAsync(); |
| | |
| | | // qty = "20.0", |
| | | // }); |
| | | |
| | | await _eSSApiService.MoveContainerAsync(new WIDESEA_DTO.Basic.MoveContainerRequest |
| | | { |
| | | slotCode = "3-5", |
| | | containerCode = "A000008006" |
| | | }); |
| | | // erpApiService.GetMaterialInfoAsy2nc(new WIDESEA_DTO.Basic.MaterialRequest()); |
| | | return WebResponseContent.Instance.OK(); |
| | | //await _eSSApiService.MoveContainerAsync(new WIDESEA_DTO.Basic.MoveContainerRequest |
| | | //{ |
| | | // slotCode = "3-5", |
| | | // containerCode = "A000008002" |
| | | //}); |
| | | |
| | | //await erpApiService.GetSuppliersAsync(); |
| | | //await erpApiService.GetMaterialUnitAsync(); |
| | | //await erpApiService.GetMaterialInfoAsync(new WIDESEA_DTO.Basic.MaterialRequest()); |
| | | |
| | | |
| | | return WebResponseContent.Instance.OK(code); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | [HttpPost, Route("ReceiveInboundOrder"), AllowAnonymous, MethodParamsValidate] |
| | | public WebResponseContent ReceiveInboundOrder([FromBody] InboundRequestModel model) |
| | | { |
| | | |
| | | if(model.inBounds == null || !model.inBounds.Any()) |
| | | { |
| | | return WebResponseContent.Instance.Error("å
¥åºåä¸è½ä¸ºç©º"); |
| | | } |
| | | |
| | | List<Dt_InboundOrder> inboundOrders = new List<Dt_InboundOrder>(); |
| | | |