| | |
| | | {
|
| | | var reResult = new ReceiptGatewayResult();
|
| | | reResult.listReceiptData = new string[listReceiptTopic.Count];
|
| | | reResult.JsonData = new string[listReceiptTopic.Count];
|
| | |
|
| | | var myGateway = device.Gateway;
|
| | | if (myGateway == null) |
| | | { |
| | |
| | | return;
|
| | | }
|
| | | reResult.listReceiptData[i] = jobject["Data"].ToString();
|
| | | if (jobject.Property("Time") != null)
|
| | | {
|
| | | //需要移除time这个字段
|
| | | jobject.Remove("Time");
|
| | | }
|
| | | reResult.JsonData[i] = jobject.ToString();
|
| | | receiptCount++;
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | //如果只有一个主题,则替换变量
|
| | | reResult.ReceiptData = reResult.listReceiptData[0];
|
| | | reResult.listReceiptData = null;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | if (command == receiptCommand)
|
| | | {
|
| | | reResult.ReceiptData = responseData.PassData;
|
| | | reResult.JsonData = new string[1];
|
| | | if (jobject.Property("Time") != null)
|
| | | {
|
| | | //需要移除time这个字段
|
| | | jobject.Remove("Time");
|
| | | }
|
| | | reResult.JsonData[0] = jobject.ToString();
|
| | | }
|
| | | }
|
| | | };
|