package com.ltkj.web.controller.system;
|
|
import java.util.List;
|
import javax.servlet.http.HttpServletResponse;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PutMapping;
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
import com.ltkj.common.annotation.Log;
|
import com.ltkj.common.core.controller.BaseController;
|
import com.ltkj.common.core.domain.AjaxResult;
|
import com.ltkj.common.enums.BusinessType;
|
import com.ltkj.hosp.domain.TjTeamContactLog;
|
import com.ltkj.hosp.service.ITjTeamContactLogService;
|
import com.ltkj.common.utils.poi.ExcelUtil;
|
import com.ltkj.common.core.page.TableDataInfo;
|
|
/**
|
* 团队预约沟通记录Controller
|
*
|
* @author ltkj_赵佳豪&李格
|
* @date 2023-12-01
|
*/
|
@RestController
|
@RequestMapping("/hosp/TjTeamContactLog")
|
public class TjTeamContactLogController extends BaseController {
|
@Autowired
|
private ITjTeamContactLogService tjTeamContactLogService;
|
|
/**
|
* 查询团队预约沟通记录列表
|
*/
|
@PreAuthorize("@ss.hasPermi('hosp:TjTeamContactLog:list')")
|
@GetMapping("/list")
|
public TableDataInfo list(TjTeamContactLog tjTeamContactLog) {
|
startPage();
|
List<TjTeamContactLog> list = tjTeamContactLogService.selectTjTeamContactLogList(tjTeamContactLog);
|
return getDataTable(list);
|
}
|
|
/**
|
* 导出团队预约沟通记录列表
|
*/
|
@PreAuthorize("@ss.hasPermi('hosp:TjTeamContactLog:export')")
|
@Log(title = "团队预约沟通记录", businessType = BusinessType.EXPORT)
|
@PostMapping("/export")
|
public void export(HttpServletResponse response, TjTeamContactLog tjTeamContactLog) {
|
List<TjTeamContactLog> list = tjTeamContactLogService.selectTjTeamContactLogList(tjTeamContactLog);
|
ExcelUtil<TjTeamContactLog> util = new ExcelUtil<TjTeamContactLog>(TjTeamContactLog.class);
|
util.exportExcel(response, list, "团队预约沟通记录数据");
|
}
|
|
/**
|
* 获取团队预约沟通记录详细信息
|
*/
|
@PreAuthorize("@ss.hasPermi('hosp:TjTeamContactLog:query')")
|
@GetMapping(value = "/{id}")
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
return success(tjTeamContactLogService.selectTjTeamContactLogById(id));
|
}
|
|
/**
|
* 新增团队预约沟通记录
|
*/
|
@PreAuthorize("@ss.hasPermi('hosp:TjTeamContactLog:add')")
|
@Log(title = "团队预约沟通记录", businessType = BusinessType.INSERT)
|
@PostMapping
|
public AjaxResult add(@RequestBody TjTeamContactLog tjTeamContactLog) {
|
return toAjax(tjTeamContactLogService.insertTjTeamContactLog(tjTeamContactLog));
|
}
|
|
/**
|
* 修改团队预约沟通记录
|
*/
|
@PreAuthorize("@ss.hasPermi('hosp:TjTeamContactLog:edit')")
|
@Log(title = "团队预约沟通记录", businessType = BusinessType.UPDATE)
|
@PutMapping
|
public AjaxResult edit(@RequestBody TjTeamContactLog tjTeamContactLog) {
|
return toAjax(tjTeamContactLogService.updateTjTeamContactLog(tjTeamContactLog));
|
}
|
|
/**
|
* 删除团队预约沟通记录
|
*/
|
@PreAuthorize("@ss.hasPermi('hosp:TjTeamContactLog:remove')")
|
@Log(title = "团队预约沟通记录", businessType = BusinessType.DELETE)
|
@DeleteMapping("/{ids}")
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
return toAjax(tjTeamContactLogService.deleteTjTeamContactLogByIds(ids));
|
}
|
}
|