excel匯出、mysql分頁

ZHOU_VIP發表於2018-09-03

https://blog.csdn.net/onepersontz/article/details/50034501

https://www.cnblogs.com/ahang/p/5644535.html

https://blog.csdn.net/liutong123987/article/details/79404132

//專案編號
String projectid = request.getParameter("projectid");
//裝置編號
String deveui = request.getParameter("deveui");
DevQueryPara para = new DevQueryPara();
para.setProjectid(projectid);
int batch = 500;
para.setBatch(batch);
//總條數
int count = devService.countOsmDev(deveui);

//總頁數
double tp = count / (double)batch;
int totalPage = (int) Math.ceil(tp);
//int offset = (totalPage-1) * batch;

List<OsmDev> osmDevList = null;
for (int i=1;i<=totalPage;i++ ) {
	int offset = (i-1) * batch;
	para.setOffset(offset);
	osmDevList = devService.queryAllOsmDevByPara(para);
}

 

相關文章