Commit d2ab14d58e7c7ce4f5837b6cab2133d6a2bef001
1 parent
9302ce9524
Exists in
master
and in
6 other branches
美生县医院系统数据分析报告-4.2-儿保检查
Showing 2 changed files with 83 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyCheckController.java
View file @
d2ab14d
| ... | ... | @@ -23,6 +23,7 @@ |
| 23 | 23 | |
| 24 | 24 | import javax.servlet.http.HttpServletRequest; |
| 25 | 25 | import javax.validation.Valid; |
| 26 | +import java.util.Date; | |
| 26 | 27 | |
| 27 | 28 | |
| 28 | 29 | /** |
| ... | ... | @@ -659,6 +660,23 @@ |
| 659 | 660 | @RequestParam(required = true) Integer page, |
| 660 | 661 | @RequestParam(required = true) Integer limit) { |
| 661 | 662 | return babyCheckFacade.getBabyCheckHemoglobinDetails(hospitalId,checkDate,ageType,hemoglobinType,page,limit); |
| 663 | + } | |
| 664 | + | |
| 665 | + /** | |
| 666 | + * 统计管理-孕产妇数据统计-儿保检查 | |
| 667 | + * | |
| 668 | + * @param hospitalId | |
| 669 | + * @param startDate | |
| 670 | + * @param endDate | |
| 671 | + * @return | |
| 672 | + */ | |
| 673 | + @RequestMapping(value = "/getBabyCheckStatis", method = RequestMethod.GET) | |
| 674 | + @ResponseBody | |
| 675 | + @TokenRequired | |
| 676 | + public BaseResponse getBabyCheckStatis(@RequestParam(required = true)String hospitalId, | |
| 677 | + @RequestParam(required = true) Date startDate, | |
| 678 | + @RequestParam(required = true)Date endDate) { | |
| 679 | + return babyCheckFacade.getBabyCheckStatis(hospitalId, startDate, endDate); | |
| 662 | 680 | } |
| 663 | 681 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
View file @
d2ab14d
| ... | ... | @@ -4909,5 +4909,70 @@ |
| 4909 | 4909 | } |
| 4910 | 4910 | return new BaseObjectResponse().setData(mapList).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setPageInfo(query.getPageInfo()); |
| 4911 | 4911 | } |
| 4912 | + | |
| 4913 | + public BaseResponse getBabyCheckStatis(String hospitalId, Date startDate, Date endDate) { | |
| 4914 | + BaseResponse br=new BaseResponse(); | |
| 4915 | + Map<String,Integer> map=new HashMap<>(); | |
| 4916 | +// long month0=0,month1=0,month0=0,month0=0,month0=0,month0=0,month0=0,month0=0,month0=0,month0=0,month0=0, | |
| 4917 | +// month0=0,month0=0,month0=0,month0=0,month0=0,month0=0,month0=0month0=0month0=0,month0=0,month0=0, | |
| 4918 | +// ; | |
| 4919 | + BabyCheckModelQuery query = new BabyCheckModelQuery(); | |
| 4920 | + query.setHospitalId(hospitalId); | |
| 4921 | + query.setYn(YnEnums.YES.getId()); | |
| 4922 | + query.setCheckDateStart(startDate); | |
| 4923 | + query.setCheckDateEnd(endDate); | |
| 4924 | + List<BabyCheckModel> babyCheckModels = babyCheckService.queryBabyCheckRecords(query); | |
| 4925 | + int total=0; | |
| 4926 | + for (BabyCheckModel babyCheckModel : babyCheckModels) { | |
| 4927 | + for (int i=0;i<41;i++){ | |
| 4928 | + if(map.get("month"+i)==null){ | |
| 4929 | + map.put("month"+i,0); | |
| 4930 | + } | |
| 4931 | + switch (i){ | |
| 4932 | + case 36: | |
| 4933 | + if(babyCheckModel.getCheckMonth()>35&&babyCheckModel.getCheckMonth()<48){ | |
| 4934 | + map.put("month"+i,map.get("month"+i)+1); | |
| 4935 | + total++; | |
| 4936 | + } | |
| 4937 | + break; | |
| 4938 | + case 37: | |
| 4939 | + if(babyCheckModel.getCheckMonth()>47&&babyCheckModel.getCheckMonth()<60){ | |
| 4940 | + map.put("month"+i,map.get("month"+i)+1); | |
| 4941 | + total++; | |
| 4942 | + } | |
| 4943 | + break; | |
| 4944 | + case 38: | |
| 4945 | + if(babyCheckModel.getCheckMonth()>59&&babyCheckModel.getCheckMonth()<72){ | |
| 4946 | + map.put("month"+i,map.get("month"+i)+1); | |
| 4947 | + total++; | |
| 4948 | + } | |
| 4949 | + break; | |
| 4950 | + case 39: | |
| 4951 | + if(babyCheckModel.getCheckMonth()>71&&babyCheckModel.getCheckMonth()<84){ | |
| 4952 | + map.put("month"+i,map.get("month"+i)+1); | |
| 4953 | + total++; | |
| 4954 | + } | |
| 4955 | + break; | |
| 4956 | + case 40: | |
| 4957 | + if(babyCheckModel.getCheckMonth()>83){ | |
| 4958 | + map.put("month"+i,map.get("month"+i)+1); | |
| 4959 | + total++; | |
| 4960 | + } | |
| 4961 | + break; | |
| 4962 | + default: | |
| 4963 | + if(i==babyCheckModel.getCheckMonth()){ | |
| 4964 | + map.put("month"+i,map.get("month"+i)+1); | |
| 4965 | + total++; | |
| 4966 | + } | |
| 4967 | + break; | |
| 4968 | + } | |
| 4969 | + } | |
| 4970 | + } | |
| 4971 | + map.put("total", total); | |
| 4972 | + br.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 4973 | + br.setErrormsg("成功"); | |
| 4974 | + br.setObject(map); | |
| 4975 | + return br; | |
| 4976 | + } | |
| 4912 | 4977 | } |