ecg打印模板图片签名
This commit is contained in:
parent
69c4cb17e2
commit
b609590d7f
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system
controller/admin/doctor
dal/mysql/doctor
service/doctor
@ -20,11 +20,13 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
|||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||||
|
|
||||||
@ -53,17 +55,15 @@ public class DoctorController {
|
|||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建医生管理")
|
@Operation(summary = "创建医生管理")
|
||||||
@PreAuthorize("@ss.hasPermission('doctor::create')")
|
@PreAuthorize("@ss.hasPermission('doctor::create')")
|
||||||
@LogRecord(type = "医生管理", subType = "创建", bizNo ="{{#createReqVO.getDoctorID}}" , success = "创建ID为{{#createReqVO.getDoctorID}}的医生")
|
@LogRecord(type = "医生管理", subType = "创建", bizNo = "{{#createReqVO.getDoctorID}}", success = "创建ID为{{#createReqVO.getDoctorID}}的医生")
|
||||||
public CommonResult<String> create(@Valid @RequestBody DoctorSaveReqVO createReqVO) {
|
public CommonResult<String> create(@Valid @RequestBody DoctorSaveReqVO createReqVO) {
|
||||||
|
|
||||||
String Msg="";
|
String Msg = "";
|
||||||
DoctorDO doctorDO= Service.get(createReqVO.getDoctorID());
|
DoctorDO doctorDO = Service.get(createReqVO.getDoctorID());
|
||||||
if(doctorDO!=null) {
|
if (doctorDO != null) {
|
||||||
Msg="医生编号已存在";
|
Msg = "医生编号已存在";
|
||||||
}
|
} else {
|
||||||
else
|
Msg = Service.create(createReqVO);
|
||||||
{
|
|
||||||
Msg= Service.create(createReqVO);
|
|
||||||
}
|
}
|
||||||
return success(Msg);
|
return success(Msg);
|
||||||
}
|
}
|
||||||
@ -71,7 +71,7 @@ public class DoctorController {
|
|||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "更新医生管理")
|
@Operation(summary = "更新医生管理")
|
||||||
@PreAuthorize("@ss.hasPermission('doctor::update')")
|
@PreAuthorize("@ss.hasPermission('doctor::update')")
|
||||||
@LogRecord(type = "医生管理", subType = "更新", bizNo ="{{#updateReqVO.getDoctorID}}" , success = "更新ID为{{#updateReqVO.getDoctorID}}的医生")
|
@LogRecord(type = "医生管理", subType = "更新", bizNo = "{{#updateReqVO.getDoctorID}}", success = "更新ID为{{#updateReqVO.getDoctorID}}的医生")
|
||||||
public CommonResult<Boolean> update(@Valid @RequestBody DoctorSaveReqVO updateReqVO) {
|
public CommonResult<Boolean> update(@Valid @RequestBody DoctorSaveReqVO updateReqVO) {
|
||||||
Service.update(updateReqVO);
|
Service.update(updateReqVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
@ -81,14 +81,14 @@ public class DoctorController {
|
|||||||
@Operation(summary = "删除医生管理")
|
@Operation(summary = "删除医生管理")
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
@PreAuthorize("@ss.hasPermission('doctor::delete')")
|
@PreAuthorize("@ss.hasPermission('doctor::delete')")
|
||||||
@LogRecord(type = "医生管理", subType = "删除", bizNo ="{{#id}}" , success = "删除ID为{{#id}}的医生")
|
@LogRecord(type = "医生管理", subType = "删除", bizNo = "{{#id}}", success = "删除ID为{{#id}}的医生")
|
||||||
public CommonResult<Boolean> delete(@RequestParam("id") String id, @RequestParam("username") String username) {
|
public CommonResult<Boolean> delete(@RequestParam("id") String id, @RequestParam("username") String username) {
|
||||||
//不是真删除 修改状态
|
//不是真删除 修改状态
|
||||||
//Service.delete(id);
|
//Service.delete(id);
|
||||||
//当前时间
|
//当前时间
|
||||||
LocalDateTime dateTime= LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
|
LocalDateTime dateTime = LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
|
||||||
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||||
DoctorSaveReqVO up=new DoctorSaveReqVO();
|
DoctorSaveReqVO up = new DoctorSaveReqVO();
|
||||||
up.setDoctorID(id);
|
up.setDoctorID(id);
|
||||||
up.setDeletePerson(username);
|
up.setDeletePerson(username);
|
||||||
up.setDeleteDate(dateTime);
|
up.setDeleteDate(dateTime);
|
||||||
@ -102,19 +102,27 @@ public class DoctorController {
|
|||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
@PreAuthorize("@ss.hasPermission('doctor::query')")
|
@PreAuthorize("@ss.hasPermission('doctor::query')")
|
||||||
public CommonResult<DoctorRespVO> get(@RequestParam("id") String id) {
|
public CommonResult<DoctorRespVO> get(@RequestParam("id") String id) {
|
||||||
DoctorDO doctorDO= Service.get(id);
|
DoctorDO doctorDO = Service.get(id);
|
||||||
return success(BeanUtils.toBean(doctorDO, DoctorRespVO.class));
|
return success(BeanUtils.toBean(doctorDO, DoctorRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getBydoctorID")
|
||||||
|
@Operation(summary = "获得医生管理")
|
||||||
|
@Parameter(name = "doctorID", description = "医生id", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('doctor::query')")
|
||||||
|
public CommonResult<DoctorDO> getBydoctorID(@RequestParam("doctorID") String doctorID) {
|
||||||
|
DoctorDO doctorDO = Service.getBydoctorID(doctorID);
|
||||||
|
return success(doctorDO);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@Operation(summary = "获得医生管理分页")
|
@Operation(summary = "获得医生管理分页")
|
||||||
@PreAuthorize("@ss.hasPermission('doctor::query')")
|
@PreAuthorize("@ss.hasPermission('doctor::query')")
|
||||||
public CommonResult<PageResult<DoctorRespVO>> getPage(@Valid DoctorPageReqVO pageReqVO) {
|
public CommonResult<PageResult<DoctorRespVO>> getPage(@Valid DoctorPageReqVO pageReqVO) {
|
||||||
//获取当前登陆用户
|
//获取当前登陆用户
|
||||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||||
String creator=user.getCreator();
|
String creator = user.getCreator();
|
||||||
if(!creator.equals("admin"))
|
if (!creator.equals("admin")) {
|
||||||
{
|
|
||||||
pageReqVO.setOrgId(user.getOrgId());
|
pageReqVO.setOrgId(user.getOrgId());
|
||||||
}
|
}
|
||||||
PageResult<DoctorDO> pageResult = Service.getPage(pageReqVO);
|
PageResult<DoctorDO> pageResult = Service.getPage(pageReqVO);
|
||||||
@ -125,23 +133,23 @@ public class DoctorController {
|
|||||||
@Operation(summary = "导出医生管理 Excel")
|
@Operation(summary = "导出医生管理 Excel")
|
||||||
@PreAuthorize("@ss.hasPermission('doctor::export')")
|
@PreAuthorize("@ss.hasPermission('doctor::export')")
|
||||||
@ApiAccessLog(operateType = EXPORT)
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
@LogRecord(type = "医生管理", subType = "导出", bizNo ="999" , success = "导出医生")
|
@LogRecord(type = "医生管理", subType = "导出", bizNo = "999", success = "导出医生")
|
||||||
public void exportExcel(@Valid DoctorPageReqVO pageReqVO,
|
public void exportExcel(@Valid DoctorPageReqVO pageReqVO,
|
||||||
HttpServletResponse response) throws IOException {
|
HttpServletResponse response) throws IOException {
|
||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
List<DoctorDO> list = Service.getPage(pageReqVO).getList();
|
List<DoctorDO> list = Service.getPage(pageReqVO).getList();
|
||||||
// 导出 Excel
|
// 导出 Excel
|
||||||
ExcelUtils.write(response, "医生管理.xls", "数据", DoctorRespVO.class,
|
ExcelUtils.write(response, "医生管理.xls", "数据", DoctorRespVO.class,
|
||||||
BeanUtils.toBean(list, DoctorRespVO.class));
|
BeanUtils.toBean(list, DoctorRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/upload")
|
@PostMapping("/upload")
|
||||||
@Operation(summary = "上传图片")
|
@Operation(summary = "上传图片")
|
||||||
@PreAuthorize("@ss.hasPermission('doctor::create')")
|
@PreAuthorize("@ss.hasPermission('doctor::create')")
|
||||||
public CommonResult<Boolean> handleFileUpload(@Valid @RequestBody uoloadVO uoloadVO) {
|
public CommonResult<Boolean> handleFileUpload(@Valid @RequestBody uoloadVO uoloadVO) {
|
||||||
|
|
||||||
String id=uoloadVO.getDoctorID();
|
String id = uoloadVO.getDoctorID();
|
||||||
DoctorSaveReqVO up=new DoctorSaveReqVO();
|
DoctorSaveReqVO up = new DoctorSaveReqVO();
|
||||||
up.setDoctorID(id);
|
up.setDoctorID(id);
|
||||||
up.setIsdelete("0");
|
up.setIsdelete("0");
|
||||||
up.setESignatureUrl(uoloadVO.getBase());
|
up.setESignatureUrl(uoloadVO.getBase());
|
||||||
@ -154,7 +162,7 @@ public class DoctorController {
|
|||||||
@PreAuthorize("@ss.hasPermission('doctor::query')")
|
@PreAuthorize("@ss.hasPermission('doctor::query')")
|
||||||
public CommonResult<List<DoctorDO>> getAlllist() {
|
public CommonResult<List<DoctorDO>> getAlllist() {
|
||||||
|
|
||||||
List<DoctorDO> doctorDOs= Service.getDoctorList(null);
|
List<DoctorDO> doctorDOs = Service.getDoctorList(null);
|
||||||
return success(doctorDOs);
|
return success(doctorDOs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,16 +174,17 @@ public class DoctorController {
|
|||||||
//当前登陆用户
|
//当前登陆用户
|
||||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||||
|
|
||||||
List<DoctorDO> doctorDOs= Service.getDoctorList(user.getOrgId());
|
List<DoctorDO> doctorDOs = Service.getDoctorList(user.getOrgId());
|
||||||
return success(doctorDOs);
|
return success(doctorDOs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/getdoctorlist")
|
@GetMapping("/getdoctorlist")
|
||||||
@Operation(summary = "根据传入的机构获得医生list")
|
@Operation(summary = "根据传入的机构获得医生list")
|
||||||
@PreAuthorize("@ss.hasPermission('doctor::query')")
|
@PreAuthorize("@ss.hasPermission('doctor::query')")
|
||||||
public CommonResult<List<DoctorDO>> getdoctorlist(@RequestParam("orgId") String orgId) {
|
public CommonResult<List<DoctorDO>> getdoctorlist(@RequestParam("orgId") String orgId) {
|
||||||
|
|
||||||
|
|
||||||
List<DoctorDO> doctorDOs= Service.getDoctorList(orgId);
|
List<DoctorDO> doctorDOs = Service.getDoctorList(orgId);
|
||||||
return success(doctorDOs);
|
return success(doctorDOs);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -33,9 +33,14 @@ public interface DoctorMapper extends BaseMapperX<DoctorDO> {
|
|||||||
return selectPage(reqVO, new LambdaQueryWrapperX<DoctorDO>()
|
return selectPage(reqVO, new LambdaQueryWrapperX<DoctorDO>()
|
||||||
.likeIfPresent(DoctorDO::getDoctorName, reqVO.getDoctorName())
|
.likeIfPresent(DoctorDO::getDoctorName, reqVO.getDoctorName())
|
||||||
.likeIfPresent(DoctorDO::getDepartmentName, reqVO.getDepartmentName())
|
.likeIfPresent(DoctorDO::getDepartmentName, reqVO.getDepartmentName())
|
||||||
.eqIfPresent(DoctorDO::getOrgId,reqVO.getOrgId())
|
.eqIfPresent(DoctorDO::getOrgId, reqVO.getOrgId())
|
||||||
.eq(DoctorDO::getIsdelete, '0')
|
.eq(DoctorDO::getIsdelete, '0')
|
||||||
.orderByAsc(DoctorDO::getDoctorName));
|
.orderByAsc(DoctorDO::getDoctorName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default DoctorDO selectOne(String doctorID) {
|
||||||
|
return selectOne(new LambdaQueryWrapperX<DoctorDO>()
|
||||||
|
.neIfPresent(DoctorDO::getIsdelete, '1')
|
||||||
|
.eq(DoctorDO::getDoctorID, doctorID));
|
||||||
|
}
|
||||||
}
|
}
|
@ -46,6 +46,14 @@ public interface DoctorService {
|
|||||||
*/
|
*/
|
||||||
DoctorDO get(String id);
|
DoctorDO get(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得医生管理
|
||||||
|
*
|
||||||
|
* @param doctorID 编号
|
||||||
|
* @return 医生管理
|
||||||
|
*/
|
||||||
|
DoctorDO getBydoctorID(String doctorID);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得医生管理分页
|
* 获得医生管理分页
|
||||||
*
|
*
|
||||||
|
@ -69,6 +69,14 @@ public class DoctorServiceImpl implements DoctorService {
|
|||||||
return Mapper.selectById(id);
|
return Mapper.selectById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DoctorDO getBydoctorID(String doctorID) {
|
||||||
|
if (doctorID == null || doctorID.trim().isEmpty())
|
||||||
|
return null;
|
||||||
|
else
|
||||||
|
return Mapper.selectOne(doctorID.trim());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<DoctorDO> getPage(DoctorPageReqVO pageReqVO) {
|
public PageResult<DoctorDO> getPage(DoctorPageReqVO pageReqVO) {
|
||||||
return Mapper.selectPage(pageReqVO);
|
return Mapper.selectPage(pageReqVO);
|
||||||
|
Loading…
Reference in New Issue
Block a user