| | |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Record |
| | | { |
| | | /// <summary> |
| | | /// 货位状态变动记录 |
| | | /// </summary> |
| | | [Route("api/LocationStatusChangeRecord")] |
| | | [ApiController] |
| | | public class LocationStatusChangeRecordController : ApiBaseController<ILocationStatusChangeRecordService, Dt_LocationStatusChangeRecord> |
| | | { |
| | | public LocationStatusChangeRecordController(ILocationStatusChangeRecordService service) : base(service) |
| | | { |
| | | } |
| | | |
| | | } |
| | | } |
| | | using Microsoft.AspNetCore.Authorization;
|
| | | using Microsoft.AspNetCore.Mvc;
|
| | | using WIDESEA_Core;
|
| | | using WIDESEA_Core.BaseController;
|
| | | using WIDESEA_IRecordService;
|
| | | using WIDESEA_Model.Models;
|
| | |
|
| | | namespace WIDESEA_WMSServer.Controllers.Record
|
| | | {
|
| | | /// <summary>
|
| | | /// 货位状态变动记录
|
| | | /// </summary>
|
| | | [Route("api/LocationStatusChangeRecord")]
|
| | | [ApiController]
|
| | | public class LocationStatusChangeRecordController : ApiBaseController<ILocationStatusChangeRecordService, Dt_LocationStatusChangeRecord>
|
| | | {
|
| | | public LocationStatusChangeRecordController(ILocationStatusChangeRecordService service) : base(service)
|
| | | {
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 根据ID获取货位状态变动记录
|
| | | /// </summary>
|
| | | /// <param name="id">货位状态变动记录ID</param>
|
| | | /// <returns>货位状态变动记录信息</returns>
|
| | | [HttpPost("GetLocationState"), AllowAnonymous]
|
| | | public WebResponseContent GetLocationState(int id)
|
| | | {
|
| | | try
|
| | | {
|
| | | if (id <= 0)
|
| | | return WebResponseContent.Instance.Error("ID参数无效");
|
| | |
|
| | | var records = Service.Repository.QueryData(x => x.LocationId == id);
|
| | | if (records == null || records.Count == 0)
|
| | | return WebResponseContent.Instance.Error("未找到对应的货位状态变动记录");
|
| | |
|
| | | return WebResponseContent.Instance.OK(null, records);
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | return WebResponseContent.Instance.Error($"获取货位状态变动记录失败: {ex.Message}");
|
| | | }
|
| | | }
|
| | | }
|
| | | } |