Commit d28f77c5a4ff11fc4afb0bf37a69ad56d1c32703
1 parent
d66ae93f29
Exists in
master
and in
6 other branches
孕妇学校
Showing 2 changed files with 97 additions and 6 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/CourseFacade.java
View file @
d28f77c
| ... | ... | @@ -406,12 +406,12 @@ |
| 406 | 406 | |
| 407 | 407 | DecimalFormat df = new DecimalFormat("0.00"); |
| 408 | 408 | |
| 409 | - resultData.put("allCourses",allCourses); //课程数 | |
| 410 | - resultData.put("allSends",allSends); //总推送数 | |
| 411 | - resultData.put("allOrders",allOrders); //总预约数 | |
| 412 | - resultData.put("allOrderRate", allCourses == 0 ? 0 : df.format((double) allOrders / allPatientCourses * 100) + "%"); //总预约率 | |
| 413 | - resultData.put("allSigns", allSigns);//总签到数 | |
| 414 | - resultData.put("allSignRate", allCourses == 0 ? 0 : df.format((double) allSigns / allPatientCourses * 100) + "%");//总签到率 | |
| 409 | + totalData.put("allCourses",allCourses); //课程数 | |
| 410 | + totalData.put("allSends",allSends); //总推送数 | |
| 411 | + totalData.put("allOrders",allOrders); //总预约数 | |
| 412 | + totalData.put("allOrderRate", allCourses == 0 ? 0 : df.format((double) allOrders / allPatientCourses * 100) + "%"); //总预约率 | |
| 413 | + totalData.put("allSigns", allSigns);//总签到数 | |
| 414 | + totalData.put("allSignRate", allCourses == 0 ? 0 : df.format((double) allSigns / allPatientCourses * 100) + "%");//总签到率 | |
| 415 | 415 | |
| 416 | 416 | CourseTypeQuery courseTypeQuery = new CourseTypeQuery(); |
| 417 | 417 | courseTypeQuery.setHospitalId(hospitalId); |
| ... | ... | @@ -431,6 +431,9 @@ |
| 431 | 431 | |
| 432 | 432 | allPatientCourses = patientCourseService.queryPatientCourseCount(patientCourseQuery); |
| 433 | 433 | } |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 434 | 437 | |
| 435 | 438 | List<CourseModel> courseModelList = courseService.queryCourseList(query); |
| 436 | 439 | if (CollectionUtils.isNotEmpty(courseModelList)) |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/CourseCountWorker.java
View file @
d28f77c
| 1 | +package com.lyms.platform.operate.web.worker; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.enums.SmsServiceEnums; | |
| 4 | +import com.lyms.platform.common.enums.YnEnums; | |
| 5 | +import com.lyms.platform.pojo.CourseModel; | |
| 6 | +import com.lyms.platform.pojo.CourseTypeModel; | |
| 7 | +import com.lyms.platform.query.CourseTypeQuery; | |
| 8 | +import com.lyms.platform.query.PatientCourseQuery; | |
| 9 | +import org.apache.commons.collections.CollectionUtils; | |
| 10 | + | |
| 11 | +import java.util.ArrayList; | |
| 12 | +import java.util.HashMap; | |
| 13 | +import java.util.List; | |
| 14 | +import java.util.Map; | |
| 15 | +import java.util.concurrent.Callable; | |
| 16 | + | |
| 17 | +/** | |
| 18 | + * Created by Administrator on 2018-04-20. | |
| 19 | + */ | |
| 20 | +public class CourseCountWorker implements Callable { | |
| 21 | + | |
| 22 | + public CourseCountWorker() | |
| 23 | + { | |
| 24 | + | |
| 25 | + } | |
| 26 | + | |
| 27 | + @Override | |
| 28 | + public Map call() throws Exception { | |
| 29 | + Map chartData = new HashMap(); | |
| 30 | +// if (CollectionUtils.isNotEmpty(courseModelList)) | |
| 31 | +// { | |
| 32 | +// | |
| 33 | +// CourseTypeQuery courseTypeQuery = new CourseTypeQuery(); | |
| 34 | +// courseTypeQuery.setHospitalId(hospitalId); | |
| 35 | +// courseTypeQuery.setYn(YnEnums.YES.getId()); | |
| 36 | +// | |
| 37 | +// | |
| 38 | +// PatientCourseQuery patientCourseQuery = new PatientCourseQuery(); | |
| 39 | +// patientCourseQuery.setYn(YnEnums.YES.getId()); | |
| 40 | +// patientCourseQuery.setHospitalId(hospitalId); | |
| 41 | +// | |
| 42 | +// List titles = new ArrayList(); | |
| 43 | +// List sends = new ArrayList(); | |
| 44 | +// List orders = new ArrayList(); | |
| 45 | +// List signs = new ArrayList(); | |
| 46 | +// for (CourseModel courseModel : courseModelList) | |
| 47 | +// { | |
| 48 | +// patientCourseQuery.setCourseId(courseModel.getId()); | |
| 49 | +// titles.add(courseModel.getCourseName()); | |
| 50 | +// | |
| 51 | +// patientCourseQuery.setStatus(1); | |
| 52 | +// int courseOrders = patientCourseService.queryPatientCourseCount(patientCourseQuery); | |
| 53 | +// orders.add(courseOrders); | |
| 54 | +// | |
| 55 | +// patientCourseQuery.setStatus(2); | |
| 56 | +// int courseSigns = patientCourseService.queryPatientCourseCount(patientCourseQuery); | |
| 57 | +// signs.add(courseSigns); | |
| 58 | +// | |
| 59 | +// int courseSends = getCourseCountData(hospitalId, String.valueOf(SmsServiceEnums.YFXXKCTX.getId()), 3, | |
| 60 | +// 1,courseModel.getId(), start, end); | |
| 61 | +// sends.add(courseSends); | |
| 62 | +// | |
| 63 | +// courseTypeQuery.setId(courseModel.getCourseTypeId()); | |
| 64 | +// List<CourseTypeModel> typeModels = courseTypeService.queryCourseTypeList(courseTypeQuery); | |
| 65 | +// | |
| 66 | +// Map tableMap = new HashMap(); | |
| 67 | +// | |
| 68 | +// tableMap.put("courseTypeId",CollectionUtils.isNotEmpty(typeModels) ? typeModels.get(0).getId() : ""); | |
| 69 | +// tableMap.put("courseTypeName",CollectionUtils.isNotEmpty(typeModels) ? typeModels.get(0).getCourseTypeName() : ""); | |
| 70 | +// tableMap.put("courseName",courseModel.getCourseName()); | |
| 71 | +// | |
| 72 | +// tableMap.put("sends",courseSends); | |
| 73 | +// tableMap.put("orders",courseOrders); | |
| 74 | +// tableMap.put("ordersRate",allPatientCourses == 0 ? "0" : df.format((double) courseOrders / allPatientCourses * 100) + "%"); | |
| 75 | +// tableMap.put("signs",courseSigns); | |
| 76 | +// tableMap.put("signsRate",allPatientCourses == 0 ? "0" : df.format((double) courseSigns / allPatientCourses * 100) + "%"); | |
| 77 | +// tableData.add(tableMap); | |
| 78 | +// } | |
| 79 | +// | |
| 80 | +// chartData.put("titles",titles); | |
| 81 | +// chartData.put("sends",sends); | |
| 82 | +// chartData.put("orders",orders); | |
| 83 | +// chartData.put("signs",signs); | |
| 84 | +// } | |
| 85 | + | |
| 86 | + return chartData; | |
| 87 | + } | |
| 88 | +} |