| | |
| | | import com.ruoyi.quartz.task.RyTask; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.ruoyi.system.service.ISysUserDeptService; |
| | | import com.smartor.common.MydOptionRatioChartBuilder; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.domain.DTO.QuestionResultDTO; |
| | | import com.smartor.domain.VO.*; |
| | |
| | | serviceSubtaskExport.setEndDay(endDay); |
| | | } |
| | | } |
| | | SltdMydTotalVO sltdMydTotalVO = new SltdMydTotalVO(); |
| | | sltdMydTotalVO.setServiceTypeList(Arrays.asList(serviceSubtaskVO.getServiceType())); |
| | | sltdMydTotalVO.setEndOutHospTime(serviceSubtaskVO.getEndOutHospTime()); |
| | | sltdMydTotalVO.setStartOutHospTime(serviceSubtaskVO.getStartOutHospTime()); |
| | | serviceSubtaskDetailRatioExports = serviceSubtaskService.getDetailRatio(sltdMydTotalVO, serviceSubtaskList); |
| | | //问题详情占比:只统计本次导出的这批患者,数量=选该选项的患者数,比例=占该题作答人数 |
| | | List<Long> subtaskIds = new ArrayList<>(); |
| | | for (ServiceSubtaskRes serviceSubtaskRes : serviceSubtaskList) { |
| | | if (serviceSubtaskRes.getId() != null) { |
| | | subtaskIds.add(serviceSubtaskRes.getId()); |
| | | } |
| | | } |
| | | serviceSubtaskDetailRatioExports = serviceSubtaskService.statMydQuestionOptionForExport(subtaskIds, null); |
| | | } |
| | | |
| | | |
| | | ExcelUtil<ServiceSubtaskExport> util = new ExcelUtil<ServiceSubtaskExport>(ServiceSubtaskExport.class); |
| | | util.exportExcelTwoSheet(response, serviceSubtaskExports, "患者随访信息表单", serviceSubtaskDetailRatioExports, "问题详情占比", ServiceSubtaskDetailRatioExport.class); |
| | | //第三个Sheet:问题详情占比图表(按任务名称分组,一个任务一张柱状图) |
| | | util.exportExcelTwoSheetWithChart(response, serviceSubtaskExports, "患者随访信息表单", |
| | | serviceSubtaskDetailRatioExports, "问题详情占比", ServiceSubtaskDetailRatioExport.class, |
| | | new MydOptionRatioChartBuilder(serviceSubtaskDetailRatioExports)); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("获取统计数") |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/countByCondition") |
| | | public Map<String, Object> countByCondition(@RequestBody ServiceSubtaskEntity condition) { |
| | | Map<String, Object> map = serviceSubtaskService.countByCondition(condition); |
| | | return map; |
| | | } |
| | | } |