فهرست منبع

feat(d2-02-t3): control/operate C# DBEntity+ConvertHelper同步范围列(逐字段手映射防丢)

control端承载链全覆盖范围列(对齐既有focus列做法):
- DTO1 SqlSugar服务器实体: house_well_setting(horizontal/vertical_focus_range), tl_setting(focus_h/v_range_default+focus_exposure_min/max)
- ApiResultDTO/Global运行时/DB本地缓存 三类各加范围属性(驼峰对齐Java侧)
- ConvertHelper 6段逐字段映射全补(TLSetting 3段+HouseWellSetting 3段; DTO->运行态/缓存->运行态/运行态->缓存)
operate端 DebugEntitys/TLSetting+HouseWellSetting 加范围字段声明(对齐focus列;operate ConvertHelper不映射对焦列故不动)
Release编译: control.sln 0错误, operate ivf_tl_Entity 0错误

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
huangjie 2 روز پیش
والد
کامیت
500f4765f7

+ 19 - 0
ivf_tl_operate_2.0/control/ivf_tl_Entity/DBEntitys/HouseWellSettingDB.cs

@@ -99,5 +99,24 @@ namespace IvfTl.Control.Entity.DBEntitys
            [SugarColumn(IsNullable = true)]
            public int? focusLayerCount {get;set;}
 
+           // ────────────────────────────────────────────────────────────────
+           // 自动对焦重构:well 级搜索半幅覆盖本地缓存列(对齐运行时 HouseWellSetting + sql 迁移
+           //   house_well_setting.horizontal_focus_range / vertical_focus_range;空=继承设备级)。
+           // ────────────────────────────────────────────────────────────────
+
+           /// <summary>
+           /// Desc:well级水平搜索半幅覆盖(空=继承设备级) horizontal_focus_range
+           /// Nullable:True
+           /// </summary>
+           [SugarColumn(IsNullable = true)]
+           public int? horizontalFocusRange {get;set;}
+
+           /// <summary>
+           /// Desc:well级垂直搜索半幅覆盖(空=继承设备级) vertical_focus_range
+           /// Nullable:True
+           /// </summary>
+           [SugarColumn(IsNullable = true)]
+           public int? verticalFocusRange {get;set;}
+
     }
 }

+ 33 - 0
ivf_tl_operate_2.0/control/ivf_tl_Entity/DBEntitys/TLSettingDB.cs

@@ -404,5 +404,38 @@ namespace IvfTl.Control.Entity.DBEntitys
         [SugarColumn(IsNullable = true)]
         public decimal? focusPeakRatioThreshold { get; set; }
 
+        // ────────────────────────────────────────────────────────────────
+        // 自动对焦重构:设备级搜索半幅默认 + 对焦曝光二分上下限本地缓存列(对齐运行时 TLSetting + sql 迁移
+        //   tl_setting.focus_h_range_default / focus_v_range_default / focus_exposure_min / focus_exposure_max)。
+        // ────────────────────────────────────────────────────────────────
+
+        /// <summary>
+        /// Desc:水平半幅设备级默认(well级留空时用) focus_h_range_default
+        /// Nullable:True
+        /// </summary>
+        [SugarColumn(IsNullable = true)]
+        public int? focusHRangeDefault { get; set; }
+
+        /// <summary>
+        /// Desc:垂直半幅设备级默认 focus_v_range_default
+        /// Nullable:True
+        /// </summary>
+        [SugarColumn(IsNullable = true)]
+        public int? focusVRangeDefault { get; set; }
+
+        /// <summary>
+        /// Desc:对焦曝光二分下限(沿用引擎现值,默认10) focus_exposure_min
+        /// Nullable:True
+        /// </summary>
+        [SugarColumn(IsNullable = true)]
+        public int? focusExposureMin { get; set; }
+
+        /// <summary>
+        /// Desc:对焦曝光二分上限(沿用引擎现值,默认800) focus_exposure_max
+        /// Nullable:True
+        /// </summary>
+        [SugarColumn(IsNullable = true)]
+        public int? focusExposureMax { get; set; }
+
     }
 }

