diff --git a/src/main/java/com/zteits/oa/report/web/AsraOpController.java b/src/main/java/com/zteits/oa/report/web/AsraOpController.java index 0d1fa7f..fcadaa0 100644 --- a/src/main/java/com/zteits/oa/report/web/AsraOpController.java +++ b/src/main/java/com/zteits/oa/report/web/AsraOpController.java @@ -49,21 +49,22 @@ public class AsraOpController { /**1.根据当前登录人查询登录人下面管理的员工-缓存中获取*/ AsraOpDTO asraOpDTO = (AsraOpDTO)request.getSession().getAttribute(SessionEnum.USER_INFO.key()); - /**2.判断登录人是领导还是员工 ,2:员工,1:领导*/ - List opIdLists = new ArrayList<>(); - opIdLists.add(asraOpDTO.getId()); - if(asraOpDTO.getRoleId() == 1){ - /**如果是领导,获取领导下面的员工信息*/ - AsraOpRelationsQueryReq asraOpRelationsQueryReq = new AsraOpRelationsQueryReq(); - asraOpRelationsQueryReq.setParentId(asraOpDTO.getId()); - BizResult> listBizResult = asraOpRelationsQueryService.queryAsraOpRelations(asraOpRelationsQueryReq); - if(listBizResult.isSuccess() && CollectionUtil.isNotEmpty(listBizResult.getData())){ - for(AsraOpRelationsDTO asraOpRelationsDTO : listBizResult.getData()){ - opIdLists.add(asraOpRelationsDTO.getOpId()); - } - } - } - asraOpQueryReq.setOpIdLists(opIdLists); +// /**2.判断登录人是领导还是员工 ,2:员工,1:领导*/ +// List opIdLists = new ArrayList<>(); +// opIdLists.add(asraOpDTO.getId()); +// if(asraOpDTO.getRoleId() == 1){ +// /**如果是领导,获取领导下面的员工信息*/ +// AsraOpRelationsQueryReq asraOpRelationsQueryReq = new AsraOpRelationsQueryReq(); +// asraOpRelationsQueryReq.setParentId(asraOpDTO.getId()); +// BizResult> listBizResult = asraOpRelationsQueryService.queryAsraOpRelations(asraOpRelationsQueryReq); +// if(listBizResult.isSuccess() && CollectionUtil.isNotEmpty(listBizResult.getData())){ +// for(AsraOpRelationsDTO asraOpRelationsDTO : listBizResult.getData()){ +// opIdLists.add(asraOpRelationsDTO.getOpId()); +// } +// } +// } +// asraOpQueryReq.setOpIdLists(opIdLists); + asraOpQueryReq.setId(asraOpDTO.getId()); BizResult> result = asraOpQueryService.queryAsraOpForPage(asraOpQueryReq); logger.info("日报系统-员工管理-根据登录人分页查询员工信息结果:{}", JSONObject.toJSON(result)); return result; diff --git a/src/main/java/com/zteits/oa/report/web/vo/EasyUIDataGridVO.java b/src/main/java/com/zteits/oa/report/web/vo/EasyUIDataGridVO.java new file mode 100644 index 0000000..7b18fd2 --- /dev/null +++ b/src/main/java/com/zteits/oa/report/web/vo/EasyUIDataGridVO.java @@ -0,0 +1,44 @@ +package com.zteits.oa.report.web.vo; + +import java.io.Serializable; +import java.util.List; + +/** + * Copyright: Copyright (c) 2017 zteits + * + * @ClassName: JqGridDisplayVO.java + * @Description: JqGrid 对应前台数据传输格式 + * @version: v1.0.0 + * @author: zhaowg + * @date: 2017年5月12日 上午11:20:33 + * Modification History: + * Date Author Version Description + *---------------------------------------------------------* + * 2017年5月12日 zhaowg v1.0.0 创建 + */ +public class EasyUIDataGridVO implements Serializable{ + + private static final long serialVersionUID = 1L; + //总页数 + private Integer total; + + //包含实际数据的数组 + private List rows; + + public Integer getTotal() { + return total; + } + + public void setTotal(Integer total) { + this.total = total; + } + + public List getRows() { + return rows; + } + + public void setRows(List rows) { + this.rows = rows; + } + +} diff --git a/src/main/java/com/zteits/oa/report/web/vo/JqGridDisplayVO.java b/src/main/java/com/zteits/oa/report/web/vo/JqGridDisplayVO.java new file mode 100644 index 0000000..66eb0d0 --- /dev/null +++ b/src/main/java/com/zteits/oa/report/web/vo/JqGridDisplayVO.java @@ -0,0 +1,66 @@ +package com.zteits.oa.report.web.vo; + +import java.io.Serializable; +import java.util.List; + +/** + * Copyright: Copyright (c) 2017 zteits + * + * @ClassName: JqGridDisplayVO.java + * @Description: JqGrid 对应前台数据传输格式 + * @version: v1.0.0 + * @author: zhaowg + * @date: 2017年5月12日 上午11:20:33 + * Modification History: + * Date Author Version Description + *---------------------------------------------------------* + * 2017年5月12日 zhaowg v1.0.0 创建 + */ +public class JqGridDisplayVO implements Serializable{ + + private static final long serialVersionUID = 1L; + //总页数 + private Integer total; + + //当前页 + private Integer page; + + //总记录条数 + private Integer records; + + //包含实际数据的数组 + private List rows; + + public Integer getTotal() { + return total; + } + + public void setTotal(Integer total) { + this.total = total; + } + + public Integer getPage() { + return page; + } + + public void setPage(Integer page) { + this.page = page; + } + + public Integer getRecords() { + return records; + } + + public void setRecords(Integer records) { + this.records = records; + } + + public List getRows() { + return rows; + } + + public void setRows(List rows) { + this.rows = rows; + } + +} diff --git a/src/main/resources/mybatis/smapper/AsraOpSmapper.xml b/src/main/resources/mybatis/smapper/AsraOpSmapper.xml index 1d82bec..41b5eb4 100644 --- a/src/main/resources/mybatis/smapper/AsraOpSmapper.xml +++ b/src/main/resources/mybatis/smapper/AsraOpSmapper.xml @@ -27,21 +27,31 @@