| | |
| | | 锘縰sing Microsoft.AspNetCore.Http; |
| | | 锘縰sing Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Newtonsoft.Json; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_DTO.Basic; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_WMSServer.Controllers.Inbound; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Basic |
| | | { |
| | |
| | | [ApiController] |
| | | public class WarehouseController : ApiBaseController<IWarehouseService, Dt_Warehouse> |
| | | { |
| | | public WarehouseController(IWarehouseService service) : base(service) |
| | | private readonly ILogger<WarehouseController> _logger; |
| | | public WarehouseController(IWarehouseService service, ILogger<WarehouseController> logger) : base(service) |
| | | { |
| | | _logger = logger; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 鎺ユ敹MES 浠撳簱淇℃伅 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("ReceiveWarehouse"), AllowAnonymous, MethodParamsValidate] |
| | | public async Task<WebResponseContent> ReceiveWarehouse([FromBody] List<WarehouseAreaDto> model) |
| | | { |
| | | if (model == null || !model.Any()) |
| | | { |
| | | return WebResponseContent.Instance.Error("浠撳簱鏁版嵁涓嶈兘涓虹┖"); |
| | | } |
| | | |
| | | _logger.LogInformation("WarehouseController ReceiveWarehouse: " + JsonConvert.SerializeObject(model)); |
| | | |
| | | var content = await Service.ReceiveWarehouseArea(model); |
| | | |
| | | if (content.Status) return WebResponseContent.Instance.OK(200); |
| | | else return WebResponseContent.Instance.Error(content.Message); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |