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")
|
||||
public R<List<String>> getAllSubsystem() {
|
||||
List<String> allSubsystem = sysIotModelService.getAllSubsystem();
|
||||
public R<List<String>> getAllSubsystem(@RequestBody SysIotModelFieldDto sysIotModelFieldDto) {
|
||||
Long iotModelId = sysIotModelFieldDto.getIotModelId();
|
||||
if (iotModelId == null){
|
||||
throw new ServiceException("参数物模型id不存在");
|
||||
}
|
||||
List<String> allSubsystem = sysIotModelService.getAllSubsystem(iotModelId);
|
||||
return R.success(allSubsystem);
|
||||
}
|
||||
}
|
||||
|
@ -33,6 +33,6 @@ public interface SysIotModelFieldMapper extends BaseMapperPlus<SysIotModelField,
|
||||
*/
|
||||
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<String> getAllSubsystem();
|
||||
List<String> getAllSubsystem(Long iotModelId);
|
||||
|
||||
}
|
||||
|
@ -146,10 +146,13 @@ public class SysIotModelServiceImpl implements SysIotModelService {
|
||||
|
||||
@Override
|
||||
public PageDataInfo<SysIotModelFieldVo> querySysIotModelField(SysIotModelFieldDto sysIotModelFieldDto) {
|
||||
|
||||
PageQuery pageQuery = new PageQuery();
|
||||
pageQuery.setPageNum(sysIotModelFieldDto.getPageNum());
|
||||
pageQuery.setPageSize(sysIotModelFieldDto.getPageSize());
|
||||
log.info("查询物模型属性参数:{}",sysIotModelFieldDto);
|
||||
IPage<SysIotModelFieldVo> iPage = sysIotModelFieldMapper.querySysIotModelFieldList(pageQuery.build(), sysIotModelFieldDto);
|
||||
log.info("查询物模型属性返回总数{},:{}",iPage.getTotal(),iPage.getRecords());
|
||||
return PageDataInfo.build(iPage.getRecords(), iPage.getTotal());
|
||||
}
|
||||
|
||||
@ -545,8 +548,8 @@ public class SysIotModelServiceImpl implements SysIotModelService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getAllSubsystem() {
|
||||
return sysIotModelFieldMapper.getAllSubsystem();
|
||||
public List<String> getAllSubsystem(Long iotModelId) {
|
||||
return sysIotModelFieldMapper.getAllSubsystem(iotModelId);
|
||||
}
|
||||
|
||||
public void createTdStableOrColumn(SysIotModelField sysIotModelField) {
|
||||
|
@ -65,6 +65,6 @@
|
||||
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 distinct simf.subsystem from sys_iot_model_field simf where simf.iot_model_id = #{modelId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user