设备上电审核前上报的基础信息表管理接口,以及设备厂商管理接口调整等

This commit is contained in:
mi9688
2024-12-06 17:34:01 +08:00
parent 6aaed01915
commit 71f4f3b139
15 changed files with 260 additions and 48 deletions

View File

@ -13,64 +13,69 @@ import com.fastbee.common.core.domain.BaseEntity;
* 设备厂家信息对象 iot_device_manufacturers
*
* @author kerwincui
* @date 2024-11-13
* @date 2024-12-06
*/
@ApiModel(value = "DeviceManufacturers",description = "设备厂家信息 iot_device_manufacturers")
@Data
@EqualsAndHashCode(callSuper = true)
public class DeviceManufacturers extends BaseEntity
{
private static final long serialVersionUID = 1L;
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 厂家链接,接口基地址 */
@Excel(name = "厂家链接,接口基地址")
@ApiModelProperty("厂家链接,接口基地址")
@Excel(name = "厂家链接,接口基地址")
@ApiModelProperty("厂家链接,接口基地址")
private String endpoint;
/** 厂名称 */
@Excel(name = "厂名称")
@ApiModelProperty("厂名称")
@Excel(name = "厂名称")
@ApiModelProperty("厂名称")
private String manufacturerName;
/** 帐户 */
@Excel(name = "帐户")
@ApiModelProperty("帐户")
@Excel(name = "帐户")
@ApiModelProperty("帐户")
private String account;
/** 密码 */
@Excel(name = "密码")
@ApiModelProperty("密码")
@Excel(name = "密码")
@ApiModelProperty("密码")
private String password;
/** 接口文档 */
@Excel(name = "接口文档")
@ApiModelProperty("接口文档")
@Excel(name = "接口文档")
@ApiModelProperty("接口文档")
private String interfaceDocumentation;
/** api-key */
@Excel(name = "api-key")
@ApiModelProperty("api-key")
@Excel(name = "api-key")
@ApiModelProperty("api-key")
private String apiKey;
/** authId */
@Excel(name = "authId")
@ApiModelProperty("authId")
@Excel(name = "authId")
@ApiModelProperty("authId")
private String authid;
/** secret-key */
@Excel(name = "secret-key")
@ApiModelProperty("secret-key")
@Excel(name = "secret-key")
@ApiModelProperty("secret-key")
private String secretKey;
/** 厂家鉴权接口地址 */
@Excel(name = "厂家鉴权接口地址")
@ApiModelProperty("厂家鉴权接口地址")
@Excel(name = "厂家鉴权接口地址")
@ApiModelProperty("厂家鉴权接口地址")
private String tokenendpoint;
/** 删除标志0代表存在2代表删除 */
private Integer delFlag;
/** 厂家类型 */
@Excel(name = "厂家类型")
@ApiModelProperty("厂家类型")
private String manufacturerType;
}

View File

@ -3,7 +3,6 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fastbee.deviceData.mapper.DeviceManufacturersMapper">
<resultMap type="DeviceManufacturers" id="DeviceManufacturersResult">
<result property="id" column="id" />
<result property="endpoint" column="endpoint" />
@ -20,10 +19,11 @@
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="manufacturerType" column="manufacturer_type" />
</resultMap>
<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>
<select id="selectDeviceManufacturersList" parameterType="DeviceManufacturers" resultMap="DeviceManufacturersResult">
@ -38,6 +38,7 @@
<if test="authid != null and authid != ''"> and authId = #{authid}</if>
<if test="secretKey != null and secretKey != ''"> and secret_key = #{secretKey}</if>
<if test="tokenendpoint != null and tokenendpoint != ''"> and tokenEndpoint = #{tokenendpoint}</if>
<if test="manufacturerType != null and manufacturerType != ''"> and manufacturer_type = #{manufacturerType}</if>
</where>
</select>
@ -63,6 +64,7 @@
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="manufacturerType != null">manufacturer_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="endpoint != null">#{endpoint},</if>
@ -79,6 +81,7 @@
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="manufacturerType != null">#{manufacturerType},</if>
</trim>
</insert>
@ -99,6 +102,7 @@
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="manufacturerType != null">manufacturer_type = #{manufacturerType},</if>
</trim>
where id = #{id}
</update>

