package com.ruoyi.web.controller.system.property;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.TdPropertyManager;
import com.ruoyi.system.service.ITdPropertyManagerService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * packageName com.ruoyi.web.controller.system.property
 *
 * @author luoluo
 * @version JDK 8
 * @className TdPropertyDestoryListController
 * @date 2024/6/24
 * @description 资产销毁
 */
@Controller
@RequestMapping("/system/propertyDestory/list")
public class TdPropertyDestoryListController extends BaseController {

    private String prefix = "system/property/propertydestory/list";

    @Autowired
    private ITdPropertyManagerService tdPropertyManagerService;

    @RequiresPermissions("system:propertyDestory:view")
    @GetMapping()
    public String property()
    {
        return prefix + "/property";
    }

    /**
     * 查询资产登记列表
     */
    @RequiresPermissions("system:destory:list")
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(TdPropertyManager tdPropertyManager)
    {
        startPage();
        List<TdPropertyManager> list = tdPropertyManagerService.selectTdPropertyManagerList(tdPropertyManager);
        return getDataTable(list);
    }



    /**
     * 资产条目
     */
    @RequiresPermissions("system:destory:detail")
    @GetMapping("/detail/{useId}")
    public String detail(@PathVariable("useId") String useId, ModelMap mmap)
    {
        mmap.put("useId",useId);
        return "system/property/propertydestory/destoryproperty";
    }
}
