dengjunjie
2025-01-12 6d834630986b0ba3fa8b95d4a6b0fab54708c3ec
Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn
已删除2个文件
已修改14个文件
已添加8个文件
273 ■■■■■ 文件已修改
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/21c29b54-96c7-4ef4-8769-97b93b4579e9.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/2aeac101-1f3c-408b-8198-15ca81fb399f.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/47e7ae83-7241-4034-8668-0cff8bf46000.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/a596cb47-ab88-4895-a28c-478a351b517d.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/d6a25fc6-8079-499f-9986-415a52105ed7.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/f0f1270a-ac4e-4e2b-b52d-3beb9a80089a.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile1.pubxml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/IRouterExtension.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RouterExtension.cs 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/ConveyorLineJob_BC.cs 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/StackerCraneJob_BC.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/油墨仓/CommonHoisterJob.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8418c4b5-1bc9-4cbc-b42e-fc61309bcce6.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d39d9aff-c2cd-40cb-82ad-2a7895fa7047.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/AssignInboundTaskLocation_BC.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/21c29b54-96c7-4ef4-8769-97b93b4579e9.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/2aeac101-1f3c-408b-8198-15ca81fb399f.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/47e7ae83-7241-4034-8668-0cff8bf46000.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/a596cb47-ab88-4895-a28c-478a351b517d.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/d6a25fc6-8079-499f-9986-415a52105ed7.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/f0f1270a-ac4e-4e2b-b52d-3beb9a80089a.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs
@@ -65,6 +65,8 @@
        /// <returns></returns>
        WebResponseContent RequestWMSTask(string palletCode, string sourceAddress);
        WebResponseContent RequestWMSTask(string palletCode, string sourceAddress, string roadway);
        /// <summary>
        /// å‘WMS申请分配货位
        /// </summary>
@@ -180,5 +182,12 @@
        /// <param name="roadwayNos"></param>
        /// <returns></returns>
        WebResponseContent RequestWMSAssignRoadway(int taskNum, List<string> roadwayNos);
        /// <summary>
        ///
        /// </summary>
        /// <param name="roadwayNos"></param>
        /// <returns></returns>
        WebResponseContent RequestWMSAssignRoadway(List<string> roadwayNos);
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs
@@ -6,6 +6,7 @@
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_Tasks;
namespace WIDESEAWCS_WCSServer.Controllers.Task
{
@@ -14,9 +15,12 @@
    public class TaskController : ApiBaseController<ITaskService, Dt_Task>
    {
        private readonly IHttpContextAccessor _httpContextAccessor;
        public TaskController(ITaskService service, IHttpContextAccessor httpContextAccessor) : base(service)
        private readonly IRouterExtension _routerExtension;
        public TaskController(ITaskService service, IHttpContextAccessor httpContextAccessor, IRouterExtension routerExtension) : base(service)
        {
            _httpContextAccessor = httpContextAccessor;
            _routerExtension = routerExtension;
        }
        [HttpPost, Route("ReceiveTask"), AllowAnonymous]
@@ -65,5 +69,10 @@
        {
            return Service.SendSecureReplyToAgv(taskNum);
        }
        [HttpPost, HttpGet, Route("GetRouteEndPoint"), AllowAnonymous]
        public WebResponseContent GetRouteEndPoint(string startPoint, int routeType)
        {
            return WebResponseContent.Instance.OK(data: _routerExtension.GetEndPoint(startPoint, routeType));
        }
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile1.pubxml
@@ -4,7 +4,7 @@
-->
<Project>
  <PropertyGroup>
    <DeleteExistingFiles>false</DeleteExistingFiles>
    <DeleteExistingFiles>true</DeleteExistingFiles>
    <ExcludeApp_Data>false</ExcludeApp_Data>
    <LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
@@ -13,5 +13,9 @@
    <PublishUrl>bin\Release\net6.0\publish\</PublishUrl>
    <WebPublishMethod>FileSystem</WebPublishMethod>
    <_TargetId>Folder</_TargetId>
    <SiteUrlToLaunchAfterPublish />
    <TargetFramework>net6.0</TargetFramework>
    <ProjectGuid>487fa45b-ea1a-4aca-bb5b-0f6708f462c0</ProjectGuid>
    <SelfContained>false</SelfContained>
  </PropertyGroup>
</Project>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
@@ -12,8 +12,8 @@
  "MainDB": "DB_WIDESEA", //当前项目的主库,所对应的连接字符串的Enabled必须为true
  //连接字符串
  //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
  //"ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWCS_HUAIAN;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "ConnectionString": "Data Source=10.30.4.92;Initial Catalog=TestWCS_TC;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWCS_HUAIAN;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionString": "Data Source=10.30.4.92;Initial Catalog=TestWCS_TC;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "WMSConnectionStrings": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //跨域
  "Cors": {
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -314,6 +314,35 @@
            return content;
        }
        public WebResponseContent RequestWMSTask(string palletCode, string sourceAddress, string roadway)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                string address = AppSettings.Get("WMSApiAddress");
                if (string.IsNullOrEmpty(address))
                {
                    return WebResponseContent.Instance.Error($"未找到WMSApi地址");
                }
                string responseStr = HttpHelper.Get($"{address}/api/Task/DeviceRequestInboundTask?stationCode={sourceAddress}&roadwayNo={roadway}&palletCode={palletCode}");
                WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr);
                if (responseContent != null && responseContent.Status && responseContent.Data != null)
                {
                    WMSTaskDTO? taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(responseContent.Data.ToString());
                    if (taskDTO != null)
                    {
                        content = ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO });
                    }
                }
            }
            catch (Exception ex)
            {
                content = WebResponseContent.Instance.Error(ex.Message);
            }
            return content;
        }
        public WebResponseContent RequestWMSAssignRoadway(int taskNum, List<string> roadwayNos)
        {
            WebResponseContent content = new WebResponseContent();
@@ -339,6 +368,31 @@
            return content;
        }
        public WebResponseContent RequestWMSAssignRoadway(List<string> roadwayNos)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                string address = AppSettings.Get("WMSApiAddress");
                if (string.IsNullOrEmpty(address))
                {
                    return WebResponseContent.Instance.Error($"未找到WMSApi地址");
                }
                string responseStr = HttpHelper.Post($"{address}/api/Task/SingleAssignRoadway", roadwayNos.Serialize());
                WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr);
                if (responseContent != null && responseContent.Status && responseContent.Data != null)
                {
                    return responseContent;
                }
            }
            catch (Exception ex)
            {
                content = WebResponseContent.Instance.Error(ex.Message);
            }
            return content;
        }
        /// <summary>
        /// å‘WMS申请分配货位
        /// </summary>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/IRouterExtension.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Core;
