Index: ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManager.java =================================================================== diff -u -r32229 -r32634 --- ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManager.java (.../RecyclingRecordManager.java) (revision 32229) +++ ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManager.java (.../RecyclingRecordManager.java) (revision 32634) @@ -65,6 +65,7 @@ * @param start 查询的开始记录数 * @param end 查询的结束记录数 * @param filterJson 过滤条件,包括回收的科室编码、处理状态(未确认、已确认),申请单类型,回收的开始时间、结束时间等信息 + * @param pageSize 每页条数 * 示例格式如下: * { @@ -91,7 +92,7 @@ * * @return */ - public JSONObject getRecyclingRecordListByJson(long start, long end,String filterJson); + public JSONObject getRecyclingRecordListByJson(long start, long end,String filterJson, Integer pageSize); public List findApplicationItemVOs( String recyclingRecordId); Index: ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java =================================================================== diff -u -r32607 -r32634 --- ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java (.../RecyclingRecordAction.java) (revision 32607) +++ ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java (.../RecyclingRecordAction.java) (revision 32634) @@ -1112,16 +1112,17 @@ public String getRecyclingRecordList() { Long page = Long.valueOf(StrutsParamUtils.getPraramValue("page", "1")); String filter = StrutsParamUtils.getPraramValue("filter", ""); + Integer pageSize = StrutsParamUtils.getPraramValue("pageSize", 20); try { filter = java.net.URLDecoder.decode(filter,"UTF-8"); } catch (UnsupportedEncodingException e1) { e1.printStackTrace(); } - long start = (page - 1) * 20 + 1; - long end = page * 20; + long start = (page - 1) * pageSize + 1; + long end = page * pageSize; StrutsResponseUtils.output(recyclingRecordManager.getRecyclingRecordListByJson(start, - end,filter)); + end,filter,pageSize)); return null; } Index: ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java =================================================================== diff -u -r32607 -r32634 --- ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java (.../RecyclingRecordManagerImpl.java) (revision 32607) +++ ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java (.../RecyclingRecordManagerImpl.java) (revision 32634) @@ -5454,7 +5454,7 @@ @Override public JSONObject getRecyclingRecordListByJson(long start, long end, - String filterJson) { + String filterJson, Integer pageSize) { boolean enableUrgentFunction = CssdUtils.getSystemSetConfigByNameBool("enableUrgentFunction", false); boolean enableRecyclingRecordBGColorWhenRecycleAmountLessThanApplyAmount = CssdUtils.getSystemSetConfigByNameBool("enableRecyclingRecordBGColorWhenRecycleAmountLessThanApplyAmount", false); String extraQuery = ""; @@ -5471,7 +5471,7 @@ extraQuery += sbf.toString(); } boolean showORRoomColumnInHistoryRecyclingRecordList = CssdUtils.getSystemSetConfigByNameBool("showORRoomColumnInHistoryRecyclingRecordList", false); - RecyclingRecordListSqlGenerator sqlGenerator = new RecyclingRecordListSqlGenerator(enableUrgentFunction, dbConnection,start,end,filterJson,extraQuery,enableRecyclingRecordBGColorWhenRecycleAmountLessThanApplyAmount,objectDao); + RecyclingRecordListSqlGenerator sqlGenerator = new RecyclingRecordListSqlGenerator(enableUrgentFunction, dbConnection,start,end,filterJson,extraQuery,enableRecyclingRecordBGColorWhenRecycleAmountLessThanApplyAmount,objectDao,pageSize); String sql = sqlGenerator.getListSql(); List recordVos = new ArrayList(); ResultSet rs = objectDao.executeSql(sql); @@ -5525,7 +5525,7 @@ int totalCount = objectDao.countBySql(sqlGenerator.getCountSql()); Map map = new HashMap(); - map.put("totalPage", totalCount / 20 + (totalCount % 20 == 0 ? 0 : 1)); + map.put("totalPage", totalCount / pageSize + (totalCount % pageSize == 0 ? 0 : 1)); map.put("pageConfigMessage", "显示" + start + "-" + (end > totalCount?totalCount:end) + ",共" + totalCount + "条"); map.put("data", recordVos); Index: ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordListSqlGenerator.java =================================================================== diff -u -r32607 -r32634 --- ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordListSqlGenerator.java (.../RecyclingRecordListSqlGenerator.java) (revision 32607) +++ ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordListSqlGenerator.java (.../RecyclingRecordListSqlGenerator.java) (revision 32634) @@ -43,7 +43,9 @@ private boolean enableUrgentFunction = false; private boolean enableHaveUnRecycling = false; private ObjectDao objectDao; - public RecyclingRecordListSqlGenerator(boolean enableUrgentFunction, InitDbConnection dbConnection,long start,long end,String filterJsonStr, String extraQuery, boolean enableHaveUnRecycling,ObjectDao objectDao) { + private Integer pageSize; + public RecyclingRecordListSqlGenerator(boolean enableUrgentFunction, InitDbConnection dbConnection,long start,long end,String filterJsonStr, String extraQuery, boolean enableHaveUnRecycling,ObjectDao objectDao, Integer pageSize) { + this.pageSize = pageSize; this.objectDao = objectDao; this.dbConnection = dbConnection; this.dateQueryAdapter = new DateQueryAdapter(); @@ -213,7 +215,7 @@ + "' and " + filterSql + " order by "+recyclingAmountNeedConfirmOrder+" r.recyclingTime desc)"; - sql = "SELECT TOP 20 * FROM " + tempSql + " WHERE id not in " + sql = "SELECT TOP "+ this.pageSize +" * FROM " + tempSql + " WHERE id not in " + tempSql2 + " order by A.recyclingTime desc "; } else if (dbConnection.isOracle()) {