duyongjia
2024-12-19 fbfbc83d25477cf191e327e034ed996f0a2239d0
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs
@@ -1,13 +1,18 @@
锘縰sing Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Data.SqlClient;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
using System.Collections.Generic;
using System.Data;
using System.Xml.Linq;
using WIDESEA_Core;
using WIDESEA_Core.BaseController;
using WIDESEA_Core.Enums;
using WIDESEA_DTO.Basic;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_IStockRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_WMSServer.Controllers.Basic
@@ -17,7 +22,8 @@
    public class LocationInfoController : ApiBaseController<ILocationInfoService, Dt_LocationInfo>
    {
        private readonly ILocationInfoRepository _repository;
        public LocationInfoController(ILocationInfoService service, ILocationInfoRepository repository) : base(service)
        private readonly IStockInfoRepository _stockInfoRepository;
        public LocationInfoController(ILocationInfoService service, ILocationInfoRepository repository,IStockInfoRepository stockInfoRepository) : base(service)
        {
            _repository = repository;
        }
@@ -41,6 +47,15 @@
            return locations;
        }
        [HttpPost, Route("GetEmptyLocation"), AllowAnonymous]
        public string GetEmptyLocation()
        {
            Dt_LocationInfo locations = _repository.QueryDataBySql("select top 1 *  from Dt_LocationInfo where LocationStatus=0 and EnableStatus=0 order by [Column]").First();
            locations.LocationStatus = 99;
            _repository.UpdateData(locations);
            return locations.LocationCode;
        }
        [HttpPost, Route("GetLocationGroups"), AllowAnonymous]
        public List<LocationGroupDTO> GetLocationGroups(string roadway, LocationStatusEnum locationAStatus, LocationStatusEnum locationBStatus)
        {