覆冰增加

dev
liuguijing 1 year ago
parent d956e983fb
commit b204cd1102

@ -10,6 +10,7 @@ import com.shxy.xymanager_common.model.DyLineTreeListModel;
import com.shxy.xymanager_common.model.TerminalPhotosModel; import com.shxy.xymanager_common.model.TerminalPhotosModel;
import com.shxy.xymanager_common.util.xinyin.HeaderUtil; import com.shxy.xymanager_common.util.xinyin.HeaderUtil;
import com.shxy.xymanager_common.vo.DyListVo; 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_common.vo.LastTowerVo;
import com.shxy.xymanager_service.service.DyLevelService; import com.shxy.xymanager_service.service.DyLevelService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -27,8 +28,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List; import java.util.List;
@Api(value = "电压等级接口", tags = "电压等级接口描述") @Api(value = "电压等级接口", tags = "电压等级接口描述")
@RestController @RestController
@Slf4j @Slf4j
@ -41,8 +40,8 @@ public class DyLevelController extends BaseController {
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getdyTreeList") @RequestMapping("/getdyTreeList")
@Log(title = "获取电压等级树状列表接口", type = "查询") @Log(title = "获取电压等级树状列表接口", type = "查询")
public ResponseReult<DyLineTreeListModel> getdyTreeList(@Param("type") Integer type) { public ResponseReult<DyLineTreeListModel> getdyTreeList(@RequestBody @Validated DyTreeListVo vo) {
ServiceBody<DyLineTreeListModel> serviceBody = dyLevelService.getdyTreeList(type); ServiceBody<DyLineTreeListModel> serviceBody = dyLevelService.getdyTreeList(vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) { if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData()); return ResponseReult.success(serviceBody.getData());
} else { } else {

@ -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<Integer> devtype;
}

@ -27,6 +27,9 @@ public class TerminalSelectVo {
@ApiModelProperty(value = "在线离线", example = "0--掉线 1--在线") @ApiModelProperty(value = "在线离线", example = "0--掉线 1--在线")
private Integer isonline; private Integer isonline;
@ApiModelProperty(value = "在线离线", example = "0--掉线 1--在线")
private Integer protocol;
@Min(value = 1, message = "分页位置最小从1开始") @Min(value = 1, message = "分页位置最小从1开始")
@ApiModelProperty(value = "分页位置从1开始", required = true, example = "1") @ApiModelProperty(value = "分页位置从1开始", required = true, example = "1")
private int pageindex; private int pageindex;

@ -11,11 +11,10 @@ import java.util.List;
public interface DyLevelDao { public interface DyLevelDao {
List<DyLevel> selectTreeList(@Param("status") Integer status, @Param("dyid") List<Integer> dyplist, @Param("lineid") List<Integer> lineplist, @Param("towerid") List<Integer> towplist, @Param("termid") List<Integer> termid,@Param("isSuper") Integer isSuper); List<DyLevel> selectTreeList(@Param("status") Integer status, @Param("dyid") List<Integer> dyplist, @Param("lineid") List<Integer> lineplist, @Param("towerid") List<Integer> towplist, @Param("termid") List<Integer> termid, @Param("devtype") List<Integer> devtype, @Param("isSuper") Integer isSuper);
List<DyAndLineAndTowerAndTermDto> 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); List<DyAndLineAndTowerAndTermDto> 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); long countByExample(DyLevelExample example);
List<DyLevel> selectByExample(DyLevelExample example); List<DyLevel> selectByExample(DyLevelExample example);

@ -200,6 +200,12 @@
</if> </if>
) )
</if> </if>
<if test="devtype != null and devtype.size &gt; 0">
and d.dev_type in
<foreach close=")" collection="devtype" index="index" item="id" open="(" separator=",">
#{id}
</foreach>
</if>
</select> </select>
<select id="selectDyAndLineAndTowerAnTermList" resultMap="DyAndLineAndTowerAnTermMap"> <select id="selectDyAndLineAndTowerAnTermList" resultMap="DyAndLineAndTowerAnTermMap">
select select

@ -12,6 +12,7 @@ import com.shxy.xymanager_common.model.DyLineTreeListModel;
import com.shxy.xymanager_common.model.TerminalPhotosModel; import com.shxy.xymanager_common.model.TerminalPhotosModel;
import com.shxy.xymanager_common.page.PageUtils; import com.shxy.xymanager_common.page.PageUtils;
import com.shxy.xymanager_common.util.xinyin.TerminalUtils; import com.shxy.xymanager_common.util.xinyin.TerminalUtils;
import com.shxy.xymanager_common.vo.DyTreeListVo;
import com.shxy.xymanager_common.vo.LastTowerVo; import com.shxy.xymanager_common.vo.LastTowerVo;
import com.shxy.xymanager_dao.dao.*; import com.shxy.xymanager_dao.dao.*;
import com.shxy.xymanager_service.service.CacheService; import com.shxy.xymanager_service.service.CacheService;
@ -26,7 +27,6 @@ import java.math.BigInteger;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
/** /**
* *
@ -82,7 +82,9 @@ public class DyLevelServiceImpl implements DyLevelService {
* @return * @return
*/ */
@Override @Override
public ServiceBody<DyLineTreeListModel> getdyTreeList(Integer type) { public ServiceBody<DyLineTreeListModel> getdyTreeList(DyTreeListVo vo) {
Integer type = vo.getType();
List<Integer> devtype = vo.getDevtype();
PermissionDetail permissionDetail = new PermissionDetail(); PermissionDetail permissionDetail = new PermissionDetail();
DyLineTreeListModel model = new DyLineTreeListModel(); DyLineTreeListModel model = new DyLineTreeListModel();
try { try {
@ -110,7 +112,7 @@ public class DyLevelServiceImpl implements DyLevelService {
} }
if ((CollectionUtil.isNotEmpty(dypList) || CollectionUtil.isNotEmpty(linepList) || CollectionUtil.isNotEmpty(towerpList) || CollectionUtil.isNotEmpty(termpList)) || CommonStatus.EFFECTIVE.value().equals(aSuper)) { if ((CollectionUtil.isNotEmpty(dypList) || CollectionUtil.isNotEmpty(linepList) || CollectionUtil.isNotEmpty(towerpList) || CollectionUtil.isNotEmpty(termpList)) || CommonStatus.EFFECTIVE.value().equals(aSuper)) {
list = dyLevelDao.selectTreeList(CommonStatus.EFFECTIVE.value(), dypList, linepList, towerpList, termpList, aSuper); list = dyLevelDao.selectTreeList(CommonStatus.EFFECTIVE.value(), dypList, linepList, towerpList, termpList, devtype, aSuper);
} }
boolean empty = CollectionUtil.isEmpty(list); boolean empty = CollectionUtil.isEmpty(list);
if (empty) { if (empty) {
@ -144,21 +146,22 @@ public class DyLevelServiceImpl implements DyLevelService {
towers.setIsfavor(CommonStatus.DELETE.value()); towers.setIsfavor(CommonStatus.DELETE.value());
} }
Integer onlinestatus = towers.getOnlinestatus(); Integer onlinestatus = towers.getOnlinestatus();
if (type == null || type.intValue() == -1) {//查询全部 if (type == null || type.intValue() == -1) {//查询全部
if (CommonStatus.EFFECTIVE.value().equals(onlinestatus)) { if (onlinestatus != null && CommonStatus.EFFECTIVE.value().equals(onlinestatus)) {
onlinenum++; onlinenum++;
line_onlinenum++; line_onlinenum++;
} }
tt.add(towers); tt.add(towers);
} else if (type.intValue() == 0) { } else if (type.intValue() == 0) {
if (CommonStatus.EFFECTIVE.value().equals(onlinestatus)) { if (onlinestatus != null && CommonStatus.EFFECTIVE.value().equals(onlinestatus)) {
onlinenum++; onlinenum++;
line_onlinenum++; line_onlinenum++;
} else { } else {
tt.add(towers); tt.add(towers);
} }
} else if (type.intValue() == 1) { } else if (type.intValue() == 1) {
if (CommonStatus.EFFECTIVE.value().equals(onlinestatus)) { if (onlinestatus != null && CommonStatus.EFFECTIVE.value().equals(onlinestatus)) {
onlinenum++; onlinenum++;
line_onlinenum++; line_onlinenum++;
tt.add(towers); tt.add(towers);

@ -122,16 +122,15 @@ public class TerminalServiceImpl implements TerminalService {
Integer tower = vo.getTowerId(); Integer tower = vo.getTowerId();
String search = vo.getSearch(); String search = vo.getSearch();
Integer isonline = vo.getIsonline(); Integer isonline = vo.getIsonline();
Integer protocolsearch = vo.getProtocol();
BigInteger time = TerminalUtils.generateOnlineTime(); BigInteger time = TerminalUtils.generateOnlineTime();
PermissionDetail permissionListOver = userService.getPermissionList(); PermissionDetail permissionListOver = userService.getPermissionList();
List<Integer> dypList = permissionListOver.getDypList(); List<Integer> dypList = permissionListOver.getDypList();
List<Integer> linepList = permissionListOver.getLinepList(); List<Integer> linepList = permissionListOver.getLinepList();
List<Integer> towerpList = permissionListOver.getTowerpList(); List<Integer> towerpList = permissionListOver.getTowerpList();
List<Integer> termpList = permissionListOver.getTermpList(); List<Integer> termpList = permissionListOver.getTermpList();
TerminalStatisticsModel model = new TerminalStatisticsModel();
View_Dy_Line_Tower_TerminalsExample example = new View_Dy_Line_Tower_TerminalsExample(); View_Dy_Line_Tower_TerminalsExample example = new View_Dy_Line_Tower_TerminalsExample();
example.setGroupByClause("id"); example.setGroupByClause("id");
example.setOrderByClause("id desc"); example.setOrderByClause("id desc");
@ -182,6 +181,10 @@ public class TerminalServiceImpl implements TerminalService {
or2.andLastHeartbeatLessThanOrEqualTo(time.longValue()); or2.andLastHeartbeatLessThanOrEqualTo(time.longValue());
} }
} }
if (BeanUtil.isNotEmpty(protocolsearch) && protocolsearch.intValue() != -1) {
View_Dy_Line_Tower_TerminalsExample.Criteria or2 = example.or();
or2.andProtocolEqualTo(protocolsearch);
}
int pageindex = vo.getPageindex(); int pageindex = vo.getPageindex();
int pagesize = vo.getPagesize(); int pagesize = vo.getPagesize();
PageUtils.SetPage(pageindex, pagesize); PageUtils.SetPage(pageindex, pagesize);

@ -4,6 +4,7 @@ import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.entity.DyLevel; import com.shxy.xymanager_common.entity.DyLevel;
import com.shxy.xymanager_common.model.DyLineTreeListModel; import com.shxy.xymanager_common.model.DyLineTreeListModel;
import com.shxy.xymanager_common.model.TerminalPhotosModel; import com.shxy.xymanager_common.model.TerminalPhotosModel;
import com.shxy.xymanager_common.vo.DyTreeListVo;
import com.shxy.xymanager_common.vo.LastTowerVo; import com.shxy.xymanager_common.vo.LastTowerVo;
import java.util.List; import java.util.List;
@ -19,7 +20,7 @@ public interface DyLevelService {
* *
* @return * @return
*/ */
ServiceBody<DyLineTreeListModel> getdyTreeList(Integer integer); ServiceBody<DyLineTreeListModel> getdyTreeList(DyTreeListVo vo);
/** /**
* 线 * 线

Loading…
Cancel
Save