Index: ssts-web/src/main/webapp/jasperRtp/supplyRoomQualityQuota.jrxml
===================================================================
diff -u
--- ssts-web/src/main/webapp/jasperRtp/supplyRoomQualityQuota.jrxml (revision 0)
+++ ssts-web/src/main/webapp/jasperRtp/supplyRoomQualityQuota.jrxml (revision 22467)
@@ -0,0 +1,250 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/supplyRoomQualityQuota.jsp
===================================================================
diff -u
--- ssts-web/src/main/webapp/disinfectsystem/reportforms/supplyRoomQualityQuota.jsp (revision 0)
+++ ssts-web/src/main/webapp/disinfectsystem/reportforms/supplyRoomQualityQuota.jsp (revision 22467)
@@ -0,0 +1,36 @@
+<%@page contentType="text/html; charset=UTF-8"%>
+<%@include file="/common/taglibs.jsp"%>
+<%@include file="/common/includeExtJsAndCss.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<%-- 年份时间控件 --%>
+
+
+<%-- 月份时间控件 --%>
+
+
+<%--多选下拉框--%>
+
+
+
+
+
+
+供应室护理质量指标统计表
+
+
+
+
+
+
\ No newline at end of file
Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java
===================================================================
diff -u -r21739 -r22467
--- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java (.../JasperreportsAction.java) (revision 21739)
+++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java (.../JasperreportsAction.java) (revision 22467)
@@ -333,6 +333,16 @@
if (StringUtils.isNotBlank(queryYear) && StringUtils.isNotBlank(departCoding)) {
return jasperReportManager.getQualityControlOfClinic(queryYear, departCoding);
}
+ } else if("supplyRoomQualityQuota".equals(reportName)){ //供应室护理质量指标统计表
+ String departCoding = StrutsParamUtils.getPraramValue("departCoding", "");
+ String queryYear = StrutsParamUtils.getPraramValue("queryYear", "");
+ String queryMonth = StrutsParamUtils.getPraramValue("queryMonth", "");
+ String queryScope = StrutsParamUtils.getPraramValue("queryScope", "");
+ String queryTime = "月".equals(queryScope) ? queryYear : queryMonth;
+
+ if (StringUtils.isNotBlank(departCoding) && StringUtils.isNotBlank(queryScope) && StringUtils.isNotBlank(queryTime)) {
+ return jasperReportManager.getSupplyRoomQualityQuota(departCoding, queryScope, queryTime);
+ }
} else if (reportName.equals("quotaReprot")) {// 十八项指标
String queryYear = StrutsParamUtils.getPraramValue("queryYear", "");
String departCoding = StrutsParamUtils.getPraramValue("departCoding", "");
@@ -1300,6 +1310,11 @@
map.put("title", title);
}else if("qualityControlOfClinic".equals(reportName)){ //临床护理质量管理与控制指标
map.put("title", "临床护理质量管理与控制指标");
+ } else if("supplyRoomQualityQuota".equals(reportName)){ //临床护理质量管理与控制指标
+ String queryYear = StrutsParamUtils.getPraramValue("queryYear", "");
+ String queryMonth = StrutsParamUtils.getPraramValue("queryMonth", "");
+ String queryScope = StrutsParamUtils.getPraramValue("queryScope", "");
+ map.put("title", String.format("供应室护理质量指标统计表(%s)", "月".equals(queryScope) ? queryYear : queryMonth));
} else if (reportName.equals("quotaReprot")) {// 十八项指标
map.put("title", "十八项指标分析报表");
// return getQuotaDataSource();
Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java
===================================================================
diff -u -r21938 -r22467
--- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 21938)
+++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 22467)
@@ -34,9 +34,11 @@
import net.sf.json.JSONObject;
import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.MapUtils;
import org.apache.commons.collections4.Predicate;
import org.apache.commons.collections4.Transformer;
import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.log4j.Logger;
@@ -185,6 +187,7 @@
import com.forgon.disinfectsystem.jasperreports.javabeansource.SterilizingStove;
import com.forgon.disinfectsystem.jasperreports.javabeansource.SterilizingStove_child;
import com.forgon.disinfectsystem.jasperreports.javabeansource.SummaryUseRecordForGoodsVO;
+import com.forgon.disinfectsystem.jasperreports.javabeansource.SupplyRoomQualityQuota;
import com.forgon.disinfectsystem.jasperreports.javabeansource.TousseApplyDepartment;
import com.forgon.disinfectsystem.jasperreports.javabeansource.TousseApplyDepartment_Child;
import com.forgon.disinfectsystem.jasperreports.javabeansource.TousseApplySummary;
@@ -19157,6 +19160,187 @@
return rsMap1;
}
+ /**
+ * 获取无菌物品数.
+ * @param departmentCode 处理供应室的科室编码
+ * @param date 查询的时间范围,如果queryScope=月,则为yyyy,如果queryScope=日,则为yyyy-mm
+ * @param queryScope 查询的精度(月/天)
+ * @return
+ */
+ private Map getSterileArticles(String departmentCode, String date, String queryScope) {
+ Map map = new HashMap();
+ if (StringTools.isNotBlank(departmentCode) && StringTools.isNotBlank(date)) {
+ String format = "";
+ String startTime = "";
+ String endTime = "";
+
+ List firstDayToLastDay = new ArrayList();
+ if (SupplyRoomQualityQuota.DAY.endsWith(queryScope)) {
+ firstDayToLastDay = ForgonDateUtils.getFirstDayToLastDay(date);
+ format = "day";
+ startTime = firstDayToLastDay.get(0) + " 00:00:00";
+ endTime = firstDayToLastDay.get(firstDayToLastDay.size() - 1) + " 23:59:59";
+ } else {
+ format = "mm";
+ startTime = date + "-01-01 00:00:00";
+ endTime = getNextYear(date) + " 00:00:00";
+ }
+
+ String sql = String.format("select temp.dateTime dateTime,count(*) amount from("
+ + "select %s dateTime "
+ + "from SterilizationRecord sr join sterilization_tousseInstance st on st.sterilizationRecord_id=sr.id "
+ + "join TousseInstance ti on ti.id=st.tousseInstance_id "
+ + "where sr.status<>'%s' and sr.orgUnitCoding='%s' and %s "
+ + "union all "
+ + "select %s dateTime "
+ + "from SterilizationRecord sr join sterilization_reviewed sre on sre.sterilizationRecord_id=sr.id "
+ + "join ReviewedBasket rb on rb.id=sre.reviewedBasket_id "
+ + "join TousseInstance ti on ti.reviewBasket_id=rb.id "
+ + "where sr.status<>'%s' and sr.orgUnitCoding='%s' and %s "
+ + "union all "
+ + "select %s dateTime from TousseInstance ti join TousseDefinition td on td.id=ti.tousseDefinition_id "
+ + "where ti.orgUnitCoding='%s' and td.isSterile='%s' and td.tousseType='%s' and %s "
+ + ") temp group by temp.dateTime",
+ dateQueryAdapter.dateConverAdapter3("sr.endDate", format), SterilizationRecord.STERILIZATION_STATUS_FAILURE, departmentCode, dateQueryAdapter.dateAreaSql("sr.endDate", startTime, endTime)
+ ,dateQueryAdapter.dateConverAdapter3("sr.endDate", format), SterilizationRecord.STERILIZATION_STATUS_FAILURE, departmentCode, dateQueryAdapter.dateAreaSql("sr.endDate", startTime, endTime)
+ ,dateQueryAdapter.dateConverAdapter3("ti.reviewTime", format), departmentCode, Constants.STR_NO, TousseDefinition.PACKAGE_TYPE_DISINFECTION, dateQueryAdapter.dateAreaSql("ti.reviewTime", startTime, endTime)
+ );
+ ResultSet rs = objectDao.executeSql(sql);
+ try {
+ while (rs.next()) {
+ String month = StringTools.defaultString(rs.getString("dateTime"));;
+ int amount = rs.getInt("amount");
+ map.put(month, amount);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ DatabaseUtil.closeResultSetAndStatement(rs);
+ }
+ if (SupplyRoomQualityQuota.DAY.endsWith(queryScope)) {
+ map = convertEveryDay(map, firstDayToLastDay);
+ } else {
+ map = convertMonthly(map);
+ }
+ }
+ return map;
+ }
+
+
+ /**
+ * 获取器械清洗数.
+ * @param departmentCode 处理供应室的科室编码
+ * @param date 查询的时间范围,如果queryScope=月,则为yyyy,如果queryScope=日,则为yyyy-mm
+ * @param queryScope 查询的精度(月/天)
+ * @return
+ */
+ private Map getWashSumAmount(String departmentCode, String date, String queryScope) {
+ Map map = new HashMap();
+ if (StringTools.isNotBlank(departmentCode) && StringTools.isNotBlank(date)) {
+ String format = "";
+ String startTime = "";
+ String endTime = "";
+
+ List firstDayToLastDay = new ArrayList();
+ if (SupplyRoomQualityQuota.DAY.endsWith(queryScope)) {
+ firstDayToLastDay = ForgonDateUtils.getFirstDayToLastDay(date);
+ format = "day";
+ startTime = firstDayToLastDay.get(0) + " 00:00:00";
+ endTime = firstDayToLastDay.get(firstDayToLastDay.size() - 1) + " 23:59:59";
+ } else {
+ format = "mm";
+ startTime = date + "-01-01 00:00:00";
+ endTime = getNextYear(date) + " 00:00:00";
+ }
+
+ String sql = "select " + dateQueryAdapter.dateConverAdapter3("wr.endDate", format)
+ + " dateTime,sum(wr.washMaterialAmount-wr.disinfectMaterialAmount-wr.secondWashForeignAmount) amount "
+ + "from WashAndDisinfectRecord wr where " + dateQueryAdapter.dateAreaSql("wr.endDate", startTime, endTime)
+ + " and wr.orgUnitCoding='"+departmentCode+"' "
+ + " group by " + dateQueryAdapter.dateConverAdapter3("wr.endDate", format);
+
+ ResultSet rs = objectDao.executeSql(sql);
+ try {
+ while (rs.next()) {
+ String month = StringTools.defaultString(rs.getString("dateTime"));;
+ int amount = rs.getInt("amount");
+ map.put(month, amount);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ DatabaseUtil.closeResultSetAndStatement(rs);
+ }
+ if (SupplyRoomQualityQuota.DAY.endsWith(queryScope)) {
+ map = convertEveryDay(map, firstDayToLastDay);
+ } else {
+ map = convertMonthly(map);
+ }
+ }
+ return map;
+ }
+
+ /**
+ * 获取每个月的灭菌总数.
+ * @param departmentCode 处理供应室的科室编码
+ * @param date 查询的时间范围,如果queryScope=月,则为yyyy,如果queryScope=日,则为yyyy-mm
+ * @param queryScope 查询的精度(月/天)
+ * @return
+ */
+ private Map getSterilizationAmount(String departmentCode, String date, String queryScope) {
+ Map map = new HashMap();
+ if (StringTools.isNotBlank(departmentCode) && StringTools.isNotBlank(date)) {
+ String format = "";
+ String startTime = "";
+ String endTime = "";
+
+ List firstDayToLastDay = new ArrayList();
+ if (SupplyRoomQualityQuota.DAY.endsWith(queryScope)) {
+ firstDayToLastDay = ForgonDateUtils.getFirstDayToLastDay(date);
+ format = "day";
+ startTime = firstDayToLastDay.get(0) + " 00:00:00";
+ endTime = firstDayToLastDay.get(firstDayToLastDay.size() - 1) + " 23:59:59";
+ } else {
+ format = "mm";
+ startTime = date + "-01-01 00:00:00";
+ endTime = getNextYear(date) + " 00:00:00";
+ }
+
+ String sql = "select temp.dateTime dateTime,count(*) amount from(";
+ sql += String.format("select %s dateTime from SterilizationRecord sr,sterilization_tousseInstance st,TousseInstance ti "
+ + "where sr.id = st.sterilizationRecord_id and st.tousseInstance_id = ti.id "
+ + "and sr.orgUnitCoding='%s' and %s and sr.status<>'%s' ",
+ dateQueryAdapter.dateConverAdapter3("sr.endDate", format),
+ departmentCode, dateQueryAdapter.dateAreaSql("sr.endDate", startTime, endTime), SterilizationRecord.STERILIZATION_STATUS_FAILURE);
+ sql += " union all ";
+ sql += String.format("select %s dateTime 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='%s' and %s and sr.status<>'%s' ",
+ dateQueryAdapter.dateConverAdapter3("sr.endDate", format),
+ departmentCode, dateQueryAdapter.dateAreaSql("sr.endDate", startTime, endTime), SterilizationRecord.STERILIZATION_STATUS_FAILURE);
+ sql += ") temp group by temp.dateTime";
+
+ ResultSet rs = objectDao.executeSql(sql);
+ try {
+ while (rs.next()) {
+ String month = StringTools.defaultString(rs.getString("dateTime"));;
+ int amount = rs.getInt("amount");
+ map.put(month, amount);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ DatabaseUtil.closeResultSetAndStatement(rs);
+ }
+ if (SupplyRoomQualityQuota.DAY.endsWith(queryScope)) {
+ map = convertEveryDay(map, firstDayToLastDay);
+ } else {
+ map = convertMonthly(map);
+ }
+ }
+ return map;
+ }
+
/**
* 计算QualityControlOfClinic的某一项的数据
@@ -19216,34 +19400,41 @@
/**
* 获取合格率或者不合格率
* @param percentOfPass 是否计算合格率(为true则计算合格率,或者计算不合格率)
- * @param value1 总数
- * @param value2 不合格数
+ * @param sumAmount 总数
+ * @param unqualifiedAmount 不合格数
* @return
*/
- private String getBHGLStr(boolean percentOfPass, Integer value1, Integer value2) {
- String v = "0%";
+ private String getBHGLStr(boolean percentOfPass, Integer sumAmount, Integer unqualifiedAmount) {
+ if (sumAmount == null || unqualifiedAmount == null) {
+ throw new RuntimeException("参数异常!");
+ }
+ String result = "0%";
+
if (percentOfPass) {
- if (value1 == 0) {
- v = "0%";
- } else if (value2 == 0) {
- v = "100%";
- } else if (value1 >= value2) {
- Integer temp = value1 - value2;
- v = MathTools.div(temp, value1).setScale(4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).doubleValue() + "%";
+ if (sumAmount == 0) {
+ result = "0%";
+ } else if (unqualifiedAmount == 0) {
+ result = "100%";
+ } else if (sumAmount >= unqualifiedAmount) {
+ Integer temp = sumAmount - unqualifiedAmount;
+ result = MathTools.div(temp, sumAmount).setScale(4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).doubleValue() + "%";
}
} else {
- if (value1 == 0) {
- v = "0%";
- } else if (value2 == 0) {
- v = "0%";
- } else if (value1 >= value2) {
- v = MathTools.div(value2, value1).setScale(4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).doubleValue() + "%";
+ if (sumAmount == 0) {
+ result = "0%";
+ } else if (unqualifiedAmount == 0) {
+ result = "0%";
+ } else if (sumAmount >= unqualifiedAmount) {
+ result = MathTools.div(unqualifiedAmount, sumAmount).setScale(4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).doubleValue() + "%";
}
}
- return v;
+ return result;
}
+
+
+
/**
* 设置QualityControlOfClinic的某个指标的默认值
* @param quotaName 指标名称
@@ -19313,5 +19504,419 @@
}
return list;
}
+
+ /**
+ * 获取每个月的不合格数.
+ * @param tousse 是否器械包(如果为true则取质量监测登记的器械包,反之取材料)
+ * @param departmentCode 处理供应室的科室编码
+ * @param unqualifiedSource 不合格数来源
+ * @param date 查询的时间范围,如果queryScope=月,则为yyyy,如果queryScope=日,则为yyyy-mm
+ * @param qqueryScope 查询的精度(月/天)
+ * @return
+ */
+ private Map getUnqualified(
+ boolean tousse, String departmentCode, String[] unqualifiedSource, String date, String queryScope) {
+ Map map = new HashMap();
+ if (StringTools.isNotBlank(departmentCode) && ArrayUtils.isNotEmpty(unqualifiedSource) && StringTools.isNotBlank(date)) {
+ String format = "";
+ String startTime = "";
+ String endTime = "";
+
+ List firstDayToLastDay = new ArrayList();
+ if (SupplyRoomQualityQuota.DAY.endsWith(queryScope)) {
+ firstDayToLastDay = ForgonDateUtils.getFirstDayToLastDay(date);
+ format = "day";
+ startTime = firstDayToLastDay.get(0) + " 00:00:00";
+ endTime = firstDayToLastDay.get(firstDayToLastDay.size() - 1) + " 23:59:59";
+ } else {
+ format = "mm";
+ startTime = date + "-01-01 00:00:00";
+ endTime = getNextYear(date) + " 00:00:00";
+ }
+
+ String sql = "select " + dateQueryAdapter.dateConverAdapter3("qmi.dateTime", format)
+ + " dateTime,sum(qmg.amount) amount "
+ + "from QualityMonitoringInstance qmi "
+ + "join FormInstance fi on fi.id=qmi.id "
+ + "join FormDefinition fd on fd.id=fi.formDefinition_id "
+ + "join QualityMonitoringGoods qmg on qmg.qualityMonitoringInstance_id=fi.id "
+ + "where " + (tousse ? " qmg.tousseName is not null " : " (qmg.tousseName is null or qmg.tousseName='') ")
+ + "and fd.formType = '" + FormDefinition.FOMRTYPE_QUALITYMONITORING+ "' "
+ + "and fi.orgUnitCoding = '"+departmentCode+"' " + SqlUtils.get_InSql("fd.formName", unqualifiedSource)
+ + " and " + dateQueryAdapter.dateAreaSql("qmi.datetime", startTime, endTime)
+ + "group by " + dateQueryAdapter.dateConverAdapter3("qmi.dateTime", format);
+
+ ResultSet rs = objectDao.executeSql(sql);
+ try {
+ while (rs.next()) {
+ String month = StringTools.defaultString(rs.getString("dateTime"));;
+ int amount = rs.getInt("amount");
+ map.put(month, amount);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ DatabaseUtil.closeResultSetAndStatement(rs);
+ }
+ if (SupplyRoomQualityQuota.DAY.endsWith(queryScope)) {
+ map = convertEveryDay(map, firstDayToLastDay);
+ } else {
+ map = convertMonthly(map);
+ }
+ }
+ return map;
+ }
+ /**
+ * 计算合格率或者不合格率.
+ * @param rsMap1 合格数或者不合格数
+ * @param rsMap2 总数
+ * @param specifyKey 指定的key(如果指定了则只算指定key的那个比率即可,否则全部都需要算)
+ * @return
+ */
+ private void getRatio(Map rsMap1, Map rsMap2, String specifyKey) {
+ if (MapUtils.isNotEmpty(rsMap1) && MapUtils.isNotEmpty(rsMap2)) {
+ if (StringTools.isNotBlank(specifyKey)) {
+ Integer value1 = MapUtils.getIntValue(rsMap1, specifyKey, 0);
+ Integer value2 = MapUtils.getIntValue(rsMap2, specifyKey, 0);
+ String result = "0%";
+ if (value1 == 0 || value2 == 0) { //如果有一个为0则合格率或者不合格率都为0%
+ result = "0%";
+ } else {
+ result = MathTools.div(value1, value2).setScale(4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).doubleValue() + "%";
+ }
+ rsMap1.put(specifyKey + SupplyRoomQualityQuota.RATIO, result);
+ } else {
+ Set keySet = rsMap2.keySet();
+ for (String key : keySet) {
+ Integer value1 = MapUtils.getIntValue(rsMap1, key, 0);
+ Integer value2 = MapUtils.getIntValue(rsMap2, key, 0);
+ String result = "0%";
+ if (value1 == 0 || value2 == 0) { //如果有一个为0则合格率或者不合格率都为0%
+ result = "0%";
+ } else {
+ result = MathTools.div(value1, value2).setScale(4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).doubleValue() + "%";
+ }
+ rsMap1.put(key + SupplyRoomQualityQuota.RATIO, result);
+ }
+ }
+ }
+ }
+
+
+ /**
+ * 获取合格数(总数 - 不合格).
+ * @param sumAmountMap 总数的集合
+ * @param unqualifiedAmountMap 不合格数集合
+ * @return
+ */
+ private Map getQualifiedAmountMap(Map sumAmountMap, Map unqualifiedAmountMap) {
+ Map map = new HashMap();
+ if (MapUtils.isNotEmpty(sumAmountMap) && MapUtils.isNotEmpty(unqualifiedAmountMap)) {
+ Set keySet = sumAmountMap.keySet();
+ for (String date : keySet) {
+ Integer sumAmount = MapUtils.getIntValue(sumAmountMap, date, 0);
+ Integer unqualifiedAmount = MapUtils.getIntValue(unqualifiedAmountMap, date, 0);
+ map.put(date, sumAmount - unqualifiedAmount);
+ }
+ }
+ return map;
+ }
+
+ /**
+ * 获取SupplyRoomQualityQuota(按月统计的).
+ * @param list 报表的数据源作为输出参数
+ * @param result 每月的值
+ * @param quotaName 行名称(即:指标名称)
+ * @param rowSerialNumber 行序列号
+ */
+ private void getSupplyRoomQualityQuota(List list, Map result, String quotaName, int rowSerialNumber) {
+ int columnSerialNumber = 0;
+ for (int i = 1; i <= 12; i++) {
+ String key = "";
+ if (i > 9) {
+ key = "" + i;
+ } else {
+ key = "0" + i;
+ }
+
+ String value = MapUtils.getString(result, key, "0");
+ SupplyRoomQualityQuota vo = new SupplyRoomQualityQuota((i + "月"), ++ columnSerialNumber, quotaName, rowSerialNumber, value);
+ list.add(vo);
+
+ String ratio = MapUtils.getString(result, key + SupplyRoomQualityQuota.RATIO, "");
+ SupplyRoomQualityQuota ratioVo = new SupplyRoomQualityQuota(SupplyRoomQualityQuota.RATIO, ++ columnSerialNumber, quotaName, rowSerialNumber, ratio);
+ list.add(ratioVo);
+ }
+
+ /**
+ * 年合计
+ */
+ String value = MapUtils.getString(result, SupplyRoomQualityQuota.TOTAL, "0");
+ SupplyRoomQualityQuota vo = new SupplyRoomQualityQuota(SupplyRoomQualityQuota.TOTAL, ++ columnSerialNumber, quotaName, rowSerialNumber, value);
+ list.add(vo);
+
+ String ratio = MapUtils.getString(result, SupplyRoomQualityQuota.TOTAL + SupplyRoomQualityQuota.RATIO, "");
+ SupplyRoomQualityQuota ratioVo = new SupplyRoomQualityQuota(SupplyRoomQualityQuota.RATIO, ++ columnSerialNumber, quotaName, rowSerialNumber, ratio);
+ list.add(ratioVo);
+ }
+
+
+ /**
+ * 获取SupplyRoomQualityQuota(按日统计的).
+ * @param list 报表的数据源作为输出参数
+ * @param result 每月的值
+ * @param quotaName 行名称(即:指标名称)
+ * @param rowSerialNumber 行序列号
+ * @param firstDayToLastDay 某个月的所有天数
+ */
+ private void getSupplyRoomQualityQuota(List list, Map result, String quotaName, int rowSerialNumber, List firstDayToLastDay) {
+ if (CollectionUtils.isNotEmpty(firstDayToLastDay)) {
+ int columnSerialNumber = 0;
+ int size = firstDayToLastDay.size();
+ for (int i = 1; i <= size; i++) {
+ String key = i + "";
+ String value = MapUtils.getString(result, key, "0");
+ SupplyRoomQualityQuota vo = new SupplyRoomQualityQuota(key, ++ columnSerialNumber, quotaName, rowSerialNumber, value);
+ list.add(vo);
+ }
+
+ /**
+ * 月合计
+ */
+ String value = MapUtils.getString(result, SupplyRoomQualityQuota.TOTAL, "0");
+ SupplyRoomQualityQuota vo = new SupplyRoomQualityQuota(SupplyRoomQualityQuota.TOTAL, ++ columnSerialNumber, quotaName, rowSerialNumber, value);
+ list.add(vo);
+
+ String ratio = MapUtils.getString(result, (SupplyRoomQualityQuota.TOTAL + SupplyRoomQualityQuota.RATIO), "");
+ SupplyRoomQualityQuota ratioVo = new SupplyRoomQualityQuota(SupplyRoomQualityQuota.RATIO, ++ columnSerialNumber, quotaName, rowSerialNumber, ratio);
+ list.add(ratioVo);
+ }
+ }
+
+
+ /**
+ * 把结果集map每个月都转化一下(即:没有数据的数量填充为0).
+ * @param result 结果集
+ * @return
+ */
+ private Map convertMonthly(Map result) {
+ if (result == null) {
+ result = new HashMap();
+ }
+
+ Integer total = new Integer(0);
+ for (int i = 1; i <= 12; i++) {
+ String key = "";
+ if (i > 9) {
+ key = "" + i;
+ } else {
+ key = "0" + i;
+ }
+ Integer amount = MapUtils.getIntValue(result, key, 0);
+ result.put(key, amount);
+ total += amount;
+ }
+ result.put(SupplyRoomQualityQuota.TOTAL, total);
+ return result;
+ }
+
+ /**
+ * 把结果集map每一天都转化一下(即:没有数据的数量填充为0).
+ * @param result 结果集
+ * @param firstDayToLastDay 某个月的全部天数
+ * @return
+ */
+ private Map convertEveryDay(Map result, List firstDayToLastDay) {
+ if (result == null) {
+ result = new HashMap();
+ }
+
+ if (CollectionUtils.isNotEmpty(firstDayToLastDay)) {
+ Integer total = new Integer(0);
+ int size = firstDayToLastDay.size();
+ for (int i = 1; i <= size; i++) {
+ String key = i + "";
+ Integer amount = MapUtils.getIntValue(result, key, 0);
+ result.put(key, amount);
+ total += amount;
+ }
+ result.put(SupplyRoomQualityQuota.TOTAL, total);
+ }
+ return result;
+ }
+
+ /**
+ * 获取SupplyRoomQualityQuota集合(按月统计).
+ * @param departmentCode 供应室的科室编码
+ * @param year 查询年份
+ * @return
+ */
+ private List getSupplyRoomQualityQuotaByMonth(String departmentCode, String year) {
+ List list = new ArrayList();
+
+ String[] sterileArticlesUnqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_STERILEUNQUALIFIEDSOURCE, ""); //无菌物品不合格数据来源
+ String[] washSumUnqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_WASHUNQUALIFIEDSOURCE, ""); //器械清洗不合格数据来源
+ String[] sterilizationUnqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_PACKINGUNQUALIFIEDSOURCE, ""); //包装不合格数据来源
+ String[] wetPacketUnqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_WETPACKETSUNQUALIFIEDSOURCE, ""); //湿包数据来源
+
+ int rowSerialNumber = 0; //行号
+
+ /**
+ * 1、灭菌物品的统计
+ */
+ //每个月的灭菌物品
+ Map sterileArticles = getSterileArticles(departmentCode, year, SupplyRoomQualityQuota.MONTH);
+ //每个月的不合格的灭菌物品
+ Map sterileArticlesForUnqualified = getUnqualified(true, departmentCode, sterileArticlesUnqualifiedSource, year, SupplyRoomQualityQuota.MONTH);
+ //每个月的合格的灭菌物品
+ Map sterileArticlesForQualified = getQualifiedAmountMap(sterileArticles, sterileArticlesForUnqualified);
+
+ //得到合格率
+ getRatio(sterileArticlesForQualified, sterileArticles, null);
+
+ getSupplyRoomQualityQuota(list, sterileArticlesForQualified, SupplyRoomQualityQuota.STERILEARTICLES_QUALIFIED, ++ rowSerialNumber);
+ getSupplyRoomQualityQuota(list, sterileArticles, SupplyRoomQualityQuota.STERILEARTICLES_TOTAL, ++ rowSerialNumber);
+
+ /**
+ * 2、清洗器械的统计
+ */
+ //每个月的器械清洗数
+ Map washSumAmount = getWashSumAmount(departmentCode, year, SupplyRoomQualityQuota.MONTH);
+ //每个月的不合格的器械清洗数
+ Map washSumAmountForUnqualified = getUnqualified(false, departmentCode, washSumUnqualifiedSource, year, SupplyRoomQualityQuota.MONTH);
+ //每个月的合格的器械清洗数
+ Map washSumAmountForQualified = getQualifiedAmountMap(washSumAmount, washSumAmountForUnqualified);
+
+ //得到合格率
+ getRatio(washSumAmountForQualified, washSumAmount, null);
+
+ getSupplyRoomQualityQuota(list, washSumAmountForQualified, SupplyRoomQualityQuota.WASH_QUALIFIED, ++ rowSerialNumber);
+ getSupplyRoomQualityQuota(list, washSumAmount, SupplyRoomQualityQuota.WASH_TOTAL, ++ rowSerialNumber);
+
+ /**
+ * 3、灭菌包的统计
+ */
+ //每个月的灭菌包数
+ Map sterilizationSumAmount = getSterilizationAmount(departmentCode, year, SupplyRoomQualityQuota.MONTH);
+ //每个月的不合格的灭菌包数
+ Map sterilizationForUnqualified = getUnqualified(true, departmentCode, sterilizationUnqualifiedSource, year, SupplyRoomQualityQuota.MONTH);
+ //每个月的合格的器械清洗数
+ Map sterilizationForQualified = getQualifiedAmountMap(sterilizationSumAmount, sterilizationForUnqualified);
+
+ //得到合格率
+ getRatio(sterilizationForQualified, sterilizationSumAmount, null);
+
+ getSupplyRoomQualityQuota(list, sterilizationForQualified, SupplyRoomQualityQuota.STERILE_QUALIFIED, ++ rowSerialNumber);
+ getSupplyRoomQualityQuota(list, sterilizationSumAmount, SupplyRoomQualityQuota.STERILE_TOTAL, ++ rowSerialNumber);
+
+ /**
+ * 4、湿包的统计
+ */
+ //每个月的不合格的灭菌包数
+ Map wetPacketAmount = getUnqualified(true, departmentCode, wetPacketUnqualifiedSource, year, SupplyRoomQualityQuota.MONTH);
+
+ //得到湿包率
+ getRatio(wetPacketAmount, sterilizationSumAmount, null);
+
+ getSupplyRoomQualityQuota(list, wetPacketAmount, SupplyRoomQualityQuota.WETPACKETS_TOTAL, ++ rowSerialNumber);
+ return list;
+ }
+
+ /**
+ * 获取SupplyRoomQualityQuota集合(按天统计).
+ * @param departmentCode 供应室的科室编码
+ * @param month 查询月份
+ * @return
+ */
+ public List getSupplyRoomQualityQuotaByDay(String departmentCode, String month) {
+ List list = new ArrayList();
+
+ String[] sterileArticlesUnqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_STERILEUNQUALIFIEDSOURCE, ""); //无菌物品不合格数据来源
+ String[] washSumUnqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_WASHUNQUALIFIEDSOURCE, ""); //器械清洗不合格数据来源
+ String[] sterilizationUnqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_PACKINGUNQUALIFIEDSOURCE, ""); //包装不合格数据来源
+ String[] wetPacketUnqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_WETPACKETSUNQUALIFIEDSOURCE, ""); //湿包数据来源
+
+ int rowSerialNumber = 0; //行号
+ List firstDayToLastDay = ForgonDateUtils.getFirstDayToLastDay(month); //当月的所有天数
+
+ /**
+ * 1、灭菌物品的统计
+ */
+ //每天的灭菌物品
+ Map sterileArticles = getSterileArticles(departmentCode, month, SupplyRoomQualityQuota.DAY);
+ //每天的不合格的灭菌物品
+ Map sterileArticlesForUnqualified = getUnqualified(true, departmentCode, sterileArticlesUnqualifiedSource, month, SupplyRoomQualityQuota.DAY);
+ //每天的合格灭菌物品
+ Map sterileArticlesForQualified = getQualifiedAmountMap(sterileArticles, sterileArticlesForUnqualified);
+
+ //得到合格率
+ getRatio(sterileArticlesForQualified, sterileArticles, SupplyRoomQualityQuota.TOTAL);
+
+ getSupplyRoomQualityQuota(list, sterileArticlesForQualified, SupplyRoomQualityQuota.STERILEARTICLES_QUALIFIED, ++ rowSerialNumber, firstDayToLastDay);
+ getSupplyRoomQualityQuota(list, sterileArticles, SupplyRoomQualityQuota.STERILEARTICLES_TOTAL, ++ rowSerialNumber, firstDayToLastDay);
+
+
+ /**
+ * 2、清洗器械的统计
+ */
+ //每天的器械清洗数
+ Map washSumAmount = getWashSumAmount(departmentCode, month, SupplyRoomQualityQuota.DAY);
+ //每天的不合格的器械清洗数
+ Map washSumAmountForUnqualified = getUnqualified(false, departmentCode, washSumUnqualifiedSource, month, SupplyRoomQualityQuota.DAY);
+ //每天的合格的器械清洗数
+ Map washSumAmountForQualified = getQualifiedAmountMap(washSumAmount, washSumAmountForUnqualified);
+
+ //得到合格率
+ getRatio(washSumAmountForQualified, washSumAmount, SupplyRoomQualityQuota.TOTAL);
+
+ getSupplyRoomQualityQuota(list, washSumAmountForQualified, SupplyRoomQualityQuota.WASH_QUALIFIED, ++ rowSerialNumber, firstDayToLastDay);
+ getSupplyRoomQualityQuota(list, washSumAmount, SupplyRoomQualityQuota.WASH_TOTAL, ++ rowSerialNumber, firstDayToLastDay);
+
+ /**
+ * 3、灭菌包的统计
+ */
+ //每天的灭菌包数
+ Map sterilizationSumAmount = getSterilizationAmount(departmentCode, month, SupplyRoomQualityQuota.DAY);
+ //每天的不合格的灭菌包数
+ Map sterilizationForUnqualified = getUnqualified(true, departmentCode, sterilizationUnqualifiedSource, month, SupplyRoomQualityQuota.DAY);
+ //每天的合格的器械清洗数
+ Map sterilizationForQualified = getQualifiedAmountMap(sterilizationSumAmount, sterilizationForUnqualified);
+
+ //得到合格率
+ getRatio(sterilizationForQualified, sterilizationSumAmount, SupplyRoomQualityQuota.TOTAL);
+
+ getSupplyRoomQualityQuota(list, sterilizationForQualified, SupplyRoomQualityQuota.STERILE_QUALIFIED, ++ rowSerialNumber, firstDayToLastDay);
+ getSupplyRoomQualityQuota(list, sterilizationSumAmount, SupplyRoomQualityQuota.STERILE_TOTAL, ++ rowSerialNumber, firstDayToLastDay);
+
+ /**
+ * 4、湿包的统计
+ */
+ //每天的不合格的灭菌包数
+ Map wetPacketAmount = getUnqualified(true, departmentCode, wetPacketUnqualifiedSource, month, SupplyRoomQualityQuota.DAY);
+
+ //得到湿包率
+ getRatio(wetPacketAmount, sterilizationSumAmount, SupplyRoomQualityQuota.TOTAL);
+
+ getSupplyRoomQualityQuota(list, wetPacketAmount, SupplyRoomQualityQuota.WETPACKETS_TOTAL, ++ rowSerialNumber, firstDayToLastDay);
+
+ return list;
+ }
+
+
+
+ @Override
+ public List getSupplyRoomQualityQuota(
+ String departmentCode, String queryScope, String queryTime) {
+ List list = new ArrayList();
+ if (StringUtils.isNotBlank(departmentCode) && StringUtils.isNotBlank(queryScope) && StringUtils.isNotBlank(queryTime)) {
+ if (SupplyRoomQualityQuota.MONTH.equals(queryScope)) {
+ list = getSupplyRoomQualityQuotaByMonth(departmentCode, queryTime);
+ } else if (SupplyRoomQualityQuota.DAY.equals(queryScope)) {
+ list = getSupplyRoomQualityQuotaByDay(departmentCode, queryTime);
+ }
+ }
+ return list;
+ }
+
}
Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/basedatamanager/reportoption/GoodsOptionManager.java
===================================================================
diff -u -r21579 -r22467
--- ssts-basedata/src/main/java/com/forgon/disinfectsystem/basedatamanager/reportoption/GoodsOptionManager.java (.../GoodsOptionManager.java) (revision 21579)
+++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/basedatamanager/reportoption/GoodsOptionManager.java (.../GoodsOptionManager.java) (revision 22467)
@@ -23,6 +23,14 @@
public GoodsOption getGoodsOption(String model,String code);
/**
+ * 根据"配置的模式"和"科室编码"获取在GoodsOption配置的值的集合(如果没配置则返回空).
+ * @param model 配置的模式
+ * @param code 科室编码
+ * @return
+ */
+ public String[] getGoodsOptionValue(String model,String departmentCode);
+
+ /**
* 保存不合格数据来源的配置.
* @param sterilePercentOfPass 无菌物品不合格数据来源
* @param washPercentOfPass 器械清洗不合格数据来源
Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/supplyRoomQualityQuota.js
===================================================================
diff -u
--- ssts-web/src/main/webapp/disinfectsystem/reportforms/supplyRoomQualityQuota.js (revision 0)
+++ ssts-web/src/main/webapp/disinfectsystem/reportforms/supplyRoomQualityQuota.js (revision 22467)
@@ -0,0 +1,201 @@
+var form;
+var entityName = "供应室护理质量指标统计表";
+
+var supplyRoomStore = new Ext.data.Store({
+ autoLoad: true,
+ proxy : new Ext.data.HttpProxy({
+ url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!loadSupplyRoomConfigRoom.do',
+ method : 'POST'
+ }),
+ baseParams :{type:"12"},
+ reader : new Ext.data.JsonReader({
+ fields : [
+ {name : 'id'},
+ {name : 'departId'},
+ {name : 'name'}
+
+ ]
+ }),
+ listeners:{
+ load :function (thiz,records,options ){
+ if(records.length >0){
+ Ext.getCmp('querySupplyRoom').setValue(records[0].data.departId);
+ }
+ }
+ }
+});
+
+
+var myMask;
+function reloadReport(){
+ if (!form.getForm().isValid()) {
+ showResult('请正确填写表单各值');
+ return false;
+ }
+
+ var queryYear = $Id('yearSearch').value;
+ var queryMonth = $Id('monthSearch').value;
+ var departCoding = Ext.getCmp('querySupplyRoom').getValue();
+ var queryScope = Ext.getCmp('queryScope').getValue(); //查询范围
+ myMask = new Ext.LoadMask(Ext.getBody(), {
+ msg: '正在加载,请稍候!',
+ removeMask: true
+ });
+ myMask.show();
+ window.open(WWWROOT + "/jasperreports/jasperreportsAction!createReportFromJavaBeanSource.do?jasperreportName=supplyRoomQualityQuota.jasper" +
+ "&departCoding=" + departCoding +
+ "&queryYear=" + queryYear +
+ "&queryMonth=" + queryMonth +
+ "&queryScope=" + queryScope +
+ "&reportName=supplyRoomQualityQuota",
+ 'thisIframe','_self');
+}
+
+
+Ext.onReady(function() {
+ Ext.QuickTips.init();
+ // 记录cookie(3步)
+
+ form = new Ext.form.FormPanel({
+ title : entityName,
+ region : 'north',
+ labelAlign : 'right',
+ buttonAlign : 'center',
+ collapsible : true,
+ collapseMode : 'mini',
+ split : true,
+ border : 0,
+ // bodyStyle : 'padding: 10px 10px 0px 10px;',
+ frame : true,
+ bodyStyle : 'padding:0px auto;margin:0px',// padding:1px;padding-top:5px;
+ height : 105,
+ items : [{
+ layout : 'column',
+ height : 40,
+ labelWidth : 70,
+ items : [{
+ width : 150,
+ layout : 'form',
+ labelWidth : 60,
+ items : [
+ new Ext.form.DateField({
+ id:'yearSearch',
+ name : 'yearSearch',
+ fieldLabel : '年分',
+ readOnly : true,
+ allowBlank : false,
+ format:'Y',
+ value : new Date(),
+ anchor : '95%'
+ })
+ ]
+ },{
+ width : 160,
+ layout : 'form',
+ labelWidth : 60,
+ items : [
+ new Ext.form.DateField({
+ id:'monthSearch',
+ name : 'monthSearch',
+ fieldLabel : '月份',
+ readOnly : true,
+ allowBlank : false,
+ format:'Y-m',
+ value : new Date(),
+ anchor : '95%'
+ })
+ ]
+ },{
+ width : 240,
+ layout : 'form',
+ labelWidth : 80,
+ labelSeparator : '选择供应室:',
+ items : [{
+ xtype : 'combo',
+ id : 'querySupplyRoom',
+ name : 'querySupplyRoom',
+ valueField : 'departId',
+ displayField : 'name',
+ allowBlank : false,
+ editable : false,
+ store : supplyRoomStore,
+ forceSelection : true,
+ mode : 'local',
+ triggerAction : 'all',
+ anchor : '95%'
+ }]
+ },{
+ width : 150,
+ layout : 'form',
+ labelWidth : 70,
+ items : [{
+ xtype : 'combo',
+ fieldLabel : '统计范围',
+ id : 'queryScope',
+ name : 'queryScope',
+ valueField : 'value',
+ displayField : 'value',
+ mode : 'local',
+ triggerAction : 'all',
+ value: '月',
+ store : new Ext.data.SimpleStore({
+ data:[['月'],['天']],
+ fields:['value']
+ }),
+ forceSelection : false,
+ allowBlank : false,
+ editable:false,
+ 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('querySupplyRoom').value = "";
+ $Id('yearSearch').value = "";
+ $Id('monthSearch').value = "";
+ }
+ },{
+ xtype : 'button',
+ text : '设置不合格数来源',
+ minWidth : 70,
+ iconCls : 'icon_set',
+ handler : function() {
+ setUnqualifiedSource();
+ }
+ }]
+ });
+
+
+ var reportForm = new Ext.Panel({
+ frame:false,//渲染面板
+ autoScroll:true,//自动显示滚动条
+ collapsible:true,//允许展开和收缩
+ bodyPadding:5,
+ html:''
+ });
+
+ var viewport = new Ext.Viewport({
+ layout : 'border',
+ items : [form, {
+ id:'reportPanel',
+ region : 'center',
+ margins : '0 0 0 0',
+ layout : 'fit',
+ items : reportForm
+ }]
+ });
+
+});
\ No newline at end of file
Index: ssts-web/src/main/webapp/jasperRtp/supplyRoomQualityQuota.jasper
===================================================================
diff -u
Binary files differ
Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/basedatamanager/reportoption/GoodsOptionManagerImpl.java
===================================================================
diff -u -r21579 -r22467
--- ssts-basedata/src/main/java/com/forgon/disinfectsystem/basedatamanager/reportoption/GoodsOptionManagerImpl.java (.../GoodsOptionManagerImpl.java) (revision 21579)
+++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/basedatamanager/reportoption/GoodsOptionManagerImpl.java (.../GoodsOptionManagerImpl.java) (revision 22467)
@@ -96,4 +96,14 @@
return result;
}
+ @Override
+ public String[] getGoodsOptionValue(String model, String departmentCode) {
+ GoodsOption option = getGoodsOption(model, departmentCode);
+ String[] arr = null;
+ if(option != null && StringUtils.isNotBlank(option.getValue())){
+ arr = option.getValue().split(";");
+ }
+ return arr;
+ }
+
}
Index: ssts-web/src/main/webapp/homepage/menuconfigure.js
===================================================================
diff -u -r22405 -r22467
--- ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 22405)
+++ ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 22467)
@@ -544,7 +544,9 @@
singleClickExpand:singleClickExpandTree,
hidden:SSTS_QualityMonitoring_Menu_1,
children:[
- {hidden :SSTS_QualityControlOfClinic,text:"临床护理质量管理与控制指标",href:WWWROOT+'/disinfectsystem/reportforms/qualityControlOfClinic.jsp',hrefTarget:linkTarget,leaf:true},
+ //“临床护理质量管理与控制指标”报表暂时屏蔽,等客户现场确认不用后,应该把相应的业务代码全部删除
+ //{hidden :true,text:"临床护理质量管理与控制指标",href:WWWROOT+'/disinfectsystem/reportforms/qualityControlOfClinic.jsp',hrefTarget:linkTarget,leaf:true},
+ {hidden :SSTS_QualityControlOfClinic,text:"供应室护理质量指标统计表",href:WWWROOT+'/disinfectsystem/reportforms/supplyRoomQualityQuota.jsp',hrefTarget:linkTarget,leaf:true},
{hidden :SSTS_QuotaReport,text:"十八项指标分析报表",href:WWWROOT+'/disinfectsystem/reportforms/quotaReportView.jsp',hrefTarget:linkTarget,leaf:true},
{hidden :SSTS_WorkQualityCountReport,text:"工作质量持续收集统计报表",href:WWWROOT+'/disinfectsystem/reportforms/workQualityCollectionView.jsp',hrefTarget:linkTarget,leaf:true},
{hidden :SSTS_RecycleMaterialDetailReport,text:"回收器械材料明细报表",href:WWWROOT+'/disinfectsystem/reportforms/recycleMaterialDetailView.jsp',hrefTarget:linkTarget,leaf:true},
Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/js/setUnqualifiedSource.js
===================================================================
diff -u -r21579 -r22467
--- ssts-web/src/main/webapp/disinfectsystem/reportforms/js/setUnqualifiedSource.js (.../setUnqualifiedSource.js) (revision 21579)
+++ ssts-web/src/main/webapp/disinfectsystem/reportforms/js/setUnqualifiedSource.js (.../setUnqualifiedSource.js) (revision 22467)
@@ -62,9 +62,9 @@
* 设置不合格数来源.
*/
function setUnqualifiedSource(){
- var sterilePercentOfPassMultiSelectCombo = buildMultiSelectCombo({fieldLabel:'灭菌物品',id:'sterilePercentOfPass',name:'sterilePercentOfPass'});
+ var sterilePercentOfPassMultiSelectCombo = buildMultiSelectCombo({fieldLabel:'无菌物品',id:'sterilePercentOfPass',name:'sterilePercentOfPass'});
var washPercentOfPassMultiSelectCombo = buildMultiSelectCombo({fieldLabel:'器械清洗',id:'washPercentOfPass',name:'washPercentOfPass'});
- var packingPercentOfPassMultiSelectCombo = buildMultiSelectCombo({fieldLabel:'包装',id:'packingPercentOfPass',name:'packingPercentOfPass'});
+ var packingPercentOfPassMultiSelectCombo = buildMultiSelectCombo({fieldLabel:'灭菌包',id:'packingPercentOfPass',name:'packingPercentOfPass'});
var percentOfWetPacketsMultiSelectCombo = buildMultiSelectCombo({fieldLabel:'湿包',id:'percentOfWetPackets',name:'percentOfWetPackets'});
formObj = new Ext.FormPanel({
Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/SupplyRoomQualityQuota.java
===================================================================
diff -u
--- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/SupplyRoomQualityQuota.java (revision 0)
+++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/SupplyRoomQualityQuota.java (revision 22467)
@@ -0,0 +1,106 @@
+package com.forgon.disinfectsystem.jasperreports.javabeansource;
+/**
+ * 供应室护理质量指标统计表的javabean
+ * @author Chenjiaru 2018-02-05
+ *
+ */
+public class SupplyRoomQualityQuota {
+
+ public static String TOTAL = "总数";
+ public static String DAY = "天";
+ public static String MONTH = "月";
+ public static String RATIO = "比率";
+ public static String STERILEARTICLES_QUALIFIED = "无菌物品合格数";
+ public static String STERILEARTICLES_TOTAL = "无菌物品总数";
+ public static String WASH_QUALIFIED = "清洗器械合格件数";
+ public static String WASH_TOTAL = "清洗器械总件数";
+ public static String STERILE_QUALIFIED = "灭菌包合格数";
+ public static String STERILE_TOTAL = "灭菌包总数";
+ public static String WETPACKETS_TOTAL = "湿包数";
+
+
+ /**
+ * 交叉报表的列名称(月份和天)
+ */
+ private String columnName;
+
+ /**
+ * 列名的序号
+ */
+ private Integer columnSerialNumber;
+
+ /**
+ * 交叉报表的行名称
+ */
+ private String rowName;
+
+ /**
+ * 行名的序号
+ */
+ private Integer rowSerialNumber;
+
+ /**
+ * 交叉报表的值
+ */
+ private String value;
+
+ /**
+ * 创建供应室护理质量指标统计表的javabean
+ * @param columnName 交叉报表的列名称(月份和天)
+ * @param columnSerialNumber 列名的序号
+ * @param rowName 交叉报表的行名称
+ * @param rowSerialNumber 行名的序号
+ * @param value 交叉报表的值
+ */
+ public SupplyRoomQualityQuota(String columnName,
+ Integer columnSerialNumber, String rowName,
+ Integer rowSerialNumber, String value) {
+ super();
+ this.columnName = columnName;
+ this.columnSerialNumber = columnSerialNumber;
+ this.rowName = rowName;
+ this.rowSerialNumber = rowSerialNumber;
+ this.value = value;
+ }
+
+ public String getColumnName() {
+ return columnName;
+ }
+
+ public void setColumnName(String columnName) {
+ this.columnName = columnName;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public String getRowName() {
+ return rowName;
+ }
+
+ public void setRowName(String rowName) {
+ this.rowName = rowName;
+ }
+
+ public Integer getColumnSerialNumber() {
+ return columnSerialNumber;
+ }
+
+ public void setColumnSerialNumber(Integer columnSerialNumber) {
+ this.columnSerialNumber = columnSerialNumber;
+ }
+
+ public Integer getRowSerialNumber() {
+ return rowSerialNumber;
+ }
+
+ public void setRowSerialNumber(Integer rowSerialNumber) {
+ this.rowSerialNumber = rowSerialNumber;
+ }
+
+}
Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java
===================================================================
diff -u -r21739 -r22467
--- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java (.../JasperReportManager.java) (revision 21739)
+++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java (.../JasperReportManager.java) (revision 22467)
@@ -51,6 +51,7 @@
import com.forgon.disinfectsystem.jasperreports.javabeansource.SterilizingStove;
import com.forgon.disinfectsystem.jasperreports.javabeansource.SterilizingStove_child;
import com.forgon.disinfectsystem.jasperreports.javabeansource.SummaryUseRecordForGoodsVO;
+import com.forgon.disinfectsystem.jasperreports.javabeansource.SupplyRoomQualityQuota;
import com.forgon.disinfectsystem.jasperreports.javabeansource.TousseApplyDepartment;
import com.forgon.disinfectsystem.jasperreports.javabeansource.TousseApplySummary;
import com.forgon.disinfectsystem.jasperreports.javabeansource.TousseMorrowSendBean;
@@ -646,5 +647,15 @@
* @return
*/
public List getQualityControlOfClinic(String queryYear, String departCoding);
+
+ /**
+ * 获取供应室护理质量指标统计表的数据
+ * @param departmentCode 供应室的科室编码
+ * @param queryScope 查询的精度(月/天)
+ * @param queryTime 查询的时间范围,如果queryScope=月,则为yyyy,如果queryScope=日,则为yyyy-mm
+ * @return
+ */
+ public List getSupplyRoomQualityQuota(String departmentCode,
+ String queryScope, String queryTime);
}