Commit 54c6923eb0da8bcd4c73a6872e3545740c9f7077
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 2 changed files
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MeasureInfoController.java
View file @
54c6923
... | ... | @@ -103,6 +103,26 @@ |
103 | 103 | |
104 | 104 | |
105 | 105 | /** |
106 | + * 查询院内系统孕妇基本信息 只查询院内系统 | |
107 | + * @param certType | |
108 | + * @param certNo | |
109 | + * @param hospitalId | |
110 | + * @param request | |
111 | + * @return | |
112 | + */ | |
113 | + @RequestMapping(method = RequestMethod.GET, value = "/getSystemPatientBaseInfo") | |
114 | + @ResponseBody | |
115 | + public BaseObjectResponse getSystemPatientBaseInfo(@RequestParam(value = "certType", required = true) String certType, | |
116 | + @RequestParam(value = "certNo", required = true) String certNo, | |
117 | + @RequestParam(value = "hospitalId", required = true) String hospitalId, | |
118 | + HttpServletRequest request | |
119 | + ) | |
120 | + { | |
121 | + return measureInfoFacade.getSystemPatientBaseInfo(certType, certNo, hospitalId); | |
122 | + } | |
123 | + | |
124 | + | |
125 | + /** | |
106 | 126 | * 查询测量人的信息 |
107 | 127 | * @param certType |
108 | 128 | * @param certNo |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MeasureInfoFacade.java
View file @
54c6923
... | ... | @@ -93,7 +93,7 @@ |
93 | 93 | |
94 | 94 | private static String[] blood_item = new String[]{"--","--","--","--","--","--","--","--","--"}; |
95 | 95 | |
96 | - private static Integer MAX_TODAY_COUNT = 5; | |
96 | + private static Integer MAX_TODAY_COUNT = 10000; | |
97 | 97 | |
98 | 98 | public BaseListResponse queryMeasureInfoList(String queryNo, |
99 | 99 | Integer valueType, String vcCardNo, |
... | ... | @@ -195,6 +195,95 @@ |
195 | 195 | return objectResponse; |
196 | 196 | } |
197 | 197 | |
198 | + | |
199 | + public BaseObjectResponse getSystemPatientBaseInfo(String certType, String certNo, String hospitalId) { | |
200 | + MeasureBaseInfoResult result = new MeasureBaseInfoResult(); | |
201 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
202 | + patientsQuery.setHospitalId(hospitalId); | |
203 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
204 | + | |
205 | + if ("1".equals(certType)) | |
206 | + { | |
207 | + patientsQuery.setVcCardNo(certNo); | |
208 | + } | |
209 | + else | |
210 | + { | |
211 | + patientsQuery.setPcerteTypeId(certType); | |
212 | + patientsQuery.setCardNo(certNo); | |
213 | + } | |
214 | + BaseObjectResponse objectResponse = new BaseObjectResponse(); | |
215 | + | |
216 | + List<Patients> patientsList = patientsService.queryPatient(patientsQuery); | |
217 | + if (CollectionUtils.isNotEmpty(patientsList)) | |
218 | + { | |
219 | + Patients patients = patientsList.get(0); | |
220 | + | |
221 | + | |
222 | + //户籍地址 | |
223 | + String addressRegister = CommonsHelper.getResidence(patients.getProvinceRegisterId(), patients.getCityRegisterId(), | |
224 | + patients.getAreaRegisterId(), patients.getStreetRegisterId(), patients.getAddressRegister(), basicConfigService); | |
225 | + | |
226 | + MeasureUserInfoQuery query = new MeasureUserInfoQuery(); | |
227 | + query.setHospitalId(hospitalId); | |
228 | + query.setCertType(patients.getPcerteTypeId()); | |
229 | + query.setCertNo(patients.getCardNo()); | |
230 | + | |
231 | + | |
232 | + List<MeasureUserInfoModel> models = mysqlMeasureUserInfoService.queryMeasureUserInfoList(query); | |
233 | + if (CollectionUtils.isNotEmpty(models)) | |
234 | + { | |
235 | + MeasureUserInfoModel userInfo = models.get(0); | |
236 | + userInfo.setVcCardNo(patients.getVcCardNo()); | |
237 | + userInfo.setModified(new Date()); | |
238 | + mysqlMeasureUserInfoService.updateMeasureUserInfo(userInfo); | |
239 | + } | |
240 | + else | |
241 | + { | |
242 | + MeasureUserInfoModel model = new MeasureUserInfoModel(); | |
243 | + | |
244 | + model.setUserName(patients.getUsername()); | |
245 | + model.setCertType(patients.getPcerteTypeId()); | |
246 | + model.setCertNo(patients.getCardNo()); | |
247 | + model.setHospitalId(patients.getHospitalId()); | |
248 | + model.setPhone(patients.getPhone()); | |
249 | + model.setSex(0); | |
250 | + if (patients.getBirth() != null) { | |
251 | + model.setAge(DateUtil.getAge(patients.getBirth(), new Date())+""); | |
252 | + } | |
253 | + model.setVcCardNo(patients.getVcCardNo()); | |
254 | + model.setAddress(addressRegister); | |
255 | + model.setCreated(new Date()); | |
256 | + model.setModified(new Date()); | |
257 | + mysqlMeasureUserInfoService.addMeasureUserInfo(model); | |
258 | + } | |
259 | + | |
260 | + result.setHospitalId(patients.getHospitalId()); | |
261 | + result.setUserName(patients.getUsername()); | |
262 | + result.setPhone(patients.getPhone()); | |
263 | + result.setVcCardNo(patients.getVcCardNo()); | |
264 | + result.setCertNo(patients.getCardNo()); | |
265 | + result.setCertType(patients.getPcerteTypeId()); | |
266 | + | |
267 | + result.setAddress(addressRegister); | |
268 | + result.setSex(String.valueOf(0)); | |
269 | + if (patients.getBirth() != null) { | |
270 | + result.setAge(DateUtil.getAge(patients.getBirth(), new Date())+""); | |
271 | + } | |
272 | + } | |
273 | + else | |
274 | + { | |
275 | + objectResponse.setErrorcode(ErrorCodeConstants.NO_DATA); | |
276 | + objectResponse.setErrormsg("没有建档,请建档后测量"); | |
277 | + return objectResponse; | |
278 | + } | |
279 | + | |
280 | + objectResponse.setData(result); | |
281 | + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); | |
282 | + objectResponse.setErrormsg("成功"); | |
283 | + return objectResponse; | |
284 | + } | |
285 | + | |
286 | + | |
198 | 287 | public BaseObjectResponse getMeasureBaseInfo(String certType, String certNo, String hospitalId) { |
199 | 288 | MeasureBaseInfoResult result = new MeasureBaseInfoResult(); |
200 | 289 | MeasureUserInfoQuery query = new MeasureUserInfoQuery(); |
... | ... | @@ -939,7 +1028,7 @@ |
939 | 1028 | public BaseObjectResponse getFaceInfo(String patientId) { |
940 | 1029 | Patients patients = patientsService.findOnePatientById(patientId); |
941 | 1030 | Map<String,String> faceData = new HashMap<>(); |
942 | - faceData.put("face",patients.getFace() == null ? "" : patients.getFace()); | |
1031 | + faceData.put("face", patients.getFace() == null ? "" : patients.getFace()); | |
943 | 1032 | BaseObjectResponse objectResponse = new BaseObjectResponse(); |
944 | 1033 | objectResponse.setData(faceData); |
945 | 1034 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
... | ... | @@ -1123,5 +1212,7 @@ |
1123 | 1212 | objectResponse.setErrormsg("成功"); |
1124 | 1213 | return objectResponse; |
1125 | 1214 | } |
1215 | + | |
1216 | + | |
1126 | 1217 | } |