main
黄海 1 year ago
parent c170e49999
commit 806a484a30

@ -445,9 +445,9 @@ public class ZbdcModel {
List<Record> listCross = Db.find(sql);
for (Record cross : listCross) {
String key = cross.getStr("bureau_id") + "_" + cross.getStr("templet_id");
String key = cross.getStr("org_id") + "_" + cross.getStr("templet_id");
if (map.containsKey(key)) {
cross.set("xysl", map.get(key));
cross.set("xysl", map.get(key).getInt("xysl"));
} else {
cross.set("xysl", 0);
}
@ -479,7 +479,7 @@ public class ZbdcModel {
if (type_id == 1) {
for (Iterator<Record> it = listCross.iterator(); it.hasNext(); ) {
Record record = it.next();
if (record.getInt("xysl") <= 0) {
if (record.getInt("xysl") == 0) {
it.remove(); // 从迭代器中删除不符合条件的记录
}
}
@ -495,8 +495,8 @@ public class ZbdcModel {
int fromIndex = (page - 1) * limit; // 页码乘以每页大小得到起始索引
int toIndex = fromIndex + limit; // 起始索引加每页大小得到结束索引
// 确保结束索引不会超出列表的最大索引
if (toIndex > list.size()) {
toIndex = list.size();
if (toIndex + 1 > listCross.size()) {
toIndex = listCross.size();
}
// 使用 subList 获取页面数据
Page<Record> pList = new Page<>(listCross.subList(fromIndex, toIndex), page, limit, listCross.size(), listCross.size());

Loading…
Cancel
Save