|
|
@@ -2,6 +2,8 @@ package com.nb.aliyun.controller;
|
|
|
|
|
|
|
|
|
import cn.dev33.satoken.annotation.SaIgnore;
|
|
|
+import cn.hutool.core.lang.UUID;
|
|
|
+import cn.hutool.core.util.IdUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
@@ -65,6 +67,7 @@ public class IotController {
|
|
|
if(ObjectUtil.isNull(source.getRunState())){
|
|
|
throw new CustomException("[runState]设备运行状态不能为空");
|
|
|
}
|
|
|
+ source.setUserId(StrUtil.fill(source.getUserId(),'0',4,true));
|
|
|
source.setTest(false);
|
|
|
executorService.execute(()->{
|
|
|
BusDeviceEntity device = new BusDeviceEntity();
|
|
|
@@ -80,6 +83,7 @@ public class IotController {
|
|
|
hospitalLog.setTenantId(device.getTenantId());
|
|
|
long startTime = System.currentTimeMillis();
|
|
|
try {
|
|
|
+ source.setMsgId(IdUtil.getSnowflakeNextIdStr());
|
|
|
BusDeviceRunningEntity sync = iotMsgHandler.sync(source, source.getDeviceId());
|
|
|
hospitalLog.setResult(JSONUtil.toJsonStr(sync));
|
|
|
hospitalLog.setSuccess(true);
|