Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java =================================================================== diff -u -r16988 -r16989 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java (.../JasperreportsAction.java) (revision 16988) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java (.../JasperreportsAction.java) (revision 16989) @@ -71,7 +71,6 @@ import com.forgon.disinfectsystem.jasperreports.javabeansource.EighteenQuotaBean; import com.forgon.disinfectsystem.jasperreports.javabeansource.ForeignTousseAfterUseDeliveryVO; import com.forgon.disinfectsystem.jasperreports.javabeansource.ForeignTousseSterilizationMonitorAndDeliveryVO; -import com.forgon.disinfectsystem.jasperreports.javabeansource.InvoiceAmountContrastBean; import com.forgon.disinfectsystem.jasperreports.javabeansource.MaterialDamageBean; import com.forgon.disinfectsystem.jasperreports.javabeansource.MaterialDamageItemBean; import com.forgon.disinfectsystem.jasperreports.javabeansource.MaterialDamageTotal_child; Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/TousseWorkLoadVO.java =================================================================== diff -u -r12331 -r16989 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/TousseWorkLoadVO.java (.../TousseWorkLoadVO.java) (revision 12331) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/TousseWorkLoadVO.java (.../TousseWorkLoadVO.java) (revision 16989) @@ -8,6 +8,8 @@ private Integer washAmount = 0; + private Integer washMaterialAmount = 0; + private Integer packingAmount = 0; private Integer reviewAmount = 0; @@ -71,5 +73,13 @@ public void setInvoiceAmount(Integer invoiceAmount) { this.invoiceAmount = invoiceAmount; } + + public Integer getWashMaterialAmount() { + return washMaterialAmount; + } + + public void setWashMaterialAmount(Integer washMaterialAmount) { + this.washMaterialAmount = washMaterialAmount; + } } Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/becleanitem/ClassifiedItem.java =================================================================== diff -u -r16232 -r16989 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/becleanitem/ClassifiedItem.java (.../ClassifiedItem.java) (revision 16232) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/becleanitem/ClassifiedItem.java (.../ClassifiedItem.java) (revision 16989) @@ -58,11 +58,11 @@ // 回收记录ID private Long recyclingRecordId; - private String tousseNameForMaterial; - /** * 包名称(如果包定义为拆包清洗tousseNameForMaterial记包名称;否则如果包定义为整包清洗,tousseNameForMaterial为空) */ + private String tousseNameForMaterial; + private Integer tousseAmountForMaterial; private String idCardBarcode; Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java =================================================================== diff -u -r16988 -r16989 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 16988) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 16989) @@ -9766,59 +9766,64 @@ endTime = endTime + " 23:59:59"; } String dateFormatter = "yyyy-mm-dd HH24:MI:SS"; - String sql = "select 'recyc' as type,td.name,sum(ci.amount) from recyclingRecord rr,ClassifiedItem ci,TousseDefinition td " - +" where rr.id = ci.recyclingRecordId and ci.toussedefinition_id = td.id " - +" and ci.itemType != '材料' and rr.orgUnitCoding = '"+departCoding+"'" - +" and rr.recyclingTime between "+dateQueryAdapter.dateConverAdapter2(startTime,dateFormatter) - +" and "+dateQueryAdapter.dateConverAdapter2(endTime,dateFormatter) - +" group by td.name " - +" union all " - +" select 'wash' as type, td.name,sum(ci.amount) from WashAndDisinfectRecord wdr,ClassifyBasket_WashRecord cw," + - "ClassifyBasket cb,ClassifiedItem ci,TousseDefinition td where wdr.id = cw.WashAndDisinfectRecord_ID " - +" and cw.ClassifyBasket_ID = cb.id and cb.id = ci.classifybasket_id and ci.toussedefinition_id = td.id " - +" and ci.itemType != '材料' and wdr.orgUnitCoding = '"+departCoding+"'" - +" and wdr.endDate between "+dateQueryAdapter.dateConverAdapter2(startTime,dateFormatter) - +" and "+dateQueryAdapter.dateConverAdapter2(endTime,dateFormatter) - +" group by td.name " - +" union all " - +" select 'packing' as type,pr.tousseName,sum(pr.amount) from PackingRecord pr " - +" where pr.orgUnitCoding = '"+departCoding+"' " - +" and pr.packTime between "+dateQueryAdapter.dateConverAdapter2(startTime,dateFormatter) - +" and "+dateQueryAdapter.dateConverAdapter2(endTime,dateFormatter) - +" group by pr.tousseName " - +" union all " - +" select 'review' as type,t.tousseName,count(*) from TousseInstance t " - +" where t.reviewer is not null and t.reviewTime is not null and t.orgUnitCoding = '"+departCoding+"' " - +" and t.reviewTime between "+dateQueryAdapter.dateConverAdapter2(startTime,dateFormatter) - +" and "+dateQueryAdapter.dateConverAdapter2(endTime,dateFormatter) - +" group by t.tousseName " - +" union all " - +" select 'sterilization' as type,ti.tousseName,count(*) from SterilizationRecord sr,sterilization_tousseInstance st,TousseInstance ti " + + String startDateSql = dateQueryAdapter.dateConverAdapter2(startTime,dateFormatter); + String endDateSql = dateQueryAdapter.dateConverAdapter2(endTime,dateFormatter); + + String sql = String.format("select 'recyc' as type,ti.tousseName,sum(ti.amount) from recyclingRecord rr,TousseItem ti " + +" where rr.id = ti.recyclingRecord_id and rr.orgUnitCoding = '%s' and rr.recyclingTime between %s and %s group by ti.tousseName ", + departCoding,startDateSql,endDateSql); + //清洗按器械包统计 + sql += " union all "; + sql += String.format("select 'wash' as type,tmp.tousseName,sum(tmp.tousseAmount) from (" + + "select ci.name as tousseName,sum(ci.amount) as tousseAmount from WashAndDisinfectRecord wdr,ClassifyBasket_WashRecord cw,ClassifyBasket cb,ClassifiedItem ci " + + "where wdr.id = cw.WashAndDisinfectRecord_ID and cw.ClassifyBasket_ID = cb.id and cb.id = ci.classifybasket_id and ci.itemType != '材料' " + + "and wdr.orgUnitCoding = '%s' and wdr.endDate between %s and %s group by ci.name " + + " union all " + + "select min(ci.tousseNameForMaterial) as tousseName,min(ci.tousseAmountForMaterial) as tousseAmount from WashAndDisinfectRecord wdr,ClassifyBasket_WashRecord cw,ClassifyBasket cb,ClassifiedItem ci " + + "where wdr.id = cw.WashAndDisinfectRecord_ID and cw.ClassifyBasket_ID = cb.id and cb.id = ci.classifybasket_id and ci.itemType = '材料' " + + "and wdr.orgUnitCoding = '%s' and wdr.endDate between %s and %s group by ci.tousseDefinitionID,ci.recyclingRecordId) tmp " + + "group by tmp.tousseName",departCoding,startDateSql,endDateSql,departCoding,startDateSql,endDateSql); + //清洗按材料统计 + sql += " union all "; + sql += String.format("select 'wash-material' as type,tmp.tousseName,sum(tmp.tousseAmount) from (" + + "select min(td.name) as tousseName,sum(ci.amount * ms.count) as tousseAmount from WashAndDisinfectRecord wdr,ClassifyBasket_WashRecord cw,ClassifyBasket cb,ClassifiedItem ci,tousseDefinition td,materialInstance ms " + + "where wdr.id = cw.WashAndDisinfectRecord_ID and cw.ClassifyBasket_ID = cb.id and cb.id = ci.classifybasket_id and ci.toussedefinition_id = td.id and td.id = ms.tousse_id " + + "and wdr.orgUnitCoding = '%s' and wdr.endDate between %s and %s group by ci.toussedefinition_id " + + " union all " + + "select min(ci.tousseNameForMaterial) as tousseName,sum(ci.amount) as tousseAmount from WashAndDisinfectRecord wdr,ClassifyBasket_WashRecord cw,ClassifyBasket cb,ClassifiedItem ci " + + "where wdr.id = cw.WashAndDisinfectRecord_ID and cw.ClassifyBasket_ID = cb.id and cb.id = ci.classifybasket_id and ci.itemType = '材料' " + + "and wdr.orgUnitCoding = '%s' and wdr.endDate between %s and %s group by ci.tousseDefinitionID) tmp " + + "group by tmp.tousseName",departCoding,startDateSql,endDateSql,departCoding,startDateSql,endDateSql); + + sql += " union all "; + sql += String.format("select 'packing' as type,pr.tousseName,sum(pr.amount) from PackingRecord pr " + +" where pr.orgUnitCoding = '%s' and pr.packTime between %s and %s group by pr.tousseName ", + departCoding,startDateSql,endDateSql); + + sql += " union all "; + sql += String.format("select 'review' as type,t.tousseName,count(*) from TousseInstance t " + +" where t.orgUnitCoding = '%s' and t.reviewTime between %s and %s group by t.tousseName ",departCoding,startDateSql,endDateSql); + + sql += " union all "; + sql += String.format("select 'sterilization' as type,ti.tousseName,count(*) from SterilizationRecord sr,sterilization_tousseInstance st,TousseInstance ti " +" where sr.id = st.sterilizationRecord_id and st.tousseInstance_id = ti.id " - +" and sr.orgUnitCoding = '"+departCoding+"'" - +" and sr.endDate between "+dateQueryAdapter.dateConverAdapter2(startTime,dateFormatter) - +" and "+dateQueryAdapter.dateConverAdapter2(endTime,dateFormatter) - +" group by ti.tousseName " - +" union all " - +" select 'sterilization' as type,ti.tousseName,count(*) from SterilizationRecord sr,sterilization_reviewed sre,ReviewedBasket rb,TousseInstance ti " + +" and sr.orgUnitCoding = '%s' and sr.endDate between %s and %s group by ti.tousseName ", departCoding,startDateSql,endDateSql); + + sql += " union all "; + sql += String.format("select 'sterilization' as type,ti.tousseName,count(*) from SterilizationRecord sr,sterilization_reviewed sre,ReviewedBasket rb,TousseInstance ti " +" where sr.id = sre.sterilizationRecord_id and sre.reviewedBasket_id = rb.id " - +" and rb.id = ti.reviewBasket_ID and sr.orgUnitCoding = '"+departCoding+"' " - +" and sr.orgUnitCoding = '"+departCoding+"' " - +" and sr.endDate between "+dateQueryAdapter.dateConverAdapter2(startTime,dateFormatter) - +" and "+dateQueryAdapter.dateConverAdapter2(endTime,dateFormatter) - +" group by ti.tousseName " - +" union all " - +" select 'invoice' as type,ti.tousseName,count(*) from invoice i,TousseInstance ti,TousseDefinition td " - +" where i.id = ti.invoice_id and i.orgUnitCoding = '"+departCoding+"' " - +" and ti.tousseDefinition_id = td.id and td.tousseType != '消毒物品'" - +" and i.sendTime between "+dateQueryAdapter.dateConverAdapter2(startTime,dateFormatter) - +" and "+dateQueryAdapter.dateConverAdapter2(endTime,dateFormatter) - +" group by ti.tousseName"; + +" and rb.id = ti.reviewBasket_ID and sr.orgUnitCoding = '%s' " + +" and sr.endDate between %s and %s group by ti.tousseName ", departCoding,startDateSql,endDateSql); + + sql += " union all "; + sql += String.format("select 'invoice' as type,ti.tousseName,count(*) from invoice i,TousseInstance ti,TousseDefinition td " + +" where i.id = ti.invoice_id and ti.tousseDefinition_id = td.id and i.orgUnitCoding = '%s' and td.tousseType != '消毒物品'" + +" and i.sendTime between %s and %s group by ti.tousseName", departCoding,startDateSql,endDateSql); - GoodsOption option = goodsOptionManager.getGoodsOption( - GoodsOption.MODEL_TOUSSEWORKLOAD, departCoding); + GoodsOption option = goodsOptionManager.getGoodsOption(GoodsOption.MODEL_TOUSSEWORKLOAD, departCoding); List voList = new ArrayList(); if(option != null && StringUtils.isNotBlank(option.getValue())){ String[] goodsNameArray = option.getValue().split(";"); @@ -9868,6 +9873,7 @@ tmp.setReviewAmount(tmp.getReviewAmount() + vo.getReviewAmount()); tmp.setSterilizationAmount(tmp.getSterilizationAmount() + vo.getSterilizationAmount()); tmp.setWashAmount(tmp.getWashAmount() + vo.getWashAmount()); + tmp.setWashMaterialAmount(tmp.getWashMaterialAmount() + vo.getWashMaterialAmount()); } } } catch (SQLException e) { @@ -9887,6 +9893,8 @@ vo.setRecycleAmount(amount); }else if("wash".equals(type)){ vo.setWashAmount(amount); + }else if("wash-material".equals(type)){ + vo.setWashMaterialAmount(amount); }else if("packing".equals(type)){ vo.setPackingAmount(amount); }else if("review".equals(type)){ Index: ssts-web/src/main/webapp/jasperRtp/tousseWorkLoad.jasper =================================================================== diff -u -r14197 -r16989 Binary files differ Index: ssts-web/src/main/webapp/jasperRtp/tousseWorkLoad.jrxml =================================================================== diff -u -r14197 -r16989 --- ssts-web/src/main/webapp/jasperRtp/tousseWorkLoad.jrxml (.../tousseWorkLoad.jrxml) (revision 14197) +++ ssts-web/src/main/webapp/jasperRtp/tousseWorkLoad.jrxml (.../tousseWorkLoad.jrxml) (revision 16989) @@ -38,6 +38,9 @@ + + + @@ -56,10 +59,13 @@ + + + <band height="35" splitType="Stretch"> <textField> - <reportElement uuid="3ef5ef90-ca6c-42eb-855c-ff2336f47b62" x="0" y="0" width="630" height="35"/> + <reportElement uuid="3ef5ef90-ca6c-42eb-855c-ff2336f47b62" x="0" y="0" width="661" height="35"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="14" isBold="true"/> </textElement> @@ -68,56 +74,70 @@ </band> - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + @@ -137,40 +157,47 @@ - + - + - + - + - + + + + + + + + @@ -183,35 +210,35 @@ - + - + - + - + - + @@ -224,6 +251,13 @@ + + + + + + +