Commit 65fc309f9169c5a85e2e8238076adfe6e2413b9b
1 parent
e35f177d78
Exists in
master
and in
6 other branches
修改电子病历
Showing 3 changed files with 62 additions and 6 deletions
platform-job-index/src/main/java/com/lyms/platform/job/index/util/JDBCUtil.java
View file @
65fc309
... | ... | @@ -25,6 +25,19 @@ |
25 | 25 | return con; |
26 | 26 | } |
27 | 27 | |
28 | + public static Connection getMysqlConnectionForNewPlatform() { | |
29 | + Connection con = null; | |
30 | + try { | |
31 | + Class.forName("com.mysql.jdbc.Driver"); | |
32 | + String url = "jdbc:mysql://119.90.57.26:3306/center?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"; | |
33 | + String userName = "center"; | |
34 | + String pwd = "lyms2015"; | |
35 | + con = DriverManager.getConnection(url, userName, pwd); | |
36 | + } catch (Exception e) { | |
37 | + e.printStackTrace(); | |
38 | + } | |
39 | + return con; | |
40 | + } | |
28 | 41 | |
29 | 42 | public static Connection getMysqlConnection() { |
30 | 43 | Connection con = null; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
65fc309
... | ... | @@ -289,7 +289,7 @@ |
289 | 289 | if (end > antExRecordModelList.size()) { |
290 | 290 | end = antExRecordModelList.size(); |
291 | 291 | } |
292 | - listFuture.add(commonThreadPool.submit(new AntExRecordWorker(antExRecordModelList.subList(i, end), isRegion, organizationService, usersService, recordService, commonService, hospital, basicConfigService))); | |
292 | + listFuture.add(commonThreadPool.submit(new AntExRecordWorker(antExRecordModelList.subList(i, end), isRegion, organizationService, usersService, recordService, commonService, hospital, basicConfigService,antExService))); | |
293 | 293 | } |
294 | 294 | for (Future f : listFuture) { |
295 | 295 | try { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/AntExRecordWorker.java
View file @
65fc309
1 | 1 | package com.lyms.platform.operate.web.worker; |
2 | 2 | |
3 | 3 | import com.lyms.platform.biz.service.AntExRecordService; |
4 | +import com.lyms.platform.biz.service.AntenatalExaminationService; | |
4 | 5 | import com.lyms.platform.biz.service.BasicConfigService; |
5 | 6 | import com.lyms.platform.biz.service.CommonService; |
7 | +import com.lyms.platform.common.enums.RiskDefaultTypeEnum; | |
6 | 8 | import com.lyms.platform.common.utils.ExceptionUtils; |
9 | +import com.lyms.platform.common.utils.JsonUtil; | |
7 | 10 | import com.lyms.platform.common.utils.StringUtils; |
8 | 11 | import com.lyms.platform.operate.web.result.AntExManagerResult; |
9 | 12 | import com.lyms.platform.operate.web.result.RiskPatientsResult; |
10 | 13 | |
11 | 14 | |
12 | 15 | |
... | ... | @@ -12,13 +15,18 @@ |
12 | 15 | import com.lyms.platform.permission.model.Users; |
13 | 16 | import com.lyms.platform.permission.service.OrganizationService; |
14 | 17 | import com.lyms.platform.permission.service.UsersService; |
18 | +import com.lyms.platform.pojo.AntExChuModel; | |
15 | 19 | import com.lyms.platform.pojo.AntExRecordModel; |
20 | +import com.lyms.platform.pojo.AntenatalExaminationModel; | |
21 | +import com.lyms.platform.pojo.BasicConfig; | |
16 | 22 | import com.lyms.platform.query.AntExRecordQuery; |
17 | 23 | import org.apache.commons.lang.math.NumberUtils; |
18 | 24 | |
19 | 25 | import java.text.SimpleDateFormat; |
20 | 26 | import java.util.ArrayList; |
27 | +import java.util.HashMap; | |
21 | 28 | import java.util.List; |
29 | +import java.util.Map; | |
22 | 30 | import java.util.concurrent.Callable; |
23 | 31 | |
24 | 32 | /** |
25 | 33 | |
... | ... | @@ -38,8 +46,10 @@ |
38 | 46 | |
39 | 47 | private BasicConfigService basicConfigService; |
40 | 48 | |
41 | - public SimpleDateFormat y_m_d = new SimpleDateFormat("yyyy-MM-dd"); | |
49 | + private AntenatalExaminationService antenatalExaminationService; | |
42 | 50 | |
51 | + public SimpleDateFormat y_m_d = new SimpleDateFormat("yyyy-MM-dd"); | |
52 | + | |
43 | 53 | public AntExRecordWorker(List<AntExRecordModel> record, |
44 | 54 | boolean isRegion, |
45 | 55 | OrganizationService organizationService, |
... | ... | @@ -47,7 +57,8 @@ |
47 | 57 | AntExRecordService recordService, |
48 | 58 | CommonService commonService, |
49 | 59 | String hospital, |
50 | - BasicConfigService basicConfigService) { | |
60 | + BasicConfigService basicConfigService, | |
61 | + AntenatalExaminationService antenatalExaminationService) { | |
51 | 62 | this.record = record; |
52 | 63 | this.isRegion = isRegion; |
53 | 64 | this.organizationService = organizationService; |
... | ... | @@ -56,6 +67,7 @@ |
56 | 67 | this.commonService = commonService; |
57 | 68 | this.hospital = hospital; |
58 | 69 | this.basicConfigService = basicConfigService; |
70 | + this.antenatalExaminationService=antenatalExaminationService; | |
59 | 71 | } |
60 | 72 | |
61 | 73 | @Override |
62 | 74 | |
63 | 75 | |
64 | 76 | |
... | ... | @@ -114,15 +126,46 @@ |
114 | 126 | //本院低次 |
115 | 127 | int dichi = recordService.count(antExRecordQuery1); |
116 | 128 | antExRecordQuery1.setHospitalId(null); |
129 | + String fxys = ""; | |
130 | + if (StringUtils.isNotEmpty(e.getfId())) { | |
131 | + String risk = null; | |
132 | + if (e.getType() == 1) { | |
133 | + AntExChuModel model = antenatalExaminationService.findOne(e.getfId()); | |
134 | + if (null != model) { | |
135 | + risk = model.getOtherHighRisk(); | |
136 | + } | |
137 | + } else if (e.getType() == 2) { | |
138 | + AntenatalExaminationModel model = antenatalExaminationService.findOneById(e.getfId()); | |
139 | + if (null != model) { | |
140 | + risk = model.getOtherRisk(); | |
141 | + } | |
142 | + } | |
117 | 143 | |
144 | + try { | |
145 | + Map map = JsonUtil.str2Obj(risk, Map.class); | |
146 | + Object obj = map.get("fxysu"); | |
147 | + if (null != obj) { | |
148 | + fxys = obj.toString(); | |
149 | + } | |
150 | + } catch (Exception e1) { | |
151 | + } | |
152 | + } | |
153 | + | |
154 | + | |
118 | 155 | antExManagerResult.settTimes(recordService.count(antExRecordQuery1)); |
119 | 156 | antExManagerResult.setChTimes(dichi); |
120 | 157 | //高危因素 |
121 | 158 | antExManagerResult.setrLevel(commonService.findRiskLevel(e.gethLevel())); |
122 | - antExManagerResult.setRiskFactor(commonService.resloveFactor(e.gethRisk())); | |
159 | + String ri= commonService.resloveFactor(e.gethRisk()); | |
160 | + if(ri.isEmpty()){ | |
161 | + ri=fxys; | |
162 | + }else{ | |
163 | + ri+=","+fxys; | |
164 | + } | |
165 | + antExManagerResult.setRiskFactor(ri); | |
123 | 166 | data.add(antExManagerResult); |
124 | - }catch (Exception e1){ | |
125 | - ExceptionUtils.catchException(e1,"antex worker error."); | |
167 | + } catch (Exception e1) { | |
168 | + ExceptionUtils.catchException(e1, "antex worker error."); | |
126 | 169 | } |
127 | 170 | } |
128 | 171 | return data; |