别名的线路查询修改

master
liuguijing 2 years ago
parent 83306e772d
commit dfe53eeed8

@ -95,4 +95,17 @@ public class LineController extends BaseController {
return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
}
}
@ApiOperation(value = "线路和杆塔列表", notes = "线路和杆塔列表查询", httpMethod = "POST")
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getLineAndGtList")
@Log(title = "线路和杆塔列表查询", type = "查询")
public ResponseReult<LineAndGtAndChannelListModel> getLineAndGtList(@RequestBody @Validated LineAndGtVo vo) {
ServiceBody<LineAndGtAndChannelListModel> serviceBody = lineService.getLineAndGtList(vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {
return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
}
}
}

@ -0,0 +1,17 @@
package com.shxy.xymanager_common.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "线路杆塔查询", description = "线路杆塔查询")
public class LineAndGtVo {
@ApiModelProperty(value = "查询类型", example = "1--线路 2--杆塔")
private Integer type;
@ApiModelProperty(value = "编号", example = "123455")
private Integer id;
}

@ -18,7 +18,7 @@ public class TerminalVo {
@ApiModelProperty(value = "杆塔编号", example = "123456")
private Integer towerid;
@ApiModelProperty(value = "通道编号", example = "123456")
@ApiModelProperty(value = "通道编号", example = "[{id:int , alias:dskafjl},{id,alias}]")
private List<Integer> channelid;
@ApiModelProperty(value = "sim卡号", example = "123456")

@ -195,5 +195,30 @@ public class LineServiceImpl implements LineService {
return Asserts.success(model);
}
/**
* 线
*
* @param vo
* @return
*/
@Override
public ServiceBody<LineAndGtAndChannelListModel> getLineAndGtList(LineAndGtVo vo) {
LineAndGtAndChannelListModel model = new LineAndGtAndChannelListModel();
List<LineAndGtAndChannelListModel.Bean> beans = new ArrayList<>();
Integer type = vo.getType();
Integer id = vo.getId();
if (type.intValue() == 1) {
List<Lines> list = linesDao.selectLineByDyId(null, CommonStatus.EFFECTIVE.value());
beans = BeanUtil.copyToList(list, LineAndGtAndChannelListModel.Bean.class);
} else {
if (id != null) {
List<Tower> list = towerDao.selectAllByLineid(id, CommonStatus.EFFECTIVE.value());
beans = BeanUtil.copyToList(list, LineAndGtAndChannelListModel.Bean.class);
}
}
model.setList(beans);
return Asserts.success(model);
}
}

@ -51,4 +51,12 @@ public interface LineService {
*/
ServiceBody<LineAndGtAndChannelListModel> getLineAndGt(LineAndGtAndChannelVo vo);
/**
* 线
*
* @param vo
* @return
*/
ServiceBody<LineAndGtAndChannelListModel> getLineAndGtList(LineAndGtVo vo);
}

Loading…
Cancel
Save