Search in sources :

Example 11 with LogDetail

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

the class DecPositionController method schoolListPreset.

/**
 * Description:加载学校统计结果(按申报数排序)
 *
 * @author:lyc
 * @date:2017年12月5日下午2:57:51
 * @param
 * @return ResponseBean
 */
@ResponseBody
@RequestMapping(value = "/list/schoolListPreset", method = RequestMethod.GET)
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "加载学校统计结果(按申报数排序)")
public ResponseBean schoolListPreset(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.listPresetDeclarationResultSchoolVOs(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 12 with LogDetail

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

the class DecPositionController method schoolResultsPreset.

/**
 * Description:加载学校申报情况统计结果(按申报数排序)
 *
 * @author:lyc
 * @date:2017年12月5日下午2:47:07
 * @param
 * @return ResponseBean
 */
@ResponseBody
@RequestMapping(value = "/list/schoolResultsPreset", method = RequestMethod.GET)
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "加载学校申报情况统计结果(按申报数排序)")
public ResponseBean schoolResultsPreset(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.listPresetDeclarationSituationSchoolResultVOs(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 13 with LogDetail

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

the class PositionChooseController method editorList.

/**
 * 分页查询该书籍下的已选主编和编委
 *
 * @param textbookId
 * @param pageSize
 * @param pageNumber
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "查询该书籍下的已选主编和编委")
@RequestMapping(value = "/editorList", method = RequestMethod.GET)
public ResponseBean editorList(@RequestParam("textbookId") Long textbookId, @RequestParam("pageSize") Integer pageSize, @RequestParam(name = "pageNumber", defaultValue = "1") Integer pageNumber) {
    PageParameter<TextbookDecVO> pageParameter = new PageParameter<>();
    TextbookDecVO textbookDecVO = new TextbookDecVO();
    textbookDecVO.setTextBookId(textbookId);
    pageParameter.setPageNumber(pageNumber);
    pageParameter.setPageSize(pageSize);
    pageParameter.setParameter(textbookDecVO);
    return new ResponseBean(textbookService.listEditorSelection(pageParameter));
}
Also used : TextbookDecVO(com.bc.pmpheep.back.vo.TextbookDecVO) 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 14 with LogDetail

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

the class PropertiesImplController method mall.

/**
 * 功能描述:获取商城的接口信息
 *
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "获取商城接口信息")
@RequestMapping(value = "/mall", method = RequestMethod.GET)
public ResponseBean mall() {
    ResponseBean<Map> responseBean = new ResponseBean<>();
    Map<String, String> map = new HashMap<>();
    pp = new Properties();
    fis = PropertiesImplController.class.getClassLoader().getResourceAsStream("pmphapi-config.properties");
    responseBean.setCode(1);
    try {
        pp.load(fis);
        map.put("uri", pp.getProperty("uri"));
        map.put("appKey", pp.getProperty("app_key"));
        map.put("appSecret", pp.getProperty("app_secret"));
        map.put("sessionKey", pp.getProperty("session_key"));
    } catch (IOException e) {
        responseBean.setCode(0);
        responseBean.setMsg(e.getMessage());
    } finally {
        try {
            fis.close();
        } catch (IOException e) {
            responseBean.setCode(0);
            responseBean.setMsg(e.getMessage());
        }
    }
    responseBean.setData(map);
    return responseBean;
}
Also used : HashMap(java.util.HashMap) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) IOException(java.io.IOException) Properties(java.util.Properties) HashMap(java.util.HashMap) Map(java.util.Map) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 15 with LogDetail

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

the class PropertiesImplController method erp.

/**
 * 功能描述:获取erp接口详情
 *
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "获取erp接口信息")
@RequestMapping(value = "/erp", method = RequestMethod.GET)
public ResponseBean erp() {
    ResponseBean<Map> responseBean = new ResponseBean<>();
    Map<String, String> map = new HashMap<>();
    pp = new Properties();
    fis = PropertiesImplController.class.getClassLoader().getResourceAsStream("mssql-config.properties");
    responseBean.setCode(1);
    try {
        pp.load(fis);
        map.put("uri", pp.getProperty("url").replace("jdbc:sqlserver:", ""));
        map.put("username", pp.getProperty("username"));
        map.put("driver", pp.getProperty("driver"));
        map.put("password", pp.getProperty("password"));
    } catch (IOException e) {
        responseBean.setCode(0);
        responseBean.setMsg(e.getMessage());
    } finally {
        try {
            fis.close();
        } catch (IOException e) {
            responseBean.setCode(0);
            responseBean.setMsg(e.getMessage());
        }
    }
    responseBean.setData(map);
    return responseBean;
}
Also used : HashMap(java.util.HashMap) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) IOException(java.io.IOException) Properties(java.util.Properties) HashMap(java.util.HashMap) Map(java.util.Map) 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