package com.ruoyi.web.controller.smartor; 
 | 
  
 | 
import java.util.List; 
 | 
import io.swagger.annotations.Api; 
 | 
import io.swagger.annotations.ApiOperation; 
 | 
import javax.servlet.http.HttpServletResponse; 
 | 
import org.springframework.security.access.prepost.PreAuthorize; 
 | 
import org.springframework.beans.factory.annotation.Autowired; 
 | 
import org.springframework.web.bind.annotation.GetMapping; 
 | 
import org.springframework.web.bind.annotation.PostMapping; 
 | 
import org.springframework.web.bind.annotation.PutMapping; 
 | 
import org.springframework.web.bind.annotation.DeleteMapping; 
 | 
import org.springframework.web.bind.annotation.PathVariable; 
 | 
import org.springframework.web.bind.annotation.RequestBody; 
 | 
import org.springframework.web.bind.annotation.RequestMapping; 
 | 
import org.springframework.web.bind.annotation.RestController; 
 | 
import com.ruoyi.common.annotation.Log; 
 | 
import com.ruoyi.common.core.controller.BaseController; 
 | 
import com.ruoyi.common.core.domain.AjaxResult; 
 | 
import com.ruoyi.common.enums.BusinessType; 
 | 
import com.smartor.domain.ServiceCheck; 
 | 
import com.smartor.service.IServiceCheckService; 
 | 
import com.ruoyi.common.utils.poi.ExcelUtil; 
 | 
import com.ruoyi.common.core.page.TableDataInfo; 
 | 
  
 | 
/** 
 | 
 * 随访服务发送判断Controller 
 | 
 * 
 | 
 * @author lihu 
 | 
 * @date 2025-02-25 
 | 
 */ 
 | 
@Api("随访服务发送判断") 
 | 
@RestController 
 | 
@RequestMapping("/smartor/check") 
 | 
public class ServiceCheckController extends BaseController 
 | 
{ 
 | 
    @Autowired 
 | 
    private IServiceCheckService serviceCheckService; 
 | 
  
 | 
    /** 
 | 
     * 查询随访服务发送判断列表 
 | 
     */ 
 | 
    @ApiOperation("查询随访服务发送判断列表") 
 | 
    //@PreAuthorize("@ss.hasPermi('smartor:check:list')") 
 | 
    @GetMapping("/list") 
 | 
    public TableDataInfo list(ServiceCheck serviceCheck) 
 | 
    { 
 | 
        startPage(); 
 | 
        List<ServiceCheck> list = serviceCheckService.selectServiceCheckList(serviceCheck); 
 | 
        return getDataTable(list); 
 | 
    } 
 | 
  
 | 
    /** 
 | 
     * 导出随访服务发送判断列表 
 | 
     */ 
 | 
    @ApiOperation("导出随访服务发送判断列表") 
 | 
    //@PreAuthorize("@ss.hasPermi('smartor:check:export')") 
 | 
    @Log(title = "随访服务发送判断", businessType = BusinessType.EXPORT) 
 | 
    @PostMapping("/export") 
 | 
    public void export(HttpServletResponse response, ServiceCheck serviceCheck) 
 | 
    { 
 | 
        List<ServiceCheck> list = serviceCheckService.selectServiceCheckList(serviceCheck); 
 | 
        ExcelUtil<ServiceCheck> util = new ExcelUtil<ServiceCheck>(ServiceCheck.class); 
 | 
        util.exportExcel(response, list, "随访服务发送判断数据"); 
 | 
    } 
 | 
  
 | 
    /** 
 | 
     * 获取随访服务发送判断详细信息 
 | 
     */ 
 | 
    @ApiOperation("获取随访服务发送判断详细信息") 
 | 
    //@PreAuthorize("@ss.hasPermi('smartor:check:query')") 
 | 
    @GetMapping(value = "/getInfo/{id}") 
 | 
    public AjaxResult getInfo(@PathVariable("id") Long id) 
 | 
    { 
 | 
        return success(serviceCheckService.selectServiceCheckById(id)); 
 | 
    } 
 | 
  
 | 
    /** 
 | 
     * 新增随访服务发送判断 
 | 
     */ 
 | 
    @ApiOperation("新增随访服务发送判断") 
 | 
    //@PreAuthorize("@ss.hasPermi('smartor:check:add')") 
 | 
    @Log(title = "随访服务发送判断", businessType = BusinessType.INSERT) 
 | 
    @PostMapping("/add") 
 | 
    public AjaxResult add(@RequestBody ServiceCheck serviceCheck) 
 | 
    { 
 | 
        return toAjax(serviceCheckService.insertServiceCheck(serviceCheck)); 
 | 
    } 
 | 
  
 | 
    /** 
 | 
     * 修改随访服务发送判断 
 | 
     */ 
 | 
    @ApiOperation("修改随访服务发送判断") 
 | 
    //@PreAuthorize("@ss.hasPermi('smartor:check:edit')") 
 | 
    @Log(title = "随访服务发送判断", businessType = BusinessType.UPDATE) 
 | 
    @PostMapping("/edit") 
 | 
    public AjaxResult edit(@RequestBody ServiceCheck serviceCheck) 
 | 
    { 
 | 
        return toAjax(serviceCheckService.updateServiceCheck(serviceCheck)); 
 | 
    } 
 | 
  
 | 
    /** 
 | 
     * 删除随访服务发送判断 
 | 
     */ 
 | 
    @ApiOperation("删除随访服务发送判断") 
 | 
    //@PreAuthorize("@ss.hasPermi('smartor:check:remove')") 
 | 
    @Log(title = "随访服务发送判断", businessType = BusinessType.DELETE) 
 | 
    @GetMapping("/remove/{ids}") 
 | 
    public AjaxResult remove(@PathVariable Long[] ids) 
 | 
    { 
 | 
        return toAjax(serviceCheckService.deleteServiceCheckByIds(ids)); 
 | 
    } 
 | 
} 
 |