Search in sources :

Example 61 with LogDetail

use of com.bc.pmpheep.annotation.LogDetail 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)

Example 62 with LogDetail

use of com.bc.pmpheep.annotation.LogDetail in project pmph by BCSquad.

the class TopicController method topicText.

/**
 * 功能描述:获取选题申报详情
 *
 * @param id
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "获取选题申报详情")
@RequestMapping(value = "/get/topicText", method = RequestMethod.GET)
public ResponseBean topicText(HttpServletRequest request, Long id) {
    String sessionId = CookiesUtil.getSessionId(request);
    TopicLog topicLog = new TopicLog();
    topicLog.setTopicId(id);
    topicLog.setTopicEvent("获取选题申报详情");
    return new ResponseBean(topicService.topicTextVO(topicLog, sessionId, id));
}
Also used : ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) 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 63 with LogDetail

use of com.bc.pmpheep.annotation.LogDetail in project pmph by BCSquad.

the class TopicController method listEditor.

/**
 * Description:后台部门编辑查看可操作的申报选题
 *
 * @author:lyc
 * @date:2017年12月22日下午3:10:12
 * @param request
 * @param pageSize
 *            当前页条数
 * @param pageNumber
 *            当前页数
 * @param bookname
 *            选题名称
 * @param submitTime
 *            提交时间
 * @return ResponseBean
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "部门编辑查看可操作的申报选题")
@RequestMapping(value = "/listEditor", method = RequestMethod.GET)
public ResponseBean listEditor(HttpServletRequest request, Integer pageSize, Integer pageNumber, String bookname, String submitTime) {
    PageParameter<TopicEditorVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    TopicEditorVO topicEditorVO = new TopicEditorVO();
    topicEditorVO.setBookname(bookname);
    if (StringUtil.isEmpty(submitTime)) {
        topicEditorVO.setSubmitTime(null);
    } else {
        topicEditorVO.setSubmitTime(DateUtil.str2Timestam(submitTime));
    }
    String sessionId = CookiesUtil.getSessionId(request);
    pageParameter.setParameter(topicEditorVO);
    return new ResponseBean(topicService.listTopicEditorVOs(sessionId, pageParameter));
}
Also used : TopicEditorVO(com.bc.pmpheep.back.vo.TopicEditorVO) 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 64 with LogDetail

use of com.bc.pmpheep.annotation.LogDetail in project pmph by BCSquad.

the class TopicController method editorHandling.

/**
 * 功能描述:编辑操作选题申报
 *
 * @param id
 *            选题申报id
 * @param authProgress
 *            审核进度
 * @param authFeedback
 *            审核意见
 * @param
 *
 * @param isAccepted
 *            编辑是否受理
 * @param isRejectedByEditor
 *            是否退回上级
 * @param reasonEditor
 *            退回原因
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "编辑对选题进行操作")
@RequestMapping(value = "/put/editorHandling", method = RequestMethod.PUT)
public ResponseBean editorHandling(HttpServletRequest request, Long id, Integer authProgress, String authFeedback, Boolean isRejectedByEditor, Boolean isAccepted, String reasonEditor) {
    String sessionId = CookiesUtil.getSessionId(request);
    TopicLog topicLog = new TopicLog();
    topicLog.setTopicId(id);
    topicLog.setTopicEvent("编辑受理选题");
    Topic topic = new Topic();
    topic.setId(id);
    topic.setIsAccepted(isAccepted);
    if (ObjectUtil.isNull(isAccepted)) {
        if (ObjectUtil.isNull(isRejectedByEditor)) {
            isRejectedByEditor = false;
        }
        topic.setIsRejectedByEditor(isRejectedByEditor);
        if (isRejectedByEditor) {
            topicLog.setTopicEvent("编辑退回选题给主任");
            topic.setEditorId(0L);
            topic.setIsEditorHandling(false);
            topic.setReasonEditor(reasonEditor);
        } else {
            topicLog.setTopicEvent("编辑审核选题申报");
            topic.setAuthDate(DateUtil.getCurrentTime());
            topic.setAuthFeedback(authFeedback);
            topic.setAuthProgress(authProgress);
        }
    }
    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 65 with LogDetail

use of com.bc.pmpheep.annotation.LogDetail in project pmph by BCSquad.

the class TopicController method detail.

/**
 * 功能描述:查看选题申报详情
 *
 * @param id
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "查看选题申报详情")
@RequestMapping(value = "/get/detail", method = RequestMethod.GET)
public ResponseBean detail(HttpServletRequest request, Long id) {
    String sessionId = CookiesUtil.getSessionId(request);
    TopicLog topicLog = new TopicLog();
    topicLog.setTopicId(id);
    topicLog.setTopicEvent("查看选题申报详情");
    TopicTextVO topicTextVO = topicService.topicTextVO(topicLog, sessionId, id);
    topicTextVO.setIsAccepted(null);
    topicTextVO.setIsDirectorHandling(null);
    topicTextVO.setIsEditorHandling(null);
    return new ResponseBean(topicTextVO);
}
Also used : TopicTextVO(com.bc.pmpheep.back.vo.TopicTextVO) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) 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)

Aggregations

LogDetail (com.bc.pmpheep.annotation.LogDetail)83 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)82 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)71 ResponseBean (com.bc.pmpheep.controller.bean.ResponseBean)61 PageParameter (com.bc.pmpheep.back.plugin.PageParameter)43 IOException (java.io.IOException)28 CheckedServiceException (com.bc.pmpheep.service.exception.CheckedServiceException)24 OutputStream (java.io.OutputStream)18 BufferedOutputStream (java.io.BufferedOutputStream)17 Workbook (org.apache.poi.ss.usermodel.Workbook)15 UnsupportedEncodingException (java.io.UnsupportedEncodingException)14 ArrayList (java.util.ArrayList)7 Material (com.bc.pmpheep.back.po.Material)6 TopicLog (com.bc.pmpheep.back.po.TopicLog)5 HashMap (java.util.HashMap)4 Properties (java.util.Properties)4 BookVideo (com.bc.pmpheep.back.po.BookVideo)3 PmphGroupMember (com.bc.pmpheep.back.po.PmphGroupMember)3 Topic (com.bc.pmpheep.back.po.Topic)3 DeclarationResultSchoolVO (com.bc.pmpheep.back.vo.DeclarationResultSchoolVO)3