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));
|
}
|
}
|