| | |
| | | 锘縰sing Autofac.Core; |
| | | using MailKit.Search; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_BasicService; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Common.StockEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_DTO.Allocate; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_DTO.Mes; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_InboundService; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_OutboundService; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Inbound |
| | | { |
| | |
| | | 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 IOutStockLockInfoService _outStockLockInfoService; |
| | | private readonly IOutboundOrderDetailService _outboundOrderDetailService; |
| | | 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, IOutStockLockInfoService outStockLockInfoService, IOutboundOrderDetailService outboundOrderDetailService) : base(service) |
| | | { |
| | | this.erpApiService = erpApiService; |
| | | _invokeMESService = invokeMESService; |
| | |
| | | _locationInfoService = locationInfoService; |
| | | _logger = logger; |
| | | _materialUnitService = materialUnitService; |
| | | _inboundService = inboundService; |
| | | _outStockLockInfoService = outStockLockInfoService; |
| | | _outboundOrderDetailService = outboundOrderDetailService; |
| | | } |
| | | |
| | | [HttpPost, Route("Test"), AllowAnonymous, MethodParamsValidate] |
| | | public async Task<WebResponseContent> Test() |
| | | { |
| | | // var purchaseToStockResult = await _materialUnitService.ConvertPurchaseToStockAsync("101001-00002", 10); |
| | | |
| | | |
| | | // var pdddurchaseToStockResult = await _materialUnitService.ConvertPurchaseToStockAsync("100513-00210", 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 sddd = _locationInfoService.AssignLocation(); |
| | | var code = sddd.LocationCode; |
| | | var purchaseToStockResult = await _materialUnitService.ConvertPurchaseToStockAsync("100513-00303", 1); |
| | | |
| | | var pdddurchaseToStockResult = await _materialUnitService.ConvertFromToStockAsync("100513-00303", "W013", 1); |
| | | |
| | | //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(); |
| | |
| | | //await erpApiService.GetMaterialInfoAsync(new WIDESEA_DTO.Basic.MaterialRequest()); |
| | | |
| | | |
| | | return WebResponseContent.Instance.OK(code); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | return content; |
| | | |
| | | } |
| | | |
| | | [HttpPost, Route("UndoPalletGroup"), AllowAnonymous, MethodParamsValidate] |
| | | public WebResponseContent UndoPalletGroup(string palletCode) |
| | | { |
| | | return Service.UndoPalletGroup(palletCode); |
| | | } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |