ecg打印模板图片签名
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
yudao-ui-admin CI / build (14.x) (push) Has been cancelled
yudao-ui-admin CI / build (16.x) (push) Has been cancelled
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
yudao-ui-admin CI / build (14.x) (push) Has been cancelled
yudao-ui-admin CI / build (16.x) (push) Has been cancelled
This commit is contained in:
parent
69c4cb17e2
commit
b609590d7f
@ -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.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
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.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
|
||||
@ -53,17 +55,15 @@ public class DoctorController {
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建医生管理")
|
||||
@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) {
|
||||
|
||||
String Msg="";
|
||||
DoctorDO doctorDO= Service.get(createReqVO.getDoctorID());
|
||||
if(doctorDO!=null) {
|
||||
Msg="医生编号已存在";
|
||||
}
|
||||
else
|
||||
{
|
||||
Msg= Service.create(createReqVO);
|
||||
String Msg = "";
|
||||
DoctorDO doctorDO = Service.get(createReqVO.getDoctorID());
|
||||
if (doctorDO != null) {
|
||||
Msg = "医生编号已存在";
|
||||
} else {
|
||||
Msg = Service.create(createReqVO);
|
||||
}
|
||||
return success(Msg);
|
||||
}
|
||||
@ -71,7 +71,7 @@ public class DoctorController {
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新医生管理")
|
||||
@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) {
|
||||
Service.update(updateReqVO);
|
||||
return success(true);
|
||||
@ -81,14 +81,14 @@ public class DoctorController {
|
||||
@Operation(summary = "删除医生管理")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@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) {
|
||||
//不是真删除 修改状态
|
||||
//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"));
|
||||
DoctorSaveReqVO up=new DoctorSaveReqVO();
|
||||
DoctorSaveReqVO up = new DoctorSaveReqVO();
|
||||
up.setDoctorID(id);
|
||||
up.setDeletePerson(username);
|
||||
up.setDeleteDate(dateTime);
|
||||
@ -102,19 +102,27 @@ public class DoctorController {
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('doctor::query')")
|
||||
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));
|
||||
}
|
||||
|
||||
@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")
|
||||
@Operation(summary = "获得医生管理分页")
|
||||
@PreAuthorize("@ss.hasPermission('doctor::query')")
|
||||
public CommonResult<PageResult<DoctorRespVO>> getPage(@Valid DoctorPageReqVO pageReqVO) {
|
||||
//获取当前登陆用户
|
||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||
String creator=user.getCreator();
|
||||
if(!creator.equals("admin"))
|
||||
{
|
||||
String creator = user.getCreator();
|
||||
if (!creator.equals("admin")) {
|
||||
pageReqVO.setOrgId(user.getOrgId());
|
||||
}
|
||||
PageResult<DoctorDO> pageResult = Service.getPage(pageReqVO);
|
||||
@ -125,23 +133,23 @@ public class DoctorController {
|
||||
@Operation(summary = "导出医生管理 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('doctor::export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
@LogRecord(type = "医生管理", subType = "导出", bizNo ="999" , success = "导出医生")
|
||||
@LogRecord(type = "医生管理", subType = "导出", bizNo = "999", success = "导出医生")
|
||||
public void exportExcel(@Valid DoctorPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<DoctorDO> list = Service.getPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "医生管理.xls", "数据", DoctorRespVO.class,
|
||||
BeanUtils.toBean(list, DoctorRespVO.class));
|
||||
BeanUtils.toBean(list, DoctorRespVO.class));
|
||||
}
|
||||
|
||||
@PostMapping("/upload")
|
||||
@Operation(summary = "上传图片")
|
||||
@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();
|
||||
DoctorSaveReqVO up=new DoctorSaveReqVO();
|
||||
String id = uoloadVO.getDoctorID();
|
||||
DoctorSaveReqVO up = new DoctorSaveReqVO();
|
||||
up.setDoctorID(id);
|
||||
up.setIsdelete("0");
|
||||
up.setESignatureUrl(uoloadVO.getBase());
|
||||
@ -154,7 +162,7 @@ public class DoctorController {
|
||||
@PreAuthorize("@ss.hasPermission('doctor::query')")
|
||||
public CommonResult<List<DoctorDO>> getAlllist() {
|
||||
|
||||
List<DoctorDO> doctorDOs= Service.getDoctorList(null);
|
||||
List<DoctorDO> doctorDOs = Service.getDoctorList(null);
|
||||
return success(doctorDOs);
|
||||
}
|
||||
|
||||
@ -166,16 +174,17 @@ public class DoctorController {
|
||||
//当前登陆用户
|
||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||
|
||||
List<DoctorDO> doctorDOs= Service.getDoctorList(user.getOrgId());
|
||||
List<DoctorDO> doctorDOs = Service.getDoctorList(user.getOrgId());
|
||||
return success(doctorDOs);
|
||||
}
|
||||
|
||||
@GetMapping("/getdoctorlist")
|
||||
@Operation(summary = "根据传入的机构获得医生list")
|
||||
@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);
|
||||
}
|
||||
}
|
@ -33,9 +33,14 @@ public interface DoctorMapper extends BaseMapperX<DoctorDO> {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<DoctorDO>()
|
||||
.likeIfPresent(DoctorDO::getDoctorName, reqVO.getDoctorName())
|
||||
.likeIfPresent(DoctorDO::getDepartmentName, reqVO.getDepartmentName())
|
||||
.eqIfPresent(DoctorDO::getOrgId,reqVO.getOrgId())
|
||||
.eqIfPresent(DoctorDO::getOrgId, reqVO.getOrgId())
|
||||
.eq(DoctorDO::getIsdelete, '0')
|
||||
.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);
|
||||
|
||||
/**
|
||||
* 获得医生管理
|
||||
*
|
||||
* @param doctorID 编号
|
||||
* @return 医生管理
|
||||
*/
|
||||
DoctorDO getBydoctorID(String doctorID);
|
||||
|
||||
/**
|
||||
* 获得医生管理分页
|
||||
*
|
||||
|
@ -69,6 +69,14 @@ public class DoctorServiceImpl implements DoctorService {
|
||||
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
|
||||
public PageResult<DoctorDO> getPage(DoctorPageReqVO pageReqVO) {
|
||||
return Mapper.selectPage(pageReqVO);
|
||||
|
Loading…
Reference in New Issue
Block a user