Commit ea4b424a02c33784651518455ae8dc0f69022ed5
1 parent
85a10a68f5
Exists in
master
and in
6 other branches
1
Showing 1 changed file with 23 additions and 20 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/AntExRecordWorker.java
View file @
ea4b424
| ... | ... | @@ -118,25 +118,28 @@ |
| 118 | 118 | antExRecordQuery1.setCheckTimeEnd(e.getCheckTime()); |
| 119 | 119 | antExRecordQuery1.setPid(e.getPid()); |
| 120 | 120 | antExRecordQuery1.setHospitalId(hospital); |
| 121 | + int dichi = 0, cdichi = 0, tcount = 0, tallcount = 0; | |
| 122 | + if (StringUtils.isNotEmpty(e.getPid())) { | |
| 123 | + //本院低次 | |
| 124 | + dichi = recordService.count(antExRecordQuery1); | |
| 121 | 125 | |
| 122 | - //本院低次 | |
| 123 | - int dichi = recordService.count(antExRecordQuery1); | |
| 124 | - | |
| 125 | - antExRecordQuery1.setType(1); | |
| 126 | - //初诊的次数 | |
| 127 | - int cdichi = 0; | |
| 128 | - //等于初诊的时候才减 | |
| 129 | - if (e.getType() == 1) { | |
| 130 | - cdichi = recordService.count(antExRecordQuery1); | |
| 126 | + antExRecordQuery1.setType(1); | |
| 127 | + //初诊的次数 | |
| 128 | + cdichi = 0; | |
| 129 | + //等于初诊的时候才减 | |
| 130 | + if (e.getType() == 1) { | |
| 131 | + cdichi = recordService.count(antExRecordQuery1); | |
| 132 | + } | |
| 133 | + antExRecordQuery1.setType(null); | |
| 134 | + antExRecordQuery1.setHospitalId(null); | |
| 135 | + tcount = recordService.count(antExRecordQuery1); | |
| 136 | + antExRecordQuery1.setType(1); | |
| 137 | + tallcount = 0; | |
| 138 | + if (e.getType() == 1) { | |
| 139 | + tallcount = recordService.count(antExRecordQuery1); | |
| 140 | + } | |
| 131 | 141 | } |
| 132 | - antExRecordQuery1.setType(null); | |
| 133 | - antExRecordQuery1.setHospitalId(null); | |
| 134 | - int tcount = recordService.count(antExRecordQuery1); | |
| 135 | - antExRecordQuery1.setType(1); | |
| 136 | - int tallcount = 0; | |
| 137 | - if (e.getType() == 1) { | |
| 138 | - tallcount = recordService.count(antExRecordQuery1); | |
| 139 | - } | |
| 142 | + | |
| 140 | 143 | antExManagerResult.settTimes(tcount - tallcount); |
| 141 | 144 | antExManagerResult.setChTimes(dichi - cdichi); |
| 142 | 145 | handleRisk(e, antExManagerResult); |
| 143 | 146 | |
| ... | ... | @@ -186,10 +189,10 @@ |
| 186 | 189 | //高危因素 |
| 187 | 190 | antExManagerResult.setrLevel(commonService.findRiskLevel(e.gethLevel())); |
| 188 | 191 | String ri = commonService.resloveFactor(e.gethRisk()); |
| 189 | - if(StringUtils.isNotEmpty(name.toString())){ | |
| 190 | - ri = name.substring(0,name.length()-1); | |
| 192 | + if (StringUtils.isNotEmpty(name.toString())) { | |
| 193 | + ri = name.substring(0, name.length() - 1); | |
| 191 | 194 | } else if (StringUtils.isNotEmpty(name.toString())) { |
| 192 | - ri += "," + name.substring(0,name.length()-1); | |
| 195 | + ri += "," + name.substring(0, name.length() - 1); | |
| 193 | 196 | } |
| 194 | 197 | antExManagerResult.setRiskFactor(ri); |
| 195 | 198 | antExManagerResult.setRiskScore((e.gethScore() + score) + ""); |