Commit 605c525559ac39e368334743357f5953529e1f3d
1 parent
cda5136abd
Exists in
master
and in
6 other branches
update
Showing 3 changed files with 109 additions and 3 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
View file @
605c525
| ... | ... | @@ -643,5 +643,19 @@ |
| 643 | 643 | return antenatalExaminationFacade.getDoctorWxPatientInfo(id); |
| 644 | 644 | } |
| 645 | 645 | |
| 646 | + | |
| 647 | + /** | |
| 648 | + * 免费与收费统计 | |
| 649 | + * @param checkTime | |
| 650 | + * @param request | |
| 651 | + * @return | |
| 652 | + */ | |
| 653 | + @RequestMapping(method = RequestMethod.GET, value = "/antexCheckCount") | |
| 654 | + @ResponseBody | |
| 655 | + public BaseResponse antexCheckCount(@PathVariable String checkTime, HttpServletRequest request) { | |
| 656 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 657 | + return antenatalExaminationFacade.antexCheckCount(checkTime,loginState.getId()); | |
| 658 | + } | |
| 659 | + | |
| 646 | 660 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
605c525
| ... | ... | @@ -2568,7 +2568,7 @@ |
| 2568 | 2568 | |
| 2569 | 2569 | private void sortList(List listDate) { |
| 2570 | 2570 | //按照数据排序 |
| 2571 | - Collections.sort(listDate, new Comparator <SortIn>() { | |
| 2571 | + Collections.sort(listDate, new Comparator<SortIn>() { | |
| 2572 | 2572 | @Override |
| 2573 | 2573 | public int compare(SortIn o1, SortIn o2) { |
| 2574 | 2574 | if (o1.getDate() != null && null != o2.getDate() && o1.getDate().after(o2.getDate())) { |
| ... | ... | @@ -4809,7 +4809,7 @@ |
| 4809 | 4809 | org.springframework.beans.BeanUtils.copyProperties(antExcAddRequest, autoRiskRequest); |
| 4810 | 4810 | String fid = antExcAddRequest.getId(); |
| 4811 | 4811 | System.out.println("autoExcRisk fid = " + fid); |
| 4812 | - List <Map <String, String>> riskList = autoRisk(autoRiskRequest, pat.getHospitalId(), 1); | |
| 4812 | + List<Map<String, String>> riskList = autoRisk(autoRiskRequest, pat.getHospitalId(), 1); | |
| 4813 | 4813 | saveAutoRisk(riskList, fid, pat.getHospitalId(), pat.getPid(), pat.getId(), 1); |
| 4814 | 4814 | } |
| 4815 | 4815 | }); |
| ... | ... | @@ -6343,5 +6343,97 @@ |
| 6343 | 6343 | } |
| 6344 | 6344 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(result); |
| 6345 | 6345 | } |
| 6346 | + | |
| 6347 | + | |
| 6348 | + | |
| 6349 | + public BaseResponse antexCheckCount(String checkTime,Integer userId) { | |
| 6350 | + | |
| 6351 | + | |
| 6352 | + Map data = new HashMap(); | |
| 6353 | + | |
| 6354 | + Date startDate = null; | |
| 6355 | + Date endDate = null; | |
| 6356 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(checkTime)) | |
| 6357 | + { | |
| 6358 | + String[] arrs = checkTime.split(" - "); | |
| 6359 | + startDate = DateUtil.getDayFirstSecond(DateUtil.parseYMD(arrs[0])); | |
| 6360 | + endDate = DateUtil.getDayLastSecond(DateUtil.parseYMD(arrs[1])); | |
| 6361 | + } | |
| 6362 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
| 6363 | + Criteria criteria = Criteria.where("hospitalId").is(hospitalId).and("xhdb").exists(true); | |
| 6364 | + if (startDate != null) | |
| 6365 | + { | |
| 6366 | + criteria.and("checkTime").gte(startDate).lte(endDate); | |
| 6367 | + } | |
| 6368 | + int xcg = (int)mongoTemplate.count(Query.query(criteria), AntExChuModel.class); | |
| 6369 | + | |
| 6370 | + | |
| 6371 | + Criteria criteria1 = Criteria.where("hospitalId").is(hospitalId).and("ndb").exists(true); | |
| 6372 | + if (startDate != null) | |
| 6373 | + { | |
| 6374 | + criteria1.and("checkTime").gte(startDate).lte(endDate); | |
| 6375 | + } | |
| 6376 | + int ncg = (int)mongoTemplate.count(Query.query(criteria1), AntExChuModel.class); | |
| 6377 | + | |
| 6378 | + | |
| 6379 | + Criteria criteria2 = Criteria.where("hospitalId").is(hospitalId).and("hivkt").exists(true); | |
| 6380 | + if (startDate != null) | |
| 6381 | + { | |
| 6382 | + criteria2.and("checkTime").gte(startDate).lte(endDate); | |
| 6383 | + } | |
| 6384 | + int amy = (int)mongoTemplate.count(Query.query(criteria2), AntExChuModel.class); | |
| 6385 | + | |
| 6386 | + | |
| 6387 | + Criteria criteria3 = Criteria.where("hospitalId").is(hospitalId).and("ygbmky").exists(true); | |
| 6388 | + if (startDate != null) | |
| 6389 | + { | |
| 6390 | + criteria3.and("checkTime").gte(startDate).lte(endDate); | |
| 6391 | + } | |
| 6392 | + int gg = (int)mongoTemplate.count(Query.query(criteria3), AntExChuModel.class); | |
| 6393 | + | |
| 6394 | + | |
| 6395 | + | |
| 6396 | + Criteria criteria4 = Criteria.where("hospitalId").is(hospitalId).and("fTthree").exists(true); | |
| 6397 | + if (startDate != null) | |
| 6398 | + { | |
| 6399 | + criteria4.and("checkTime").gte(startDate).lte(endDate); | |
| 6400 | + } | |
| 6401 | + int jg = (int)mongoTemplate.count(Query.query(criteria4), AntExChuModel.class); | |
| 6402 | + | |
| 6403 | + | |
| 6404 | + | |
| 6405 | + Criteria criteria5 = Criteria.where("hospitalId").is(hospitalId).and("bg").exists(true); | |
| 6406 | + if (startDate != null) | |
| 6407 | + { | |
| 6408 | + criteria5.and("checkTime").gte(startDate).lte(endDate); | |
| 6409 | + } | |
| 6410 | + int bg = (int)mongoTemplate.count(Query.query(criteria5), AntExChuModel.class); | |
| 6411 | + | |
| 6412 | + Criteria criteria6 = Criteria.where("hospitalId").is(hospitalId).and("bChao").exists(true); | |
| 6413 | + if (startDate != null) | |
| 6414 | + { | |
| 6415 | + criteria6.and("checkTime").gte(startDate).lte(endDate); | |
| 6416 | + } | |
| 6417 | + int bc = (int)mongoTemplate.count(Query.query(criteria6), AntExChuModel.class); | |
| 6418 | + | |
| 6419 | + | |
| 6420 | + Criteria criteria7 = Criteria.where("hospitalId").is(hospitalId).and("tx").exists(true); | |
| 6421 | + if (startDate != null) | |
| 6422 | + { | |
| 6423 | + criteria7.and("checkTime").gte(startDate).lte(endDate); | |
| 6424 | + } | |
| 6425 | + int tx = (int)mongoTemplate.count(Query.query(criteria7), AntExChuModel.class); | |
| 6426 | + | |
| 6427 | + data.put("xcg",xcg); | |
| 6428 | + data.put("ncg",ncg); | |
| 6429 | + data.put("amy",amy); | |
| 6430 | + data.put("gg",gg); | |
| 6431 | + data.put("jg",jg); | |
| 6432 | + data.put("bg",bg); | |
| 6433 | + data.put("bc",bc); | |
| 6434 | + data.put("tx",tx); | |
| 6435 | + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(data); | |
| 6436 | + } | |
| 6437 | + | |
| 6346 | 6438 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java
View file @
605c525
| ... | ... | @@ -1240,7 +1240,7 @@ |
| 1240 | 1240 | query.setId(addRequest.getId()); |
| 1241 | 1241 | List<ResidentsArchiveModel> modelList = residentsArchiveService.queryResident(query); |
| 1242 | 1242 | if (CollectionUtils.isNotEmpty(modelList)) { |
| 1243 | - residentsArchiveService.updateResident(modelList.get(0),modelList.get(0).getId()); | |
| 1243 | + residentsArchiveService.updateResident(addRequest,addRequest.getId()); | |
| 1244 | 1244 | } |
| 1245 | 1245 | else |
| 1246 | 1246 | { |