hutongqing
2025-01-02 b51a65433d6102f2f8f00226404d9ca3808404af
打印托盘号
已删除13个文件
已修改21个文件
已添加17个文件
已重命名1个文件
2080 ■■■■■ 文件已修改
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/09203851-2649-4a0f-b696-332fad6125e4.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/2ce7b081-61db-4780-ab7b-3174d3d998cb.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/3f1c84d5-9c1f-4fdc-87f5-306cb17f32d2.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/3fcc60dc-f900-4492-85a9-40896ee66f41.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/9f95e3ab-bdf0-4c7c-81b3-068eb5a47849.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/d780f09b-095f-414c-9d64-3ece8ead7a82.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/read.lock 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/WIDESEAWCS_BasicInfoService.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/Helper/ConvertHelper.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/WIDESEAWCS_Tasks.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/干膜仓/ConveyorLineJob_GM.cs 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/干膜仓/StackerCraneJob_GM.cs 171 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/油墨仓/StackerCraneJob_YM.cs 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/config/buttons.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/package.json 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/areaInfo.js 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/areaRouter.js 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/customerInfo.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/extend/printView.vue 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/palletCodeInfo.js 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/supplierInfo.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/userInfo.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/router/viewGird.js 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/views/basic/areaInfo.vue 215 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/views/basic/areaRouter.vue 171 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/views/basic/cachePoint.vue 209 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/views/basic/palletCodeInfo.vue 159 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/views/basic/roadwayInfo.vue 236 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/06b6ba59-2c2a-4213-bfcb-89a257c39dfa.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3bdb0da1-c42c-4531-99e8-2d9f1d8c02e8.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/667cf3f4-f093-4903-a0e6-6399be7c70b7.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8c2e982d-ad7f-4e3a-9e0e-ad39ee70751d.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/be46b995-1948-4e27-9de5-d740316e7adb.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/e4d2b89c-c9d8-4512-858a-0ac416e979cb.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/PalletCodeInfoRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/PalletCodeInfoService.cs 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_GM.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_PP.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_ZH.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/HttpHelper.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IPalletCodeInfoRepository.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IPalletCodeInfoService.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_PalletCodeInfo.cs 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_PalletTypeInfo.cs 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/PalletCodeInfoController.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/09203851-2649-4a0f-b696-332fad6125e4.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/2ce7b081-61db-4780-ab7b-3174d3d998cb.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/3f1c84d5-9c1f-4fdc-87f5-306cb17f32d2.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/3fcc60dc-f900-4492-85a9-40896ee66f41.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/9f95e3ab-bdf0-4c7c-81b3-068eb5a47849.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/d780f09b-095f-414c-9d64-3ece8ead7a82.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/read.lock
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/WIDESEAWCS_BasicInfoService.csproj
@@ -7,7 +7,7 @@
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="WIDESEAWCS_QuartzJob" Version="3.0.1" />
    <PackageReference Include="WIDESEAWCS_QuartzJob" Version="3.0.3" />
  </ItemGroup>
  <ItemGroup>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/Helper/ConvertHelper.cs
@@ -8,9 +8,9 @@
namespace WIDESEAWCS_Common.Helper
{
    public class ConvertHelper
    public static class ConvertHelper
    {
        public static bool[] ByteToBoolArray(byte data)
        public static bool[] ByteToBoolArray(this byte data)
        {
            bool[] result = new bool[8];
            for (int i = 0; i < 8; i++)
@@ -20,10 +20,12 @@
            return result;
        }
        public static T ByteToBoolObject<T>(byte data)
        public static T ByteToBoolObject<T>(this byte data)
        {
            bool[] boolArray = ByteToBoolArray(data);
            Array.Reverse(boolArray);
            Type type = typeof(T);
            object? obj = Activator.CreateInstance(type);
            if (obj == null)
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -220,7 +220,7 @@
                            }
                            task.NextAddress = stationManger?.AGVStationCode ?? "";
                            task.DeviceCode = "AGV_CSJ";
                            task.DeviceCode = stationManger?.Remark ?? "";
                            task.TaskState = TaskStatusEnum.AGV_Execute.ObjToInt();
                        }
                    }
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/WIDESEAWCS_Tasks.csproj
@@ -13,7 +13,7 @@
    </ItemGroup>
    <ItemGroup>
      <PackageReference Include="WIDESEAWCS_QuartzJob" Version="3.0.1" />
      <PackageReference Include="WIDESEAWCS_QuartzJob" Version="3.0.3" />
    </ItemGroup>
    <ItemGroup>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/¸ÉĤ²Ö/ConveyorLineJob_GM.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,69 @@
