コード例 #1
0
 /**
  * 展业计划列表
  *
  * @param space
  * @param page
  * @param rows
  * @param request
  * @param session
  * @return
  */
 @RequestMapping("spaceList")
 public @ResponseBody Pagination spaceList(
     Space space, String page, String rows, HttpServletRequest request, HttpSession session) {
   Pagination pagination = new Pagination();
   if (!StringUtils.isBlank(page)) {
     pagination.setPage(Integer.valueOf(page));
   }
   if (!StringUtils.isBlank(rows)) {
     pagination.setPageSize(Integer.valueOf(rows));
   }
   return spaceService.spaceList(pagination, space, page, rows, request, session);
 }
コード例 #2
0
 /**
  * 保存登记展业计划
  *
  * @param space
  * @return
  */
 @RequestMapping("saveSpace")
 public @ResponseBody Message saveSpace(Space space) {
   Message message = new Message();
   Long saveSpace = spaceService.saveSpace(space);
   if (saveSpace != null && saveSpace > 0) {
     message.setSuccess(true);
     message.setMsg("保存成功");
   } else {
     message.setSuccess(false);
     message.setMsg("保存失败");
   }
   return message;
 }
コード例 #3
0
 /**
  * 延期
  *
  * @param value
  * @return
  */
 @RequestMapping(value = "updateSpaceStud")
 public @ResponseBody Message updateSpaceStud(String value) {
   return spaceService.updateSpaceStud(value);
 }
コード例 #4
0
 @RequestMapping("downloadExcel")
 public void downloadExcel(
     HttpServletResponse response,
     Pagination pagination,
     Space space,
     String page,
     String rows,
     HttpServletRequest request,
     HttpSession session)
     throws Exception {
   // response.setContentType("application/msexcel;charset=UTF-8");
   pagination.setPageSize(0);
   pagination = spaceService.downloadExcel(pagination, space, page, rows, request, session);
   List list = pagination.getRows(); // 获取数据
   if (CommonUtil.isNotEmpty(list)) {
     String title = "执行计划列表";
     String[] hearders =
         new String[] {
           "大区名字", "分中心", "所属营业部", "计划展业日期", "计划展业时间", "计划展业地点", "人员规划", "预计客户咨询量", "展业状态",
           "实际展业日期", "实际展业时间", "实际展业地点", "实际参与人员", "实际客户量", "提供照片数量"
         }; // 表头数组
     String[] fields =
         new String[] {
           "REGIONNAME",
           "CITYDEPARTMENTNAME",
           "AREADEPARTMENTNAME",
           "SPACEDATE",
           "SPACETIME",
           "SPACEPLACE",
           "PERSONPLANNING",
           "CUSTOMERCONSULTCOUNT",
           "SAPCETEXT",
           "SPACEDATEREALITY",
           "SPACETIMEREALITY",
           "SPACEPLACEREALITY",
           "PARTICIPANTSREALITY",
           "CUSTOMERCONSULTCOUNTREALITY",
           "PHOTOCOUNT"
         }; // 对象属性数组
     TableData td =
         ExcelUtils.createTableData(list, ExcelUtils.createTableHeader(hearders), fields);
     // JsGridReportBase report = new JsGridReportBase(request, response);
     jsGridReportBaseXLSXService.jsGridReportBaseXLSXService(request, response);
     jsGridReportBaseXLSXService.exportToExcel(
         title, SpringSecurityUtils.getCurrentUserName(), td);
   } else {
     String title = "执行计划列表";
     String[] hearders =
         new String[] {
           "大区名字", "分中心", "所属营业部", "计划展业日期", "计划展业日期", "计划展业时间", "计划展业地点", "人员规划", "预计客户咨询量",
           "展业状态", "实际展业日期", "实际展业时间", "实际展业地点", "实际参与人员", "实际客户量", "提供照片数量"
         }; // 表头数组
     Space cu = new Space();
     list.add(cu);
     String[] fields = new String[] {}; // 对象属性数组
     TableData td =
         ExcelUtils.createTableData(list, ExcelUtils.createTableHeader(hearders), fields);
     /* JsGridReportBase report = new JsGridReportBase(request, response);
     report.exportToExcel(title, SpringSecurityUtils.getCurrentUserName(), td);*/
     jsGridReportBaseXLSXService.jsGridReportBaseXLSXService(request, response);
     jsGridReportBaseXLSXService.exportToExcel(
         title, SpringSecurityUtils.getCurrentUserName(), td);
   }
 }
コード例 #5
0
 /**
  * 保存展业计划
  *
  * @param space
  * @return
  */
 @RequestMapping("saveExecuteSpace")
 public @ResponseBody Message saveExecuteSpace(Space space) {
   return spaceService.saveExecuteSpace(space);
 }