| | |
| | | private readonly WIDESEA_IBasicService.IErpApiService erpApiService; |
| | | |
| | | private readonly WIDESEA_IBasicService.IInvokeMESService _invokeMESService; |
| | | |
| | | public readonly IInboundService _inboundService; |
| | | private readonly IESSApiService _eSSApiService; |
| | | private readonly ILocationInfoService _locationInfoService; |
| | | private readonly IDailySequenceService _dailySequenceService; |
| | | private readonly IMaterialUnitService _materialUnitService; |
| | | private readonly ILogger<InboundOrderController> _logger; |
| | | public InboundOrderController(IInboundOrderService service, WIDESEA_IBasicService.IErpApiService erpApiService, WIDESEA_IBasicService.IInvokeMESService invokeMESService, IESSApiService eSSApiService, IDailySequenceService dailySequenceService, ILocationInfoService locationInfoService, ILogger<InboundOrderController> logger, IMaterialUnitService materialUnitService) : base(service) |
| | | public InboundOrderController(IInboundOrderService service, WIDESEA_IBasicService.IErpApiService erpApiService, WIDESEA_IBasicService.IInvokeMESService invokeMESService, IESSApiService eSSApiService, IDailySequenceService dailySequenceService, ILocationInfoService locationInfoService, ILogger<InboundOrderController> logger, IMaterialUnitService materialUnitService, IInboundService inboundService) : base(service) |
| | | { |
| | | this.erpApiService = erpApiService; |
| | | _invokeMESService = invokeMESService; |
| | |
| | | _locationInfoService = locationInfoService; |
| | | _logger = logger; |
| | | _materialUnitService = materialUnitService; |
| | | _inboundService = inboundService; |
| | | } |
| | | |
| | | [HttpPost, Route("Test"), AllowAnonymous, MethodParamsValidate] |
| | | public async Task<WebResponseContent> Test() |
| | | { |
| | | var purchaseToStockResult = await _materialUnitService.ConvertPurchaseToStockAsync("101001-00002", 10); |
| | | |
| | | Service.Db.Deleteable<Dt_InboundOrder>().Where(x=>x.UpperOrderNo== "12020251100040").ExecuteCommand(); |
| | | _inboundService.InboundOrderDetailService.Db.Deleteable<Dt_InboundOrderDetail>() |
| | | .Where(p => SqlFunc.Subqueryable<Dt_InboundOrder>().Where(s => s.Id == p.OrderId && s.UpperOrderNo == "12020251100040").Any()).ExecuteCommand(); |
| | | |
| | | var pdddurchaseToStockResult = await _materialUnitService.ConvertPurchaseToStockAsync("100513-00210", 10); |
| | | // var purchaseToStockResult = await _materialUnitService.ConvertPurchaseToStockAsync("101001-00002", 10); |
| | | |
| | | var sddd = _locationInfoService.AssignLocation(); |
| | | var code = sddd.LocationCode; |
| | | // await _dailySequenceService.GetNextSequenceAsync(); |
| | | // var pdddurchaseToStockResult = await _materialUnitService.ConvertPurchaseToStockAsync("100513-00210", 10); |
| | | |
| | | //var sddd = _locationInfoService.AssignLocation(); |
| | | //var code = sddd.LocationCode; |
| | | //var ssss=await _dailySequenceService.GetNextSequenceAsync(); |
| | | //var ddddssss = "WSLOT" + DateTime.Now.ToString("yyyyMMddHHmmss") + ssss.ToString().PadLeft(5, '0'); |
| | | //erpApiService.GetSuppliersAsync(); |
| | | |
| | | //erpApiService.GetMaterialUnitAsync(); |
| | |
| | | //await _eSSApiService.MoveContainerAsync(new WIDESEA_DTO.Basic.MoveContainerRequest |
| | | //{ |
| | | // slotCode = "3-5", |
| | | // containerCode = "A000008002" |
| | | // containerCode = "A000008009" |
| | | //}); |
| | | |
| | | //await erpApiService.GetSuppliersAsync(); |
| | |
| | | //await erpApiService.GetMaterialInfoAsync(new WIDESEA_DTO.Basic.MaterialRequest()); |
| | | |
| | | |
| | | return WebResponseContent.Instance.OK(code); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | [HttpPost, Route("ReceiveInboundOrder"), AllowAnonymous, MethodParamsValidate] |
| | | public async Task<WebResponseContent> ReceiveInboundOrder([FromBody] InboundRequestModel model) |
| | | { |
| | | if(model.inBounds == null || !model.inBounds.Any()) |
| | | { |
| | | return WebResponseContent.Instance.Error("å
¥åºåä¸è½ä¸ºç©º"); |
| | | } |
| | | |
| | | _logger.LogInformation("InboundOrderController ReceiveInboundOrder: " + JsonConvert.SerializeObject(model)); |
| | | List<Dt_InboundOrder> inboundOrders = new List<Dt_InboundOrder>(); |
| | |
| | | return content; |
| | | |
| | | } |
| | | |
| | | [HttpPost, Route("UndoPalletGroup"), AllowAnonymous, MethodParamsValidate] |
| | | public WebResponseContent UndoPalletGroup(string palletCode) |
| | | { |
| | | return Service.UndoPalletGroup(palletCode); |
| | | } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | |
| | | |
| | | } |
| | | |
| | | [HttpPost, Route("UnPalletQuantity"), AllowAnonymous, MethodParamsValidate] |
| | | public WebResponseContent UnPalletQuantity(string orderNo) |
| | | { |
| | | return Service.UnPalletQuantity(orderNo); |
| | | } |
| | | |
| | | [HttpPost, Route("BatchOrderFeedbackToMes"), AllowAnonymous] |
| | | public async Task<WebResponseContent> BatchOrderFeedbackToMes([FromBody] BatchOrderFeedbackToMesDto request) |
| | | { |
| | | return await _invokeMESService.BatchOrderFeedbackToMes(request.orderNos, request.inout); |
| | | } |
| | | |
| | | } |
| | | } |