Search in sources :

Example 56 with PageParameter

use of com.bc.pmpheep.back.plugin.PageParameter in project pmph by BCSquad.

the class PmphDepartmentController method listOpts.

/**
 * 功能描述:选题申报运维人员获取部门和部门负责人
 *
 * @param dpName
 *            部门名称
 * @param pageSize
 *            当页条数
 * @param pageNumber
 *            当前页数
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "获取部门与部门负责人")
@RequestMapping(value = "/listOpts", method = RequestMethod.GET)
public ResponseBean listOpts(String dpName, Integer pageSize, Integer pageNumber) {
    PageParameter<DepartmentOptsVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    DepartmentOptsVO departmentOptsVO = new DepartmentOptsVO();
    departmentOptsVO.setDpName(dpName);
    pageParameter.setParameter(departmentOptsVO);
    return new ResponseBean(pmphDepartmentService.listOpts(pageParameter));
}
Also used : DepartmentOptsVO(com.bc.pmpheep.back.vo.DepartmentOptsVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 57 with PageParameter

use of com.bc.pmpheep.back.plugin.PageParameter in project pmph by BCSquad.

the class PmphUserController method pmphUser.

/**
 * 功能描述:分页查询社内用户
 *
 * @param page
 *            分页条件
 * @param pmphUserManagerVO
 *            查询条件
 * @return 分好页的结果集
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "分页查询社内用户")
@RequestMapping(value = "/list/pmphUser", method = RequestMethod.GET)
public ResponseBean pmphUser(Integer pageSize, Integer pageNumber, String name, @RequestParam("path") String path, Long departmentId, Long groupId) {
    PageParameter pageParameter = new PageParameter<>();
    PmphUserManagerVO pmphUserManagerVO = new PmphUserManagerVO();
    if (StringUtil.notEmpty(name)) {
        // 去除空格
        pmphUserManagerVO.setName(name.replaceAll(" ", ""));
    }
    pmphUserManagerVO.setPath(path);
    pmphUserManagerVO.setDepartmentId(departmentId);
    pageParameter.setPageNumber(pageNumber);
    pageParameter.setPageSize(pageSize);
    pageParameter.setParameter(pmphUserManagerVO);
    return new ResponseBean(userService.getListPmphUser(pageParameter, groupId));
}
Also used : PageParameter(com.bc.pmpheep.back.plugin.PageParameter) PmphUserManagerVO(com.bc.pmpheep.back.vo.PmphUserManagerVO) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 58 with PageParameter

use of com.bc.pmpheep.back.plugin.PageParameter in project pmph by BCSquad.

the class WriterUserController method writerUser.

/**
 * 功能描述:分页查询作家用户
 *
 * @param page
 *            分页条件
 * @param writerUserManagerVO
 *            查询条件
 * @return 分好页的结果集
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "分页查询作家用户")
@RequestMapping(value = "/list/writerUser", method = RequestMethod.GET)
public ResponseBean writerUser(Long groupId, @RequestParam("pageSize") Integer pageSize, @RequestParam("pageNumber") Integer pageNumber, @RequestParam("name") String name, @RequestParam("rank") Integer rank, @RequestParam("orgName") String orgName) {
    PageParameter pageParameter = new PageParameter<>();
    WriterUserManagerVO writerUserManagerVO = new WriterUserManagerVO();
    if (StringUtil.notEmpty(name)) {
        // 去除空格
        writerUserManagerVO.setName(name.replaceAll(" ", ""));
    }
    if (StringUtil.notEmpty(orgName)) {
        writerUserManagerVO.setOrgName(orgName.replaceAll(" ", ""));
    }
    writerUserManagerVO.setRank(rank);
    pageParameter.setPageNumber(pageNumber);
    pageParameter.setPageSize(pageSize);
    pageParameter.setParameter(writerUserManagerVO);
    return new ResponseBean(writerUserService.getListWriterUser(pageParameter, groupId));
}
Also used : WriterUserManagerVO(com.bc.pmpheep.back.vo.WriterUserManagerVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 59 with PageParameter

use of com.bc.pmpheep.back.plugin.PageParameter in project pmph by BCSquad.

the class WriterUserController method groupMember.

/**
 * 功能描述: 分页查询小组成员添加界面作家用户信息
 *
 * @param bookname
 *            书籍名称
 * @param chosenPosition
 *            申报职位
 * @param name
 *            姓名/帐号
 * @return 分好页的数据集
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = " 分页查询小组成员添加界面作家用户信息")
@RequestMapping(value = "/list/groupMember", method = RequestMethod.GET)
public ResponseBean groupMember(Integer pageSize, Integer pageNumber, String bookname, Integer chosenPosition, String name) {
    PageParameter<GroupMemberWriterUserVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    GroupMemberWriterUserVO groupMemberWriterUserVO = new GroupMemberWriterUserVO();
    groupMemberWriterUserVO.setBookname(bookname);
    groupMemberWriterUserVO.setChosenPosition(chosenPosition);
    groupMemberWriterUserVO.setName(name);
    pageParameter.setParameter(groupMemberWriterUserVO);
    return new ResponseBean(writerUserService.listGroupMemberWriterUsers(pageParameter));
}
Also used : GroupMemberWriterUserVO(com.bc.pmpheep.back.vo.GroupMemberWriterUserVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 60 with PageParameter

use of com.bc.pmpheep.back.plugin.PageParameter in project pmph by BCSquad.

the class WriterPointController method list.

/**
 * 用户积分分页查询
 * @param pageSize
 * @param pageNumber
 * @param username
 * @param realname
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "分页查询用户积分列表")
@RequestMapping(value = "/list", method = RequestMethod.GET)
public ResponseBean list(@RequestParam("pageSize") Integer pageSize, @RequestParam("pageNumber") Integer pageNumber, @RequestParam("username") String username, @RequestParam("realname") String realname) {
    PageParameter<WriterPointVO> pageParameter = new PageParameter<WriterPointVO>(pageNumber, pageSize);
    WriterPointVO writerPoint = new WriterPointVO();
    writerPoint.setUsername(username);
    writerPoint.setRealname(realname);
    pageParameter.setParameter(writerPoint);
    return new ResponseBean(writerPointService.getListWriterPoint(pageParameter));
}
Also used : WriterPointVO(com.bc.pmpheep.back.vo.WriterPointVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

PageParameter (com.bc.pmpheep.back.plugin.PageParameter)78 LogDetail (com.bc.pmpheep.annotation.LogDetail)43 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)43 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)39 ResponseBean (com.bc.pmpheep.controller.bean.ResponseBean)37 BaseTest (com.bc.pmpheep.test.BaseTest)28 Test (org.junit.Test)28 PageResult (com.bc.pmpheep.back.plugin.PageResult)24 Rollback (org.springframework.test.annotation.Rollback)14 CheckedServiceException (com.bc.pmpheep.service.exception.CheckedServiceException)12 IOException (java.io.IOException)8 WriterUserManagerVO (com.bc.pmpheep.back.vo.WriterUserManagerVO)7 Workbook (org.apache.poi.ss.usermodel.Workbook)7 OrgVO (com.bc.pmpheep.back.vo.OrgVO)6 ArrayList (java.util.ArrayList)6 Material (com.bc.pmpheep.back.po.Material)5 OrgAndOrgUserVO (com.bc.pmpheep.back.vo.OrgAndOrgUserVO)5 BufferedOutputStream (java.io.BufferedOutputStream)5 OutputStream (java.io.OutputStream)5 UnsupportedEncodingException (java.io.UnsupportedEncodingException)5