Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/operationReservationInvoiceView.js =================================================================== diff -u -r18121 -r18179 --- ssts-web/src/main/webapp/disinfectsystem/reportforms/operationReservationInvoiceView.js (.../operationReservationInvoiceView.js) (revision 18121) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/operationReservationInvoiceView.js (.../operationReservationInvoiceView.js) (revision 18179) @@ -15,6 +15,7 @@ var startTime = $Id('startTime').value; var endTime = $Id('endTime').value; var queryType = $Id('queryType').value; + var tousseName = Ext.getCmp('tousse').getRawValue(); var operationRoomName = Ext.getCmp('queryOperationRoom').getRawValue(); myMask = new Ext.LoadMask(Ext.getBody(), { @@ -34,6 +35,7 @@ "&startTime=" + startTime + "&endTime=" + endTime + "&operationRoomName=" + operationRoomName + + "&tousseName=" + tousseName + "&queryType=" + queryType, 'thisIframe', '_self'); } @@ -69,6 +71,21 @@ ] ) }); + + //“器械包combo”的数据储存器 + var tousseStore = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!searchTousseByTypeArr.do', + method : 'POST' + }), + reader : new Ext.data.JsonReader({ + totalProperty : 'totalCount', + root : 'data' + }, [ + {name : 'id',mapping : 'id'}, + {name : 'name',mapping : 'name'}] + ) + }); form = new Ext.form.FormPanel({ title : entityName, @@ -117,7 +134,7 @@ value : endTime }] },{ - width : 280, + width : 250, layout : 'form', labelSeparator : '选择手术间:', items : [{ @@ -128,10 +145,28 @@ displayField : 'operationRoomName', store : operationRoomStore, forceSelection : true, + disabled : true, triggerAction : 'all', anchor : '95%' }] },{ + width : 280, + layout : 'form', + labelSeparator : '选择器械包:', + items : [{ + xtype : 'combo', + id : 'tousse', + name : 'tousse', + valueField : 'id', + displayField : 'name', + store : tousseStore, + forceSelection : true, + triggerAction : 'all', + queryParam : 'spell', + minChars : 0, + anchor : '95%' + }] + },{ width : 210, layout : 'form', items : [{ @@ -150,7 +185,18 @@ readOnly:true, mode : 'local', value : '汇总', - anchor : '95%' + anchor : '95%', + listeners : { + select : function(thisCombo, record, index) { + var queryType = thisCombo.getValue(); + if (queryType == '汇总') { + Ext.getCmp('queryOperationRoom').setValue(''); + Ext.getCmp('queryOperationRoom').disable(); + } else { + Ext.getCmp('queryOperationRoom').enable(); + } + } + } }] }] }], Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationSum_child.java =================================================================== diff -u -r18066 -r18179 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationSum_child.java (.../OperationReservationSum_child.java) (revision 18066) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationSum_child.java (.../OperationReservationSum_child.java) (revision 18179) @@ -15,11 +15,6 @@ private String orgUnitName; /** - * 手术间 - */ - private String operatingRoom; - - /** * 子报表的javaBean */ private List child = new ArrayList(); @@ -41,13 +36,5 @@ public void setChild(List child) { this.child = child; } - - public String getOperatingRoom() { - return operatingRoom; - } - - public void setOperatingRoom(String operatingRoom) { - this.operatingRoom = operatingRoom; - } } Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java =================================================================== diff -u -r18094 -r18179 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java (.../JasperreportsAction.java) (revision 18094) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java (.../JasperreportsAction.java) (revision 18179) @@ -885,13 +885,14 @@ String startTime = StrutsParamUtils.getPraramValue("startTime", ""); String endTime = StrutsParamUtils.getPraramValue("endTime", ""); String operationRoomName = StrutsParamUtils.getPraramValue("operationRoomName", ""); + String tousseName = StrutsParamUtils.getPraramValue("tousseName", ""); String queryType = StrutsParamUtils.getPraramValue("queryType", ""); if (StringUtils.isNotBlank(startTime) && StringUtils.isNotBlank(endTime)) { if ("明细".equals(queryType)) { - return jasperReportManager.getOperationReservationDetailData(startTime, endTime, operationRoomName); + return jasperReportManager.getOperationReservationDetailData(startTime, endTime, operationRoomName, tousseName); } else if ("汇总".equals(queryType)) { - return jasperReportManager.getOperationReservationSumData(startTime, endTime, operationRoomName); + return jasperReportManager.getOperationReservationSumData(startTime, endTime, tousseName); } } }else if("urgentNeedGoodsProcessingCycle".equals(reportName)){ Index: ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice2_child.jrxml =================================================================== diff -u -r18079 -r18179 --- ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice2_child.jrxml (.../operationReservationInvoice2_child.jrxml) (revision 18079) +++ ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice2_child.jrxml (.../operationReservationInvoice2_child.jrxml) (revision 18179) @@ -1,5 +1,5 @@ - + @@ -10,9 +10,6 @@ - - - @@ -30,24 +27,10 @@ - + - - - - - - - - - - - - - - Index: ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice2.jasper =================================================================== diff -u -r18083 -r18179 Binary files differ Index: ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice2_child.jasper =================================================================== diff -u -r18083 -r18179 Binary files differ Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java =================================================================== diff -u -r18166 -r18179 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 18166) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 18179) @@ -15043,7 +15043,7 @@ @Override public List getOperationReservationDetailData(String startTime, - String endTime, String operationRoomName) { + String endTime, String operationRoomName, String tousseName) { List list = new ArrayList(); if (StringUtils.isNotBlank(startTime) && StringUtils.isNotBlank(endTime)) { if(StringUtils.isNotBlank(startTime) && startTime.trim().length() == 16){ @@ -15059,10 +15059,16 @@ operatingRoomSql = String.format("and ore.operatingRoom='%s'", operationRoomName); } + String tousseNameSql = ""; + if (StringTools.isNotBlank(tousseName)) { + tousseNameSql = String.format("and ti.tousseName='%s'", tousseName); + } + String sql = String.format("select oro.id operationRoomId,oro.orgUnitName orgUnitName,oro.operationRoomName,ore.id operationReservationId,ore.operationTime,ore.consoleName,ti.tousseName,ti.amount " + "from OperationReservation ore join TousseItem ti on ti.recyclingApplication_ID=ore.id " + "join OperationRoom oro on oro.operationRoomName=ore.operatingRoom " - + "where oro.isInvoice='%s' %s %s order by ore.operationTime", Constants.STR_YES, betweenSql, operatingRoomSql); + + "where oro.isInvoice='%s' %s %s %s order by ore.operationTime,ore.consoleName", + Constants.STR_YES, betweenSql, operatingRoomSql, tousseNameSql); ResultSet result = objectDao.executeSql(sql); Map map1 = new LinkedHashMap(); @@ -15082,7 +15088,7 @@ operationTimeGroup = operationTime.substring(0, 10) + "\r\n手术排班的物品"; } String consoleName = StringTools.defaultString(result.getString("consoleName")); - String tousseName = StringTools.defaultString(result.getString("tousseName")); + String goodsName = StringTools.defaultString(result.getString("tousseName")); Integer amount = result.getInt("amount"); OperationReservationDetail_main child1 = map1.get(operationTimeGroup); @@ -15112,9 +15118,9 @@ String goodsDetail = child3.getGoodsDetail(); if (StringTools.isBlank(goodsDetail)) { - child3.setGoodsDetail(tousseName + "*" + amount); + child3.setGoodsDetail(goodsName + "*" + amount); } else { - child3.setGoodsDetail(goodsDetail + "、" + tousseName + "*" + amount); + child3.setGoodsDetail(goodsDetail + "、" + goodsName + "*" + amount); } } } catch (SQLException e) { @@ -15155,7 +15161,7 @@ @Override public List getOperationReservationSumData(String startTime, - String endTime, String operationRoomName) { + String endTime, String tousseName) { List list = new ArrayList(); if (StringUtils.isNotBlank(startTime) && StringUtils.isNotBlank(endTime)) { if(StringUtils.isNotBlank(startTime) && startTime.trim().length() == 16){ @@ -15166,16 +15172,16 @@ } String betweenSql = "and " + dateQueryAdapter.dateAreaSql("ore.operationTime", startTime, endTime); - String operatingRoomSql = ""; - if (StringTools.isNotBlank(operationRoomName)) { - operatingRoomSql = String.format("and ore.operatingRoom='%s'", operationRoomName); + String tousseNameSql = ""; + if (StringTools.isNotBlank(tousseName)) { + tousseNameSql = String.format("and ti.tousseName='%s'", tousseName); } String sql = String.format("select oro.id operationRoomId,oro.orgUnitName,oro.operationRoomName,ore.id operationReservationId,ore.operationTime,ti.tousseName,sum(ti.amount) amount " + "from OperationReservation ore join TousseItem ti on ti.recyclingApplication_ID=ore.id " + "join OperationRoom oro on oro.operationRoomName=ore.operatingRoom " + "where oro.isInvoice='%s' %s %s group by oro.id,oro.orgUnitName,oro.operationRoomName,ore.id,ore.operationTime,ti.tousseName order by ore.operationTime", - Constants.STR_YES, betweenSql, operatingRoomSql); + Constants.STR_YES, betweenSql, tousseNameSql); ResultSet result = objectDao.executeSql(sql); Map map1 = new LinkedHashMap(); @@ -15195,10 +15201,10 @@ if (StringTools.isNotBlank(operationTimeGroup)) { operationTimeGroup += "\r\n手术排班的物品"; } - String tousseName = StringTools.defaultString(result.getString("tousseName")); + String goodsName = StringTools.defaultString(result.getString("tousseName")); Integer amount = result.getInt("amount"); - map4.put(tousseName, tousseName); + map4.put(goodsName, goodsName); OperationReservationSum_main child1 = map1.get(operationTimeGroup); if (null == child1) { @@ -15207,20 +15213,19 @@ map1.put(operationTimeGroup, child1); } - String separator1 = operationTimeGroup + separator + operationRoomId; + String separator1 = operationTimeGroup + separator + orgUnitName; OperationReservationSum_child child2 = map2.get(separator1); if (null == child2) { child2 = new OperationReservationSum_child(); child2.setOrgUnitName(orgUnitName); - child2.setOperatingRoom(operatingRoomName); map2.put(separator1, child2); } - String separator2 = separator1 + separator + tousseName; + String separator2 = separator1 + separator + goodsName; OperationReservationSum_child_child child3 = map3.get(separator2); if (null == child3) { child3 = new OperationReservationSum_child_child(); - child3.setTousseName(tousseName); + child3.setTousseName(goodsName); map3.put(separator2, child3); } child3.setAmount(child3.getAmount() + amount); @@ -15255,13 +15260,13 @@ try { while(result2.next()){ String amountType = StringTools.defaultString(result2.getString("amountType")); - String tousseName = StringTools.defaultString(result2.getString("tousseName")); + String goodsName = StringTools.defaultString(result2.getString("tousseName")); int amount = result2.getInt("amount"); - OperationReservationSum_child_child child = map5.get(tousseName); + OperationReservationSum_child_child child = map5.get(goodsName); if (null == child) { child = new OperationReservationSum_child_child(); - map5.put(tousseName, child); + map5.put(goodsName, child); } setAmountByAmountType(child, amountType, amount); } Index: ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice2.jrxml =================================================================== diff -u -r18083 -r18179 --- ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice2.jrxml (.../operationReservationInvoice2.jrxml) (revision 18083) +++ ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice2.jrxml (.../operationReservationInvoice2.jrxml) (revision 18179) @@ -1,5 +1,5 @@ - + @@ -16,7 +16,7 @@ <band height="38" splitType="Stretch"> <textField> - <reportElement uuid="c4532d9d-d29a-4ca0-bf40-e0249a82ebfe" x="0" y="0" width="884" height="38"/> + <reportElement uuid="c4532d9d-d29a-4ca0-bf40-e0249a82ebfe" x="0" y="0" width="764" height="38"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="14" isBold="true"/> </textElement> @@ -55,7 +55,7 @@ <text><![CDATA[区号]]></text> </staticText> <staticText> - <reportElement uuid="df18e65b-fb99-4aa9-8aa0-1d021aad9875" x="374" y="0" width="140" height="38"/> + <reportElement uuid="df18e65b-fb99-4aa9-8aa0-1d021aad9875" x="254" y="0" width="140" height="38"/> <box> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> @@ -69,7 +69,7 @@ <text><![CDATA[物品名称]]></text> </staticText> <staticText> - <reportElement uuid="c452d207-6094-4ce6-a337-be79b71a49e3" x="564" y="0" width="80" height="38"/> + <reportElement uuid="c452d207-6094-4ce6-a337-be79b71a49e3" x="444" y="0" width="80" height="38"/> <box> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> @@ -83,7 +83,7 @@ <text><![CDATA[所需数量]]></text> </staticText> <staticText> - <reportElement uuid="094b5757-101f-4d67-8339-20abd214b9b4" x="254" y="0" width="120" height="38"/> + <reportElement uuid="c452d207-6094-4ce6-a337-be79b71a49e3" x="684" y="0" width="80" height="38"/> <box> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> @@ -94,24 +94,10 @@ <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="14" isBold="true"/> </textElement> - <text><![CDATA[手术间]]></text> - </staticText> - <staticText> - <reportElement uuid="c452d207-6094-4ce6-a337-be79b71a49e3" x="804" y="0" width="80" height="38"/> - <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="true"/> - </textElement> <text><![CDATA[去污区数量]]></text> </staticText> <staticText> - <reportElement uuid="c452d207-6094-4ce6-a337-be79b71a49e3" x="724" y="0" width="80" height="38"/> + <reportElement uuid="c452d207-6094-4ce6-a337-be79b71a49e3" x="604" y="0" width="80" height="38"/> <box> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> @@ -125,7 +111,7 @@ <text><![CDATA[包装区数量]]></text> </staticText> <staticText> - <reportElement uuid="c452d207-6094-4ce6-a337-be79b71a49e3" x="644" y="0" width="80" height="38"/> + <reportElement uuid="c452d207-6094-4ce6-a337-be79b71a49e3" x="524" y="0" width="80" height="38"/> <box> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> @@ -139,7 +125,7 @@ <text><![CDATA[发货区数量]]></text> </staticText> <staticText> - <reportElement uuid="c452d207-6094-4ce6-a337-be79b71a49e3" x="514" y="0" width="50" height="38"/> + <reportElement uuid="c452d207-6094-4ce6-a337-be79b71a49e3" x="394" y="0" width="50" height="38"/> <box> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> @@ -172,7 +158,7 @@ <textFieldExpression><![CDATA[$F{operationTimeGroup}]]></textFieldExpression> </textField> <subreport> - <reportElement uuid="3c75bbd4-b449-4e58-815e-f05b93b6fe20" x="114" y="0" width="770" height="38"/> + <reportElement uuid="3c75bbd4-b449-4e58-815e-f05b93b6fe20" x="114" y="0" width="650" height="38"/> <subreportParameter name="SUBREPORT_DIR"> <subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression> </subreportParameter> Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java =================================================================== diff -u -r18094 -r18179 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java (.../JasperReportManager.java) (revision 18094) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java (.../JasperReportManager.java) (revision 18179) @@ -520,20 +520,21 @@ * @param startTime 开始时间格式如:2017-01-01 00:00 * @param endTime 结束时间格式如:2017-01-01 00:00 * @param operationRoomName 指定想要查询的手术间名称,如果不指定则查询全部手术间 + * @param tousseName 指定想要查询的器械包名称,如果不指定则查询全部器械包 * @return */ public List<OperationReservationDetail_main> getOperationReservationDetailData(String startTime, - String endTime, String operationRoomName); + String endTime, String operationRoomName, String tousseName); /** * 获取器械包工作量统计报表的数据 * @param startTime 开始时间格式如:2017-01-01 00:00 * @param endTime 结束时间格式如:2017-01-01 00:00 - * @param operationRoomName 指定想要查询的手术间名称,如果不指定则查询全部手术间 + * @param tousseName 指定想要查询的器械包名称,如果不指定则查询全部器械包 * @return */ public List<OperationReservationSum_main> getOperationReservationSumData(String startTime, - String endTime, String operationRoomName); + String endTime, String tousseName); /** * 获取急用物品处理周期统计报表的数据