Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/TousseWorkLoadChildVO.java =================================================================== diff -u -r27520 -r28816 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/TousseWorkLoadChildVO.java (.../TousseWorkLoadChildVO.java) (revision 27520) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/TousseWorkLoadChildVO.java (.../TousseWorkLoadChildVO.java) (revision 28816) @@ -64,8 +64,11 @@ * 发货数量 */ private Integer invoiceAmount = 0; - /** + * 发货的材料数量 + */ + private Integer invoiceMaterialAmount = 0; + /** * 签收数量 */ private Integer signAmount = 0; @@ -173,5 +176,13 @@ public void setInventoryMaterialAmount(Integer inventoryMaterialAmount) { this.inventoryMaterialAmount = inventoryMaterialAmount; } + + public Integer getInvoiceMaterialAmount() { + return invoiceMaterialAmount; + } + + public void setInvoiceMaterialAmount(Integer invoiceMaterialAmount) { + this.invoiceMaterialAmount = invoiceMaterialAmount; + } } Index: ssts-web/src/main/webapp/jasperRtp/tousseWorkLoad.jrxml =================================================================== diff -u -r27520 -r28816 --- ssts-web/src/main/webapp/jasperRtp/tousseWorkLoad.jrxml (.../tousseWorkLoad.jrxml) (revision 27520) +++ ssts-web/src/main/webapp/jasperRtp/tousseWorkLoad.jrxml (.../tousseWorkLoad.jrxml) (revision 28816) @@ -1,5 +1,5 @@ - + @@ -59,17 +59,18 @@ + <band height="40" splitType="Stretch"> <textField> - <reportElement uuid="82fb5e35-5276-4016-b991-a27f889fc151" x="1070" y="20" width="160" height="20"/> + <reportElement uuid="82fb5e35-5276-4016-b991-a27f889fc151" x="1150" y="20" width="160" height="20"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="14" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$P{remark}]]></textFieldExpression> </textField> <textField> - <reportElement uuid="3ef5ef90-ca6c-42eb-855c-ff2336f47b62" x="0" y="0" width="1230" height="40"/> + <reportElement uuid="3ef5ef90-ca6c-42eb-855c-ff2336f47b62" x="0" y="0" width="1310" height="40"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="14" isBold="true"/> </textElement> @@ -80,7 +81,7 @@ <columnHeader> <band height="40" splitType="Stretch"> <staticText> - <reportElement uuid="20a35ece-83c5-4c59-b660-3c40e8335230" style="table_TH" x="1070" y="0" width="80" height="40"/> + <reportElement uuid="20a35ece-83c5-4c59-b660-3c40e8335230" style="table_TH" x="1070" y="0" width="160" height="20"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="14" isBold="true"/> </textElement> @@ -129,7 +130,7 @@ <text><![CDATA[申请数量]]></text> </staticText> <staticText> - <reportElement uuid="ffbc55db-d060-4d8f-87d4-2a3efc4cf5ff" style="table_TH" x="1150" y="0" width="80" height="40"/> + <reportElement uuid="ffbc55db-d060-4d8f-87d4-2a3efc4cf5ff" style="table_TH" x="1230" y="0" width="80" height="40"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="14" isBold="true"/> </textElement> @@ -206,12 +207,26 @@ </textElement> <textFieldExpression><![CDATA[$P{materialColumnName}]]></textFieldExpression> </textField> + <staticText> + <reportElement uuid="c1ed7efb-9797-4b2e-9024-4103b8d2d3e0" style="table_TH" mode="Opaque" x="1070" y="20" width="80" height="20"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="14" isBold="true"/> + </textElement> + <text><![CDATA[器械包数]]></text> + </staticText> + <textField> + <reportElement uuid="65b15b19-1a27-46d3-8d59-dba992f950af" style="table_TH" mode="Opaque" x="1150" y="20" width="80" height="20" backcolor="#F0F8FF"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="14" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$P{materialColumnName}]]></textFieldExpression> + </textField> </band> </columnHeader> <detail> <band height="40" splitType="Stretch"> <subreport> - <reportElement uuid="9dd15949-fa7f-4d03-8dac-a567fa4583b4" x="90" y="0" width="1140" height="40"/> + <reportElement uuid="9dd15949-fa7f-4d03-8dac-a567fa4583b4" x="90" y="0" width="1220" height="40"/> <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{childrens})]]></dataSourceExpression> <returnValue subreportVariable="applicationAmountCount" toVariable="total1" calculation="Sum"/> <returnValue subreportVariable="recycleAmountCount" toVariable="total2" calculation="Sum"/> @@ -226,6 +241,7 @@ <returnValue subreportVariable="inventoryAmountCount" toVariable="total10" calculation="Sum"/> <returnValue subreportVariable="packingMaterialAmountCount" toVariable="total11" calculation="Sum"/> <returnValue subreportVariable="inventoryMaterialAmountCount" toVariable="total12" calculation="Sum"/> + <returnValue subreportVariable="invoiceMaterialAmountCount" toVariable="total13" calculation="Sum"/> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "tousseWorkLoad_child.jasper"]]></subreportExpression> </subreport> <textField> @@ -390,7 +406,7 @@ <textFieldExpression><![CDATA[$V{total11}]]></textFieldExpression> </textField> <textField> - <reportElement uuid="04dacf11-4a2d-4c44-ba94-25e320a8ccec" mode="Opaque" x="1150" y="0" width="80" height="40" forecolor="#000000" backcolor="#F0F8FF"/> + <reportElement uuid="04dacf11-4a2d-4c44-ba94-25e320a8ccec" mode="Opaque" x="1230" y="0" width="80" height="40" forecolor="#000000" backcolor="#F0F8FF"/> <box> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> @@ -448,6 +464,21 @@ </textElement> <textFieldExpression><![CDATA[$V{total12}]]></textFieldExpression> </textField> + <textField> + <reportElement uuid="02cdd91d-dc60-44f1-aa4b-345a42d723b8" mode="Opaque" x="1150" y="0" width="80" height="40" forecolor="#000000" backcolor="#F0F8FF"/> + <box> + <pen lineWidth="1.0"/> + <topPen lineWidth="1.0"/> + <leftPen lineWidth="1.0"/> + <bottomPen lineWidth="1.0"/> + <rightPen lineWidth="1.0"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none"> + <font fontName="SansSerif" size="14" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$V{total13}]]></textFieldExpression> + </textField> </band> </summary> </jasperReport> Index: ssts-web/src/main/webapp/jasperRtp/tousseWorkLoad_child.jrxml =================================================================== diff -u -r27520 -r28816 --- ssts-web/src/main/webapp/jasperRtp/tousseWorkLoad_child.jrxml (.../tousseWorkLoad_child.jrxml) (revision 27520) +++ ssts-web/src/main/webapp/jasperRtp/tousseWorkLoad_child.jrxml (.../tousseWorkLoad_child.jrxml) (revision 28816) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="tousseWorkLoad_child" language="groovy" pageWidth="1140" pageHeight="572" orientation="Landscape" columnWidth="1140" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="5f5dad50-b0b4-4f0c-b9be-c26f3870a728"> +<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="tousseWorkLoad_child" language="groovy" pageWidth="1220" pageHeight="572" orientation="Landscape" columnWidth="1220" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="5f5dad50-b0b4-4f0c-b9be-c26f3870a728"> <property name="ireport.zoom" value="1.1000000000000008"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> @@ -42,6 +42,9 @@ <field name="packingMaterialAmount" class="java.lang.Integer"> <fieldDescription><![CDATA[packingMaterialAmount]]></fieldDescription> </field> + <field name="invoiceMaterialAmount" class="java.lang.Integer"> + <fieldDescription><![CDATA[invoiceMaterialAmount]]></fieldDescription> + </field> <variable name="applicationAmountCount" class="java.lang.Integer" calculation="Sum"> <variableExpression><![CDATA[$F{applicationAmount}]]></variableExpression> </variable> @@ -81,6 +84,9 @@ <variable name="inventoryMaterialAmountCount" class="java.lang.Integer" calculation="Sum"> <variableExpression><![CDATA[$F{inventoryMaterialAmount}]]></variableExpression> </variable> + <variable name="invoiceMaterialAmountCount" class="java.lang.Integer" calculation="Sum"> + <variableExpression><![CDATA[$F{invoiceMaterialAmount}]]></variableExpression> + </variable> <background> <band splitType="Stretch"/> </background> @@ -227,7 +233,7 @@ <textFieldExpression><![CDATA[$F{inventoryAmount}]]></textFieldExpression> </textField> <textField> - <reportElement uuid="341ce140-79be-4c89-aad9-ffd80f57f136" x="1060" y="0" width="80" height="40"/> + <reportElement uuid="341ce140-79be-4c89-aad9-ffd80f57f136" x="1140" y="0" width="80" height="40"/> <box> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> @@ -268,6 +274,20 @@ </textElement> <textFieldExpression><![CDATA[$F{inventoryMaterialAmount}]]></textFieldExpression> </textField> + <textField> + <reportElement uuid="5e060a40-d763-4841-810a-fab1245d0b16" x="1060" y="0" width="80" height="40"/> + <box> + <pen lineWidth="1.0"/> + <topPen lineWidth="1.0"/> + <leftPen lineWidth="1.0"/> + <bottomPen lineWidth="1.0"/> + <rightPen lineWidth="1.0"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="14" isBold="false"/> + </textElement> + <textFieldExpression><![CDATA[$F{invoiceMaterialAmount}]]></textFieldExpression> + </textField> </band> </detail> </jasperReport> Index: ssts-web/src/main/webapp/jasperRtp/tousseWorkLoad.jasper =================================================================== diff -u -r27687 -r28816 Binary files differ Index: ssts-web/src/main/webapp/jasperRtp/tousseWorkLoad_child.jasper =================================================================== diff -u -r27520 -r28816 Binary files differ Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java =================================================================== diff -u -r28748 -r28816 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 28748) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 28816) @@ -11033,6 +11033,17 @@ sql += invoiceSql; querySqlList.add(invoiceSql); + //发货数量(按材料数量统计) + sql += " union all "; + params.extraSelectColumns = " ,td.name tousseName,td.tousseType"; + params.groupBySql = " group by td.name,td.tousseType"; + String invoiceMaterialSql = String.format("select 'invoice-material' type,tl.tousseName,sum(tl.amount) amount,tl.tousseType from (" + +dataIndex.getWorkAmountByMaterialSQL("发货数量", params, dataSoureOfMaterialsCountOfToussesInReports) + + ") tl group by tl.tousseName,tl.tousseType "); + sql += invoiceMaterialSql; + querySqlList.add(invoiceMaterialSql); + params.extraSelectColumns = ""; + params.groupBySql = ""; //签收数量(按包统计) sql += " union all "; @@ -11425,6 +11436,8 @@ childVO.setInvoiceAmount(childVO.getInvoiceAmount()+amount); }else if("signed".equals(type)){ childVO.setSignAmount(childVO.getSignAmount()+amount); + }else if("invoice-material".equals(type)){ + childVO.setInvoiceMaterialAmount(childVO.getInvoiceMaterialAmount()+amount); } }