|
|
@@ -852,7 +852,25 @@ static void overallStatusMonitoring(void* conn)
|
|
|
{
|
|
|
ack_str = over_all_data_t_ac_to_json(pall, &_over_all_sts_monitor, TOTAL_POWER_CONS_TYPE);
|
|
|
}
|
|
|
- else if (_over_all_sts_monitor.lType && (strcmp(_over_all_sts_monitor.lType,"L1")==0 || strcmp(_over_all_sts_monitor.lType,"L2")==0 || strcmp(_over_all_sts_monitor.lType,"L3")==0))
|
|
|
+ else if (_over_all_sts_monitor.product_pwr_type >= 0)
|
|
|
+ {
|
|
|
+ // 查询数据库总电源信息 传给所申请的参数结构体
|
|
|
+ if (dev_search_time_power_info(__globalDeviceManage.db, __globalDeviceManage._globalDevInfo.product_id, 0, TOTAL_POWER_CONS_TYPE, &__globalPowerInfo, _over_all_sts_monitor.start_time, _over_all_sts_monitor.end_time) != 0)
|
|
|
+ {
|
|
|
+ log_e("serach total power consumption err.");
|
|
|
+ }
|
|
|
+ // 传值给总管理结构体
|
|
|
+ for (int i = 0; i < TOTAL_COUNT; i++)
|
|
|
+ {
|
|
|
+ strcpy(pall->_total_consumption.xAxis[i], __globalPowerInfo._total_consumption.xAxis[i]);
|
|
|
+ pall->_total_consumption.ydata[i] = __globalPowerInfo._total_consumption.ydata[i];
|
|
|
+ }
|
|
|
+
|
|
|
+ // 返回耗电量统计
|
|
|
+ ack_str = over_all_total_info_to_json(pall, TOTAL_POWER_CONS_TYPE);
|
|
|
+ }
|
|
|
+ else if (_over_all_sts_monitor.lType && (strcmp(_over_all_sts_monitor.lType,"L1")==0 || strcmp(_over_all_sts_monitor.lType,"L2")==0 || strcmp(_over_all_sts_monitor.lType,"L3")==0)
|
|
|
+ &&(__globalDeviceManage._globalDevInfo.product_pwr_type == SmartPDU_Tree_AC_Tree||__globalDeviceManage._globalDevInfo.product_pwr_type == SmartPDU_Tree_AC_One||__globalDeviceManage._globalDevInfo.product_pwr_type == SmartPDU_Tree_AC_One_B) )
|
|
|
{
|
|
|
int ph_id=-1;
|
|
|
if (strcmp(_over_all_sts_monitor.lType,"L1")==0)
|
|
|
@@ -960,7 +978,8 @@ static void overallStatusMonitoring(void* conn)
|
|
|
//清0
|
|
|
memset(&__PowerTrendInfo,0,sizeof(GlobalPowerInfo));
|
|
|
#if 1
|
|
|
- if (_over_all_sts_monitor.lType && (strcmp(_over_all_sts_monitor.lType,"L1")==0 || strcmp(_over_all_sts_monitor.lType,"L2")==0 || strcmp(_over_all_sts_monitor.lType,"L3")==0))
|
|
|
+ if (_over_all_sts_monitor.lType && (strcmp(_over_all_sts_monitor.lType,"L1")==0 || strcmp(_over_all_sts_monitor.lType,"L2")==0 || strcmp(_over_all_sts_monitor.lType,"L3")==0)
|
|
|
+ &&(__globalDeviceManage._globalDevInfo.product_pwr_type == SmartPDU_Tree_AC_Tree||__globalDeviceManage._globalDevInfo.product_pwr_type == SmartPDU_Tree_AC_One||__globalDeviceManage._globalDevInfo.product_pwr_type == SmartPDU_Tree_AC_One_B) )
|
|
|
{
|
|
|
int ph_id=-1;
|
|
|
if (strcmp(_over_all_sts_monitor.lType,"L1")==0)
|