using WIDESEAWCS_QuartzJob.Models;
namespace WIDESEAWCS_Tasks
{
    public interface IRouterExtension : IDependency
    {
        List<Dt_Router> GetEndPoint(string startPoint, int routeType);
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RouterExtension.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_QuartzJob.Models;
using WIDESEAWCS_QuartzJob.Repository;
using WIDESEAWCS_QuartzJob.Service;
namespace WIDESEAWCS_Tasks
{
    public class RouterExtension : IRouterExtension
    {
        private readonly IRouterRepository _routerRepository;
        public RouterExtension(IRouterRepository routerRepository)
        {
            _routerRepository = routerRepository;
        }
        public List<Dt_Router> GetEndPoint(string startPoint, int routeType)
        {
            List<Dt_Router> routers = new List<Dt_Router>();
            try
            {
                List<Dt_Router> dt_Routers = _routerRepository.QueryData(x => x.StartPosi == startPoint && x.InOutType == routeType);
                foreach (var item in dt_Routers)
                {
                    if (item.IsEnd && !routers.Any(x => x.Id == item.Id))
                    {
                        routers.Add(item);
                    }
                    else
                    {
                        List<Dt_Router> tempRouters = GetEndPoint(item.NextPosi, routeType);
                        foreach (var router in tempRouters)
                        {
                            //如果下一个路由的起点和终点都匹配,则添加到路由列表中
                            if (router.IsEnd && !routers.Any(x => x.Id == router.Id))
                            {
                                routers.Add(router);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
            }
            return routers;
        }
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/°å²Ä²Ö/ConveyorLineJob_BC.cs
@@ -17,6 +17,7 @@
using WIDESEAWCS_QuartzJob.DTO;
using WIDESEAWCS_QuartzJob.Models;
using WIDESEAWCS_QuartzJob.Repository;
using WIDESEAWCS_QuartzJob.Service;
using WIDESEAWCS_Tasks.ConveyorLineJob;
namespace WIDESEAWCS_Tasks
@@ -30,14 +31,18 @@
        private readonly ITaskRepository _taskRepository;
        private readonly IStationMangerRepository _stationMangerRepository;
        private readonly IRouterRepository _routerRepository;
        private readonly IRouterService _routerService;
        private readonly IRouterExtension _routerExtension;
        public ConveyorLineJob_BC(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository)
        public ConveyorLineJob_BC(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IRouterService routerService, IRouterExtension routerExtension)
        {
            _taskService = taskService;
            _taskExecuteDetailService = taskExecuteDetailService;
            _taskRepository = taskRepository;
            _stationMangerRepository = stationMangerRepository;
            _routerRepository = routerRepository;
            _routerService = routerService;
            _routerExtension = routerExtension;
        }
        public Task Execute(IJobExecutionContext context)
@@ -76,10 +81,18 @@
                            {
                                if (conveyorLineInfoRead.TaskNum == 0 && !string.IsNullOrEmpty(conveyorLineInfoRead.Barcode))//采购入库
                                {
                                    WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode);
                                    if (content.Status)
                                    List<Dt_Router> routers = _routerExtension.GetEndPoint(item.StationCode, TaskTypeEnum.Inbound.ObjToInt());
                                    List<string> stations = routers.Select(x => x.NextPosi).ToList();
                                    WebResponseContent responseContent = _taskService.RequestWMSAssignRoadway(stations);
                                    if (responseContent.Status)
                                    {
                                        device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
                                        WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode);
                                        if (content.Status)
                                        {
                                            device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
                                        }
                                    }
                                }
                                else//生产退库
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/°å²Ä²Ö/StackerCraneJob_BC.cs
@@ -150,7 +150,7 @@
                            return WebResponseContent.Instance.Error($"未找到路由信息,{task.NextAddress}");
                        }
                        _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: task.TargetAddress);
                        _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: router.NextPosi, targetAddress: router.NextPosi);
                    }
                    else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup || task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup)
                    {
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ÓÍÄ«²Ö/CommonHoisterJob.cs
@@ -104,7 +104,7 @@
                        }
                        else if (leisure && !tray && !requestIn && !inbounding && !requestOut && !outbounding)
                        {
                            Dt_Task task = _taskRepository.QueryFirst(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && _taskService.TaskOutboundTypes.Contains(x.TaskType));
                            Dt_Task task = _taskRepository.QueryFirst(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskType != TaskTypeEnum.MesOutbound.ObjToInt());
                            if (task != null)
                            {
                                bool isWrite = hoister.SetValue(HoisterDBName.RequestOut, true, deviceChildCode);
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8418c4b5-1bc9-4cbc-b42e-fc61309bcce6.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d39d9aff-c2cd-40cb-82ad-2a7895fa7047.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs
@@ -75,6 +75,14 @@
                List<Dt_LocationInfo> definedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == palletType.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenBy(x => x.Column).ThenBy(x => x.Row).ToList();
                if (palletTypeInfo.LocaitonCount == 2)
                {
                    if (roadwayNo != "SC01_BC")
                        definedTypeEmptyLocations = definedTypeEmptyLocations.Where(x => x.Column % 2 == 1).ToList();
                    else
                        definedTypeEmptyLocations = definedTypeEmptyLocations.Where(x => x.Column % 2 == 0).ToList();
                }
                if (definedTypeEmptyLocations.Any())
                {
                    for (int i = 0; i < definedTypeEmptyLocations.Count; i++)
@@ -103,7 +111,7 @@
                        Dt_LocationInfo? locationInfo = GetUsableLocation_BC(locationInfos, undefinedTypeEmptyLocation, palletType, palletTypeInfo);
                        if (locationInfo != null)
                        {
                            UpdateLocationStatus(locationInfo, palletType, LocationStatusEnum.Lock, locationInfo.WarehouseId);
                            //UpdateLocationStatus(locationInfo, palletType, LocationStatusEnum.Lock, locationInfo.WarehouseId);
                            locationCaches_BC.Add(new LocationCache { LocationCode = locationInfo.LocationCode, DateTime = DateTime.Now });
                            return locationInfo;
                        }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs
@@ -84,28 +84,37 @@
        private string RequestDataLog(HttpContext context)
        {
            var request = context.Request;
            if (request.ContentType?.ToLower() != "multipart/form-data" && request.ContentLength <= 100000)
            {
                var sr = new StreamReader(request.Body);
                object obj = new
            var sr = new StreamReader(request.Body);
            object obj;
            string bodyData = sr.ReadToEndAsync().Result;
            if (request.ContentLength <= 100000)
            {
                obj = new
                {
                    QueryString = request.QueryString.ToString(),
                    BodyData = sr.ReadToEndAsync().Result
                    BodyData = bodyData
                };
                string data = JsonConvert.SerializeObject(obj);
                request.Body.Position = 0;
                return data;
            }
            return "";
            else
            {
                obj = new
                {
                    QueryString = request.QueryString.ToString(),
                    BodyData = ""
                };
            }
            string data = JsonConvert.SerializeObject(obj);
            request.Body.Position = 0;
            return data; ;
        }
        private string ResponseDataLog(HttpResponse response)
        {
            if (response.ContentType?.ToLower() != "multipart/form-data" && response.ContentLength <= 100000)
            if (response.ContentLength <= 100000)
            {
                response.Body.Position = 0;
                using StreamReader stream = new StreamReader(response.Body, leaveOpen: true);
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs
@@ -206,6 +206,13 @@
        WebResponseContent AssignRoadway(int taskNum, List<string> roadwayNos);
        /// <summary>
        ///
        /// </summary>
        /// <param name="roadwayNos"></param>
        /// <returns></returns>
        WebResponseContent AssignRoadway(List<string> roadwayNos);
        /// <summary>
        /// ä¿®æ”¹ä»»åŠ¡çŠ¶æ€
        /// </summary>
        /// <param name="task"></param>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs
@@ -879,6 +879,15 @@
                }
                return palletTypeInfo.PalletType;
            }
            else if (warehouse.WarehouseCode == WarehouseEnum.HA57.ObjToString())
            {
                Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 3));
                if (palletTypeInfo == null)
                {
                    throw new Exception($"托盘号错误");
                }
                return palletTypeInfo.PalletType;
            }
            return -1;
        }
    }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/AssignInboundTaskLocation_BC.cs
@@ -35,7 +35,7 @@
                    return WebResponseContent.Instance.OK(data: task.TargetAddress);
                }
                List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => (x.LocationType == task.PalletType || x.LocationType == 0) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && roadwayNos.Contains(x.RoadwayNo)).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList();
                List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => (x.LocationType == task.PalletType || x.LocationType == LocationTypeEnum.Undefined.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && roadwayNos.Contains(x.RoadwayNo)).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList();
                string roadwayNo = locationCounts.OrderBy(x => x.Count).FirstOrDefault()?.RoadwayNo ?? "";
                
