Search in sources :

Example 51 with ResponseBean

use of com.bc.pmpheep.controller.bean.ResponseBean in project pmph by BCSquad.

the class BaiduCountController method bookPreference.

/**
 * 功能描述:获取图书偏好分析
 *
 * @param pageSize
 *            当前页的数据条数
 * @param pageNumber
 *            当前页数
 * @param bookname
 *            书籍名称/isbn
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "获取图书偏好分析")
@RequestMapping(value = "/list/bookPreference", method = RequestMethod.GET)
public ResponseBean bookPreference(Integer pageSize, Integer pageNumber, String bookname, Long type, String path) {
    PageParameter<BookPreferenceAnalysisVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    BookPreferenceAnalysisVO bookPreferenceAnalysisVO = new BookPreferenceAnalysisVO();
    bookPreferenceAnalysisVO.setBookname(bookname);
    bookPreferenceAnalysisVO.setType(type);
    bookPreferenceAnalysisVO.setPath(path);
    pageParameter.setParameter(bookPreferenceAnalysisVO);
    return new ResponseBean(bookService.getBookPreferenceAnalysis(pageParameter));
}
Also used : BookPreferenceAnalysisVO(com.bc.pmpheep.back.vo.BookPreferenceAnalysisVO) 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 ResponseBean

use of com.bc.pmpheep.controller.bean.ResponseBean in project pmph by BCSquad.

the class GroupController method manager.

/**
 * 功能描述:分页查询小组成员管理界面小组成员信息
 *
 * @param pageSize
 *            当页条数
 * @param pageNumber
 *            当前页数
 * @param groupId
 *            小组id
 * @param name
 *            姓名/帐号
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "分页查询小组成员管理界面小组成员信息")
@RequestMapping(value = "/list/manager", method = RequestMethod.GET)
public ResponseBean manager(Integer pageSize, Integer pageNumber, Long groupId, String name) {
    PageParameter pageParameter = new PageParameter<>(pageNumber, pageSize);
    PmphGroupMemberManagerVO pmphGroupMemberManagerVO = new PmphGroupMemberManagerVO();
    pmphGroupMemberManagerVO.setName(name);
    pmphGroupMemberManagerVO.setGroupId(groupId);
    pageParameter.setParameter(pmphGroupMemberManagerVO);
    return new ResponseBean(pmphGroupMemberService.listGroupMemberManagerVOs(pageParameter));
}
Also used : PmphGroupMemberManagerVO(com.bc.pmpheep.back.vo.PmphGroupMemberManagerVO) 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 53 with ResponseBean

use of com.bc.pmpheep.controller.bean.ResponseBean in project pmph by BCSquad.

the class GroupController method addEditorGroup.

/**
 * 功能描述:职位遴选页面新建小组
 *
 * @param textbookId
 * @param pmphGroupMembers
 * @param request
 * @return 是否成功
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "职位遴选页面新建小组")
@RequestMapping(value = "/addEditorGroup", method = RequestMethod.POST)
public ResponseBean addEditorGroup(Long textbookId, String pmphGroupMembers, HttpServletRequest request) {
    try {
        String sessionId = CookiesUtil.getSessionId(request);
        Gson gson = new Gson();
        Type type = new TypeToken<ArrayList<PmphGroupMember>>() {
        }.getType();
        List<PmphGroupMember> list = gson.fromJson(pmphGroupMembers, type);
        return new ResponseBean(pmphGroupService.addEditorSelcetionGroup(sessionId, list, textbookId));
    } catch (Exception e) {
        return new ResponseBean(e);
    }
}
Also used : Type(java.lang.reflect.Type) PmphGroupMember(com.bc.pmpheep.back.po.PmphGroupMember) ArrayList(java.util.ArrayList) Gson(com.google.gson.Gson) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) CheckedServiceException(com.bc.pmpheep.service.exception.CheckedServiceException) IOException(java.io.IOException) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 54 with ResponseBean

use of com.bc.pmpheep.controller.bean.ResponseBean in project pmph by BCSquad.

the class GroupController method pmphGroupFile.

/**
 * 上传文件时的小组列表
 *
 * @author Mryang
 * @param pmphGroup
 * @return
 * @createDate 2017年9月21日 下午4:02:57
 */
