刘磊
2026-01-15 26f88473f470ab34f46d95642035a4e5f6b69847
同步
已添加7个文件
已重命名1个文件
已修改27个文件
1624 ■■■■ 文件已修改
项目代码/WCS/WCSServer/WIDESEAWCS_QuartzJob/ConveyorLine/CommonConveyorLine.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServer/WIDESEAWCS_QuartzJob/StackerCrane/Common/STK.cs 293 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServer/WIDESEAWCS_QuartzJob/StackerCrane/IStackerCrane.cs 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServer/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServer/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs 191 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServer/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineDBName.cs 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServer/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineTaskCommand.cs 81 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServer/WIDESEAWCS_Tasks/SC/SCJob.cs 364 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/widesea_wms/basicinfo/Dt_BDCConfiguration.js 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/router/tables.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/views/widesea_wms/OrderInfo/Dt_AssemblyOrderInfo.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/views/widesea_wms/basicinfo/Dt_BDCConfiguration.vue 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_Common/MES/GetCarCharacteristicInfo.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_Common/MES/Request/CarCharacteristicInfo.cs 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_Common/MES/Request/IssuedCharacterInfo.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_Common/MES/Request/pushWorkOrderInfo.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_Core/Const/ConfigConst.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_Core/DB/Models/BaseEntity.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_Core/HostedService/SeedDataHostedService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_IStoragIntegrationServices/MES/IMESService.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_Model/Models/BasicInfo/Dt_BDCConfiguration.cs 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_Model/Models/BasicInfo/Dt_BDCConfiguration_detail.cs 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/MESService.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/PassPoint.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/bindWorkOrder.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/getCharacteristic.cs 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/issuedCharacter.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/preBind.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/pushOrderInfo.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/pushWorkOrderInfo.cs 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_StorageBasicServices/BasicInfo/Dt_BDCConfigurationService.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_StorageTaskServices/BDCManager/BDCManager.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_WMSServer/Controllers/MES/MESController.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServer/WIDESEA_WMSServer/Controllers/TaskController.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WCS/WCSServer/WIDESEAWCS_QuartzJob/ConveyorLine/CommonConveyorLine.cs
@@ -220,7 +220,7 @@
        public T ReadCustomer<T>(string deviceChildCode) where T : IDataTransfer, new()
        {
            if (!IsConnected) throw new Exception($"{deviceChildCode}通讯连接错误,请检查网络");
            DeviceProDTO? devicePro = _deviceProDTOs.Where(x => x.DeviceProParamType == "DeviceCommand" && x.DeviceChildCode == deviceChildCode).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
            DeviceProDTO? devicePro = _deviceProDTOs.Where(x => x.DeviceProParamType == "ReadDeviceCommand" && x.DeviceChildCode == deviceChildCode).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
            if (devicePro == null)
            {
ÏîÄ¿´úÂë/WCS/WCSServer/WIDESEAWCS_QuartzJob/StackerCrane/Common/STK.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,293 @@
using HslCommunication;
using System.ComponentModel;
using System.Reflection;
using WIDESEAWCS_Communicator;
using WIDESEAWCS_QuartzJob.DeviceBase;
using WIDESEAWCS_QuartzJob.DTO;
using WIDESEAWCS_QuartzJob.StackerCrane;
using WIDESEAWCS_QuartzJob.StackerCrane.Enum;
namespace WIDESEAWCS_QuartzJob
{
    /// <summary>
    /// ä¸€èˆ¬å †åž›æœºå®žçŽ°ç±»ï¼Œå®žçŽ°å †åž›æœºæŽ¥å£å±‚
    /// </summary>
    [Description("堆垛机")]
    public class STK : IStackerCrane
    {
        #region Private Member
        /// <summary>
        /// å®Œæˆä¿¡å·ç­‰å¾…æ—¶é—´
        /// </summary>
        private const int WaitTimeout = 20 * 6000;
        /// <summary>
        /// å®Œæˆä¿¡å·è¯»å–频率
        /// </summary>
        private const int ReadTimeout = 100;
        /// <summary>
        /// å †åž›æœºé€šè®¯å¯¹è±¡
        /// </summary>
        private BaseCommunicator _communicator;
        /// <summary>
        /// å †åž›æœºåè®®ä¿¡æ¯
        /// </summary>
        private readonly List<DeviceProDTO> _deviceProDTOs;
        /// <summary>
        /// å †åž›æœºåè®®æ˜Žç»†ä¿¡æ¯
        /// </summary>
        private readonly List<DeviceProtocolDetailDTO> _deviceProtocolDetailDTOs;
        /// <summary>
        /// è®¾å¤‡ç¼–号
        /// </summary>
        public readonly string _deviceCode;
        /// <summary>
        /// è®¾å¤‡åç§°
        /// </summary>
        public readonly string _deviceName;
        /// <summary>
        /// ä¸Šä¸€æ¬¡ä»»åŠ¡å·
        /// </summary>
        private int _lastTaskNum;
        private bool _isChecked = false;
        private bool _heartStatr = true;
        private bool _isConnected = true;
        #endregion Private Member
        #region Public Member
        /// <summary>
        /// å †åž›æœºé€šè®¯å¯¹è±¡
        /// </summary>
        public BaseCommunicator Communicator => _communicator;
        /// <summary>
        /// å †åž›æœºåè®®ä¿¡æ¯
        /// </summary>
        public List<DeviceProDTO> DeviceProDTOs => _deviceProDTOs;
        /// <summary>
        /// å †åž›æœºåè®®æ˜Žç»†ä¿¡æ¯
        /// </summary>
        public List<DeviceProtocolDetailDTO> DeviceProtocolDetailDTOs => _deviceProtocolDetailDTOs;
        /// <summary>
        /// ä¸Šä¸€æ¬¡æ‰§è¡Œçš„任务号
        /// </summary>
        public int LastTaskNum => _lastTaskNum;
        /// <summary>
        /// è®¾å¤‡ç¼–号
        /// </summary>
        public string DeviceCode => _deviceCode;
        /// <summary>
        /// è®¾å¤‡åç§°
        /// </summary>
        public string DeviceName => _deviceName;
        /// <summary>
        /// é€šè®¯æ˜¯å¦å·²è¿žæŽ¥
        /// </summary>
        public bool IsConnected => Communicator.IsConnected && _isConnected;
        /// <summary>
        /// å †åž›æœºä»»åŠ¡å®Œæˆäº‹ä»¶
        /// </summary>
        public event EventHandler<StackerCraneTaskCompletedEventArgs> StackerCraneTaskCompletedEventHandler;
        /// <summary>
        /// å †åž›æœºä»»åŠ¡å‘½ä»¤å¯¹è±¡
        /// </summary>
        public object StackerCraneTaskCommand { get; set; }
        /// <summary>
        /// å †åž›æœºå®Œæˆäº‹ä»¶æ˜¯å¦å·²è®¢é˜…
        /// </summary>
        public bool IsEventSubscribed => StackerCraneTaskCompletedEventHandler != null;
        /// <summary>
        /// å †åž›æœºä¸ŽMOM连接状态
        /// </summary>
        public bool StackerOnline { get; set; } = false;
        public int? LastTaskType { get; set; } = null;
        public int CurrentTaskNum => throw new NotImplementedException();
        public bool IsFault => throw new NotImplementedException();
        public DeviceStatus Status => throw new NotImplementedException();
        #endregion
        #region Constructor Function
        /// <summary>
        /// æž„造函数
        /// </summary>
        /// <param name="communicator">堆垛机通讯对象</param>
        /// <param name="deviceProDTOs">堆垛机协议信息</param>
        /// <param name="deviceProtocolDetailDTOs">堆垛机协议明细信息</param>
        /// <param name="deviceCode">设备编号</param>
        /// <param name="deviceName">设备名称</param>
        public STK(BaseCommunicator communicator, List<DeviceProDTO> deviceProDTOs, List<DeviceProtocolDetailDTO> deviceProtocolDetailDTOs, string deviceCode, string deviceName)
        {
            _communicator = communicator;
            _deviceProDTOs = deviceProDTOs;
            _deviceProtocolDetailDTOs = deviceProtocolDetailDTOs;
            _deviceCode = deviceCode;
            _deviceName = deviceName;
        }
        #endregion
        #region Private Method
        private void AnalysisData()
        {
        }
        #endregion
        #region Public Method
        /// <summary>
        /// å‘送任务命令
        /// </summary>
        /// <param name="command">任务命令</param>
        /// <returns></returns>
        public bool SendCommand<T>(T command, string childCode) where T : IDataTransfer, new()
        {
            if (!IsConnected) throw new Exception($"通讯连接错误,请检查网络");
            DeviceProDTO? devicePro = _deviceProDTOs.Where(x => x.DeviceProParamType == nameof(DeviceCommand) && x.DeviceChildCode == childCode).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
            if (devicePro == null)
            {
                return false;
            }
            if (Communicator.WriteCustomer(devicePro.DeviceProAddress, command))
            {
                StackerCraneTaskCommand = command;
                return true;
            }
            return false;
        }
        /// <summary>
        /// è¯»å–PLC数据,返回自定义对象
        /// </summary>
        /// <typeparam name="T">泛型</typeparam>
        /// <param name="deviceChildCode">子设备编号</param>
        /// <returns>返回自定义对象或抛出异常</returns>
        /// <exception cref="Exception"></exception>
        public T ReadCustomer<T>(string deviceChildCode) where T : IDataTransfer, new()
        {
            if (!IsConnected) throw new Exception($"通讯连接错误,请检查网络");
            DeviceProDTO? devicePro = _deviceProDTOs.Where(x => x.DeviceProParamType == "ReadDeviceCommand" && x.DeviceChildCode == deviceChildCode).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
            if (devicePro == null)
            {
                throw new Exception("未找到协议信息");
            }
            else
            {
                return Communicator.ReadCustomer<T>(devicePro.DeviceProAddress);
            }
        }
        /// <summary>
        /// è¯»å–PLC数据,返回自定义对象
        /// </summary>
        /// <typeparam name="T">泛型</typeparam>
        /// <param name="deviceChildCode">子设备编号</param>
        /// <param name="typeName">参数类型</param>
        /// <returns>返回自定义对象或抛出异常</returns>
        /// <exception cref="Exception"></exception>
        public T ReadCustomer<T>(string deviceChildCode, string typeName) where T : IDataTransfer, new()
        {
            if (!IsConnected) throw new Exception($"通讯连接错误,请检查网络");
            DeviceProDTO? devicePro = _deviceProDTOs.Where(x => x.DeviceProParamType == typeName && x.DeviceChildCode == deviceChildCode).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
            if (devicePro == null)
            {
                throw new Exception("未找到协议信息");
            }
            else
            {
                return Communicator.ReadCustomer<T>(devicePro.DeviceProAddress);
            }
        }
        /// <summary>
        /// æ ¹æ®å‚数名称、设备子编号写入对应的数据。
        /// </summary>
        /// <typeparam name="TEnum">参数名称枚举类型。</typeparam>
        /// <typeparam name="TValue">要写入的数据类型。</typeparam>
        /// <param name="enum">参数名称。</param>
        /// <param name="value">要写入的数据。</param>
        /// <param name="deviceChildCode">设备子编号写</param>
        /// <returns>返回写入成功或失败</returns>
        public bool SetValue<TEnum, TValue>(TEnum @enum, TValue value, string deviceChildCode)
            where TEnum : Enum
            where TValue : notnull
        {
            if (!IsConnected) throw new Exception($"通讯连接错误,请检查网络");
            DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == @enum.ToString() && x.DeviceChildCode == deviceChildCode);
            return devicePro == null ? throw new Exception($"写入数据错误,未在协议信息里面找到参数{value.ToString()}") : Communicator.WriteObj(devicePro.DeviceProAddress, devicePro.DeviceDataType, value);
        }
        /// <summary>
        /// æ ¹æ®å‚数名称、设备子编号写入对应的数据。
        /// </summary>
        /// <typeparam name="TEnum">参数名称枚举类型。</typeparam>
        /// <typeparam name="TValue">要写入的数据类型。</typeparam>
        /// <param name="enum">参数名称。</param>
        /// <param name="value">要写入的数据。</param>
        /// <param name="deviceChildCode">设备子编号写</param>
        /// <returns>返回写入成功或失败</returns>
        public bool SetValue<TEnum, TValue>(TEnum @enum, TValue value, string deviceChildCode, string typeName)
            where TEnum : Enum
            where TValue : notnull
        {
            if (!IsConnected) throw new Exception($"通讯连接错误,请检查网络");
            DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamType == typeName && x.DeviceProParamName == @enum.ToString() && x.DeviceChildCode == deviceChildCode);
            return devicePro == null ? throw new Exception($"写入数据错误,未在协议信息里面找到参数{value.ToString()}") : Communicator.WriteObj(devicePro.DeviceProAddress, devicePro.DeviceDataType, value);
        }
        /// <summary>
        /// æ ¹æ®å‚数名称读取堆垛机对应的数据。
        /// </summary>
        /// <typeparam name="TEnum">参数名称枚举类型。</typeparam>
        /// <typeparam name="TRsult">读取结果的返回值类型。</typeparam>
        /// <param name="value">参数名称。</param>
        /// <returns>返回读取到的数据。</returns>
        /// <exception cref="Exception"></exception>
        public TRsult GetValue<TEnum, TRsult>(TEnum value, string childCode) where TEnum : Enum
        {
            if (!IsConnected) throw new Exception($"通讯连接错误,请检查网络");
            DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == value.ToString() && x.DeviceChildCode == childCode);
            return devicePro == null ? throw new Exception() : (TRsult)Communicator.ReadAsObj(devicePro.DeviceProAddress, devicePro.DeviceDataType);
        }
        /// <summary>
        /// ä¸Žè®¾å¤‡çš„心跳
        /// </summary>
        public void Heartbeat()
        {
        }
        public void Dispose()
        {
            _heartStatr = false;
            _communicator.Dispose();
            GC.SuppressFinalize(this);
        }
        public bool SendCommand<T>(T command) where T : IDataTransfer, new()
        {
            throw new NotImplementedException();
        }
        #endregion
    }
}
ÏîÄ¿´úÂë/WCS/WCSServer/WIDESEAWCS_QuartzJob/StackerCrane/IStackerCrane.cs
@@ -81,24 +81,24 @@
        /// </summary>
        event EventHandler<StackerCraneTaskCompletedEventArgs> StackerCraneTaskCompletedEventHandler;
        /// <summary>
        /// è¯»å–PLC协议地址的数据
        /// </summary>
        /// <typeparam name="TEnum">协议信息的枚举对象信息。</typeparam>
        /// <typeparam name="TRsult">读取数据的类型对象信息。</typeparam>
        /// <param name="value">枚举值</param>
        /// <returns>读取到的数据</returns>
        TRsult GetValue<TEnum, TRsult>(TEnum value) where TEnum : Enum;
        ///// <summary>
        ///// è¯»å–PLC协议地址的数据
        ///// </summary>
        ///// <typeparam name="TEnum">协议信息的枚举对象信息。</typeparam>
        ///// <typeparam name="TRsult">读取数据的类型对象信息。</typeparam>
        ///// <param name="value">枚举值</param>
        ///// <returns>读取到的数据</returns>
        //TRsult GetValue<TEnum, TRsult>(TEnum value) where TEnum : Enum;
        /// <summary>
        /// æ ¹æ®å‚数名称写入堆垛机对应的数据。
        /// </summary>
        /// <typeparam name="TEnum">参数名称枚举类型。</typeparam>
        /// <typeparam name="TValue">要写入的数据类型。</typeparam>
        /// <param name="enum">参数名称。</param>
        /// <param name="value">要写入的数据。</param>
        /// <returns>返回写入成功或失败</returns>
        /// <exception cref="Exception"></exception>
        bool SetValue<TEnum, TValue>(TEnum @enum, TValue value) where TEnum : Enum where TValue : notnull;
        ///// <summary>
        ///// æ ¹æ®å‚数名称写入堆垛机对应的数据。
        ///// </summary>
        ///// <typeparam name="TEnum">参数名称枚举类型。</typeparam>
        ///// <typeparam name="TValue">要写入的数据类型。</typeparam>
        ///// <param name="enum">参数名称。</param>
        ///// <param name="value">要写入的数据。</param>
        ///// <returns>返回写入成功或失败</returns>
        ///// <exception cref="Exception"></exception>
        //bool SetValue<TEnum, TValue>(TEnum @enum, TValue value) where TEnum : Enum where TValue : notnull;
    }
}
ÏîÄ¿´úÂë/WCS/WCSServer/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs
@@ -387,6 +387,17 @@
            return BaseDal.QueryFirst(x => (TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.InNew || TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.SC_OutFinish) && x.CurrentAddress == currentAddress, TaskOrderBy);
        }
        /// <summary>
        /// æ ¹æ®è®¾å¤‡ç¼–号、当前地址查询输送线未执行的任务
        /// </summary>
        /// <param name="deviceNo">设备编号</param>
        /// <param name="currentAddress">当前地址</param>
        /// <returns></returns>
        public Dt_Task QueryConveyorLineTask(int palletCode, string currentAddress)
        {
            return BaseDal.QueryFirst(x => (TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.InNew || TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.SC_OutFinish) && x.CurrentAddress == currentAddress, TaskOrderBy);
        }
        /// ä»»åŠ¡å®Œæˆ
        /// </summary>
        /// <param name="taskNum">任务编号</param>
