|
|
@ -200,11 +200,11 @@ public class TdEngineController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @return R<?>
|
|
|
|
* @param: alterTagVo
|
|
|
|
* @param: alterTagVo
|
|
|
|
* @description 修改子表tag值
|
|
|
|
* @description 修改子表tag值
|
|
|
|
* @author xins
|
|
|
|
* @author xins
|
|
|
|
* @date 2023-08-30 11:17
|
|
|
|
* @date 2023-08-30 11:17
|
|
|
|
* @return R<?>
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PostMapping("/alterTableTag")
|
|
|
|
@PostMapping("/alterTableTag")
|
|
|
|
public R<?> alterTableTag(@Validated @RequestBody AlterTagVo alterTagVo) {
|
|
|
|
public R<?> alterTableTag(@Validated @RequestBody AlterTagVo alterTagVo) {
|
|
|
@ -214,9 +214,9 @@ public class TdEngineController {
|
|
|
|
Object tagValue = alterTagVo.getTagValue();
|
|
|
|
Object tagValue = alterTagVo.getTagValue();
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
this.tdEngineService.alterTableTag(databaseName,tableName,tagName,tagValue);
|
|
|
|
this.tdEngineService.alterTableTag(databaseName, tableName, tagName, tagValue);
|
|
|
|
log.info("successfully altered tag "+tagName+" value to "+tagValue+" of tableName");
|
|
|
|
log.info("successfully altered tag " + tagName + " value to " + tagValue + " of tableName");
|
|
|
|
return R.ok("successfully altered tag "+tagName+" value to "+tagValue+" of tableName");
|
|
|
|
return R.ok("successfully altered tag " + tagName + " value to " + tagValue + " of tableName");
|
|
|
|
} catch (UncategorizedSQLException e) {
|
|
|
|
} catch (UncategorizedSQLException e) {
|
|
|
|
String message = e.getCause().getMessage();
|
|
|
|
String message = e.getCause().getMessage();
|
|
|
|
try {
|
|
|
|
try {
|
|
|
@ -295,7 +295,7 @@ public class TdEngineController {
|
|
|
|
* @date 2023-08-29 14:51
|
|
|
|
* @date 2023-08-29 14:51
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PostMapping("/getLatestDataByTags")
|
|
|
|
@PostMapping("/getLatestDataByTags")
|
|
|
|
public R<Map<String, Map<String, Object>>> getLatestDataByTags(@RequestBody TdSelectDto tdSelectDto) {
|
|
|
|
public R<List<Map<String, Object>>> getLatestDataByTags(@Validated @RequestBody TdSuperTableSelectVo tdSelectDto) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
return R.ok(this.tdEngineService.getLatestDataByTags(tdSelectDto));
|
|
|
|
return R.ok(this.tdEngineService.getLatestDataByTags(tdSelectDto));
|
|
|
|
} catch (UncategorizedSQLException e) {
|
|
|
|
} catch (UncategorizedSQLException e) {
|
|
|
@ -348,11 +348,11 @@ public class TdEngineController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @return R<?>
|
|
|
|
* @param: tdHistorySelectDto
|
|
|
|
* @param: tdHistorySelectDto
|
|
|
|
* @description 获取历史数据数量
|
|
|
|
* @description 获取历史数据数量
|
|
|
|
* @author xins
|
|
|
|
* @author xins
|
|
|
|
* @date 2023-08-29 17:29
|
|
|
|
* @date 2023-08-29 17:29
|
|
|
|
* @return R<?>
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PostMapping("/getCountOfHistoryData")
|
|
|
|
@PostMapping("/getCountOfHistoryData")
|
|
|
|
public R<?> getCountOfHistoryData(@Validated @RequestBody TdHistorySelectDto tdHistorySelectDto) {
|
|
|
|
public R<?> getCountOfHistoryData(@Validated @RequestBody TdHistorySelectDto tdHistorySelectDto) {
|
|
|
@ -381,7 +381,7 @@ public class TdEngineController {
|
|
|
|
* @date 2023-08-29 11:26
|
|
|
|
* @date 2023-08-29 11:26
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PostMapping("/getOnlineDevicesGroupByDay")
|
|
|
|
@PostMapping("/getOnlineDevicesGroupByDay")
|
|
|
|
public R<?> getOnlineDevicesGroupByDay(@RequestBody DeviceStatus queryDeviceStatus) {
|
|
|
|
public R<?> getOnlineDevicesGroupByDay(@RequestBody DeviceStatus queryDeviceStatus) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
List<DeviceStatus> deviceStatuses = this.deviceStatusService.getOnlineDevicesGroupByDay(queryDeviceStatus);
|
|
|
|
List<DeviceStatus> deviceStatuses = this.deviceStatusService.getOnlineDevicesGroupByDay(queryDeviceStatus);
|
|
|
|
Map<Long, List<DeviceStatus>> deviceStatusMap = deviceStatuses.stream()
|
|
|
|
Map<Long, List<DeviceStatus>> deviceStatusMap = deviceStatuses.stream()
|
|
|
|