Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationDetail_main.java =================================================================== diff -u --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationDetail_main.java (revision 0) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationDetail_main.java (revision 18066) @@ -0,0 +1,38 @@ +package com.forgon.disinfectsystem.jasperreports.javabeansource; + +import java.util.ArrayList; +import java.util.List; +/** + * 手术排班报表(查询类型为明细)的javabean + * @author Chenjiaru + * + */ +public class OperationReservationDetail_main { + /** + * 手术时间分组字段(精确到天) + */ + private String operationTimeGroup; + + /** + * 子报表的javaBean + */ + private List child = new ArrayList(); + + + + public List getChild() { + return child; + } + + public void setChild(List child) { + this.child = child; + } + + public String getOperationTimeGroup() { + return operationTimeGroup; + } + + public void setOperationTimeGroup(String operationTimeGroup) { + this.operationTimeGroup = operationTimeGroup; + } +} Index: ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice1.jrxml =================================================================== diff -u --- ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice1.jrxml (revision 0) +++ ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice1.jrxml (revision 18066) @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + <band height="60" splitType="Stretch"> + <textField> + <reportElement uuid="c0903be2-2048-43c9-af33-90696a16ba79" x="0" y="0" width="1000" height="60"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="14" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$P{title}]]></textFieldExpression> + </textField> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java =================================================================== diff -u -r17831 -r18066 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java (.../JasperReportManager.java) (revision 17831) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java (.../JasperReportManager.java) (revision 18066) @@ -41,6 +41,8 @@ import com.forgon.disinfectsystem.jasperreports.javabeansource.MonthReportBean; import com.forgon.disinfectsystem.jasperreports.javabeansource.MonthReportChartBean; import com.forgon.disinfectsystem.jasperreports.javabeansource.NurseWorkloadBean; +import com.forgon.disinfectsystem.jasperreports.javabeansource.OperationReservationDetail_main; +import com.forgon.disinfectsystem.jasperreports.javabeansource.OperationReservationSum_main; import com.forgon.disinfectsystem.jasperreports.javabeansource.PackingFractionDefectiveBean; import com.forgon.disinfectsystem.jasperreports.javabeansource.QualityMonitoringInspectBean; import com.forgon.disinfectsystem.jasperreports.javabeansource.ReturnGoodsVo; @@ -66,6 +68,7 @@ import com.forgon.disinfectsystem.jasperreports.javabeansource.YearWorkLoadReportBean; import com.forgon.disinfectsystem.jasperreports.javabeansource.FormInstanceVo; import com.forgon.disinfectsystem.vo.SupplyRoomMaterialStocktaking; +import com.forgon.tools.StrutsParamUtils; /** * @author wangyi 2012-08-15 上午12:04 @@ -510,4 +513,24 @@ */ public List getUseRecordDataSource(String departmentName, String operator, String startTime, String endTime); + + /** + * 获取器械包工作量统计报表的数据 + * @param startTime 开始时间格式如:2017-01-01 00:00 + * @param endTime 结束时间格式如:2017-01-01 00:00 + * @param operationRoomName 指定想要查询的手术间名称,如果不指定则查询全部手术间 + * @return + */ + public List getOperationReservationDetailData(String startTime, + String endTime, String operationRoomName); + + /** + * 获取器械包工作量统计报表的数据 + * @param startTime 开始时间格式如:2017-01-01 00:00 + * @param endTime 结束时间格式如:2017-01-01 00:00 + * @param operationRoomName 指定想要查询的手术间名称,如果不指定则查询全部手术间 + * @return + */ + public List getOperationReservationSumData(String startTime, + String endTime, String operationRoomName); } Index: ssts-web/src/main/webapp/homepage/menu.jsp =================================================================== diff -u -r18009 -r18066 --- ssts-web/src/main/webapp/homepage/menu.jsp (.../menu.jsp) (revision 18009) +++ ssts-web/src/main/webapp/homepage/menu.jsp (.../menu.jsp) (revision 18066) @@ -572,7 +572,7 @@ var SSTS_Invoice_Menu = true; - + SSTS_Invoice_Menu = false; @@ -596,6 +596,17 @@ SSTS_DeliverGoodsQuqery_Menu = false; +/** + * 《手术排班物品查询》权限 + */ +var SSTS_OperationReservationInvoice = true; + + SSTS_OperationReservationInvoice = false; + +if (!sstsConfig.enableOperationReservationInvoiceReport){ + SSTS_OperationReservationInvoice = true; +} + var SSTS_UseRecord_Menu = true; SSTS_UseRecord_Menu = false; Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationSum_child_child.java =================================================================== diff -u --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationSum_child_child.java (revision 0) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationSum_child_child.java (revision 18066) @@ -0,0 +1,76 @@ +package com.forgon.disinfectsystem.jasperreports.javabeansource; +/** + * 手术排班报表(查询类型为汇总)子报表的子报表的javabean + * @author Chenjiaru + * + */ +public class OperationReservationSum_child_child { + + /** + * 物品名称 + */ + private String tousseName; + + + /** + * 所需数量 + */ + + private Integer amount = 0; + + /** + * 去污区数量 + */ + private Integer decontaminationAreaAmount = 0; + + /** + * 包装区数量 + */ + private Integer packingAreaAmount = 0; + + /** + * 发货区数量 + */ + private Integer invoiceAreaAmount = 0; + + public String getTousseName() { + return tousseName; + } + + public void setTousseName(String tousseName) { + this.tousseName = tousseName; + } + + public Integer getAmount() { + return amount; + } + + public void setAmount(Integer amount) { + this.amount = amount; + } + + public Integer getDecontaminationAreaAmount() { + return decontaminationAreaAmount; + } + + public void setDecontaminationAreaAmount(Integer decontaminationAreaAmount) { + this.decontaminationAreaAmount = decontaminationAreaAmount; + } + + public Integer getPackingAreaAmount() { + return packingAreaAmount; + } + + public void setPackingAreaAmount(Integer packingAreaAmount) { + this.packingAreaAmount = packingAreaAmount; + } + + public Integer getInvoiceAreaAmount() { + return invoiceAreaAmount; + } + + public void setInvoiceAreaAmount(Integer invoiceAreaAmount) { + this.invoiceAreaAmount = invoiceAreaAmount; + } + +} Index: ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice2_child.jasper =================================================================== diff -u Binary files differ Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationSum_child.java =================================================================== diff -u --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationSum_child.java (revision 0) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationSum_child.java (revision 18066) @@ -0,0 +1,53 @@ +package com.forgon.disinfectsystem.jasperreports.javabeansource; + +import java.util.ArrayList; +import java.util.List; +/** + * 手术排班报表(查询类型为汇总)子报表的javabean + * @author Chenjiaru + * + */ +public class OperationReservationSum_child { + + /** + * 区号(科室) + */ + private String orgUnitName; + + /** + * 手术间 + */ + private String operatingRoom; + + /** + * 子报表的javaBean + */ + private List child = new ArrayList(); + + + + public String getOrgUnitName() { + return orgUnitName; + } + + public void setOrgUnitName(String orgUnitName) { + this.orgUnitName = orgUnitName; + } + + public List getChild() { + return child; + } + + public void setChild(List child) { + this.child = child; + } + + public String getOperatingRoom() { + return operatingRoom; + } + + public void setOperatingRoom(String operatingRoom) { + this.operatingRoom = operatingRoom; + } + +} Index: ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice2.jasper =================================================================== diff -u Binary files differ Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java =================================================================== diff -u -r17844 -r18066 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 17844) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 18066) @@ -162,6 +162,12 @@ import com.forgon.disinfectsystem.jasperreports.javabeansource.MonthReportBean; import com.forgon.disinfectsystem.jasperreports.javabeansource.MonthReportChartBean; import com.forgon.disinfectsystem.jasperreports.javabeansource.NurseWorkloadBean; +import com.forgon.disinfectsystem.jasperreports.javabeansource.OperationReservationDetail_child; +import com.forgon.disinfectsystem.jasperreports.javabeansource.OperationReservationDetail_child_child; +import com.forgon.disinfectsystem.jasperreports.javabeansource.OperationReservationDetail_main; +import com.forgon.disinfectsystem.jasperreports.javabeansource.OperationReservationSum_child; +import com.forgon.disinfectsystem.jasperreports.javabeansource.OperationReservationSum_child_child; +import com.forgon.disinfectsystem.jasperreports.javabeansource.OperationReservationSum_main; import com.forgon.disinfectsystem.jasperreports.javabeansource.PackingFractionDefectiveBean; import com.forgon.disinfectsystem.jasperreports.javabeansource.QualityMonitoringInspectBean; import com.forgon.disinfectsystem.jasperreports.javabeansource.QualityMonitoringInspectMonthLineChartBean; @@ -14996,4 +15002,301 @@ } return list; } + + @Override + public List getOperationReservationDetailData(String startTime, + String endTime, String operationRoomName) { + List list = new ArrayList(); + if (StringUtils.isNotBlank(startTime) && StringUtils.isNotBlank(endTime)) { + if(StringUtils.isNotBlank(startTime) && startTime.trim().length() == 16){ + startTime = startTime + ":00"; + } + if(StringUtils.isNotBlank(endTime) && endTime.trim().length() == 16){ + endTime = endTime + ":59"; + } + String betweenSql = dateQueryAdapter.dateAreaSql("ore.operationTime", startTime, endTime); + + String operatingRoomSql = ""; + if (StringTools.isNotBlank(operationRoomName)) { + operatingRoomSql = String.format("and ore.operatingRoom='%s'", operationRoomName); + } + + 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 %s %s order by ore.operationTime", betweenSql, operatingRoomSql); + ResultSet result = objectDao.executeSql(sql); + + Map map1 = new LinkedHashMap(); + Map map2 = new LinkedHashMap(); + Map map3 = new LinkedHashMap(); + + String separator = ";;"; + try { + while(result.next()){ + String operationRoomId = result.getString("operationRoomId"); + String orgUnitName = StringTools.defaultString(result.getString("orgUnitName")); + String operatingRoomName = StringTools.defaultString(result.getString("operationRoomName")); + String operationReservationId = result.getString("operationReservationId"); + String operationTime = ForgonDateUtils.safelyFormatDate(result.getTimestamp("operationTime"), ForgonDateUtils.SIMPLEDATEFORMAT_YYYYMMDDHHMM, ""); + String operationTimeGroup = ""; + if (StringTools.isNotBlank(operationTime)) { + operationTimeGroup = operationTime.substring(0, 10) + "\r\n手术排班的物品"; + } + String consoleName = StringTools.defaultString(result.getString("consoleName")); + String tousseName = StringTools.defaultString(result.getString("tousseName")); + Integer amount = result.getInt("amount"); + + OperationReservationDetail_main child1 = map1.get(operationTimeGroup); + if (null == child1) { + child1 = new OperationReservationDetail_main(); + child1.setOperationTimeGroup(operationTimeGroup); + map1.put(operationTimeGroup, child1); + } + + String separator1 = operationTimeGroup + separator + operationRoomId; + OperationReservationDetail_child child2 = map2.get(separator1); + if (null == child2) { + child2 = new OperationReservationDetail_child(); + child2.setOrgUnitName(orgUnitName); + child2.setOperatingRoom(operatingRoomName); + map2.put(separator1, child2); + } + + String separator2 = separator1 + separator + operationReservationId; + OperationReservationDetail_child_child child3 = map3.get(separator2); + if (null == child3) { + child3 = new OperationReservationDetail_child_child(); + child3.setOperationTime(operationTime); + child3.setConsoleName(consoleName); + map3.put(separator2, child3); + } + + String goodsDetail = child3.getGoodsDetail(); + if (StringTools.isBlank(goodsDetail)) { + child3.setGoodsDetail(tousseName + "*" + amount); + } else { + child3.setGoodsDetail(goodsDetail + "、" + tousseName + "*" + amount); + } + } + } catch (SQLException e) { + e.printStackTrace(); + }finally { + DatabaseUtil.closeResultSetAndStatement(result); + } + + for (Entry entry1 : map1.entrySet()) { + String key1 = entry1.getKey(); + OperationReservationDetail_main value1 = entry1.getValue(); + + List child1 = new ArrayList(); + for (Entry entry2 : map2.entrySet()) { + String key2 = entry2.getKey(); + if (key2.startsWith(key1)) { + OperationReservationDetail_child value2 = entry2.getValue(); + + List child2 = new ArrayList(); + for (Entry entry3 : map3.entrySet()) { + String key3 = entry3.getKey(); + if (key3.startsWith(key2)) { + OperationReservationDetail_child_child value3 = entry3.getValue(); + child2.add(value3); + } + } + + value2.setChild(child2); + child1.add(value2); + } + } + value1.setChild(child1); + list.add(value1); + } + } + return list; + } + + @Override + public List getOperationReservationSumData(String startTime, + String endTime, String operationRoomName) { + List list = new ArrayList(); + if (StringUtils.isNotBlank(startTime) && StringUtils.isNotBlank(endTime)) { + if(StringUtils.isNotBlank(startTime) && startTime.trim().length() == 16){ + startTime = startTime + ":00"; + } + if(StringUtils.isNotBlank(endTime) && endTime.trim().length() == 16){ + endTime = endTime + ":59"; + } + String betweenSql = dateQueryAdapter.dateAreaSql("ore.operationTime", startTime, endTime); + + String operatingRoomSql = ""; + if (StringTools.isNotBlank(operationRoomName)) { + operatingRoomSql = String.format("and ore.operatingRoom='%s'", operationRoomName); + } + + 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 %s %s group by oro.id,oro.orgUnitName,oro.operationRoomName,ore.id,ore.operationTime,ti.tousseName order by ore.operationTime", + betweenSql, operatingRoomSql); + ResultSet result = objectDao.executeSql(sql); + + Map map1 = new LinkedHashMap(); + Map map2 = new LinkedHashMap(); + Map map3 = new LinkedHashMap(); + + Map map4 = new HashMap(); + + String separator = ";;"; + try { + while(result.next()){ + String operationRoomId = result.getString("operationRoomId"); + String orgUnitName = StringTools.defaultString(result.getString("orgUnitName")); + String operatingRoomName = StringTools.defaultString(result.getString("operationRoomName")); + String operationReservationId = result.getString("operationReservationId"); + String operationTimeGroup = ForgonDateUtils.safelyFormatDate(result.getTimestamp("operationTime"), ForgonDateUtils.SIMPLEDATEFORMAT_YYYYMMDD, ""); + if (StringTools.isNotBlank(operationTimeGroup)) { + operationTimeGroup += "\r\n手术排班的物品"; + } + String tousseName = StringTools.defaultString(result.getString("tousseName")); + Integer amount = result.getInt("amount"); + + map4.put(tousseName, tousseName); + + OperationReservationSum_main child1 = map1.get(operationTimeGroup); + if (null == child1) { + child1 = new OperationReservationSum_main(); + child1.setOperationTimeGroup(operationTimeGroup); + map1.put(operationTimeGroup, child1); + } + + String separator1 = operationTimeGroup + separator + operationRoomId; + 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; + OperationReservationSum_child_child child3 = map3.get(separator2); + if (null == child3) { + child3 = new OperationReservationSum_child_child(); + child3.setTousseName(tousseName); + map3.put(separator2, child3); + } + child3.setAmount(child3.getAmount() + amount); + } + } catch (SQLException e) { + e.printStackTrace(); + }finally { + DatabaseUtil.closeResultSetAndStatement(result); + } + + Set> tousseNameEntrySet = map4.entrySet(); + String[] TousseNameArr = new String[tousseNameEntrySet.size()]; + int i = 0; + for (Entry entry : tousseNameEntrySet) { + TousseNameArr[i ++] = entry.getKey(); + } + + Map map5 = new LinkedHashMap(); + if (TousseNameArr.length > 0) { + String sql2 = String.format("select 'decontaminationAreaAmount' amountType,td.name tousseName,sum(pt.amount) amount from PackingTask pt join TousseDefinition td on td.id=pt.tousseDefinition_id " + + "group by td.name having(1=1 %s) " + + "union all " + + "select 'packingAreaAmount' amountType,ti.tousseName,count(*) amount from TousseInstance ti where ti.status='%s' " + + "group by ti.tousseName having(1=1 %s) " + + "union all " + + "select 'invoiceAreaAmount' amountType,ti.tousseName,count(*) amount from TousseInstance ti where ti.status='%s' " + + "group by ti.tousseName having(1=1 %s) ", + SqlUtils.get_OrSql("td.name", TousseNameArr), TousseInstance.STATUS_REVIEWED, SqlUtils.get_OrSql("ti.tousseName", TousseNameArr), + TousseInstance.STATUS_STERILED, SqlUtils.get_OrSql("ti.tousseName", TousseNameArr)); + + ResultSet result2 = objectDao.executeSql(sql2); + try { + while(result2.next()){ + String amountType = StringTools.defaultString(result2.getString("amountType")); + String tousseName = StringTools.defaultString(result2.getString("tousseName")); + int amount = result2.getInt("amount"); + + OperationReservationSum_child_child child = map5.get(tousseName); + if (null == child) { + child = new OperationReservationSum_child_child(); + map5.put(tousseName, child); + } + setAmountByAmountType(child, amountType, amount); + } + } catch (SQLException e) { + e.printStackTrace(); + }finally { + DatabaseUtil.closeResultSetAndStatement(result2); + } + } + + for (Entry entry1 : map1.entrySet()) { + String key1 = entry1.getKey(); + OperationReservationSum_main value1 = entry1.getValue(); + + List child1 = new ArrayList(); + for (Entry entry2 : map2.entrySet()) { + String key2 = entry2.getKey(); + if (key2.startsWith(key1)) { + OperationReservationSum_child value2 = entry2.getValue(); + + List child2 = new ArrayList(); + for (Entry entry3 : map3.entrySet()) { + String key3 = entry3.getKey(); + if (key3.startsWith(key2)) { + OperationReservationSum_child_child value3 = entry3.getValue(); + OperationReservationSum_child_child tempValue3 = map5.get(value3.getTousseName()); + Calendar calendar = Calendar.getInstance(); + calendar.set(Calendar.HOUR_OF_DAY, 0); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + calendar.set(Calendar.MILLISECOND, 0); + + if (ForgonDateUtils.safelyParseDate(key1.substring(0, 10)).before(calendar.getTime())) { + value3.setDecontaminationAreaAmount(-1); + value3.setPackingAreaAmount(-1); + value3.setInvoiceAreaAmount(-1); + } else { + if (null != tempValue3) { + value3.setDecontaminationAreaAmount(tempValue3.getDecontaminationAreaAmount()); + value3.setPackingAreaAmount(tempValue3.getPackingAreaAmount()); + value3.setInvoiceAreaAmount(tempValue3.getInvoiceAreaAmount()); + } + } + child2.add(value3); + } + } + value2.setChild(child2); + child1.add(value2); + } + } + value1.setChild(child1); + list.add(value1); + } + } + return list; + } + + /** + * 根据类型,设置po的数量(此方法只使用与本类的getOperationReservationSumData方法) + * @param child 目标对象 + * @param amountType 数量类型 + * @param amount 数量 + */ + private void setAmountByAmountType( + OperationReservationSum_child_child child, String amountType, + int amount) { + if ("decontaminationAreaAmount".equals(amountType)) { + child.setDecontaminationAreaAmount(child.getDecontaminationAreaAmount() + amount); + } else if ("packingAreaAmount".equals(amountType)) { + child.setPackingAreaAmount(child.getPackingAreaAmount() + amount); + } else if ("invoiceAreaAmount".equals(amountType)) { + child.setInvoiceAreaAmount(child.getInvoiceAreaAmount() + amount); + } + } + } Index: ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice2_child_child.jasper =================================================================== diff -u Binary files differ Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationDetail_child.java =================================================================== diff -u --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationDetail_child.java (revision 0) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationDetail_child.java (revision 18066) @@ -0,0 +1,51 @@ +package com.forgon.disinfectsystem.jasperreports.javabeansource; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +/** + * 手术排班报表(查询类型为明细)子报表的javabean + * @author Chenjiaru + * + */ +public class OperationReservationDetail_child { + /** + * 区号(科室) + */ + private String orgUnitName; + + /** + * 手术间 + */ + private String operatingRoom; + + /** + * 子报表的javaBean + */ + private List child = new ArrayList(); + + + public String getOperatingRoom() { + return operatingRoom; + } + + public void setOperatingRoom(String operatingRoom) { + this.operatingRoom = operatingRoom; + } + public String getOrgUnitName() { + return orgUnitName; + } + + public void setOrgUnitName(String orgUnitName) { + this.orgUnitName = orgUnitName; + } + + public List getChild() { + return child; + } + + public void setChild(List child) { + this.child = child; + } + +} Index: ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice1_child.jrxml =================================================================== diff -u --- ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice1_child.jrxml (revision 0) +++ ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice1_child.jrxml (revision 18066) @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice2_child.jrxml =================================================================== diff -u --- ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice2_child.jrxml (revision 0) +++ ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice2_child.jrxml (revision 18066) @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice1.jasper =================================================================== diff -u Binary files differ Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java =================================================================== diff -u -r18052 -r18066 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java (.../JasperreportsAction.java) (revision 18052) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java (.../JasperreportsAction.java) (revision 18066) @@ -881,6 +881,19 @@ return jasperReportManager.getTousseMorrwoSendData(requestParameters); }else if("nurseWorkloadReport".equals(reportName)){ return jasperReportManager.getNurseWorkloadData(requestParameters); + }else if("operationReservationInvoice".equals(reportName)){ + String startTime = StrutsParamUtils.getPraramValue("startTime", ""); + String endTime = StrutsParamUtils.getPraramValue("endTime", ""); + String operationRoomName = StrutsParamUtils.getPraramValue("operationRoomName", ""); + String queryType = StrutsParamUtils.getPraramValue("queryType", ""); + + if (StringUtils.isNotBlank(startTime) && StringUtils.isNotBlank(endTime)) { + if ("明细".equals(queryType)) { + return jasperReportManager.getOperationReservationDetailData(startTime, endTime, operationRoomName); + } else if ("汇总".equals(queryType)) { + return jasperReportManager.getOperationReservationSumData(startTime, endTime, operationRoomName); + } + } } return null; } @@ -1452,6 +1465,11 @@ String title = "护理工作质量指标报表(" + year + ")"; map.put("title", title); return map; + }else if("operationReservationInvoice".equals(reportName)){ + String startTime = StrutsParamUtils.getPraramValue("startTime", ""); + String endTime = StrutsParamUtils.getPraramValue("endTime", ""); + map.put("title", String.format("手术排班物品查询(%s~%s)", startTime, endTime)); + return map; } return map; Index: ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice1_child_child.jrxml =================================================================== diff -u --- ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice1_child_child.jrxml (revision 0) +++ ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice1_child_child.jrxml (revision 18066) @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice1_child.jasper =================================================================== diff -u Binary files differ Index: ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice1_child_child.jasper =================================================================== diff -u Binary files differ Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationSum_main.java =================================================================== diff -u --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationSum_main.java (revision 0) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationSum_main.java (revision 18066) @@ -0,0 +1,37 @@ +package com.forgon.disinfectsystem.jasperreports.javabeansource; + +import java.util.ArrayList; +import java.util.List; +/** + * 手术排班报表(查询类型为汇总)的javabean + * @author Chenjiaru + * + */ +public class OperationReservationSum_main { + /** + * 手术时间分组字段(精确到天) + */ + private String operationTimeGroup; + + /** + * 子报表的javaBean + */ + private List child = new ArrayList(); + + + public List getChild() { + return child; + } + + public void setChild(List child) { + this.child = child; + } + + public String getOperationTimeGroup() { + return operationTimeGroup; + } + + public void setOperationTimeGroup(String operationTimeGroup) { + this.operationTimeGroup = operationTimeGroup; + } +} Index: ssts-web/src/main/webapp/disinfectsystem/config/zsyy/config.js =================================================================== diff -u -r18004 -r18066 --- ssts-web/src/main/webapp/disinfectsystem/config/zsyy/config.js (.../config.js) (revision 18004) +++ ssts-web/src/main/webapp/disinfectsystem/config/zsyy/config.js (.../config.js) (revision 18066) @@ -109,5 +109,7 @@ //器械包有材料丢失,是否必须确认。默认值为true,表示必须确认。false表示不用确认,此时保存后,历史回收记录的状态就是已确认(这就跟标识牌丢失一样,不用再次确认) tousseMaterialsLostMustConfirm:false, //是否启用手术间管理界面(true为启用,false或者不配置都不启用) - enableOperationRoomManagerViwe:true + enableOperationRoomManagerViwe:true, + //是否启用手术排班物品查询(true为启用,false或者不配置都不启用) + enableOperationReservationInvoiceReport : true } \ No newline at end of file Index: ssts-web/src/main/webapp/homepage/menuconfigure.js =================================================================== diff -u -r18009 -r18066 --- ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 18009) +++ ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 18066) @@ -96,7 +96,8 @@ {hidden :SSTS_Invoice_Select,text:"材料发货管理",href:WWWROOT+'/disinfectsystem/invoice/materialInvoiceView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true}, {hidden :!sstsConfig.hasOwnProperty('enableOperationReservation') || sstsConfig.enableOperationReservation == false || SSTS_OR_Menu,text:"手术预约管理",href:WWWROOT+'/disinfectsystem/invoice/operationReservationView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true}, {hidden :true,text:"发货单批量打印",href:WWWROOT+'/disinfectsystem/invoice/invoicePrintView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true}, - {hidden :SSTS_DeliverGoodsQuqery_Menu,text:"发货物品查询",href:WWWROOT+'/disinfectsystem/reportforms/invoiceQueryView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true} + {hidden :SSTS_DeliverGoodsQuqery_Menu,text:"发货物品查询",href:WWWROOT+'/disinfectsystem/reportforms/invoiceQueryView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true}, + {hidden :SSTS_OperationReservationInvoice,text:"手术排班物品查询",href:WWWROOT+'/disinfectsystem/reportforms/operationReservationInvoice.jsp?',hrefTarget:linkTarget,leaf:true} ] }; Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationDetail_child_child.java =================================================================== diff -u --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationDetail_child_child.java (revision 0) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/OperationReservationDetail_child_child.java (revision 18066) @@ -0,0 +1,51 @@ +package com.forgon.disinfectsystem.jasperreports.javabeansource; + +/** + * 手术排班报表(查询类型为明细)子报表的子报表的javabean + * @author Chenjiaru + * + */ +public class OperationReservationDetail_child_child { + /** + * 手术时间 + */ + private String operationTime; + + /** + * 手术台次 + */ + private String consoleName; + + /** + * 物品明细 + */ + private String goodsDetail; + + + public String getOperationTime() { + return operationTime; + } + + public void setOperationTime(String operationTime) { + this.operationTime = operationTime; + } + + public String getConsoleName() { + return consoleName; + } + + public void setConsoleName(String consoleName) { + this.consoleName = consoleName; + } + + public String getGoodsDetail() { + return goodsDetail; + } + + public void setGoodsDetail(String goodsDetail) { + this.goodsDetail = goodsDetail; + } + + + +} Index: ssts-web/src/main/resources/systemset/operationDefine.xml =================================================================== diff -u -r18009 -r18066 --- ssts-web/src/main/resources/systemset/operationDefine.xml (.../operationDefine.xml) (revision 18009) +++ ssts-web/src/main/resources/systemset/operationDefine.xml (.../operationDefine.xml) (revision 18066) @@ -109,6 +109,7 @@ + Index: ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice2.jrxml =================================================================== diff -u --- ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice2.jrxml (revision 0) +++ ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice2.jrxml (revision 18066) @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + <band height="38" splitType="Stretch"> + <textField> + <reportElement uuid="c4532d9d-d29a-4ca0-bf40-e0249a82ebfe" x="0" y="0" width="884" height="38"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="14" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$P{title}]]></textFieldExpression> + </textField> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice2_child_child.jrxml =================================================================== diff -u --- ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice2_child_child.jrxml (revision 0) +++ ssts-web/src/main/webapp/jasperRtp/operationReservationInvoice2_child_child.jrxml (revision 18066) @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $F{invoiceAreaAmount})?"√":""]]> + + + + Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/operationReservationInvoice.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/reportforms/operationReservationInvoice.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/operationReservationInvoice.js (revision 18066) @@ -0,0 +1,195 @@ +var entityName = "手术排班物品查询"; +var form; + +/** + * 加载报表的数据 + * + */ +var myMask; +function reloadReport(){ + if (!form.getForm().isValid()) { + showResult('请正确填写表单各值'); + return false; + } + + var startTime = $Id('startTime').value; + var endTime = $Id('endTime').value; + var queryType = $Id('queryType').value; + var operationRoomName = Ext.getCmp('queryOperationRoom').getRawValue(); + + myMask = new Ext.LoadMask(Ext.getBody(), { + msg: '正在加载,请稍候!', + removeMask: true + }); + myMask.show(); + + + var jasperreportName = 'operationReservationInvoice1.jasper'; + if ('汇总' == queryType) { + jasperreportName = 'operationReservationInvoice2.jasper'; + } + + window.open(WWWROOT + "/jasperreports/jasperreportsAction!createReportFromJavaBeanSource.do" + + "?jasperreportName=" + jasperreportName + "&reportName=operationReservationInvoice" + + "&startTime=" + startTime + + "&endTime=" + endTime + + "&operationRoomName=" + operationRoomName + + "&queryType=" + queryType, + 'thisIframe', '_self'); +} + + +Ext.onReady(function() { + Ext.QuickTips.init(); + + //开始时间 + var startTime = new Date(); + startTime.setHours(0); + startTime.setMinutes(0); + + //结束时间 + var endTime = new Date(startTime.getTime() + (1000*3600*48 - 1000*60)); + + + /** + * 手术间的Store + */ + var operationRoomStore = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/baseData/operationRoomAction!searchOperationRoom.do', + method : 'POST' + }), + reader : new Ext.data.JsonReader({ + root : 'data' + },[ + {name : 'id',mapping : 'id'}, + {name : 'operationRoomName',mapping : 'operationRoomName'} + ] + ) + }); + + form = new Ext.form.FormPanel({ + title : entityName, + region : 'north', + labelAlign : 'right', + buttonAlign : 'center', + collapsible : true, + collapseMode : 'mini', + split : true, + border : 0, + frame : true, + bodyStyle : 'padding:0px auto;margin:0px',// padding:1px;padding-top:5px; + height : 105, + items : [{ + layout : 'column', + height : 40, + labelWidth : 70, + items : [{ + width : 220, + layout : 'form', + items : [{ + xtype : 'datefieldWithMin', + fieldLabel : '开始日期', + id : 'startTime', + name : 'startTime', + format : 'Y-m-d H:i', + allowBlank : true, + anchor : '95%', + theHours : 0, + theMinutes : 0, + value : startTime + }] + },{ + width : 220, + layout : 'form', + items : [{ + xtype : 'datefieldWithMin', + fieldLabel : '结束日期', + id : 'endTime', + name : 'endTime', + format : 'Y-m-d H:i', + allowBlank : true, + anchor : '95%', + theHours : 23, + theMinutes : 59, + value : endTime + }] + },{ + width : 280, + layout : 'form', + labelSeparator : '选择手术间:', + items : [{ + xtype : 'combo', + id : 'queryOperationRoom', + name : 'queryOperationRoom', + valueField : 'id', + displayField : 'operationRoomName', + store : operationRoomStore, + forceSelection : true, + triggerAction : 'all', + anchor : '95%' + }] + },{ + width : 210, + layout : 'form', + items : [{ + xtype : 'combo', + fieldLabel : "查询类型", + valueField : 'value', + displayField : 'value', + store : new Ext.data.SimpleStore({ + fields : [ 'value'], + data : [['明细'],['汇总']] + }), + triggerAction : 'all', + id : 'queryType', + name : 'queryType', + allowBlank : false, + readOnly:true, + mode : 'local', + value : '明细', + anchor : '95%' + }] + }] + }], + buttons:[{ + xtype : 'button', + text : '查询', + minWidth : 70, + iconCls : 'icon_search', + handler : function() { + reloadReport(); + } + },{ + xtype : 'button', + text : '重置', + minWidth : 70, + iconCls : 'icon_set', + handler : function() { + $Id('startTime').value = ""; + $Id('endTime').value = ""; + } + }] + }); + + + var reportForm = new Ext.Panel({ + frame:false,//渲染面板 + autoScroll:true,//自动显示滚动条 + collapsible:true,//允许展开和收缩 + bodyPadding:5, + html:'' + + }); + + var viewport = new Ext.Viewport({ + layout : 'border', + items : [form, { + region : 'center', + margins : '0 0 0 0', + layout : 'fit', + items : reportForm + }] + }); + +}); \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/operationReservationInvoice.jsp =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/reportforms/operationReservationInvoice.jsp (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/operationReservationInvoice.jsp (revision 18066) @@ -0,0 +1,26 @@ +<%@page contentType="text/html; charset=UTF-8"%> +<%@include file="/common/taglibs.jsp"%> +<%@include file="/common/includeExtJsAndCss.jsp"%> + + + + + + + + + +手术排班物品查询 + + + + + + + +
+
+
+ + \ No newline at end of file