Search in sources :

Example 41 with ResponseBean

use of com.bc.pmpheep.controller.bean.ResponseBean in project pmph by BCSquad.

the class TopicController method checkTopic.

/**
 * 功能描述:查看选题申报
 *
 * @param authProgress
 *            申报状态
 * @param bookname
 *            申报标题
 * @param submitTime
 *            提交日期
 * @param pageSize
 * @param pageNumber
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "查看选题申报")
@RequestMapping(value = "/list/checkTopic", method = RequestMethod.GET)
public ResponseBean checkTopic(String authProgress, String bookname, String submitTime, Integer pageSize, Integer pageNumber) {
    String[] strs = authProgress.split(",");
    List<Long> progress = new ArrayList<>();
    for (String str : strs) {
        progress.add(Long.valueOf(str));
    }
    PageParameter<TopicDeclarationVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    TopicDeclarationVO topicDeclarationVO = new TopicDeclarationVO();
    topicDeclarationVO.setBookname(bookname);
    if (StringUtil.isEmpty(submitTime)) {
        topicDeclarationVO.setSubmitTime(null);
    } else {
        topicDeclarationVO.setSubmitTime(DateUtil.str2Timestam(submitTime));
    }
    pageParameter.setParameter(topicDeclarationVO);
    return new ResponseBean(topicService.listCheckTopic(progress, pageParameter));
}
Also used : ArrayList(java.util.ArrayList) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) TopicDeclarationVO(com.bc.pmpheep.back.vo.TopicDeclarationVO) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 42 with ResponseBean

use of com.bc.pmpheep.controller.bean.ResponseBean in project pmph by BCSquad.

the class TopicController method directorHandling.

/**
 * 功能描述:主任操作选题流程
 *
 * @param id
 *            选题申报id
 * @param editorId
 *            部门编辑id
 * @param isRejectedByDirector
 *            主任是否退回
 * @param reasonDirector
 *            退回原因
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "主任分配选题给部门编辑")
@RequestMapping(value = "/put/directorHandling", method = RequestMethod.PUT)
public ResponseBean directorHandling(HttpServletRequest request, Long id, Long editorId, Boolean isRejectedByDirector, String reasonDirector) {
    String sessionId = CookiesUtil.getSessionId(request);
    TopicLog topicLog = new TopicLog();
    topicLog.setTopicId(id);
    Topic topic = new Topic();
    topic.setId(id);
    if (ObjectUtil.isNull(isRejectedByDirector)) {
        isRejectedByDirector = false;
    }
    topic.setIsRejectedByDirector(isRejectedByDirector);
    if (isRejectedByDirector) {
        topicLog.setTopicEvent("主任退回选题给运维人员");
        topic.setIsRejectedByEditor(false);
        topic.setReasonEditor("-");
        topic.setIsDirectorHandling(false);
        topic.setReasonDirector(reasonDirector);
    } else {
        topicLog.setTopicEvent("主任分配选题给部门编辑");
        topic.setEditorId(editorId);
        topic.setIsRejectedByEditor(false);
        topic.setIsEditorHandling(true);
    }
    return new ResponseBean(topicService.update(topicLog, sessionId, topic));
}
Also used : ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) Topic(com.bc.pmpheep.back.po.Topic) TopicLog(com.bc.pmpheep.back.po.TopicLog) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 43 with ResponseBean

use of com.bc.pmpheep.controller.bean.ResponseBean 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));
}
Also used : TopicOPtsManagerVO(com.bc.pmpheep.back.vo.TopicOPtsManagerVO) 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 44 with ResponseBean

use of com.bc.pmpheep.controller.bean.ResponseBean in project pmph by BCSquad.

the class TopicController method optsHandling.

/**
 * 功能描述:运维人员分配选题申报给部门
 *
 * @param id
 *            选题id
 * @param departmentId
 *            部门id
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "运维人员分配选题给部门")
@RequestMapping(value = "/put/optsHandling", method = RequestMethod.PUT)
public ResponseBean optsHandling(HttpServletRequest request, Long id, Long departmentId) {
    String sessionId = CookiesUtil.getSessionId(request);
    TopicLog topicLog = new TopicLog();
    topicLog.setTopicId(id);
    topicLog.setTopicEvent("运维人员分配选题给部门");
    Topic topic = new Topic();
    topic.setId(id);
    topic.setDepartmentId(departmentId);
    topic.setIsDirectorHandling(true);
    return new ResponseBean(topicService.update(topicLog, sessionId, topic));
}
Also used : ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) Topic(com.bc.pmpheep.back.po.Topic) TopicLog(com.bc.pmpheep.back.po.TopicLog) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 45 with ResponseBean

use of com.bc.pmpheep.controller.bean.ResponseBean in project pmph by BCSquad.

the class TopicController method listDirector.

/**
 * Description:后台部门主任查看可操作的选题
 *
 * @author:lyc
 * @date:2017年12月22日下午2:59:37
 * @param request
 * @param pageSize
 *            当前页条数
 * @param pageNumber
 *            当前页数
 * @param bookname
 *            选题名称
 * @param submitTime
 *            提交时间
 * @return ResponseBean
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "部门主任查看可操作的选题")
@RequestMapping(value = "/listDirector", method = RequestMethod.GET)
public ResponseBean listDirector(HttpServletRequest request, Integer pageSize, Integer pageNumber, String bookname, String submitTime) {
    PageParameter<TopicDirectorVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    TopicDirectorVO topicDirectorVO = new TopicDirectorVO();
    topicDirectorVO.setBookname(bookname);
    if (StringUtil.isEmpty(submitTime)) {
        topicDirectorVO.setSubmitTime(null);
    } else {
        topicDirectorVO.setSubmitTime(DateUtil.str2Timestam(submitTime));
    }
    String sessionId = CookiesUtil.getSessionId(request);
    pageParameter.setParameter(topicDirectorVO);
    return new ResponseBean(topicService.listTopicDirectorVOs(sessionId, pageParameter));
}
Also used : PageParameter(com.bc.pmpheep.back.plugin.PageParameter) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) TopicDirectorVO(com.bc.pmpheep.back.vo.TopicDirectorVO) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

ResponseBean (com.bc.pmpheep.controller.bean.ResponseBean)67 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)67 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)65 LogDetail (com.bc.pmpheep.annotation.LogDetail)61 PageParameter (com.bc.pmpheep.back.plugin.PageParameter)37 CheckedServiceException (com.bc.pmpheep.service.exception.CheckedServiceException)11 IOException (java.io.IOException)11 ArrayList (java.util.ArrayList)7 HashMap (java.util.HashMap)7 TopicLog (com.bc.pmpheep.back.po.TopicLog)5 DesRun (com.bc.pmpheep.back.util.DesRun)4 Properties (java.util.Properties)4 BookVideo (com.bc.pmpheep.back.po.BookVideo)3 PmphGroupMember (com.bc.pmpheep.back.po.PmphGroupMember)3 PmphUser (com.bc.pmpheep.back.po.PmphUser)3 Topic (com.bc.pmpheep.back.po.Topic)3 PmphGroup (com.bc.pmpheep.back.po.PmphGroup)2 PmphRole (com.bc.pmpheep.back.po.PmphRole)2 WriterUser (com.bc.pmpheep.back.po.WriterUser)2 DeclarationResultSchoolVO (com.bc.pmpheep.back.vo.DeclarationResultSchoolVO)2