| | |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "列表", notes = "传入isAreaSelect和区域id") |
| | | @ApiOperation(value = "列表", notes = "传入isAreaSelect、areaId、status") |
| | | public R<List<FwDeviceVO>> list(@RequestParam(value = "isAreaSelect", required = false) Integer isAreaSelect, |
| | | @RequestParam(value = "areaId", required = false) Long areaId) { |
| | | List<FwDeviceEntity> list = fwDeviceService.selectFwDeviceList(isAreaSelect, areaId); |
| | | @RequestParam(value = "areaId", required = false) Long areaId, |
| | | @RequestParam(value = "status", required = false) Integer status) { |
| | | List<FwDeviceEntity> list = fwDeviceService.selectFwDeviceList(isAreaSelect, areaId, status); |
| | | FwDeviceWrapper wrapper = FwDeviceWrapper.build(); |
| | | return R.data(list.stream().map(wrapper::entityVO).collect(Collectors.toList())); |
| | | } |
| | |
| | | @ApiModelProperty(value = "设备状态,多个状态用逗号隔开") |
| | | private List<String> deviceStatusList; |
| | | |
| | | /** |
| | | * 运行状态(0:在线/1:离线/2:故障/3:报废) |
| | | */ |
| | | @ApiModelProperty(value = "运行状态(0:在线/1:离线/2:故障/3:报废)") |
| | | private Integer status; |
| | | |
| | | } |
| | |
| | | * @param areaId |
| | | * @return |
| | | */ |
| | | List<FwDeviceEntity> selectFwDeviceList(@Param("isAreaSelect") Integer isAreaSelect, @Param("areaId") Long areaId); |
| | | List<FwDeviceEntity> selectFwDeviceList(@Param("isAreaSelect") Integer isAreaSelect, @Param("areaId") Long areaId, |
| | | @Param("status") Integer status); |
| | | |
| | | |
| | | /** |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="param2.status != null"> |
| | | and status = #{param2.status} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | </choose> |
| | | ) |
| | | </if> |
| | | <if test="status != null"> |
| | | and status = #{status} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | */ |
| | | @ApiModelProperty(value = "有效范围是否为空:0-不处理 1-不为空 2-为空") |
| | | private int effectiveRangeKmIsNotNull; |
| | | |
| | | /** |
| | | * 运行状态(0:在线/1:离线/2:故障/3:报废) |
| | | */ |
| | | @ApiModelProperty(value = "运行状态(0:在线/1:离线/2:故障/3:报废)") |
| | | private Integer status; |
| | | } |
| | |
| | | /** |
| | | * 列表查询 |
| | | * |
| | | * @param isAreaSelect |
| | | * @param areaId |
| | | * @param isAreaSelect 是否过滤区域 |
| | | * @param areaId 设备被关联区域id |
| | | * @param status 设备状态 |
| | | * @return |
| | | */ |
| | | List<FwDeviceEntity> selectFwDeviceList(Integer isAreaSelect, Long areaId); |
| | | List<FwDeviceEntity> selectFwDeviceList(Integer isAreaSelect, Long areaId, Integer status); |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<FwDeviceEntity> selectFwDeviceList(Integer isAreaSelect, Long areaId) { |
| | | return baseMapper.selectFwDeviceList(isAreaSelect, areaId); |
| | | public List<FwDeviceEntity> selectFwDeviceList(Integer isAreaSelect, Long areaId, Integer status) { |
| | | return baseMapper.selectFwDeviceList(isAreaSelect, areaId, status); |
| | | } |
| | | |
| | | |