提交 dfc1fb44 编写于 作者: Skyeye云's avatar Skyeye云

展示三级行政区划

上级 ec435950
...@@ -689,15 +689,15 @@ public class ToolUtil { ...@@ -689,15 +689,15 @@ public class ToolUtil {
} }
// log.info("line="+line); // log.info("line="+line);
if (caption.equals("System Idle Process") || caption.equals("System")) { if (caption.equals("System Idle Process") || caption.equals("System")) {
idletime += Long.valueOf(Bytes.substring(line, kmtidx, rocidx - 1).trim()).longValue(); idletime += Long.valueOf(Bytes.substring(line, kmtidx, rocidx - 1).replaceAll(" ", "").trim()).longValue();
idletime += Long.valueOf(Bytes.substring(line, umtidx, wocidx - 1).trim()).longValue(); idletime += Long.valueOf(Bytes.substring(line, umtidx, wocidx - 1).replaceAll(" ", "").trim()).longValue();
continue; continue;
} }
if(!isBlank(Bytes.substring(line, kmtidx, rocidx - 1).trim())){ if(!isBlank(Bytes.substring(line, kmtidx, rocidx - 1).trim())){
kneltime += Long.valueOf(Bytes.substring(line, kmtidx, rocidx - 1).trim()).longValue(); kneltime += Long.valueOf(Bytes.substring(line, kmtidx, rocidx - 1).replaceAll(" ", "").trim()).longValue();
} }
if(!isBlank(Bytes.substring(line, umtidx, wocidx - 1).trim())){ if(!isBlank(Bytes.substring(line, umtidx, wocidx - 1).trim())){
usertime += Long.valueOf(Bytes.substring(line, umtidx, wocidx - 1).trim()).longValue(); usertime += Long.valueOf(Bytes.substring(line, umtidx, wocidx - 1).replaceAll(" ", "").trim()).longValue();
} }
} }
retn[0] = idletime; retn[0] = idletime;
......
...@@ -3,12 +3,8 @@ package com.skyeye.authority.dao; ...@@ -3,12 +3,8 @@ package com.skyeye.authority.dao;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
public interface SysTAreaDao { public interface SysTAreaDao {
public List<Map<String, Object>> querySysTAreaList(Map<String, Object> map, PageBounds pageBounds) throws Exception; public List<Map<String, Object>> querySysTAreaList(Map<String, Object> map) throws Exception;
public List<Map<String, Object>> querySysTAreaSecondList(Map<String, Object> bean) throws Exception;
} }
package com.skyeye.authority.service.impl; package com.skyeye.authority.service.impl;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import com.skyeye.authority.dao.SysTAreaDao; import com.skyeye.authority.dao.SysTAreaDao;
import com.skyeye.authority.service.SysTAreaService; import com.skyeye.authority.service.SysTAreaService;
import com.skyeye.common.object.InputObject; import com.skyeye.common.object.InputObject;
...@@ -31,18 +28,9 @@ public class SysTAreaServiceImpl implements SysTAreaService{ ...@@ -31,18 +28,9 @@ public class SysTAreaServiceImpl implements SysTAreaService{
@Override @Override
public void querySysTAreaList(InputObject inputObject, OutputObject outputObject) throws Exception { public void querySysTAreaList(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams(); Map<String, Object> map = inputObject.getParams();
List<Map<String, Object>> beans = sysTAreaDao.querySysTAreaList(map, List<Map<String, Object>> beans = sysTAreaDao.querySysTAreaList(map);
new PageBounds(Integer.parseInt(map.get("page").toString()), Integer.parseInt(map.get("limit").toString())));
PageList<Map<String, Object>> beansPageList = (PageList<Map<String, Object>>)beans;
int total = beansPageList.getPaginator().getTotalCount();
List<Map<String, Object>> arrs = new ArrayList<>();
for(Map<String, Object> bean : beans){
List<Map<String, Object>> items = sysTAreaDao.querySysTAreaSecondList(bean);
arrs.addAll(items);
}
beans.addAll(arrs);
outputObject.setBeans(beans); outputObject.setBeans(beans);
outputObject.settotal(total); outputObject.settotal(beans.size());
} }
} }
...@@ -6,21 +6,11 @@ ...@@ -6,21 +6,11 @@
SELECT SELECT
a.code_id id, a.code_id id,
IFNULL(a.parent_code_id, '0') pId, IFNULL(a.parent_code_id, '0') pId,
a.`name` a.`name`,
false lay_is_open
FROM FROM
t_area a t_area a
WHERE a.level = '0' WHERE 3 > a.level
</select>
<select id="querySysTAreaSecondList" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.code_id id,
a.parent_code_id pId,
a.`name`
FROM
t_area a
WHERE a.level = '1'
AND a.parent_code_id = #{id}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -502,8 +502,6 @@ ...@@ -502,8 +502,6 @@
</url> </url>
<url id="systarea001" path="/post/SysTAreaController/querySysTAreaList" val="获取行政区划信息" allUse="1"> <url id="systarea001" path="/post/SysTAreaController/querySysTAreaList" val="获取行政区划信息" allUse="1">
<property id="limit" name="limit" ref="required,num" var="分页参数,每页多少条数据" />
<property id="page" name="page" ref="required,num" var="分页参数,第几页"/>
</url> </url>
<!-- 小程序系列结束 --> <!-- 小程序系列结束 -->
......
.layui-tree-head{
cursor: pointer;
}
\ No newline at end of file
...@@ -23,7 +23,7 @@ layui.config({ ...@@ -23,7 +23,7 @@ layui.config({
treeGrid.render({ treeGrid.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
method: 'get', method: 'post',
idField: 'id', idField: 'id',
url: reqBasePath + 'systarea001', url: reqBasePath + 'systarea001',
cellMinWidth: 100, cellMinWidth: 100,
...@@ -35,7 +35,7 @@ layui.config({ ...@@ -35,7 +35,7 @@ layui.config({
{field:'id', width:100, title: 'id'}, {field:'id', width:100, title: 'id'},
{field:'pId', title: 'pId'}, {field:'pId', title: 'pId'},
]], ]],
page:false isPage:false
}); });
function loadTable(){ function loadTable(){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册