@RequestMapping(value = "/list/pmphGroupFile", method = RequestMethod.GET)
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "上传文件时的小组列表")
@ResponseBody
public ResponseBean pmphGroupFile(HttpServletRequest request) {
    PmphGroup pmphGroup = new PmphGroup();
    String sessionId = CookiesUtil.getSessionId(request);
    return new ResponseBean(pmphGroupService.listPmphGroupFile(pmphGroup, sessionId));
}
Also used : PmphGroup(com.bc.pmpheep.back.po.PmphGroup) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) LogDetail(com.bc.pmpheep.annotation.LogDetail) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 55 with ResponseBean

use of com.bc.pmpheep.controller.bean.ResponseBean in project pmph by BCSquad.

the class MaterialController method update.

/**
 * 更新遴选公告
 *
 * @param sessionId
 * @param material
 *            教材对象
 * @param materialContacts
 *            多个教材联系人
 * @param materialExtensions
 *            多个教材扩展项
 * @param MaterialProjectEditors
 *            多个教材扩项目编辑
 * @param materialExtra
 *            教材通知备
 * @param materialNoticeAttachments
 *            多个教材通知
 * @param noticeFiles
 *            通知文件
 * @param materialNoteAttachments
 *            多个教材备注
 * @param noteFiles
 *            备注文件
 * @return
 */
@ResponseBody
@LogDetail(businessType = Business_Type, logRemark = "修改遴选公告")
@RequestMapping(value = "/update", method = RequestMethod.POST)
public ResponseBean update(MaterialVO materialVO, HttpServletRequest request, // MultipartFile[] noteFiles,
String deadline, String actualDeadline, String ageDeadline) {
    try {
        materialVO.getMaterial().setDeadline(DateUtil.str3Date(deadline));
        materialVO.getMaterial().setActualDeadline(DateUtil.str3Date(actualDeadline));
        materialVO.getMaterial().setAgeDeadline(DateUtil.str3Date(ageDeadline));
        return new ResponseBean(materialService.addOrUpdateMaterial(request, materialVO, // noteFiles,
        true));
    } catch (IOException e) {
        ResponseBean responseBean = new ResponseBean(e);
        responseBean.setData("上传文件失败");
        return responseBean;
    } catch (Exception e) {
        ResponseBean responseBean = new ResponseBean(e);
        responseBean.setData(e.getMessage());
        return responseBean;
    }
}
Also used : ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) IOException(java.io.IOException) IOException(java.io.IOException) CheckedServiceException(com.bc.pmpheep.service.exception.CheckedServiceException) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

ResponseBean (com.bc.pmpheep.controller.bean.ResponseBean)67 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)67 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)65 LogDetail (com.bc.pmpheep.annotation.LogDetail)61 PageParameter (com.bc.pmpheep.back.plugin.PageParameter)37 CheckedServiceException (com.bc.pmpheep.service.exception.CheckedServiceException)11 IOException (java.io.IOException)11 ArrayList (java.util.ArrayList)7 HashMap (java.util.HashMap)7 TopicLog (com.bc.pmpheep.back.po.TopicLog)5 DesRun (com.bc.pmpheep.back.util.DesRun)4 Properties (java.util.Properties)4 BookVideo (com.bc.pmpheep.back.po.BookVideo)3 PmphGroupMember (com.bc.pmpheep.back.po.PmphGroupMember)3 PmphUser (com.bc.pmpheep.back.po.PmphUser)3 Topic (com.bc.pmpheep.back.po.Topic)3 PmphGroup (com.bc.pmpheep.back.po.PmphGroup)2 PmphRole (com.bc.pmpheep.back.po.PmphRole)2 WriterUser (com.bc.pmpheep.back.po.WriterUser)2 DeclarationResultSchoolVO (com.bc.pmpheep.back.vo.DeclarationResultSchoolVO)2