Search in sources :

Example 51 with PageParameter

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

the class UserMessageController method message.

/**
 * 功能描述:初始化/消息标题查询系统消息
 *
 * @param pageNumber 当前页
 * @param pageSize 页面数据条数
 * @param title 标题
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "查询系统消息列表")
@RequestMapping(value = "/list/message", method = RequestMethod.GET)
public ResponseBean message(@RequestParam("pageNumber") Integer pageNumber, @RequestParam("pageSize") Integer pageSize, @RequestParam("title") String title, HttpServletRequest request) {
    PageParameter<UserMessageVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    UserMessageVO userMessageVO = new UserMessageVO();
    if (StringUtil.notEmpty(title)) {
        // 去除空格
        userMessageVO.setTitle(title.replaceAll(" ", ""));
    }
    pageParameter.setParameter(userMessageVO);
    String sessionId = CookiesUtil.getSessionId(request);
    return new ResponseBean(userMessageService.listMessage(pageParameter, sessionId));
}
Also used : PageParameter(com.bc.pmpheep.back.plugin.PageParameter) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) UserMessageVO(com.bc.pmpheep.back.vo.UserMessageVO) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 52 with PageParameter

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

the class BaiduCountController method bookPreference.

/**
 * 功能描述:获取图书偏好分析
 *
 * @param pageSize
 *            当前页的数据条数
 * @param pageNumber
 *            当前页数
 * @param bookname
 *            书籍名称/isbn
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "获取图书偏好分析")
@RequestMapping(value = "/list/bookPreference", method = RequestMethod.GET)
public ResponseBean bookPreference(Integer pageSize, Integer pageNumber, String bookname, Long type, String path) {
    PageParameter<BookPreferenceAnalysisVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    BookPreferenceAnalysisVO bookPreferenceAnalysisVO = new BookPreferenceAnalysisVO();
    bookPreferenceAnalysisVO.setBookname(bookname);
    bookPreferenceAnalysisVO.setType(type);
    bookPreferenceAnalysisVO.setPath(path);
    pageParameter.setParameter(bookPreferenceAnalysisVO);
    return new ResponseBean(bookService.getBookPreferenceAnalysis(pageParameter));
}
Also used : BookPreferenceAnalysisVO(com.bc.pmpheep.back.vo.BookPreferenceAnalysisVO) 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 53 with PageParameter

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

the class GroupController method manager.

/**
 * 功能描述:分页查询小组成员管理界面小组成员信息
 *
 * @param pageSize
 *            当页条数
 * @param pageNumber
 *            当前页数
 * @param groupId
 *            小组id
 * @param name
 *            姓名/帐号
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "分页查询小组成员管理界面小组成员信息")
@RequestMapping(value = "/list/manager", method = RequestMethod.GET)
public ResponseBean manager(Integer pageSize, Integer pageNumber, Long groupId, String name) {
    PageParameter pageParameter = new PageParameter<>(pageNumber, pageSize);
    PmphGroupMemberManagerVO pmphGroupMemberManagerVO = new PmphGroupMemberManagerVO();
    pmphGroupMemberManagerVO.setName(name);
    pmphGroupMemberManagerVO.setGroupId(groupId);
    pageParameter.setParameter(pmphGroupMemberManagerVO);
    return new ResponseBean(pmphGroupMemberService.listGroupMemberManagerVOs(pageParameter));
}
Also used : PmphGroupMemberManagerVO(com.bc.pmpheep.back.vo.PmphGroupMemberManagerVO) 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 54 with PageParameter

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

the class MaterialExtraController method history.

/**
 * <pre>
 * 功能描述:查询历史教材通知列表
 * 使用示范:
 *
 * @param pageNumber 当前页数
 * @param pageSize 当前页条数
 * @param request
 * @return
 * </pre>
 */
@ResponseBody
@LogDetail(businessType = BUSINESS_TYPE, logRemark = "查询历史教材通知列表")
@RequestMapping(value = "/history", method = RequestMethod.GET)
public ResponseBean history(@RequestParam(name = "pageNumber", defaultValue = "1") Integer pageNumber, @RequestParam(name = "pageSize", defaultValue = "5") Integer pageSize, HttpServletRequest request) {
    PageParameter<MateriaHistorylVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    MateriaHistorylVO materiaHistorylVO = new MateriaHistorylVO();
    pageParameter.setParameter(materiaHistorylVO);
    String sessionId = CookiesUtil.getSessionId(request);
    return new ResponseBean(materialExtraService.listMaterialHistory(pageParameter, sessionId));
}
Also used : MateriaHistorylVO(com.bc.pmpheep.back.vo.MateriaHistorylVO) 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 55 with PageParameter

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

the class OrgUserController method orgUser.

/**
 * Description:分页查询机构用户
 *
 * @author:lyc
 * @date:2017年9月26日下午5:43:59
 * @Param: OrgUserManagerVO
 * @Return:分页数据集
 */
@RequestMapping(value = "/list/orgUser", method = RequestMethod.GET)
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "分页查询机构用户")
@ResponseBody
public ResponseBean orgUser(@RequestParam("pageSize") Integer pageSize, @RequestParam("pageNumber") Integer pageNumber, @RequestParam("name") String name, @RequestParam("orgName") String orgName, @RequestParam("orgTypeName") String orgTypeName, @RequestParam("isHospital") Integer isHospital) {
    PageParameter pageParameter = new PageParameter<>();
    OrgAndOrgUserVO orgAndOrgUserVO = new OrgAndOrgUserVO();
    if (StringUtil.notEmpty(orgName)) {
        orgAndOrgUserVO.setOrgName(orgName.replaceAll(" ", ""));
    }
    if (StringUtil.notEmpty(name)) {
        // 去除空格
        orgAndOrgUserVO.setName(name.replaceAll(" ", ""));
    }
    if (StringUtil.notEmpty(orgTypeName)) {
        // 去除空格
        orgAndOrgUserVO.setOrgTypeName(orgTypeName.replaceAll(" ", ""));
    }
    orgAndOrgUserVO.setIsHospital(isHospital);
    pageParameter.setPageNumber(pageNumber);
    pageParameter.setPageSize(pageSize);
    pageParameter.setParameter(orgAndOrgUserVO);
    return new ResponseBean(orgUserService.getListOrgUser(pageParameter));
}
Also used : OrgAndOrgUserVO(com.bc.pmpheep.back.vo.OrgAndOrgUserVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) LogDetail(com.bc.pmpheep.annotation.LogDetail) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

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