+ 12 - 0
ivf_tl_operate_2.0/control/ivf_tl_Entity/DTO/ApiResultDTO/houseWellSettingDTO.cs

@@ -83,5 +83,17 @@ namespace IvfTl.Control.Entity.DTO.ApiResultDTO
         /// well级层数覆盖(空=继承设备级) focus_layer_count
         /// </summary>
         public int? focusLayerCount { get; set; }
+
+        // ──── 自动对焦重构:well 级搜索半幅覆盖(空=继承 tl_setting 设备级默认,服务器 init JSON 下发) ────
+
+        /// <summary>
+        /// well级水平搜索半幅覆盖(围绕horizontalMotorPosition;空=继承设备级) horizontal_focus_range
+        /// </summary>
+        public int? horizontalFocusRange { get; set; }
+
+        /// <summary>
+        /// well级垂直搜索半幅覆盖(围绕eepromClearPosition;空=继承设备级) vertical_focus_range
+        /// </summary>
+        public int? verticalFocusRange { get; set; }
     }
 }

+ 22 - 0
ivf_tl_operate_2.0/control/ivf_tl_Entity/DTO/ApiResultDTO/tlSettingDTO.cs

@@ -284,5 +284,27 @@ namespace IvfTl.Control.Entity.DTO.ApiResultDTO
         /// 场景B本地自动对焦安全门:0关闭(默认安全) 1启用 local_autofocus_enabled
         /// </summary>
         public int? localAutofocusEnabled { get; set; }
+
+        // ──── 自动对焦重构:设备级搜索半幅默认 + 对焦曝光二分上下限(服务器 init JSON 下发) ────
+
+        /// <summary>
+        /// 水平半幅设备级默认(well级留空时用) focus_h_range_default
+        /// </summary>
+        public int? focusHRangeDefault { get; set; }
+
+        /// <summary>
+        /// 垂直半幅设备级默认 focus_v_range_default
+        /// </summary>
+        public int? focusVRangeDefault { get; set; }
+
+        /// <summary>
+        /// 对焦曝光二分下限(沿用引擎现值,默认10) focus_exposure_min
+        /// </summary>
+        public int? focusExposureMin { get; set; }
+
+        /// <summary>
+        /// 对焦曝光二分上限(沿用引擎现值,默认800) focus_exposure_max
+        /// </summary>
+        public int? focusExposureMax { get; set; }
     }
 }

+ 17 - 1
ivf_tl_operate_2.0/control/ivf_tl_Entity/DTO1/house_well_setting.cs

@@ -90,9 +90,25 @@ namespace DBEntity
            /// Desc:E方清晰位置
            /// Default:
            /// Nullable:False
-           /// </summary>           
+           /// </summary>
            public int eeprom_clear_position {get;set;}
 
+           /// <summary>
+           /// Desc:well级水平搜索半幅(围绕horizontal_motor_position;空=继承tl_setting.focus_h_range_default) horizontal_focus_range
+           /// Default:
+           /// Nullable:True
+           /// </summary>
+           [SugarColumn(IsNullable = true)]
+           public int? horizontal_focus_range {get;set;}
+
+           /// <summary>
+           /// Desc:well级垂直搜索半幅(围绕eeprom_clear_position;空=继承tl_setting.focus_v_range_default) vertical_focus_range
+           /// Default:
+           /// Nullable:True
+           /// </summary>
+           [SugarColumn(IsNullable = true)]
+           public int? vertical_focus_range {get;set;}
+
            /// <summary>
            /// Desc:创建人
            /// Default:

+ 31 - 1
ivf_tl_operate_2.0/control/ivf_tl_Entity/DTO1/tl_setting.cs

@@ -293,9 +293,39 @@ namespace DBEntity
            /// Desc:温压显示阈值 / (默认0.5)
            /// Default:
            /// Nullable:False
