```
feat(import): 添加区域字段支持和改进模板路径处理 - 在OLT设备导入功能中添加region字段支持,从Excel模板读取区域信息 - 修复模板文件路径问题,使用相对路径动态构建模板文件路径 - 更新导入服务中的验证错误格式,包含行号和MAC地址信息 feat(check): 增强设备检测服务的端口信息同步 - 在CheckService中添加端口和OLT归属信息的同步逻辑 - 改进设备状态检查时的端口信息更新策略,避免用None覆盖现有值 - 扩展返回数据结构,包含端口ID、槽位号、端口号和OLT位置信息 feat(frontend): 添加设备列表刷新冷却机制和端口验证 - 实现设备状态刷新的60秒冷却时间限制,防止频繁操作 - 改进业务下发按钮的启用条件,同时支持port_id或slot_number+port_number组合 - 优化导入结果显示,显示具体的MAC地址信息 feat(olt): 添加重复MAC记录批量清除功能 - 新增批量清除重复MAC记录的功能,支持按OLT分组处理 - 实现SSH端口清除和自动忽略的批量操作流程 - 添加批量操作的进度提示和错误处理机制 ```
This commit is contained in:
@@ -53,7 +53,7 @@ class ImportService:
|
||||
for idx, record in enumerate(records):
|
||||
mac = record.get('mac_address', '').strip()
|
||||
if not mac:
|
||||
invalid.append({'record': record, 'error': f'第{idx+2}行: MAC地址缺失'})
|
||||
invalid.append({'row': idx + 2, 'mac': mac, 'reason': 'MAC地址缺失'})
|
||||
continue
|
||||
|
||||
# 标准化MAC地址:统一使用横杠分隔小写格式
|
||||
@@ -63,7 +63,7 @@ class ImportService:
|
||||
# 验证基本格式:12个十六进制字符(可能有分隔符)
|
||||
hex_chars = mac_clean.replace('-', '')
|
||||
if len(hex_chars) != 12 or not all(c in '0123456789ABCDEF' for c in hex_chars):
|
||||
invalid.append({'record': record, 'error': f'第{idx+2}行: MAC地址格式错误 "{mac}"'})
|
||||
invalid.append({'row': idx + 2, 'mac': mac, 'reason': f'MAC地址格式错误 "{mac}"'})
|
||||
continue
|
||||
|
||||
# 转换为标准格式 34dc-99c8-56e0(小写4位分组)
|
||||
|
||||
Reference in New Issue
Block a user