|
@ -469,7 +469,25 @@ public class MonitorPlatformService {
|
|
|
String response = sendGet(url,params);
|
|
|
JSONObject json = JSONObject.parseObject(response);
|
|
|
if(json.getInteger("status")==200){
|
|
|
return json.getJSONObject("data");
|
|
|
JSONObject tmp = json.getJSONObject("data");
|
|
|
//查询物联网获取设备信息
|
|
|
String sql = "SELECT d.device_sn,b.supplier_name supplierName,b.origin_place originPlace,e.product_img productImg" +
|
|
|
",e.description from iot_device d,iot_product_base_info b,iot_product_extend_info e" +
|
|
|
" WHERE d.device_sn = '"+deviceSn+"' and d.product_id = b.id and d.product_id = e.product_id";
|
|
|
List<JSONObject> list = myJdbcTemplate.queryJson(sql.toString(),new Object[]{});
|
|
|
if(list!=null&&list.size()>0){
|
|
|
JSONObject js = list.get(0);
|
|
|
tmp.put("supplierName",js.getString("supplierName"));
|
|
|
tmp.put("originPlace",js.getString("originPlace"));
|
|
|
tmp.put("productImg",js.getString("productImg"));
|
|
|
tmp.put("description",js.getString("description"));
|
|
|
}else{
|
|
|
tmp.put("supplierName","");
|
|
|
tmp.put("originPlace","");
|
|
|
tmp.put("productImg","");
|
|
|
tmp.put("description","");
|
|
|
}
|
|
|
return tmp;
|
|
|
}
|
|
|
|
|
|
return new JSONObject();
|