Esempio n. 1
0
 /**
  * 导出单个震相数据的观测报告
  *
  * @return
  */
 public String exportSingleBulletin() {
   logger.debug("导出单个震相数据时地震目录ID:{}", model.getQcId());
   model.setExpType(SeismicConstants.Bulletin_full);
   String data = "";
   logger.debug("地震目录表名:{}", model.getTableName());
   if (StringUtils.isNotBlank(model.getTableName())) {
     // 测震SCHEMA
     model.setSchema(dataSourceManager.getSeismicSchema());
     data = exportCatDao.queryForSingleBulletin(model);
   }
   // logger.debug("观测报告导出的数据:{}", data);
   String fileName = "attachment;filename=\"SINGLE_Bulletin_VLM_" + model.getQcId() + ".txt\"";
   getResponse().addHeader("Content-Disposition", fileName);
   render(getResponse(), data, "text/html");
   return null;
 }
Esempio n. 2
0
 /**
  * 根据数据格式(BASIC_VLM,FULL_VLM,Bulletin_VLM),导出相应数据
  *
  * @return
  */
 private String exportVlmData() {
   if (StringUtils.isNotBlank(model.getTableName())) {
     // 测震SCHEMA
     model.setSchema(dataSourceManager.getSeismicSchema());
     if (model.getStartDate() != null) {
       Date startDate = DateUtil.firstSecondOfDate(model.getStartDate());
       model.setStartDate(startDate);
     }
     if (model.getEndDate() != null) {
       Date endDate = DateUtil.lastSecondOfDate(model.getEndDate());
       model.setEndDate(endDate);
     }
     StringBuffer buf = exportCatDao.queryForVlm(model);
     return buf.toString();
   } else {
     return "无数据或检查配置本省台网代码!";
   }
 }