JAVA全系列 教程
3762个小节阅读:7088.9k
目录
C语言快速入门
JAVA全系列 教程
面向对象的程序设计语言
Python全系列 教程
Python3.x版本,未来主流的版本
人工智能 教程
顺势而为,AI创新未来
大厂算法 教程
算法,程序员自我提升必经之路
C++ 教程
一门通用计算机编程语言
微服务 教程
目前业界流行的框架组合
web前端全系列 教程
通向WEB技术世界的钥匙
大数据全系列 教程
站在云端操控万千数据
AIGC全能工具班
A A
White Night
序号 | 接口名称 | 接口地址 | 请求类型 |
---|---|---|---|
1 | 分页查询挂号单 | /doctor/registration/queryRegistrationForPage | get |
2 | 作废 | /doctor/registration/doInvalid/{regId} | post |
3 | 退号 | /doctor/registration/doReturn/{regId} | post |
参数名称 | 是否必须 |
---|---|
pageNum | 否 |
pageSize | 否 |
返回JSON数据
名称 | 类型 | 其他信息 |
---|---|---|
total | int | |
code | int | |
msg | String | |
data | object [] | item 类型: object |
├─ registrationId | String | |
├─ patientId | String | |
├─ patientName | String | |
├─ doctorName | String | |
├─ deptId | int | |
├─ registeredfeeId | int | |
├─ registrationAmount | int | |
├─ registrationNumber | int | |
├─ registrationStatus | String | |
├─ subsectionType | String | |
├─ schedulingType | String | |
├─ visitDate | String | |
├─ createTime | String | |
├─ createBy | String |
创建Registration、RegistrationDto
创建RegistrationMapper、RegistrationMapper.xml
增加查询挂号单的方法
xxxxxxxxxx
@Override
public DataGridView queryRegistrationForPage(RegistrationDto registrationDto) {
Page<Registration> page=new Page<>(registrationDto.getPageNum(),registrationDto.getPageSize());
QueryWrapper<Registration> qw=new QueryWrapper<>();
qw.eq(registrationDto.getDeptId()!=null,
Registration.COL_DEPT_ID,registrationDto.getDeptId());
qw.like(StringUtils.isNotBlank(registrationDto.getPatientName()),
Registration.COL_PATIENT_NAME,registrationDto.getPatientName());
qw.eq(StringUtils.isNotBlank(registrationDto.getSchedulingType()),
Registration.COL_SCHEDULING_TYPE,registrationDto.getSchedulingType());
qw.eq(StringUtils.isNotBlank(registrationDto.getSubsectionType()),
Registration.COL_SUBSECTION_TYPE,registrationDto.getSubsectionType());
qw.eq(StringUtils.isNotBlank(registrationDto.getRegStatus()),
Registration.COL_REG_STATUS,registrationDto.getRegStatus());
qw.eq(StringUtils.isNotBlank(registrationDto.getVisitDate()),
Registration.COL_VISIT_DATE,registrationDto.getVisitDate());
qw.orderByDesc(Registration.COL_CREATE_TIME);
this.registrationMapper.selectPage(page,qw);
return new DataGridView(page.getTotal(),page.getRecords());
}
xxxxxxxxxx
/**
* 分页查询挂号信息
*/
@GetMapping("queryRegistrationForPage")
@HystrixCommand
public AjaxResult queryRegistrationForPage(RegistrationDto registrationDto){
DataGridView gridView=this.registrationService.queryRegistrationForPage(registrationDto);
return AjaxResult.success(" 查询成功",gridView.getData(),gridView.getTotal());
}
分页查询挂号单/doctor/registration/queryRegistrationForPage
参数名称 | 是否必须 |
---|---|
regId | 是 |
xxxxxxxxxx
/**
* 作废
*/
@PostMapping("doInvalid/{regId}")
@SentinelResource(value = "doInvalid",blockHandlerClass = BaseController.class,
blockHandler = "handleException",fallbackClass = BaseController.class,fallback = "handleError")
public AjaxResult doInvalid(@PathVariable String regId){
Registration registration=this.registrationService.queryRegistrationByRegId(regId);
if(null==registration){
return AjaxResult.fail("当前挂号单【"+regId+"】对应的挂号单不存在,请核对后再查询");
}
//如果挂号单的状态不是未收费
if(!registration.getRegStatus().equals(Constants.REG_STATUS_0)){
return AjaxResult.fail("当前挂号单【"+regId+"】的状态不是未收费状态,不能作废");
}
//收费,更新挂号单的状态
registration.setRegStatus(Constants.REG_STATUS_5);
return AjaxResult.toAjax(this.registrationService.updateRegistrationByRegId(registration));
}
/doctor/registration/doInvalid/{regId}
参数名称 | 是否必须 |
---|---|
regId | 是 |
xxxxxxxxxx
/**
* 退号
*/
@PostMapping("doReturn/{regId}")
@SentinelResource(value = "doReturn",blockHandlerClass = BaseController.class,
blockHandler = "handleException",fallbackClass = BaseController.class,fallback = "handleError")
public AjaxResult doReturn(@PathVariable String regId){
Registration registration=this.registrationService.queryRegistrationByRegId(regId);
if(null==registration){
return AjaxResult.fail("当前挂号单【"+regId+"】对应的挂号单不存在,请核对后再查询");
}
//如果挂号单的状态不是未收费
if(!registration.getRegStatus().equals(Constants.REG_STATUS_1)){
return AjaxResult.fail("当前挂号单【"+regId+"】的状态不是待就诊状态,不能退号");
}
//收费,更新挂号单的状态
registration.setRegStatus(Constants.REG_STATUS_4);
return AjaxResult.toAjax(this.registrationService.updateRegistrationByRegId(registration));
}
/doctor/registration/doReturn/{regId}