Commit 44c00bdf2d96484c3910afcb23fe2c8bf01afa34
1 parent
cf680ef28d
Exists in
master
and in
6 other branches
update
Showing 3 changed files with 61 additions and 3 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyCheckController.java
View file @
44c00bd
... | ... | @@ -190,7 +190,7 @@ |
190 | 190 | @RequestParam(value = "level", required = false) String level, |
191 | 191 | Integer page, Integer limit, HttpServletRequest request) { |
192 | 192 | return babyCheckFacade.babyCheckList(checkTime, queryNo, startCheckMonthAge, endCheckMonthAge, |
193 | - nextDate, highRisk, waskSon, checkDoctorId, page, limit, getUserId(request),level); | |
193 | + nextDate, highRisk, waskSon, checkDoctorId, page, limit, getUserId(request), level); | |
194 | 194 | } |
195 | 195 | |
196 | 196 | /** |
... | ... | @@ -550,7 +550,16 @@ |
550 | 550 | } |
551 | 551 | |
552 | 552 | |
553 | - | |
553 | + /** | |
554 | + * 儿童年报表统计 | |
555 | + * @param checkTime | |
556 | + * @param hospitalId | |
557 | + * @param provinceId | |
558 | + * @param cityId | |
559 | + * @param areaId | |
560 | + * @param request | |
561 | + * @return | |
562 | + */ | |
554 | 563 | @RequestMapping(method = RequestMethod.GET, value = "/getOrgBabyCount") |
555 | 564 | @ResponseBody |
556 | 565 | @TokenRequired |
557 | 566 | |
... | ... | @@ -561,8 +570,22 @@ |
561 | 570 | @RequestParam(required = false) String areaId, |
562 | 571 | |
563 | 572 | HttpServletRequest request) { |
564 | - return babyCheckFacade.getOrgBabyCount(checkTime,hospitalId,provinceId,cityId,areaId, getUserId(request)); | |
573 | + return babyCheckFacade.getOrgBabyCount(checkTime, hospitalId, provinceId, cityId, areaId, getUserId(request)); | |
565 | 574 | } |
566 | 575 | |
576 | + | |
577 | + /** | |
578 | + *儿童健康管理率统计 | |
579 | + * @param checkTime | |
580 | + * @param request | |
581 | + * @return | |
582 | + */ | |
583 | + @RequestMapping(method = RequestMethod.GET, value = "/getBabyManageRateCount") | |
584 | + @ResponseBody | |
585 | + @TokenRequired | |
586 | + public BaseResponse getBabyManageRateCount(@RequestParam(required = false) String checkTime, | |
587 | + HttpServletRequest request) { | |
588 | + return babyCheckFacade.getBabyManageRateCount(checkTime, getUserId(request)); | |
589 | + } | |
567 | 590 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
View file @
44c00bd
... | ... | @@ -4239,5 +4239,36 @@ |
4239 | 4239 | private ThreadPoolTaskExecutor commonThreadPool; |
4240 | 4240 | @Autowired |
4241 | 4241 | private MysqlAntexcService mysqlAntexcService; |
4242 | + | |
4243 | + | |
4244 | + | |
4245 | + public BaseResponse getBabyManageRateCount(String checkTime, Integer userId) { | |
4246 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
4247 | + List<Map> datas = new LinkedList<>(); | |
4248 | + Date startDate = null; | |
4249 | + Date endDate = null; | |
4250 | + if (StringUtils.isNotEmpty(checkTime)) | |
4251 | + { | |
4252 | + String[] arrs = checkTime.split(" - "); | |
4253 | + startDate = DateUtil.getDayFirstSecond(DateUtil.parseYMD(arrs[0])); | |
4254 | + endDate = DateUtil.getDayLastSecond(DateUtil.parseYMD(arrs[1])); | |
4255 | + } | |
4256 | + | |
4257 | + | |
4258 | + int allBaby = getCheckCount(hospitalId, startDate,endDate,new ArrayList<Integer>()); | |
4259 | + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setData(datas).setErrormsg("成功"); | |
4260 | + } | |
4261 | + | |
4262 | + | |
4263 | + | |
4264 | + private int getCheckCount(String hospitalId, Date start, Date end,List<Integer> checkMonths) { | |
4265 | + Aggregation aggregation4 = | |
4266 | + Aggregation.newAggregation( | |
4267 | + Aggregation.match(Criteria.where("hospitalId").is(hospitalId).and("checkDate").gte(start).lte(end).and("checkMonth").in(checkMonths)), | |
4268 | + Aggregation.group("buildId").count().as("总人数")); | |
4269 | + AggregationResults <BasicDBObject> outputTypeCount4 = | |
4270 | + mongoTemplate.aggregate(aggregation4, "lyms_babycheck", BasicDBObject.class); | |
4271 | + return outputTypeCount4.getMappedResults().size(); | |
4272 | + } | |
4242 | 4273 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
44c00bd
... | ... | @@ -2028,6 +2028,8 @@ |
2028 | 2028 | data.put("cardNo", rp.getCardNo()); |
2029 | 2029 | data.put("vcCardNo", rp.getVcCardNo()); |
2030 | 2030 | } |
2031 | + data.put("cardNo", rp.getCardNo()); | |
2032 | + data.put("addr", rp.getAddr()); | |
2031 | 2033 | data.put("dueWeek", rp.getDueWeek()); |
2032 | 2034 | data.put("rLevel", getLevel(rp.getrLevel())); |
2033 | 2035 | data.put("cTimes", rp.getcTimes()); |
... | ... | @@ -2047,6 +2049,8 @@ |
2047 | 2049 | cnames.put("cardNo", "身份证"); |
2048 | 2050 | cnames.put("vcCardNo", "就诊卡号"); |
2049 | 2051 | } |
2052 | + cnames.put("cardNo", "身份证"); | |
2053 | + cnames.put("addr", "居住地址"); | |
2050 | 2054 | cnames.put("dueWeek", "当前孕周"); |
2051 | 2055 | cnames.put("rLevel", "高危等级"); |
2052 | 2056 | cnames.put("cTimes", "总产检次数"); |