Commit d66ae93f2903db4a1ef8e1c432153c0df8746ead
1 parent
8a187e5b7b
Exists in
master
and in
6 other branches
孕妇学校
Showing 2 changed files with 14 additions and 10 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CourseController.java
View file @
d66ae93
| ... | ... | @@ -171,7 +171,7 @@ |
| 171 | 171 | @RequestMapping(method = RequestMethod.GET, value = "/getCourseCount") |
| 172 | 172 | @ResponseBody |
| 173 | 173 | @TokenRequired |
| 174 | - public BaseResponse getCourseCount(HttpServletRequest request, @RequestParam(required = true) String time) { | |
| 174 | + public BaseResponse getCourseCount(HttpServletRequest request, @RequestParam(required = false) String time) { | |
| 175 | 175 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 176 | 176 | return courseFacade.getCourseCount(time,loginState.getId()); |
| 177 | 177 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/CourseFacade.java
View file @
d66ae93
| ... | ... | @@ -368,14 +368,23 @@ |
| 368 | 368 | public BaseResponse getCourseCount(String time, Integer userId) { |
| 369 | 369 | BaseObjectResponse objectResponse = new BaseObjectResponse(); |
| 370 | 370 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
| 371 | + | |
| 371 | 372 | Map resultData = new HashMap(); |
| 372 | 373 | |
| 373 | 374 | Map totalData = new HashMap(); |
| 375 | + List<Map> tableData = new ArrayList<>(); | |
| 376 | + Map chartData = new HashMap(); | |
| 374 | 377 | |
| 378 | + | |
| 375 | 379 | CourseQuery query = new CourseQuery(); |
| 376 | 380 | query.setYn(YnEnums.YES.getId()); |
| 377 | 381 | query.setHospitalId(hospitalId); |
| 378 | 382 | |
| 383 | + //课程总数 | |
| 384 | + int allCourses = courseService.queryCourseCount(query); | |
| 385 | + | |
| 386 | + | |
| 387 | + //总推送数 | |
| 379 | 388 | int allSends = getCourseCountData(hospitalId, String.valueOf(SmsServiceEnums.YFXXKCTX.getId()), 3, |
| 380 | 389 | 1,null, null, null); |
| 381 | 390 | |
| 382 | 391 | |
| 383 | 392 | |
| ... | ... | @@ -383,18 +392,16 @@ |
| 383 | 392 | patientCourseQuery.setYn(YnEnums.YES.getId()); |
| 384 | 393 | patientCourseQuery.setHospitalId(hospitalId); |
| 385 | 394 | |
| 386 | - int allCourses = courseService.queryCourseCount(query); | |
| 387 | 395 | |
| 388 | 396 | int allPatientCourses = patientCourseService.queryPatientCourseCount(patientCourseQuery); |
| 389 | 397 | |
| 390 | 398 | //状态 1预约,2签到 |
| 391 | 399 | patientCourseQuery.setStatus(1); |
| 392 | - | |
| 400 | + //总预约数 | |
| 393 | 401 | int allOrders = patientCourseService.queryPatientCourseCount(patientCourseQuery); |
| 394 | 402 | |
| 395 | 403 | patientCourseQuery.setStatus(2); |
| 396 | - | |
| 397 | - | |
| 404 | + //总签到数 | |
| 398 | 405 | int allSigns = patientCourseService.queryPatientCourseCount(patientCourseQuery); |
| 399 | 406 | |
| 400 | 407 | DecimalFormat df = new DecimalFormat("0.00"); |
| 401 | 408 | |
| ... | ... | @@ -421,13 +428,10 @@ |
| 421 | 428 | end = dates[1]; |
| 422 | 429 | patientCourseQuery.setCreatedEnd(DateUtil.parseYMDHMS(end + " 23:59:59")); |
| 423 | 430 | } |
| 431 | + | |
| 432 | + allPatientCourses = patientCourseService.queryPatientCourseCount(patientCourseQuery); | |
| 424 | 433 | } |
| 425 | 434 | |
| 426 | - allPatientCourses = patientCourseService.queryPatientCourseCount(patientCourseQuery); | |
| 427 | - | |
| 428 | - List<Map> tableData = new ArrayList<>(); | |
| 429 | - | |
| 430 | - Map chartData = new HashMap(); | |
| 431 | 435 | List<CourseModel> courseModelList = courseService.queryCourseList(query); |
| 432 | 436 | if (CollectionUtils.isNotEmpty(courseModelList)) |
| 433 | 437 | { |