fix(nurse-station): 修复住院护士站门户护理级别筛选功能失效问题 (Bug #172)

This commit is contained in:
2026-03-12 17:32:55 +08:00
parent 2bfdd686c7
commit 17b8ea7192
7 changed files with 42 additions and 12 deletions

View File

@@ -69,7 +69,8 @@ public class PatientHomeAppServiceImpl implements IPatientHomeAppService {
// 分页查询,查询患者信息
IPage<PatientHomeDto> patientHomeInfoPage = patientHomeAppMapper.getPage(new Page<>(pageNo, pageSize),
patientHomeSearchParam.getStatusEnum(), patientHomeSearchParam.getPatientId(), searchKey, queryWrapper);
patientHomeSearchParam.getStatusEnum(), patientHomeSearchParam.getPatientId(), searchKey,
patientHomeSearchParam.getNursingLevelList(), queryWrapper);
patientHomeInfoPage.getRecords().forEach(e -> {
// 护理级别

View File

@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.List;
/**
* 患者首页 应用实现
@@ -36,7 +37,11 @@ public class PatientHomeController {
public R<?> getPatientInfoInit(PatientHomeSearchParam patientHomeSearchParam,
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
@RequestParam(value = "nursingLevelList", required = false) List<Integer> nursingLevelList,
HttpServletRequest request) {
// 将护理级别列表设置到查询参数中
patientHomeSearchParam.setNursingLevelList(nursingLevelList);
return patientHomeAppService.getPatientInfoInit(patientHomeSearchParam, searchKey, pageNo, pageSize, request);
}

View File

@@ -3,6 +3,8 @@ package com.openhis.web.inpatientmanage.dto;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.List;
/**
* 患者首页查询参数
*
@@ -19,4 +21,7 @@ public class PatientHomeSearchParam {
/** 患者ID */
private Long patientId;
/** 护理级别列表(多选) */
private List<Integer> nursingLevelList;
}

View File

@@ -27,10 +27,13 @@ public interface PatientHomeAppMapper {
* @param statusEnum 状态编码
* @param patientId 患者ID
* @param searchKey 查询条件
* @param nursingLevelList 护理级别列表
* @param queryWrapper 查询wrapper
* @return 住院登记信息
*/
IPage<PatientHomeDto> getPage(@Param("page") Page<PatientHomeDto> page, @Param("statusEnum") Integer statusEnum,
@Param("patientId") Long patientId, @Param("searchKey") String searchKey,
@Param("nursingLevelList") List<Integer> nursingLevelList,
@Param(Constants.WRAPPER) QueryWrapper<PatientHomeDto> queryWrapper);
/**

View File

@@ -242,6 +242,14 @@
)
)
</if>
-- 护理级别筛选(多选)
<if test="nursingLevelList != null and nursingLevelList.size() > 0">
AND T2.priority_enum IN
<foreach collection="nursingLevelList" item="level" open="(" separator="," close=")">
#{level}
</foreach>
</if>
) patient_base
) ranked_result
WHERE rn = 1

View File

@@ -241,11 +241,21 @@ export function tansParams(params) {
var part = encodeURIComponent(propName) + "=";
if (value !== null && value !== "" && typeof (value) !== "undefined") {
if (typeof value === 'object') {
for (const key of Object.keys(value)) {
if (value[key] !== null && value[key] !== "" && typeof (value[key]) !== 'undefined') {
let params = propName + '[' + key + ']';
var subPart = encodeURIComponent(params) + "=";
result += subPart + encodeURIComponent(value[key]) + "&";
// 处理数组类型
if (Array.isArray(value)) {
for (const item of value) {
if (item !== null && item !== "" && typeof (item) !== 'undefined') {
result += part + encodeURIComponent(item) + "&";
}
}
} else {
// 处理对象类型
for (const key of Object.keys(value)) {
if (value[key] !== null && value[key] !== "" && typeof (value[key]) !== 'undefined') {
let params = propName + '[' + key + ']';
var subPart = encodeURIComponent(params) + "=";
result += subPart + encodeURIComponent(value[key]) + "&";
}
}
}
} else {

View File

@@ -26,14 +26,12 @@
>
</el-radio-group>
</el-form-item>
<el-form-item label="" prop="checkboxGroup2">
<el-form-item label="" prop="nursingLevelList">
<el-checkbox-group v-model="queryParams.nursingLevelList" @change="getList">
<el-checkbox-button
v-for="item in levelList"
:key="item.value"
v-model="item.value"
style="display: inline-block"
:label="item.label"
:label="item.value"
>
{{ item.label }}
</el-checkbox-button>
@@ -187,7 +185,7 @@ const data = reactive({
pageNo: 1,
pageSize: 10,
searchKey: undefined, // 品名/商品名/英文品名/编码/拼音
checkboxGroup2: [], // 类型(包括 1中药2成药
nursingLevelList: [], // 护理级别列表(多选
statusEnum: 1, // 状态
},
rules: {},