修改超声工作台相关内容
This commit is contained in:
parent
0cb1ddcf41
commit
5cafa7c6ac
yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist
controller/admin
ecganalysisparas
patientexamlist
dal/mysql/patientexamlist
service/patientexamlist
@ -125,7 +125,7 @@ public class EcganalysisparasController {
|
||||
}
|
||||
else
|
||||
{
|
||||
return success("未获取到相关数据");
|
||||
return success(null,"未获取到相关数据");
|
||||
}
|
||||
return success(list1);
|
||||
}
|
||||
|
@ -161,53 +161,85 @@ public class PatientexamlistController {
|
||||
@PreAuthorize("@ss.hasPermission('tblist:patientexamlist:query')")
|
||||
public CommonResult<PageResult<PatientexamlistRespVO>> getPatientexamlistPage(@Valid PatientexamlistPageReqVO pageReqVO) {
|
||||
|
||||
//获取当前登陆用户
|
||||
// //获取当前登陆用户
|
||||
// AdminUserDO user = userService.getUser(getLoginUserId());
|
||||
// pageReqVO.setOrgId(user.getOrgId());
|
||||
//
|
||||
// String devicetype = pageReqVO.getDeviceType();
|
||||
// if (devicetype != null && devicetype.contains("CT"))
|
||||
// pageReqVO.setDeviceType(null);
|
||||
// PageResult<PatientexamlistDO> pageResult = patientexamlistService.getPatientexamlistPage(pageReqVO);
|
||||
// List<PatientexamlistDO> doList = new ArrayList<>();
|
||||
// if (devicetype != null && devicetype.contains("US"))//表示只查询超声的数据
|
||||
// {
|
||||
// // 筛选条件:
|
||||
// doList = pageResult.getList().stream()
|
||||
// .filter(PatientexamlistDO -> (PatientexamlistDO.getDeviceType().contains("US")))
|
||||
// .sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面
|
||||
// .collect(Collectors.toList());
|
||||
// } else if (devicetype != null && devicetype.contains("CSH1"))//表示只查询病理工作台的数据
|
||||
// {
|
||||
// // 筛选条件:
|
||||
// doList = pageResult.getList().stream()
|
||||
// .filter(PatientexamlistDO -> (PatientexamlistDO.getDeviceType().contains("CSH1")))
|
||||
// .sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面
|
||||
// .collect(Collectors.toList());
|
||||
// } else if (devicetype != null && devicetype.contains("ECG"))//表示只查询心电的数据
|
||||
// {
|
||||
// // 筛选条件:
|
||||
// doList = pageResult.getList().stream()
|
||||
// .filter(PatientexamlistDO -> (PatientexamlistDO.getDeviceType().contains("ECG")))
|
||||
// .sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面
|
||||
// .collect(Collectors.toList());
|
||||
// } else if (devicetype != null && !devicetype.trim().isEmpty())//表示只查询影像的数据
|
||||
// {
|
||||
// // 筛选条件:
|
||||
// doList = pageResult.getList().stream()
|
||||
// .filter(PatientexamlistDO -> !(PatientexamlistDO.getDeviceType().contains("US")) && !(PatientexamlistDO.getDeviceType().contains("CSH1")) && !(PatientexamlistDO.getDeviceType().contains("ECG")))
|
||||
// .sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面
|
||||
// .collect(Collectors.toList());
|
||||
// } else //devicetype为空,查询全部数据
|
||||
// {
|
||||
// doList = pageResult.getList().stream()
|
||||
// .sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面
|
||||
// .collect(Collectors.toList());
|
||||
// }
|
||||
//
|
||||
// pageResult.setList(doList);
|
||||
// pageResult.setTotal((long) doList.size());
|
||||
//
|
||||
// return success(BeanUtils.toBean(pageResult, PatientexamlistRespVO.class));
|
||||
|
||||
|
||||
// 获取当前登陆用户
|
||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||
pageReqVO.setOrgId(user.getOrgId());
|
||||
|
||||
String devicetype = pageReqVO.getDeviceType();
|
||||
if (devicetype != null && devicetype.contains("CT"))
|
||||
pageReqVO.setDeviceType(null);
|
||||
PageResult<PatientexamlistDO> pageResult = patientexamlistService.getPatientexamlistPage(pageReqVO);
|
||||
List<PatientexamlistDO> doList = new ArrayList<>();
|
||||
if (devicetype != null && devicetype.contains("US"))//表示只查询超声的数据
|
||||
{
|
||||
// 筛选条件:
|
||||
doList = pageResult.getList().stream()
|
||||
.filter(PatientexamlistDO -> (PatientexamlistDO.getDeviceType().contains("US")))
|
||||
.sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面
|
||||
.collect(Collectors.toList());
|
||||
} else if (devicetype != null && devicetype.contains("CSH1"))//表示只查询病理工作台的数据
|
||||
{
|
||||
// 筛选条件:
|
||||
doList = pageResult.getList().stream()
|
||||
.filter(PatientexamlistDO -> (PatientexamlistDO.getDeviceType().contains("CSH1")))
|
||||
.sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面
|
||||
.collect(Collectors.toList());
|
||||
} else if (devicetype != null && devicetype.contains("ECG"))//表示只查询心电的数据
|
||||
{
|
||||
// 筛选条件:
|
||||
doList = pageResult.getList().stream()
|
||||
.filter(PatientexamlistDO -> (PatientexamlistDO.getDeviceType().contains("ECG")))
|
||||
.sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面
|
||||
.collect(Collectors.toList());
|
||||
} else if (devicetype != null && !devicetype.trim().isEmpty())//表示只查询影像的数据
|
||||
{
|
||||
// 筛选条件:
|
||||
doList = pageResult.getList().stream()
|
||||
.filter(PatientexamlistDO -> !(PatientexamlistDO.getDeviceType().contains("US")) && !(PatientexamlistDO.getDeviceType().contains("CSH1")) && !(PatientexamlistDO.getDeviceType().contains("ECG")))
|
||||
.sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面
|
||||
.collect(Collectors.toList());
|
||||
} else //devicetype为空,查询全部数据
|
||||
{
|
||||
doList = pageResult.getList().stream()
|
||||
.sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
pageResult.setList(doList);
|
||||
pageResult.setTotal((long) doList.size());
|
||||
// // 构建查询条件
|
||||
// QueryWrapper<PatientexamlistDO> queryWrapper = new QueryWrapper<>();
|
||||
// queryWrapper.eq("orgId", pageReqVO.getOrgId());
|
||||
// if (pageReqVO.getDeviceType() != null) {
|
||||
// String devicetype = pageReqVO.getDeviceType();
|
||||
// if (devicetype.contains("US")) {
|
||||
// queryWrapper.like("deviceType", "US");
|
||||
// } else if (devicetype.contains("CSH1")) {
|
||||
// queryWrapper.like("deviceType", "CSH1");
|
||||
// } else if (devicetype.contains("ECG")) {
|
||||
// queryWrapper.like("deviceType", "ECG");
|
||||
// } else {
|
||||
// // 排除US、CSH1、ECG设备类型
|
||||
// queryWrapper.notLike("deviceType", "US")
|
||||
// .notLike("deviceType", "CSH1")
|
||||
// .notLike("deviceType", "ECG");
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// // 添加排序条件
|
||||
// queryWrapper.orderByDesc("examDate");
|
||||
|
||||
// 获取分页结果
|
||||
PageResult<PatientexamlistDO> pageResult = patientexamlistService.getPatientexamlistPagesql(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, PatientexamlistRespVO.class));
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ public class PatientexamlistPageReqVO extends PageParam {
|
||||
private String examId;
|
||||
|
||||
@Schema(description = "患者姓名", example = "赵六")
|
||||
private String pName;
|
||||
private String pname;
|
||||
|
||||
@Schema(description = "性别")
|
||||
private String gender;
|
||||
|
@ -8,6 +8,7 @@ import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.org.OrgUnitDO;
|
||||
import cn.iocoder.yudao.module.tblist.dal.dataobject.patientexamlist.PatientexamlistDO;
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
import cn.iocoder.yudao.module.tblist.controller.admin.patientexamlist.vo.*;
|
||||
|
||||
@ -73,7 +74,7 @@ public interface PatientexamlistMapper extends BaseMapperX<PatientexamlistDO> {
|
||||
default PageResult<PatientexamlistDO> selectPage(PatientexamlistPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<PatientexamlistDO>()
|
||||
.eqIfPresent(PatientexamlistDO::getExamId, reqVO.getExamId())
|
||||
.likeIfPresent(PatientexamlistDO::getPName, reqVO.getPName())
|
||||
.likeIfPresent(PatientexamlistDO::getPName, reqVO.getPname())
|
||||
.eqIfPresent(PatientexamlistDO::getGender, reqVO.getGender())
|
||||
.betweenIfPresent(PatientexamlistDO::getExamDate, reqVO.getExamDate())
|
||||
.likeIfPresent(PatientexamlistDO::getExamItemName, reqVO.getExamItemName())
|
||||
@ -106,6 +107,56 @@ public interface PatientexamlistMapper extends BaseMapperX<PatientexamlistDO> {
|
||||
.orderByDesc(PatientexamlistDO::getId));
|
||||
|
||||
}
|
||||
default PageResult<PatientexamlistDO> selectPagesql(PatientexamlistPageReqVO reqVO) {
|
||||
LambdaQueryWrapperX<PatientexamlistDO> queryWrapper = new LambdaQueryWrapperX<>();
|
||||
|
||||
// 添加 orgId 条件
|
||||
queryWrapper.eqIfPresent(PatientexamlistDO::getOrgId, reqVO.getOrgId());
|
||||
|
||||
// 添加 deviceType 条件
|
||||
if (reqVO.getDeviceType() != null) {
|
||||
String devicetype = reqVO.getDeviceType();
|
||||
if (devicetype.contains("US")) {
|
||||
queryWrapper.like(PatientexamlistDO::getDeviceType, "US");
|
||||
} else if (devicetype.contains("CSH1")) {
|
||||
queryWrapper.like(PatientexamlistDO::getDeviceType, "CSH1");
|
||||
} else if (devicetype.contains("ECG")) {
|
||||
queryWrapper.like(PatientexamlistDO::getDeviceType, "ECG");
|
||||
} else {
|
||||
// 排除US、CSH1、ECG设备类型
|
||||
queryWrapper.notLike(PatientexamlistDO::getDeviceType, "US")
|
||||
.notLike(PatientexamlistDO::getDeviceType, "CSH1")
|
||||
.notLike(PatientexamlistDO::getDeviceType, "ECG");
|
||||
}
|
||||
}
|
||||
|
||||
// 添加其他查询条件
|
||||
queryWrapper.eqIfPresent(PatientexamlistDO::getExamId, reqVO.getExamId())
|
||||
.likeIfPresent(PatientexamlistDO::getPName, reqVO.getPname())
|
||||
.eqIfPresent(PatientexamlistDO::getGender, reqVO.getGender())
|
||||
.betweenIfPresent(PatientexamlistDO::getExamDate, reqVO.getExamDate())
|
||||
.likeIfPresent(PatientexamlistDO::getExamItemName, reqVO.getExamItemName())
|
||||
.eqIfPresent(PatientexamlistDO::getReportstatus, reqVO.getReportstatus())
|
||||
.betweenIfPresent(PatientexamlistDO::getUploadDate, reqVO.getUploadDate())
|
||||
.likeIfPresent(PatientexamlistDO::getOrgName, reqVO.getOrgName())
|
||||
.betweenIfPresent(PatientexamlistDO::getCreateDate, reqVO.getCreateDate())
|
||||
.eqIfPresent(PatientexamlistDO::getExamDescription, reqVO.getExamDescription())
|
||||
.eqIfPresent(PatientexamlistDO::getDiagResults, reqVO.getDiagResults())
|
||||
.betweenIfPresent(PatientexamlistDO::getDiagDate, reqVO.getDiagDate())
|
||||
.eqIfPresent(PatientexamlistDO::getDiagDoctor, reqVO.getDiagDoctor())
|
||||
.betweenIfPresent(PatientexamlistDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(PatientexamlistDO::getIsFavourite, reqVO.getIsFavourite())
|
||||
.and(wrapper -> wrapper
|
||||
.eq(PatientexamlistDO::getOrgId, reqVO.getOrgId())
|
||||
.or()
|
||||
.eq(PatientexamlistDO::getHighLevelOrgId, reqVO.getOrgId()))
|
||||
.orderByDesc(PatientexamlistDO::getId);
|
||||
|
||||
// 获取分页结果
|
||||
return selectPage(reqVO, queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 查询需要刷新的数据
|
||||
@Select("select * from tb_patientexamlist where reportstatus='已分检' and examDate is null and orgId=#{orgId}")
|
||||
|
@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.tblist.controller.admin.patientexamlist.vo.*;
|
||||
import cn.iocoder.yudao.module.tblist.dal.dataobject.patientexamlist.PatientexamlistDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.validation.Valid;
|
||||
@ -71,6 +72,8 @@ public interface PatientexamlistService extends IService<PatientexamlistDO> {
|
||||
* @return PACS检查列表分页
|
||||
*/
|
||||
PageResult<PatientexamlistDO> getPatientexamlistPage(PatientexamlistPageReqVO pageReqVO);
|
||||
/*查询分页 */
|
||||
PageResult<PatientexamlistDO> getPatientexamlistPagesql(PatientexamlistPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得PACS病例管理分页
|
||||
|
@ -140,7 +140,10 @@ public class PatientexamlistServiceImpl extends ServiceImpl<PatientexamlistMappe
|
||||
public PageResult<PatientexamlistDO> getPatientexamlistPage(PatientexamlistPageReqVO pageReqVO) {
|
||||
return patientexamlistMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<PatientexamlistDO> getPatientexamlistPagesql(PatientexamlistPageReqVO pageReqVO) {
|
||||
return patientexamlistMapper.selectPagesql(pageReqVO);
|
||||
}
|
||||
@Override
|
||||
public PageResult<PatientexamlistDO> getIllnessCasePage(IllnessCasePageReqVO pageReqVO) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user