|
@ -48,6 +48,28 @@ public class IotDeviceService {
|
|
|
private static String iotHospital = "350211A1049";
|
|
|
private static String iotHospitalName = "厦门医学院附属海沧医院";
|
|
|
|
|
|
//设备状态信息上传
|
|
|
@Transactional
|
|
|
public String uploadDeviceThird(String jsonData,String type){
|
|
|
Map<String,String> header = new HashMap<>();
|
|
|
// String jsonData = "{\"deviceSn\":\"xty_hcyy\",\"deviceModel\":\"测试\",\"name\":\"血糖仪TEST\",\"hospital\":\""+iotHospital+"\"," +
|
|
|
// "\"hospitalName\":\""+iotHospitalName+"\",\"categoryCode\":\"2\",\"categoryName\":\" 血糖仪\",\"commonName\":\" 血糖仪\"," +
|
|
|
// "\"combinationMethod\":\"1\",\"networkTransmission\":\" 11\",\"deviceUse\":\"2\",\"dropLocation\":\"2\",\"dataAcquisition\":" +
|
|
|
// "\"IoT_equipment_blood_glucose_mete\",\"companyName\":\"血糖仪厂商名称\",\"companyType\":\"3\"}";
|
|
|
Map<String,String> params = new HashMap<>();
|
|
|
params.put("jsonData",jsonData);
|
|
|
header.put("accesstoken",getAccessToken());
|
|
|
String content = "";
|
|
|
if("uploadDeviceInfo".equals(type)){
|
|
|
content = "设备状态信息上传";
|
|
|
}else if("uploadDeviceData".equals(type)){
|
|
|
content = "设备业务数据信息上传";
|
|
|
}else if("deviceRegistration".equals(type)){
|
|
|
content = "设备相关基础信息注册";
|
|
|
}
|
|
|
String response = sdkRunnerService.post("wlw/"+type,content,params,header,true,true);
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
//设备状态信息上传
|
|
|
@Transactional
|