给接口加上变电站的卡控
This commit is contained in:
parent
9ecebaac7d
commit
acee04de35
@ -32,9 +32,9 @@ public class AlgorithmClassComponentController {
|
||||
|
||||
@GetMapping("/getAlgorithmClassComponentPage")
|
||||
@ApiOperation("算法关联主设备部件")
|
||||
public ResponseResult getAlgorithmClassComponentPage(String algorithmId, Page<AlgorithmClassComponent> page) {
|
||||
public ResponseResult getAlgorithmClassComponentPage(String algorithmId,String stationCode, Page<AlgorithmClassComponent> page) {
|
||||
Page<AlgorithmClassComponent> algorithmClassComponentPage =
|
||||
algorithmClassComponentService.getAlgorithmClassComponentPage(algorithmId, page);
|
||||
algorithmClassComponentService.getAlgorithmClassComponentPage(algorithmId,stationCode, page);
|
||||
return ResponseResult.successData(algorithmClassComponentPage);
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ public interface IAlgorithmClassComponentService extends IService<AlgorithmClass
|
||||
* 参数说明 page 分页参数
|
||||
* 返回值说明: com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.yfd.platform.modules.algorithm.domain.AlgorithmClassComponent>
|
||||
***********************************/
|
||||
Page<AlgorithmClassComponent> getAlgorithmClassComponentPage(String algorithmId, Page<AlgorithmClassComponent> page);
|
||||
Page<AlgorithmClassComponent> getAlgorithmClassComponentPage(String algorithmId,String stationCode, Page<AlgorithmClassComponent> page);
|
||||
|
||||
/**********************************
|
||||
* 用途说明: 删除算法关联主设备部件
|
||||
|
@ -37,10 +37,11 @@ public class AlgorithmClassComponentServiceImpl extends ServiceImpl<AlgorithmCla
|
||||
* .AlgorithmClassComponent>
|
||||
***********************************/
|
||||
@Override
|
||||
public Page<AlgorithmClassComponent> getAlgorithmClassComponentPage(String algorithmId,
|
||||
public Page<AlgorithmClassComponent> getAlgorithmClassComponentPage(String algorithmId, String stationCode,
|
||||
Page<AlgorithmClassComponent> page) {
|
||||
LambdaQueryWrapper<AlgorithmClassComponent> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(AlgorithmClassComponent::getAlgorithmId, algorithmId);
|
||||
queryWrapper.eq(AlgorithmClassComponent::getStationCode, stationCode);
|
||||
return this.page(page, queryWrapper);
|
||||
}
|
||||
|
||||
|
@ -45,14 +45,15 @@ public class MeterDeviceController {
|
||||
***********************************/
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("分页查询变电站辅控设备")
|
||||
public ResponseResult getDevicePage(String deviceName, String deviceModel, String deviceType, String status,
|
||||
public ResponseResult getDevicePage(String stationId, String deviceName, String deviceModel, String deviceType,
|
||||
String status,
|
||||
String systemcode, Page<MeterDevice> page) {
|
||||
//参数校验 系统编号不能为空
|
||||
if (systemcode == null) {
|
||||
return ResponseResult.error("参数为空");
|
||||
}
|
||||
//分页查询
|
||||
Page<MeterDevice> devicePage = meterDeviceService.getDevicePage(deviceName, deviceModel, deviceType, status,
|
||||
Page<MeterDevice> devicePage = meterDeviceService.getDevicePage(stationId,deviceName, deviceModel, deviceType, status,
|
||||
systemcode, page);
|
||||
return ResponseResult.successData(devicePage);
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ public interface IMeterDeviceService extends IService<MeterDevice> {
|
||||
* 参数说明 page
|
||||
* 返回值说明: com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.yfd.platform.modules.auxcontrol.domain.MeterDevice>
|
||||
***********************************/
|
||||
Page<MeterDevice> getDevicePage(String deviceName, String deviceModel, String deviceType, String status, String systemcode, Page<MeterDevice> page);
|
||||
Page<MeterDevice> getDevicePage(String stationId,String deviceName, String deviceModel, String deviceType, String status, String systemcode, Page<MeterDevice> page);
|
||||
|
||||
/**********************************
|
||||
* 用途说明: 新增变电站辅控设备信息
|
||||
|
@ -40,9 +40,10 @@ public class MeterDeviceServiceImpl extends ServiceImpl<MeterDeviceMapper, Meter
|
||||
* 返回值说明: com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.yfd.platform.modules.auxcontrol.domain.MeterDevice>
|
||||
***********************************/
|
||||
@Override
|
||||
public Page<MeterDevice> getDevicePage(String deviceName, String deviceModel, String deviceType, String status,
|
||||
public Page<MeterDevice> getDevicePage(String stationId,String deviceName, String deviceModel, String deviceType, String status,
|
||||
String systemcode, Page<MeterDevice> page) {
|
||||
LambdaQueryWrapper<MeterDevice> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(StrUtil.isNotBlank(stationId), MeterDevice::getStationId, stationId);
|
||||
queryWrapper.like(StrUtil.isNotBlank(deviceName), MeterDevice::getDeviceName, deviceName);
|
||||
queryWrapper.like(StrUtil.isNotBlank(deviceModel), MeterDevice::getDeviceModel, deviceModel);
|
||||
queryWrapper.eq(StrUtil.isNotBlank(deviceType), MeterDevice::getDeviceType, deviceType);
|
||||
|
Loading…
Reference in New Issue
Block a user