using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Common;
using WIDESEAWCS_Common.Helper;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_IBasicInfoRepository;
using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_QuartzJob.DTO;
using WIDESEAWCS_Tasks.ConveyorLineJob;
namespace WIDESEAWCS_Tasks
{
    [DisallowConcurrentExecution]
    public class ConveyorLineJob_GM : JobBase, IJob
    {
        private readonly ITaskService _taskService;
        private readonly ITaskExecuteDetailService _taskExecuteDetailService;
        private readonly ITaskRepository _taskRepository;
        private readonly IStationMangerRepository _stationMangerRepository;
        public ConveyorLineJob_GM(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository)
        {
            _taskService = taskService;
            _taskExecuteDetailService = taskExecuteDetailService;
            _taskRepository = taskRepository;
            _stationMangerRepository = stationMangerRepository;
        }
        public Task Execute(IJobExecutionContext context)
        {
            bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value);
            if (flag && value != null)
            {
                OtherDevice device = (OtherDevice)value;
                List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).ToList();
                List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode);
                foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode)))
                {
                    if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt())
                    {
                        DeviceProDTO? devicePro = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
                        if (devicePro != null)
                        {
                            R_ConveyorLineInfo conveyorLineInfo = device.Communicator.ReadCustomer<R_ConveyorLineInfo>(devicePro.DeviceProAddress);
                            R_ConveyorLineStatus conveyorLineStatus = conveyorLineInfo.Status.ByteToBoolObject<R_ConveyorLineStatus>();
                            bool stb = device.GetValue<R_ConveyorLineDBName, bool>(R_ConveyorLineDBName.STB);
                        }
                        else
                        {
                            WriteInfo(device.DeviceName, $"未找到设备子编号{item.StationCode}的协议信息");
                        }
                    }
                }
            }
            return Task.CompletedTask;
        }
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/¸ÉĤ²Ö/StackerCraneJob_GM.cs
@@ -8,6 +8,7 @@
using System.Threading.Tasks;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core.Enums;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_IBasicInfoRepository;
using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
@@ -42,34 +43,34 @@
        public Task Execute(IJobExecutionContext context)
        {
            CommonStackerCrane commonStackerCrane = (CommonStackerCrane)context.JobDetail.JobDataMap.Get("JobParams");
            try
            {
                CommonStackerCrane commonStackerCrane = (CommonStackerCrane)context.JobDetail.JobDataMap.Get("JobParams");
                if (commonStackerCrane != null)
                {
                    if (!commonStackerCrane.IsEventSubscribed)
                    {
                        commonStackerCrane.StackerCraneTaskCompletedEventHandler += CommonStackerCrane_StackerCraneTaskCompletedEventHandler;//订阅任务完成事件
                    }
                    if (commonStackerCrane.StackerCraneAutoStatusValue == StackerCraneAutoStatus.Automatic && commonStackerCrane.StackerCraneStatusValue == StackerCraneStatus.Normal)
                    commonStackerCrane.CheckStackerCraneTaskCompleted();//防止任务完成事件监测超时,再手动触发一次
                    if (commonStackerCrane.StackerCraneAutoStatusValue == StackerCraneAutoStatus.Automatic && commonStackerCrane.StackerCraneStatusValue == StackerCraneStatus.Normal && commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.Standby)
                    {
                        commonStackerCrane.CheckStackerCraneTaskCompleted();//防止任务完成事件监测超时,再手动触发一次
                        if (commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.Standby)
                        Dt_Task? task = GetTask(commonStackerCrane);
                        if (task != null)
                        {
                            Dt_Task? task = GetTask(commonStackerCrane);
                            if (task != null)
                            StackerCraneTaskCommand? stackerCraneTaskCommand = ConvertToStackerCraneTaskCommand(task);
                            if (stackerCraneTaskCommand != null)
                            {
                                StackerCraneTaskCommand? stackerCraneTaskCommand = ConvertToStackerCraneTaskCommand(task);
                                if (stackerCraneTaskCommand != null)
                                bool sendFlag = commonStackerCrane.SendCommand(stackerCraneTaskCommand);
                                if (sendFlag)
                                {
                                    bool sendFlag = commonStackerCrane.SendCommand(stackerCraneTaskCommand);
                                    if (sendFlag)
                                    {
                                        commonStackerCrane.LastTaskType = task.TaskType;
                                       // _taskService.UpdateTaskStatusToNext(task.TaskNum);
                                    }
                                    commonStackerCrane.LastTaskType = task.TaskType;
                                    int oldState = task.TaskState;
                                    task.TaskState = TaskStatusEnum.SC_Executing.ObjToInt();
                                    task.ExceptionMessage = "";
                                    task.Dispatchertime = DateTime.Now;
                                    _taskRepository.UpdateData(task);
                                    _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskId, $"系统自动流程,任务状态从【{oldState}】转到【{task.TaskState}】");
                                }
                            }
                        }
@@ -78,7 +79,7 @@
            }
            catch (Exception ex)
            {
                WriteError(nameof(CommonStackerCraneJob), ex.Message, ex);
                WriteError(commonStackerCrane.DeviceName, ex.Message, ex);
            }
            return Task.CompletedTask;
        }
@@ -91,14 +92,30 @@
        private void CommonStackerCrane_StackerCraneTaskCompletedEventHandler(object? sender, WIDESEAWCS_QuartzJob.StackerCrane.StackerCraneTaskCompletedEventArgs e)
        {
            CommonStackerCrane? commonStackerCrane = sender as CommonStackerCrane;
            if (commonStackerCrane != null)
            try
            {
                if (commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType) != 5)
                if (commonStackerCrane != null)
                {
                    Console.Out.WriteLine("TaskCompleted" + e.TaskNum);
                   // _taskService.StackCraneTaskCompleted(e.TaskNum);
                    commonStackerCrane.SetValue(StackerCraneDBName.WorkType, 5);
                    if (commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType) != 5)
                    {
                        WriteInfo(commonStackerCrane.DeviceName, $"读取到任务完成信号,{e.TaskNum}");
                        Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == e.TaskNum);
                        if (task != null)
                        {
                            _taskService.TaskCompleted(e.TaskNum);
                        }
                        else
                        {
                            WriteInfo(commonStackerCrane.DeviceName, $"读取到任务完成信号,未找到对应的任务信息,{e.TaskNum}");
                        }
                        commonStackerCrane.SetValue(StackerCraneDBName.WorkType, 5);
                    }
                }
            }
            catch (Exception ex)
            {
                WriteError(commonStackerCrane?.DeviceCode ?? nameof(StackerCraneJob_YM), ex.Message, ex);
            }
        }
@@ -174,7 +191,7 @@
                    OtherDevice client = (OtherDevice)device;
                    if (client.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanPut, stationManger.StationCode))//出库站台未被占用
                    {
                        task.TargetAddress = stationManger.StackerCraneStationCode;
                        task.NextAddress = stationManger.StackerCraneStationCode;
                        _taskRepository.UpdateData(task);
                        return task;
                    }
