|
|
@ -3,10 +3,15 @@ package com.ruoyi.web.controller.pc;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.ruoyi.system.domain.req.PcTDoctorQueryByPageReq;
|
|
|
|
|
|
|
|
import com.ruoyi.system.domain.req.PcTDoctorUpdateReq;
|
|
|
|
|
|
|
|
import com.ruoyi.system.domain.resp.PcTDoctorQueryByPageResp;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PutMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PutMapping;
|
|
|
@ -32,7 +37,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Api("pc-医生列表")
|
|
|
|
@Api("pc-医生列表")
|
|
|
|
@RestController
|
|
|
|
@RestController
|
|
|
|
@RequestMapping("/system/doctor")
|
|
|
|
@RequestMapping("/system/doctorpc")
|
|
|
|
public class TDoctorController extends BaseController
|
|
|
|
public class TDoctorController extends BaseController
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
@ -41,18 +46,19 @@ public class TDoctorController extends BaseController
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询医生信息列表
|
|
|
|
* 查询医生信息列表
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@GetMapping("/list")
|
|
|
|
@ApiOperation("查询医生信息列表")
|
|
|
|
public TableDataInfo list(TDoctor tDoctor)
|
|
|
|
@PostMapping("/queryByPage")
|
|
|
|
|
|
|
|
public TableDataInfo queryByPage(@RequestBody @Validated PcTDoctorQueryByPageReq pcTDoctorQueryByPageReq)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
startPage();
|
|
|
|
startPage();
|
|
|
|
List<TDoctor> list = tDoctorService.selectTDoctorList(tDoctor);
|
|
|
|
List<PcTDoctorQueryByPageResp> list = tDoctorService.queryByPage(pcTDoctorQueryByPageReq);
|
|
|
|
return getDataTable(list);
|
|
|
|
return getDataTable(list);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 导出医生信息列表
|
|
|
|
* 导出医生信息列表
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:doctor:export')")
|
|
|
|
@ApiOperation("导出医生信息列表")
|
|
|
|
@Log(title = "医生信息", businessType = BusinessType.EXPORT)
|
|
|
|
@Log(title = "医生信息", businessType = BusinessType.EXPORT)
|
|
|
|
@PostMapping("/export")
|
|
|
|
@PostMapping("/export")
|
|
|
|
public void export(HttpServletResponse response, TDoctor tDoctor)
|
|
|
|
public void export(HttpServletResponse response, TDoctor tDoctor)
|
|
|
@ -65,43 +71,34 @@ public class TDoctorController extends BaseController
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 获取医生信息详细信息
|
|
|
|
* 获取医生信息详细信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:doctor:query')")
|
|
|
|
@ApiOperation("获取医生信息详细信息")
|
|
|
|
@GetMapping(value = "/{id}")
|
|
|
|
@GetMapping(value = "/queryById/{id}")
|
|
|
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
|
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return AjaxResult.success(tDoctorService.selectTDoctorById(id));
|
|
|
|
return AjaxResult.success(tDoctorService.selectTDoctorById(id));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 新增医生信息
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:doctor:add')")
|
|
|
|
|
|
|
|
@Log(title = "医生信息", businessType = BusinessType.INSERT)
|
|
|
|
|
|
|
|
@PostMapping
|
|
|
|
|
|
|
|
public AjaxResult add(@RequestBody TDoctor tDoctor)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return toAjax(tDoctorService.insertTDoctor(tDoctor));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 修改医生信息
|
|
|
|
* 修改医生信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:doctor:edit')")
|
|
|
|
@ApiOperation("修改医生信息")
|
|
|
|
@Log(title = "医生信息", businessType = BusinessType.UPDATE)
|
|
|
|
@Log(title = "修改医生信息", businessType = BusinessType.UPDATE)
|
|
|
|
@PutMapping
|
|
|
|
@PutMapping
|
|
|
|
public AjaxResult edit(@RequestBody TDoctor tDoctor)
|
|
|
|
public AjaxResult edit(@RequestBody @Validated PcTDoctorUpdateReq pcTDoctorUpdateReq)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
TDoctor tDoctor = new TDoctor();
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(pcTDoctorUpdateReq,tDoctor);
|
|
|
|
return toAjax(tDoctorService.updateTDoctor(tDoctor));
|
|
|
|
return toAjax(tDoctorService.updateTDoctor(tDoctor));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 删除医生信息
|
|
|
|
* 删除医生信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:doctor:remove')")
|
|
|
|
@ApiOperation("删除医生信息")
|
|
|
|
@Log(title = "医生信息", businessType = BusinessType.DELETE)
|
|
|
|
@Log(title = "医生信息", businessType = BusinessType.DELETE)
|
|
|
|
@DeleteMapping("/{ids}")
|
|
|
|
@DeleteMapping("/deleteById/{id}")
|
|
|
|
public AjaxResult remove(@PathVariable Long[] ids)
|
|
|
|
public AjaxResult remove(@PathVariable("id") Long id)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return toAjax(tDoctorService.deleteTDoctorByIds(ids));
|
|
|
|
return toAjax(tDoctorService.deleteTDoctorById(id));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|