Merge branch 'main' of https://git.jsspisoft.com/ry-das
This commit is contained in:
commit
5b667c1e72
@ -251,8 +251,12 @@ public class SysIotModelController {
|
|||||||
|
|
||||||
/** 物模型属性修改 */
|
/** 物模型属性修改 */
|
||||||
@PostMapping("/attribute/getAllSubsystem")
|
@PostMapping("/attribute/getAllSubsystem")
|
||||||
public R<List<String>> getAllSubsystem() {
|
public R<List<String>> getAllSubsystem(@RequestBody SysIotModelFieldDto sysIotModelFieldDto) {
|
||||||
List<String> allSubsystem = sysIotModelService.getAllSubsystem();
|
Long iotModelId = sysIotModelFieldDto.getIotModelId();
|
||||||
|
if (iotModelId == null){
|
||||||
|
throw new ServiceException("参数物模型id不存在");
|
||||||
|
}
|
||||||
|
List<String> allSubsystem = sysIotModelService.getAllSubsystem(iotModelId);
|
||||||
return R.success(allSubsystem);
|
return R.success(allSubsystem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,6 @@ public interface SysIotModelFieldMapper extends BaseMapperPlus<SysIotModelField,
|
|||||||
*/
|
*/
|
||||||
List<SysIotModelFieldVo> selectModelFieldListByModelId(@Param("modelId") Long modelId);
|
List<SysIotModelFieldVo> selectModelFieldListByModelId(@Param("modelId") Long modelId);
|
||||||
|
|
||||||
List<String> getAllSubsystem();
|
List<String> getAllSubsystem(@Param("modelId") Long iotModelId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,6 @@ public interface SysIotModelService {
|
|||||||
|
|
||||||
List<SysIotModelVo> getSysIotModelByType(Integer objectType);
|
List<SysIotModelVo> getSysIotModelByType(Integer objectType);
|
||||||
|
|
||||||
List<String> getAllSubsystem();
|
List<String> getAllSubsystem(Long iotModelId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -146,10 +146,13 @@ public class SysIotModelServiceImpl implements SysIotModelService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageDataInfo<SysIotModelFieldVo> querySysIotModelField(SysIotModelFieldDto sysIotModelFieldDto) {
|
public PageDataInfo<SysIotModelFieldVo> querySysIotModelField(SysIotModelFieldDto sysIotModelFieldDto) {
|
||||||
|
|
||||||
PageQuery pageQuery = new PageQuery();
|
PageQuery pageQuery = new PageQuery();
|
||||||
pageQuery.setPageNum(sysIotModelFieldDto.getPageNum());
|
pageQuery.setPageNum(sysIotModelFieldDto.getPageNum());
|
||||||
pageQuery.setPageSize(sysIotModelFieldDto.getPageSize());
|
pageQuery.setPageSize(sysIotModelFieldDto.getPageSize());
|
||||||
|
log.info("查询物模型属性参数:{}",sysIotModelFieldDto);
|
||||||
IPage<SysIotModelFieldVo> iPage = sysIotModelFieldMapper.querySysIotModelFieldList(pageQuery.build(), sysIotModelFieldDto);
|
IPage<SysIotModelFieldVo> iPage = sysIotModelFieldMapper.querySysIotModelFieldList(pageQuery.build(), sysIotModelFieldDto);
|
||||||
|
log.info("查询物模型属性返回总数{},:{}",iPage.getTotal(),iPage.getRecords());
|
||||||
return PageDataInfo.build(iPage.getRecords(), iPage.getTotal());
|
return PageDataInfo.build(iPage.getRecords(), iPage.getTotal());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -545,8 +548,8 @@ public class SysIotModelServiceImpl implements SysIotModelService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getAllSubsystem() {
|
public List<String> getAllSubsystem(Long iotModelId) {
|
||||||
return sysIotModelFieldMapper.getAllSubsystem();
|
return sysIotModelFieldMapper.getAllSubsystem(iotModelId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createTdStableOrColumn(SysIotModelField sysIotModelField) {
|
public void createTdStableOrColumn(SysIotModelField sysIotModelField) {
|
||||||
|
@ -65,6 +65,6 @@
|
|||||||
select * from sys_iot_model_field where iot_model_id = #{modelId} order by porder
|
select * from sys_iot_model_field where iot_model_id = #{modelId} order by porder
|
||||||
</select>
|
</select>
|
||||||
<select id="getAllSubsystem" resultType="java.lang.String">
|
<select id="getAllSubsystem" resultType="java.lang.String">
|
||||||
select distinct simf.subsystem from sys_iot_model_field simf
|
select distinct simf.subsystem from sys_iot_model_field simf where simf.iot_model_id = #{modelId}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Loading…
Reference in New Issue
Block a user