ÏîÄ¿´úÂë/WCS/WCSServer/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -43,6 +43,7 @@
using WIDESEAWCS_SignalR;
using WIDESEAWCS_Tasks.ConveyorLineJob;
using WIDESEAWCS_Tasks.StackerCraneJob;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;
using ICacheService = WIDESEAWCS_Core.Caches.ICacheService;
namespace WIDESEAWCS_Tasks
@@ -88,19 +89,37 @@
                    foreach (var station in stationManagers)
                    {
                        ConveyorLineTaskCommand command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(station.stationChildCode);
                        var request = conveyorLine.GetValue<ConveyorLineDBName, byte>(ConveyorLineDBName.EntApply, station.stationChildCode);
                        DeviceProtocolDetailDTO? deviceProtocolDetails = conveyorLine.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == station.stationChildCode && x.ProtocalDetailValue == command.RequestTask.ToString());
                        DeviceProtocolDetailDTO? deviceProtocolDetails = conveyorLine.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == station.stationChildCode && x.ProtocalDetailValue == request.ToString());
                        //x.DeviceProParamName == nameof(ConveyorLineTaskCommand.ConveyorLineSingal)
                        if (deviceProtocolDetails != null)
                        {
                            MethodInfo? method = GetType().GetMethod(deviceProtocolDetails.ProtocolDetailType);
                            if (method != null)
                            {
                                method.Invoke(this, new object[] { conveyorLine, command, station });
                                method.Invoke(this, new object[] { conveyorLine, conveyorLine, station });
                            }
                        }
                        //ConveyorLineTaskCommand command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(station.stationChildCode);
                        //command.PVI.Replace("/0", "").Replace("\"\\u0010\\u000f", "");
                        //command.CarColor.Replace("/0", "");
                        //command.CarType.Replace("/0", "");
                        //command.CarCate.Replace("/0", "");
                        //command.CatSkyWindow.Replace("/0", "");
                        //DeviceProtocolDetailDTO? deviceProtocolDetails = conveyorLine.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == station.stationChildCode && x.ProtocalDetailValue == command.Request.ToString());
                        ////x.DeviceProParamName == nameof(ConveyorLineTaskCommand.ConveyorLineSingal)
                        //if (deviceProtocolDetails != null)
                        //{
                        //    MethodInfo? method = GetType().GetMethod(deviceProtocolDetails.ProtocolDetailType);
                        //    if (method != null)
                        //    {
                        //        method.Invoke(this, new object[] { conveyorLine, command, station });
                        //    }
                        //}
                        #region è°ƒç”¨äº‹ä»¶æ€»çº¿é€šçŸ¥å‰ç«¯
                        //var tokenInfos = _cacheService.Get<List<UserInfo>>("Cache_UserToken");
