1
Admin
2025-11-25 627bfedc5739855b6d2e829a115c3b64134ef868
´úÂë¹ÜÀí/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -52,13 +52,13 @@
                        if (Stations.Station_material == (int)RGVEquipment.AQMexit)
                        {
                            bool Security = SecurityDoorEquipment(conveyorLine, Stations);
                            bool Security = SecurityDoorEquipment(conveyorLine, Stations);  //安全门
                            if (Security) continue;
                        }
                        else
                        {
                            bool HCJPlat=PlatformEquipmentInformation(conveyorLine, Stations);
                            bool HCJPlat=PlatformEquipmentInformation(conveyorLine, Stations);  //异常站台,出库站台
                            if (HCJPlat) continue;
                        }
                        
@@ -76,12 +76,15 @@
        //处理安全门的逻辑
        private void HandleDoorRequest(AQMReturnnormal aQMConveyor, AGVStation aGVStation,int tasktype)  //1:入库  2:出库
        {
            if (_gvOperationService.AQMReadAlarminform(tasktype) && _equipmentStatusService.GetSCstatus())
            /*bool RGValarm = _gvOperationService.AQMReadAlarminform(tasktype);
            bool SCstatus = _equipmentStatusService.GetSCstatus();
           if (RGValarm || SCstatus)
            {
                //写入报警
                GetDeviceAddress.WriteSecurityDoorpolice(aGVStation.ChildPosiDeviceCode, "AlarmSummary", 1);
                _gvOperationService.WriteOutbuttonpause(null);
            }
                bool RGVRGV_DWorkingmode = tasktype == 1 ? _gvOperationService.InWriteOutbuttonpause(null).Status : _gvOperationService.WriteOutbuttonpause(null).Status;
            }*/
            if (aQMConveyor.DoorRequest == 1 && aQMConveyor.IndicatorStatus == (int)SafetyDoorStatus.YellowBlink2Hz)
            {
@@ -134,12 +137,12 @@
                    // æ ¹æ®ä»»åŠ¡ç±»åž‹é€‰æ‹©å¤„ç†ç­–ç•¥
                    if (Stations.Station_tasktype == (int)RGVTasktype.Outbound)
                    {
                        if (aQMConveyor.EmergencyStopStatus == 0) _gvOperationService.WriteOutbuttonpause(null);
                        if (aQMConveyor.EmergencyStopStatus == 0 || aQMConveyor.SafetyLockStatus==0) _gvOperationService.WriteOutbuttonpause(null);
                        HandleDoorRequest(aQMConveyor, Stations, 2);
                    }
                    else
                    {
                        if (aQMConveyor.EmergencyStopStatus == 0) _gvOperationService.InWriteOutbuttonpause(null);
                        if (aQMConveyor.EmergencyStopStatus == 0 || aQMConveyor.SafetyLockStatus == 0) _gvOperationService.InWriteOutbuttonpause(null);
                        HandleDoorRequest(aQMConveyor, Stations, 1);
                    }
                }
@@ -157,26 +160,22 @@
        {
            try
            {
                PlatformStatus aQMConveyor = StoticCommand(conveyorLine, Stations.ChildPosiDeviceCode);
                if (aQMConveyor != null)
                if (StoticCommand(conveyorLine, Stations.HCJStorageaddress.ToString()))    //可进行放货
                {
                    if (aQMConveyor.HCJ_GoodsStatus == 0)    //可进行放货
                    WebResponseContent webResponseContent = new WebResponseContent();
                    //根据类型查找任务
                    if (Stations.Station_material == (int)RGVEquipment.AbnormalOutbound)
                    {
                        WebResponseContent webResponseContent = new WebResponseContent();
                        //根据类型查找任务
                        if (Stations.Station_material == (int)RGVEquipment.AbnormalOutbound)
                        {
                            //查找是否有异常搬运任务
                            webResponseContent = _taskService.UpdateDeliveryAddress(Stations.HCJStorageaddress.ToString(), 1);   //还需要传入地址
                        }
                        else
                        {
                            //出库站台的任务
                            webResponseContent = _taskService.UpdateDeliveryAddress(Stations.HCJStorageaddress.ToString(), 2);
                        }
                        //查找是否有异常搬运任务
                        webResponseContent = _taskService.UpdateDeliveryAddress(Stations.HCJStorageaddress.ToString(), 1);   //还需要传入地址
                    }
                    else
                    {
                        //出库站台的任务
                        webResponseContent = _taskService.UpdateDeliveryAddress(Stations.HCJStorageaddress.ToString(), 2);
                    }
                }
                return false;
            }
            catch (Exception ex)
@@ -228,29 +227,16 @@
        }
        //站台信号
        public PlatformStatus StoticCommand(CommonConveyorLine conveyorLine, string kladder)
        public bool StoticCommand(CommonConveyorLine conveyorLine, string kladder)
        {
            PlatformStatus conveyorRgvCommand = new PlatformStatus();
            List<DeviceProDTO> deviceProDTO6 = conveyorLine.DeviceProDTOs
                .Where(x => x.DeviceChildCode == kladder
                            && x.DeviceProParamName== "HCJ_GoodsStatus"
                            && x.DeviceProParamType == "ReadDeviceCommand")
                .ToList();
            foreach (var item in deviceProDTO6)
            {
                var paramName = item.DeviceProParamName;
                var propertyInfo = typeof(PlatformStatus).GetProperty(paramName);
            DeviceProDTO? deviceProDTO6 = conveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == kladder
                            && x.DeviceProParamName == "HCJ_GoodsStatus"
                            && x.DeviceProParamType == "ReadDeviceCommand");
            if(deviceProDTO6 == null) { return false; }
                if (propertyInfo != null)
                {
                    if (item.DeviceDataType == "short")
                    {
                        var value = conveyorLine.Communicator.Read<short>(item.DeviceProAddress);
                        propertyInfo.SetValue(conveyorRgvCommand, value);
                    }
                }
            }
            return conveyorRgvCommand;
            var value = conveyorLine.Communicator.Read<short>(deviceProDTO6.DeviceProAddress);
            if (value == 0) {  return true; }
            return false;
        }