From fbfbc83d25477cf191e327e034ed996f0a2239d0 Mon Sep 17 00:00:00 2001 From: duyongjia <adu_555@163.com> Date: 星期四, 19 十二月 2024 18:53:32 +0800 Subject: [PATCH] 上游系统对接提交 --- 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs" index 2d0a5ee..85ec620 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/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) { -- Gitblit v1.9.3