Search in sources :

Example 56 with LogDetail

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

the class TopicController method listEditors.

/**
 * Description:部门主任获取部门人员信息列表
 *
 * @author:lyc
 * @date:2017年12月27日下午5:02:46
 * @param
 * @return ResponseBean
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "获取部门编辑列表")
@RequestMapping(value = "/listEditors", method = RequestMethod.GET)
public ResponseBean listEditors(Long departmentId, String realName, Integer pageSize, Integer pageNumber) {
    PageParameter<PmphEditorVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    PmphEditorVO pmphEditorVO = new PmphEditorVO();
    pmphEditorVO.setDepartmentId(departmentId);
    pmphEditorVO.setRealName(realName);
    pageParameter.setParameter(pmphEditorVO);
    return new ResponseBean(pmphUserService.listEditors(pageParameter));
}
Also used : PageParameter(com.bc.pmpheep.back.plugin.PageParameter) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) PmphEditorVO(com.bc.pmpheep.back.vo.PmphEditorVO) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 57 with LogDetail

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

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

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

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

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