@@ -136,32 +155,32 @@
        }
        /// <summary>
        /// è¾“送线请求分配路径
        /// è¾“送线请求入库
        /// </summary>
        /// <param name="conveyorLine">输送线实例对象</param>
        /// <param name="command">读取的请求信息</param>
        /// <param name="childDeviceCode">子设备编号</param>
        public void RequestInboundFlow(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, Dt_StationManager stationInfo)
        public void RequestReceviceCar(CommonConveyorLine conveyorLine, CommonConveyorLine conveyorLine2, Dt_StationManager stationInfo)
        {
            var log = $"【{conveyorLine.DeviceName}】,托盘号:【{stationInfo.stationChildCode}】,站台:【{stationInfo.remark}】请求流向";
            var log = $"【{conveyorLine.DeviceName}】,托盘号:【{stationInfo.stationChildCode}】,站台:【{stationInfo.remark}】请求任务";
            ConsoleHelper.WriteSuccessLine(log);
            //_noticeService.Logs(userTokenIds, new { conveyorLine.DeviceName, log = log, time = DateTime.Now.ToString("G"), color = "red" });
            WriteInfo(conveyorLine.DeviceName, log);
            //if()
            var taskNew = _taskService.QueryConveyorLineTask(command.Barcode, stationInfo.stationChildCode);
            var palletcode = conveyorLine2.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.SkidNo, stationInfo.stationChildCode);
            var taskNew = _taskService.QueryConveyorLineTask(palletcode, stationInfo.stationChildCode);
            if (taskNew == null)
            {
                if (_taskService.RequestTask(command.Barcode, stationInfo).Result.Status)
                if (_taskService.RequestTask(palletcode, stationInfo).Result.Status)
                {
                    Dt_Task task = _taskService.QueryConveyorLineTask(command.Barcode, stationInfo.stationChildCode);
                    Dt_Task task = _taskService.QueryConveyorLineTask(palletcode, stationInfo.stationChildCode);
                    if (task != null)
                    {
                        conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, task.NextAddress, stationInfo.stationChildCode);
                        //conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, task.NextAddress, stationInfo.stationChildCode);
                        //conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, task.NextAddress, stationInfo.stationChildCode);
                        conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode);
                        //conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode);
                        _taskService.UpdateTaskStatusToNext(task);
                    }
@@ -169,18 +188,8 @@
                else
                {
                    //如果任务请求失败
                    conveyorLine.SetValue(ConveyorLineDBName.ResponState, 2, stationInfo.stationChildCode);
                    //conveyorLine.SetValue(ConveyorLineDBName.ResponState, 2, stationInfo.stationChildCode);
                }
            }
            else
            {
                conveyorLine.SetValue(ConveyorLineDBName.Barcode, taskNew.PalletCode, stationInfo.stationChildCode);
                conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, taskNew.NextAddress, stationInfo.stationChildCode);
                //conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, taskNew.NextAddress, stationInfo.stationChildCode);
                conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode);
                _taskService.UpdateTaskStatusToNext(taskNew);
            }
        }
@@ -199,18 +208,18 @@
            WriteInfo(conveyorLine.DeviceName, log);
            //if()
            var taskNew = _taskService.QueryConveyorLineTask(command.Barcode, stationInfo.stationChildCode);
            var taskNew = _taskService.QueryConveyorLineTask(command.PalletCode.ToString().PadLeft(4, '0'), stationInfo.stationChildCode);
            if (taskNew == null)
            {
                if (_taskService.RequestTask(command.Barcode, stationInfo).Result.Status)
                if (_taskService.RequestTask(command.PalletCode.ToString().PadLeft(4, '0'), stationInfo).Result.Status)
                {
                    Dt_Task task = _taskService.QueryConveyorLineTask(command.Barcode, stationInfo.stationChildCode);
                    Dt_Task task = _taskService.QueryConveyorLineTask(command.PalletCode.ToString().PadLeft(4, '0'), stationInfo.stationChildCode);
                    if (task != null)
                    {
                        conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, task.NextAddress, stationInfo.stationChildCode);
                        //conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, task.NextAddress, stationInfo.stationChildCode);
                        //conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, task.NextAddress, stationInfo.stationChildCode);
                        conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode);
                        //conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode);
                        _taskService.UpdateTaskStatusToNext(task);
                    }
@@ -218,25 +227,8 @@
                else
                {
                    //如果任务请求失败
                    conveyorLine.SetValue(ConveyorLineDBName.ResponState, 2, stationInfo.stationChildCode);
                    //conveyorLine.SetValue(ConveyorLineDBName.ResponState, 2, stationInfo.stationChildCode);
                }
            }
            else
            {
                conveyorLine.SetValue(ConveyorLineDBName.Barcode, taskNew.PalletCode, stationInfo.stationChildCode);
                if ((taskNew.TargetAddress == "2042" || taskNew.TargetAddress == "2032") && taskNew.TaskState == (int)TaskOutStatusEnum.SC_OutFinish)
                {
                    conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, taskNew.TargetAddress, stationInfo.stationChildCode);
                }
                else
                {
                    conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, taskNew.NextAddress, stationInfo.stationChildCode);
                }
                //conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, taskNew.NextAddress, stationInfo.stationChildCode);
                conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode);
                _taskService.UpdateTaskStatusToNext(taskNew);
            }
        }
@@ -249,7 +241,7 @@
        public void ConveyorLineInFinish(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, Dt_StationManager stationInfo)
        {
            //string clinfo = conveyorLine.ReadValue(ConveyorLineDBName.Barcode, stationInfo.stationChildCode).ToString();
            var task = _taskService.QueryExecutingTaskByBarcode(command.Barcode, stationInfo.stationChildCode);
            var task = _taskService.QueryExecutingTaskByBarcode(command.PalletCode.ToString().PadLeft(4, '0'), stationInfo.stationChildCode);
            if (task != null && task.TaskState != (int)TaskInStatusEnum.Line_InFinish)
            {
                //ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
@@ -258,11 +250,11 @@
                ConsoleHelper.WriteErrorLine($"{stationInfo.stationChildCode}站台请求响应信息:{content.ToJsonString()}");
                if (content.Status)
                {
                    conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode);
                    //conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode);
                }
                else
                {
                    conveyorLine.SetValue(ConveyorLineDBName.ResponState, 2, stationInfo.stationChildCode);
                    //conveyorLine.SetValue(ConveyorLineDBName.ResponState, 2, stationInfo.stationChildCode);
                }
            }
        }
@@ -279,17 +271,12 @@
            var task = _taskService.QueryConveyorLineTask(conveyorLine.DeviceName, stationInfo.stationChildCode);
            if (task != null)
            {
                conveyorLine.SetValue(ConveyorLineDBName.Barcode, task.PalletCode, stationInfo.stationChildCode);
                conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, task.TargetAddress, stationInfo.stationChildCode);
                conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode);
                conveyorLine.SetValue(ConveyorLineDBName.SkidNo, task.PalletCode, stationInfo.stationChildCode);
                //conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, task.TargetAddress, stationInfo.stationChildCode);
                //conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode);
                //ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
                _taskService.UpdateTaskStatusToNext(task);
                if (task.TargetAddress == "2009" && task.TaskState == (int)TaskOutStatusEnum.Line_OutExecuting)
                {
                    _taskService.UpdateTaskStatusToNext(task);
                }
            }
        }
@@ -303,89 +290,27 @@
        /// <param name="ProtocalDetailValue">线体当前bool读取偏移地址</param>
        public void ConveyorLineOutFinish(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, Dt_StationManager stationInfo)
        {
            var task = _taskService.QueryExecutingTaskByBarcode(command.Barcode, stationInfo.stationChildCode);
            var task = _taskService.QueryConveyorLineTask(conveyorLine.DeviceName, stationInfo.stationChildCode);
            if (task != null)
            {
                if (task.TargetAddress == "2032" || task.TargetAddress == "2042")
                {
                    bool k2 = conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, task.TargetAddress, stationInfo.stationChildCode);
                    bool k3 = conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode);
                    WebResponseContent k4 = _taskService.UpdateTaskStatusToNext(task);
                }
                else
                {
                    WebResponseContent content = _taskService.RequestWheelsFlow(task.PalletCode).Result;
                    if (content.Status)
                    {
                        string taraddress = content.Data.ToString(); // "2032";SourceAddress
                        bool k2 = conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, task.TargetAddress, stationInfo.stationChildCode);
                        bool k3 = conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode);
                        WebResponseContent k4 = _taskService.UpdateTaskStatusToNext(task);
                    }
                    else
                    {
                        conveyorLine.SetValue(ConveyorLineDBName.ResponState, 2, stationInfo.stationChildCode);
                        Console.Out.WriteLine($"读取到输送线申请,申请条码:{command.Barcode},向WMS申请去向失败,原因:{content.Message},写入申诉信故障:2");
                    }
                }
            }
            else
                var canTask = _taskRepository.QueryData(x => true).OrderByDescending(x => x.Grade).ThenBy(x => x.CreateDate).FirstOrDefault();
                if (null != canTask && task.PalletCode == canTask.PalletCode)
            {
                string taraddresspos = _taskService.RequestWheletHty(command.Barcode);
                if (taraddresspos != null)
                {
                    //WebResponseContent k4 = _taskService.UpdateTaskStatusToNext(task);
                    bool k2 = conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, taraddresspos, stationInfo.stationChildCode);
                    bool k3 = conveyorLine.SetValue(ConveyorLineDBName.ResponState, 1, stationInfo.stationChildCode);
                    //command.PalletCode = (Int32)20;
                    //command.PVI = "ABCD0123456789";
                    //command.CarCate = "SUV";
                    //command.CarColor = "AB01";
                }
                else
                {
                    conveyorLine.SetValue(ConveyorLineDBName.ResponState, 2, stationInfo.stationChildCode);
                    Console.Out.WriteLine($"读取到输送线申请,申请条码:{command.Barcode},未找到任务,申请下一地址为:{stationInfo.stationChildCode},写入申诉信故障:2");
                    conveyorLine.SetValue(ConveyorLineDBName.SkidNo, 20, stationInfo.stationChildCode);
                    conveyorLine.SetValue(ConveyorLineDBName.PVI, "ABCD", stationInfo.stationChildCode);
                    //conveyorLine.SendCommand<ConveyorLineTaskCommand>(command, stationInfo.stationChildCode);
                }
            }
        }
        /// <summary>
        /// è¾“送线请求入库
        /// </summary>
        /// <param name="conveyorLine">输送线实例对象</param>
        /// <param name="command">读取的请求信息</param>
        /// <param name="childDeviceCode">子设备编号</param>
        //public void RequestInbound(CommonConveyorLine_After conveyorLine, ConveyorLineTaskCommand_After command, string childDeviceCode)
        //{
        //    var stationInfo = _stationManagerService.GetStationInfoByChildCode(childDeviceCode);
        //    if (stationInfo != null)
        //    {
        //        //_taskService.r
        //    }
        //    var taskNew = _taskService.QueryCraneConveyorLineTask(command.ConveyorLineTaskNum.ObjToInt(), childDeviceCode);
        //    if (taskNew == null)
        //    {
        //        string barcode = command.ConveyorLineBarcode.TrimEnd();
        //        if (_taskService.RequestWMSTask(command.ConveyorLineBarcode, childDeviceCode).Result.Status)
        //        {
        //            Dt_Task task = _taskService.QueryConveyorLineTask(conveyorLine.DeviceCode, childDeviceCode);
        //            if (task != null)
        //            {
        //                ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task);
        //                //taskCommand.InteractiveSignal = command.InteractiveSignal;
        //                taskCommand.ResponState = 1;
        //                taskCommand.ConveyorLineTaskNum = task.TaskNum;
        //                taskCommand.ConveyorLineTargetAddress = Convert.ToInt16(task.NextAddress);
        //                conveyorLine.SendCommand(taskCommand, childDeviceCode);
        //                //ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
        //                _taskService.UpdateTaskStatusToNext(task);
        //            }
        //        }
        //    }
        //}
    }
}
ÏîÄ¿´úÂë/WCS/WCSServer/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineDBName.cs
@@ -30,45 +30,84 @@
        #region ReadDevice
        /// <summary>
        /// ä»»åŠ¡å·
        /// æ‰‹/自动
        /// </summary>
        TaskNum,
        Auto,
        /// <summary>
        /// ç›®æ ‡åœ°å€
        /// è¿è¡Œ
        /// </summary>
        TargetAddress,
        Running,
        /// <summary>
        /// è¯·æ±‚
        /// å…¥åº“请求
        /// </summary>
        RequestTask,
        EntApply,
        /// <summary>
        /// è¯·æ±‚响应
        /// å‡ºåº“请求
        /// </summary>
        ResponState,
        OutApply,
        /// <summary>
        /// è¯·æ±‚放料
        /// å…è®¸æ”¾æ–™
        /// </summary>
        RequestPut,
        AllowPut,
        /// <summary>
        /// æ”¾æ–™å®Œæˆ
        /// æ»šåºŠå ä½
        /// </summary>
        PutFinish,
        Occupy,
        /// <summary>
        /// ç›®æ ‡åœ°å€
        /// æ˜¯å¦æŠ¥è­¦
        /// </summary>
        Barcode,
        IsAlarm,
        /// <summary>
        /// å¤‡ç”¨
        /// å¤‡ç”¨1
        /// </summary>
        Spare,
        Spare1,
        /// <summary>
        /// å¤‡ç”¨2
        /// </summary>
        Spare2,
        /// <summary>
        /// å¤‡ç”¨3
        /// </summary>
        Spare3,
        /// <summary>
        /// æ»‘橇号
        /// </summary>
        SkidNo,
        /// <summary>
        /// PVI
        /// </summary>
        PVI,
        /// <summary>
        /// PVI写入
        /// </summary>
        PVI_W,
        /// <summary>
        ///  æ»‘橇号
        /// </summary>
        Spare4,
        /// <summary>
        ///  =1 ç©ºæ’¬ =2撬组 =3车身 =4电池壳 =5空料架
        /// </summary>
        Spare5,
        /// <summary>
        /// å¤‡ç”¨6
        /// </summary>
        Spare6,
        #endregion
        #region WriteDevice
