| | |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | //@PreAuthorize("@ss.hasPermi('system:taskcall:export')") |
| | | @Log(title = "单一任务(随访宣教)", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ServiceSubtask serviceSubtask) { |
| | | ServiceSubtaskVO serviceSubtaskVO = DtoConversionUtils.sourceToTarget(serviceSubtask, ServiceSubtaskVO.class); |
| | | List<ServiceSubtask> list = serviceSubtaskService.selectServiceSubtaskList(serviceSubtaskVO); |
| | | ExcelUtil<ServiceSubtask> util = new ExcelUtil<ServiceSubtask>(ServiceSubtask.class); |
| | | util.exportExcel(response, list, "单一任务(随访)数据"); |
| | | public void export(HttpServletResponse response, ServiceSubtaskVO serviceSubtaskVO) { |
| | | List<ServiceSubtask> serviceSubtaskList = serviceSubtaskService.patItem(serviceSubtaskVO); |
| | | if (CollectionUtils.isNotEmpty(serviceSubtaskList)) { |
| | | List<ServiceSubtaskExportVO> serviceSubtaskExportVOS = DtoConversionUtils.sourceToTarget(serviceSubtaskList, ServiceSubtaskExportVO.class); |
| | | ExcelUtil<ServiceSubtaskExportVO> util = new ExcelUtil<ServiceSubtaskExportVO>(ServiceSubtaskExportVO.class); |
| | | util.exportExcel(response, serviceSubtaskExportVOS, "随访导出数据"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody ServiceSubtask serviceSubtask) { |
| | | return toAjax(serviceSubtaskService.updateServiceSubtask(serviceSubtask)); |
| | | } |
| | | |
| | | @ApiOperation("新增子任务") |
| | | @PostMapping("/addSubTask") |
| | | public AjaxResult addSubTask(@RequestBody ServiceSubtask serviceSubtask) { |
| | | return toAjax(serviceSubtaskService.insertServiceSubtask(serviceSubtask)); |
| | | } |
| | | |
| | | /** |
| | |
| | | return getDataTable(serviceSubtaskService.getSfFzInfoEveryMonth(serviceSubtaskCountReq)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取随访统计比例 |
| | | */ |
| | | @ApiOperation("获取随访统计比例") |
| | | @PostMapping("/getSfStatistics") |
| | | public AjaxResult getSfStatistics(@RequestBody ServiceSubtaskCountReq serviceSubtaskCountReq) { |
| | | if (CollectionUtils.isEmpty(serviceSubtaskCountReq.getServiceType())) { |
| | | return error("服务类型不能为空"); |
| | | } |
| | | return success(serviceSubtaskService.getSfStatistics(serviceSubtaskCountReq)); |
| | | } |
| | | |
| | | } |