Index: ssts-web/src/main/webapp/homepage/supplyRoomOperate.js =================================================================== diff -u -r12331 -r13664 --- ssts-web/src/main/webapp/homepage/supplyRoomOperate.js (.../supplyRoomOperate.js) (revision 12331) +++ ssts-web/src/main/webapp/homepage/supplyRoomOperate.js (.../supplyRoomOperate.js) (revision 13664) @@ -515,7 +515,7 @@ invoicePlanStore.on("load",function(thiz,records,options){ var o = Ext.decode(invoicePlanStore.reader.responseText); var invoiceTotalAmount = o.invoiceTotalAmount; - var newTitle = "发货信息"+"(灭菌总数:" + invoiceTotalAmount + ")"; + var newTitle = "发货信息"+"(发货总数:" + invoiceTotalAmount + ")"; Ext.getCmp('invoicePlanGrid').setTitle(newTitle); }); Index: ssts-operationmonitor/src/main/java/com/forgon/disinfectsystem/supplyroomcontrol/service/SupplyRoomControlManagerImpl.java =================================================================== diff -u -r12590 -r13664 --- ssts-operationmonitor/src/main/java/com/forgon/disinfectsystem/supplyroomcontrol/service/SupplyRoomControlManagerImpl.java (.../SupplyRoomControlManagerImpl.java) (revision 12590) +++ ssts-operationmonitor/src/main/java/com/forgon/disinfectsystem/supplyroomcontrol/service/SupplyRoomControlManagerImpl.java (.../SupplyRoomControlManagerImpl.java) (revision 13664) @@ -240,7 +240,8 @@ SupplyRoomConfig config = supplyRoomConfigManager.getFirstSupplyRoomConfig(); String orgUnitCoding = config.getOrgUnitCoding(); - String countSql = "select count(*),count(*),count(*) "; + String countSql = "select count(*),count(*),count(*) from (select po.tousseName "; + String totalCountSql = "select count(*),count(*),count(*) "; String sql = "select po.tousseName as \"tousseName\",po.reviewer as \"operator\"," +"po.reviewTime as \"applicationTime\",po.sterilizationBasket as \"basketName\"," +"count(*) as \"amount\" "; @@ -255,16 +256,19 @@ + dateQueryAdapter.dateAdapter(endDate); whereSql = setDisinfectionGoodsQuerySql(tousseName, tousseType, whereSql); - countSql += whereSql; + totalCountSql += whereSql; whereSql += " group by po.tousseName,po.reviewer,po.reviewTime,po.sterilizationBasket"; + countSql += whereSql + ")alias"; sql += whereSql; Integer [] amountArray = countBySql(countSql); int totalCount = amountArray[0]; - int totalReviewAmount = totalCount; + Integer [] totalAmountArray = countBySql(totalCountSql); + int totalReviewAmount = totalAmountArray[0]; + List list = objectDao.findBySql(TousseOperate.class, sql, Integer.parseInt(currentPage), Integer.parseInt(pageSize)); Map reviewMap = new HashMap(); reviewMap.put("totalCount", totalCount); @@ -279,7 +283,8 @@ SupplyRoomConfig config = supplyRoomConfigManager.getFirstSupplyRoomConfig(); String orgUnitCoding = config.getOrgUnitCoding(); - String countSql = "select count(*),count(*),count(*) "; + String countSql = "select count(*),count(*),count(*) from (select ti.tousseName "; + String totalCountSql = "select count(*),count(*),count(*) "; String sql = "select ti.tousseName as \"tousseName\",sr.id as \"id\",sr.sterilizationUser as \"operator\",s.name as \"disinfectIdentification\"," + "sr.frequency as \"frequency\",sr.sterilizationType as \"disinfectProgram\",sr.startDate as \"startDate\"," + "sr.endDate as \"endDate\",c.containerName as \"basketName\",count(*) as \"amount\" "; @@ -301,15 +306,17 @@ if (StringUtils.isNotBlank(tousseName)) { whereSql += " and ti.tousseName = '" + tousseName + "'"; } - countSql += whereSql; + totalCountSql += whereSql; whereSql += " group by ti.tousseName,sr.id,sr.sterilizationUser,s.name,sr.frequency,sr.sterilizationType,sr.startDate,sr.endDate,c.containerName"; + countSql += whereSql + ")alias"; sql += whereSql; Integer [] amountArray = countBySql(countSql); int totalCount = amountArray[0]; - int sterilizationTotalAmount = totalCount; + Integer [] totalAmountArray = countBySql(totalCountSql); + int sterilizationTotalAmount = totalAmountArray[1]; List list = objectDao.findBySql(TousseOperate.class, sql, Integer.parseInt(currentPage), Integer.parseInt(pageSize)); Map sterilizationMap = new HashMap(); @@ -403,10 +410,10 @@ String endDateStr = dateQueryAdapter.dateAdapter(endDate); String countSql = "select count(*),sum(po.amount),sum(po.amount) "; - String sql = "select po.tousseName as \"tousseName\",i.depart as \"depart\"," + - "i.id as \"id\",i.applicant as \"applicant\",i.sender as \"sender\"," + - "i.serialNumber as \"serialNumber\",i.sendTime as \"senderTime\"," + - "i.applicationTime as \"applicationTime\",po.amount as \"amount\" "; + String sql = "select po.tousseName,i.depart," + + "i.id ,i.applicant,i.sender," + + "i.serialNumber,i.sendTime senderTime," + + "i.applicationTime,po.amount "; String whereSql = "from Invoice i,InvoicePlan ip,InvoiceItem po" + " where i.id = po.invoice_id and ip.id = i.invoicePlan_ID"