View File

@ -58,12 +58,12 @@ private static final long serialVersionUID = 1L;
/** MCU固件包含了固件的名称和版本 */
@Excel(name = "MCU固件包含了固件的名称和版本")
@ApiModelProperty("MCU固件包含了固件的名称和版本")
private String mcufw;
private String mcuFw;
/** 模组固件,包含了固件的名称和版本 */
@Excel(name = "模组固件,包含了固件的名称和版本")
@ApiModelProperty("模组固件,包含了固件的名称和版本")
private String ltefw;
private String lteFw;
/** 显示屏厂家上报123等类似的数值通过后台进行录入数值和显示屏厂家对应关系例1对应GT2116 */
@Excel(name = "显示屏厂家上报123等类似的数值通过后台进行录入数值和显示屏厂家对应关系例1对应GT2116")
@ -90,4 +90,9 @@ private static final long serialVersionUID = 1L;
@ApiModelProperty("记录测试的过程,包括了测试脉冲次数、第一次上电时间等待补充信息")
private String testRecord;
/** 批号 */
@Excel(name = "批号")
@ApiModelProperty("批号")
private Long batchNumber;
}

View File

@ -154,7 +154,6 @@ public class DeviceDateTask {
catch (Exception e){
offlineDeviceList.add(deviceEncoding);
}
DeviceRealtimedataMeteorology deviceRealtimedataMeteorology = metDataService.setData(deviceRealTimeData);
boolean save = meteorologySaveDataService.save(deviceRealtimedataMeteorology);
if (!save){
@ -172,8 +171,6 @@ public class DeviceDateTask {
new LambdaUpdateChainWrapper<>(meteorologyMapper).in(DeviceInformationMeteorology::getDeviceEncoding,offlineDeviceList).set(DeviceInformationMeteorology::getStatus, 0).update();
}
}
}
/**
* 获取墒情设备实时数据并保存
@ -186,7 +183,6 @@ public class DeviceDateTask {
//在线设备列表
List<String> onlineDeviceList = new ArrayList<>();
try{
deviceEncodingList.forEach(deviceEncoding->{
Map<String, String> deviceRealTimeData = new HashMap<>();
try {
@ -206,7 +202,7 @@ public class DeviceDateTask {
}
}
catch (Exception e){
log.error("获取墒情设备实时数据失败",e);
log.error("获取墒情设备实时数据失败:{}",e.getMessage());
if(!offlineDeviceList.isEmpty()){
new LambdaUpdateChainWrapper<>(moistureMapper).in(DeviceInformationMoisture::getDeviceEncoding,offlineDeviceList).set(DeviceInformationMoisture::getStatus, 0).update();
}

View File

@ -12,17 +12,18 @@
<result property="bspType" column="bsp_type" />
<result property="lteType" column="lte_type" />
<result property="mcuType" column="mcu_type" />
<result property="mcufw" column="mcuFw" />
<result property="ltefw" column="lteFw" />
<result property="mcuFw" column="mcu_fw" />
<result property="lteFw" column="lte_fw" />
<result property="lcdManufacturer" column="lcd_manufacturer" />
<result property="voiceManufacturer" column="voice_manufacturer" />
<result property="framModel" column="fram_model" />
<result property="replaceManufacturer" column="replace_manufacturer" />
<result property="testRecord" column="test_record" />
<result property="batchNumber" column="batch_number" />
</resultMap>
<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>
<select id="selectDeviceReportInfoList" parameterType="DeviceReportInfo" resultMap="DeviceReportInfoResult">
@ -34,13 +35,14 @@
<if test="bspType != null and bspType != ''"> and bsp_type = #{bspType}</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="mcufw != null and mcufw != ''"> and mcuFw = #{mcufw}</if>
<if test="ltefw != null and ltefw != ''"> and lteFw = #{ltefw}</if>
<if test="mcuFw != null and mcuFw != ''"> and mcu_fw = #{mcuFw}</if>
<if test="lteFw != null and lteFw != ''"> and lte_fw = #{lteFw}</if>
<if test="lcdManufacturer != null "> and lcd_manufacturer = #{lcdManufacturer}</if>
<if test="voiceManufacturer != null "> and voice_manufacturer = #{voiceManufacturer}</if>
<if test="framModel != null and framModel != ''"> and fram_model = #{framModel}</if>
<if test="replaceManufacturer != null "> and replace_manufacturer = #{replaceManufacturer}</if>
<if test="testRecord != null and testRecord != ''"> and test_record = #{testRecord}</if>
<if test="batchNumber != null "> and batch_number = #{batchNumber}</if>
</where>
</select>
@ -58,13 +60,14 @@
<if test="bspType != null and bspType != ''">bsp_type,</if>
<if test="lteType != null and lteType != ''">lte_type,</if>
<if test="mcuType != null and mcuType != ''">mcu_type,</if>
<if test="mcufw != null and mcufw != ''">mcuFw,</if>
<if test="ltefw != null and ltefw != ''">lteFw,</if>
<if test="mcuFw != null and mcuFw != ''">mcu_fw,</if>
<if test="lteFw != null and lteFw != ''">lte_fw,</if>
<if test="lcdManufacturer != null">lcd_manufacturer,</if>
<if test="voiceManufacturer != null">voice_manufacturer,</if>
<if test="framModel != null and framModel != ''">fram_model,</if>
<if test="replaceManufacturer != null">replace_manufacturer,</if>
<if test="testRecord != null">test_record,</if>
<if test="batchNumber != null">batch_number,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="imei != null and imei != ''">#{imei},</if>
@ -73,13 +76,14 @@
<if test="bspType != null and bspType != ''">#{bspType},</if>
<if test="lteType != null and lteType != ''">#{lteType},</if>
<if test="mcuType != null and mcuType != ''">#{mcuType},</if>
<if test="mcufw != null and mcufw != ''">#{mcufw},</if>
<if test="ltefw != null and ltefw != ''">#{ltefw},</if>
<if test="mcuFw != null and mcuFw != ''">#{mcuFw},</if>
<if test="lteFw != null and lteFw != ''">#{lteFw},</if>
<if test="lcdManufacturer != null">#{lcdManufacturer},</if>
<if test="voiceManufacturer != null">#{voiceManufacturer},</if>
<if test="framModel != null and framModel != ''">#{framModel},</if>
<if test="replaceManufacturer != null">#{replaceManufacturer},</if>
<if test="testRecord != null">#{testRecord},</if>
<if test="batchNumber != null">#{batchNumber},</if>
</trim>
</insert>
@ -92,13 +96,14 @@
<if test="bspType != null and bspType != ''">bsp_type = #{bspType},</if>
<if test="lteType != null and lteType != ''">lte_type = #{lteType},</if>
<if test="mcuType != null and mcuType != ''">mcu_type = #{mcuType},</if>
<if test="mcufw != null and mcufw != ''">mcuFw = #{mcufw},</if>
<if test="ltefw != null and ltefw != ''">lteFw = #{ltefw},</if>
<if test="mcuFw != null and mcuFw != ''">mcu_fw = #{mcuFw},</if>
<if test="lteFw != null and lteFw != ''">lte_fw = #{lteFw},</if>
<if test="lcdManufacturer != null">lcd_manufacturer = #{lcdManufacturer},</if>
<if test="voiceManufacturer != null">voice_manufacturer = #{voiceManufacturer},</if>
<if test="framModel != null and framModel != ''">fram_model = #{framModel},</if>
<if test="replaceManufacturer != null">replace_manufacturer = #{replaceManufacturer},</if>
<if test="testRecord != null">test_record = #{testRecord},</if>
<if test="batchNumber != null">batch_number = #{batchNumber},</if>
</trim>
where id = #{id}
</update>