Commit 6266fb1f by zhangyu

build

parent 044665ec
package com.ejweb.modules.contact.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.ejweb.core.service.CrudService;
import com.ejweb.core.utils.SpringContextHolder;
import com.ejweb.modules.contact.dao.AirportDao;
import com.ejweb.modules.contact.entity.AirportEntity;
import net.sourceforge.pinyin4j.PinyinHelper;
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType;
import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* 三字码 Airport Service
......@@ -108,5 +106,5 @@ public class AirportService extends CrudService<AirportDao, AirportEntity> {
public List<AirportEntity> getAllAirportsData(AirportEntity entity){
return dao.findAllAirport(entity);
}
}
package com.ejweb.modules.contact.web;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.ConstraintViolationException;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import com.ejweb.core.base.BaseController;
import com.ejweb.core.persistence.Page;
import com.ejweb.core.utils.DateUtils;
......@@ -33,6 +12,21 @@ import com.ejweb.modules.contact.entity.AirportEntity;
import com.ejweb.modules.contact.service.AirportService;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.ConstraintViolationException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 通讯录模块下的三字码 Airport Controller
......@@ -238,8 +232,10 @@ public class AirportController extends BaseController {
RedirectAttributes redirectAttributes) {
try {
String fileName = "三字码数据" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
Page<AirportEntity> page = airportService.findPage(new Page<AirportEntity>(request, response, -1),
airportEntity);
// Page<AirportEntity> page = airportService.findPage(new Page<AirportEntity>(request, response, -1),
// airportEntity);
Page<AirportEntity> page = airportService.findPage(new Page<AirportEntity>(1,1000000000),
airportEntity);
new ExportExcel("三字码数据", AirportEntity.class).setDataList(page.getList()).write(response, fileName)
.dispose();
return null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment