Commit ff4af087 authored by wanghao's avatar wanghao

1 基础信息维护-用户管理-燃气用户 大屏展示数据结构 接口联调

parent 1da48995
......@@ -144,9 +144,7 @@ public class TDetectorUserController extends BaseController
*/
@GetMapping("/pageQueryLabelsLayerMarksDUser")
public TableDataInfo pageQueryLabelsLayerMarksDUser(TDetectorUser tDetectorUser) {
startPage();
List<Map<String, Object>> maps = tDetectorUserService.pageQueryLabelsLayerMarksDUser(tDetectorUser);
return getDataTable(maps);
return tDetectorUserService.pageQueryLabelsLayerMarksDUser(tDetectorUser);
}
/**
......
......@@ -3,6 +3,7 @@ package com.zehong.system.service;
import java.util.List;
import java.util.Map;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.system.domain.TDetectorUser;
import com.zehong.system.domain.TDetectorUserCount;
import com.zehong.system.domain.vo.*;
......@@ -54,7 +55,7 @@ public interface ITDetectorUserService
* @param tDetectorUser t
* @return r
*/
List<Map<String,Object>> pageQueryLabelsLayerMarksDUser(TDetectorUser tDetectorUser);
TableDataInfo pageQueryLabelsLayerMarksDUser(TDetectorUser tDetectorUser);
/**
* 查询探测器用户列表
......
......@@ -12,6 +12,9 @@ import java.util.Map;
import java.util.stream.Collectors;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.core.page.PageDomain;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.core.page.TableSupport;
import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.system.domain.*;
......@@ -169,22 +172,47 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
* @return r
*/
@Override
public List<Map<String, Object>> pageQueryLabelsLayerMarksDUser(TDetectorUser tDetectorUser) {
public TableDataInfo pageQueryLabelsLayerMarksDUser(TDetectorUser tDetectorUser) {
PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
TableDataInfo tableDataInfo = new TableDataInfo();
tableDataInfo.setCode(200);
tableDataInfo.setMsg("查询成功");
if (tDetectorUser.getVillageId() == null) {
return new ArrayList<>();
return tableDataInfo;
}
List<TDetectorUserVillageSafetyDeviceInfoVo> tDetectorUserVillageSafetyDeviceInfoVos = tDetectorUserMapper.queryDuserVilSafDevInfo(tDetectorUser);
// 数据封装
List<Map<String, Object>> maps = residentsUserInitForPage(tDetectorUserVillageSafetyDeviceInfoVos);
List<Map<String, Object>> maps = residentsUserInitForPage(tDetectorUserVillageSafetyDeviceInfoVos);
if (maps.size() > 0) {
return maps;
List<Map<String, Object>> newList = new ArrayList<>();
int total = maps.size();
tableDataInfo.setTotal(total);
// 开始索引 手动分页
int fromIndex = (pageNum - 1) * pageSize;
// 结束索引
int toIndex = fromIndex + pageSize;
// 如果结束索引大于集合的最大索引,那么规定结束索引=集合大小
toIndex = Math.min(toIndex, total);
newList = fromIndex > total ? newList : maps.subList(fromIndex, toIndex);
tableDataInfo.setRows(newList);
return tableDataInfo;
}
return new ArrayList<>();
return tableDataInfo;
}
/**
......
......@@ -382,8 +382,8 @@ export default {
height: 500px;
width: 760px;
margin-left: -380px;
// 20240909 wh 调整 不需要透明度
background: rgba(0, 0, 0, 1);
// 20240909 wh 调整
background: rgba(6, 42, 69, 1);
box-sizing: border-box;
padding: 10px 20px;
// padding-top:-10px;
......@@ -393,8 +393,7 @@ export default {
.title {
color: rgb(73, 216, 255);
flex:1;
text-align: center;
text-align: left;
}
.close{
cursor: pointer;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment