feat(iot): 新增设备类型字段和分组管理功能
- 在 iot_things_model 表添加 dev_type 设备类型字段 - 修改 model_name 字段字符集并更新注释 - 新增设备类型字典数据和翻译配置 - 创建 iot_group 设备分组表并初始化基础数据 - 在 iot_category 表添加 industry_code 设备编码字段 - 更新 ThingsModel 实体类添加 devType 属性 - 修改 Excel 导入功能支持 sheetName 参数并优化类型识别逻辑 - 更新数据库映射文件支持设备类型字段操作 - 优化缓存实现按设备类型区分标识符避免冲突 - 调整导入数据验证逻辑并完善错误处理机制 Signed-off-by: Gjm <你的邮箱>
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="isReadonly" column="is_readonly"/>
|
||||
<result property="modelOrder" column="model_order"/>
|
||||
<result property="devType" column="dev_type"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="iot.lidee.iot.model.ThingsModelPerm" id="ThingsModelPermResult">
|
||||
@@ -70,7 +71,8 @@
|
||||
update_time,
|
||||
remark,
|
||||
is_readonly,
|
||||
model_order
|
||||
model_order,
|
||||
dev_type
|
||||
from iot_things_model
|
||||
</sql>
|
||||
|
||||
@@ -84,13 +86,16 @@
|
||||
m.model_name as model_name_zh_cn, t.en_us as model_name_en_us,
|
||||
m.product_id, m.product_name, m.tenant_id, m.tenant_name, m.identifier, m.type, m.datatype, m.formula,
|
||||
m.specs, m.is_chart, m.is_share_perm, m.is_history, m.is_monitor, m.is_app, m.del_flag, m.create_by,
|
||||
m.create_time, m.update_by, m.update_time, m.remark, m.is_readonly, m.model_order
|
||||
m.create_time, m.update_by, m.update_time, m.remark, m.is_readonly, m.model_order,m.dev_type
|
||||
from iot_things_model m
|
||||
left join iot_things_model_translate t on m.model_id = t.id
|
||||
<where>
|
||||
<if test="productId != null">
|
||||
and m.product_id = #{productId}
|
||||
</if>
|
||||
<if test="modelName != null and modelName != ''">
|
||||
and model_name like concat('%',#{modelName},'%')
|
||||
</if>
|
||||
<if test="type!=null">
|
||||
and type = #{type}
|
||||
</if>
|
||||
@@ -106,6 +111,9 @@
|
||||
<if test="isReadonly != null ">
|
||||
and is_readonly = #{isReadonly}
|
||||
</if>
|
||||
<if test="devType != null ">
|
||||
and dev_type = #{devType}
|
||||
</if>
|
||||
<if test="modelIdList != null ">
|
||||
model_id in
|
||||
<foreach collection="modelIdList" item="item" separator="," open="(" close=")">
|
||||
@@ -157,7 +165,7 @@
|
||||
end as model_name,
|
||||
m.product_id, m.product_name, m.tenant_id, m.tenant_name, m.identifier, m.type, m.datatype, m.formula,
|
||||
m.specs, m.is_chart, m.is_share_perm, m.is_history, m.is_monitor, m.is_app, m.del_flag, m.create_by,
|
||||
m.create_time, m.update_by, m.update_time, m.remark, m.is_readonly, m.model_order
|
||||
m.create_time, m.update_by, m.update_time, m.remark, m.is_readonly, m.model_order,m.dev_type
|
||||
from iot_things_model m
|
||||
left join iot_things_model_translate t on m.model_id = t.id
|
||||
where model_id = #{modelId}
|
||||
@@ -258,6 +266,9 @@
|
||||
<if test="modelOrder != null">
|
||||
model_order,
|
||||
</if>
|
||||
<if test="devType != null">
|
||||
dev_type,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="modelName != null and modelName != ''">
|
||||
@@ -329,6 +340,9 @@
|
||||
<if test="modelOrder != null">
|
||||
#{modelOrder},
|
||||
</if>
|
||||
<if test="devType != null">
|
||||
#{devType},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -438,6 +452,9 @@
|
||||
<if test="modelOrder != null">
|
||||
model_order = #{modelOrder},
|
||||
</if>
|
||||
<if test="devType != null">
|
||||
dev_type = #{devType},
|
||||
</if>
|
||||
</trim>
|
||||
where model_id = #{modelId}
|
||||
</update>
|
||||
|
||||
Reference in New Issue
Block a user