-           /// </summary>           
+           /// </summary>
            public decimal chart_threshold {get;set;}
 
+           /// <summary>
+           /// Desc:水平半幅设备级默认(well级留空时用) focus_h_range_default
+           /// Default:
+           /// Nullable:True
+           /// </summary>
+           [SugarColumn(IsNullable = true)]
+           public int? focus_h_range_default {get;set;}
+
+           /// <summary>
+           /// Desc:垂直半幅设备级默认 focus_v_range_default
+           /// Default:
+           /// Nullable:True
+           /// </summary>
+           [SugarColumn(IsNullable = true)]
+           public int? focus_v_range_default {get;set;}
+
+           /// <summary>
+           /// Desc:对焦曝光二分下限(沿用引擎现值,默认10) focus_exposure_min
+           /// Default:10
+           /// Nullable:False
+           /// </summary>
+           public int focus_exposure_min {get;set;}
+
+           /// <summary>
+           /// Desc:对焦曝光二分上限(沿用引擎现值,默认800) focus_exposure_max
+           /// Default:800
+           /// Nullable:False
+           /// </summary>
+           public int focus_exposure_max {get;set;}
+
            /// <summary>
            /// Desc:创建人
            /// Default:

+ 20 - 0
ivf_tl_operate_2.0/control/ivf_tl_Entity/GlobalEntitys/HouseWellSetting.cs

@@ -83,5 +83,25 @@ namespace IvfTl.Control.Entity.GlobalEntitys
         /// Nullable:True
         /// </summary>
         public int? focusLayerCount { get; set; }
+
+        // ────────────────────────────────────────────────────────────────
+        // 自动对焦重构:well 级搜索半幅覆盖(house_well_setting 扩列;空=继承 tl_setting 设备级默认)。
+        //   水平半幅围绕 horizontalMotorPosition,垂直半幅围绕 eepromClearPosition。
+        //   取数链同 focusLayer*:服务器 init JSON / 本地缓存 ConvertHelper 双向回填。
+        // ────────────────────────────────────────────────────────────────
+
+        /// <summary>
+        /// Desc:well级水平搜索半幅覆盖(空=继承设备级) horizontal_focus_range
+        /// Default: NULL
+        /// Nullable:True
+        /// </summary>
+        public int? horizontalFocusRange { get; set; }
+
+        /// <summary>
+        /// Desc:well级垂直搜索半幅覆盖(空=继承设备级) vertical_focus_range
+        /// Default: NULL
+        /// Nullable:True
+        /// </summary>
+        public int? verticalFocusRange { get; set; }
     }
 }

+ 34 - 0
ivf_tl_operate_2.0/control/ivf_tl_Entity/GlobalEntitys/TLSetting.cs

@@ -399,5 +399,39 @@ namespace IvfTl.Control.Entity.GlobalEntitys
         /// Nullable:False
         /// </summary>
         public int localAutofocusEnabled { get; set; }
+
+        // ────────────────────────────────────────────────────────────────
+        // 自动对焦重构:设备级搜索半幅默认 + 对焦曝光二分上下限(tl_setting 扩列)。
+        //   半幅默认:well 级留空时回退用(空=不强制半幅);曝光 min/max:对焦曝光二分(SQL 默认10/800)。
+        //   取数链同 focusLayer*:服务器 init JSON / 本地缓存 ConvertHelper 双向回填。
+        // ────────────────────────────────────────────────────────────────
+
+        /// <summary>
+        /// Desc:水平半幅设备级默认(well级留空时用) focus_h_range_default
+        /// Default: NULL
+        /// Nullable:True
+        /// </summary>
+        public int? focusHRangeDefault { get; set; }
+
+        /// <summary>
+        /// Desc:垂直半幅设备级默认 focus_v_range_default
+        /// Default: NULL
+        /// Nullable:True
+        /// </summary>
+        public int? focusVRangeDefault { get; set; }
+
+        /// <summary>
+        /// Desc:对焦曝光二分下限(沿用引擎现值,默认10) focus_exposure_min
+        /// Default: 10
+        /// Nullable:True
+        /// </summary>
+        public int? focusExposureMin { get; set; }
+
+        /// <summary>
+        /// Desc:对焦曝光二分上限(沿用引擎现值,默认800) focus_exposure_max
+        /// Default: 800
+        /// Nullable:True
+        /// </summary>
+        public int? focusExposureMax { get; set; }
     }
 }

