Search in sources :

Example 6 with OrgVO

use of com.bc.pmpheep.back.vo.OrgVO 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)

Example 7 with OrgVO

use of com.bc.pmpheep.back.vo.OrgVO in project pmph by BCSquad.

the class OrgUserController method importExcel.

@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "机构用户管理界面导入Excel文件")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public ResponseBean importExcel(@RequestParam(name = "file") MultipartFile file, HttpServletRequest request) {
    Map<String, Object> map = new HashedMap();
    String sessionId = CookiesUtil.getSessionId(request);
    HttpSession session = SessionContext.getSession(sessionId);
    String uuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
    try {
        List<OrgVO> list = orgUserService.importExcel(file);
        map.put("uuid", uuid);
        map.put("list", list);
        session.setAttribute(uuid, list);
    } catch (CheckedServiceException e) {
        return new ResponseBean(e);
    } catch (IOException e) {
        return new ResponseBean(e);
    }
    return new ResponseBean(map);
}
Also used : OrgVO(com.bc.pmpheep.back.vo.OrgVO) HttpSession(javax.servlet.http.HttpSession) CheckedServiceException(com.bc.pmpheep.service.exception.CheckedServiceException) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) IOException(java.io.IOException) HashedMap(org.apache.commons.collections.map.HashedMap) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 8 with OrgVO

use of com.bc.pmpheep.back.vo.OrgVO in project pmph by BCSquad.

the class OrgSeviceTest method testListOrg.

@Test
public void testListOrg() {
    OrgVO orgVO = new OrgVO();
    orgVO.getOrgName();
    PageResult<OrgVO> page = new PageResult<OrgVO>();
    PageParameter<OrgVO> pageParameter = new PageParameter<OrgVO>();
    pageParameter.setParameter(orgVO);
    page = orgService.listOrg(pageParameter);
}
Also used : OrgVO(com.bc.pmpheep.back.vo.OrgVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) PageResult(com.bc.pmpheep.back.plugin.PageResult) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest)

Example 9 with OrgVO

use of com.bc.pmpheep.back.vo.OrgVO in project pmph by BCSquad.

the class OrgSeviceTest method testGetSchoolAdminCheckList.

@Test
public void testGetSchoolAdminCheckList() {
    PageParameter pageParameter = new PageParameter<>();
    PageResult<OrgVO> pageResult = new PageResult<OrgVO>();
    OrgVO orgVO = new OrgVO();
    orgVO.setOrgName(null);
    orgVO.setAreaId(null);
    orgVO.setRealname(null);
    pageParameter.setPageNumber(1);
    pageParameter.setPageSize(20);
    pageParameter.setParameter(orgVO);
    pageResult = orgService.getSchoolAdminCheckList(pageParameter);
    Assert.assertNotNull("获取学校管理员审核列表失败", pageResult);
}
Also used : OrgVO(com.bc.pmpheep.back.vo.OrgVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) PageResult(com.bc.pmpheep.back.plugin.PageResult) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest)

Aggregations

OrgVO (com.bc.pmpheep.back.vo.OrgVO)9 PageParameter (com.bc.pmpheep.back.plugin.PageParameter)6 PageResult (com.bc.pmpheep.back.plugin.PageResult)4 CheckedServiceException (com.bc.pmpheep.service.exception.CheckedServiceException)4 BaseTest (com.bc.pmpheep.test.BaseTest)4 Test (org.junit.Test)4 LogDetail (com.bc.pmpheep.annotation.LogDetail)3 IOException (java.io.IOException)3 Workbook (org.apache.poi.ss.usermodel.Workbook)3 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)3 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)3 ResponseBean (com.bc.pmpheep.controller.bean.ResponseBean)2 ArrayList (java.util.ArrayList)2 HttpSession (javax.servlet.http.HttpSession)2 HSSFWorkbook (org.apache.poi.hssf.usermodel.HSSFWorkbook)2 Row (org.apache.poi.ss.usermodel.Row)2 Sheet (org.apache.poi.ss.usermodel.Sheet)2 OrgAndOrgUserVO (com.bc.pmpheep.back.vo.OrgAndOrgUserVO)1 BufferedOutputStream (java.io.BufferedOutputStream)1 FileNotFoundException (java.io.FileNotFoundException)1