设备上电审核基本信息上报接口,逻辑完善
This commit is contained in:
@ -0,0 +1,210 @@
|
|||||||
|
package com.fastbee.common.core.domain;
|
||||||
|
|
||||||
|
import com.fastbee.common.constant.HttpStatus;
|
||||||
|
import com.fastbee.common.utils.StringUtils;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作消息提醒
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
public class AjaxResultPro extends HashMap<String, Object>
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 状态码 */
|
||||||
|
public static final String CODE_TAG = "code";
|
||||||
|
|
||||||
|
/** 返回内容 */
|
||||||
|
public static final String MSG_TAG = "msg";
|
||||||
|
|
||||||
|
/** 数据对象 */
|
||||||
|
public static final String DATA_TAG = "data";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化一个新创建的 AjaxResult 对象,使其表示一个空消息。
|
||||||
|
*/
|
||||||
|
public AjaxResultPro()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化一个新创建的 AjaxResult 对象
|
||||||
|
*
|
||||||
|
* @param code 状态码
|
||||||
|
* @param msg 返回内容
|
||||||
|
*/
|
||||||
|
public AjaxResultPro(int code, String msg)
|
||||||
|
{
|
||||||
|
super.put(CODE_TAG, code);
|
||||||
|
super.put(MSG_TAG, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化一个新创建的 AjaxResult 对象
|
||||||
|
*
|
||||||
|
* @param code 状态码
|
||||||
|
* @param msg 返回内容
|
||||||
|
* @param data 数据对象
|
||||||
|
*/
|
||||||
|
public AjaxResultPro(int code, String msg, Object data)
|
||||||
|
{
|
||||||
|
super.put(CODE_TAG, code);
|
||||||
|
super.put(MSG_TAG, msg);
|
||||||
|
super.put(DATA_TAG, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化一个新创建的 AjaxResult 对象
|
||||||
|
*
|
||||||
|
* @param code 状态码
|
||||||
|
* @param msg 返回内容
|
||||||
|
* @param data 数据对象
|
||||||
|
*/
|
||||||
|
public AjaxResultPro(int code, String msg, Object data, int total)
|
||||||
|
{
|
||||||
|
super.put(CODE_TAG, code);
|
||||||
|
super.put(MSG_TAG, msg);
|
||||||
|
|
||||||
|
super.put(DATA_TAG, data);
|
||||||
|
super.put("total",total);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回成功消息
|
||||||
|
*
|
||||||
|
* @return 成功消息
|
||||||
|
*/
|
||||||
|
public static AjaxResultPro success()
|
||||||
|
{
|
||||||
|
return AjaxResultPro.success("操作成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回成功数据
|
||||||
|
*
|
||||||
|
* @return 成功消息
|
||||||
|
*/
|
||||||
|
public static AjaxResultPro success(Object data)
|
||||||
|
{
|
||||||
|
return AjaxResultPro.success("操作成功", data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回成功数据
|
||||||
|
*
|
||||||
|
* @return 成功消息
|
||||||
|
*/
|
||||||
|
public static AjaxResultPro success(Object data, int total)
|
||||||
|
{
|
||||||
|
return new AjaxResultPro(HttpStatus.SUCCESS, "操作成功", data,total);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回成功消息
|
||||||
|
*
|
||||||
|
* @param msg 返回内容
|
||||||
|
* @return 成功消息
|
||||||
|
*/
|
||||||
|
public static AjaxResultPro success(String msg)
|
||||||
|
{
|
||||||
|
return AjaxResultPro.success(msg, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回成功消息
|
||||||
|
*
|
||||||
|
* @param msg 返回内容
|
||||||
|
* @param data 数据对象
|
||||||
|
* @return 成功消息
|
||||||
|
*/
|
||||||
|
public static AjaxResultPro success(String msg, Object data)
|
||||||
|
{
|
||||||
|
return new AjaxResultPro(HttpStatus.SUCCESS, msg, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回警告消息
|
||||||
|
*
|
||||||
|
* @param msg 返回内容
|
||||||
|
* @return 警告消息
|
||||||
|
*/
|
||||||
|
public static AjaxResultPro warn(String msg)
|
||||||
|
{
|
||||||
|
return AjaxResultPro.warn(msg, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回警告消息
|
||||||
|
*
|
||||||
|
* @param msg 返回内容
|
||||||
|
* @param data 数据对象
|
||||||
|
* @return 警告消息
|
||||||
|
*/
|
||||||
|
public static AjaxResultPro warn(String msg, Object data)
|
||||||
|
{
|
||||||
|
return new AjaxResultPro(HttpStatus.WARN, msg, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回错误消息
|
||||||
|
*
|
||||||
|
* @return 错误消息
|
||||||
|
*/
|
||||||
|
public static AjaxResultPro error()
|
||||||
|
{
|
||||||
|
return AjaxResultPro.error("操作失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回错误消息
|
||||||
|
*
|
||||||
|
* @param msg 返回内容
|
||||||
|
* @return 错误消息
|
||||||
|
*/
|
||||||
|
public static AjaxResultPro error(String msg)
|
||||||
|
{
|
||||||
|
return AjaxResultPro.error(msg, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回错误消息
|
||||||
|
*
|
||||||
|
* @param msg 返回内容
|
||||||
|
* @param data 数据对象
|
||||||
|
* @return 错误消息
|
||||||
|
*/
|
||||||
|
public static AjaxResultPro error(String msg, Object data)
|
||||||
|
{
|
||||||
|
return new AjaxResultPro(HttpStatus.ERROR, msg, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回错误消息
|
||||||
|
*
|
||||||
|
* @param code 状态码
|
||||||
|
* @param msg 返回内容
|
||||||
|
* @return 错误消息
|
||||||
|
*/
|
||||||
|
public static AjaxResultPro error(int code, String msg)
|
||||||
|
{
|
||||||
|
return new AjaxResultPro(code, msg, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方便链式调用
|
||||||
|
*
|
||||||
|
* @param key 键
|
||||||
|
* @param value 值
|
||||||
|
* @return 数据对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResultPro put(String key, Object value)
|
||||||
|
{
|
||||||
|
super.put(key, value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
@ -133,6 +133,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
.antMatchers("/test/**/*").permitAll()
|
.antMatchers("/test/**/*").permitAll()
|
||||||
.antMatchers("/prod-api/**").permitAll()
|
.antMatchers("/prod-api/**").permitAll()
|
||||||
.antMatchers("/system/district/tree").permitAll()
|
.antMatchers("/system/district/tree").permitAll()
|
||||||
|
.antMatchers("/sse/**").permitAll()
|
||||||
// 除上面外的所有请求全部需要鉴权认证
|
// 除上面外的所有请求全部需要鉴权认证
|
||||||
.anyRequest().authenticated()
|
.anyRequest().authenticated()
|
||||||
|
|
||||||
|
@ -0,0 +1,37 @@
|
|||||||
|
package com.fastbee.data.controller.gis.mqtt;
|
||||||
|
|
||||||
|
import com.fastbee.mqttclient.PubMqttCallBack;
|
||||||
|
import com.fastbee.mqttclient.PubMqttClient;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mqtt")
|
||||||
|
public class MqttTest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PubMqttClient pubMqttClient;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PubMqttCallBack pubMqttCallBack;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测试平台mqtt发布消息
|
||||||
|
*/
|
||||||
|
@GetMapping("/publish")
|
||||||
|
public String test(){
|
||||||
|
pubMqttClient.publish(1,true,"/topic/test","mqtt测试主题发布消息!");
|
||||||
|
return "test";
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 测试创建mqtt客户端
|
||||||
|
*/
|
||||||
|
@GetMapping("/subscribe")
|
||||||
|
public String test2(){
|
||||||
|
// pubMqttClient
|
||||||
|
return "test2";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,75 @@
|
|||||||
|
package com.fastbee.data.controller.sse;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.fastbee.common.core.controller.BaseController;
|
||||||
|
import com.fastbee.common.core.domain.AjaxResult;
|
||||||
|
import com.fastbee.common.core.domain.AjaxResultPro;
|
||||||
|
import com.fastbee.iot.domain.DeviceReportInfo;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/sse")
|
||||||
|
@Slf4j
|
||||||
|
@CrossOrigin(origins = "*")
|
||||||
|
public class DeviceReportSSEController extends BaseController {
|
||||||
|
private final Map<String, SseEmitter> emitters = new ConcurrentHashMap<>();//用户消息推送集合
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 与客户端建立http长链接
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/device/init",produces = MediaType.TEXT_EVENT_STREAM_VALUE)
|
||||||
|
public SseEmitter getReport() throws IOException {
|
||||||
|
SseEmitter emitter= new SseEmitter(0L);
|
||||||
|
emitters.put("device-init",emitter);
|
||||||
|
emitter.send(JSONUtil.toJsonStr(Message.builder().event(1).content("连接成功!").build()));
|
||||||
|
return emitter;
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/device/init/new")
|
||||||
|
public AjaxResultPro sendMsg(@RequestBody DeviceReportInfo reportInfo) {
|
||||||
|
try{
|
||||||
|
SseEmitter emitter = emitters.get("device-init");
|
||||||
|
if(emitter==null){
|
||||||
|
return AjaxResultPro.error("审核员离线!请到管理后台打开设备初始化页面!");
|
||||||
|
}
|
||||||
|
emitter.send(JSONUtil.toJsonStr(Message.builder().event(2).content("新的消息").data(reportInfo).build()));
|
||||||
|
return AjaxResultPro.success();
|
||||||
|
}catch (Exception e){
|
||||||
|
log.error("发送消息失败",e);
|
||||||
|
return AjaxResultPro.error("系统错误!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/device/init/new/remove")
|
||||||
|
public AjaxResultPro removeMsg() {
|
||||||
|
emitters.clear();
|
||||||
|
return AjaxResultPro.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/device/init/new/text")
|
||||||
|
public void sendMsgText(@RequestBody DeviceReportInfo reportInfo) throws IOException {
|
||||||
|
SseEmitter emitter = emitters.get("device-init");
|
||||||
|
DeviceReportInfo deviceReportInfo = new DeviceReportInfo();
|
||||||
|
deviceReportInfo.setImei("10086");
|
||||||
|
deviceReportInfo.setIccid("10086");
|
||||||
|
deviceReportInfo.setMcuId("wqewqewq");
|
||||||
|
deviceReportInfo.setBspType("iwqjriqw");
|
||||||
|
deviceReportInfo.setLteType("rui");
|
||||||
|
deviceReportInfo.setMcuType("mcu");
|
||||||
|
deviceReportInfo.setMcuFw("1.0.0");
|
||||||
|
deviceReportInfo.setLteFw("opodaojdao");
|
||||||
|
deviceReportInfo.setLcdManufacturer(1L);
|
||||||
|
deviceReportInfo.setVoiceManufacturer(1L);
|
||||||
|
deviceReportInfo.setFramModel("BTOOO");
|
||||||
|
deviceReportInfo.setReplaceManufacturer(1L);
|
||||||
|
deviceReportInfo.setTestRecord("test");
|
||||||
|
if(emitter!=null){
|
||||||
|
emitter.send(JSONUtil.toJsonStr(Message.builder().event(2).content("新的消息").data(deviceReportInfo).build()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.fastbee.data.controller.sse;
|
||||||
|
|
||||||
|
import com.fastbee.iot.domain.DeviceReportInfo;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author mijiupro
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
public class Message {
|
||||||
|
private String content;
|
||||||
|
private Integer event;
|
||||||
|
private DeviceReportInfo data;
|
||||||
|
}
|
@ -13,86 +13,96 @@ import com.fastbee.common.core.domain.BaseEntity;
|
|||||||
* 设备上电审核前上报的基础信息对象 iot_device_report_info
|
* 设备上电审核前上报的基础信息对象 iot_device_report_info
|
||||||
*
|
*
|
||||||
* @author kerwincui
|
* @author kerwincui
|
||||||
* @date 2024-12-05
|
* @date 2024-12-09
|
||||||
*/
|
*/
|
||||||
@ApiModel(value = "DeviceReportInfo",description = "设备上电审核前上报的基础信息 iot_device_report_info")
|
@ApiModel(value = "DeviceReportInfo",description = "设备上电审核前上报的基础信息 iot_device_report_info")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class DeviceReportInfo extends BaseEntity
|
public class DeviceReportInfo extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** $column.columnComment */
|
/** */
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 模组IMEI号 */
|
/** 模组IMEI号 */
|
||||||
@Excel(name = "模组IMEI号")
|
@Excel(name = "模组IMEI号")
|
||||||
@ApiModelProperty("模组IMEI号")
|
@ApiModelProperty("模组IMEI号")
|
||||||
private String imei;
|
private String imei;
|
||||||
|
|
||||||
/** 流量卡iccid */
|
/** 流量卡iccid */
|
||||||
@Excel(name = "流量卡iccid")
|
@Excel(name = "流量卡iccid")
|
||||||
@ApiModelProperty("流量卡iccid")
|
@ApiModelProperty("流量卡iccid")
|
||||||
private String iccid;
|
private String iccid;
|
||||||
|
|
||||||
/** MCU唯一id */
|
/** MCU唯一id */
|
||||||
@Excel(name = "MCU唯一id")
|
@Excel(name = "MCU唯一id")
|
||||||
@ApiModelProperty("MCU唯一id")
|
@ApiModelProperty("MCU唯一id")
|
||||||
private String mcuId;
|
private String mcuId;
|
||||||
|
|
||||||
/** 硬件板型 */
|
/** 硬件板型 */
|
||||||
@Excel(name = "硬件板型")
|
@Excel(name = "硬件板型")
|
||||||
@ApiModelProperty("硬件板型")
|
@ApiModelProperty("硬件板型")
|
||||||
private String bspType;
|
private String bspType;
|
||||||
|
|
||||||
/** 模组型号 */
|
/** 模组型号 */
|
||||||
@Excel(name = "模组型号")
|
@Excel(name = "模组型号")
|
||||||
@ApiModelProperty("模组型号")
|
@ApiModelProperty("模组型号")
|
||||||
private String lteType;
|
private String lteType;
|
||||||
|
|
||||||
/** MCU型号 */
|
/** MCU型号 */
|
||||||
@Excel(name = "MCU型号")
|
@Excel(name = "MCU型号")
|
||||||
@ApiModelProperty("MCU型号")
|
@ApiModelProperty("MCU型号")
|
||||||
private String mcuType;
|
private String mcuType;
|
||||||
|
|
||||||
/** MCU固件,包含了固件的名称和版本 */
|
/** MCU固件,包含了固件的名称和版本 */
|
||||||
@Excel(name = "MCU固件,包含了固件的名称和版本")
|
@Excel(name = "MCU固件,包含了固件的名称和版本")
|
||||||
@ApiModelProperty("MCU固件,包含了固件的名称和版本")
|
@ApiModelProperty("MCU固件,包含了固件的名称和版本")
|
||||||
private String mcuFw;
|
private String mcuFw;
|
||||||
|
|
||||||
/** 模组固件,包含了固件的名称和版本 */
|
/** 模组固件,包含了固件的名称和版本 */
|
||||||
@Excel(name = "模组固件,包含了固件的名称和版本")
|
@Excel(name = "模组固件,包含了固件的名称和版本")
|
||||||
@ApiModelProperty("模组固件,包含了固件的名称和版本")
|
@ApiModelProperty("模组固件,包含了固件的名称和版本")
|
||||||
private String lteFw;
|
private String lteFw;
|
||||||
|
|
||||||
/** 显示屏厂家,上报1,2,3等类似的数值,通过后台进行录入数值和显示屏厂家对应关系例:1对应GT2116 */
|
/** 显示屏厂家,上报1,2,3等类似的数值,通过后台进行录入数值和显示屏厂家对应关系例:1对应GT2116 */
|
||||||
@Excel(name = "显示屏厂家,上报1,2,3等类似的数值,通过后台进行录入数值和显示屏厂家对应关系例:1对应GT2116")
|
@Excel(name = "显示屏厂家,上报1,2,3等类似的数值,通过后台进行录入数值和显示屏厂家对应关系例:1对应GT2116")
|
||||||
@ApiModelProperty("显示屏厂家,上报1,2,3等类似的数值,通过后台进行录入数值和显示屏厂家对应关系例:1对应GT2116")
|
@ApiModelProperty("显示屏厂家,上报1,2,3等类似的数值,通过后台进行录入数值和显示屏厂家对应关系例:1对应GT2116")
|
||||||
private Long lcdManufacturer;
|
private Long lcdManufacturer;
|
||||||
|
|
||||||
/** 语音厂家,上报1,2,3等类似的数值,通过后台进行录入数值和语音厂家对应关系例:1对应 */
|
/** 语音厂家,上报1,2,3等类似的数值,通过后台进行录入数值和语音厂家对应关系例:1对应 */
|
||||||
@Excel(name = "语音厂家,上报1,2,3等类似的数值,通过后台进行录入数值和语音厂家对应关系例:1对应")
|
@Excel(name = "语音厂家,上报1,2,3等类似的数值,通过后台进行录入数值和语音厂家对应关系例:1对应")
|
||||||
@ApiModelProperty("语音厂家,上报1,2,3等类似的数值,通过后台进行录入数值和语音厂家对应关系例:1对应")
|
@ApiModelProperty("语音厂家,上报1,2,3等类似的数值,通过后台进行录入数值和语音厂家对应关系例:1对应")
|
||||||
private Long voiceManufacturer;
|
private Long voiceManufacturer;
|
||||||
|
|
||||||
/** FRAM型号 */
|
/** FRAM型号 */
|
||||||
@Excel(name = "FRAM型号")
|
@Excel(name = "FRAM型号")
|
||||||
@ApiModelProperty("FRAM型号")
|
@ApiModelProperty("FRAM型号")
|
||||||
private String framModel;
|
private String framModel;
|
||||||
|
|
||||||
/** 代工厂家,上报1,2,3等类似的数值,通过后台进行录入数值和代工厂家对应关系例:1对应 */
|
/** 代工厂家,上报1,2,3等类似的数值,通过后台进行录入数值和代工厂家对应关系例:1对应 */
|
||||||
@Excel(name = "代工厂家,上报1,2,3等类似的数值,通过后台进行录入数值和代工厂家对应关系例:1对应")
|
@Excel(name = "代工厂家,上报1,2,3等类似的数值,通过后台进行录入数值和代工厂家对应关系例:1对应")
|
||||||
@ApiModelProperty("代工厂家,上报1,2,3等类似的数值,通过后台进行录入数值和代工厂家对应关系例:1对应")
|
@ApiModelProperty("代工厂家,上报1,2,3等类似的数值,通过后台进行录入数值和代工厂家对应关系例:1对应")
|
||||||
private Long replaceManufacturer;
|
private Long replaceManufacturer;
|
||||||
|
|
||||||
/** 记录测试的过程,包括了测试脉冲次数、第一次上电时间等待补充信息 */
|
/** 记录测试的过程,包括了测试脉冲次数、第一次上电时间等待补充信息 */
|
||||||
@Excel(name = "记录测试的过程,包括了测试脉冲次数、第一次上电时间等待补充信息")
|
@Excel(name = "记录测试的过程,包括了测试脉冲次数、第一次上电时间等待补充信息")
|
||||||
@ApiModelProperty("记录测试的过程,包括了测试脉冲次数、第一次上电时间等待补充信息")
|
@ApiModelProperty("记录测试的过程,包括了测试脉冲次数、第一次上电时间等待补充信息")
|
||||||
private String testRecord;
|
private String testRecord;
|
||||||
|
|
||||||
/** 批号 */
|
/** 批号 */
|
||||||
@Excel(name = "批号")
|
@Excel(name = "批号")
|
||||||
@ApiModelProperty("批号")
|
@ApiModelProperty("批号")
|
||||||
private Long batchNumber;
|
private Long batchNumber;
|
||||||
|
|
||||||
|
/** 设备编号 */
|
||||||
|
@Excel(name = "设备编号")
|
||||||
|
@ApiModelProperty("设备编号")
|
||||||
|
private String serialNumber;
|
||||||
|
|
||||||
|
/** 二维码 */
|
||||||
|
@Excel(name = "二维码")
|
||||||
|
@ApiModelProperty("二维码")
|
||||||
|
private String qrCode;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,10 @@ public class DeviceReportInfoServiceImpl implements IDeviceReportInfoService
|
|||||||
@Autowired
|
@Autowired
|
||||||
private DeviceReportInfoMapper deviceReportInfoMapper;
|
private DeviceReportInfoMapper deviceReportInfoMapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询设备上电审核前上报的基础信息
|
* 查询设备上电审核前上报的基础信息
|
||||||
*
|
*
|
||||||
|
@ -20,10 +20,12 @@
|
|||||||
<result property="replaceManufacturer" column="replace_manufacturer" />
|
<result property="replaceManufacturer" column="replace_manufacturer" />
|
||||||
<result property="testRecord" column="test_record" />
|
<result property="testRecord" column="test_record" />
|
||||||
<result property="batchNumber" column="batch_number" />
|
<result property="batchNumber" column="batch_number" />
|
||||||
|
<result property="serialNumber" column="serial_number" />
|
||||||
|
<result property="qrCode" column="qr_code" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectDeviceReportInfoVo">
|
<sql id="selectDeviceReportInfoVo">
|
||||||
select id, imei, iccid, mcu_id, bsp_type, lte_type, mcu_type, mcu_fw, lte_fw, lcd_manufacturer, voice_manufacturer, fram_model, replace_manufacturer, test_record, batch_number from iot_device_report_info
|
select id, imei, iccid, mcu_id, bsp_type, lte_type, mcu_type, mcu_fw, lte_fw, lcd_manufacturer, voice_manufacturer, fram_model, replace_manufacturer, test_record, batch_number, serial_number, qr_code from iot_device_report_info
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDeviceReportInfoList" parameterType="DeviceReportInfo" resultMap="DeviceReportInfoResult">
|
<select id="selectDeviceReportInfoList" parameterType="DeviceReportInfo" resultMap="DeviceReportInfoResult">
|
||||||
@ -43,6 +45,8 @@
|
|||||||
<if test="replaceManufacturer != null "> and replace_manufacturer = #{replaceManufacturer}</if>
|
<if test="replaceManufacturer != null "> and replace_manufacturer = #{replaceManufacturer}</if>
|
||||||
<if test="testRecord != null and testRecord != ''"> and test_record = #{testRecord}</if>
|
<if test="testRecord != null and testRecord != ''"> and test_record = #{testRecord}</if>
|
||||||
<if test="batchNumber != null "> and batch_number = #{batchNumber}</if>
|
<if test="batchNumber != null "> and batch_number = #{batchNumber}</if>
|
||||||
|
<if test="serialNumber != null and serialNumber != ''"> and serial_number = #{serialNumber}</if>
|
||||||
|
<if test="qrCode != null and qrCode != ''"> and qr_code = #{qrCode}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -68,6 +72,8 @@
|
|||||||
<if test="replaceManufacturer != null">replace_manufacturer,</if>
|
<if test="replaceManufacturer != null">replace_manufacturer,</if>
|
||||||
<if test="testRecord != null">test_record,</if>
|
<if test="testRecord != null">test_record,</if>
|
||||||
<if test="batchNumber != null">batch_number,</if>
|
<if test="batchNumber != null">batch_number,</if>
|
||||||
|
<if test="serialNumber != null">serial_number,</if>
|
||||||
|
<if test="qrCode != null">qr_code,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="imei != null and imei != ''">#{imei},</if>
|
<if test="imei != null and imei != ''">#{imei},</if>
|
||||||
@ -84,6 +90,8 @@
|
|||||||
<if test="replaceManufacturer != null">#{replaceManufacturer},</if>
|
<if test="replaceManufacturer != null">#{replaceManufacturer},</if>
|
||||||
<if test="testRecord != null">#{testRecord},</if>
|
<if test="testRecord != null">#{testRecord},</if>
|
||||||
<if test="batchNumber != null">#{batchNumber},</if>
|
<if test="batchNumber != null">#{batchNumber},</if>
|
||||||
|
<if test="serialNumber != null">#{serialNumber},</if>
|
||||||
|
<if test="qrCode != null">#{qrCode},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -104,6 +112,8 @@
|
|||||||
<if test="replaceManufacturer != null">replace_manufacturer = #{replaceManufacturer},</if>
|
<if test="replaceManufacturer != null">replace_manufacturer = #{replaceManufacturer},</if>
|
||||||
<if test="testRecord != null">test_record = #{testRecord},</if>
|
<if test="testRecord != null">test_record = #{testRecord},</if>
|
||||||
<if test="batchNumber != null">batch_number = #{batchNumber},</if>
|
<if test="batchNumber != null">batch_number = #{batchNumber},</if>
|
||||||
|
<if test="serialNumber != null">serial_number = #{serialNumber},</if>
|
||||||
|
<if test="qrCode != null">qr_code = #{qrCode},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
@ -69,7 +69,6 @@ public class ProjectServiceImpl implements IProjectService
|
|||||||
this.toolService = toolService;
|
this.toolService = toolService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据主键查询项目
|
* 根据主键查询项目
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user