MQTT上传文件至装置

This commit is contained in:
xy
2024-08-13 10:51:19 +08:00
parent c6213d06e5
commit 04e59d2282
9 changed files with 239 additions and 7 deletions

View File

@@ -58,6 +58,8 @@ public enum AccessResponseEnum {
MODEL_MISS("A0308","模板信息缺失!"),
MODEL_VERSION_ERROR("A0308","询问装置模板信息错误"),
UPLOAD_ERROR("A0308","平台上送文件异常"),
RELOAD_UPLOAD_ERROR("A0308","平台重新上送文件异常"),
CLDID_IS_NULL("A0309","逻辑子设备标识为空"),
MODULE_NUMBER_IS_NULL("A0309","设备子模块个数为空"),

View File

@@ -0,0 +1,33 @@
package com.njcn.access.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author xy
*/
@Data
public class UploadFileDto {
@SerializedName("Name")
@ApiModelProperty("文件名称,全路径")
private String name;
@SerializedName("FileSize")
@ApiModelProperty("文件总大小(单位字节)")
private Integer fileSize;
@SerializedName("Offset")
@ApiModelProperty("当前上送数据包在文件中偏移位置")
private Integer offset;
@SerializedName("Len")
@ApiModelProperty("当前上送数据包长度")
private Integer len;
@SerializedName("Data")
@ApiModelProperty("文件包数据")
private String data;
}

View File

@@ -0,0 +1,22 @@
package com.njcn.access.pojo.dto.file;
import lombok.Data;
/**
* @author xy
*/
@Data
public class FileRedisDto {
private String name;
private Integer allStep;
private Integer nowStep;
private Integer retry = 0;
private Integer code;
}