郑州测试

dev
liuguijing 2 years ago
parent b48d21ae83
commit 13fc1d7372

@ -38,7 +38,21 @@ public class DyLevelController extends BaseController {
@RequestMapping("/getdyTreeList")
@Log(title = "获取电压等级树状列表接口", type = "查询")
public ResponseReult<DyLineTreeListModel> getdyTreeList(@Param("type") Integer type) {
ServiceBody<DyLineTreeListModel> serviceBody = dyLevelService.getdyTreeList(type);
ServiceBody<DyLineTreeListModel> serviceBody = dyLevelService.getdyTreeList(type,-1);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {
return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
}
}
//143
@ApiOperation(value = "郑州测试获取电压等级树状列表接口", notes = "郑州测试获取电压等级树状列表接口", httpMethod = "POST")
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getzzdyTreeList")
@Log(title = "获取电压等级树状列表接口", type = "查询")
public ResponseReult<DyLineTreeListModel> getzzdyTreeList(@Param("type") Integer type) {
ServiceBody<DyLineTreeListModel> serviceBody = dyLevelService.getdyTreeList(type,143);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {

@ -25,7 +25,7 @@ public interface DyLevelDao {
List<DyLevel> selectAll(@Param("status") Integer status);
List<DyLineAndTerminalWithHeartDto> selectTreeList( @Param("status") Integer status);
List<DyLineAndTerminalWithHeartDto> selectTreeList( @Param("status") Integer status,@Param("lineid") Integer lineid);
List<DyLineAndTerminalNoHeartDto> selectTreeListByChannelId(@Param("channelid") Integer channelid, @Param("status") Integer status);

@ -201,6 +201,9 @@
left join terminals d on c.id = d.tower_id )
left join terminal_status e on e.term_id = d.id)
where b.status = #{status} and a.status = #{status} and c.status = #{status} and d.status = #{status}
<if test="lineid != null and lineid != -1">
and b.id = #{lineid}
</if>
</select>
<select id="selectTreeListByChannelId" resultMap="LineAndTerminalNoHeartMap">

@ -1,7 +1,6 @@
package com.shxy.xymanager_service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import cn.hutool.core.collection.CollectionUtil;
import com.github.pagehelper.PageInfo;
import com.shxy.xymanager_common.bean.ServiceBody;
@ -13,7 +12,6 @@ import com.shxy.xymanager_common.model.DyLineTreeListModel;
import com.shxy.xymanager_common.model.DyListModel;
import com.shxy.xymanager_common.model.TerminalPhotosModel;
import com.shxy.xymanager_common.page.PageUtils;
import com.shxy.xymanager_common.util.MyDateUtils;
import com.shxy.xymanager_common.util.xinyin.TerminalUtils;
import com.shxy.xymanager_common.vo.LastTowerVo;
import com.shxy.xymanager_dao.dao.DyLevelDao;
@ -27,7 +25,6 @@ import org.springframework.stereotype.Service;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@ -56,9 +53,9 @@ public class DyLevelServiceImpl implements DyLevelService {
* @return
*/
@Override
public ServiceBody<DyLineTreeListModel> getdyTreeList(Integer type) {
public ServiceBody<DyLineTreeListModel> getdyTreeList(Integer type, Integer lineid) {
DyLineTreeListModel model = new DyLineTreeListModel();
List<DyLineAndTerminalWithHeartDto> list = dyLevelDao.selectTreeList(CommonStatus.EFFECTIVE.value());
List<DyLineAndTerminalWithHeartDto> list = dyLevelDao.selectTreeList(CommonStatus.EFFECTIVE.value(),lineid);
boolean empty = CollectionUtil.isEmpty(list);
if (empty) {
model.setList(new ArrayList<>());
@ -89,7 +86,7 @@ public class DyLevelServiceImpl implements DyLevelService {
lineBean.setBsManufacturer(lineDto.getBsManufacturer());
ArrayList<DyLineTreeListModel.TerminalBean> beanlist = new ArrayList<>();
for (int k = 0; k < termlist.size(); k++){
for (int k = 0; k < termlist.size(); k++) {
totalnum++;
TerminalsWithHeart terminalsWithHeart = termlist.get(k);

@ -1,14 +1,11 @@
package com.shxy.xymanager_service.service;
import cn.hutool.core.util.StrUtil;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.model.DyLineTreeListModel;
import com.shxy.xymanager_common.model.DyListModel;
import com.shxy.xymanager_common.model.TerminalPhotosModel;
import com.shxy.xymanager_common.vo.LastTowerVo;
import java.util.List;
/**
*
*
@ -20,7 +17,7 @@ public interface DyLevelService {
*
* @return
*/
ServiceBody<DyLineTreeListModel> getdyTreeList(Integer type);
ServiceBody<DyLineTreeListModel> getdyTreeList(Integer integer, Integer lineid);
/**

Loading…
Cancel
Save