Search in sources :

Example 51 with LogDetail

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

the class DecPositionController method declaration.

/**
 * <pre>
 * 功能描述:
 * 使用示范:
 *
 * @param pageSize
 * @param pageNumber
 * @param textbookIds
 * @return
 * </pre>
 */
@ResponseBody
@RequestMapping(value = "/textbook/declaration", method = RequestMethod.GET)
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "获取书籍的申报者")
public ResponseBean declaration(@RequestParam("pageNumber") Integer pageNumber, @RequestParam("pageSize") Integer pageSize, @RequestParam("textbookIds") String[] textbookIds) {
    PageParameter<TextBookDecPositionVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    TextBookDecPositionVO textBookDecPositionVO = new TextBookDecPositionVO();
    textBookDecPositionVO.setTextBookIds(textbookIds);
    pageParameter.setParameter(textBookDecPositionVO);
    return new ResponseBean(decPositionService.listDeclarationByTextbookIds(pageParameter));
}
Also used : TextBookDecPositionVO(com.bc.pmpheep.back.vo.TextBookDecPositionVO) 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 52 with LogDetail

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

the class PropertiesImplController method updateErp.

/**
 * 功能描述:修改erp接口信息
 *
 * @param uri
 * @param username
 * @param driver
 * @param password
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "修改erp接口信息")
@RequestMapping(value = "/updateErp", method = RequestMethod.PUT)
public ResponseBean updateErp(String uri, String username, String driver, String password) {
    ResponseBean responseBean = new ResponseBean<>();
    pp = new Properties();
    fis = PropertiesImplController.class.getClassLoader().getResourceAsStream("mssql-config.properties");
    try {
        pp.load(fis);
        if (!StringUtil.isEmpty(uri)) {
            String url = "jdbc:sqlserver:" + uri;
            pp.setProperty("url", url);
        }
        if (!StringUtil.isEmpty(username)) {
            pp.setProperty("username", username);
        }
        if (!StringUtil.isEmpty(driver)) {
            pp.setProperty("driver", driver);
        }
        if (!StringUtil.isEmpty(password)) {
            pp.setProperty("password", password);
        }
        URL url = PropertiesImplController.class.getClassLoader().getResource("mssql-config.properties");
        os = new FileOutputStream(new File(url.toURI()));
        pp.store(os, "the primary key of article table");
    } catch (URISyntaxException | IOException e) {
        responseBean.setCode(0);
        responseBean.setMsg(e.getMessage());
    } finally {
        try {
            fis.close();
            os.flush();
            os.close();
        } catch (IOException e) {
            responseBean.setCode(0);
            responseBean.setMsg(e.getMessage());
        }
    }
    return responseBean;
}
Also used : FileOutputStream(java.io.FileOutputStream) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) URISyntaxException(java.net.URISyntaxException) IOException(java.io.IOException) Properties(java.util.Properties) File(java.io.File) URL(java.net.URL) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 53 with LogDetail

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

the class PropertiesImplController method updateMall.

/**
 * 功能描述:修改商城接口信息
 *
 * @param uri
 *            商城接口路径
 * @param appKey
 *            AIP分配给用户的sessionKey
 * @param appSecret
 *            加密代码
 * @param sessionKey
 *            AIP分配给用户的SessionKey(或 Access Token).
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "修改商城接口信息")
@RequestMapping(value = "/updateMall", method = RequestMethod.PUT)
public ResponseBean updateMall(String uri, String appKey, String appSecret, String sessionKey) {
    ResponseBean responseBean = new ResponseBean<>();
    pp = new Properties();
    fis = PropertiesImplController.class.getClassLoader().getResourceAsStream("pmphapi-config.properties");
    try {
        pp.load(fis);
        if (!StringUtil.isEmpty(uri)) {
            pp.setProperty("uri", uri);
        }
        if (!StringUtil.isEmpty(appKey)) {
            pp.setProperty("app_key", appKey);
        }
        if (!StringUtil.isEmpty(appSecret)) {
            pp.setProperty("app_secret", appSecret);
        }
        if (!StringUtil.isEmpty(sessionKey)) {
            pp.setProperty("session_key", sessionKey);
        }
        URL url = PropertiesImplController.class.getClassLoader().getResource("pmphapi-config.properties");
        os = new FileOutputStream(new File(url.toURI()));
        pp.store(os, "the primary key of article table");
    } catch (URISyntaxException | IOException e) {
        responseBean.setCode(0);
        responseBean.setMsg(e.getMessage());
    } finally {
        try {
            fis.close();
            os.flush();
            os.close();
        } catch (IOException e) {
            responseBean.setCode(0);
            responseBean.setMsg(e.getMessage());
        }
    }
    return responseBean;
}
Also used : FileOutputStream(java.io.FileOutputStream) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) URISyntaxException(java.net.URISyntaxException) IOException(java.io.IOException) Properties(java.util.Properties) File(java.io.File) URL(java.net.URL) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 54 with LogDetail

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

the class SchoolAndTeacherCheckController method writerList.

/**
 * <pre>
 * 功能描述:获取教师审核列表
 * 使用示范:
 *
 * @param pageNumber 当前页
 * @param pageSize 页面大小
 * @param writerUserManagerVO
 * @return 分页数据集
 * </pre>
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "查询系统消息列表")
@RequestMapping(value = "/writerList", method = RequestMethod.GET)
public ResponseBean writerList(@RequestParam(name = "pageNumber", defaultValue = "1") Integer pageNumber, @RequestParam(name = "pageSize") Integer pageSize, @RequestParam("realname") String realname, @RequestParam("orgName") String orgName, @RequestParam("progress") Short progress) {
    PageParameter pageParameter = new PageParameter<>();
    WriterUserManagerVO writerUserManagerVO = new WriterUserManagerVO();
    if (StringUtil.notEmpty(orgName)) {
        // 去除空格
        writerUserManagerVO.setOrgName(orgName.replaceAll(" ", ""));
    }
    if (StringUtil.notEmpty(realname)) {
        writerUserManagerVO.setRealname(realname.replaceAll(" ", ""));
    }
    writerUserManagerVO.setProgress(progress);
    pageParameter.setPageNumber(pageNumber);
    pageParameter.setPageSize(pageSize);
    pageParameter.setParameter(writerUserManagerVO);
    return new ResponseBean(writerUserService.getTeacherCheckList(pageParameter));
}
Also used : WriterUserManagerVO(com.bc.pmpheep.back.vo.WriterUserManagerVO) 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 55 with LogDetail

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

the class SchoolAndTeacherCheckController method orgList.

/**
 * <pre>
 * 功能描述:获取学校管理员审核列表
 * 使用示范:
 *
 * @param pageNumber 当前页
 * @param pageSize 页面大小
 * @param orgVO orgVO
 * @return 分页数据集
 * </pre>
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "查询系统消息列表")
@RequestMapping(value = "/orgList", method = RequestMethod.GET)
public ResponseBean orgList(@RequestParam(name = "pageNumber", defaultValue = "1") Integer pageNumber, @RequestParam("orgName") String orgName, @RequestParam("realname") String realname, @RequestParam("progress") Integer progress, @RequestParam(name = "pageSize") Integer pageSize) {
    PageParameter pageParameter = new PageParameter<>();
    OrgVO orgVO = new OrgVO();
    if (StringUtil.notEmpty(orgName)) {
        orgVO.setOrgName(orgName.replaceAll(" ", ""));
    }
    if (StringUtil.notEmpty(realname)) {
        orgVO.setRealname(realname.replaceAll(" ", ""));
    }
    orgVO.setProgress(progress);
    pageParameter.setPageNumber(pageNumber);
    pageParameter.setPageSize(pageSize);
    pageParameter.setParameter(orgVO);
    return new ResponseBean(orgService.getSchoolAdminCheckList(pageParameter));
}
Also used : OrgVO(com.bc.pmpheep.back.vo.OrgVO) 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