|
@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
@ -59,6 +60,7 @@ public class IotDeviceService {
|
|
|
}
|
|
|
|
|
|
//设备状态信息上传
|
|
|
@Transactional
|
|
|
public String uploadDeviceInfo(){
|
|
|
Map<String,String> header = new HashMap<>();
|
|
|
String jsonData = "{\"deviceSn\":\"xty_test\",\"deviceModel\":\"测试\",\"name\":\"血糖仪TEST\",\"hospital\":\"350211A1004\",\"hospitalName\":\"厦门市第三医院\",\"categoryCode\":\"2\",\"categoryName\":\" 血糖仪\",\"commonName\":\" 血糖仪\",\"combinationMethod\":\"1\",\"networkTransmission\":\" 11\",\"deviceUse\":\"2\",\"dropLocation\":\"2\",\"dataAcquisition\":\"IoT_equipment_blood_glucose_mete\",\"companyName\":\"血糖仪厂商名称\",\"companyType\":\"3\"}";
|
|
@ -69,6 +71,7 @@ public class IotDeviceService {
|
|
|
return response;
|
|
|
}
|
|
|
//设备业务数据信息上传
|
|
|
@Transactional
|
|
|
public String uploadDeviceData(){
|
|
|
Map<String,String> header = new HashMap<>();
|
|
|
String jsonData = "{\"deviceSn\":\"xty_test\",\"deviceModel\":\"测试\",\"name\":\"血糖仪TEST\",\"hospital\":\"350211A1004\",\"hospitalName\":\"厦门市第三医院\",\"categoryCode\":\"2\",\"categoryName\":\" 血糖仪\",\"commonName\":\" 血糖仪\",\"combinationMethod\":\"1\",\"networkTransmission\":\" 11\",\"deviceUse\":\"2\",\"dropLocation\":\"2\",\"dataAcquisition\":\"IoT_equipment_blood_glucose_mete\",\"companyName\":\"血糖仪厂商名称\",\"companyType\":\"3\"}";
|
|
@ -79,6 +82,7 @@ public class IotDeviceService {
|
|
|
return response;
|
|
|
}
|
|
|
//设备相关基础信息注册
|
|
|
@Transactional
|
|
|
public String deviceRegistration(){
|
|
|
Map<String,String> header = new HashMap<>();
|
|
|
String jsonData = "{\"deviceSn\":\"xty_test\",\"deviceModel\":\"测试\",\"name\":\"血糖仪TEST\",\"hospital\":\"350211A1004\",\"hospitalName\":\"厦门市第三医院\",\"categoryCode\":\"2\",\"categoryName\":\" 血糖仪\",\"commonName\":\" 血糖仪\",\"combinationMethod\":\"1\",\"networkTransmission\":\" 11\",\"deviceUse\":\"2\",\"dropLocation\":\"2\",\"dataAcquisition\":\"IoT_equipment_blood_glucose_mete\",\"companyName\":\"血糖仪厂商名称\",\"companyType\":\"3\"}";
|
|
@ -93,6 +97,7 @@ public class IotDeviceService {
|
|
|
* 获取accesstoken
|
|
|
* @return
|
|
|
*/
|
|
|
@Transactional
|
|
|
public synchronized String getAccessToken(){
|
|
|
//新增accesstoken 缓存
|
|
|
Map<String,String> header = new HashMap<>();
|