Index: ssts-web/src/main/webapp/jasperRtp/sterilizingStoveUseInterruptCount_child.jasper
===================================================================
diff -u
Binary files differ
Index: ssts-web/src/main/webapp/jasperRtp/sterilizingStoveUseInterruptCount.jrxml
===================================================================
diff -u
--- ssts-web/src/main/webapp/jasperRtp/sterilizingStoveUseInterruptCount.jrxml (revision 0)
+++ ssts-web/src/main/webapp/jasperRtp/sterilizingStoveUseInterruptCount.jrxml (revision 37823)
@@ -0,0 +1,271 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/util/SterilizingStoveUseCountReportHelper.java
===================================================================
diff -u -r35982 -r37823
--- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/util/SterilizingStoveUseCountReportHelper.java (.../SterilizingStoveUseCountReportHelper.java) (revision 35982)
+++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/util/SterilizingStoveUseCountReportHelper.java (.../SterilizingStoveUseCountReportHelper.java) (revision 37823)
@@ -5,8 +5,8 @@
import java.text.ParseException;
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -16,12 +16,12 @@
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
+import org.apache.commons.collections.MapUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
-import com.forgon.Constants;
import com.forgon.databaseadapter.service.DateQueryAdapter;
import com.forgon.disinfectsystem.common.CssdUtils;
import com.forgon.disinfectsystem.entity.basedatamanager.sterilizer.Sterilizer;
@@ -63,12 +63,31 @@
Map failureMap = getSuccessData(departCoding,sterilizationPurpose,
startTime,endTime,SterilizationRecord.STERILIZATION_STATUS_FAILURE, sterilizerNameGroup, sterilizerName, sterilisation,showEmptyFurnace);
- Iterator> iterator = successMap.entrySet().iterator();
+ Map interruptMap = null;
+ boolean enableTheSterilizationResultJudgmentFunction = CssdUtils.getSystemSetConfigByNameBool("enableTheSterilizationResultJudgmentFunction", false);
+ if(!showEmptyFurnace && enableTheSterilizationResultJudgmentFunction){
+ interruptMap = getSuccessData(departCoding,sterilizationPurpose,
+ startTime,endTime,SterilizationRecord.STERILIZATION_STATUS_INTERRUPT, sterilizerNameGroup, sterilizerName, sterilisation,showEmptyFurnace);
+ }
+ Set names = new LinkedHashSet();
+ if(MapUtils.isNotEmpty(successMap)){
+ names.addAll(successMap.keySet());
+ }
+ if(MapUtils.isNotEmpty(failureMap)){
+ names.addAll(failureMap.keySet());
+ }
+ if(MapUtils.isNotEmpty(interruptMap)){
+ names.addAll(interruptMap.keySet());
+ }
Map departMap = new HashMap();
- while(iterator.hasNext()){
- Entry next = iterator.next();
- String name = next.getKey();
- SterilizingStove_child ssc = next.getValue();
+ for (String name : names) {
+ SterilizingStove_child ssc = successMap.get(name);
+ if(ssc == null){
+ ssc = failureMap.get(name);
+ }
+ if(ssc == null){
+ ssc = interruptMap.get(name);
+ }
String department = ssc.getDepartName();
SterilizingStove sterilizingStove = null;
if(departMap.containsKey(department)){
@@ -84,6 +103,11 @@
}else{
ssc.setFailureCount(0);
}
+ if(interruptMap != null && interruptMap.get(name) != null){
+ ssc.setInterruptCount(interruptMap.get(name).getInterruptCount());
+ }else{
+ ssc.setInterruptCount(0);
+ }
sterilizingStove.getList().add(ssc);
}
return new ArrayList(departMap.values());
@@ -98,13 +122,19 @@
statusSql = " and sr.status = '"+SterilizationRecord.STERILIZATION_STATUS_END
+ "' and sr.sterilizationResult='"
+ SterilizationRecord.STERILIZATIONRESULT_UNQUALIFIED +"' ";
+ }else{
+ statusSql = " and sr.status = '"+type+"'";
}
}else if(SterilizationRecord.STERILIZATION_STATUS_END.equals(type)){
if(enableTheSterilizationResultJudgmentFunction){
statusSql = " and sr.status = '"+SterilizationRecord.STERILIZATION_STATUS_END
+ "' and sr.sterilizationResult='"
+ SterilizationRecord.STERILIZATIONRESULT_QUALIFIED +"' ";
+ }else{
+ statusSql = " and sr.status = '"+type+"'";
}
+ }else if(SterilizationRecord.STERILIZATION_STATUS_INTERRUPT.equals(type)){
+ statusSql = " and sr.status = '"+SterilizationRecord.STERILIZATION_STATUS_INTERRUPT+"'";
}
String emptyFurnaceCountSQL = null;
String leftJoinSterilisationSQL = null;
@@ -164,6 +194,8 @@
}
if("灭菌完成".equals(type)){
ssc.setSuccessCount(count);
+ }else if(SterilizationRecord.STERILIZATION_STATUS_INTERRUPT.equals(type)){
+ ssc.setInterruptCount(count);
}else{
ssc.setFailureCount(count);
}
@@ -191,11 +223,11 @@
boolean enableTheSterilizationResultJudgmentFunction = CssdUtils.getSystemSetConfigByNameBool("enableTheSterilizationResultJudgmentFunction", false);
String statusSql = "";
if(enableTheSterilizationResultJudgmentFunction){
- statusSql = " and po.status = '"+SterilizationRecord.STERILIZATION_STATUS_END
+ statusSql = " and (po.status = '"+SterilizationRecord.STERILIZATION_STATUS_END
+ "' and po.sterilizationResult in('"
+ SterilizationRecord.STERILIZATIONRESULT_QUALIFIED
+"','"+ SterilizationRecord.STERILIZATIONRESULT_UNQUALIFIED
- +"') ";
+ +"') or po.status='"+ SterilizationRecord.STERILIZATION_STATUS_INTERRUPT +"') ";
}
String orgUnitCodingSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparatorFilterAll("po.sterilizer.orgUnitCoding", departCoding, ",");
String sql = " where po.endDate between "
@@ -379,11 +411,11 @@
boolean enableTheSterilizationResultJudgmentFunction = CssdUtils.getSystemSetConfigByNameBool("enableTheSterilizationResultJudgmentFunction", false);
String statusSql = "";
if(enableTheSterilizationResultJudgmentFunction){
- statusSql = " and sr.status = '"+SterilizationRecord.STERILIZATION_STATUS_END
+ statusSql = " and (sr.status = '"+SterilizationRecord.STERILIZATION_STATUS_END
+ "' and sr.sterilizationResult in('"
+ SterilizationRecord.STERILIZATIONRESULT_QUALIFIED
+"','"+ SterilizationRecord.STERILIZATIONRESULT_UNQUALIFIED
- +"') ";
+ +"') or po.status='"+ SterilizationRecord.STERILIZATION_STATUS_INTERRUPT +"') ";
}
String sterilizerNameGroupSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("s.ownGroup", sterilizerNameGroup, ",");
String sterilizerNameSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("s.name", sterilizerName, ",");
@@ -461,11 +493,11 @@
boolean enableTheSterilizationResultJudgmentFunction = CssdUtils.getSystemSetConfigByNameBool("enableTheSterilizationResultJudgmentFunction", false);
String statusSql = "";
if(enableTheSterilizationResultJudgmentFunction){
- statusSql = " and sr.status = '"+SterilizationRecord.STERILIZATION_STATUS_END
+ statusSql = " and (sr.status = '"+SterilizationRecord.STERILIZATION_STATUS_END
+ "' and sr.sterilizationResult in('"
+ SterilizationRecord.STERILIZATIONRESULT_QUALIFIED
+"','"+ SterilizationRecord.STERILIZATIONRESULT_UNQUALIFIED
- +"') ";
+ +"') or po.status='"+ SterilizationRecord.STERILIZATION_STATUS_INTERRUPT +"') ";
}
String sterilizerNameGroupSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("s.ownGroup", sterilizerNameGroup, ",");
String sterilizerNameSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("s.name", sterilizerName, ",");
Index: ssts-web/src/main/webapp/jasperRtp/sterilizingStoveUseInterruptCount.jasper
===================================================================
diff -u
Binary files differ
Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java
===================================================================
diff -u -r37806 -r37823
--- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java (.../JasperreportsAction.java) (revision 37806)
+++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java (.../JasperreportsAction.java) (revision 37823)
@@ -1876,6 +1876,10 @@
endTime = DateTools.getNextMonth(yearAndMonth[0],yearAndMonth[1]) + " 00:00";
}
if("汇总".equals(queryType)){
+ if(enableTheSterilizationResultJudgmentFunction){
+ requestParameters.put("jasperreportName",
+ "sterilizingStoveUseInterruptCount.jasper");
+ }
return jasperReportManager.getSterilizingStoveUseCountData(startTime,endTime,querySupplyRoom, querySupplyRoomCoding,sterilizationPurpose, sterilizerNameGroup, sterilizerName, sterilisation);
}else{
// 获取统计明细
Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/SterilizingStove_child.java
===================================================================
diff -u -r35552 -r37823
--- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/SterilizingStove_child.java (.../SterilizingStove_child.java) (revision 35552)
+++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/javabeansource/SterilizingStove_child.java (.../SterilizingStove_child.java) (revision 37823)
@@ -30,6 +30,10 @@
*/
private Integer failureCount = 0;
/**
+ * 灭菌中断数量
+ */
+ private Integer interruptCount = 0;
+ /**
* 灭菌失败空炉数量
*/
private Integer failureEmptyFurnaceCount = 0;
@@ -119,5 +123,11 @@
public void setFailureEmptyFurnaceCount(Integer failureEmptyFurnaceCount) {
this.failureEmptyFurnaceCount = failureEmptyFurnaceCount;
}
+ public Integer getInterruptCount() {
+ return interruptCount;
+ }
+ public void setInterruptCount(Integer interruptCount) {
+ this.interruptCount = interruptCount;
+ }
}
Index: ssts-web/src/main/webapp/jasperRtp/sterilizingStoveUseInterruptCount_child.jrxml
===================================================================
diff -u
--- ssts-web/src/main/webapp/jasperRtp/sterilizingStoveUseInterruptCount_child.jrxml (revision 0)
+++ ssts-web/src/main/webapp/jasperRtp/sterilizingStoveUseInterruptCount_child.jrxml (revision 37823)
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+