| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.utils.reflect.ReflectUtils; |
| | | import com.ruoyi.quartz.task.RyTask; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.ruoyi.system.service.ISysUserDeptService; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.domain.VO.HeLibraryCountVO; |
| | | import com.smartor.domain.VO.ServiceSubtaskCotinueCountVO; |
| | | import com.smartor.domain.VO.ServiceSubtaskVO; |
| | | import com.smartor.domain.entity.ServiceSubtaskEntity; |
| | |
| | | |
| | | @Autowired |
| | | private ISysConfigService configService; |
| | | |
| | | @Autowired |
| | | private RyTask ryTask; |
| | | |
| | | @Value("${spring.profiles.active}") |
| | | private String active; |
| | |
| | | //@PreAuthorize("@ss.hasPermi('system:taskcall:list')") |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/patItemByCondition") |
| | | public TableDataInfo patItemByCondition(@RequestBody ServiceSubtaskVO serviceSubtaskVO) { |
| | | public Map<String, Object> patItemByCondition(@RequestBody ServiceSubtaskVO serviceSubtaskVO) { |
| | | List<ServiceSubtask> serviceSubtaskList = null; |
| | | ServiceSubtaskEntity serviceSubtaskEntity = DtoConversionUtils.sourceToTarget(serviceSubtaskVO, ServiceSubtaskEntity.class); |
| | | serviceSubtaskEntity.setContinueContent(ObjectUtils.isNotEmpty(serviceSubtaskVO.getContinueContent()) ? serviceSubtaskVO.getContinueContent().toString() : null); |
| | | if (serviceSubtaskEntity != null) { |
| | | PageUtils.startPageByPost(serviceSubtaskEntity.getPageNum(), serviceSubtaskEntity.getPageSize()); |
| | | |
| | | serviceSubtaskEntity.setPageNum(PageUtils.getOffset(serviceSubtaskEntity.getPageNum(), serviceSubtaskEntity.getPageSize())); |
| | | serviceSubtaskList = serviceSubtaskService.patItem2(serviceSubtaskEntity); |
| | | } |
| | | for (ServiceSubtask serviceSubtask : serviceSubtaskList) { |
| | |
| | | serviceSubtaskService.patItem2(serviceSubtaskEntity); |
| | | } |
| | | }); |
| | | return getDataTable2(total, list); |
| | | return getDataTable3(total, list); |
| | | } |
| | | |
| | | /** |
| | |
| | | return success(serviceStatistics); |
| | | } |
| | | |
| | | /** |
| | | * 随访异常统计导出-废案 暂时不使用 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:taskcall:export')") |
| | | @Log(title = "随访统计导出", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/getSfStatisticsIsAbnormalExport") |
| | | public void getSfStatisticsIsAbnormalExport(HttpServletResponse response, ServiceSubtaskCountReq serviceSubtaskCountReq) { |
| | | List<ServiceSubtaskIsAbnormalStatistic> sfStatistics = serviceSubtaskService.getSfStatisticsIsAbnormalExport(serviceSubtaskCountReq); |
| | | ExcelUtil<ServiceSubtaskIsAbnormalStatistic> util = new ExcelUtil<ServiceSubtaskIsAbnormalStatistic>(ServiceSubtaskIsAbnormalStatistic.class); |
| | | String sheetName = ""; |
| | | String fileName = ""; |
| | | if (active.equals("ls") || active.equals("druid")) { |
| | | fileName = sheetName = LocalDate.now().getMonthValue() + "月出院随访异常统计表"; |
| | | util.exportExcelWithFileName(response, sfStatistics, sheetName, fileName); |
| | | } else { |
| | | sheetName = "随访异常统计导出"; |
| | | util.exportExcel(response, sfStatistics, sheetName); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取随访统计比例 |
| | |
| | | return map; |
| | | } |
| | | |
| | | @ApiOperation("获取当前用户宣教数量统计") |
| | | @PostMapping("/gethelibraryCount") |
| | | public Map<String, Object> getHeLibraryCount(@RequestBody HeLibraryCountVO heLibraryCountVO) { |
| | | log.info("获取当前用户宣教数量统计的入参为:{}", heLibraryCountVO); |
| | | return serviceSubtaskService.getHeLibraryCount(heLibraryCountVO); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/test") |
| | | public void test() { |
| | | ryTask.longTaskSend(); |
| | | } |
| | | } |