Browse Source

用between返回的数据量有问题

lighter 2 years ago
parent
commit
565fb2f68a

+ 10 - 10
src/main/java/thyyxxk/webserver/dao/his/api/forpowersi/drgdip/DrgDipDao.java

@@ -15,8 +15,8 @@ public interface DrgDipDao {
             "(SELECT ROW_NUMBER() OVER(ORDER BY code) AS idx,del_flag as flag, " +
             "rtrim(code) as deptCode,rtrim(name) as deptName,rtrim(code) as sortNo, " +
             "isClinicDept=case when inpatient_flag=1 then 'Y' else 'N' end " +
-            "from zd_unit_code with(nolock)) t where t.idx between " +
-            "#{page}*#{size} and (#{page}+1)*#{size}")
+            "from zd_unit_code with(nolock)) t where t.idx>#{page}*#{size} " +
+            "and t.idx<=(#{page}+1)*#{size}")
     List<HisBaseDeptInfo> selectHisBaseDeptInfo(int page, int size);
 
     @Select("select * from " +
@@ -27,24 +27,24 @@ public interface DrgDipDao {
             "rtrim(yb_code) as standardCode, " +
             "rtrim(dept_code) as empDeptId, " +
             "empDept=(select rtrim(z.name) from zd_unit_code z where z.code=dept_code) " +
-            "from a_employee_mi with(nolock)) t  where t.idx between " +
-            "#{page}*#{size} and (#{page}+1)*#{size}")
+            "from a_employee_mi with(nolock)) t where t.idx>#{page}*#{size} " +
+            "and t.idx<=(#{page}+1)*#{size}")
     List<HisBaseEmpInfo> selectHisBaseEmpInfo(int page, int size);
 
     @Select("select * from " +
             "(SELECT ROW_NUMBER() OVER(ORDER BY code) AS idx, " +
             "rtrim(code) as drugListId, " +
             "rtrim(national_code) as hospListId " +
-            "from yp_zd_dict with(nolock)) t where t.idx between " +
-            "#{page}*#{size} and (#{page}+1)*#{size}")
+            "from yp_zd_dict with(nolock)) t where t.idx>#{page}*#{size} " +
+            "and t.idx<=(#{page}+1)*#{size}")
     List<MiInsurHospDrugsRel> selectMiInsurHospDrugsRel(int page, int size);
 
     @Select("select * from " +
             "(SELECT ROW_NUMBER() OVER(ORDER BY code) AS idx, " +
             "rtrim(code) as itemListId, " +
             "rtrim(national_code) as hospListId " +
-            "from zd_charge_item with(nolock)) t where t.idx between " +
-            "#{page}*#{size} and (#{page}+1)*#{size}")
+            "from zd_charge_item with(nolock)) t where t.idx>#{page}*#{size} " +
+            "and t.idx<=(#{page}+1)*#{size}")
     List<MiInsurHospItemsRel> selectMiInsurHospItemsRel(int page, int size);
 
     @Select("select * from " +
@@ -59,8 +59,8 @@ public interface DrgDipDao {
             "icdCode=b.dise_code, " +
             "isSpecial=case when a.med_type='14' then 'Y' else 'N' end " +
             "from t_si_setlinfo a with(nolock), t_si_pat_info b with(nolock) " +
-            "where a.setl_type=11 and a.mdtrt_id=b.mdtrt_id) t where t.idx between " +
-            "#{page}*#{size} and (#{page}+1)*#{size}")
+            "where a.setl_type=11 and a.mdtrt_id=b.mdtrt_id) t where " +
+            "t.idx>#{page}*#{size} and t.idx<=(#{page}+1)*#{size}")
     List<HisOutpSettlData> selectHisOutpSettlData(int page, int size);
 
     @Select("select " +