@@ -207,16 +224,39 @@
            stackerCraneTaskCommand.TrayType = 1;
            if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//判断是否是入库任务
            {
                //List<Dt_Router> routers = _routerService.QueryNextRoutes(task.CurrentAddress, task.Roadway);
                //if (routers.Count > 0)
                //{
                string[] startCodes = task.CurrentAddress.Split("-");
                stackerCraneTaskCommand.StartRow = Convert.ToInt16(startCodes[0]);
                stackerCraneTaskCommand.StartColumn = Convert.ToInt16(startCodes[1]);
                stackerCraneTaskCommand.StartLayer = Convert.ToInt16(startCodes[2]);
                if (startCodes.Length == 3)
                {
                    stackerCraneTaskCommand.StartRow = Convert.ToInt16(startCodes[0]);
                    stackerCraneTaskCommand.StartColumn = Convert.ToInt16(startCodes[1]);
                    stackerCraneTaskCommand.StartLayer = Convert.ToInt16(startCodes[2]);
                }
                else
                {
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"入库任务起点错误,起点:【{task.CurrentAddress}】");
                    WriteInfo(task.DeviceCode, $"入库任务起点错误,起点:【{task.CurrentAddress}】");
                    return null;
                }
                string[] targetCodes = task.NextAddress.Split("-");
                if (targetCodes.Length == 5)
                {
                    stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[1]);
                    stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[2]);
                    stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[3]);
                }
                else
                {
                    //数据配置错误
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"入库任务终点错误,终点:【{task.NextAddress}】");
                    WriteInfo(task.DeviceCode, $"入库任务终点错误,终点:【{task.NextAddress}】");
                    return null;
                }
            }
            else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
            {
                string[] targetCodes = task.NextAddress.Split("-");
                if (targetCodes.Length == 3)
                {
                    stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[0]);
@@ -226,73 +266,54 @@
                else
                {
                    //数据配置错误
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"入库任务终点错误,起点:【{task.NextAddress}】");
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"出库任务终点错误,终点:【{task.NextAddress}】");
                    WriteInfo(task.DeviceCode, $"出库任务终点错误,终点:【{task.NextAddress}】");
                    return null;
                }
                //}
                //else
                //{
                //    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到站台【{task.NextAddress}】信息,无法获取对应的堆垛机取货站台信息");
                //    return null;
                //}
            }
            else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
            {
                //List<Dt_Router> routers = _routerService.QueryNextRoutes(task.Roadway, task.TargetAddress);
                //if (routers.Count > 0)
                string[] sourceCodes = task.CurrentAddress.Split("-");
                if (sourceCodes.Length == 5)
                {
                    string[] targetCodes = task.NextAddress.Split("-");
                    stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[0]);
                    stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[1]);
                    stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[2]);
                    string[] sourceCodes = task.CurrentAddress.Split("-");
                    if (sourceCodes.Length == 3)
                    {
                        stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[0]);
                        stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[1]);
                        stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[2]);
                    }
                    else
                    {
                        //数据配置错误
                        _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"出库任务起点错误,起点:【{task.CurrentAddress}】");
                        return null;
                    }
                    stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[1]);
                    stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[2]);
                    stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[3]);
                }
                //else
                //{
                //    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到站台【{task.NextAddress}】信息,无法获取对应的堆垛机放货站台信息");
                //    return null;
                //}
                else
                {
                    //数据配置错误
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"出库任务起点错误,起点:【{task.CurrentAddress}】");
                    WriteInfo(task.DeviceCode, $"出库任务起点错误,起点:【{task.CurrentAddress}】");
                    return null;
                }
            }
            else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup)
            {
                string[] targetCodes = task.NextAddress.Split("-");
                if (targetCodes.Length == 3)
                if (targetCodes.Length == 5)
                {
                    stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[0]);
                    stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[1]);
                    stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[2]);
                    stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[1]);
                    stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[2]);
                    stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[3]);
                }
                else
                {
                    //数据配置错误
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"移库任务终点错误,起点:【{task.NextAddress}】");
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"移库任务终点错误,终点:【{task.NextAddress}】");
                    WriteInfo(task.DeviceCode, $"移库任务终点错误,终点:【{task.NextAddress}】");
                    return null;
                }
                string[] sourceCodes = task.CurrentAddress.Split("-");
                if (sourceCodes.Length == 3)
                if (sourceCodes.Length == 5)
                {
                    stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[0]);
                    stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[1]);
                    stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[2]);
                    stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[1]);
                    stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[2]);
                    stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[3]);
                }
                else
                {
                    //数据配置错误
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"移库任务起点错误,起点:【{task.CurrentAddress}】");
                    WriteInfo(task.DeviceCode, $"移库任务起点错误,起点:【{task.CurrentAddress}】");
                    return null;
                }
            }
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ÓÍÄ«²Ö/StackerCraneJob_YM.cs
@@ -39,7 +39,6 @@
        private readonly ITaskRepository _taskRepository;
        private readonly IRouterService _routerService;
        private readonly IStationMangerRepository _stationMangerRepository;
        private List<Dt_ApiInfo> apiInfos;
        public StackerCraneJob_YM(ITaskService taskService, ICacheService cacheService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository)
        {
@@ -49,58 +48,54 @@
            _taskRepository = taskRepository;
            _routerService = routerService;
            _stationMangerRepository = stationMangerRepository;
            string? apiInfoStr = _cacheService.Get("apiInfos");
            if (!string.IsNullOrEmpty(apiInfoStr))
            {
                apiInfos = JsonConvert.DeserializeObject<List<Dt_ApiInfo>>(apiInfoStr);
                if (apiInfos == null || apiInfos.Count == 0)
                {
                    apiInfos = new List<Dt_ApiInfo>();
                }
            }
        }
        public Task Execute(IJobExecutionContext context)
        {
            CommonStackerCrane commonStackerCrane = (CommonStackerCrane)context.JobDetail.JobDataMap.Get("JobParams");
            try
            bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object value);
            if (flag && value != null)
            {
                if (commonStackerCrane != null)
                CommonStackerCrane commonStackerCrane = (CommonStackerCrane)value;
                try
                {
                    if (!commonStackerCrane.IsEventSubscribed)
                    if (commonStackerCrane != null)
                    {
                        commonStackerCrane.StackerCraneTaskCompletedEventHandler += CommonStackerCrane_StackerCraneTaskCompletedEventHandler;//订阅任务完成事件
                    }
                    commonStackerCrane.CheckStackerCraneTaskCompleted();//防止任务完成事件监测超时,再手动触发一次
                    if (commonStackerCrane.StackerCraneAutoStatusValue == StackerCraneAutoStatus.Automatic && commonStackerCrane.StackerCraneStatusValue == StackerCraneStatus.Normal && commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.Standby)
                    {
                        Dt_Task? task = GetTask(commonStackerCrane);
                        if (task != null)
                        if (!commonStackerCrane.IsEventSubscribed)
                        {
                            StackerCraneTaskCommand? stackerCraneTaskCommand = ConvertToStackerCraneTaskCommand(task);
                            if (stackerCraneTaskCommand != null)
                            commonStackerCrane.StackerCraneTaskCompletedEventHandler += CommonStackerCrane_StackerCraneTaskCompletedEventHandler;//订阅任务完成事件
                        }
                        commonStackerCrane.CheckStackerCraneTaskCompleted();//防止任务完成事件监测超时,再手动触发一次
                        if (commonStackerCrane.StackerCraneAutoStatusValue == StackerCraneAutoStatus.Automatic && commonStackerCrane.StackerCraneStatusValue == StackerCraneStatus.Normal && commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.Standby)
                        {
                            Dt_Task? task = GetTask(commonStackerCrane);
                            if (task != null)
                            {
                                bool sendFlag = commonStackerCrane.SendCommand(stackerCraneTaskCommand);
                                if (sendFlag)
                                StackerCraneTaskCommand? stackerCraneTaskCommand = ConvertToStackerCraneTaskCommand(task);
                                if (stackerCraneTaskCommand != null)
                                {
                                    commonStackerCrane.LastTaskType = task.TaskType;
                                    int oldState = task.TaskState;
                                    task.TaskState = TaskStatusEnum.SC_Executing.ObjToInt();
                                    task.ExceptionMessage = "";
                                    task.Dispatchertime = DateTime.Now;
                                    _taskRepository.UpdateData(task);
                                    _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskId, $"系统自动流程,任务状态从【{oldState}】转到【{task.TaskState}】");
                                    bool sendFlag = commonStackerCrane.SendCommand(stackerCraneTaskCommand);
                                    if (sendFlag)
                                    {
                                        commonStackerCrane.LastTaskType = task.TaskType;
                                        int oldState = task.TaskState;
                                        task.TaskState = TaskStatusEnum.SC_Executing.ObjToInt();
                                        task.ExceptionMessage = "";
                                        task.Dispatchertime = DateTime.Now;
                                        _taskRepository.UpdateData(task);
                                        _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskId, $"系统自动流程,任务状态从【{oldState}】转到【{task.TaskState}】");
                                    }
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                WriteError(commonStackerCrane.DeviceName, ex.Message, ex);
            }
                catch (Exception ex)
                {
                    WriteError(commonStackerCrane.DeviceName, ex.Message, ex);
                }
            }
            return Task.CompletedTask;
        }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/config/buttons.js
@@ -153,7 +153,6 @@
    onClick: function () {
    }
},
]
export default buttons
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/package.json
@@ -17,8 +17,10 @@
    "echarts": "^5.0.2",
    "element-plus": "^2.2.14",
    "less": "^4.1.1",
    "qrcode": "^1.5.4",
    "vue": "^3.2.37",
    "vue-draggable-next": "^2.0.1",
    "vue-qrcode": "^2.2.2",
    "vue-router": "^4.0.0-0",
    "vuex": "^4.0.0-0"
  },
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/basic/areaInfo.js
ÎļþÒÑɾ³ý
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/basic/areaRouter.js
ÎļþÒÑɾ³ý
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/basic/customerInfo.js
@@ -1,10 +1,3 @@
/*****************************************************************************************
**  Author:jxx 2022
**  QQ:283591387
**完整文档见:http://v2.volcore.xyz/document/api ã€ä»£ç ç”Ÿæˆé¡µé¢ViewGrid】
**常用示例见:http://v2.volcore.xyz/document/vueDev
**后台操作见:http://v2.volcore.xyz/document/netCoreDev
*****************************************************************************************/
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
let extension = {
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/basic/extend/printView.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,111 @@
<template>
  <div>
    <vol-box
      v-model="showDetialBox"
      :lazy="true"
      width="300px"
      :padding="15"
      title="打印"
    >
      <div
        id="printContent"
        style="display: flex; justify-content: center; align-items: center"
      >
        <div
          style="display: flex; justify-content: center; align-items: center"
        >
          <VueQrcode id="qrcode" :value="palletCode" :size="200"></VueQrcode>
        </div>
        <span
          style="display: flex; justify-content: center; align-items: center"
          >{{ palletCode }}</span
        >
      </div>
      <template #footer>
        <el-button type="primary" size="small" @click="print()">打印</el-button>
        <el-button type="danger" size="small" @click="showDetialBox = false"
          >关闭</el-button
        >
      </template>
    </vol-box>
  </div>
</template>
  <script>
import VolBox from "@/components/basic/VolBox.vue";
import VueQrcode from "vue-qrcode";
import QRCode from "qrcode";
export default {
  components: { VolBox, VueQrcode },
  data() {
    return {
      showDetialBox: false,
      row: null,
      qrcodeDataURL: "",
      palletCode: "",
    };
  },
  methods: {
    open(row) {
      this.row = row;
      this.showDetialBox = true;
      if (row && row.palletCode) {
        this.palletCode = row.palletCode;
      }
    },
    print() {
      let printContent = document.getElementById("printContent");
      var printWindow = window.open("", "");
      printWindow.document.write(printContent.innerHTML);
      printWindow.document.close();
      printWindow.focus();
      printWindow.print();
      printWindow.close();
    },
  },
  created() {},
};
</script>
  <style scoped>
.el-col {
  border-radius: 4px;
}
.grid-content {
  border-radius: 4px;
  min-height: 36px;
}
.content-text {
  display: flex;
  align-items: center;
  justify-content: center;
}
.right-text {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
</style>
  <style>
.el-table .warning-row {
  background: #e6a23c;
}
.el-table .success-row {
  background: #f0f9eb;
}
.el-table .error-row {
  background: #f56c6c;
}
canvas {
  display: block;
  margin: auto;
}
</style>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/basic/palletCodeInfo.js
ÎļþÃû´Ó ´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/basic/CachePoint.js ÐÞ¸Ä
@@ -1,11 +1,10 @@
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
import gridBody from './extend/printView.vue'
let extension = {
  components: {
    //查询界面扩展组件
    gridHeader: '',
    gridBody: '',
    gridBody: gridBody,
    gridFooter: '',
    //新建、编辑弹出框扩展组件
    modelHeader: '',
@@ -16,19 +15,22 @@
  buttons: { view: [], box: [], detail: [] }, //扩展的按钮
  methods: {
    //下面这些方法可以保留也可以删除
    onInit() {
      let enableBtn = this.buttons.find(x => x.value == 'Enable');
      if (enableBtn) {
        enableBtn.onClick = function () {
          this.$message.success('自定义按钮点击事件');
    onInit() {  //框架初始化配置前,
      this.columns.push({
        field: '操作',
        title: '操作',
        width: 90,
        fixed: 'right',
        align: 'center',
        formatter: (row) => {
          return (
            '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-printer">打印</i>'
          );
        },
        click: (row) => {
          this.$refs.gridBody.open(row);
        }
      }
      let disableBtn = this.buttons.find(x => x.value == 'Disable');
      if (disableBtn) {
        disableBtn.onClick = function () {
          this.$message.success('自定义按钮点击事件');
        }
      }
      });
    },
    onInited() {
      //框架初始化配置后
@@ -54,7 +56,7 @@
    },
    rowClick({ row, column, event }) {
      //查询界面点击行事件
      this.$refs.table.$refs.table.toggleRowSelection(row); //单击行时选中当前行;
      // this.$refs.table.$refs.table.toggleRowSelection(row); //单击行时选中当前行;
    },
    modelOpenAfter(row) {
      //点击编辑、新建按钮弹出框后,可以在此处写逻辑,如,从后台获取数据
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/basic/supplierInfo.js
@@ -1,10 +1,4 @@
/*****************************************************************************************
**  Author:jxx 2022
**  QQ:283591387
**完整文档见:http://v2.volcore.xyz/document/api ã€ä»£ç ç”Ÿæˆé¡µé¢ViewGrid】
**常用示例见:http://v2.volcore.xyz/document/vueDev
**后台操作见:http://v2.volcore.xyz/document/netCoreDev
*****************************************************************************************/
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
let extension = {
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/basic/userInfo.js
@@ -1,10 +1,4 @@
/*****************************************************************************************
**  Author:jxx 2022
**  QQ:283591387
**完整文档见:http://v2.volcore.xyz/document/api ã€ä»£ç ç”Ÿæˆé¡µé¢ViewGrid】
**常用示例见:http://v2.volcore.xyz/document/vueDev
**后台操作见:http://v2.volcore.xyz/document/netCoreDev
*****************************************************************************************/
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
let extension = {
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/router/viewGird.js
@@ -38,15 +38,6 @@
    name: 'Sys_DictionaryList',
    component: () => import('@/views/system/Sys_DictionaryList.vue')
  }, {
    path: '/areaInfo',
    name: 'areaInfo',
    component: () => import('@/views/basic/areaInfo.vue')
  },
  {
    path: '/areaRouter',
    name: 'areaRouter',
    component: () => import('@/views/basic/areaRouter.vue')
  }, {
    path: '/locationInfo',
    name: 'locationInfo',
    component: () => import('@/views/basic/locationInfo.vue')
@@ -54,20 +45,14 @@
    path: '/materielInfo',
    name: 'materielInfo',
    component: () => import('@/views/basic/materielInfo.vue')
  },
  {
    path: '/cachePoint',
    name: 'cachePoint',
    component: () => import('@/views/basic/cachePoint.vue')
  },
  {
    path: '/roadwayInfo',
    name: 'roadwayInfo',
    component: () => import('@/views/basic/roadwayInfo.vue')
  }, {
    path: '/warehouse',
    name: 'warehouse',
    component: () => import('@/views/basic/warehouse.vue')
  },{
    path: '/palletCodeInfo',
    name: 'palletCodeInfo',
    component: () => import('@/views/basic/palletCodeInfo.vue')
  }, {
    path: '/inboundOrder',
    name: 'inboundOrder',
@@ -96,93 +81,93 @@
    path: '/task',
    name: 'task',
    component: () => import('@/views/taskinfo/task.vue')
  },
  },
  {
    path: '/task_hty',
    name: 'task_hty',
    component: () => import('@/views/taskinfo/task_hty.vue')
  },{
  }, {
    path: '/stockView',
    name: 'stockView',
    component: () => import('@/views/stock/stockView.vue')
  },{
  }, {
    path: '/stockQuantityChangeRecord',
    name: 'stockQuantityChangeRecord',
    component: () => import('@/views/record/stockQuantityChangeRecord.vue')
  },{
  }, {
    path: '/locationStatusChangeRecord',
    name: 'locationStatusChangeRecord',
    component: () => import('@/views/record/locationStatusChangeRecord.vue')
  },{
  }, {
    path: '/receiveOrder',
    name: 'receiveOrder',
    component: () => import('@/views/inbound/receiveOrder.vue')
  },{
  }, {
    path: '/purchaseOrder',
    name: 'purchaseOrder',
    component: () => import('@/views/inbound/purchaseOrder.vue')
  }
  ,{
  , {
    path: '/supplierInfo',
    name: 'supplierInfo',
    component: () => import('@/views/basic/supplierInfo.vue')
  }
  ,{
  , {
    path: '/checkOrder',
    name: 'checkOrder',
    component: () => import('@/views/check/checkOrder.vue')
  }
  ,{
  , {
    path: '/checkOrderResult',
    name: 'checkOrderResult',
    component: () => import('@/views/check/checkOrderResult.vue')
  }
  ,{
  , {
    path: '/inboundOrder_Hty',
    name: 'inboundOrder_Hty',
    component: () => import('@/views/inbound/inboundOrder_Hty.vue')
  }
  ,{
  , {
    path: '/inboundOrderDetail_Hty',
    name: 'inboundOrderDetail_Hty',
    component: () => import('@/views/inbound/inboundOrderDetail_Hty.vue')
  }
  ,{
  , {
    path: '/purchaseOrderDetail',
    name: 'purchaseOrderDetail',
    component: () => import('@/views/inbound/purchaseOrderDetail.vue')
  }
  ,{
  , {
    path: '/outboundOrder_Hty',
    name: 'outboundOrder_Hty',
    component: () => import('@/views/outbound/outboundOrder_Hty.vue')
  }
  ,{
  , {
    path: '/outboundOrderDetail_Hty',
    name: 'outboundOrderDetail_Hty',
    component: () => import('@/views/outbound/outboundOrderDetail_Hty.vue')
  }
  ,{
  , {
    path: '/receiveOrderDetail',
    name: 'receiveOrderDetail',
    component: () => import('@/views/inbound/receiveOrderDetail.vue')
  }
  ,{
  , {
    path: '/stockInfo_Hty',
    name: 'stockInfo_Hty',
    component: () => import('@/views/stock/stockInfo_Hty.vue')
  }
  ,{
  , {
    path: '/stockInfoDetail_Hty',
    name: 'stockInfoDetail_Hty',
    component: () => import('@/views/stock/stockInfoDetail_Hty.vue')
  }
  ,{
  , {
    path: '/customerInfo',
    name: 'customerInfo',
    component: () => import('@/views/basic/customerInfo.vue')
  }
  ,{
  , {
    path: '/userInfo',
    name: 'userInfo',
    component: () => import('@/views/basic/userInfo.vue')
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/views/basic/areaInfo.vue
ÎļþÒÑɾ³ý
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/views/basic/areaRouter.vue
ÎļþÒÑɾ³ý
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/views/basic/cachePoint.vue
ÎļþÒÑɾ³ý
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/views/basic/palletCodeInfo.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,159 @@
<template>
  <view-grid
    ref="grid"
    :columns="columns"
    :detail="detail"
    :editFormFields="editFormFields"
    :editFormOptions="editFormOptions"
    :searchFormFields="searchFormFields"
    :searchFormOptions="searchFormOptions"
    :table="table"
    :extend="extend"
  >
  </view-grid>
</template>
      <script>
import extend from "@/extension/basic/palletCodeInfo.js";
import { ref, defineComponent } from "vue";
export default defineComponent({
  setup() {
    const table = ref({
      key: "id",
      footer: "Foots",
      cnName: "托盘信息",
      name: "palletCodeInfo",
      url: "/PalletCodeInfo/",
      sortName: "id",
    });
    const editFormFields = ref({});
    const editFormOptions = ref([
      [
        {
          title: "仓库",
          field: "warehouseId",
          type: "select",
          dataKey: "warehouses",
          data: [],
          required: true,
        },
        {
          title: "数量",
          field: "count",
          type: "int",
          required: true,
        },
      ],
    ]);
    const searchFormFields = ref({
      palletCode: "",
    });
    const searchFormOptions = ref([
      [{ title: "托盘编号", field: "palletCode", type: "like" }],
    ]);
    const columns = ref([
      {
        field: "id",
        title: "Id",
        type: "int",
        width: 90,
        hidden: true,
        readonly: true,
        require: true,
        align: "left",
      },
      {
        field: "warehouseId",
        title: "仓库主键",
        type: "string",
        width: 90,
        align: "left",
        bind: { key: "warehouse", data: [] },
      },
      {
        field: "palletType",
        title: "托盘类型",
        type: "string",
        width: 150,
        align: "left",
      },
      {
        field: "palletCode",
        title: "托盘编号",
        type: "decimal",
        width: 90,
        align: "left",
      },
      {
        field: "status",
        title: "打印状态",
        type: "string",
        width: 90,
        align: "left",
        bind: { key: "enableEnum", data: [] },
      },
      {
        field: "size",
        title: "尺寸",
        type: "int",
        width: 120,
        align: "left",
      },
      {
        field: "creater",
        title: "创建人",
        type: "string",
        width: 90,
        align: "left",
      },
      {
        field: "createDate",
        title: "创建时间",
        type: "datetime",
        width: 160,
        align: "left",
        sort: true,
      },
      {
        field: "modifier",
        title: "修改人",
        type: "string",
        width: 100,
        align: "left",
      },
      {
        field: "modifyDate",
        title: "修改时间",
        type: "datetime",
        width: 160,
        align: "left",
        sort: true,
      },
      {
        field: "remark",
        title: "备注",
        type: "string",
        width: 100,
        align: "left",
      },
    ]);
    const detail = ref({
      cnName: "#detailCnName",
      table: "",
      columns: [],
      sortName: "",
    });
    return {
      table,
      extend,
      editFormFields,
      editFormOptions,
      searchFormFields,
      searchFormOptions,
      columns,
      detail,
    };
  },
});
</script>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/views/basic/roadwayInfo.vue
ÎļþÒÑɾ³ý
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/06b6ba59-2c2a-4213-bfcb-89a257c39dfa.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3bdb0da1-c42c-4531-99e8-2d9f1d8c02e8.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/667cf3f4-f093-4903-a0e6-6399be7c70b7.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8c2e982d-ad7f-4e3a-9e0e-ad39ee70751d.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/be46b995-1948-4e27-9de5-d740316e7adb.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/e4d2b89c-c9d8-4512-858a-0ac416e979cb.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/PalletCodeInfoRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_IBasicRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_BasicRepository
{
    public class PalletCodeInfoRepository : RepositoryBase<Dt_PalletCodeInfo>, IPalletCodeInfoRepository
    {
        public PalletCodeInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/PalletCodeInfoService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,69 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Helper;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_Model.Models;
namespace WIDESEA_BasicService
{
    public class PalletCodeInfoService : ServiceBase<Dt_PalletCodeInfo, IPalletCodeInfoRepository>, IPalletCodeInfoService
    {
        public PalletCodeInfoService(IPalletCodeInfoRepository BaseDal) : base(BaseDal)
        {
        }
        static object locker = new object();
        public override WebResponseContent AddData(SaveModel saveModel)
        {
            int warehouseId = 0;
            int count = 0;
            if (saveModel.MainData.TryGetValue("warehouseId", out object? warehouse) && warehouse != null)
            {
                warehouseId = warehouse.ObjToInt();
            }
            if (saveModel.MainData.TryGetValue("count", out object? countValue) && countValue != null)
            {
                count = countValue.ObjToInt();
            }
            lock (locker)
            {
                List<Dt_PalletCodeInfo> palletCodeInfos = new List<Dt_PalletCodeInfo>();
                int serialNo = 0;
                DateTime now = DateTime.Now;
                Dt_PalletCodeInfo palletCodeInfo = BaseDal.QueryFirst(x => x.WarehouseId == warehouseId, new Dictionary<string, OrderByType> { { nameof(Dt_PalletCodeInfo.SerialNo), OrderByType.Desc } });
                if (palletCodeInfo != null && palletCodeInfo.CreateDate.Year == now.Year && palletCodeInfo.CreateDate.Month == now.Month && palletCodeInfo.CreateDate.Day == now.Day)
                {
                    serialNo = palletCodeInfo.SerialNo + 1;
                }
                else
                {
                    serialNo = 1;
                }
                for (int i = 0; i < count; i++)
                {
                    palletCodeInfos.Add(new Dt_PalletCodeInfo
                    {
                        SerialNo = serialNo,
                        PalletCode = now.ToString("yyyyMMdd") + serialNo.ToString().PadLeft(3, '0'),
                        PalletType = 1,
                        PalletTypeId = 0,
                        WarehouseId = warehouseId,
                        Status = 0,
                        Size = 0
                    });
                    serialNo = serialNo + 1;
                }
                return base.AddData(palletCodeInfos);
            }
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs
@@ -71,15 +71,15 @@
                List<Dt_LocationInfo> definedTypeLocations = locationInfos.Where(x => x.LocationType == palletType.ObjToInt()).ToList();
                //未定义类型的空货位
                List<Dt_LocationInfo> undefinedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == LocationTypeEnum.Undefined.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenBy(x => x.Row).ThenBy(x => x.Column).ToList();
                List<Dt_LocationInfo> undefinedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == LocationTypeEnum.Undefined.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenBy(x => x.Column).ThenBy(x => x.Row).ToList();
                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.Row).ThenBy(x => x.Column).ToList();
                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 ((locationInfos.Count * weightValue_BC >= definedTypeLocations.Count && undefinedTypeEmptyLocations.Any()) || !definedTypeEmptyLocations.Any())//如果已定义类型货位未超过比例,且有未定义类型的货位
                {
                    if (palletType == PalletTypeEnum.LargePallet || palletType == PalletTypeEnum.LargestPallet)
                    {
                        undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Depth % 2 == 1).ToList();
                        undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Column % 2 == 1).ToList();
                    }
                    for (int i = 0; i < undefinedTypeEmptyLocations.Count; i++)
                    {
@@ -122,7 +122,7 @@
            {
                case PalletTypeEnum.LargestPallet:
                case PalletTypeEnum.LargePallet:
                    if (emptyLocation.Depth % 2 == 0)
                    if (emptyLocation.Column % 2 == 0)
                    {
                        return null;
                    }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs
@@ -1,4 +1,5 @@
using System;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -84,9 +85,9 @@
                List<Dt_LocationInfo> definedTypeLocations = locationInfos.Where(x => x.LocationType == palletType.ObjToInt()).ToList();
                //未定义类型的空货位
                List<Dt_LocationInfo> undefinedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == LocationTypeEnum.Undefined.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenBy(x => x.Row).ThenBy(x => x.Column).ToList();
                List<Dt_LocationInfo> undefinedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == LocationTypeEnum.Undefined.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenBy(x => x.Column).ThenBy(x => x.Row).ToList();
                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.Row).ThenBy(x => x.Column).ToList();
                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 ((locationInfos.Count * weightValue_CSJ >= definedTypeLocations.Count && undefinedTypeEmptyLocations.Any()) || !definedTypeEmptyLocations.Any())//如果已定义类型货位未超过比例,且有未定义类型的货位
                {
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_GM.cs
@@ -71,15 +71,15 @@
                List<Dt_LocationInfo> definedTypeLocations = locationInfos.Where(x => x.LocationType == palletType.ObjToInt()).ToList();
                //未定义类型的空货位
                List<Dt_LocationInfo> undefinedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == LocationTypeEnum.Undefined.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenBy(x => x.Row).ThenBy(x => x.Column).ToList();
                List<Dt_LocationInfo> undefinedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == LocationTypeEnum.Undefined.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenBy(x => x.Column).ThenBy(x => x.Row).ToList();
                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.Row).ThenBy(x => x.Column).ToList();
                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 ((locationInfos.Count * weightValue_GM >= definedTypeLocations.Count && undefinedTypeEmptyLocations.Any()) || !definedTypeEmptyLocations.Any())//如果已定义类型货位未超过比例,且有未定义类型的货位
                {
                    if (palletType == PalletTypeEnum.LargePallet || palletType == PalletTypeEnum.LargestPallet)
                    {
                        undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Depth % 2 == 1).ToList();
                        undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Column % 2 == 1).ToList();
                    }
                    for (int i = 0; i < undefinedTypeEmptyLocations.Count; i++)
                    {
@@ -122,7 +122,7 @@
            {
                case PalletTypeEnum.LargestPallet:
                case PalletTypeEnum.LargePallet:
                    if (emptyLocation.Depth % 2 == 0)
                    if (emptyLocation.Column % 2 == 0)
                    {
                        return null;
                    }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_PP.cs
@@ -71,15 +71,15 @@
                List<Dt_LocationInfo> definedTypeLocations = locationInfos.Where(x => x.LocationType == palletType.ObjToInt()).ToList();
                //未定义类型的空货位
                List<Dt_LocationInfo> undefinedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == LocationTypeEnum.Undefined.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenBy(x => x.Row).ThenBy(x => x.Column).ToList();
                List<Dt_LocationInfo> undefinedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == LocationTypeEnum.Undefined.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenBy(x => x.Column).ThenBy(x => x.Row).ToList();
                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.Row).ThenBy(x => x.Column).ToList();
                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 ((locationInfos.Count * weightValue_PP >= definedTypeLocations.Count && undefinedTypeEmptyLocations.Any()) || !definedTypeEmptyLocations.Any())//如果已定义类型货位未超过比例,且有未定义类型的货位
                {
                    if (palletType == PalletTypeEnum.LargePallet || palletType == PalletTypeEnum.LargestPallet)
                    {
                        undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Depth % 2 == 1).ToList();
                        undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Column % 2 == 1).ToList();
                    }
                    for (int i = 0; i < undefinedTypeEmptyLocations.Count; i++)
                    {
@@ -122,7 +122,7 @@
            {
                case PalletTypeEnum.LargestPallet:
                case PalletTypeEnum.LargePallet:
                    if (emptyLocation.Depth % 2 == 0)
                    if (emptyLocation.Column % 2 == 0)
                    {
                        return null;
                    }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_ZH.cs
@@ -71,15 +71,15 @@
                List<Dt_LocationInfo> definedTypeLocations = locationInfos.Where(x => x.LocationType == palletType.ObjToInt()).ToList();
                //未定义类型的空货位
                List<Dt_LocationInfo> undefinedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == LocationTypeEnum.Undefined.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenBy(x => x.Row).ThenBy(x => x.Column).ToList();
                List<Dt_LocationInfo> undefinedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == LocationTypeEnum.Undefined.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenBy(x => x.Column).ThenBy(x => x.Row).ToList();
                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.Row).ThenBy(x => x.Column).ToList();
                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 ((locationInfos.Count * weightValue_ZH >= definedTypeLocations.Count && undefinedTypeEmptyLocations.Any()) || !definedTypeEmptyLocations.Any())//如果已定义类型货位未超过比例,且有未定义类型的货位
                {
                    if (palletType == PalletTypeEnum.LargePallet || palletType == PalletTypeEnum.LargestPallet)
                    {
                        undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Depth % 2 == 1).ToList();
                        undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Column % 2 == 0).ToList();
                    }
                    for (int i = 0; i < undefinedTypeEmptyLocations.Count; i++)
                    {
@@ -122,7 +122,7 @@
            {
                case PalletTypeEnum.LargestPallet:
                case PalletTypeEnum.LargePallet:
                    if (emptyLocation.Depth % 2 == 0)
                    if (emptyLocation.Column % 2 != 0)
                    {
                        return null;
                    }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs
@@ -45,28 +45,6 @@
            };
        }
        //public bool LittleDepthLocationIsEmpty(Dt_LocationInfo locationInfo, PalletTypeEnum palletType)
        //{
        //    Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == locationInfo.WarehouseId);
        //    if (warehouse == null)
        //    {
        //        throw new Exception($"未找到仓库信息");
        //    }
        //    return warehouse.WarehouseName switch
        //    {
        //        "板材仓" => false,
        //        "PP仓" => false,
        //        "干膜仓" => false,
        //        "测试架仓" => LittleDepthLocationIsEmpty_CSJ(locationInfo, palletType),
        //        "阻焊仓" => false,
        //        "油墨仓" => true,
        //        "成品仓" => true,
        //        "辅料仓" => true,
        //        _ => throw new Exception($"未找到仓库货位分配方法")
        //    };
        //}
        private readonly static object _locker = new object();
        private static List<LocationCache> locationCaches = new List<LocationCache>();
        /// <summary>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/HttpHelper.cs
@@ -13,7 +13,7 @@
{
    public class HttpHelper
    {
        public static async Task<string> GetAsync(string serviceAddress, string contentType = "application/json", Dictionary<string, string>? headers = null)
        public static async Task<string> GetAsync(string serviceAddress, Dictionary<string, string>? headers = null)
        {
            string result = string.Empty;
            DateTime beginDate = DateTime.Now;
@@ -21,7 +21,7 @@
            {
                using HttpClient httpClient = new HttpClient();
                httpClient.Timeout = new TimeSpan(0, 0, 60);
                if (headers != null)
                {
                    foreach (var header in headers)
@@ -41,7 +41,7 @@
            }
        }
        public static async Task<string?> PostAsync(string serviceAddress, string requestJson = null, string contentType = "application/json", Dictionary<string, string>? headers = null)
        public static async Task<string?> PostAsync(string serviceAddress, string requestJson = "", string contentType = "application/json", Dictionary<string, string>? headers = null)
        {
            string result = string.Empty;
            DateTime beginDate = DateTime.Now;
@@ -69,7 +69,7 @@
            }
            finally
            {
                Logger.Add(serviceAddress, requestJson == null ? "" : requestJson, result, beginDate);
                Logger.Add(serviceAddress, requestJson, result, beginDate);
            }
        }
@@ -101,7 +101,7 @@
            }
        }
        public static string Post(string serviceAddress, string requestJson = null, string contentType = "application/json", Dictionary<string, string>? headers = null)
        public static string Post(string serviceAddress, string requestJson = "", string contentType = "application/json", Dictionary<string, string>? headers = null)
        {
            string result = string.Empty;
            DateTime beginDate = DateTime.Now;
@@ -129,7 +129,7 @@
            }
            finally
            {
                Logger.Add(serviceAddress, requestJson == null ? "" : requestJson, result, beginDate);
                Logger.Add(serviceAddress, requestJson, result, beginDate);
            }
        }
    }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IPalletCodeInfoRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IBasicRepository
{
    public interface IPalletCodeInfoRepository : IRepository<Dt_PalletCodeInfo>
    {
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IPalletCodeInfoService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_Model.Models;
namespace WIDESEA_IBasicService
{
    public interface IPalletCodeInfoService : IService<Dt_PalletCodeInfo>
    {
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_PalletCodeInfo.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,38 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.DB.Models;
namespace WIDESEA_Model.Models
{
    [SugarTable(nameof(Dt_PalletCodeInfo), "托盘编号信息")]
    public class Dt_PalletCodeInfo : BaseEntity
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "仓库主键")]
        public int WarehouseId { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "托盘类型")]
        public int PalletType { get; set; }
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "托盘编号")]
        public string PalletCode { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "流水号")]
        public int SerialNo { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "打印状态")]
        public int Status { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "尺寸")]
        public int Size { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "托盘类型主键")]
        public int PalletTypeId { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_PalletTypeInfo.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,71 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.DB.Models;
namespace WIDESEA_Model.Models
{
    /// <summary>
    ///
    /// </summary>
    [SugarTable(nameof(Dt_PalletTypeInfo), "托盘类型")]
    public class Dt_PalletTypeInfo : BaseEntity
    {
        /// <summary>
        ///
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }
        /// <summary>
        ///
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "托盘类型")]
        public int PalletType { get; set; }
        /// <summary>
        ///
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "托盘类型名称")]
        public string TypeName { get; set; }
        /// <summary>
        ///
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "长度")]
        public int Length { get; set; }
        /// <summary>
        ///
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "宽度")]
        public int Width { get; set; }
        /// <summary>
        ///
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "高度")]
        public int Height { get; set; }
        /// <summary>
        ///
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "状态")]
        public int Enbale { get; set; }
        /// <summary>
        ///
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "仓库编号")]
        public int WarehouseId { get; set; }
        /// <summary>
        ///
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "所属层")]
        public string SortNum { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs
@@ -52,7 +52,7 @@
                {
                    return WebResponseContent.Instance.Error($"该托盘已绑定货位");
                }
                if(warehouseId != stockInfo.WarehouseId)
                if (warehouseId != stockInfo.WarehouseId)
                {
                    return WebResponseContent.Instance.Error($"仓库不正确");
                }
@@ -80,7 +80,80 @@
                {
                    stockInfo.StockStatus = StockStatusEmun.入库确认.ObjToInt();
                }
                    _unitOfWorkManage.BeginTran();
                _unitOfWorkManage.BeginTran();
                int taskId = BaseDal.AddData(newTask);
                newTask.TaskId = taskId;
                _stockRepository.StockInfoRepository.UpdateData(stockInfo);
                _unitOfWorkManage.CommitTran();
                PushTasksToWCS(new List<Dt_Task> { newTask });
                return WebResponseContent.Instance.OK(data: newTask);
            }
            catch (Exception ex)
            {
                _unitOfWorkManage.RollbackTran();
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        public WebResponseContent DeviceRequestInboundTask(string stationCode, string roadwayNo, string palletCode)
        {
            try
            {
                Dt_Task task = Repository.QueryFirst(x => x.PalletCode == palletCode);
                if (task != null)
                {
                    return WebResponseContent.Instance.Error($"该托盘已生成任务");
                }
                if (Repository.QueryFirst(x => x.SourceAddress == stationCode && x.TaskStatus == TaskStatusEnum.New.ObjToInt()) != null)
                {
                    return WebResponseContent.Instance.Error($"该站点已有未执行的任务");
                }
                Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == palletCode);
                if (stockInfo == null)
                {
                    return WebResponseContent.Instance.Error($"未找到组盘信息");
                }
                if (stockInfo.StockStatus != StockStatusEmun.组盘暂存.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.手动组盘暂存.ObjToInt())
                {
                    return WebResponseContent.Instance.Error($"该托盘状态不正确,不可申请入库");
                }
                if (!string.IsNullOrEmpty(stockInfo.LocationCode))
                {
                    return WebResponseContent.Instance.Error($"该托盘已绑定货位");
                }
                Dt_LocationInfo? locationInfo = _basicService.LocationInfoService.AssignLocation(roadwayNo, (PalletTypeEnum)stockInfo.PalletType, stockInfo.WarehouseId);
                if (locationInfo == null)
                {
                    return WebResponseContent.Instance.Error($"货位分配失败,未找到可分配货位");
                }
                Dt_Task newTask = new Dt_Task()
                {
                    CurrentAddress = stationCode,
                    Grade = 0,
                    NextAddress = locationInfo.LocationCode,
                    PalletCode = palletCode,
                    Roadway = roadwayNo,
                    SourceAddress = stationCode,
                    TargetAddress = locationInfo.LocationCode,
                    TaskType = TaskTypeEnum.Inbound.ObjToInt(),
                    TaskStatus = TaskStatusEnum.New.ObjToInt(),
                    WarehouseId = stockInfo.WarehouseId,
                    PalletType = stockInfo.PalletType
                };
                if (stockInfo.StockStatus == StockStatusEmun.手动组盘暂存.ObjToInt())
                {
                    stockInfo.StockStatus = StockStatusEmun.手动组盘入库确认.ObjToInt();
                }
                else
                {
                    stockInfo.StockStatus = StockStatusEmun.入库确认.ObjToInt();
                }
                _unitOfWorkManage.BeginTran();
                int taskId = BaseDal.AddData(newTask);
                newTask.TaskId = taskId;
                _stockRepository.StockInfoRepository.UpdateData(stockInfo);
@@ -111,7 +184,7 @@
                    return WebResponseContent.Instance.Error($"未找到该入库任务");
                }
                if(_basicRepository.LocationInfoRepository.QueryFirst(x=>x.LocationCode == task.TargetAddress) != null)
                if (_basicRepository.LocationInfoRepository.QueryFirst(x => x.LocationCode == task.TargetAddress) != null)
                {
                    return WebResponseContent.Instance.OK(data: task.TargetAddress);
                }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/PalletCodeInfoController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_IBasicService;
using WIDESEA_Model.Models;
namespace WIDESEA_WMSServer.Controllers.Basic
{
    [Route("api/[controller]")]
    [ApiController]
    public class PalletCodeInfoController : ApiBaseController<IPalletCodeInfoService, Dt_PalletCodeInfo>
    {
        public PalletCodeInfoController(IPalletCodeInfoService service) : base(service)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs
@@ -43,7 +43,7 @@
builder.Services.AddWebSocketSetup();
builder.Services.AddSqlsugarSetup();//SqlSugar å¯åŠ¨æœåŠ¡
builder.Services.AddDbSetup();//Db å¯åŠ¨æœåŠ¡
builder.Services.AddInitializationHostServiceSetup();//应用初始化服务注入
//builder.Services.AddInitializationHostServiceSetup();//应用初始化服务注入
builder.Services.AddHostedService<PermissionDataHostService>();//应用初始化服务注入
builder.Services.AddAutoMapperSetup();