ÏîÄ¿´úÂë/WCS/WCSServer/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineTaskCommand.cs
@@ -40,20 +40,11 @@
    public class ConveyorLineTaskCommand : DeviceCommand
    {
        /// <summary>
        /// ä»»åŠ¡å·
        /// </summary>
        public short TaskNum { get; set; }
        /// <summary>
        /// ç›®æ ‡åœ°å€
        /// è¯·æ±‚
        /// </summary>
        public short TargetAddress { get; set; }
        /// <summary>
        /// è¯·æ±‚任务
        /// </summary>
        public short RequestTask { get; set; }
        public byte Request { get; set; }
        /// <summary>
        /// è¯·æ±‚响应
@@ -61,49 +52,59 @@
        public short ResponState { get; set; }
        /// <summary>
        /// è¯·æ±‚放料
        /// æ»‘橇号
        /// </summary>
        public short RequestPut { get; set; }
        public int PalletCode { get; set; } //=>
        /// <summary>
        /// æ”¾æ–™å®Œæˆ
        /// PVI码
        /// </summary>
        public short PutFinish { get; set; }
        [DataLength(13)]
        public string PVI { get; set; }
        /// <summary>
        /// æ¡ç 
        /// å¤‡ç”¨1
        /// </summary>
        [DataLength(10)]
        public string Barcode { get; set; }
        [DataLength(3)]
        public string Spare1 { get; set; }
        /// <summary>
        /// å¤‡ç”¨
        /// è½¦ç³»
        /// </summary>
        public short Spare { get; set; }
        [DataLength(4)]
        public string CarType { get; set; }
        //public short SourceAddress { get; set; }
        //public short TargetAddress { get; set; }
        /// <summary>
        /// è½¦åž‹
        /// </summary>
        [DataLength(4)]
        public string CarCate { get; set; }
        /// <summary>
        /// æ–¹å‘盘位置
        /// </summary>
        [DataLength(4)]
        public string CarPosition { get; set; }
        /// <summary>
        /// å¤©çª—
        /// </summary>
        [DataLength(4)]
        public string CatSkyWindow { get; set; }
        /// <summary>
        /// è½¦èº«é¢œè‰²
        /// </summary>
        [DataLength(2)]
        public string CarColor { get; set; }
        /// <summary>
        /// å¤‡ç”¨2
        /// </summary>
        public short Spare2 { get; set; }
    }
    public class ConveyorLineTaskCommand_CZ : DeviceCommand
    {
        /// <summary>
        /// è½¦è½´æ¡ç 
        /// </summary>
        [DataLength(40)]
        public string Number { get; set; }
        /// <summary>
        /// è¯·æ±‚信号
        /// </summary>
        public short ConveyorLineSingal { get; set; }
        /// <summary>
        /// è¯·æ±‚反馈
        /// </summary>
        public short ResponState { get; set; }
    }
    //public class ConveyorLineTaskCommandWrite : DeviceCommand
    //{
