liusheng
2026-09-28 93078044580c2781cb8cf3ac18d2ab90513267de
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedInhospController.java
@@ -1,6 +1,7 @@
package com.ruoyi.web.controller.smartor;
import com.github.pagehelper.ISelect;
import com.github.pagehelper.PageInfo;
import com.ruoyi.common.annotation.AddOrgId;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
@@ -70,12 +71,9 @@
        SysUser user = getLoginUser().getUser();
        patMedInhosp.setOrgid(user.getOrgid());
        List<PatMedInhosp> list = patMedInhospService.selectPatMedInhospList(patMedInhosp);
        long count = PageUtils.count(new ISelect() {
            @Override
            public void doSelect() {
                patMedInhospService.selectPatMedInhospList(patMedInhosp);
            }
        });
        // startPage 之后 PageHelper 已经自动执行过一次 count 查询,直接复用 Page 里的 total,
        // 避免用 PageUtils.count 把带 JOIN 的统计语句再跑一遍
        long count = new PageInfo<>(list).getTotal();
        return getDataTable2(count, list);
    }