Commit e1147d735fb20b2a84b5b049da0e0209fc1853e0
1 parent
cf3466ab03
Exists in
master
and in
6 other branches
update code
Showing 11 changed files with 206 additions and 401 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/JdbcUtil.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IBabyBookBuildingDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/BabyBookbuildingDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BabyBookbuildingService.java
- platform-dal/src/main/java/com/lyms/platform/pojo/FmRecordModel.java
- platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
- platform-job-index/src/main/java/com/lyms/platform/job/index/service/SyncDataService.java
- platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/FmPatInfo.java
- platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyFmService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/JdbcUtil.java
View file @
e1147d7
... | ... | @@ -476,7 +476,7 @@ |
476 | 476 | patients.setCardNo(getString(map.get("P_CARDNO"))); //证件号码 |
477 | 477 | } else { |
478 | 478 | patients.setCardNo(getString(map.get("P_MOBILEPHONE"))); //证件号码 |
479 | - patients.setPcerteTypeId("57e0a21c0cf209b410a82cda"); | |
479 | + patients.setPcerteTypeId("57e1dcd3f0f02e7ca519d6c6"); | |
480 | 480 | } |
481 | 481 | |
482 | 482 | //---------------------居住地址 |
... | ... | @@ -1224,7 +1224,7 @@ |
1224 | 1224 | } |
1225 | 1225 | |
1226 | 1226 | model.setMcertNo(getString(map.get("PI_MOTHERPHONE"))); |
1227 | - model.setMcertTypeId("57e0a21c0cf209b410a82cda"); | |
1227 | + model.setMcertTypeId("57e1dcd3f0f02e7ca519d6c6"); | |
1228 | 1228 | |
1229 | 1229 | String mLevelId = getString(map.get("PI_MMCULTURE")); |
1230 | 1230 | if (mLevelId != null && !"".equals(mLevelId)) { |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IBabyBookBuildingDao.java
View file @
e1147d7
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | import com.lyms.platform.common.dao.operator.MongoQuery; |
4 | 4 | import com.lyms.platform.pojo.BabyCheckModel; |
5 | 5 | import com.lyms.platform.pojo.BabyModel; |
6 | +import com.lyms.platform.pojo.FmRecordModel; | |
6 | 7 | import com.lyms.platform.pojo.PostReviewModel; |
7 | 8 | |
8 | 9 | import java.util.Date; |
... | ... | @@ -25,5 +26,7 @@ |
25 | 26 | List<String> getBirthBabies(String dateStr); |
26 | 27 | |
27 | 28 | void updateBabyLastGrowth(BabyCheckModel model); |
29 | + | |
30 | + void saveFmrecord(FmRecordModel fmRecordModel); | |
28 | 31 | } |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/BabyBookbuildingDaoImpl.java
View file @
e1147d7
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | import com.lyms.platform.common.utils.StringUtils; |
4 | 4 | import com.lyms.platform.pojo.AntExChuModel; |
5 | 5 | import com.lyms.platform.pojo.BabyCheckModel; |
6 | +import com.lyms.platform.pojo.FmRecordModel; | |
6 | 7 | import com.mongodb.DBCollection; |
7 | 8 | import com.mongodb.DBObject; |
8 | 9 | import com.mongodb.MapReduceCommand; |
... | ... | @@ -114,6 +115,11 @@ |
114 | 115 | this.mongoTemplate.updateFirst(new Query(Criteria.where("id").is(model.getBuildId())), |
115 | 116 | Update.update("weightEvaluate", model.getWeightEvaluate()).set("heightEvaluate", |
116 | 117 | model.getHeadEvaluate()).set("headEvaluate",model.getHeadEvaluate()).set("heightWeight",model.getHeightWeight()), BabyModel.class); |
118 | + } | |
119 | + | |
120 | + @Override | |
121 | + public void saveFmrecord(FmRecordModel fmRecordModel) { | |
122 | + this.mongoTemplate.save(fmRecordModel,"lyms_fmrecord"); | |
117 | 123 | } |
118 | 124 | |
119 | 125 | } |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BabyBookbuildingService.java
View file @
e1147d7
1 | 1 | package com.lyms.platform.biz.service; |
2 | 2 | |
3 | 3 | import com.lyms.platform.common.dao.operator.MongoQuery; |
4 | -import com.lyms.platform.pojo.BabyCheckModel; | |
5 | -import com.lyms.platform.pojo.Patients; | |
6 | -import com.lyms.platform.pojo.PostReviewModel; | |
4 | +import com.lyms.platform.pojo.*; | |
7 | 5 | import com.lyms.platform.query.BabyModelQuery; |
8 | 6 | import com.lyms.platform.query.PatientsQuery; |
9 | 7 | import org.apache.commons.collections.CollectionUtils; |
... | ... | @@ -14,7 +12,6 @@ |
14 | 12 | |
15 | 13 | import com.lyms.platform.biz.dal.IBabyBookBuildingDao; |
16 | 14 | import com.lyms.platform.common.enums.YnEnums; |
17 | -import com.lyms.platform.pojo.BabyModel; | |
18 | 15 | |
19 | 16 | import java.util.Date; |
20 | 17 | import java.util.List; |
... | ... | @@ -127,6 +124,10 @@ |
127 | 124 | |
128 | 125 | public void updateBabyLastGrowth(BabyCheckModel model) { |
129 | 126 | babyBookBuildingDao.updateBabyLastGrowth(model); |
127 | + } | |
128 | + | |
129 | + public void saveFmrecord(FmRecordModel fmRecordModel) { | |
130 | + babyBookBuildingDao.saveFmrecord(fmRecordModel); | |
130 | 131 | } |
131 | 132 | } |
platform-dal/src/main/java/com/lyms/platform/pojo/FmRecordModel.java
View file @
e1147d7
1 | +package com.lyms.platform.pojo; | |
2 | + | |
3 | +import com.lyms.platform.common.result.BaseModel; | |
4 | +import org.springframework.data.mongodb.core.mapping.Document; | |
5 | + | |
6 | + | |
7 | +/** | |
8 | + * 记录秦皇岛分娩记录没有在系统中匹配到的记录 | |
9 | + * | |
10 | + * Created by lqy | |
11 | + */ | |
12 | +@Document(collection = "lyms_fmrecord") | |
13 | +public class FmRecordModel extends BaseModel { | |
14 | + | |
15 | + private String id; | |
16 | + private String syxh; | |
17 | + | |
18 | + public String getId() { | |
19 | + return id; | |
20 | + } | |
21 | + | |
22 | + public void setId(String id) { | |
23 | + this.id = id; | |
24 | + } | |
25 | + | |
26 | + public String getSyxh() { | |
27 | + return syxh; | |
28 | + } | |
29 | + | |
30 | + public void setSyxh(String syxh) { | |
31 | + this.syxh = syxh; | |
32 | + } | |
33 | +} |
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
e1147d7
... | ... | @@ -210,6 +210,16 @@ |
210 | 210 | //查询号 |
211 | 211 | private String queryNo; |
212 | 212 | |
213 | + private String phoneOrCert; | |
214 | + | |
215 | + public String getPhoneOrCert() { | |
216 | + return phoneOrCert; | |
217 | + } | |
218 | + | |
219 | + public void setPhoneOrCert(String phoneOrCert) { | |
220 | + this.phoneOrCert = phoneOrCert; | |
221 | + } | |
222 | + | |
213 | 223 | public String getQueryNo() { |
214 | 224 | return queryNo; |
215 | 225 | } |
... | ... | @@ -995,6 +1005,16 @@ |
995 | 1005 | c1 = c1.andOperator(c.orCondition(new MongoCondition[]{con1, con2, con3, con4}).getCriteria()); |
996 | 1006 | }else { |
997 | 1007 | c1 = c.orCondition(new MongoCondition[]{con1, con2, con3, con4}).getCriteria(); |
1008 | + } | |
1009 | + } | |
1010 | + if (null != phoneOrCert) { | |
1011 | + MongoCondition c = MongoCondition.newInstance(); | |
1012 | + MongoCondition con1 = MongoCondition.newInstance("phone", phoneOrCert, MongoOper.IS); | |
1013 | + MongoCondition con2 = MongoCondition.newInstance("cardNo", phoneOrCert, MongoOper.IS); | |
1014 | + if(c1!=null) { | |
1015 | + c1 = c1.andOperator(c.orCondition(new MongoCondition[]{con1, con2}).getCriteria()); | |
1016 | + }else { | |
1017 | + c1 = c.orCondition(new MongoCondition[]{con1, con2}).getCriteria(); | |
998 | 1018 | } |
999 | 1019 | } |
1000 | 1020 |
platform-job-index/src/main/java/com/lyms/platform/job/index/service/SyncDataService.java
View file @
e1147d7
... | ... | @@ -356,7 +356,7 @@ |
356 | 356 | patients.setCardNo(DataUtil.getString(map.get("P_CARDNO"))); //证件号码 |
357 | 357 | } else { |
358 | 358 | patients.setCardNo(DataUtil.getString(map.get("P_MOBILEPHONE"))); //证件号码 |
359 | - patients.setPcerteTypeId("57e0a21c0cf209b410a82cda"); | |
359 | + patients.setPcerteTypeId("57e1dcd3f0f02e7ca519d6c6"); | |
360 | 360 | } |
361 | 361 | |
362 | 362 | //---------------------居住地址 |
... | ... | @@ -926,7 +926,7 @@ |
926 | 926 | } |
927 | 927 | |
928 | 928 | model.setMcertNo(DataUtil.getString(map.get("PI_MOTHERPHONE"))); |
929 | - model.setMcertTypeId("57e0a21c0cf209b410a82cda"); | |
929 | + model.setMcertTypeId("57e1dcd3f0f02e7ca519d6c6"); | |
930 | 930 | |
931 | 931 | String mLevelId = DataUtil.getString(map.get("PI_MMCULTURE")); |
932 | 932 | if (mLevelId != null && !"".equals(mLevelId)) { |
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/FmPatInfo.java
View file @
e1147d7
... | ... | @@ -6,401 +6,72 @@ |
6 | 6 | */ |
7 | 7 | public class FmPatInfo { |
8 | 8 | |
9 | - private String SYXH; | |
10 | - private String YYDM; | |
11 | - private String BAHM; | |
12 | - private String ZYHM; | |
13 | - private String BRXM; | |
14 | - private String BRXB; | |
15 | - private String CSNY; | |
16 | - private String DWDZ; | |
17 | - private String DWDH; | |
18 | - private String DWYB; | |
19 | - private String HKDZ; | |
20 | - private String HKDH; | |
21 | - private String LXRM; | |
22 | - private String LXDZ; | |
23 | - private String LXDH; | |
24 | - private String RYKS; | |
25 | - private String RYBQ; | |
26 | - private String RYCH; | |
27 | - private String RYRQ; | |
28 | - private String CYKS; | |
29 | - private String CYBQ; | |
30 | - private String CYCH; | |
31 | - private String CYRQ; | |
32 | - private String ZYTS; | |
33 | - private String ZYYS; | |
34 | - private String ZZYS; | |
35 | - private String ZRYS; | |
36 | - private String KZR; | |
9 | + private String syxh; | |
10 | + private String name; | |
11 | + private String cardNo; | |
12 | + private String sex; | |
13 | + private String birth; | |
14 | + private String phone; | |
37 | 15 | |
38 | - private String HIS_SYXH; | |
39 | - private String QJCS; | |
40 | - private String CGCS; | |
41 | - private String LYFSDM; | |
42 | - private String LYFSMC; | |
43 | - private String JSYLJG; | |
44 | - private String MZZDBM; | |
45 | - private String MZZD; | |
46 | - private String ZYZDBM; | |
47 | - private String RYZD; | |
48 | - private String ZYZD; | |
49 | - | |
50 | - public String getSYXH() { | |
51 | - return SYXH; | |
16 | + public String getSyxh() { | |
17 | + return syxh; | |
52 | 18 | } |
53 | 19 | |
54 | - public void setSYXH(String SYXH) { | |
55 | - this.SYXH = SYXH; | |
20 | + public void setSyxh(String syxh) { | |
21 | + this.syxh = syxh; | |
56 | 22 | } |
57 | 23 | |
58 | - public String getYYDM() { | |
59 | - return YYDM; | |
24 | + public String getName() { | |
25 | + return name; | |
60 | 26 | } |
61 | 27 | |
62 | - public void setYYDM(String YYDM) { | |
63 | - this.YYDM = YYDM; | |
28 | + public void setName(String name) { | |
29 | + this.name = name; | |
64 | 30 | } |
65 | 31 | |
66 | - public String getBAHM() { | |
67 | - return BAHM; | |
32 | + public String getCardNo() { | |
33 | + return cardNo; | |
68 | 34 | } |
69 | 35 | |
70 | - public void setBAHM(String BAHM) { | |
71 | - this.BAHM = BAHM; | |
36 | + public void setCardNo(String cardNo) { | |
37 | + this.cardNo = cardNo; | |
72 | 38 | } |
73 | 39 | |
74 | - public String getZYHM() { | |
75 | - return ZYHM; | |
40 | + public String getSex() { | |
41 | + return sex; | |
76 | 42 | } |
77 | 43 | |
78 | - public void setZYHM(String ZYHM) { | |
79 | - this.ZYHM = ZYHM; | |
44 | + public void setSex(String sex) { | |
45 | + this.sex = sex; | |
80 | 46 | } |
81 | 47 | |
82 | - public String getBRXM() { | |
83 | - return BRXM; | |
48 | + public String getBirth() { | |
49 | + return birth; | |
84 | 50 | } |
85 | 51 | |
86 | - public void setBRXM(String BRXM) { | |
87 | - this.BRXM = BRXM; | |
52 | + public void setBirth(String birth) { | |
53 | + this.birth = birth; | |
88 | 54 | } |
89 | 55 | |
90 | - public String getBRXB() { | |
91 | - return BRXB; | |
92 | - } | |
93 | 56 | |
94 | - public void setBRXB(String BRXB) { | |
95 | - this.BRXB = BRXB; | |
96 | - } | |
97 | 57 | |
98 | - public String getCSNY() { | |
99 | - return CSNY; | |
58 | + public String getPhone() { | |
59 | + return phone; | |
100 | 60 | } |
101 | 61 | |
102 | - public void setCSNY(String CSNY) { | |
103 | - this.CSNY = CSNY; | |
62 | + public void setPhone(String phone) { | |
63 | + this.phone = phone; | |
104 | 64 | } |
105 | 65 | |
106 | - public String getDWDZ() { | |
107 | - return DWDZ; | |
108 | - } | |
109 | - | |
110 | - public void setDWDZ(String DWDZ) { | |
111 | - this.DWDZ = DWDZ; | |
112 | - } | |
113 | - | |
114 | - public String getDWDH() { | |
115 | - return DWDH; | |
116 | - } | |
117 | - | |
118 | - public void setDWDH(String DWDH) { | |
119 | - this.DWDH = DWDH; | |
120 | - } | |
121 | - | |
122 | - public String getDWYB() { | |
123 | - return DWYB; | |
124 | - } | |
125 | - | |
126 | - public void setDWYB(String DWYB) { | |
127 | - this.DWYB = DWYB; | |
128 | - } | |
129 | - | |
130 | - public String getHKDZ() { | |
131 | - return HKDZ; | |
132 | - } | |
133 | - | |
134 | - public void setHKDZ(String HKDZ) { | |
135 | - this.HKDZ = HKDZ; | |
136 | - } | |
137 | - | |
138 | - public String getHKDH() { | |
139 | - return HKDH; | |
140 | - } | |
141 | - | |
142 | - public void setHKDH(String HKDH) { | |
143 | - this.HKDH = HKDH; | |
144 | - } | |
145 | - | |
146 | - public String getLXRM() { | |
147 | - return LXRM; | |
148 | - } | |
149 | - | |
150 | - public void setLXRM(String LXRM) { | |
151 | - this.LXRM = LXRM; | |
152 | - } | |
153 | - | |
154 | - public String getLXDZ() { | |
155 | - return LXDZ; | |
156 | - } | |
157 | - | |
158 | - public void setLXDZ(String LXDZ) { | |
159 | - this.LXDZ = LXDZ; | |
160 | - } | |
161 | - | |
162 | - public String getLXDH() { | |
163 | - return LXDH; | |
164 | - } | |
165 | - | |
166 | - public void setLXDH(String LXDH) { | |
167 | - this.LXDH = LXDH; | |
168 | - } | |
169 | - | |
170 | - public String getRYKS() { | |
171 | - return RYKS; | |
172 | - } | |
173 | - | |
174 | - public void setRYKS(String RYKS) { | |
175 | - this.RYKS = RYKS; | |
176 | - } | |
177 | - | |
178 | - public String getRYBQ() { | |
179 | - return RYBQ; | |
180 | - } | |
181 | - | |
182 | - public void setRYBQ(String RYBQ) { | |
183 | - this.RYBQ = RYBQ; | |
184 | - } | |
185 | - | |
186 | - public String getRYCH() { | |
187 | - return RYCH; | |
188 | - } | |
189 | - | |
190 | - public void setRYCH(String RYCH) { | |
191 | - this.RYCH = RYCH; | |
192 | - } | |
193 | - | |
194 | - public String getRYRQ() { | |
195 | - return RYRQ; | |
196 | - } | |
197 | - | |
198 | - public void setRYRQ(String RYRQ) { | |
199 | - this.RYRQ = RYRQ; | |
200 | - } | |
201 | - | |
202 | - public String getCYKS() { | |
203 | - return CYKS; | |
204 | - } | |
205 | - | |
206 | - public void setCYKS(String CYKS) { | |
207 | - this.CYKS = CYKS; | |
208 | - } | |
209 | - | |
210 | - public String getCYBQ() { | |
211 | - return CYBQ; | |
212 | - } | |
213 | - | |
214 | - public void setCYBQ(String CYBQ) { | |
215 | - this.CYBQ = CYBQ; | |
216 | - } | |
217 | - | |
218 | - public String getCYCH() { | |
219 | - return CYCH; | |
220 | - } | |
221 | - | |
222 | - public void setCYCH(String CYCH) { | |
223 | - this.CYCH = CYCH; | |
224 | - } | |
225 | - | |
226 | - public String getCYRQ() { | |
227 | - return CYRQ; | |
228 | - } | |
229 | - | |
230 | - public void setCYRQ(String CYRQ) { | |
231 | - this.CYRQ = CYRQ; | |
232 | - } | |
233 | - | |
234 | - public String getZYTS() { | |
235 | - return ZYTS; | |
236 | - } | |
237 | - | |
238 | - public void setZYTS(String ZYTS) { | |
239 | - this.ZYTS = ZYTS; | |
240 | - } | |
241 | - | |
242 | - public String getZYYS() { | |
243 | - return ZYYS; | |
244 | - } | |
245 | - | |
246 | - public void setZYYS(String ZYYS) { | |
247 | - this.ZYYS = ZYYS; | |
248 | - } | |
249 | - | |
250 | - public String getZZYS() { | |
251 | - return ZZYS; | |
252 | - } | |
253 | - | |
254 | - public void setZZYS(String ZZYS) { | |
255 | - this.ZZYS = ZZYS; | |
256 | - } | |
257 | - | |
258 | - public String getZRYS() { | |
259 | - return ZRYS; | |
260 | - } | |
261 | - | |
262 | - public void setZRYS(String ZRYS) { | |
263 | - this.ZRYS = ZRYS; | |
264 | - } | |
265 | - | |
266 | - public String getKZR() { | |
267 | - return KZR; | |
268 | - } | |
269 | - | |
270 | - public void setKZR(String KZR) { | |
271 | - this.KZR = KZR; | |
272 | - } | |
273 | - | |
274 | - public String getHIS_SYXH() { | |
275 | - return HIS_SYXH; | |
276 | - } | |
277 | - | |
278 | - public void setHIS_SYXH(String HIS_SYXH) { | |
279 | - this.HIS_SYXH = HIS_SYXH; | |
280 | - } | |
281 | - | |
282 | - public String getQJCS() { | |
283 | - return QJCS; | |
284 | - } | |
285 | - | |
286 | - public void setQJCS(String QJCS) { | |
287 | - this.QJCS = QJCS; | |
288 | - } | |
289 | - | |
290 | - public String getCGCS() { | |
291 | - return CGCS; | |
292 | - } | |
293 | - | |
294 | - public void setCGCS(String CGCS) { | |
295 | - this.CGCS = CGCS; | |
296 | - } | |
297 | - | |
298 | - public String getLYFSDM() { | |
299 | - return LYFSDM; | |
300 | - } | |
301 | - | |
302 | - public void setLYFSDM(String LYFSDM) { | |
303 | - this.LYFSDM = LYFSDM; | |
304 | - } | |
305 | - | |
306 | - public String getLYFSMC() { | |
307 | - return LYFSMC; | |
308 | - } | |
309 | - | |
310 | - public void setLYFSMC(String LYFSMC) { | |
311 | - this.LYFSMC = LYFSMC; | |
312 | - } | |
313 | - | |
314 | - public String getJSYLJG() { | |
315 | - return JSYLJG; | |
316 | - } | |
317 | - | |
318 | - public void setJSYLJG(String JSYLJG) { | |
319 | - this.JSYLJG = JSYLJG; | |
320 | - } | |
321 | - | |
322 | - public String getMZZDBM() { | |
323 | - return MZZDBM; | |
324 | - } | |
325 | - | |
326 | - public void setMZZDBM(String MZZDBM) { | |
327 | - this.MZZDBM = MZZDBM; | |
328 | - } | |
329 | - | |
330 | - public String getMZZD() { | |
331 | - return MZZD; | |
332 | - } | |
333 | - | |
334 | - public void setMZZD(String MZZD) { | |
335 | - this.MZZD = MZZD; | |
336 | - } | |
337 | - | |
338 | - public String getZYZDBM() { | |
339 | - return ZYZDBM; | |
340 | - } | |
341 | - | |
342 | - public void setZYZDBM(String ZYZDBM) { | |
343 | - this.ZYZDBM = ZYZDBM; | |
344 | - } | |
345 | - | |
346 | - public String getRYZD() { | |
347 | - return RYZD; | |
348 | - } | |
349 | - | |
350 | - public void setRYZD(String RYZD) { | |
351 | - this.RYZD = RYZD; | |
352 | - } | |
353 | - | |
354 | - public String getZYZD() { | |
355 | - return ZYZD; | |
356 | - } | |
357 | - | |
358 | - public void setZYZD(String ZYZD) { | |
359 | - this.ZYZD = ZYZD; | |
360 | - } | |
361 | - | |
362 | 66 | @Override |
363 | 67 | public String toString() { |
364 | 68 | return "FmPatInfo{" + |
365 | - "SYXH='" + SYXH + '\'' + | |
366 | - ", YYDM='" + YYDM + '\'' + | |
367 | - ", BAHM='" + BAHM + '\'' + | |
368 | - ", ZYHM='" + ZYHM + '\'' + | |
369 | - ", BRXM='" + BRXM + '\'' + | |
370 | - ", BRXB='" + BRXB + '\'' + | |
371 | - ", CSNY='" + CSNY + '\'' + | |
372 | - ", DWDZ='" + DWDZ + '\'' + | |
373 | - ", DWDH='" + DWDH + '\'' + | |
374 | - ", DWYB='" + DWYB + '\'' + | |
375 | - ", HKDZ='" + HKDZ + '\'' + | |
376 | - ", HKDH='" + HKDH + '\'' + | |
377 | - ", LXRM='" + LXRM + '\'' + | |
378 | - ", LXDZ='" + LXDZ + '\'' + | |
379 | - ", LXDH='" + LXDH + '\'' + | |
380 | - ", RYKS='" + RYKS + '\'' + | |
381 | - ", RYBQ='" + RYBQ + '\'' + | |
382 | - ", RYCH='" + RYCH + '\'' + | |
383 | - ", RYRQ='" + RYRQ + '\'' + | |
384 | - ", CYKS='" + CYKS + '\'' + | |
385 | - ", CYBQ='" + CYBQ + '\'' + | |
386 | - ", CYCH='" + CYCH + '\'' + | |
387 | - ", CYRQ='" + CYRQ + '\'' + | |
388 | - ", ZYTS='" + ZYTS + '\'' + | |
389 | - ", ZYYS='" + ZYYS + '\'' + | |
390 | - ", ZZYS='" + ZZYS + '\'' + | |
391 | - ", ZRYS='" + ZRYS + '\'' + | |
392 | - ", KZR='" + KZR + '\'' + | |
393 | - ", HIS_SYXH='" + HIS_SYXH + '\'' + | |
394 | - ", QJCS='" + QJCS + '\'' + | |
395 | - ", CGCS='" + CGCS + '\'' + | |
396 | - ", LYFSDM='" + LYFSDM + '\'' + | |
397 | - ", LYFSMC='" + LYFSMC + '\'' + | |
398 | - ", JSYLJG='" + JSYLJG + '\'' + | |
399 | - ", MZZDBM='" + MZZDBM + '\'' + | |
400 | - ", MZZD='" + MZZD + '\'' + | |
401 | - ", ZYZDBM='" + ZYZDBM + '\'' + | |
402 | - ", RYZD='" + RYZD + '\'' + | |
403 | - ", ZYZD='" + ZYZD + '\'' + | |
69 | + "syxh='" + syxh + '\'' + | |
70 | + ", name='" + name + '\'' + | |
71 | + ", cardNo='" + cardNo + '\'' + | |
72 | + ", sex='" + sex + '\'' + | |
73 | + ", birth='" + birth + '\'' + | |
74 | + ", phone='" + phone + '\'' + | |
404 | 75 | '}'; |
405 | 76 | } |
406 | 77 | } |
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyFmService.java
View file @
e1147d7
... | ... | @@ -54,18 +54,22 @@ |
54 | 54 | String endStr = fmt.format(end); |
55 | 55 | System.out.println("start="+startStr+"end="+endStr); |
56 | 56 | ExceptionUtils.catchException("start="+startStr+"end="+endStr); |
57 | - queryFmPatient(startStr, endStr); | |
57 | + queryFmPatient(startStr, endStr,null); | |
58 | 58 | } |
59 | 59 | |
60 | 60 | public void syncWorker(String startStr,String endStr) { |
61 | 61 | System.out.println("sync start="+startStr+"end="+endStr); |
62 | 62 | ExceptionUtils.catchException("start="+startStr+"end="+endStr); |
63 | - queryFmPatient(startStr, endStr); | |
63 | + queryFmPatient(startStr, endStr,null); | |
64 | 64 | } |
65 | 65 | |
66 | + public void syncByPhone(String startStr,String endStr,String syxh) { | |
67 | + queryFmPatient(startStr, endStr,syxh); | |
68 | + } | |
66 | 69 | |
67 | - public void queryFmPatient(String start,String end) { | |
68 | 70 | |
71 | + public void queryFmPatient(String start,String end,String syxh) { | |
72 | + | |
69 | 73 | String cloumns = " SYXH as syxh,\n" + |
70 | 74 | " YEXH as yexh,\n" + |
71 | 75 | " JLRQ as jlrq,\t\n" + |
... | ... | @@ -110,7 +114,13 @@ |
110 | 114 | String sql ="select "+cloumns+" from JHMK_FMJL where " + |
111 | 115 | " CONVERT(DATETIME,left(SSRQ,8)+' '+RIGHT(SSRQ,8),20) > CONVERT(DATETIME,'"+start+"', 120) and CONVERT(DATETIME,left(SSRQ,8)+' '+RIGHT(SSRQ,8),20) <= CONVERT(DATETIME,'"+end+"', 120)" + |
112 | 116 | " and SYXH not in (select SYXH from JHMK_FMJL where JSZ is not null and SC is not null and TZ is not null and YFZ is not null and SH is not null" + |
113 | - " and (SFFZRSTDT = ' 是 ' or SFSTDT = ' 是 '))"; | |
117 | + " and (SFFZRSTDT = ' 是 ' or SFSTDT = ' 是 ')) "; | |
118 | + | |
119 | + if (StringUtils.isNotEmpty(syxh)) | |
120 | + { | |
121 | + sql+= " SYXH='"+syxh+"'"; | |
122 | + } | |
123 | + | |
114 | 124 | List<FmItem> list = queryRunner.query(conn, sql, new BeanListHandler<FmItem>(FmItem.class)); |
115 | 125 | ExceptionUtils.catchException("size====" + list.size()); |
116 | 126 | if (CollectionUtils.isNotEmpty(list)) { |
117 | 127 | |
... | ... | @@ -123,12 +133,12 @@ |
123 | 133 | } |
124 | 134 | Date dueDate = fmt.parse(dueDateStr); |
125 | 135 | FmPatInfo patInfo = getFmPatInfoById(item.getSyxh()); |
126 | - if (patInfo != null && com.lyms.platform.common.utils.StringUtils.isNotEmpty(patInfo.getLXDH())) { | |
136 | + if (patInfo != null && (StringUtils.isNotEmpty(patInfo.getPhone()) || StringUtils.isNotEmpty(patInfo.getCardNo())) ) { | |
127 | 137 | PatientsQuery query = new PatientsQuery(); |
128 | 138 | query.setYn(YnEnums.YES.getId()); |
129 | 139 | query.setType(1); //孕妇 |
130 | 140 | query.setDueStatus(0); //未终止妊娠 |
131 | - query.setPhone(patInfo.getLXDH()); | |
141 | + query.setPhoneOrCert(StringUtils.isNotEmpty(patInfo.getPhone()) ? patInfo.getPhone() : patInfo.getCardNo()); | |
132 | 142 | List<Patients> patientses = patientsService.queryPatient(query); |
133 | 143 | if (CollectionUtils.isNotEmpty(patientses)) { |
134 | 144 | Patients patient = patientses.get(0); |
135 | 145 | |
136 | 146 | |
137 | 147 | |
138 | 148 | |
... | ... | @@ -220,14 +230,19 @@ |
220 | 230 | } |
221 | 231 | |
222 | 232 | } |
233 | + else | |
234 | + { //秦皇岛服务器有分娩记录,但是在这边系统没有对于孕妇 取分娩信息建档儿童数据 | |
235 | + buildBaby( item, patInfo, dueDateStr, dueDate); | |
236 | + } | |
223 | 237 | } |
224 | 238 | else |
225 | - //秦皇岛服务器有分娩记录,但是在这边系统没有对于孕妇 取分娩信息建档儿童数据 | |
226 | 239 | { |
227 | - buildBaby( item, patInfo, dueDateStr, dueDate); | |
228 | 240 | |
241 | + //没有找到孕妇建档的基本信息 记录下来 | |
242 | + saveFmrecord(item.getSfz()); | |
229 | 243 | } |
230 | 244 | |
245 | + | |
231 | 246 | } catch (Exception e) |
232 | 247 | { |
233 | 248 | ExceptionUtils.catchException(e, "数据异常"); |
234 | 249 | |
... | ... | @@ -269,13 +284,13 @@ |
269 | 284 | } |
270 | 285 | Date dueDate = fmt.parse(dueDateStr); |
271 | 286 | FmPatInfo patInfo = getFmPatInfoById(item.getSyxh()); |
272 | - if (patInfo != null && com.lyms.platform.common.utils.StringUtils.isNotEmpty(patInfo.getLXDH())) | |
287 | + if (patInfo != null && (StringUtils.isNotEmpty(patInfo.getPhone()) || StringUtils.isNotEmpty(patInfo.getCardNo()))) | |
273 | 288 | { |
274 | 289 | PatientsQuery query = new PatientsQuery(); |
275 | 290 | query.setYn(YnEnums.YES.getId()); |
276 | 291 | query.setType(1); //孕妇 |
277 | 292 | query.setDueStatus(0); //未终止妊娠 |
278 | - query.setPhone(patInfo.getLXDH()); | |
293 | + query.setPhoneOrCert(StringUtils.isNotEmpty(patInfo.getPhone()) ? patInfo.getPhone() : patInfo.getCardNo()); | |
279 | 294 | List<Patients> patientses = patientsService.queryPatient(query); |
280 | 295 | if (CollectionUtils.isNotEmpty(patientses)) |
281 | 296 | { |
282 | 297 | |
283 | 298 | |
284 | 299 | |
285 | 300 | |
286 | 301 | |
... | ... | @@ -401,22 +416,26 @@ |
401 | 416 | } |
402 | 417 | |
403 | 418 | } |
404 | - } | |
405 | - else | |
406 | - { | |
407 | - for (FmItem i : items) | |
419 | + else | |
408 | 420 | { |
409 | - String dueDateStr1 = i.getSsrq(); | |
410 | - if (!StringUtils.isNotEmpty(dueDateStr1)) | |
421 | + for (FmItem i : items) | |
411 | 422 | { |
412 | - continue; | |
423 | + String dueDateStr1 = i.getSsrq(); | |
424 | + if (!StringUtils.isNotEmpty(dueDateStr1)) | |
425 | + { | |
426 | + continue; | |
427 | + } | |
428 | + Date dueDate1 = fmt.parse(dueDateStr1); | |
429 | + buildBaby( i,patInfo, dueDateStr1, dueDate1); | |
413 | 430 | } |
414 | - Date dueDate1 = fmt.parse(dueDateStr1); | |
415 | - buildBaby( i,patInfo, dueDateStr1, dueDate1); | |
416 | - } | |
417 | 431 | |
432 | + } | |
418 | 433 | } |
419 | - | |
434 | + else | |
435 | + { | |
436 | + //没有找到孕妇建档的基本信息 记录下来 | |
437 | + saveFmrecord(item.getSfz()); | |
438 | + } | |
420 | 439 | } |
421 | 440 | } |
422 | 441 | } |
... | ... | @@ -437,6 +456,14 @@ |
437 | 456 | } |
438 | 457 | |
439 | 458 | |
459 | + private void saveFmrecord(String syxh) | |
460 | + { | |
461 | + FmRecordModel fmRecordModel = new FmRecordModel(); | |
462 | + fmRecordModel.setSyxh(syxh); | |
463 | + babyBookbuildingFacade.saveFmrecord(fmRecordModel); | |
464 | + } | |
465 | + | |
466 | + | |
440 | 467 | public void buildBaby(FmItem item,FmPatInfo patInfo, String dueDateStr,Date dueDate) |
441 | 468 | { |
442 | 469 | try{ |
... | ... | @@ -448,11 +475,36 @@ |
448 | 475 | BabyBookbuildingAddRequest request = new BabyBookbuildingAddRequest(); |
449 | 476 | request.setHospitalId("216"); |
450 | 477 | |
451 | - request.setMommyName(patInfo.getBRXM()); //母亲姓名 | |
452 | - request.setMommyCertificateTypeId("57e0a21c0cf209b410a82cda"); //证件类型 (手机号码) | |
453 | - request.setMommyCertificateNum(patInfo.getLXDH()); //证件号 | |
454 | - request.setMommyPhone(patInfo.getLXDH()); | |
455 | - String babyName = patInfo.getBRXM()+("男".equals(item.getYexb()) ? "之子" : "之女"); | |
478 | + request.setMommyName(patInfo.getName()); //母亲姓名 | |
479 | + | |
480 | + if (StringUtils.isNotEmpty(patInfo.getBirth())) | |
481 | + { | |
482 | + try { | |
483 | + SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd"); | |
484 | + Date birth = format.parse(patInfo.getBirth()); | |
485 | + format = new SimpleDateFormat("yyyy-MM-dd"); | |
486 | + request.setMommyBirthday(format.format(birth)); | |
487 | + }catch (ParseException e) | |
488 | + { | |
489 | + ExceptionUtils.catchException(e,"孕妇生日解析异常"); | |
490 | + } | |
491 | + | |
492 | + } | |
493 | + | |
494 | + | |
495 | + if (StringUtils.isNotEmpty(patInfo.getCardNo())) | |
496 | + { | |
497 | + request.setMommyCertificateTypeId("70ae1d93-2964-46bc-83fa-bec9ff605b1c"); //证件类型 (身份证号码) | |
498 | + request.setMommyCertificateNum(patInfo.getCardNo()); //证件号 | |
499 | + } | |
500 | + else if (StringUtils.isNotEmpty(patInfo.getPhone())) | |
501 | + { | |
502 | + request.setMommyCertificateTypeId("57e1dcd3f0f02e7ca519d6c6"); //证件类型 (手机号码) | |
503 | + request.setMommyCertificateNum(patInfo.getPhone()); //证件号 | |
504 | + } | |
505 | + | |
506 | + request.setMommyPhone(patInfo.getPhone()); | |
507 | + String babyName = item.getYexb()+("男".equals(item.getYexb()) ? "之子" : "之女"); | |
456 | 508 | request.setBabyName(babyName); |
457 | 509 | request.setSex("男".equals(item.getYexb()) ? 1 : 0); |
458 | 510 | |
... | ... | @@ -499,7 +551,6 @@ |
499 | 551 | request.setServiceType(ServiceTypeEnums.STANDARD_SERVICE.getId()); //标准服务 |
500 | 552 | request.setServiceStatus(ServiceStatusEnums.STANDARD_OPEN.getId()); //开通 |
501 | 553 | |
502 | - | |
503 | 554 | babyBookbuildingFacade.addBabyBookbuilding(request, users.get(0).getId()); |
504 | 555 | }catch (Exception e) |
505 | 556 | { |
506 | 557 | |
... | ... | @@ -521,9 +572,17 @@ |
521 | 572 | Connection conn = ConnTools.makeFmConnection(); |
522 | 573 | QueryRunner queryRunner = new QueryRunner(); |
523 | 574 | try { |
524 | - List<FmPatInfo> list = queryRunner.query(conn, "SELECT * FROM JHMK_BASY WHERE SYXH = '"+syxh+"'", new BeanListHandler<FmPatInfo>(FmPatInfo.class)); | |
575 | + | |
576 | + List<FmPatInfo> list = queryRunner.query(conn, "SELECT syxh,hzxm as name,sfzh as cardNo,sex as sex,birth,lxrdh as phone FROM THIS4_BASY WHERE lxrdh <> '' and hzxm is not null and hzxm <> '' and len(lxrdh) = 11 and syxh = '"+syxh+"'", new BeanListHandler<FmPatInfo>(FmPatInfo.class)); | |
525 | 577 | if (CollectionUtils.isNotEmpty(list)) { |
526 | 578 | return list.get(0); |
579 | + } | |
580 | + else | |
581 | + { | |
582 | + List<FmPatInfo> list1 = queryRunner.query(conn, "SELECT SYXH as syxh, BRXM as name,'' as cardNo,BRXB as sex,'' as birth,LXDH as phone FROM JHMK_BASY WHERE len(LXDH) = 11 and SYXH = '"+syxh+"'", new BeanListHandler<FmPatInfo>(FmPatInfo.class)); | |
583 | + if (CollectionUtils.isNotEmpty(list1)) { | |
584 | + return list.get(0); | |
585 | + } | |
527 | 586 | } |
528 | 587 | DbUtils.closeQuietly(conn); |
529 | 588 | } catch (SQLException e) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
e1147d7
... | ... | @@ -997,6 +997,13 @@ |
997 | 997 | return "syncFmData finish"; |
998 | 998 | } |
999 | 999 | |
1000 | + @RequestMapping(value = "/syncFmBySyxh", method = RequestMethod.GET) | |
1001 | + @ResponseBody | |
1002 | + public String syncFmBySyxh(@RequestParam(required = true) String start,@RequestParam(required = true) String end,@RequestParam(required = true) String syxh) { | |
1003 | + qhdfyFmService.syncByPhone(start,end,syxh); | |
1004 | + return "syncFmBySyxh finish"; | |
1005 | + } | |
1006 | + | |
1000 | 1007 | public static void main(String[] a) { |
1001 | 1008 | try { |
1002 | 1009 | List<String> list = FileUtils.readLines(new File("D:\\QHD.csv"), "gbk"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
e1147d7