设备上电审核前上报的基础信息表管理接口,以及设备厂商管理接口调整等
This commit is contained in:
@ -23,6 +23,7 @@
|
|||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<!-- spring-boot-devtools -->
|
<!-- spring-boot-devtools -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
@ -16,7 +16,7 @@ public class FastBeeApplication
|
|||||||
{
|
{
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
// System.setProperty("spring.devtools.restart.enabled", "false");
|
System.setProperty("spring.devtools.restart.enabled", "false");
|
||||||
SpringApplication.run(FastBeeApplication.class, args);
|
SpringApplication.run(FastBeeApplication.class, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -143,4 +143,5 @@ public class SysDictTypeController extends BaseController
|
|||||||
List<SysDictType> dictTypes = dictTypeService.selectDictTypeAll();
|
List<SysDictType> dictTypes = dictTypeService.selectDictTypeAll();
|
||||||
return success(dictTypes);
|
return success(dictTypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,13 @@
|
|||||||
<artifactId>spring-web</artifactId>
|
<artifactId>spring-web</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- websocket-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-websocket</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<!-- spring security 安全认证 -->
|
<!-- spring security 安全认证 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
@ -62,6 +62,8 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
<!-- <groupId>com.fastbee</groupId>-->
|
<!-- <groupId>com.fastbee</groupId>-->
|
||||||
<!-- <artifactId>fastbee-project-service</artifactId>-->
|
<!-- <artifactId>fastbee-project-service</artifactId>-->
|
||||||
|
@ -31,7 +31,7 @@ import com.fastbee.common.core.page.TableDataInfo;
|
|||||||
* @date 2024-12-05
|
* @date 2024-12-05
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/iot/info")
|
@RequestMapping("/iot/device/report/info")
|
||||||
@Api(tags = "设备上电审核前上报的基础信息")
|
@Api(tags = "设备上电审核前上报的基础信息")
|
||||||
public class DeviceReportInfoController extends BaseController
|
public class DeviceReportInfoController extends BaseController
|
||||||
{
|
{
|
||||||
|
@ -30,7 +30,7 @@ import com.fastbee.common.core.page.TableDataInfo;
|
|||||||
* @date 2024-11-13
|
* @date 2024-11-13
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/renke/manufacturers")
|
@RequestMapping("/device/manufacturers")
|
||||||
@Api(tags = "设备厂家信息")
|
@Api(tags = "设备厂家信息")
|
||||||
public class DeviceManufacturersController extends BaseController
|
public class DeviceManufacturersController extends BaseController
|
||||||
{
|
{
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.fastbee.data.controller.websocket;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hanjinqun
|
||||||
|
* @date 2022/10/24
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
public class WebSocketConfig {
|
||||||
|
@Bean
|
||||||
|
public ServerEndpointExporter serverEndpointExporter() {
|
||||||
|
return new ServerEndpointExporter();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package com.fastbee.data.controller.websocket;
|
||||||
|
|
||||||
|
import com.fastbee.common.core.domain.AjaxResult;
|
||||||
|
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ws发送消息测试
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(value = "/api/v1/websocket")
|
||||||
|
|
||||||
|
public class WebSocketController {
|
||||||
|
@Autowired
|
||||||
|
private WebSocketService webSocketServer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模拟数据发送
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/sendTestMessage", method = RequestMethod.GET)
|
||||||
|
public AjaxResult sendTestMessage(String message) {
|
||||||
|
try {
|
||||||
|
// webSocketServer.sendAllMessage(message);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return AjaxResult.error();
|
||||||
|
}
|
||||||
|
return AjaxResult.success("发送成功");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,134 @@
|
|||||||
|
package com.fastbee.data.controller.websocket;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.websocket.*;
|
||||||
|
import javax.websocket.server.PathParam;
|
||||||
|
import javax.websocket.server.ServerEndpoint;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
import java.util.concurrent.CopyOnWriteArraySet;
|
||||||
|
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@ServerEndpoint("/websocket/{userId}")
|
||||||
|
public class WebSocketService {
|
||||||
|
/**
|
||||||
|
* 日志工具
|
||||||
|
*/
|
||||||
|
private Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||||
|
/**
|
||||||
|
* 与某个客户端的连接会话,需要通过它来给客户端发送数据
|
||||||
|
*/
|
||||||
|
private Session session;
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
private String userId;
|
||||||
|
/**
|
||||||
|
* 用来存放每个客户端对应的MyWebSocket对象
|
||||||
|
*/
|
||||||
|
private static CopyOnWriteArraySet<WebSocketService> webSockets = new CopyOnWriteArraySet<>();
|
||||||
|
/**
|
||||||
|
* 用来存在线连接用户信息
|
||||||
|
*/
|
||||||
|
private static ConcurrentHashMap<String, Session> sessionPool = new ConcurrentHashMap<String, Session>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 链接成功调用的方法
|
||||||
|
*/
|
||||||
|
@OnOpen
|
||||||
|
public void onOpen(Session session, @PathParam(value = "userId") String userId) {
|
||||||
|
try {
|
||||||
|
this.session = session;
|
||||||
|
this.userId = userId;
|
||||||
|
webSockets.add(this);
|
||||||
|
sessionPool.put(userId, session);
|
||||||
|
logger.info("【websocket消息】有新的连接,总数为:" + webSockets.size());
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 链接关闭调用的方法
|
||||||
|
*/
|
||||||
|
@OnClose
|
||||||
|
public void onClose() {
|
||||||
|
try {
|
||||||
|
webSockets.remove(this);
|
||||||
|
sessionPool.remove(this.userId);
|
||||||
|
logger.info("【websocket消息】连接断开,总数为:" + webSockets.size());
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收到客户端消息后调用的方法
|
||||||
|
*/
|
||||||
|
@OnMessage
|
||||||
|
public void onMessage(String message) {
|
||||||
|
logger.info("【websocket消息】收到客户端消息:" + message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送错误时的处理
|
||||||
|
*
|
||||||
|
* @param session
|
||||||
|
* @param error
|
||||||
|
*/
|
||||||
|
@OnError
|
||||||
|
public void onError(Session session, Throwable error) {
|
||||||
|
logger.error("用户错误,原因:" + error.getMessage());
|
||||||
|
error.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 此为广播消息
|
||||||
|
*/
|
||||||
|
public void sendAllMessage(String message) {
|
||||||
|
logger.info("【websocket消息】广播消息:" + message);
|
||||||
|
for (WebSocketService webSocket : webSockets) {
|
||||||
|
try {
|
||||||
|
if (webSocket.session.isOpen()) {
|
||||||
|
webSocket.session.getAsyncRemote().sendText(message);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 此为单点消息
|
||||||
|
*/
|
||||||
|
public void sendOneMessage(String userId, String message) {
|
||||||
|
Session session = sessionPool.get(userId);
|
||||||
|
if (session != null && session.isOpen()) {
|
||||||
|
try {
|
||||||
|
logger.info("【websocket消息】 单点消息:" + message);
|
||||||
|
session.getAsyncRemote().sendText(message);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 此为单点消息(多人)
|
||||||
|
*/
|
||||||
|
public void sendMoreMessage(String[] userIds, String message) {
|
||||||
|
for (String userId : userIds) {
|
||||||
|
Session session = sessionPool.get(userId);
|
||||||
|
if (session != null && session.isOpen()) {
|
||||||
|
try {
|
||||||
|
logger.info("【websocket消息】 单点消息:" + message);
|
||||||
|
session.getAsyncRemote().sendText(message);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -13,7 +13,7 @@ import com.fastbee.common.core.domain.BaseEntity;
|
|||||||
* 设备厂家信息对象 iot_device_manufacturers
|
* 设备厂家信息对象 iot_device_manufacturers
|
||||||
*
|
*
|
||||||
* @author kerwincui
|
* @author kerwincui
|
||||||
* @date 2024-11-13
|
* @date 2024-12-06
|
||||||
*/
|
*/
|
||||||
@ApiModel(value = "DeviceManufacturers",description = "设备厂家信息 iot_device_manufacturers")
|
@ApiModel(value = "DeviceManufacturers",description = "设备厂家信息 iot_device_manufacturers")
|
||||||
@Data
|
@Data
|
||||||
@ -73,4 +73,9 @@ private static final long serialVersionUID = 1L;
|
|||||||
/** 删除标志(0代表存在,2代表删除) */
|
/** 删除标志(0代表存在,2代表删除) */
|
||||||
private Integer delFlag;
|
private Integer delFlag;
|
||||||
|
|
||||||
|
/** 厂家类型 */
|
||||||
|
@Excel(name = "厂家类型")
|
||||||
|
@ApiModelProperty("厂家类型")
|
||||||
|
private String manufacturerType;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.fastbee.deviceData.mapper.DeviceManufacturersMapper">
|
<mapper namespace="com.fastbee.deviceData.mapper.DeviceManufacturersMapper">
|
||||||
|
|
||||||
<resultMap type="DeviceManufacturers" id="DeviceManufacturersResult">
|
<resultMap type="DeviceManufacturers" id="DeviceManufacturersResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="endpoint" column="endpoint" />
|
<result property="endpoint" column="endpoint" />
|
||||||
@ -20,10 +19,11 @@
|
|||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="manufacturerType" column="manufacturer_type" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectDeviceManufacturersVo">
|
<sql id="selectDeviceManufacturersVo">
|
||||||
select id, endpoint, manufacturer_name, account, password, interface_documentation, api_key, authId, secret_key, tokenEndpoint, del_flag, create_time, create_by, update_time, update_by from iot_device_manufacturers
|
select id, endpoint, manufacturer_name, account, password, interface_documentation, api_key, authId, secret_key, tokenEndpoint, del_flag, create_time, create_by, update_time, update_by, manufacturer_type from iot_device_manufacturers
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDeviceManufacturersList" parameterType="DeviceManufacturers" resultMap="DeviceManufacturersResult">
|
<select id="selectDeviceManufacturersList" parameterType="DeviceManufacturers" resultMap="DeviceManufacturersResult">
|
||||||
@ -38,6 +38,7 @@
|
|||||||
<if test="authid != null and authid != ''"> and authId = #{authid}</if>
|
<if test="authid != null and authid != ''"> and authId = #{authid}</if>
|
||||||
<if test="secretKey != null and secretKey != ''"> and secret_key = #{secretKey}</if>
|
<if test="secretKey != null and secretKey != ''"> and secret_key = #{secretKey}</if>
|
||||||
<if test="tokenendpoint != null and tokenendpoint != ''"> and tokenEndpoint = #{tokenendpoint}</if>
|
<if test="tokenendpoint != null and tokenendpoint != ''"> and tokenEndpoint = #{tokenendpoint}</if>
|
||||||
|
<if test="manufacturerType != null and manufacturerType != ''"> and manufacturer_type = #{manufacturerType}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -63,6 +64,7 @@
|
|||||||
<if test="createBy != null">create_by,</if>
|
<if test="createBy != null">create_by,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="manufacturerType != null">manufacturer_type,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="endpoint != null">#{endpoint},</if>
|
<if test="endpoint != null">#{endpoint},</if>
|
||||||
@ -79,6 +81,7 @@
|
|||||||
<if test="createBy != null">#{createBy},</if>
|
<if test="createBy != null">#{createBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="manufacturerType != null">#{manufacturerType},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -99,6 +102,7 @@
|
|||||||
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="manufacturerType != null">manufacturer_type = #{manufacturerType},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
@ -58,12 +58,12 @@ private static final long serialVersionUID = 1L;
|
|||||||
/** 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")
|
||||||
@ -90,4 +90,9 @@ private static final long serialVersionUID = 1L;
|
|||||||
@ApiModelProperty("记录测试的过程,包括了测试脉冲次数、第一次上电时间等待补充信息")
|
@ApiModelProperty("记录测试的过程,包括了测试脉冲次数、第一次上电时间等待补充信息")
|
||||||
private String testRecord;
|
private String testRecord;
|
||||||
|
|
||||||
|
/** 批号 */
|
||||||
|
@Excel(name = "批号")
|
||||||
|
@ApiModelProperty("批号")
|
||||||
|
private Long batchNumber;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,6 @@ public class DeviceDateTask {
|
|||||||
catch (Exception e){
|
catch (Exception e){
|
||||||
offlineDeviceList.add(deviceEncoding);
|
offlineDeviceList.add(deviceEncoding);
|
||||||
}
|
}
|
||||||
|
|
||||||
DeviceRealtimedataMeteorology deviceRealtimedataMeteorology = metDataService.setData(deviceRealTimeData);
|
DeviceRealtimedataMeteorology deviceRealtimedataMeteorology = metDataService.setData(deviceRealTimeData);
|
||||||
boolean save = meteorologySaveDataService.save(deviceRealtimedataMeteorology);
|
boolean save = meteorologySaveDataService.save(deviceRealtimedataMeteorology);
|
||||||
if (!save){
|
if (!save){
|
||||||
@ -172,8 +171,6 @@ public class DeviceDateTask {
|
|||||||
new LambdaUpdateChainWrapper<>(meteorologyMapper).in(DeviceInformationMeteorology::getDeviceEncoding,offlineDeviceList).set(DeviceInformationMeteorology::getStatus, 0).update();
|
new LambdaUpdateChainWrapper<>(meteorologyMapper).in(DeviceInformationMeteorology::getDeviceEncoding,offlineDeviceList).set(DeviceInformationMeteorology::getStatus, 0).update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 获取墒情设备实时数据并保存
|
* 获取墒情设备实时数据并保存
|
||||||
@ -186,7 +183,6 @@ public class DeviceDateTask {
|
|||||||
//在线设备列表
|
//在线设备列表
|
||||||
List<String> onlineDeviceList = new ArrayList<>();
|
List<String> onlineDeviceList = new ArrayList<>();
|
||||||
try{
|
try{
|
||||||
|
|
||||||
deviceEncodingList.forEach(deviceEncoding->{
|
deviceEncodingList.forEach(deviceEncoding->{
|
||||||
Map<String, String> deviceRealTimeData = new HashMap<>();
|
Map<String, String> deviceRealTimeData = new HashMap<>();
|
||||||
try {
|
try {
|
||||||
@ -206,7 +202,7 @@ public class DeviceDateTask {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e){
|
catch (Exception e){
|
||||||
log.error("获取墒情设备实时数据失败",e);
|
log.error("获取墒情设备实时数据失败:{}",e.getMessage());
|
||||||
if(!offlineDeviceList.isEmpty()){
|
if(!offlineDeviceList.isEmpty()){
|
||||||
new LambdaUpdateChainWrapper<>(moistureMapper).in(DeviceInformationMoisture::getDeviceEncoding,offlineDeviceList).set(DeviceInformationMoisture::getStatus, 0).update();
|
new LambdaUpdateChainWrapper<>(moistureMapper).in(DeviceInformationMoisture::getDeviceEncoding,offlineDeviceList).set(DeviceInformationMoisture::getStatus, 0).update();
|
||||||
}
|
}
|
||||||
|
@ -12,17 +12,18 @@
|
|||||||
<result property="bspType" column="bsp_type" />
|
<result property="bspType" column="bsp_type" />
|
||||||
<result property="lteType" column="lte_type" />
|
<result property="lteType" column="lte_type" />
|
||||||
<result property="mcuType" column="mcu_type" />
|
<result property="mcuType" column="mcu_type" />
|
||||||
<result property="mcufw" column="mcuFw" />
|
<result property="mcuFw" column="mcu_fw" />
|
||||||
<result property="ltefw" column="lteFw" />
|
<result property="lteFw" column="lte_fw" />
|
||||||
<result property="lcdManufacturer" column="lcd_manufacturer" />
|
<result property="lcdManufacturer" column="lcd_manufacturer" />
|
||||||
<result property="voiceManufacturer" column="voice_manufacturer" />
|
<result property="voiceManufacturer" column="voice_manufacturer" />
|
||||||
<result property="framModel" column="fram_model" />
|
<result property="framModel" column="fram_model" />
|
||||||
<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" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectDeviceReportInfoVo">
|
<sql id="selectDeviceReportInfoVo">
|
||||||
select id, imei, iccid, mcu_id, bsp_type, lte_type, mcu_type, mcuFw, lteFw, lcd_manufacturer, voice_manufacturer, fram_model, replace_manufacturer, test_record 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 from iot_device_report_info
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDeviceReportInfoList" parameterType="DeviceReportInfo" resultMap="DeviceReportInfoResult">
|
<select id="selectDeviceReportInfoList" parameterType="DeviceReportInfo" resultMap="DeviceReportInfoResult">
|
||||||
@ -34,13 +35,14 @@
|
|||||||
<if test="bspType != null and bspType != ''"> and bsp_type = #{bspType}</if>
|
<if test="bspType != null and bspType != ''"> and bsp_type = #{bspType}</if>
|
||||||
<if test="lteType != null and lteType != ''"> and lte_type = #{lteType}</if>
|
<if test="lteType != null and lteType != ''"> and lte_type = #{lteType}</if>
|
||||||
<if test="mcuType != null and mcuType != ''"> and mcu_type = #{mcuType}</if>
|
<if test="mcuType != null and mcuType != ''"> and mcu_type = #{mcuType}</if>
|
||||||
<if test="mcufw != null and mcufw != ''"> and mcuFw = #{mcufw}</if>
|
<if test="mcuFw != null and mcuFw != ''"> and mcu_fw = #{mcuFw}</if>
|
||||||
<if test="ltefw != null and ltefw != ''"> and lteFw = #{ltefw}</if>
|
<if test="lteFw != null and lteFw != ''"> and lte_fw = #{lteFw}</if>
|
||||||
<if test="lcdManufacturer != null "> and lcd_manufacturer = #{lcdManufacturer}</if>
|
<if test="lcdManufacturer != null "> and lcd_manufacturer = #{lcdManufacturer}</if>
|
||||||
<if test="voiceManufacturer != null "> and voice_manufacturer = #{voiceManufacturer}</if>
|
<if test="voiceManufacturer != null "> and voice_manufacturer = #{voiceManufacturer}</if>
|
||||||
<if test="framModel != null and framModel != ''"> and fram_model = #{framModel}</if>
|
<if test="framModel != null and framModel != ''"> and fram_model = #{framModel}</if>
|
||||||
<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>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -58,13 +60,14 @@
|
|||||||
<if test="bspType != null and bspType != ''">bsp_type,</if>
|
<if test="bspType != null and bspType != ''">bsp_type,</if>
|
||||||
<if test="lteType != null and lteType != ''">lte_type,</if>
|
<if test="lteType != null and lteType != ''">lte_type,</if>
|
||||||
<if test="mcuType != null and mcuType != ''">mcu_type,</if>
|
<if test="mcuType != null and mcuType != ''">mcu_type,</if>
|
||||||
<if test="mcufw != null and mcufw != ''">mcuFw,</if>
|
<if test="mcuFw != null and mcuFw != ''">mcu_fw,</if>
|
||||||
<if test="ltefw != null and ltefw != ''">lteFw,</if>
|
<if test="lteFw != null and lteFw != ''">lte_fw,</if>
|
||||||
<if test="lcdManufacturer != null">lcd_manufacturer,</if>
|
<if test="lcdManufacturer != null">lcd_manufacturer,</if>
|
||||||
<if test="voiceManufacturer != null">voice_manufacturer,</if>
|
<if test="voiceManufacturer != null">voice_manufacturer,</if>
|
||||||
<if test="framModel != null and framModel != ''">fram_model,</if>
|
<if test="framModel != null and framModel != ''">fram_model,</if>
|
||||||
<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>
|
||||||
</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>
|
||||||
@ -73,13 +76,14 @@
|
|||||||
<if test="bspType != null and bspType != ''">#{bspType},</if>
|
<if test="bspType != null and bspType != ''">#{bspType},</if>
|
||||||
<if test="lteType != null and lteType != ''">#{lteType},</if>
|
<if test="lteType != null and lteType != ''">#{lteType},</if>
|
||||||
<if test="mcuType != null and mcuType != ''">#{mcuType},</if>
|
<if test="mcuType != null and mcuType != ''">#{mcuType},</if>
|
||||||
<if test="mcufw != null and mcufw != ''">#{mcufw},</if>
|
<if test="mcuFw != null and mcuFw != ''">#{mcuFw},</if>
|
||||||
<if test="ltefw != null and ltefw != ''">#{ltefw},</if>
|
<if test="lteFw != null and lteFw != ''">#{lteFw},</if>
|
||||||
<if test="lcdManufacturer != null">#{lcdManufacturer},</if>
|
<if test="lcdManufacturer != null">#{lcdManufacturer},</if>
|
||||||
<if test="voiceManufacturer != null">#{voiceManufacturer},</if>
|
<if test="voiceManufacturer != null">#{voiceManufacturer},</if>
|
||||||
<if test="framModel != null and framModel != ''">#{framModel},</if>
|
<if test="framModel != null and framModel != ''">#{framModel},</if>
|
||||||
<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>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -92,13 +96,14 @@
|
|||||||
<if test="bspType != null and bspType != ''">bsp_type = #{bspType},</if>
|
<if test="bspType != null and bspType != ''">bsp_type = #{bspType},</if>
|
||||||
<if test="lteType != null and lteType != ''">lte_type = #{lteType},</if>
|
<if test="lteType != null and lteType != ''">lte_type = #{lteType},</if>
|
||||||
<if test="mcuType != null and mcuType != ''">mcu_type = #{mcuType},</if>
|
<if test="mcuType != null and mcuType != ''">mcu_type = #{mcuType},</if>
|
||||||
<if test="mcufw != null and mcufw != ''">mcuFw = #{mcufw},</if>
|
<if test="mcuFw != null and mcuFw != ''">mcu_fw = #{mcuFw},</if>
|
||||||
<if test="ltefw != null and ltefw != ''">lteFw = #{ltefw},</if>
|
<if test="lteFw != null and lteFw != ''">lte_fw = #{lteFw},</if>
|
||||||
<if test="lcdManufacturer != null">lcd_manufacturer = #{lcdManufacturer},</if>
|
<if test="lcdManufacturer != null">lcd_manufacturer = #{lcdManufacturer},</if>
|
||||||
<if test="voiceManufacturer != null">voice_manufacturer = #{voiceManufacturer},</if>
|
<if test="voiceManufacturer != null">voice_manufacturer = #{voiceManufacturer},</if>
|
||||||
<if test="framModel != null and framModel != ''">fram_model = #{framModel},</if>
|
<if test="framModel != null and framModel != ''">fram_model = #{framModel},</if>
|
||||||
<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>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
Reference in New Issue
Block a user