liusheng
2024-03-20 4c95b4e5fee50a03c8ba964264ea3ef163e7805b
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/BaseOrganchargeController.java
@@ -11,6 +11,7 @@
import com.ruoyi.project.service.IBaseOrganchargeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
@@ -24,9 +25,10 @@
 * @author ruoyi
 * @date 2023-10-08
 */
@Slf4j
@Api("人体器官获取费用")
@RestController
@RequestMapping("/organcharge")
@RequestMapping("/project/organcharge")
public class BaseOrganchargeController extends BaseController {
    @Autowired
    private IBaseOrganchargeService baseOrganchargeService;
@@ -35,9 +37,10 @@
     * 查询人体器官获取费用列表
     */
    @ApiOperation("查询人体器官获取费用列表")
    @PreAuthorize("@ss.hasPermi('system:organcharge:list')")
    @PreAuthorize("@ss.hasPermi('project:organcharge:list')")
    @GetMapping("/list")
    public TableDataInfo list(BaseOrgancharge baseOrgancharge) {
        log.info("查询人体器官获取费用列表{}:", baseOrgancharge);
        startPage();
        List<BaseOrgancharge> list = baseOrganchargeService.queryList(baseOrgancharge);
        return getDataTable(list);
@@ -47,10 +50,11 @@
     * 导出人体器官获取费用列表
     */
    @ApiOperation("导出人体器官获取费用列表")
    @PreAuthorize("@ss.hasPermi('system:organcharge:export')")
    @PreAuthorize("@ss.hasPermi('project:organcharge:export')")
    @Log(title = "人体器官获取费用", businessType = BusinessType.EXPORT)
    @GetMapping("/export")
    public AjaxResult export(BaseOrgancharge baseOrgancharge) {
        log.info("导出人体器官获取费用列表{}:", baseOrgancharge);
        List<BaseOrgancharge> list = baseOrganchargeService.queryList(baseOrgancharge);
        ExcelUtil<BaseOrgancharge> util = new ExcelUtil<BaseOrgancharge>(BaseOrgancharge.class);
        return util.exportExcel(list, "人体器官获取费用数据");
@@ -60,9 +64,10 @@
     * 获取人体器官获取费用详细信息
     */
    @ApiOperation("获取人体器官获取费用详细信息")
    @PreAuthorize("@ss.hasPermi('system:organcharge:query')")
    @PreAuthorize("@ss.hasPermi('project:organcharge:query')")
    @GetMapping(value = "/getInfo/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        log.info("获取人体器官获取费用详细信息{}:", id);
        return AjaxResult.success(baseOrganchargeService.getById(id));
    }
@@ -70,23 +75,27 @@
     * 新增人体器官获取费用
     */
    @ApiOperation("新增人体器官获取费用")
    @PreAuthorize("@ss.hasPermi('system:organcharge:add')")
    @PreAuthorize("@ss.hasPermi('project:organcharge:add')")
    @Log(title = "人体器官获取费用", businessType = BusinessType.INSERT)
    @PostMapping("/add")
    @RepeatSubmit
    public AjaxResult add(@RequestBody BaseOrgancharge baseOrgancharge) {
        return toAjax(baseOrganchargeService.save(baseOrgancharge));
        log.info("新增人体器官获取费用{}:", baseOrgancharge);
        boolean save = baseOrganchargeService.save(baseOrgancharge);
        log.info("新增人体器官获取费用baseOrgancharge的ID:{}", baseOrgancharge.getId());
        return AjaxResult.success(baseOrgancharge);
    }
    /**
     * 修改人体器官获取费用
     */
    @ApiOperation("修改人体器官获取费用")
    @PreAuthorize("@ss.hasPermi('system:organcharge:edit')")
    @PreAuthorize("@ss.hasPermi('project:organcharge:edit')")
    @Log(title = "人体器官获取费用", businessType = BusinessType.UPDATE)
    @PostMapping("/edit")
    @RepeatSubmit
    public AjaxResult edit(@RequestBody BaseOrgancharge baseOrgancharge) {
        log.info("修改人体器官获取费用{}:", baseOrgancharge);
        return toAjax(baseOrganchargeService.updateById(baseOrgancharge));
    }
@@ -94,9 +103,10 @@
     * 删除人体器官获取费用
     */
    @ApiOperation("删除人体器官获取费用")
    @PreAuthorize("@ss.hasPermi('system:organcharge:remove')")
    @PreAuthorize("@ss.hasPermi('project:organcharge:remove')")
    @GetMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        log.info("删除人体器官获取费用{}:", ids);
        return toAjax(baseOrganchargeService.removeByIds(Arrays.asList(ids)));
    }
}