use of com.bc.pmpheep.back.vo.TopicOPtsManagerVO in project pmph by BCSquad.
the class TopicServiceImpl method listOpts.
@Override
public PageResult<TopicOPtsManagerVO> listOpts(String sessionId, PageParameter<TopicOPtsManagerVO> pageParameter) throws CheckedServiceException {
PmphUser pmphUser = SessionUtil.getPmphUserBySessionId(sessionId);
if (ObjectUtil.isNull(pmphUser)) {
throw new CheckedServiceException(CheckedExceptionBusiness.TOPIC, CheckedExceptionResult.NULL_PARAM, "用户为空!");
}
PageResult<TopicOPtsManagerVO> pageResult = new PageResult<>();
PageParameterUitl.CopyPageParameter(pageParameter, pageResult);
Integer total = 0;
String submitTime = DateUtil.date2Str(pageParameter.getParameter().getSubmitTime(), "yyyy-MM-dd");
if (pmphUser.getIsAdmin()) {
total = topicDao.listTotal(pageParameter.getParameter().getBookname(), submitTime);
if (total > 0) {
List<TopicOPtsManagerVO> list = topicDao.list(pageParameter.getParameter().getBookname(), submitTime, pageParameter.getStart(), pageParameter.getPageSize());
list = addTypeName(list);
pageResult.setRows(list);
}
} else {
total = topicDao.listOptsTotal(pmphUser.getId(), pageParameter.getParameter().getBookname(), submitTime);
if (total > 0) {
List<TopicOPtsManagerVO> list = topicDao.listOpts(pmphUser.getId(), pageParameter.getParameter().getBookname(), submitTime, pageParameter.getStart(), pageParameter.getPageSize());
list = addTypeName(list);
pageResult.setRows(list);
}
}
pageResult.setTotal(total);
return pageResult;
}
use of com.bc.pmpheep.back.vo.TopicOPtsManagerVO in project pmph by BCSquad.
the class TopicController method listOpts.
/**
* 功能描述:维护人员选题申报审核页面
*
* @param request
* @param pageSize
* 当前页条数
* @param pageNumber
* 当前页数
* @param bookname
* 选题名称
* @param submitTime
* 提交时间
* @return
*/
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "维护人员查询可操作的选题")
@RequestMapping(value = "/listOpts", method = RequestMethod.GET)
public ResponseBean listOpts(HttpServletRequest request, Integer pageSize, Integer pageNumber, String bookname, String submitTime) {
PageParameter<TopicOPtsManagerVO> pageParameter = new PageParameter(pageNumber, pageSize);
TopicOPtsManagerVO topicOPtsManagerVO = new TopicOPtsManagerVO();
topicOPtsManagerVO.setBookname(bookname);
if (StringUtil.isEmpty(submitTime)) {
topicOPtsManagerVO.setSubmitTime(null);
} else {
topicOPtsManagerVO.setSubmitTime(DateUtil.str2Timestam(submitTime));
}
String sessionId = CookiesUtil.getSessionId(request);
pageParameter.setParameter(topicOPtsManagerVO);
return new ResponseBean(topicService.listOpts(sessionId, pageParameter));
}
Aggregations