Commit ca929f563b77f158eb74172714b31adb131efdfc
1 parent
008605a2cd
Exists in
master
and in
6 other branches
孕妇学校
Showing 2 changed files with 13 additions and 15 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/CourseFacade.java
View file @
ca929f5
| ... | ... | @@ -403,7 +403,7 @@ |
| 403 | 403 | patientCourseQuery.setHospitalId(hospitalId); |
| 404 | 404 | |
| 405 | 405 | |
| 406 | - int allPatientCourses = patientCourseService.queryPatientCourseCount(patientCourseQuery); | |
| 406 | + //int allPatientCourses = patientCourseService.queryPatientCourseCount(patientCourseQuery); | |
| 407 | 407 | |
| 408 | 408 | //状态 1预约,2签到 |
| 409 | 409 | patientCourseQuery.setStatus(1); |
| 410 | 410 | |
| ... | ... | @@ -419,9 +419,9 @@ |
| 419 | 419 | totalData.put("allCourses",allCourses); //课程数 |
| 420 | 420 | totalData.put("allSends",allSends); //总推送数 |
| 421 | 421 | totalData.put("allOrders",allOrders); //总预约数 |
| 422 | - totalData.put("allOrderRate", allCourses == 0 ? 0 : df.format((double) allOrders / allPatientCourses * 100) + "%"); //总预约率 | |
| 422 | + totalData.put("allOrderRate", allSends == 0 ? 0 : df.format((double) allOrders / allSends * 100) + "%"); //总预约率 | |
| 423 | 423 | totalData.put("allSigns", allSigns);//总签到数 |
| 424 | - totalData.put("allSignRate", allCourses == 0 ? 0 : df.format((double) allSigns / allPatientCourses * 100) + "%");//总签到率 | |
| 424 | + totalData.put("allSignRate", allOrders == 0 ? 0 : df.format((double) allSigns / allOrders * 100) + "%");//总签到率 | |
| 425 | 425 | |
| 426 | 426 | CourseTypeQuery courseTypeQuery = new CourseTypeQuery(); |
| 427 | 427 | courseTypeQuery.setHospitalId(hospitalId); |
| ... | ... | @@ -452,8 +452,6 @@ |
| 452 | 452 | } |
| 453 | 453 | patientCourseQuery.setCourseIds(courseIds); |
| 454 | 454 | |
| 455 | - allPatientCourses = patientCourseService.queryPatientCourseCount(patientCourseQuery); | |
| 456 | - | |
| 457 | 455 | List<Map<String,String>> list = new ArrayList<>(); |
| 458 | 456 | int batchSize = 2; |
| 459 | 457 | int end = 0; |
| ... | ... | @@ -468,8 +466,7 @@ |
| 468 | 466 | startTime, |
| 469 | 467 | endTime, |
| 470 | 468 | patientCourseService, |
| 471 | - courseTypeService, | |
| 472 | - allPatientCourses); | |
| 469 | + courseTypeService ); | |
| 473 | 470 | Future f = commonThreadPool.submit(c); |
| 474 | 471 | futures.add(f); |
| 475 | 472 | } |
| ... | ... | @@ -492,6 +489,7 @@ |
| 492 | 489 | List signs = new ArrayList(); |
| 493 | 490 | int orderAll = 0; |
| 494 | 491 | int signsAll = 0; |
| 492 | + int sendAll = 0; | |
| 495 | 493 | |
| 496 | 494 | for (CourseModel courseModel : courseModelList) |
| 497 | 495 | { |
| ... | ... | @@ -516,6 +514,9 @@ |
| 516 | 514 | |
| 517 | 515 | signsAll+=Integer.parseInt(map.get("signs")); |
| 518 | 516 | tableItem.put("signsRate",map.get("signsRate")); |
| 517 | + | |
| 518 | + | |
| 519 | + sendAll+=Integer.parseInt(map.get("courseSends")); | |
| 519 | 520 | } |
| 520 | 521 | } |
| 521 | 522 | tableData.add(tableItem); |
| 522 | 523 | |
| ... | ... | @@ -526,9 +527,9 @@ |
| 526 | 527 | tableItem.put("courseTypeName", "合计"); |
| 527 | 528 | tableItem.put("courseName",courseModelList.size()); |
| 528 | 529 | tableItem.put("orders", orderAll); |
| 529 | - tableItem.put("ordersRate", allPatientCourses == 0 ? "0" : df.format((double) orderAll / allPatientCourses * 100) + "%"); | |
| 530 | + tableItem.put("ordersRate", sendAll == 0 ? "0" : df.format((double) orderAll / sendAll * 100) + "%"); | |
| 530 | 531 | tableItem.put("signs",signsAll); |
| 531 | - tableItem.put("signsRate",allPatientCourses == 0 ? "0" : df.format((double) signsAll / allPatientCourses * 100) + "%"); | |
| 532 | + tableItem.put("signsRate",orderAll == 0 ? "0" : df.format((double) signsAll / orderAll * 100) + "%"); | |
| 532 | 533 | tableData.add(tableItem); |
| 533 | 534 | } |
| 534 | 535 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/CourseCountWorker.java
View file @
ca929f5
| ... | ... | @@ -29,20 +29,17 @@ |
| 29 | 29 | private String end; |
| 30 | 30 | private PatientCourseService patientCourseService; |
| 31 | 31 | private CourseTypeService courseTypeService; |
| 32 | - private int allPatientCourses; | |
| 33 | 32 | |
| 34 | 33 | public CourseCountWorker(List<CourseModel> courseModelList,String hospitalId, |
| 35 | 34 | String start, |
| 36 | 35 | String end, |
| 37 | 36 | PatientCourseService patientCourseService, |
| 38 | - CourseTypeService courseTypeService, | |
| 39 | - int allPatientCourses) | |
| 37 | + CourseTypeService courseTypeService) | |
| 40 | 38 | { |
| 41 | 39 | this.hospitalId = hospitalId; |
| 42 | 40 | this.courseModelList = courseModelList; |
| 43 | 41 | this.patientCourseService = patientCourseService; |
| 44 | 42 | this.courseTypeService = courseTypeService; |
| 45 | - this.allPatientCourses = allPatientCourses; | |
| 46 | 43 | this.start = start; |
| 47 | 44 | this.end = end; |
| 48 | 45 | } |
| 49 | 46 | |
| ... | ... | @@ -94,9 +91,9 @@ |
| 94 | 91 | |
| 95 | 92 | topmap.put("sends",String.valueOf(courseSends)); |
| 96 | 93 | topmap.put("orders",String.valueOf(courseOrders)); |
| 97 | - topmap.put("ordersRate",allPatientCourses == 0 ? "0" : df.format((double) courseOrders / allPatientCourses * 100) + "%"); | |
| 94 | + topmap.put("ordersRate",String.valueOf(courseSends == 0 ? "0" : df.format((double) courseOrders / courseSends * 100)) + "%"); | |
| 98 | 95 | topmap.put("signs",String.valueOf(courseSigns)); |
| 99 | - topmap.put("signsRate", allPatientCourses == 0 ? "0" : df.format((double) courseSigns / allPatientCourses * 100) + "%"); | |
| 96 | + topmap.put("signsRate", String.valueOf(courseOrders == 0 ? "0" : df.format((double) courseSigns / courseOrders * 100)) + "%"); | |
| 100 | 97 | |
| 101 | 98 | data.add(topmap); |
| 102 | 99 | } |