+ 27 - 0
ivf_tl_operate_2.0/control/ivf_tl_UtilHelper/ConvertHelper.cs

@@ -85,6 +85,12 @@ namespace ivf_tl_UtilHelper
             TLSetting.focusLayerDown = tlSetting.focusLayerDown;
             TLSetting.focusPeakRatioThreshold = tlSetting.focusPeakRatioThreshold;
 
+            // 自动对焦重构:设备级搜索半幅默认 + 对焦曝光二分上下限 服务器下发 → 运行态。
+            TLSetting.focusHRangeDefault = tlSetting.focusHRangeDefault;
+            TLSetting.focusVRangeDefault = tlSetting.focusVRangeDefault;
+            TLSetting.focusExposureMin = tlSetting.focusExposureMin;
+            TLSetting.focusExposureMax = tlSetting.focusExposureMax;
+
             return TLSetting;
         }
 
@@ -156,6 +162,12 @@ namespace ivf_tl_UtilHelper
             TLSetting.focusLayerDown = tLSettingDB.focusLayerDown;
             TLSetting.focusPeakRatioThreshold = tLSettingDB.focusPeakRatioThreshold;
 
+            // 自动对焦重构:设备级搜索半幅默认 + 对焦曝光二分上下限 本地缓存 → 运行时。
+            TLSetting.focusHRangeDefault = tLSettingDB.focusHRangeDefault;
+            TLSetting.focusVRangeDefault = tLSettingDB.focusVRangeDefault;
+            TLSetting.focusExposureMin = tLSettingDB.focusExposureMin;
+            TLSetting.focusExposureMax = tLSettingDB.focusExposureMax;
+
             TLSetting.saveSourcePic = TLSetting.saveSourcePic;
 
             if (tLSettingDB.compositeVideo == 1)
@@ -236,6 +248,12 @@ namespace ivf_tl_UtilHelper
             tLSettingDB.focusLayerDown = tLSetting.focusLayerDown;
             tLSettingDB.focusPeakRatioThreshold = tLSetting.focusPeakRatioThreshold;
 
+            // 自动对焦重构:设备级搜索半幅默认 + 对焦曝光二分上下限 运行时 → 本地缓存,跨重启保留。
+            tLSettingDB.focusHRangeDefault = tLSetting.focusHRangeDefault;
+            tLSettingDB.focusVRangeDefault = tLSetting.focusVRangeDefault;
+            tLSettingDB.focusExposureMin = tLSetting.focusExposureMin;
+            tLSettingDB.focusExposureMax = tLSetting.focusExposureMax;
+
             tLSettingDB.saveSourcePic = tLSetting.saveSourcePic;
 
             if (tLSetting.buildVideo)
@@ -353,6 +371,9 @@ namespace ivf_tl_UtilHelper
             // V-047 对焦配置下发链:well 级覆盖 服务器 init JSON → DTO → 运行态(空=继承设备级)。
             houseWellSetting.focusLayerSpacingPulse = houseWellSettingDTO.focusLayerSpacingPulse;
             houseWellSetting.focusLayerCount = houseWellSettingDTO.focusLayerCount;
+            // 自动对焦重构:well 级搜索半幅覆盖 服务器下发 → 运行态(空=继承设备级)。
+            houseWellSetting.horizontalFocusRange = houseWellSettingDTO.horizontalFocusRange;
+            houseWellSetting.verticalFocusRange = houseWellSettingDTO.verticalFocusRange;
             return houseWellSetting;
         }
 
