TRX 1 tahun lalu
induk
melakukan
774c64407e

+ 9 - 0
OneCardIotClient/src/main/java/com/zhongshu/iot/client/model/artemis/OperationMessageResultModel.java

@@ -3,6 +3,9 @@ package com.zhongshu.iot.client.model.artemis;
 import cn.hutool.json.JSONObject;
 import com.github.microservice.models.baseParam.SuperModel;
 import com.github.microservice.types.FunctionType;
+import com.github.microservice.types.deviceUse.DeviceCategory;
+import com.github.microservice.types.deviceUse.DeviceType;
+import com.github.microservice.types.deviceUse.RegistType;
 import com.zhongshu.iot.client.type.EventType;
 import com.zhongshu.iot.client.type.OperationType;
 import io.swagger.v3.oas.annotations.media.Schema;
@@ -57,6 +60,12 @@ public class OperationMessageResultModel extends SuperModel {
     @Schema(description = "设备ID")
     private String deviceId;
 
+    @Schema(description = "设备类型:消费机 闸机")
+    private DeviceType deviceType;
+
+    @Schema(description = "区分是网关、设备")
+    private DeviceCategory deviceCategory;
+
     @Schema(description = "分组code")
     private String projectCode;
 

+ 9 - 0
OneCardIotServer/src/main/java/com/zhongshu/iot/server/core/controller/iot/IotController.java

@@ -119,6 +119,15 @@ public class IotController {
         return iotService.pageIotMain(pageable, param);
     }
 
+    @ResourceAuth(value = "user", type = AuthType.User)
+    @Operation(summary = "产品属性-服务-方法列表-分页查询")
+    @RequestMapping(value = {"devicePageIotMain"}, method = {RequestMethod.POST})
+    public ResultContent<Page<IotMainModel>> devicePageIotMain(@Parameter(hidden = true) @PageableDefault(page = 0, size = 10) Pageable pageable,
+            @Parameter(required = false) IotMainSearch param) {
+        param.setIotDataType(IotDataType.Device);
+        return iotService.pageIotMain(pageable, param);
+    }
+
     @ResourceAuth(value = "user", type = AuthType.User)
     @Operation(summary = "删除属性")
     @RequestMapping(value = "deleteIotMain", method = {RequestMethod.GET})

+ 3 - 0
OneCardIotServer/src/main/java/com/zhongshu/iot/server/core/domain/iot/message/OperationMessageResult.java

@@ -175,6 +175,9 @@ public class OperationMessageResult extends SuperEntity {
     @Schema(description = "确定送达时间")
     private Long receivedTime;
 
+    @Schema(description = "如果下发消息有响应信息")
+    private Object responseData;
+
     //------------------------------时间信息 start--------------------
     @Schema(description = "年份,如:2024")
     private Integer year;

+ 2 - 0
OneCardIotServer/src/main/java/com/zhongshu/iot/server/core/service/artemis/OperationMessageService.java

@@ -733,6 +733,8 @@ public class OperationMessageService {
             // 所属网关信息
             if (ObjectUtils.isNotEmpty(gateWayInfo)) {
                 messageResult.setGateWayId(gateWayInfo.getDeviceId());
+            } else {
+                messageResult.setGateWayId("");
             }
         }
 

+ 1 - 0
OneCardIotServer/src/main/java/com/zhongshu/iot/server/core/service/iot/IotSendMessageService.java

@@ -241,6 +241,7 @@ public class IotSendMessageService extends SuperService {
                 messageResult.setDataId(entity.getDataId());
                 messageResult.setRealIotTopic(topic);
                 messageResult.setData(data);
+                messageResult.setResponseId(messageId);
                 Boolean isSendSuccess = Boolean.TRUE;
                 String sendMsg = "下发成功";
                 try {