Commit 41b77c51b3410108bcf825bfb5df7110c56f71d4

Authored by yangfei

Merge remote-tracking branch 'origin/master'

Showing 2 changed files

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/CourseFacade.java View file @ 41b77c5
... ... @@ -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);
... ... @@ -436,7 +436,7 @@
436 436 query.setPublishTimeStart(DateUtil.parseYMD(startTime));
437 437 if (dates.length == 2) {
438 438 endTime = dates[1];
439   - query.setPublishTimeStart(DateUtil.parseYMDHMS(endTime + " 23:59:59"));
  439 + query.setPublishTimeEnd(DateUtil.parseYMDHMS(endTime + " 23:59:59"));
440 440 }
441 441  
442 442 }
... ... @@ -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 {
... ... @@ -509,6 +507,8 @@
509 507 tableItem.put("courseTypeName", map.get("courseTypeName"));
510 508 tableItem.put("courseName", map.get("courseName"));
511 509 tableItem.put("orders", map.get("orders"));
  510 + tableItem.put("sends", map.get("courseSends"));
  511 +
512 512 orderAll+=Integer.parseInt(map.get("orders"));
513 513  
514 514 tableItem.put("ordersRate", map.get("ordersRate"));
... ... @@ -516,6 +516,9 @@
516 516  
517 517 signsAll+=Integer.parseInt(map.get("signs"));
518 518 tableItem.put("signsRate",map.get("signsRate"));
  519 +
  520 +
  521 + sendAll+=Integer.parseInt(map.get("courseSends"));
519 522 }
520 523 }
521 524 tableData.add(tableItem);
522 525  
523 526  
... ... @@ -526,10 +529,16 @@
526 529 tableItem.put("courseTypeName", "合计");
527 530 tableItem.put("courseName",courseModelList.size());
528 531 tableItem.put("orders", orderAll);
529   - tableItem.put("ordersRate", allPatientCourses == 0 ? "0" : df.format((double) orderAll / allPatientCourses * 100) + "%");
  532 + tableItem.put("sends", sendAll);
  533 + tableItem.put("ordersRate", sendAll == 0 ? "0.00" : df.format((double) orderAll / sendAll * 100) + "%");
530 534 tableItem.put("signs",signsAll);
531   - tableItem.put("signsRate",allPatientCourses == 0 ? "0" : df.format((double) signsAll / allPatientCourses * 100) + "%");
  535 + tableItem.put("signsRate",orderAll == 0 ? "0.00" : df.format((double) signsAll / orderAll * 100) + "%");
532 536 tableData.add(tableItem);
  537 +
  538 + chartData.put("titles",titles);
  539 + chartData.put("sends",sends);
  540 + chartData.put("orders", orders);
  541 + chartData.put("signs",signs);
533 542 }
534 543  
535 544 resultData.put("totalData",totalData);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/CourseCountWorker.java View file @ 41b77c5
... ... @@ -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.00" : 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.00" : df.format((double) courseSigns / courseOrders * 100)) + "%");
100 97  
101 98 data.add(topmap);
102 99 }