Search in sources :

Example 46 with LogDetail

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

the class BookVideoController method audit.

/**
 * 审核视频
 *
 * @introduction
 * @author Mryang
 * @createDate 2018年2月6日 下午5:34:12
 * @return
 */
@ResponseBody
@RequestMapping(value = "/audit", method = RequestMethod.PUT)
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "微视频审核")
public ResponseBean<Integer> audit(HttpServletRequest request, Long id, Boolean isAuth) {
    if (ObjectUtil.isNull(id)) {
        return new ResponseBean(new CheckedServiceException(CheckedExceptionBusiness.BOOK_VEDIO, CheckedExceptionResult.NULL_PARAM, "微视频id不能为空"));
    }
    if (ObjectUtil.isNull(isAuth)) {
        return new ResponseBean(new CheckedServiceException(CheckedExceptionBusiness.BOOK_VEDIO, CheckedExceptionResult.NULL_PARAM, "审核参数不能为空"));
    }
    String sessionId = CookiesUtil.getSessionId(request);
    if (StringUtil.isEmpty(sessionId)) {
        return new ResponseBean(new CheckedServiceException(CheckedExceptionBusiness.BOOK_VEDIO, CheckedExceptionResult.USER_SESSION, "尚未登录或session已过期"));
    }
    BookVideo bookVideo = new BookVideo();
    bookVideo.setId(id).setAuthDate(new Date()).setAuthUserId(SessionUtil.getPmphUserBySessionId(sessionId).getId()).setIsAuth(isAuth);
    return new ResponseBean(bookVideoService.updateBookVideo(bookVideo));
}
Also used : ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) CheckedServiceException(com.bc.pmpheep.service.exception.CheckedServiceException) BookVideo(com.bc.pmpheep.back.po.BookVideo) Date(java.util.Date) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 47 with LogDetail

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

the class DecPositionController method schoolListChosen.

/**
 * Description:加载学校统计结果(按当选数排序)
 *
 * @author:lyc
 * @date:2017年12月1日下午6:50:23
 * @param
 * @return ResponseBean
 */
@ResponseBody
@RequestMapping(value = "/list/schoolListChosen", method = RequestMethod.GET)
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "加载学校统计结果(按当选数排序)")
public ResponseBean schoolListChosen(Integer pageSize, Integer pageNumber, Long materialId, String schoolName) {
    PageParameter<DeclarationResultSchoolVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    DeclarationResultSchoolVO declarationResultSchoolVO = new DeclarationResultSchoolVO();
    declarationResultSchoolVO.setMaterialId(materialId);
    declarationResultSchoolVO.setSchoolName(schoolName);
    pageParameter.setParameter(declarationResultSchoolVO);
    return new ResponseBean(decPositionService.listChosenDeclarationResultSchoolVOs(pageParameter));
}
Also used : DeclarationResultSchoolVO(com.bc.pmpheep.back.vo.DeclarationResultSchoolVO) 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 48 with LogDetail

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

the class DecPositionController method bookList.

/**
 * Description:加载书本统计结果
 *
 * @author:lyc
 * @date:2017年12月1日下午6:50:46
 * @param
 * @return ResponseBean
 */
@ResponseBody
@RequestMapping(value = "/list/bookList", method = RequestMethod.GET)
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "加载书本统计结果")
public ResponseBean bookList(Integer pageSize, Integer pageNumber, Long materialId, String bookName) {
    PageParameter<DeclarationResultBookVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    DeclarationResultBookVO declarationResultBookVO = new DeclarationResultBookVO();
    declarationResultBookVO.setMaterialId(materialId);
    declarationResultBookVO.setBookName(bookName);
    pageParameter.setParameter(declarationResultBookVO);
    return new ResponseBean(decPositionService.listDeclarationResultBookVOs(pageParameter));
}
Also used : PageParameter(com.bc.pmpheep.back.plugin.PageParameter) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) DeclarationResultBookVO(com.bc.pmpheep.back.vo.DeclarationResultBookVO) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 49 with LogDetail

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

the class DecPositionController method schoolResultsChosen.

/**
 * Description:加载学校申报情况统计结果(按当选数排序)
 *
 * @author:lyc
 * @date:2017年12月1日下午3:03:36
 * @param
 * @return ResponseBean
 */
@ResponseBody
@RequestMapping(value = "/list/schoolResultsChosen", method = RequestMethod.GET)
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "加载学校申报情况统计结果(按当选数排序)")
public ResponseBean schoolResultsChosen(Integer pageSize, Integer pageNumber, Long materialId, String schoolName) {
    PageParameter<DeclarationSituationSchoolResultVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    DeclarationSituationSchoolResultVO declarationSituationSchoolResultVO = new DeclarationSituationSchoolResultVO();
    declarationSituationSchoolResultVO.setMaterialId(materialId);
    declarationSituationSchoolResultVO.setSchoolName(schoolName);
    pageParameter.setParameter(declarationSituationSchoolResultVO);
    return new ResponseBean(decPositionService.listChosenDeclarationSituationSchoolResultVOs(pageParameter));
}
Also used : PageParameter(com.bc.pmpheep.back.plugin.PageParameter) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) DeclarationSituationSchoolResultVO(com.bc.pmpheep.back.vo.DeclarationSituationSchoolResultVO) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 50 with LogDetail

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

the class DecPositionController method bookResults.

/**
 * Description:加载书本申报情况统计结果
 *
 * @author:lyc
 * @date:2017年12月1日下午5:44:16
 * @param
 * @return ResponseBean
 */
@ResponseBody
@RequestMapping(value = "/list/bookResults", method = RequestMethod.GET)
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "加载书本申报情况统计结果")
public ResponseBean bookResults(Integer pageSize, Integer pageNumber, Long materialId, String bookName) {
    PageParameter<DeclarationSituationBookResultVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    DeclarationSituationBookResultVO declarationSituationBookResultVO = new DeclarationSituationBookResultVO();
    declarationSituationBookResultVO.setMaterialId(materialId);
    declarationSituationBookResultVO.setBookName(bookName);
    pageParameter.setParameter(declarationSituationBookResultVO);
    return new ResponseBean(decPositionService.listDeclarationSituationBookResultVOs(pageParameter));
}
Also used : DeclarationSituationBookResultVO(com.bc.pmpheep.back.vo.DeclarationSituationBookResultVO) 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)

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