diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/DyLevelController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/DyLevelController.java index e34650e..b62d2ec 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/DyLevelController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/DyLevelController.java @@ -10,6 +10,7 @@ import com.shxy.xymanager_common.model.DyLineTreeListModel; import com.shxy.xymanager_common.model.TerminalPhotosModel; import com.shxy.xymanager_common.util.xinyin.HeaderUtil; import com.shxy.xymanager_common.vo.DyListVo; +import com.shxy.xymanager_common.vo.DyTreeListVo; import com.shxy.xymanager_common.vo.LastTowerVo; import com.shxy.xymanager_service.service.DyLevelService; import io.swagger.annotations.Api; @@ -27,8 +28,6 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; - - @Api(value = "电压等级接口", tags = "电压等级接口描述") @RestController @Slf4j @@ -41,8 +40,8 @@ public class DyLevelController extends BaseController { @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/getdyTreeList") @Log(title = "获取电压等级树状列表接口", type = "查询") - public ResponseReult getdyTreeList(@Param("type") Integer type) { - ServiceBody serviceBody = dyLevelService.getdyTreeList(type); + public ResponseReult getdyTreeList(@RequestBody @Validated DyTreeListVo vo) { + ServiceBody serviceBody = dyLevelService.getdyTreeList(vo); if (serviceBody.getCode() == ServiceStatus.SUCCESS) { return ResponseReult.success(serviceBody.getData()); } else { diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/DyTreeListVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/DyTreeListVo.java new file mode 100644 index 0000000..c10428a --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/DyTreeListVo.java @@ -0,0 +1,17 @@ +package com.shxy.xymanager_common.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +@Data +@ApiModel(value = "查询装置树列表对象", description = "查询装置树列表对象") +public class DyTreeListVo { + + private Integer type; + + private List devtype; + +} diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalSelectVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalSelectVo.java index 01c59e5..0ec8e13 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalSelectVo.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalSelectVo.java @@ -27,6 +27,9 @@ public class TerminalSelectVo { @ApiModelProperty(value = "在线离线", example = "0--掉线 1--在线") private Integer isonline; + @ApiModelProperty(value = "在线离线", example = "0--掉线 1--在线") + private Integer protocol; + @Min(value = 1, message = "分页位置最小从1开始") @ApiModelProperty(value = "分页位置从1开始", required = true, example = "1") private int pageindex; diff --git a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/DyLevelDao.java b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/DyLevelDao.java index 64ff671..5c30224 100644 --- a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/DyLevelDao.java +++ b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/DyLevelDao.java @@ -11,11 +11,10 @@ import java.util.List; public interface DyLevelDao { - List selectTreeList(@Param("status") Integer status, @Param("dyid") List dyplist, @Param("lineid") List lineplist, @Param("towerid") List towplist, @Param("termid") List termid,@Param("isSuper") Integer isSuper); + List selectTreeList(@Param("status") Integer status, @Param("dyid") List dyplist, @Param("lineid") List lineplist, @Param("towerid") List towplist, @Param("termid") List termid, @Param("devtype") List devtype, @Param("isSuper") Integer isSuper); List selectDyAndLineAndTowerAnTermList(@Param("dyid") Integer dyid, @Param("lineid") Integer lineid, @Param("towerid") Integer towerid, @Param("termid") Integer termid, @Param("search") String search, @Param("status") Integer status); - long countByExample(DyLevelExample example); List selectByExample(DyLevelExample example); diff --git a/xymanager_dao/src/main/resources/mappers/DyLevelDao.xml b/xymanager_dao/src/main/resources/mappers/DyLevelDao.xml index 32ce661..db3559a 100644 --- a/xymanager_dao/src/main/resources/mappers/DyLevelDao.xml +++ b/xymanager_dao/src/main/resources/mappers/DyLevelDao.xml @@ -200,6 +200,12 @@ ) + + and d.dev_type in + + #{id} + +