Commit 25cc842592c314e8f57572939eb832b577f6de74
1 parent
62dae133e4
Exists in
master
and in
6 other branches
1
Showing 3 changed files with 15 additions and 9 deletions
platform-common/src/main/java/com/lyms/platform/common/dao/BaseQuery.java
View file @
25cc842
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | |
3 | 3 | |
4 | 4 | import com.lyms.platform.common.base.PageInfo; |
5 | +import org.apache.commons.lang.builder.ToStringBuilder; | |
5 | 6 | |
6 | 7 | import java.util.ArrayList; |
7 | 8 | import java.util.Date; |
... | ... | @@ -244,6 +245,11 @@ |
244 | 245 | |
245 | 246 | public PageInfo getPageInfo() { |
246 | 247 | return new PageInfo(this.page, this.lastPage, this.count, this.limit); |
248 | + } | |
249 | + | |
250 | + @Override | |
251 | + public String toString() { | |
252 | + return ToStringBuilder.reflectionToString(this); | |
247 | 253 | } |
248 | 254 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java
View file @
25cc842
... | ... | @@ -232,7 +232,7 @@ |
232 | 232 | } |
233 | 233 | |
234 | 234 | for (RiskReportResult bs : mainRiskReportResults) { |
235 | - configData(bs, slaveBasicConfigMap,allPatientCount); | |
235 | + configData(bs, slaveBasicConfigMap, allPatientCount); | |
236 | 236 | } |
237 | 237 | |
238 | 238 | |
239 | 239 | |
240 | 240 | |
241 | 241 | |
242 | 242 | |
... | ... | @@ -242,21 +242,21 @@ |
242 | 242 | } |
243 | 243 | |
244 | 244 | //生成层级关系 |
245 | - public void configData(RiskReportResult bs, Map<String, List<RiskReportResult>> slaveBasicConfigMap,int allPatientCount) { | |
245 | + public void configData(RiskReportResult bs, Map<String, List<RiskReportResult>> slaveBasicConfigMap, int allPatientCount) { | |
246 | 246 | if (slaveBasicConfigMap.containsKey(bs.getHighRiskId())) { |
247 | 247 | bs.setRiskReportResults(slaveBasicConfigMap.get(bs.getHighRiskId())); |
248 | 248 | for (RiskReportResult basicConfig : bs.getRiskReportResults()) { |
249 | - basicConfig.setLevel(bs.getLevel()+1); | |
249 | + basicConfig.setLevel(bs.getLevel() + 1); | |
250 | 250 | |
251 | 251 | DecimalFormat df = new DecimalFormat("0.00"); |
252 | - String percent = df.format((double) basicConfig.getRiskCount() / allPatientCount * 100) + "%"; | |
252 | + String percent =basicConfig.getRiskCount() > 0 ? df.format((double) basicConfig.getRiskCount() / allPatientCount * 100) + "%" : "0%"; | |
253 | 253 | basicConfig.setPercent(percent); |
254 | 254 | |
255 | - configData(basicConfig, slaveBasicConfigMap,allPatientCount); | |
256 | - bs.setRiskCount(bs.getRiskCount()+basicConfig.getRiskCount()); | |
255 | + configData(basicConfig, slaveBasicConfigMap, allPatientCount); | |
256 | + bs.setRiskCount(bs.getRiskCount() + basicConfig.getRiskCount()); | |
257 | 257 | |
258 | 258 | df = new DecimalFormat("0.00"); |
259 | - percent = df.format((double) bs.getRiskCount() / allPatientCount * 100) + "%"; | |
259 | + percent =basicConfig.getRiskCount() > 0 ? df.format((double) basicConfig.getRiskCount() / allPatientCount * 100) + "%" : "0%"; | |
260 | 260 | bs.setPercent(percent); |
261 | 261 | } |
262 | 262 | bs.setRiskReportResults(null); |
... | ... | @@ -278,7 +278,7 @@ |
278 | 278 | risk.setRiskCount(riskPatientCount); |
279 | 279 | |
280 | 280 | DecimalFormat df = new DecimalFormat("0.00"); |
281 | - String percent = df.format((double) riskPatientCount / allPatientCount * 100) + "%"; | |
281 | + String percent =riskPatientCount>0? df.format((double) riskPatientCount / allPatientCount * 100) + "%":"0%"; | |
282 | 282 | risk.setPercent(percent); |
283 | 283 | |
284 | 284 | List level = new ArrayList(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/HiskCountTask.java
View file @
25cc842
... | ... | @@ -83,7 +83,7 @@ |
83 | 83 | |
84 | 84 | query.setBookbuildingDateStart(patientsQuery.getBookbuildingDateStart()); |
85 | 85 | query.setBookbuildingDateEnd(patientsQuery.getBookbuildingDateEnd()); |
86 | - query.setIsHighRisk(Boolean.TRUE); | |
86 | + | |
87 | 87 | query.setrFactor(config.getId()); |
88 | 88 | |
89 | 89 | query.setType(patientsQuery.getType()); |