重构转码逻辑;元数据更新逻辑优化;元数据更新存储模式重构
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "metadatupdatepage.h"
|
||||
#include "utils/Constants.h"
|
||||
#include "utils/logmanager.h"
|
||||
#include "utils/datacache.h"
|
||||
#include "utils/business_strategy.h"
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
@@ -185,11 +186,12 @@ void MetadataUpdatePage::showEvent(QShowEvent* event)
|
||||
|
||||
void MetadataUpdatePage::showUpdateItems()
|
||||
{
|
||||
QStringList uft3Items = {"标准字段", "数据类型", "表结构",
|
||||
// 注意: "数据类型" 需排在 "标准字段" 之前, 标准字段解析依赖数据类型(从缓存库读取)。
|
||||
QStringList uft3Items = {"数据类型", "标准字段", "表结构",
|
||||
"接口数据"};
|
||||
|
||||
QStringList uf20Items = {"标准字段", "数据类型", "标准错误号",
|
||||
"接口数据"};
|
||||
QStringList uf20Items = {"数据类型", "标准字段", "标准错误号",
|
||||
"接口数据", "常量", "菜单功能", "模块", "表结构"};
|
||||
|
||||
for (int i = 0; i < uft3Items.size(); ++i) {
|
||||
auto* cbx = new ElaCheckBox(uft3Items[i]);
|
||||
@@ -313,6 +315,14 @@ UpdateResult MetadataUpdatePage::runUpdateUf2(const QStringList& items)
|
||||
success = false;
|
||||
}
|
||||
interfaceUpdated = true;
|
||||
} else if (item == "常量") {
|
||||
processUf2Constants();
|
||||
} else if (item == "菜单功能") {
|
||||
processUf2MenuFunc();
|
||||
} else if (item == "模块") {
|
||||
processUf2Module();
|
||||
} else if (item == "表结构") {
|
||||
processUf2Table();
|
||||
}
|
||||
++idx;
|
||||
}
|
||||
@@ -370,6 +380,26 @@ bool MetadataUpdatePage::processUf2Interface(const QString& basePath)
|
||||
return _processor->processUf2Interfaces(basePath);
|
||||
}
|
||||
|
||||
void MetadataUpdatePage::processUf2Constants()
|
||||
{
|
||||
_processor->processUf2Constants();
|
||||
}
|
||||
|
||||
void MetadataUpdatePage::processUf2MenuFunc()
|
||||
{
|
||||
_processor->processUf2MenuFunc();
|
||||
}
|
||||
|
||||
void MetadataUpdatePage::processUf2Module()
|
||||
{
|
||||
_processor->processUf2Module();
|
||||
}
|
||||
|
||||
void MetadataUpdatePage::processUf2Table()
|
||||
{
|
||||
_processor->processUf2Table();
|
||||
}
|
||||
|
||||
void MetadataUpdatePage::processUft3StdFields()
|
||||
{
|
||||
_processor->processUft3StdFields();
|
||||
@@ -432,6 +462,8 @@ void MetadataUpdatePage::onWorkerFinished()
|
||||
_processLabel->setText("正在更新数据缓存...");
|
||||
// 通过业务策略工厂按当前任务选择对应版本的配置重载,取代 UF20/UFT3 if/else
|
||||
createBusinessStrategy(m_currentTaskName)->reloadConfig();
|
||||
// 元数据落库后重建功能查询内存缓存, 使后续 UF20/UFT3 功能搜索走缓存而非全表扫描
|
||||
DataCache::instance()->refreshFunctionCache();
|
||||
}
|
||||
|
||||
onUpdateFinished(r.success, QString("%1更新完成").arg(m_currentTaskName));
|
||||
|
||||
@@ -61,6 +61,10 @@ private:
|
||||
void processUf2StdFields();
|
||||
void processUf2DataType();
|
||||
void processUf2ErrNumber();
|
||||
void processUf2Constants();
|
||||
void processUf2MenuFunc();
|
||||
void processUf2Module();
|
||||
void processUf2Table();
|
||||
bool processUf2Interface(const QString& basePath);
|
||||
|
||||
void processUft3StdFields();
|
||||
|
||||
Reference in New Issue
Block a user