liusheng
2024-04-22 63ebc0007e9958bd6680c6841a7460b053275790
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonatefollowupController.java
@@ -28,15 +28,14 @@
/**
 * 捐献随访Controller
 *
 *
 * @author ruoyi
 * @date 2021-12-10
 */
@Api("捐献随访")
@RestController
@RequestMapping("/project/donatefollowup")
public class ServiceDonatefollowupController extends BaseController
{
public class ServiceDonatefollowupController extends BaseController {
    @Autowired
    private IServiceDonatefollowupService serviceDonatefollowupService;
@@ -44,10 +43,9 @@
     * 查询捐献随访列表
     */
    @ApiOperation("查询捐献随访列表")
    //@PreAuthorize("@ss.hasPermi('project:donatefollowup:list')")
    //// @PreAuthorize("@ss.hasPermi('project:donatefollowup:list')")
    @GetMapping("/list")
    public TableDataInfo list(ServiceDonatefollowup serviceDonatefollowup)
    {
    public TableDataInfo list(ServiceDonatefollowup serviceDonatefollowup) {
        startPage();
        //List<ServiceDonatefollowup> list = serviceDonatefollowupService.queryList(serviceDonatefollowup);
        List<ServiceDonatefollowup> list = serviceDonatefollowupService.selectAll(serviceDonatefollowup);
@@ -55,7 +53,7 @@
    }
    @GetMapping("/listnew")
    public TableDataInfo listnew (DonateFollowupVO donateFollowupVO){
    public TableDataInfo listnew(DonateFollowupVO donateFollowupVO) {
        startPage();
        List<DonateFollowupVO> list = serviceDonatefollowupService.selectVOList(donateFollowupVO);
        return getDataTable(list);
@@ -67,11 +65,10 @@
     * 导出捐献随访列表
     */
    @ApiOperation("导出捐献随访列表")
    //@PreAuthorize("@ss.hasPermi('project:donatefollowup:export')")
    //// @PreAuthorize("@ss.hasPermi('project:donatefollowup:export')")
    @Log(title = "捐献随访", businessType = BusinessType.EXPORT)
    @GetMapping("/export")
    public AjaxResult export(ServiceDonatefollowup serviceDonatefollowup)
    {
    public AjaxResult export(ServiceDonatefollowup serviceDonatefollowup) {
        List<ServiceDonatefollowup> list = serviceDonatefollowupService.queryList(serviceDonatefollowup);
        ExcelUtil<ServiceDonatefollowup> util = new ExcelUtil<ServiceDonatefollowup>(ServiceDonatefollowup.class);
        return util.exportExcel(list, "捐献随访数据");
@@ -81,10 +78,9 @@
     * 获取捐献随访详细信息
     */
    @ApiOperation("获取捐献随访详细信息")
    //@PreAuthorize("@ss.hasPermi('project:donatefollowup:query')")
    //// @PreAuthorize("@ss.hasPermi('project:donatefollowup:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        //return AjaxResult.success(serviceDonatefollowupService.getById(id));
        return AjaxResult.success(serviceDonatefollowupService.selectFollowUpById(id));
    }
@@ -93,25 +89,24 @@
     * 新增捐献随访
     */
    @ApiOperation("新增捐献随访")
    //@PreAuthorize("@ss.hasPermi('project:donatefollowup:add')")
    //// @PreAuthorize("@ss.hasPermi('project:donatefollowup:add')")
    @Log(title = "捐献随访", businessType = BusinessType.INSERT)
    @PostMapping
    @PostMapping("/add")
    @RepeatSubmit
    public AjaxResult add(@RequestBody ServiceDonatefollowup serviceDonatefollowup)
    {
        return toAjax(serviceDonatefollowupService.save(serviceDonatefollowup));
    public AjaxResult add(@RequestBody ServiceDonatefollowup serviceDonatefollowup) {
        boolean save = serviceDonatefollowupService.save(serviceDonatefollowup);
        return AjaxResult.success(serviceDonatefollowup);
    }
    /**
     * 修改捐献随访
     */
    @ApiOperation("修改捐献随访")
    //@PreAuthorize("@ss.hasPermi('project:donatefollowup:edit')")
    //// @PreAuthorize("@ss.hasPermi('project:donatefollowup:edit')")
    @Log(title = "捐献随访", businessType = BusinessType.UPDATE)
    @PutMapping
    @RepeatSubmit
    public AjaxResult edit(@RequestBody ServiceDonatefollowup serviceDonatefollowup)
    {
    @PostMapping("/edit")
    @RepeatSubmit
    public AjaxResult edit(@RequestBody ServiceDonatefollowup serviceDonatefollowup) {
        return toAjax(serviceDonatefollowupService.updateById(serviceDonatefollowup));
    }
@@ -120,11 +115,10 @@
     * 删除捐献随访
     */
    @ApiOperation("删除捐献随访")
    //@PreAuthorize("@ss.hasPermi('project:donatefollowup:remove')")
    //// @PreAuthorize("@ss.hasPermi('project:donatefollowup:remove')")
    @Log(title = "捐献随访", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
    @GetMapping("/remove/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(serviceDonatefollowupService.removeByIds(Arrays.asList(ids)));
    }
}