|
@@ -1530,6 +1530,8 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
/*页码计算*/
|
|
/*页码计算*/
|
|
public void pageNumber(Class<T> clazz){
|
|
public void pageNumber(Class<T> clazz){
|
|
FormData pageFd = fdm.get(FormulaUtils.getPageCode(clazz));
|
|
FormData pageFd = fdm.get(FormulaUtils.getPageCode(clazz));
|
|
|
|
+ FormData pageTotal = fdm.get(FormulaUtils.getPageTotal(clazz));
|
|
|
|
+ FormData pageIndex = fdm.get(FormulaUtils.getPageIndex(clazz));
|
|
if(pageFd!=null) {
|
|
if(pageFd!=null) {
|
|
int total = totalPage();
|
|
int total = totalPage();
|
|
JSONField jf =FormulaUtils.getPageFormat(clazz);
|
|
JSONField jf =FormulaUtils.getPageFormat(clazz);
|
|
@@ -1539,6 +1541,12 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
}else{
|
|
}else{
|
|
pageTmp = "第$1页 共" + total + "页";
|
|
pageTmp = "第$1页 共" + total + "页";
|
|
}
|
|
}
|
|
|
|
+ if(pageTotal!=null){
|
|
|
|
+ pageTotal.setValues(IntStream.rangeClosed(1, total).boxed().map(i -> new ElementData(total)).collect(Collectors.toList()));
|
|
|
|
+ }
|
|
|
|
+ if(pageIndex!=null){
|
|
|
|
+ pageIndex.setValues(IntStream.rangeClosed(1, total).boxed().map(ElementData::new).collect(Collectors.toList()));
|
|
|
|
+ }
|
|
pageFd.setValues(IntStream.rangeClosed(1, total).boxed().map(i -> new ElementData(pageTmp.replace("$1", i.toString()))).collect(Collectors.toList()));
|
|
pageFd.setValues(IntStream.rangeClosed(1, total).boxed().map(i -> new ElementData(pageTmp.replace("$1", i.toString()))).collect(Collectors.toList()));
|
|
}
|
|
}
|
|
}
|
|
}
|