@@ -48,6 +48,29 @@
            }
        }
        /// <summary>
        /// å…¥åº“任务申请分配货位
        /// </summary>
        /// <param name="taskNum">任务号</param>
        /// <param name="roadwayNos">巷道号</param>
        /// <returns></returns>
        public WebResponseContent AssignRoadway(List<string> roadwayNos)
        {
            try
            {
                List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => (x.LocationType == LocationTypeEnum.Undefined.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && roadwayNos.Contains(x.RoadwayNo)).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList();
                string roadwayNo = locationCounts.OrderBy(x => x.Count).FirstOrDefault()?.RoadwayNo ?? "";
                return !string.IsNullOrEmpty(roadwayNo) ? WebResponseContent.Instance.OK(data: roadwayNo) : WebResponseContent.Instance.Error("未找到可分配巷道");
            }
            catch (Exception ex)
            {
                _unitOfWorkManage.RollbackTran();
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        public class LocationCount
        {
            public string RoadwayNo { get; set; }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs
@@ -64,7 +64,7 @@
        [HttpPost, HttpGet, Route("OutEmpty"), AllowAnonymous]
        public WebResponseContent OutEmpty(int qty, string address, int WarehouseId, string barcode)
        {
            return Service.OutEmpty(qty, address, WarehouseId,barcode);
            return Service.OutEmpty(qty, address, WarehouseId, barcode);
        }
        [HttpPost, HttpGet, Route("DeviceRequestInboundTask"), AllowAnonymous]
@@ -187,6 +187,12 @@
            return Service.AssignRoadway(taskNum, roadwayNos);
        }
        [HttpPost, Route("SingleAssignRoadway"), AllowAnonymous]
        public WebResponseContent AssignRoadway([FromBody] List<string> roadwayNos)
        {
            return Service.AssignRoadway(roadwayNos);
        }
        /// <summary>
        /// ä¿®æ”¹ä»»åŠ¡çŠ¶æ€
        /// </summary>