From 9f74ada894cc5be74fa6860bf702468ed00e3020 Mon Sep 17 00:00:00 2001 From: lnk Date: Mon, 20 Jul 2026 16:29:23 +0800 Subject: [PATCH] =?UTF-8?q?pqdif=E8=BF=9B=E7=A8=8B=E8=B7=B3=E8=BF=87xml?= =?UTF-8?q?=E5=92=8C=E6=8A=A5=E5=91=8A=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mms/mms_process.c | 16 ++++++++++++++-- mms/rdb_client.c | 41 +++++++++++++++++++++++------------------ 2 files changed, 37 insertions(+), 20 deletions(-) diff --git a/mms/mms_process.c b/mms/mms_process.c index d53d1be..d46d51f 100644 --- a/mms/mms_process.c +++ b/mms/mms_process.c @@ -1176,7 +1176,8 @@ void process_ledger_update(trigger_update_xml_t *ledger_update_xml) //3-写入台账内容/////////////////////////////////// //4-配置映射文件////////////////////////////// - char model[64] = {0}; + if (g_node_id != PQDIF_DATA_BASE_NODE_ID) { + char model[64] = {0}; // 获取模型ID,检查是否返回 NULL parse_model_cfg_web_one(ied,&model);//存储在/FeProject/dat/ @@ -1210,6 +1211,11 @@ void process_ledger_update(trigger_update_xml_t *ledger_update_xml) //5-报告块初始化/////////////////////////////////// //调试 + } + else { + printf("[PQDIF] skip model xml and report init terminal=%s\n", ied_usr->terminal_id); + } + printf("ledger id: %s\n", ((ied_usr_t*)ied->channel[0].ied->usr_ext)->terminal_id); //6-init_rem_dib_table////////////////////////////// @@ -1279,7 +1285,8 @@ void process_ledger_update(trigger_update_xml_t *ledger_update_xml) //3-写入台账内容//////////////////////////////////////////// //4-配置映射文件/////////////////////////////////////////// - char model[64] = {0}; + if (g_node_id != PQDIF_DATA_BASE_NODE_ID) { + char model[64] = {0}; // 获取模型ID,检查是否返回 NULL parse_model_cfg_web_one(ied,&model);//存储在/FeProject/dat/ @@ -1313,6 +1320,11 @@ void process_ledger_update(trigger_update_xml_t *ledger_update_xml) parse_rpt_log_ini_one(ied); //5-报告块初始化/////////////////////////////////// + } + else { + printf("[PQDIF] skip model xml and report init terminal=%s\n", ied_usr->terminal_id); + } + //6-init_rem_dib_table////////////////////////////// init_rem_dib_table_one(ied); //6-init_rem_dib_table/////////////////////////////////// diff --git a/mms/rdb_client.c b/mms/rdb_client.c index ac91d1b..c213171 100644 --- a/mms/rdb_client.c +++ b/mms/rdb_client.c @@ -205,27 +205,32 @@ apr_status_t init_rdb() //台账读取过后初始化各级的日志 init_loggers(); - rv = parse_model_cfg_web(); - if (rv != APR_SUCCESS) {//不可能 - echo_errg("Parsed model with error,try to run! \n"); + if (g_node_id != PQDIF_DATA_BASE_NODE_ID) { + rv = parse_model_cfg_web(); + if (rv != APR_SUCCESS) {//不可能 + echo_errg("Parsed model with error,try to run! \n"); - //char buf[256]; - //format_log_msg(buf,sizeof(buf),"前置的%s%d号进程调用web模型接口失败", get_front_msg_from_subdir(), g_front_seg_index); - //log_error("process", buf); - DIY_ERRORLOG_CODE("process",0,LOG_CODE_ICD_AND_DOWNLOAD,"【ERROR】前置的%s%d号进程调用web模型接口失败", get_front_msg_from_subdir(), g_front_seg_index); + //char buf[256]; + //format_log_msg(buf,sizeof(buf),"前置的%s%d号进程调用web模型接口失败", get_front_msg_from_subdir(), g_front_seg_index); + //log_error("process", buf); + DIY_ERRORLOG_CODE("process",0,LOG_CODE_ICD_AND_DOWNLOAD,"【ERROR】前置的%s%d号进程调用web模型接口失败", get_front_msg_from_subdir(), g_front_seg_index); - return rv; + return rv; + } + + Set_xml_nodeinfo();//解析xml模型 + + rv = parse_rpt_log_ini();//报告块初始化 + if (rv != APR_SUCCESS) { + echo_errg("Failed to parse report log define ini file! \n"); + + DIY_ERRORLOG_CODE("process",0,LOG_CODE_RPTINIT,"【ERROR】前置的%s%d号进程报告初始化失败", get_front_msg_from_subdir(), g_front_seg_index); + + return rv; + } } - - Set_xml_nodeinfo();//解析xml模型 - - rv = parse_rpt_log_ini();//报告块初始化 - if (rv != APR_SUCCESS) { - echo_errg("Failed to parse report log define ini file! \n"); - - DIY_ERRORLOG_CODE("process",0,LOG_CODE_RPTINIT,"【ERROR】前置的%s%d号进程报告初始化失败", get_front_msg_from_subdir(), g_front_seg_index); - - return rv; + else { + printf("[PQDIF] skip model xml and report init in init_rdb\n"); } }