ÏîÄ¿´úÂë/WCS/WCSServer/WIDESEAWCS_Tasks/SC/SCJob.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,364 @@
using Mapster;
using Newtonsoft.Json;
using Quartz;
using System.Diagnostics.CodeAnalysis;
using System.Text;
using WIDESEAWCS_BasicInfoRepository;
using WIDESEAWCS_Common;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core.Caches;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_Core.HttpContextUser;
using WIDESEAWCS_IProcessRepository;
using WIDESEAWCS_ISystemServices;
using WIDESEAWCS_ITaskInfo_HtyRepository;
using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_QuartzJob.DeviceBase;
using WIDESEAWCS_QuartzJob.Models;
using WIDESEAWCS_QuartzJob.Service;
using WIDESEAWCS_QuartzJob.StackerCrane.Enum;
using WIDESEAWCS_SignalR;
using WIDESEAWCS_Tasks.ConveyorLineJob;
using WIDESEAWCS_Tasks.StackerCraneJob;
namespace WIDESEAWCS_Tasks
{
    [DisallowConcurrentExecution]
    public class SCJob : JobBase, IJob
    {
        private readonly ITaskService _taskService;
        private readonly ITaskExecuteDetailService _taskExecuteDetailService;
        private readonly ITaskRepository _taskRepository;
        private readonly IRouterService _routerService;
        private readonly IProcessRepository _processRepository;
        private readonly ICacheService _cacheService;
        private readonly INoticeService _noticeService;
        private readonly IDt_StationManagerRepository _stationManagerRepository;
        private readonly ITask_HtyRepository _htyRepository;
        private readonly ISys_ConfigService _sys_ConfigService;
        private static List<string>? userTokenIds;
        private static List<int>? userIds;
        public SCJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IProcessRepository processRepository, ICacheService cacheService, INoticeService noticeService, IDt_StationManagerRepository stationManagerRepository, ITask_HtyRepository htyRepository, ISys_ConfigService sys_ConfigService)
        {
            _taskService = taskService;
            _taskExecuteDetailService = taskExecuteDetailService;
            _taskRepository = taskRepository;
            _routerService = routerService;
            _processRepository = processRepository;
            _cacheService = cacheService;
            _noticeService = noticeService;
            _stationManagerRepository = stationManagerRepository;
            _htyRepository = htyRepository;
            _sys_ConfigService = sys_ConfigService;
        }
        public Task Execute(IJobExecutionContext context)
        {
            try
            {
                bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value);
                if (flag && value != null && value is STK commonStackerCrane)
                {
                    List<string> childCodes = commonStackerCrane.DeviceProDTOs.GroupBy(d => d.DeviceChildCode).Select(g => g.Key).ToList();
                    Parallel.For(0, childCodes.Count, (i, state) =>
                    {
                        ConsoleHelper.WriteColorLine($"【{childCodes[i]}】时间【{DateTime.Now}】】【{Thread.CurrentThread.ManagedThreadId}】", ConsoleColor.Magenta);
                        if (commonStackerCrane.GetValue<StackerCraneDBName, byte>(StackerCraneDBName.TaskState, childCodes[i]) == 2)
                        {
                            int taskNum = commonStackerCrane.GetValue<StackerCraneDBName, int>(StackerCraneDBName.CurrentTaskNum, childCodes[i]);
                            byte workStatus = commonStackerCrane.GetValue<StackerCraneDBName, byte>(StackerCraneDBName.TaskState, childCodes[i]);
                            ConsoleHelper.WriteColorLine($"【{childCodes[i]}】堆垛机作业状态:【{workStatus}】时间【{DateTime.Now}", ConsoleColor.Magenta);
                            string str = $"【{childCodes[i]}】任务完成,任务号:【{taskNum}】时间【{DateTime.Now}】";
                            WriteInfo(childCodes[i], str);
                            ConsoleHelper.WriteColorLine(str, ConsoleColor.Blue);
                            var task = _taskRepository.QueryFirst(x => x.TaskNum == taskNum);
                            if (task == null)
                            {
                                commonStackerCrane.SetValue(StackerCraneDBName.CMD, 2, childCodes[i]);
                            }
                            else
                            {
                                var content = _taskService.StackCraneTaskCompleted(taskNum);
                                var isWorkType = commonStackerCrane.SetValue(StackerCraneDBName.WorkType, 2, childCodes[i]);
                                str = $"【{childCodes[i]}】WMS|WCS任务完成:【{content.Status}】,堆垛机完成信号写入:【{isWorkType}】,任务号:【{taskNum}】时间【{DateTime.Now}】";
                                WriteInfo(childCodes[i], str);
                                ConsoleHelper.WriteColorLine(str, ConsoleColor.Blue);
                            }
                        }
                        if (commonStackerCrane.GetValue<StackerCraneDBName, bool>(StackerCraneDBName.Online, childCodes[i])        //在线
                               && commonStackerCrane.GetValue<StackerCraneDBName, bool>(StackerCraneDBName.Free, childCodes[i])     //空闲
                               && !commonStackerCrane.GetValue<StackerCraneDBName, bool>(StackerCraneDBName.Alarm, childCodes[i])     //无报警
                               && !commonStackerCrane.GetValue<StackerCraneDBName, bool>(StackerCraneDBName.Goods, childCodes[i])    //载货台无货
                               && commonStackerCrane.GetValue<StackerCraneDBName, bool>(StackerCraneDBName.Flag, childCodes[i])      //货叉启用
                            )
                        {
                            Dt_Task? task = GetTask(commonStackerCrane, childCodes[i]);
                            if (task != null)
                            {
                                StackerCraneTaskCommand? stackerCraneTaskCommand = ConvertToStackerCraneTaskCommand(task);
                                if (stackerCraneTaskCommand != null)
                                {
                                    var taskNum = commonStackerCrane.GetValue<StackerCraneDBName, int>(StackerCraneDBName.CurrentTaskNum, childCodes[i]);
                                    //var taskBarCode = commonStackerCrane.GetValue<StackerCraneDBName, string>(StackerCraneDBName.Barcode);
                                    ConsoleHelper.WriteColorLine($"【{childCodes[i]}】堆垛机任务号:【{taskNum}】任务任务号:【{task.TaskNum}】", ConsoleColor.DarkBlue);
                                    if (taskNum == 0)
                                    {
                                        ConsoleHelper.WriteColorLine($"【{childCodes[i]}】任务号为【{0}】,任务号不一致可以下发任务", ConsoleColor.DarkBlue);
                                        Thread.Sleep(500);
                                        bool sendFlag = commonStackerCrane.SendCommand(stackerCraneTaskCommand, childCodes[i]);
                                        _taskService.UpdateTaskStatusToNext(task.TaskNum);
                                    }
                                }
                            }
                        }
                    });
                }
            }
            catch (Exception ex)
            {
                throw;
            }
            return Task.CompletedTask;
        }
        /// <summary>
        /// èŽ·å–ä»»åŠ¡
        /// </summary>
        /// <param name="commonStackerCrane">堆垛机对象</param>
        /// <returns></returns>
        private Dt_Task? GetTask(STK commonStackerCrane, string childCode)
        {
            Dt_Task task;
            task = _taskService.QueryExcutingTask(childCode);
            if (task != null)
            {
                ConsoleHelper.WriteErrorLine($"堆垛机存在执行中的任务,请检查");
                return null;
            }
            task = _taskService.QueryRelocationTask(childCode);
            if (task != null)
            {
                return task;
            }
            if (commonStackerCrane.LastTaskType == null)
            {
                task = _taskService.QueryStackerCraneTask(childCode);
            }
            else
            {
                var lastTaskTypeGroup = commonStackerCrane.LastTaskType.GetValueOrDefault().GetTaskTypeGroup();
                if (lastTaskTypeGroup == TaskTypeGroup.OutbondGroup)
                {
                    task = _taskService.QueryStackerCraneInTask(childCode);
                    if (task == null)
                    {
                        task = _taskService.QueryStackerCraneOutTask(childCode);
                    }
                }
                else
                {
                    task = _taskService.QueryStackerCraneOutTask(childCode);
                }
            }
            if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
            {
                //var relocation = _taskService.OutBeforeCheck(task.TaskNum);
                //if (relocation != null)
                //{
                //    return relocation;
                //}
                // æ£€æŸ¥å½“前出库任务站台是否允许放货
                var occupiedStation = OutTaskStationIsOccupied(task);
                if (occupiedStation == null)
                {
                    // å¦‚果当前出库任务站台不允许放货,排除当前任务,查找其他出库任务
                    var log = $"任务号:【{task.TaskNum}】出库地址:【{task.NextAddress}】不允许放货";
                    ConsoleHelper.WriteErrorLine(log);
                    _noticeService.Logs(userTokenIds, new { commonStackerCrane.DeviceName, log = log, time = DateTime.Now.ToString("G"), color = "red" });
                    WriteInfo(commonStackerCrane.DeviceName, log);
                    task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode);
                }
                else
                {
                    return task;
                }
            }
            else if (task == null)
            {
                task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode);
            }
            if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
            {
                var relocation = _taskService.InBeforeCheck(task.TaskNum);
                if (relocation != null)
                {
                    return relocation;
                }
            }
            return task;
        }
        /// <summary>
        /// å‡ºåº“任务判断出库站台是否被占用
        /// </summary>
        /// <param name="task">任务实体</param>
        /// <returns>如果未被占用,返回传入的任务信息,否则,返回null</returns>
        private Dt_Task? OutTaskStationIsOccupied([NotNull] Dt_Task task)
        {
            Dt_Router? router = _routerService.QueryNextRoutes(task.Roadway, task.NextAddress).FirstOrDefault();
            //Dt_Router? router = _routerService.QueryNextRoutes(task.Roadway, task.NextAddress).FirstOrDefault();
            if (router != null)
            {
                IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == router.ChildPosiDeviceCode);
                if (device != null)
                {
                    CommonConveyorLine conveyorLine = (CommonConveyorLine)device;
                    if (conveyorLine.IsOccupied(router.ChildPosi))//出库站台未被占用
                    {
                        return task;
                    }
                }
                else
                {
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到出库站台【{router.ChildPosiDeviceCode}】对应的通讯对象,无法判断出库站台是否被占用");
                }
            }
            else
            {
                _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到站台【{task.NextAddress}】信息,无法校验站台");
            }
            return null;
        }
        /// <summary>
        /// ä»»åŠ¡å®žä½“è½¬æ¢æˆå‘½ä»¤Model
        /// </summary>
        /// <param name="task">任务实体</param>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        public StackerCraneTaskCommand? ConvertToStackerCraneTaskCommand([NotNull] Dt_Task task)
        {
            StackerCraneTaskCommand stackerCraneTaskCommand = new StackerCraneTaskCommand();
            stackerCraneTaskCommand.TrayCode = "";
            stackerCraneTaskCommand.TaskNo = task.TaskNum;
            stackerCraneTaskCommand.TaskType = 1;
            stackerCraneTaskCommand.Goods_Type = 0;
            stackerCraneTaskCommand.CMD = 1;
            if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//判断是否是入库任务
            {
                List<Dt_Router> routers = _routerService.QueryNextRoutes(task.CurrentAddress, task.Roadway);
                if (routers.Count > 0)
                {
                    stackerCraneTaskCommand.S_Row = Convert.ToInt16(routers.FirstOrDefault().SrmRow);
                    stackerCraneTaskCommand.S_Bay = Convert.ToInt16(routers.FirstOrDefault().SrmColumn);
                    stackerCraneTaskCommand.S_level = Convert.ToInt16(routers.FirstOrDefault().SrmLayer);
                    string[] targetCodes = task.NextAddress.Split("-");
                    if (targetCodes.Length == 3)
                    {
                        stackerCraneTaskCommand.E_Row = Convert.ToInt16(targetCodes[0]) /*% 2 != 0 ? (short)1 : (short)2*/;
                        stackerCraneTaskCommand.E_Bay = Convert.ToInt16(targetCodes[1]);
                        stackerCraneTaskCommand.E_level = Convert.ToInt16(targetCodes[2]);
                    }
                    else
                    {
                        //数据配置错误
                        _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"入库任务终点错误,起点:【{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)
                {
                    stackerCraneTaskCommand.E_Row = Convert.ToInt16(routers.FirstOrDefault().SrmRow);
                    stackerCraneTaskCommand.E_Bay = Convert.ToInt16(routers.FirstOrDefault().SrmColumn);
                    stackerCraneTaskCommand.E_level = Convert.ToInt16(routers.FirstOrDefault().SrmLayer);
                    string[] sourceCodes = task.CurrentAddress.Split("-");
                    if (sourceCodes.Length == 3)
                    {
                        stackerCraneTaskCommand.S_Row = Convert.ToInt16(sourceCodes[0]) /*% 2 != 0 ? (short)1 : (short)2*/;
                        stackerCraneTaskCommand.S_Bay = Convert.ToInt16(sourceCodes[1]);
                        stackerCraneTaskCommand.S_level = Convert.ToInt16(sourceCodes[2]);
                    }
                    else
                    {
                        //数据配置错误
                        _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"出库任务起点错误,起点:【{task.CurrentAddress}】");
                        return null;
                    }
                }
                else
                {
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到站台【{task.NextAddress}】信息,无法获取对应的堆垛机放货站台信息");
                    return null;
                }
            }
            else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup)
            {
                string[] targetCodes = task.NextAddress.Split("-");
                if (targetCodes.Length == 3)
                {
                    stackerCraneTaskCommand.E_Row = Convert.ToInt16(targetCodes[0]) /*% 2 != 0 ? (short)1 : (short)2*/;
                    stackerCraneTaskCommand.E_Bay = Convert.ToInt16(targetCodes[1]);
                    stackerCraneTaskCommand.E_level = Convert.ToInt16(targetCodes[2]);
                }
                else
                {
                    //数据配置错误
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"移库任务终点错误,起点:【{task.NextAddress}】");
                    return null;
                }
                string[] sourceCodes = task.CurrentAddress.Split("-");
                if (sourceCodes.Length == 3)
                {
                    stackerCraneTaskCommand.S_Row = Convert.ToInt16(sourceCodes[0])/* % 2 != 0 ? (short)1 : (short)2*/;
                    stackerCraneTaskCommand.S_Bay = Convert.ToInt16(sourceCodes[1]);
                    stackerCraneTaskCommand.S_level = Convert.ToInt16(sourceCodes[2]);
                }
                else
                {
                    //数据配置错误
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"移库任务起点错误,起点:【{task.CurrentAddress}】");
                    return null;
                }
            }
            return stackerCraneTaskCommand;
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/widesea_wms/basicinfo/Dt_BDCConfiguration.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,67 @@
let extension = {
  components: {
    //查询界面扩展组件
    gridHeader: '',
    gridBody: '',
    gridFooter: '',
    //新建、编辑弹出框扩展组件
    modelHeader: '',
    modelBody: '',
    modelFooter: ''
  },
  tableAction: '', //指定某张表的权限(这里填写表名,默认不用填写)
  buttons: { view: [], box: [], detail: [] }, //扩展的按钮
  methods: {
     //下面这些方法可以保留也可以删除
    onInit() {  //框架初始化配置前,
        //示例:在按钮的最前面添加一个按钮
        //   this.buttons.unshift({  //也可以用push或者splice方法来修改buttons数组
        //     name: '按钮', //按钮名称
        //     icon: 'el-icon-document', //按钮图标vue2版本见iview文档icon,vue3版本见element ui文档icon(注意不是element puls文档)
        //     type: 'primary', //按钮样式vue2版本见iview文档button,vue3版本见element ui文档button
        //     onClick: function () {
        //       this.$Message.success('点击了按钮');
        //     }
        //   });
        //示例:设置修改新建、编辑弹出框字段标签的长度
        this.boxOptions.labelWidth = 150;
    },
    onInited() {
      //框架初始化配置后
      //如果要配置明细表,在此方法操作
      //this.detailOptions.columns.forEach(column=>{ });
    },
    searchBefore(param) {
      //界面查询前,可以给param.wheres添加查询参数
      //返回false,则不会执行查询
      return true;
    },
    searchAfter(result) {
      //查询后,result返回的查询数据,可以在显示到表格前处理表格的值
      return true;
    },
    addBefore(formData) {
      //新建保存前formData为对象,包括明细表,可以给给表单设置值,自己输出看formData的值
      return true;
    },
    updateBefore(formData) {
      //编辑保存前formData为对象,包括明细表、删除行的Id
      return true;
    },
    rowClick({ row, column, event }) {
      //查询界面点击行事件
      // this.$refs.table.$refs.table.toggleRowSelection(row); //单击行时选中当前行;
    },
    modelOpenAfter(row) {
      //点击编辑、新建按钮弹出框后,可以在此处写逻辑,如,从后台获取数据
      //(1)判断是编辑还是新建操作: this.currentAction=='Add';
      //(2)给弹出框设置默认值
      //(3)this.editFormFields.字段='xxx';
      //如果需要给下拉框设置默认值,请遍历this.editFormOptions找到字段配置对应data属性的key值
      //看不懂就把输出看:console.log(this.editFormOptions)
    }
  }
};
export default extension;
ÏîÄ¿´úÂë/WMS/WMSClient/src/router/tables.js
@@ -306,6 +306,14 @@
    // meta: {
    //   keepAlive: true
    // }
  },
  {
    path: '/Dt_BDCConfiguration',
    name: 'Dt_BDCConfiguration',
    component: () => import('@/views/widesea_wms/basicinfo/Dt_BDCConfiguration.vue'),
    meta: {
      keepAlive: false
  }
  },
]
export default tables
ÏîÄ¿´úÂë/WMS/WMSClient/src/views/widesea_wms/OrderInfo/Dt_AssemblyOrderInfo.vue
@@ -18,7 +18,7 @@
        const table = ref({
            key: 'id',
            footer: "Foots",
            cnName: '涂装工单',
            cnName: '总装工单',
            name: 'Orderinfo/Dt_AssemblyOrderInfo',
            url: "/Dt_AssemblyOrderInfo/",
            sortName: "Id"
ÏîÄ¿´úÂë/WMS/WMSClient/src/views/widesea_wms/basicinfo/Dt_BDCConfiguration.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,86 @@
<!--
*Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/widesea_wms/basicinfo/Dt_AreaInfo.js此处编写
 -->
<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/widesea_wms/basicinfo/Dt_BDCConfiguration.js";
import { ref, defineComponent } from "vue";
export default defineComponent({
    setup() {
        const table = ref({
            key: 'Id',
            footer: "Foots",
            cnName: '配置信息',
            name: 'basicinfo/Dt_BDCConfiguration',
            url: "/Dt_BDCConfiguration/",
            sortName: "Id"
        });
        const editFormFields = ref({
            "Name": "",
            "IsActive": "",
            "MaxWhiteBodyCache": "",
            "MaxPaintedBodyCache": "",
            "MaxEmptySledCache": ""
        });
        const editFormOptions = ref([
            [
                { "title": "配置名称", "field": "Name", type: "text" },
                { "title": "是否启用", "field": "IsActive", type: "int" },
            ],
            [
                { "title": "最大白车身缓存", "field": "MaxWhiteBodyCache", type: "text" },
                { "title": "最大彩车身缓存", "field": "MaxPaintedBodyCache", type: "text" },
                { "title": "最大空滑橇缓存", "field": "MaxEmptySledCache", type: "text" },
            ]
        ]);
        const searchFormFields = ref({
            "Name": "",
            "IsActive": "",
        });
        const searchFormOptions = ref([
            [
                { "title": "配置名称", "field": "Name", type: "text" },
                { "title": "是否启用", "field": "IsActive", type: "int" }
            ],
        ]);
        const columns = ref([{ field: 'Id', title: 'ID', type: 'int', sort: true, hidden: true, width: 110, readonly: true, require: true, align: 'left' },
        { field: 'name', title: '配置名称', type: 'string', width: 110, align: 'left' },
        { field: 'isActive', title: '状态', type: 'int', width: 110, align: 'left', bind: { key: "status", data: [] } },
        { field: 'maxWhiteBodyCache', title: '最大白车身缓存', type: 'int', width: 120, align: 'left' },
        { field: 'maxWhiteBodyCache', title: '最大彩车身缓存', type: 'int', width: 120, align: 'left' },
        { field: 'maxWhiteBodyCache', title: '最大空滑橇缓存', type: 'int', width: 120, align: 'left' },
        { field: 'creater', title: '创建人', type: 'string', width: 75, align: 'left' },
        { field: 'createDate', title: '创建时间', type: 'datetime', sort: true, width: 120, align: 'left', sort: true },
        { field: 'modifier', title: '修改人', type: 'string', sort: true, width: 75, align: 'left' },
        { field: 'modifyDate', title: '修改时间', type: 'datetime', sort: true, width: 120, align: 'left', sort: true },
        ]);
        const detail = ref({
            cnName: "#detailCnName",
            table: "#detailTable",
            columns: [],
            sortName: "",
            key: ""
        });
        return {
            table,
            extend,
            editFormFields,
            editFormOptions,
            searchFormFields,
            searchFormOptions,
            columns,
            detail,
        };
    },
});
</script>
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_Common/MES/GetCarCharacteristicInfo.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_Common
{
    /// <summary>
    /// AVI/BDC向MES请求车辆特征信息
    /// rfidPrint : pvi号+白车身物料号后4位
    /// vin : vin号
    /// AB00 : è½¦åž‹
    /// SE00 : è½¦èº«é¢œè‰²
    /// AD00 : å¤©çª—
    /// </summary>
    public class GetCarCharacteristicInfo
    {
        /// <summary>
        /// å”¯ä¸€æ ‡è¯†
        /// </summary>
        public string unionKey { get; set; }
        /// <summary>
        /// å·¥åŽ‚ç¼–ç 
        /// </summary>
        public string code { get; set; }
        /// <summary>
        ///  pvi号+白车身物料号后4位
        /// </summary>
        public string rfid { get; set; }
        /// <summary>
        /// VIN号
        /// </summary>
        public bool success { get; set; }
        /// <summary>
        /// åŒæ­¥æ—¶é—´
        /// </summary>
        public DateTime? messageTime { get; set; }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_Common/MES/Request/CarCharacteristicInfo.cs
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_Common/MES/Request/IssuedCharacterInfo.cs
@@ -6,12 +6,17 @@
namespace WIDESEA_Common.MES.Request
{
    /// <summary>
    /// BDC请求焊装特征下发
    /// è½¦èº«è¿›å…¥BDC时,BDC读取车身上的一维条码向MES请求焊装特征信息
    /// è¯·æ±‚参数
    /// </summary>
    public class IssuedCharacterInfo
    {
        /// <summary>
        /// å·¥åŽ‚ç¼–å·
        /// </summary>
        public string plantCode { get; set; } = "1022";
        public string plantCode { get; set; } = "1052";
        /// <summary>
        /// pvi号+白车身物料号后4位  (扫描车身白车身物料码)
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_Common/MES/Request/pushWorkOrderInfo.cs
@@ -6,10 +6,16 @@
namespace WIDESEA_Common
{
    public class pushWorkOrderInfo
    {
        public List<pushWorkOrderInfoDet> list { get; set; }
    }
    /// <summary>
    /// æ¶‚装工单信息
    /// </summary>
    public class pushWorkOrderInfo
    public class pushWorkOrderInfoDet
    {
        /// <summary>
        /// å·¥åŽ‚
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_Core/Const/ConfigConst.cs
@@ -100,7 +100,7 @@
        /// <summary>
        /// è½¦èº«è¿‡ç‚¹
        /// </summary>
        public const string PassPoint = "PassPoint";
        public const string AVIPASS = "AVIPASS";
        /// <summary>
        /// WCS接收任务
@@ -116,5 +116,10 @@
        /// è½¦èº«ç‰¹å¾ä¿¡æ¯
        /// </summary>
        public const string IssuedCharacter = "IssuedCharacter";
        /// <summary>
        /// BDC向MES请求车辆特征信息
        /// </summary>
        public const string getCharacteristic = "getCharacteristic";
    }
}
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_Core/DB/Models/BaseEntity.cs
@@ -79,7 +79,7 @@
        [ImporterHeader(Name = "修改人")]
        [ExporterHeader(DisplayName = "修改人")]
        [SugarColumn(IsNullable = true, IsOnlyIgnoreInsert = true, ColumnDescription = "修改人")]
        public string Modifier { get; set; }
        public string Modifier { get; set; } = "System";
        /// <summary>
        /// ä¿®æ”¹æ—¥æœŸ
@@ -87,7 +87,7 @@
        [ImporterHeader(Name = "修改日期")]
        [ExporterHeader(DisplayName = "修改日期")]
        [SugarColumn(IsNullable = true, IsOnlyIgnoreInsert = true, ColumnDescription = "修改日期")]
        public DateTime? ModifyDate { get; set; } //= DateTime.Now;
        public DateTime? ModifyDate { get; set; } = DateTime.Now;
        /// <summary>
        /// æ•°æ®ç‰ˆæœ¬
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_Core/HostedService/SeedDataHostedService.cs
@@ -49,7 +49,7 @@
                {
                    // ä½¿ç”¨ myScopedService æ‰§è¡Œä»»åŠ¡
                    await DBSeed.SeedAsync(_dbContext, _webRootPath);
                    //await DBSeed.SeedAsync(_dbContext, _webRootPath);
                    //多租户 åŒæ­¥
                    //await DBSeed.TenantSeedAsync(_dbContext);
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_IStoragIntegrationServices/MES/IMESService.cs
@@ -10,14 +10,48 @@
{
    public interface IMESService : IDependency
    {
        /// <summary>
        /// æ¶‚装工单信息
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        WebResponseContent pushWorkOrderInfo(object json);
        /// <summary>
        /// é¢„绑定工单
        /// </summary>
        WebResponseContent prebind(object json);
        WebResponseContent PassPoint(string stationCode);
        /// <summary>
        /// è½¦èº«è¿‡ç‚¹è¯·æ±‚
        /// </summary>
        WebResponseContent PassPoint(string stationCode, string rfid);
        /// <summary>
        /// æ€»è£…工单信息
        /// </summary>
        WebResponseContent pushOrderInfo(object json);
        /// <summary>
        ///  BDC请求焊装特征信息
        /// </summary>
        /// <param name="rfidPrint">RFID</param>
        /// <param name="vin">VIN号</param>
        /// <param name="stationNo">站台请求点位</param>
        /// <returns></returns>
        WebResponseContent issuedCharacter(string rfidPrint, string vin, string stationNo);
        /// <summary>
        /// è½¦èº«ç»‘定工单(焊装直通涂装)
        /// </summary>
        WebResponseContent bindWorkOrder(string stationNo, string rfid);
        /// <summary>
        /// BDC请求车辆特征信息
        /// </summary>
        /// <param name="rfidPrint">RFID</param>
        /// <param name="stationNo">站台请求点位</param>
        /// <returns></returns>
        WebResponseContent getCharacteristic(string rfidPrint, string stationNo);
    }
}
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_Model/Models/BasicInfo/Dt_BDCConfiguration.cs
@@ -5,63 +5,61 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.DB.Models;
namespace WIDESEA_Model.Models
{
    /// <summary>
    /// BDC缓存配置,存储各类物料的最大缓存数量限制
    /// BDC缓存配置
    /// </summary>
    [SugarTable(nameof(Dt_BDCConfiguration), "BDC缓存配置")]
    public class Dt_BDCConfiguration
    [SugarTable(nameof(Dt_BDCConfiguration_detail), "BDC配置")]
    public class Dt_BDCConfiguration_detail : BaseEntity
    {
        [Key]
        [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        [SugarColumn(ColumnName = "Name")]
        public int Con_Id { get; set; }
        /// <summary>
        /// é…ç½®åç§°
        /// </summary>
        [Required]
        [MaxLength(100)]
        public string Name { get; set; } = "Default Configuration";
        [SugarColumn(ColumnName = "Name")]
        public string Name { get; set; } = "默认配置";
        /// <summary>
        /// ç™½è½¦èº«æœ€å¤§ç¼“存数
        /// </summary>
        [SugarColumn(ColumnName = "MaxWhiteBodyCache")]
        [Range(0, int.MaxValue)]
        public int MaxWhiteBodyCache { get; set; } = 100;
        /// <summary>
        /// å½©è½¦èº«æœ€å¤§ç¼“存数
        /// </summary>
        [SugarColumn(ColumnName = "MaxPaintedBodyCache")]
        [Range(0, int.MaxValue)]
        public int MaxPaintedBodyCache { get; set; } = 100;
        /// <summary>
        /// ç”µæ± å£³æœ€å¤§ç¼“存数
        /// </summary>
        [SugarColumn(ColumnName = "MaxBatteryCaseCache")]
        [Range(0, int.MaxValue)]
        public int MaxBatteryCaseCache { get; set; } = 50;
        /// <summary>
        /// ç©ºæ»‘橇最大缓存数
        /// </summary>
        [SugarColumn(ColumnName = "MaxEmptySledCache")]
        [Range(0, int.MaxValue)]
        public int MaxEmptySledCache { get; set; } = 30;
        /// <summary>
        /// æœ€åŽæ›´æ–°æ—¶é—´
        /// </summary>
        public DateTime LastUpdatedTime { get; set; } = DateTime.Now;
        /// <summary>
        /// æ›´æ–°äºº
        /// </summary>
        [MaxLength(50)]
        public string UpdatedBy { get; set; } = "System";
        /// <summary>
        /// æ˜¯å¦å¯ç”¨
        /// </summary>
        [SugarColumn(ColumnName = "IsActive")]
        public int IsActive { get; set; } = 1;
    }
}
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_Model/Models/BasicInfo/Dt_BDCConfiguration_detail.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,62 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.DB.Models;
namespace WIDESEA_Model.Models
{
    /// <summary>
    /// BDC缓存配置,存储各类物料的最大缓存数量限制
    /// </summary>
    [SugarTable(nameof(Dt_BDCConfiguration), "BDC配置详情")]
    public class Dt_BDCConfiguration: BaseEntity
    {
        [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        /// <summary>
        /// é…ç½®åç§°
        /// </summary>
        [SugarColumn(ColumnName = "Name")]
        public string Name { get; set; } = "默认配置";
        /// <summary>
        /// ç™½è½¦èº«æœ€å¤§ç¼“存数
        /// </summary>
        [SugarColumn(ColumnName = "MaxWhiteBodyCache")]
        [Range(0, int.MaxValue)]
        public int MaxWhiteBodyCache { get; set; } = 100;
        /// <summary>
        /// å½©è½¦èº«æœ€å¤§ç¼“存数
        /// </summary>
        [SugarColumn(ColumnName = "MaxPaintedBodyCache")]
        [Range(0, int.MaxValue)]
        public int MaxPaintedBodyCache { get; set; } = 100;
        /// <summary>
        /// ç”µæ± å£³æœ€å¤§ç¼“存数
        /// </summary>
        [SugarColumn(ColumnName = "MaxBatteryCaseCache")]
        [Range(0, int.MaxValue)]
        public int MaxBatteryCaseCache { get; set; } = 50;
        /// <summary>
        /// ç©ºæ»‘橇最大缓存数
        /// </summary>
        [SugarColumn(ColumnName = "MaxEmptySledCache")]
        [Range(0, int.MaxValue)]
        public int MaxEmptySledCache { get; set; } = 30;
        /// <summary>
        /// æ˜¯å¦å¯ç”¨
        /// </summary>
        [SugarColumn(ColumnName = "IsActive")]
        public int IsActive { get; set; } = 1;
    }
}
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/MESService.cs
@@ -31,8 +31,9 @@
        private readonly IUnitOfWorkManage _unitOfWorkManage;
        private readonly IDt_CarBodyRepository _carBodyRepository;
        private readonly IDt_AssemblyOrderInfoRepository _assemblyOrderInfoRepository;
       private readonly IDt_PaintingOrderInfoRepository _paintingOrderInfoRepository;
        public MESService(ILocationInfoRepository locationRepository, IDt_TaskRepository taskRepository, ISys_ConfigService configService, IDt_StationManagerRepository stationManagerRepository, IDt_AreaInfoRepository dt_AreaInfoRepository, IDt_PalletInfoRepository palletInfoRepository, IDt_PalletStockInfoRepository palletStockInfoRepository, IDt_OutOrderRepository OutOrderRepository, IUnitOfWorkManage unitOfWorkManage, IDt_CarBodyRepository carBodyRepository, IDt_AssemblyOrderInfoRepository assemblyOrderInfoRepository)
        public MESService(ILocationInfoRepository locationRepository, IDt_TaskRepository taskRepository, ISys_ConfigService configService, IDt_StationManagerRepository stationManagerRepository, IDt_AreaInfoRepository dt_AreaInfoRepository, IDt_PalletInfoRepository palletInfoRepository, IDt_PalletStockInfoRepository palletStockInfoRepository, IDt_OutOrderRepository OutOrderRepository, IUnitOfWorkManage unitOfWorkManage, IDt_CarBodyRepository carBodyRepository, IDt_AssemblyOrderInfoRepository assemblyOrderInfoRepository, IDt_PaintingOrderInfoRepository paintingOrderInfoRepository)
        {
            _locationRepository = locationRepository;
            _taskRepository = taskRepository;
@@ -45,6 +46,7 @@
            _unitOfWorkManage = unitOfWorkManage;
            _carBodyRepository = carBodyRepository;
            _assemblyOrderInfoRepository = assemblyOrderInfoRepository;
            _paintingOrderInfoRepository = paintingOrderInfoRepository;
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/PassPoint.cs
@@ -6,19 +6,16 @@
namespace WIDESEA_StoragIntegrationServices
{
    /// <summary>
    /// è½¦èº«è¿‡ç‚¹è¯·æ±‚
    /// </summary>
    public partial class MESService
    {
        public WebResponseContent PassPoint(string stationCode)
        public WebResponseContent PassPoint(string stationCode, string rfid)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_MESIPAddress);
                var wmsBase = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.MESIPAddress)?.ConfigValue;
                var ipAddress = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.PassPoint)?.ConfigValue;
                var ipAddress = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.AVIPASS)?.ConfigValue;
                if (wmsBase == null || ipAddress == null)
                {
                    throw new InvalidOperationException("WMS IP æœªé…ç½®");
@@ -32,8 +29,8 @@
                    union_key = Guid.NewGuid().ToString(),
                    line_code = stationInfo.stationChildCode,
                    message_time = DateTime.Now,
                    plant_code = "",
                    pvi = "",
                    plant_code = "1052",
                    pvi = rfid,
                    station_code = stationInfo.stationChildCode,
                    vin = "",
                    pass_time = DateTime.Now
@@ -47,6 +44,9 @@
                    throw new Exception($"车身过点异常:{responseContent.Message}");
                }
                LogFactory.GetLog("车身过点").Info(true, $"\r\r--------------------------------------");
                LogFactory.GetLog("车身过点").Info(true, $"工位号:{stationCode},RFID:{rfid}");
                return content;
            }
            catch (Exception ex)
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/bindWorkOrder.cs
@@ -19,7 +19,7 @@
    /// </summary>
    public partial class MESService
    {
        public WebResponseContent bindWorkOrder(string stationCode)
        public WebResponseContent bindWorkOrder(string stationNo, string rfid)
        {
            WebResponseContent content = new WebResponseContent();
            try
@@ -33,7 +33,7 @@
                }
                var wmsIpAddress = wmsBase + ipAddress;
                var stationInfo = _stationManagerRepository.QueryFirst(x => x.stationChildCode == stationCode);
                var stationInfo = _stationManagerRepository.QueryFirst(x => x.stationChildCode == stationNo);
                BindWorkOrder passPoint = new BindWorkOrder()
                {
@@ -41,7 +41,7 @@
                    stationCode = stationInfo.stationChildCode,
                    messageTime = DateTime.Now.ToString(),
                    plantCode = "1022",
                    pvi = "",
                    pvi = rfid,
                    workOrderNo = "",
                    workOrderType = "",
                    workshopCode = ""
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/getCharacteristic.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,73 @@
using Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IdentityModel.Tokens.Jwt;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common;
using WIDESEA_Common.MES;
using WIDESEA_Common.MES.Request;
using WIDESEA_Core;
using WIDESEA_Core.Const;
using WIDESEA_Core.Helper;
using WIDESEA_Model.Models;
namespace WIDESEA_StoragIntegrationServices
{
    /// <summary>
    /// BDC向MES请求车辆特征信息
    /// æŽ¥å£æè¿°: BDC在PBS01前一个工位通过(PVI+白车身后4位)向MES请求VIN+车辆特征信息写入tag
    /// </summary>
    public partial class MESService
    {
        /// <summary>
        ///  BDC请求车辆特征信息
        /// </summary>
        /// <param name="rfidPrint">RFID</param>
        /// <param name="stationNo">站台请求点位</param>
        /// <returns></returns>
        public WebResponseContent getCharacteristic(string rfidPrint, string stationNo)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                CarCharacteristicInfo characterInfo = new CarCharacteristicInfo()
                {
                    plantCode = "1052",
                    rfidPrint = rfidPrint,
                    vin = vin,
                    messageTime = DateTime.Now.ToString(),
                    unionKey = Guid.NewGuid().ToString(),
                };
                var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_MESIPAddress);
                var wmsBase = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.MESIPAddress)?.ConfigValue;
                var ipAddress = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.getCharacteristic)?.ConfigValue;
                if (wmsBase == null || ipAddress == null)
                {
                    throw new InvalidOperationException("WMS IP æœªé…ç½®");
                }
                var wmsIpAddress = wmsBase + ipAddress;
                var MESrespon = HttpHelper.Post(wmsIpAddress, characterInfo.ToJson());
                GetCarCharacteristicInfo characterRespon = JsonConvert.DeserializeObject<GetCarCharacteristicInfo>(MESrespon);
                if (!characterRespon.success)
                {
                    throw new Exception($"{characterRespon}");
                }
                LogFactory.GetLog("BDC请求车辆特征信息").Info(true, $"\r\r--------------------------------------");
                LogFactory.GetLog("BDC请求车辆特征信息").Info(true, $"工位号:{stationNo},RFID:{rfidPrint}");
                return content;
            }
            catch (Exception ex)
            {
                return content.Error($"BDC请求车辆特征信息::{ex.Message}");
            }
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/issuedCharacter.cs
@@ -21,13 +21,7 @@
    /// </summary>
    public partial class MESService
    {
        /// <summary>
        ///  BDC请求焊装特征信息
        /// </summary>
        /// <param name="rfidPrint">RFID</param>
        /// <param name="vin">VIN号</param>
        /// <param name="stationNo">站台请求点位</param>
        /// <returns></returns>
        public WebResponseContent issuedCharacter(string rfidPrint, string vin, string stationNo)
        {
            WebResponseContent content = new WebResponseContent();
@@ -35,7 +29,7 @@
            {
                IssuedCharacterInfo characterInfo = new IssuedCharacterInfo()
                {
                    plantCode = "1022",
                    plantCode = "1052",
                    rfidPrint = rfidPrint,
                    vin = vin,
                    messageTime = DateTime.Now
@@ -70,10 +64,16 @@
                };
                _carBodyRepository.AddData(CarBody);
                LogFactory.GetLog("请求焊装特征信息").Info(true, $"\r\r--------------------------------------");
                LogFactory.GetLog("请求焊装特征信息").Info(true, $"工位号:{stationNo},RFID:{rfidPrint}");
                return content;
            }
            catch (Exception ex)
            {
                LogFactory.GetLog("请求焊装特征信息").Info(true, $"请求焊装特征信息异常::{ex.Message}");
                return content.Error($"请求焊装特征信息异常::{ex.Message}");
            }
        }
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/preBind.cs
@@ -15,9 +15,7 @@
namespace WIDESEA_StoragIntegrationServices
{
    /// <summary>
    /// é¢„绑定
    /// </summary>
    public partial class MESService
    {
        public WebResponseContent prebind(object json)
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/pushOrderInfo.cs
@@ -18,9 +18,7 @@
namespace WIDESEA_StoragIntegrationServices
{
    /// <summary>
    /// æ€»è£…工单信息
    /// </summary>
    public partial class MESService
    {
        public WebResponseContent pushOrderInfo(object json)
@@ -132,6 +130,9 @@
                _unitOfWorkManage.CommitTran();
                responseContent.OK();
                LogFactory.GetLog("总装工单信息").Info(true, $"\r\r--------------------------------------");
                LogFactory.GetLog("总装工单信息").Info(true, json.ToJsonString());
            }
            catch (Exception ex)
            {
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_StoragIntegrationServices/MES/Partial/pushWorkOrderInfo.cs
@@ -16,16 +16,13 @@
using WIDESEA_DTO.WMS;
using WIDESEA_Model.Models;
using WIDESEA_StorageBasicRepository;
using WIDESEA_StorageOutOrderRepository;
namespace WIDESEA_StoragIntegrationServices
{
    public partial class MESService
    {
        /// <summary>
        /// æ¶‚装工单信息
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public WebResponseContent pushWorkOrderInfo(object json)
        {
            WebResponseContent content = new WebResponseContent();
@@ -35,11 +32,34 @@
                var result = JsonConvert.DeserializeObject<pushWorkOrderInfo>(json.ToString());
                var palletStockInfos = _palletStockInfoRepository.QueryData(x => x.OrderID == result.workOrderNo);
                var paintingOrderInfos = new List<Dt_PaintingOrderInfo>();
                foreach (var item in result.list)
                {
                    Dt_PaintingOrderInfo paintingOrderInfo = new Dt_PaintingOrderInfo()
                    {
                        biwMaterial = item.biwMaterial,
                        carBodyCharacteristic = item.carBodyCharacteristic,
                        config1 = item.config1,
                        config3 = item.config3,
                        CreateDate = DateTime.Now,
                        Creater = "System",
                        pbMaterial = item.pbMaterial,
                        plantCode = item.plantCode,
                        pvi = item.pvi,
                        sequenceNo = item.sequenceNo,
                        skylightCharacteristic = item.skylightCharacteristic,
                        twoToneCharacteristic = item.twoToneCharacteristic,
                        vehicleCharacteristic = item.vehicleCharacteristic,
                        workOrderNo = item.workOrderNo,
                        workOrderSendStatus = item.workOrderSendStatus,
                        splitStrategy = item.splitStrategy,
                        workOrderType = item.workOrderType,
                        workshopCode = item.workshopCode,
                    };
                    paintingOrderInfos.Add(paintingOrderInfo);
                }
                _paintingOrderInfoRepository.AddData(paintingOrderInfos);
                LogFactory.GetLog("涂装工单信息").Info(true, $"\r\r--------------------------------------");
                LogFactory.GetLog("涂装工单信息").Info(true, result.ToJsonString());
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_StorageBasicServices/BasicInfo/Dt_BDCConfigurationService.cs
@@ -50,8 +50,8 @@
                MaxPaintedBodyCache = maxPaintedBody,
                MaxBatteryCaseCache = maxBatteryCase,
                MaxEmptySledCache = maxEmptySled,
                LastUpdatedTime = DateTime.Now,
                UpdatedBy = App.User.UserName,
                CreateDate = DateTime.Now,
                Creater = App.User.UserName,
                IsActive = 1
            };
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_StorageTaskServices/BDCManager/BDCManager.cs
@@ -4,6 +4,7 @@
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_IStoragIntegrationServices;
using WIDESEAWCS_BasicInfoRepository;
using WIDESEAWCS_BasicInfoService;
@@ -17,14 +18,16 @@
        private readonly ILocationInfoRepository _locationRepository;
        private readonly IDt_RoadWayInfoRepository _roadWayInfoRepository;
        private readonly IDt_RoadWayRepository _roadWayRepository;
        private readonly IMESService _mesService;
        // æ›´æ–°æž„造函数
        public BDCManager(IDt_BDCConfigurationService BDCConfigurationService, ILocationInfoRepository locationInfoRepository, IDt_RoadWayInfoRepository roadWayInfoRepository )
        public BDCManager(IDt_BDCConfigurationService BDCConfigurationService, ILocationInfoRepository locationInfoRepository, IDt_RoadWayInfoRepository roadWayInfoRepository, IMESService mesService)
        {
            _BDCConfigurationService = BDCConfigurationService;
            _locationRepository = locationInfoRepository;
            _roadWayInfoRepository = roadWayInfoRepository;
            _mesService = mesService;
        }
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
@@ -45,9 +45,9 @@
            var carBody = _carBodyRepository.QueryFirst(x => x.PalletCode == input.PalletCode);
            BDCManager bDCManager = new BDCManager(_bdcConfigurationService, _locationRepository, _roadWayInfoRepository);
            //BDCManager bDCManager = new BDCManager(_bdcConfigurationService, _locationRepository, _roadWayInfoRepository);
            await bDCManager.AddToBDC(carBody);
            //await bDCManager.AddToBDC(carBody);
            // èŽ·å–åº“ä½
            var location = RequestLocation(stationInfo.Roadway);
@@ -96,10 +96,11 @@
    #endregion è¯·æ±‚任务入库
    #region åº“位分配
    #region èŽ·å–è´§ä½
    object objLOCK = new object();
    /// <summary>
    /// åŒå‡åº“位分配
    /// åº“位分配
    /// </summary>
    /// <param name="requestTask"></param>
    /// <param name="locationInfos"></param>
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_WMSServer/Controllers/MES/MESController.cs
@@ -7,7 +7,7 @@
namespace WIDESEA_WMSServer.Controllers;
[Route("api/[controller]")]
[Route("api/BDC")]
[ApiController]
public class MESController : Controller
{
@@ -26,9 +26,9 @@
    /// <param name="stationCode"></param>
    /// <returns></returns>
    [HttpPost, Route("PassPoint"), AllowAnonymous]
    public WebResponseContent PassPoint(string stationCode)
    public WebResponseContent PassPoint(string stationCode,string rfid)
    {
        return _MESService.PassPoint(stationCode);
        return _MESService.PassPoint(stationCode, rfid);
    }
    /// <summary>
@@ -63,4 +63,15 @@
    {
        return _MESService.issuedCharacter(carCode, vin, station);
    }
    /// <summary>
    /// è½¦èº«è¿‡ç‚¹
    /// </summary>
    /// <param name="stationCode"></param>
    /// <returns></returns>
    [HttpPost, Route("PassPoint"), AllowAnonymous]
    public WebResponseContent PassPoint(string stationCode, string rfid)
    {
        return _MESService.(stationCode, rfid);
    }
}
ÏîÄ¿´úÂë/WMS/WMSServer/WIDESEA_WMSServer/Controllers/TaskController.cs
@@ -88,4 +88,16 @@
    {
        return Service.CreateAndSendOutboundTask(saveModel);
    }
    /// <summary>
    /// ä»»åŠ¡çŠ¶æ€ä¿®æ”¹
    /// </summary>
    /// <param name="input">请求数据</param>
    /// <returns></returns>
    //[HttpPost, AllowAnonymous, Route("UpdateTaskStatus")]
    ////[TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5秒节流
    //public async Task<WebResponseContent> UpdateTaskStatus([FromBody] UpdateStatusDto input)
    //{
    //    return await Service.UpdateTaskStatus(input.TaskNum, input.TaskState);
    //}
}