Index: ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java =================================================================== diff -u -r38182 -r38219 --- ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java (.../RecyclingRecordManagerImpl.java) (revision 38182) +++ ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java (.../RecyclingRecordManagerImpl.java) (revision 38219) @@ -6361,91 +6361,94 @@ } boolean showORRoomColumnInHistoryRecyclingRecordList = CssdUtils.getSystemSetConfigByNameBool("showORRoomColumnInHistoryRecyclingRecordList", false); RecyclingRecordListSqlGenerator sqlGenerator = new RecyclingRecordListSqlGenerator(enableUrgentFunction, dbConnection,start,end,filterJson,extraQuery,groupByInvoicePlanId,objectDao,pageSize,extraQuerys); - String sql = sqlGenerator.getListSql(); - List recordVos = new ArrayList(); - ResultSet rs = null; + int totalCount = objectDao.countBySql(sqlGenerator.getCountSql()); Set recordIds = new HashSet(); - try { - rs = objectDao.executeSql(sql); - SerialNum serialNum = serialNumManager.getSerialNumber(SerialNum.TYPE_PACKING_TASK); - while (rs.next()) { - RecyclingRecordVo record = new RecyclingRecordVo(); - String serialNumStr = serialNumManager.variablePart(serialNum, rs.getString("packingTaskSerialNumber")); - record.setPackingTaskSerialNumber(StringTools.getDefaultString(serialNumStr)); - record.setId(rs.getLong("id")); - if(CollectionUtils.isNotEmpty(extraQuerys)){ - if(extraQuerys.contains("物品清单")){ - recordIds.add(record.getId()); + List recordVos = new ArrayList(); + if(totalCount > 0){ + ResultSet rs = null; + try { + String sql = sqlGenerator.getListSql(); + rs = objectDao.executeSql(sql); + SerialNum serialNum = serialNumManager.getSerialNumber(SerialNum.TYPE_PACKING_TASK); + while (rs.next()) { + RecyclingRecordVo record = new RecyclingRecordVo(); + String serialNumStr = serialNumManager.variablePart(serialNum, rs.getString("packingTaskSerialNumber")); + record.setPackingTaskSerialNumber(StringTools.getDefaultString(serialNumStr)); + record.setId(rs.getLong("id")); + if(CollectionUtils.isNotEmpty(extraQuerys)){ + if(extraQuerys.contains("物品清单")){ + recordIds.add(record.getId()); + } + if(extraQuerys.contains("包数")){ + record.setSumAmount(rs.getInt("sumAmount")); + } + if(extraQuerys.contains("手术间")){ + record.setOperationRoom(rs.getString("operationRoom")); + } + if(extraQuerys.contains("患者")){ + record.setPatient(rs.getString("patient")); + } + if(extraQuerys.contains("住院号")){ + record.setHospitalNumber(rs.getString("hospitalNumber")); + } + if(extraQuerys.contains("申请单号")){ + record.setSerialNumber(rs.getString("serialNumber")); + } + if(extraQuerys.contains("申请人")){ + record.setApplicant(rs.getString("applicant")); + } } - if(extraQuerys.contains("包数")){ - record.setSumAmount(rs.getInt("sumAmount")); - } - if(extraQuerys.contains("手术间")){ - record.setOperationRoom(rs.getString("operationRoom")); - } - if(extraQuerys.contains("患者")){ - record.setPatient(rs.getString("patient")); - } - if(extraQuerys.contains("住院号")){ - record.setHospitalNumber(rs.getString("hospitalNumber")); - } - if(extraQuerys.contains("申请单号")){ - record.setSerialNumber(rs.getString("serialNumber")); - } - if(extraQuerys.contains("申请人")){ - record.setApplicant(rs.getString("applicant")); - } - } - record.setDepart(rs.getString("depart")); - record.setStatus(rs.getString("status")); - record.setRecyclingTime(rs.getTimestamp("recyclingTime")); - record.setOperator(rs.getString("operator")); - record.setRecyclingApplicationType(rs.getString("recyclingApplicationType")); - record.setRemark(StringTools.getDefaultString(rs.getString("remark"))); - record.setRecycleAmountNeedConfirm(rs.getString("recycleAmountNeedConfirm")); - Integer recyclingTimes = ConvertNumber.getNumberIntValue(rs.getObject("recyclingTimes"),0); - record.setRecyclingTimes(recyclingTimes); - if(InvoicePlan.TYPE_FOREIGNTOUSSEAPPLIACTION.equals(rs.getString("type")) && recyclingTimes.intValue() != 2){ - record.setApplySubmintDateTime(rs.getTimestamp("applicationTime")); - }else{ - record.setApplySubmintDateTime(rs.getTimestamp("submitTime")); - } - if(enableUrgentFunction){ - int includingUrgent = rs.getInt("includingUrgent"); - if(includingUrgent == 1){ - record.setIncludingUrgent(true); + record.setDepart(rs.getString("depart")); + record.setStatus(rs.getString("status")); + record.setRecyclingTime(rs.getTimestamp("recyclingTime")); + record.setOperator(rs.getString("operator")); + record.setRecyclingApplicationType(rs.getString("recyclingApplicationType")); + record.setRemark(StringTools.getDefaultString(rs.getString("remark"))); + record.setRecycleAmountNeedConfirm(rs.getString("recycleAmountNeedConfirm")); + Integer recyclingTimes = ConvertNumber.getNumberIntValue(rs.getObject("recyclingTimes"),0); + record.setRecyclingTimes(recyclingTimes); + if(InvoicePlan.TYPE_FOREIGNTOUSSEAPPLIACTION.equals(rs.getString("type")) && recyclingTimes.intValue() != 2){ + record.setApplySubmintDateTime(rs.getTimestamp("applicationTime")); }else{ - record.setIncludingUrgent(false); + record.setApplySubmintDateTime(rs.getTimestamp("submitTime")); } - } - if(showORRoomColumnInHistoryRecyclingRecordList){ - record.setOperationRoom(rs.getString("operationRoom")); - } - if(enableRecyclingRecordBGColorWhenRecycleAmountLessThanApplyAmount || - confirmRecyclingAmount && StringUtils.isNotBlank(backgroundColorOfRecyclingRecordWhichRecyclingAmountNotEqualToAppplyAmount)){ - int haveUnRecycling = rs.getInt("haveUnRecycling"); - if(haveUnRecycling > 0){ - record.setHaveUnRecycling(true); + if(enableUrgentFunction){ + int includingUrgent = rs.getInt("includingUrgent"); + if(includingUrgent == 1){ + record.setIncludingUrgent(true); + }else{ + record.setIncludingUrgent(false); + } } - if(confirmRecyclingAmount && StringUtils.isNotBlank(backgroundColorOfRecyclingRecordWhichRecyclingAmountNotEqualToAppplyAmount)){ - int greaterThan = rs.getInt("greaterThan"); - if(greaterThan > 0){ - record.setGreaterThan(true); + if(showORRoomColumnInHistoryRecyclingRecordList){ + record.setOperationRoom(rs.getString("operationRoom")); + } + if(enableRecyclingRecordBGColorWhenRecycleAmountLessThanApplyAmount || + confirmRecyclingAmount && StringUtils.isNotBlank(backgroundColorOfRecyclingRecordWhichRecyclingAmountNotEqualToAppplyAmount)){ + int haveUnRecycling = rs.getInt("haveUnRecycling"); + if(haveUnRecycling > 0){ + record.setHaveUnRecycling(true); } + if(confirmRecyclingAmount && StringUtils.isNotBlank(backgroundColorOfRecyclingRecordWhichRecyclingAmountNotEqualToAppplyAmount)){ + int greaterThan = rs.getInt("greaterThan"); + if(greaterThan > 0){ + record.setGreaterThan(true); + } + } } + record.setRecyclingStatus(rs.getString("recyclingStatus")); + record.setSpecialInfection(rs.getString("specialInfection")); + // 设置申请单状态 + recordVos.add(record); } - record.setRecyclingStatus(rs.getString("recyclingStatus")); - record.setSpecialInfection(rs.getString("specialInfection")); - // 设置申请单状态 - recordVos.add(record); + } catch (SQLException e) { + e.printStackTrace(); + }finally { + DatabaseUtil.closeResultSetAndStatement(rs); } - } catch (SQLException e) { - e.printStackTrace(); - }finally { - DatabaseUtil.closeResultSetAndStatement(rs); } setRecyclingItemNameAndBarcode(recordIds, recordVos); - int totalCount = objectDao.countBySql(sqlGenerator.getCountSql()); + Map map = new HashMap(); map.put("totalPage", totalCount / pageSize + (totalCount % pageSize == 0 ? 0 : 1)); map.put("pageConfigMessage", "显示" + start + "-" + (end > totalCount?totalCount:end) + ",共"