1
huanghongfeng
2025-10-22 0cbe01e1241f9af562d86dc79b5f0949ada81dba
´úÂë¹ÜÀí/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/RgvOperationService.cs
@@ -91,6 +91,41 @@
            return webResponse.OK();
        }
        public WebResponseContent WriteRGVmokuai(SaveModel saveModel)
        {
            WebResponseContent webResponse = new WebResponseContent();
            string DeviceName = saveModel.DelKeys[0].ToString();    //工作类型
            string DBType = saveModel.DelKeys[1].ToString();    //设备名称
            short WriteRGVvalue = short.Parse(saveModel.DelKeys[2].ToString());    //写入值
            IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == DeviceName);
            SpeStackerCrane Commonstacker = (SpeStackerCrane)device;
            switch (DBType)
            {
                case "1":  // å·¥ä½œæ¨¡å¼ï¼ˆ0手动、1自动)
                           //获取实例
                    DeviceProDTO? RGV_DWorkingmode = GetRGVDeviceProDTO(Commonstacker, DeviceName, "RGV_DWorkingmode", "DeviceCommand");        //任务类型
                      //第一步写入任务
                    RgvSetLine(Commonstacker, RGV_DWorkingmode.DeviceProAddress, WriteRGVvalue);
                    break;
                case "2":   //复位操作(0不复位、1复位)
                    DeviceProDTO? RGV_Resetoperation = GetRGVDeviceProDTO(Commonstacker, DeviceName, "RGV_Resetoperation", "DeviceCommand");        //任务类型
                                                                                                                                                //第一步写入任务
                    RgvSetLine(Commonstacker, RGV_Resetoperation.DeviceProAddress, WriteRGVvalue);
                    break;
                case "3":   //任务确认完成(0不确定,1确定)
                    DeviceProDTO? RGV_taskcomplete = GetRGVDeviceProDTO(Commonstacker, DeviceName, "RGV_taskcomplete", "RGV_taskcomplete");        //任务类型
                                                                                                                                                //第一步写入任务
                    RgvSetLine(Commonstacker, RGV_taskcomplete.DeviceProAddress, WriteRGVvalue);
                    break;
                case "4":   //任务类型(4清除)
                    DeviceProDTO? RGV_RGVtasktypet = GetRGVDeviceProDTO(Commonstacker, DeviceName, "RGV_RGVtasktypet", "DeviceCommand");        //任务类型
                                                                                                                                                //第一步写入任务
                    RgvSetLine(Commonstacker, RGV_RGVtasktypet.DeviceProAddress, WriteRGVvalue);
                    break;
            }
            return webResponse.OK();
        }
        /// <summary>
        /// æ‰‹åŠ¨ç§»åŠ¨RGV
        /// </summary>