This commit is contained in:
zhouhuang 2024-12-16 17:23:14 +08:00
commit c09b99131b
5 changed files with 21 additions and 0 deletions

View File

@ -245,5 +245,11 @@ public class SysIotModelController {
return R.success(sysIotModelService.getSysIotModelByType(sysIotModelDto.getObjectType()));
}
/** 物模型属性修改 */
@PostMapping("/attribute/getAllSubsystem")
public R<List<String>> getAllSubsystem() {
List<String> allSubsystem = sysIotModelService.getAllSubsystem();
return R.success(allSubsystem);
}
}

View File

@ -33,4 +33,6 @@ public interface SysIotModelFieldMapper extends BaseMapperPlus<SysIotModelField,
*/
List<SysIotModelFieldVo> selectModelFieldListByModelId(@Param("modelId") Long modelId);
List<String> getAllSubsystem();
}

View File

@ -47,4 +47,6 @@ public interface SysIotModelService {
List<SysIotModelVo> getSysIotModelByType(Integer objectType);
List<String> getAllSubsystem();
}

View File

@ -544,6 +544,11 @@ public class SysIotModelServiceImpl implements SysIotModelService {
return list;
}
@Override
public List<String> getAllSubsystem() {
return sysIotModelFieldMapper.getAllSubsystem();
}
public void createTdStableOrColumn(SysIotModelField sysIotModelField) {
//如果type是计算量199创建单独计算量超级表
if (sysIotModelField.getAttributeType() == 199) {

View File

@ -28,6 +28,9 @@
<if test="info.attributeType != null and info.attributeType != ''">
and t.attribute_type = #{info.attributeType}
</if>
<if test="info.subSystem != null and info.subSystem != ''">
and t.subsystem = #{info.subSystem}
</if>
</where>
<if test="info.orderColumn != null and info.orderType != ''">
order by ${info.orderColumn} ${info.orderType}
@ -58,4 +61,7 @@
<select id="selectModelFieldListByModelId" resultMap="SysIotModelFieldMap">
select * from sys_iot_model_field where iot_model_id = #{modelId} order by porder
</select>
<select id="getAllSubsystem" resultType="java.lang.String">
select distinct simf.subsystem from sys_iot_model_field simf
</select>
</mapper>