@@ -371,6 +392,9 @@ namespace ivf_tl_UtilHelper
             // V-047 取数链:well 级拍照层覆盖 本地缓存 → 运行时(空=继承设备级,喂 PhotoLayerCalculator)。
             houseWellSetting.focusLayerSpacingPulse = houseWellSettingDB.focusLayerSpacingPulse;
             houseWellSetting.focusLayerCount = houseWellSettingDB.focusLayerCount;
+            // 自动对焦重构:well 级搜索半幅覆盖 本地缓存 → 运行时(空=继承设备级)。
+            houseWellSetting.horizontalFocusRange = houseWellSettingDB.horizontalFocusRange;
+            houseWellSetting.verticalFocusRange = houseWellSettingDB.verticalFocusRange;
             return houseWellSetting;
         }
 
@@ -389,6 +413,9 @@ namespace ivf_tl_UtilHelper
             // V-047 取数链:well 级拍照层覆盖 运行时 → 本地缓存,跨重启保留。
             houseWellSettingDB.focusLayerSpacingPulse = houseWellSetting.focusLayerSpacingPulse;
             houseWellSettingDB.focusLayerCount = houseWellSetting.focusLayerCount;
+            // 自动对焦重构:well 级搜索半幅覆盖 运行时 → 本地缓存,跨重启保留。
+            houseWellSettingDB.horizontalFocusRange = houseWellSetting.horizontalFocusRange;
+            houseWellSettingDB.verticalFocusRange = houseWellSetting.verticalFocusRange;
             return houseWellSettingDB;
         }
 

+ 12 - 0
ivf_tl_operate_2.0/ivf_tl_Entity/DebugEntitys/HouseWellSetting.cs

@@ -77,5 +77,17 @@ namespace ivf_tl_Entity.DebugEntitys
         /// 注:下移层数复用既有 moveDownLayer 列,不另加(§2.8)。
         /// </summary>
         public int? focusLayerCount { get; set; }
+
+        /// <summary>
+        /// 自动对焦重构 well 级水平搜索半幅覆盖(house_well_setting.horizontal_focus_range,可空)。
+        /// 围绕 horizontalMotorPosition;留 null=继承 tl_setting.focus_h_range_default。
+        /// </summary>
+        public int? horizontalFocusRange { get; set; }
+
+        /// <summary>
+        /// 自动对焦重构 well 级垂直搜索半幅覆盖(house_well_setting.vertical_focus_range,可空)。
+        /// 围绕 eepromClearPosition;留 null=继承 tl_setting.focus_v_range_default。
+        /// </summary>
+        public int? verticalFocusRange { get; set; }
     }
 }

+ 20 - 0
ivf_tl_operate_2.0/ivf_tl_Entity/DebugEntitys/TLSetting.cs

@@ -287,6 +287,26 @@ namespace ivf_tl_Entity.DebugEntitys
         /// </summary>
         public int? focusLayerDown { get; set; }
 
+        /// <summary>
+        /// 自动对焦重构 设备级水平半幅默认 tl_setting.focus_h_range_default(well 级留空时回退用,可空)。
+        /// </summary>
+        public int? focusHRangeDefault { get; set; }
+
+        /// <summary>
+        /// 自动对焦重构 设备级垂直半幅默认 tl_setting.focus_v_range_default(可空)。
+        /// </summary>
+        public int? focusVRangeDefault { get; set; }
+
+        /// <summary>
+        /// 自动对焦重构 对焦曝光二分下限 tl_setting.focus_exposure_min(SQL DEFAULT 10)。
+        /// </summary>
+        public int? focusExposureMin { get; set; }
+
+        /// <summary>
+        /// 自动对焦重构 对焦曝光二分上限 tl_setting.focus_exposure_max(SQL DEFAULT 800)。
+        /// </summary>
+        public int? focusExposureMax { get; set; }
+
         /// <summary>
         /// 保存原图
         /// </summary>