zjh
7 天以前 0a469fa5898ac2b63b860d17ac10c0ebf534d82f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package com.ltkj.web.controller.system;
 
import com.ltkj.common.annotation.Log;
import com.ltkj.common.core.controller.BaseController;
import com.ltkj.common.core.domain.AjaxResult;
import com.ltkj.common.core.page.TableDataInfo;
import com.ltkj.common.enums.BusinessType;
import com.ltkj.common.utils.poi.ExcelUtil;
import com.ltkj.hosp.domain.LtkjHtxxb;
import com.ltkj.hosp.service.ILtkjHtxxbService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import javax.servlet.http.HttpServletResponse;
import java.util.List;
 
/**
 * 合同信息Controller
 *
 * @author ltkj
 * @date 2025-02-24
 */
@RestController
@RequestMapping("/system/htxxb")
@Api(tags = "LT合同信息Controller")
public class LtkjHtxxbController extends BaseController {
    @Autowired
    private ILtkjHtxxbService ltkjHtxxbService;
 
    /**
     * 查询合同信息列表
     */
//@PreAuthorize("@ss.hasPermi('system:htxxb:list')")
    @GetMapping("/list")
    @ApiOperation(value = "查询合同信息列表")
    public TableDataInfo list(LtkjHtxxb ltkjHtxxb) {
        startPage();
        List<LtkjHtxxb> list = ltkjHtxxbService.selectLtkjHtxxbList(ltkjHtxxb);
        return getDataTable(list);
    }
 
    /**
     * 导出合同信息列表
     */
//    @PreAuthorize("@ss.hasPermi('system:htxxb:export')")
    @Log(title = "合同信息", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    @ApiOperation(value = "导出合同信息列表")
    public void export(HttpServletResponse response, LtkjHtxxb ltkjHtxxb) {
        List<LtkjHtxxb> list = ltkjHtxxbService.selectLtkjHtxxbList(ltkjHtxxb);
        ExcelUtil<LtkjHtxxb> util = new ExcelUtil<LtkjHtxxb>(LtkjHtxxb.class);
        util.exportExcel(response, list, "合同信息数据");
    }
 
    /**
     * 获取合同信息详细信息
     */
//    @PreAuthorize("@ss.hasPermi('system:htxxb:query')")
    @GetMapping(value = "/{id}")
    @ApiOperation(value = "获取合同信息详细信息")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(ltkjHtxxbService.getById(id));
    }
 
    /**
     * 新增合同信息
     */
//    @PreAuthorize("@ss.hasPermi('system:htxxb:add')")
    @Log(title = "合同信息", businessType = BusinessType.INSERT)
    @PostMapping
    @ApiOperation(value = "新增合同信息")
    public AjaxResult add(@RequestBody LtkjHtxxb ltkjHtxxb) {
        return toAjax(ltkjHtxxbService.save(ltkjHtxxb));
    }
 
    /**
     * 修改合同信息
     */
//    @PreAuthorize("@ss.hasPermi('system:htxxb:edit')")
    @Log(title = "合同信息", businessType = BusinessType.UPDATE)
    @PutMapping
    @ApiOperation(value = "修改合同信息")
    public AjaxResult edit(@RequestBody LtkjHtxxb ltkjHtxxb) {
        return toAjax(ltkjHtxxbService.updateById(ltkjHtxxb));
    }
 
    /**
     * 删除合同信息
     */
//    @PreAuthorize("@ss.hasPermi('system:htxxb:remove')")
    @Log(title = "合同信息", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    @ApiOperation(value = "删除合同信息")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(ltkjHtxxbService.deleteLtkjHtxxbByIds(ids));
    }
}