18339543638 2 лет назад
Родитель
Сommit
3b09ea30c6

+ 1 - 1
nb-admin/src/main/resources/application.yml

@@ -107,5 +107,5 @@ management:
       exposure:
         include: heapdump,metrics
 hospital:
-  code: test
+  code: 123
   name: 测试医院

+ 3 - 1
nb-service/iot-service/src/main/java/com/nb/aliyun/controller/IotController.java

@@ -65,6 +65,7 @@ public class IotController {
         if(ObjectUtil.isNull(source.getRunState())){
             throw new CustomException("[runState]设备运行状态不能为空");
         }
+        source.setTest(false);
         executorService.execute(()->{
             BusDeviceEntity device = new BusDeviceEntity();
             device.setStatus(DeviceStatusEnum2.ONLINE);
@@ -79,7 +80,8 @@ public class IotController {
             hospitalLog.setTenantId(device.getTenantId());
             long startTime = System.currentTimeMillis();
             try {
-                iotMsgHandler.sync(source,source.getDeviceId());
+                BusDeviceRunningEntity sync = iotMsgHandler.sync(source, source.getDeviceId());
+                hospitalLog.setResult(JSONUtil.toJsonStr(sync));
                 hospitalLog.setSuccess(true);
             }catch (Exception e) {
                 hospitalLog.setSuccess(false);