|
@@ -2659,7 +2659,12 @@ char* ws_chn_status_ack_to_json(int type,_OverChnPwrAckInfo* _over_chn_pwr_back_
|
|
|
{
|
|
{
|
|
|
//添加第一条记录
|
|
//添加第一条记录
|
|
|
cJSON* data_filed = cJSON_CreateObject();
|
|
cJSON* data_filed = cJSON_CreateObject();
|
|
|
- sprintf(temp,"%s %d",_chnPwrTemp->product_name, _chnPwrTemp->product_id);
|
|
|
|
|
|
|
+ if(_chnPwrTemp->product_id==0) {
|
|
|
|
|
+ sprintf(temp,"%s",_chnPwrTemp->product_name);
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ sprintf(temp,"%s %d",_chnPwrTemp->product_name, _chnPwrTemp->product_id);
|
|
|
|
|
+ }
|
|
|
cJSON_AddStringToObject(data_filed,"productName",temp);
|
|
cJSON_AddStringToObject(data_filed,"productName",temp);
|
|
|
cJSON_AddStringToObject(data_filed,"productNumber",_chnPwrTemp->product_number);
|
|
cJSON_AddStringToObject(data_filed,"productNumber",_chnPwrTemp->product_number);
|
|
|
sprintf(temp,"%d",_chnPwrTemp->product_id);
|
|
sprintf(temp,"%d",_chnPwrTemp->product_id);
|