Index: ssts-web/src/main/webapp/jasperRtp/monthReportChart.jasper =================================================================== diff -u -r12331 -r35936 Binary files differ Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java =================================================================== diff -u -r35935 -r35936 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java (.../JasperReportManager.java) (revision 35935) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java (.../JasperReportManager.java) (revision 35936) @@ -208,12 +208,6 @@ public List getdeviceMonitoringSource( String startDate, String endDate); - public List getTousseMonthChartReportSource( - String month); - - public List getDiposableGoodsMonthChartReportSource( - String month); - public List getYearGoodsChartReportSource( String queryYear, String depart); Fisheye: Tag 35936 refers to a dead (removed) revision in file `ssts-web/src/main/webapp/jasperRtp/monthReportChart.jrxml'. Fisheye: No comparison available. Pass `N' to diff? Index: ssts-web/src/main/webapp/jasperRtp/monthGoodsReportChart.jasper =================================================================== diff -u -r12331 -r35936 Binary files differ Fisheye: Tag 35936 refers to a dead (removed) revision in file `ssts-web/src/main/webapp/jasperRtp/monthGoodsReportChart.jrxml'. Fisheye: No comparison available. Pass `N' to diff? Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java =================================================================== diff -u -r35935 -r35936 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java (.../JasperreportsAction.java) (revision 35935) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java (.../JasperreportsAction.java) (revision 35936) @@ -852,18 +852,6 @@ String endDay = StrutsParamUtils.getPraramValue("endDay", ""); return jasperReportManager.getdeviceMonitoringSource(startDay, endDay); - } else if (reportName.equals("monthReportChart")) { - String month = StrutsParamUtils.getPraramValue("month", null); - if (StringUtils.isNotBlank(month)) { - return jasperReportManager - .getTousseMonthChartReportSource(month); - } - } else if (reportName.equals("monthGoodsReportChart")) { - String month = StrutsParamUtils.getPraramValue("month", null); - if (StringUtils.isNotBlank(month)) { - return jasperReportManager - .getDiposableGoodsMonthChartReportSource(month); - } } else if (reportName.equals("yearReportChart")) { String queryYear = StrutsParamUtils.getPraramValue("queryYear", null); @@ -2731,28 +2719,6 @@ map.put("title", "满意度调查汇总报表"); } return map; - } else if (reportName.equals("monthReportChart")) { - String month = StrutsParamUtils.getPraramValue("month", null); - String title1 = "器械包数量"; - String title2 = "器械包价格"; - if (StringUtils.isNotBlank(month)) { - title1 += "(" + month + ")"; - title2 += "(" + month + ")"; - } - map.put("title1", title1); - map.put("title2", title2); - return map; - } else if (reportName.equals("monthGoodsReportChart")) { - String month = StrutsParamUtils.getPraramValue("month", null); - String title1 = "一次性物品数量"; - String title2 = "一次性物品价格"; - if (StringUtils.isNotBlank(month)) { - title1 += "(" + month + ")"; - title2 += "(" + month + ")"; - } - map.put("title1", title1); - map.put("title2", title2); - return map; } else if (reportName.equals("yearReportChart")) { String queryYear = StrutsParamUtils.getPraramValue("queryYear", null); Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java =================================================================== diff -u -r35934 -r35936 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 35934) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 35936) @@ -428,160 +428,12 @@ return null; } - /** - * 获取某个月的开始日期下一个月的第一天 2012-01-01 2012-02-01 - * - * @param month - * @return - */ - public Map getMonthStartAndEndDate(String month) { - if (StringUtils.isNotBlank(month)) { - Date date = null; - try { - date = new SimpleDateFormat("yyyy-MM").parse(month); - } catch (ParseException e) { - e.printStackTrace(); - } - Calendar calendar = Calendar.getInstance(); - if(date == null){ - return null; - } - calendar.setTime(date); - calendar.add(Calendar.MONTH, 1); - String endDay = new SimpleDateFormat("yyyy-MM-dd").format(calendar - .getTime()); - String startDay = month + "-01 00:00:00"; - Map map = new HashMap(); - map.put("startDay", startDay); - map.put("endDay", endDay + " 00:00:00"); - return map; - } - return null; - } @Override public List getSatisfyDetailDataSource(String startDay, String endDay, String formDefinitionName, String departCoding) throws SQLException, ParseException { return departSatisfyReportHelper.getSatisfyDetailDataSource(startDay, endDay, formDefinitionName, departCoding); } - /** - * 获取器械包月份图形报表数据源 - * - * @param month - * @return - */ - @Override - public List getTousseMonthChartReportSource( - String month) { - if (StringUtils.isNotBlank(month)) { - List beans = new ArrayList(); - Map monthMap = getMonthStartAndEndDate(month); - String sql = "select temp.depart,sum(temp.totalPrice), sum(temp.tousseAmount) from ( "; - sql += "select po.settleAccountsDepart as depart,max(ip.settleAccountsDepartCoding) as departCoding ,sum(po.totalprice) as totalPrice,sum(po.tousseamount) as tousseAmount " - + "from invoice po,invoiceplan ip where po.invoiceplan_id = ip.id and (po.status = '收货签收' or po.status = '已发货') and ip.type != '一次性物品申请单' " - + "and po.sendTime between " - + dateQueryAdapter.dateAdapter(monthMap.get("startDay")) - + " and " - + dateQueryAdapter.dateAdapter(monthMap.get("endDay")) - + " and po.settleAccountsDepart is not null" - + " group by po.settleAccountsDepart"; - sql += " union all "; - sql += "select '供应室'as depart,max(rr.departcoding), sum(ri.price*ri.amount) as price,sum(ri.amount) " - + "from ReceiveRecord rr inner join ReceiveRecordItem ri on rr.id = ri.receiverecord_id where ri.type != '一次性物品' " - + " and rr.time between " - + dateQueryAdapter.dateAdapter(monthMap.get("startDay")) - + " and " - + dateQueryAdapter.dateAdapter(monthMap.get("endDay")); - sql += " union all "; - sql += "select rr.depart,max(rr.departcoding) as coding,-sum(ri.price*ri.amount) as price,-sum(ri.materialAmount) " - + "from ReturnGoodsRecord rr inner join ReturnGoodsItem ri on rr.id = ri.returnGoodsRecord_ID where rr.type != '一次性物品' " - + " and rr.returnTime between " - + dateQueryAdapter.dateAdapter(monthMap.get("startDay")) - + " and " - + dateQueryAdapter.dateAdapter(monthMap.get("endDay")) - + " group by rr.depart "; - sql += ") temp group by temp.depart order by max(temp.departCoding) asc"; - ResultSet rs = objectDao.executeSql(sql); - try { - while (rs.next()) { - String depart = rs.getString(1); - Double price = rs.getDouble(2); - Integer amount = rs.getInt(3); - MonthReportChartBean bean = new MonthReportChartBean(); - bean.setDepart(depart); - bean.setAmount(amount); - bean.setPrice(price); - beans.add(bean); - } - } catch (SQLException e) { - e.printStackTrace(); - }finally { - DatabaseUtil.closeResultSetAndStatement(rs); - } - return beans; - } - return null; - } - - /** - * 获取一次性物品月份图形报表数据源 - * - * @param month - * @return - */ - @Override - public List getDiposableGoodsMonthChartReportSource( - String month) { - if (StringUtils.isNotBlank(month)) { - List beans = new ArrayList(); - Map monthMap = getMonthStartAndEndDate(month); - String sql = "select temp.depart,sum(temp.totalPrice), sum(temp.tousseAmount) from ( "; - sql += "select po.settleAccountsDepart as depart,max(ip.settleAccountsDepartCoding) as departCoding ,sum(po.totalprice) as totalPrice,sum(po.diposableGoodsAmount) as tousseAmount " - + "from invoice po,invoiceplan ip where po.invoiceplan_id = ip.id and (po.status = '收货签收' or po.status = '已发货') and ip.type = '一次性物品申请单' " - + "and po.sendTime between " - + dateQueryAdapter.dateAdapter(monthMap.get("startDay")) - + " and " - + dateQueryAdapter.dateAdapter(monthMap.get("endDay")) - + " group by po.settleAccountsDepart"; - sql += " union all "; - sql += "select '供应室'as depart,max(rr.departcoding), sum(ri.price*ri.amount) as price,sum(ri.amount) as price " - + "from ReceiveRecord rr inner join ReceiveRecordItem ri on rr.id = ri.receiverecord_id where ri.type = '一次性物品' " - + " and rr.time between " - + dateQueryAdapter.dateAdapter(monthMap.get("startDay")) - + " and " - + dateQueryAdapter.dateAdapter(monthMap.get("endDay")); - sql += " union all "; - sql += "select rr.depart,max(rr.departcoding) as coding,-sum(ri.price*ri.amount) as price,-sum(ri.amount) as price " - + "from ReturnGoodsRecord rr inner join ReturnGoodsItem ri on rr.id = ri.returnGoodsRecord_ID where rr.type = '一次性物品' " - + " and rr.returnTime between " - + dateQueryAdapter.dateAdapter(monthMap.get("startDay")) - + " and " - + dateQueryAdapter.dateAdapter(monthMap.get("endDay")) - + " group by rr.depart "; - sql += ") temp group by temp.depart order by max(temp.departCoding) asc"; - ResultSet rs = objectDao.executeSql(sql); - try { - while (rs.next()) { - String depart = rs.getString(1); - Double price = rs.getDouble(2); - Integer amount = rs.getInt(3); - MonthReportChartBean bean = new MonthReportChartBean(); - bean.setDepart(depart); - bean.setAmount(amount); - bean.setPrice(price); - beans.add(bean); - } - } catch (SQLException e) { - e.printStackTrace(); - }finally { - DatabaseUtil.closeResultSetAndStatement(rs); - } - return beans; - } - return null; - } - - /** * 获取设备监测报表数据源 */ @Override