fix(nurse-station): 修复住院护士站门户护理级别筛选功能失效问题 (Bug #172)
This commit is contained in:
@@ -69,7 +69,8 @@ public class PatientHomeAppServiceImpl implements IPatientHomeAppService {
|
|||||||
|
|
||||||
// 分页查询,查询患者信息
|
// 分页查询,查询患者信息
|
||||||
IPage<PatientHomeDto> patientHomeInfoPage = patientHomeAppMapper.getPage(new Page<>(pageNo, pageSize),
|
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 -> {
|
patientHomeInfoPage.getRecords().forEach(e -> {
|
||||||
// 护理级别
|
// 护理级别
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 患者首页 应用实现
|
* 患者首页 应用实现
|
||||||
@@ -36,7 +37,11 @@ public class PatientHomeController {
|
|||||||
public R<?> getPatientInfoInit(PatientHomeSearchParam patientHomeSearchParam,
|
public R<?> getPatientInfoInit(PatientHomeSearchParam patientHomeSearchParam,
|
||||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
@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);
|
return patientHomeAppService.getPatientInfoInit(patientHomeSearchParam, searchKey, pageNo, pageSize, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package com.openhis.web.inpatientmanage.dto;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 患者首页查询参数
|
* 患者首页查询参数
|
||||||
*
|
*
|
||||||
@@ -19,4 +21,7 @@ public class PatientHomeSearchParam {
|
|||||||
/** 患者ID */
|
/** 患者ID */
|
||||||
private Long patientId;
|
private Long patientId;
|
||||||
|
|
||||||
|
/** 护理级别列表(多选) */
|
||||||
|
private List<Integer> nursingLevelList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,10 +27,13 @@ public interface PatientHomeAppMapper {
|
|||||||
* @param statusEnum 状态编码
|
* @param statusEnum 状态编码
|
||||||
* @param patientId 患者ID
|
* @param patientId 患者ID
|
||||||
* @param searchKey 查询条件
|
* @param searchKey 查询条件
|
||||||
|
* @param nursingLevelList 护理级别列表
|
||||||
|
* @param queryWrapper 查询wrapper
|
||||||
* @return 住院登记信息
|
* @return 住院登记信息
|
||||||
*/
|
*/
|
||||||
IPage<PatientHomeDto> getPage(@Param("page") Page<PatientHomeDto> page, @Param("statusEnum") Integer statusEnum,
|
IPage<PatientHomeDto> getPage(@Param("page") Page<PatientHomeDto> page, @Param("statusEnum") Integer statusEnum,
|
||||||
@Param("patientId") Long patientId, @Param("searchKey") String searchKey,
|
@Param("patientId") Long patientId, @Param("searchKey") String searchKey,
|
||||||
|
@Param("nursingLevelList") List<Integer> nursingLevelList,
|
||||||
@Param(Constants.WRAPPER) QueryWrapper<PatientHomeDto> queryWrapper);
|
@Param(Constants.WRAPPER) QueryWrapper<PatientHomeDto> queryWrapper);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -242,6 +242,14 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
</if>
|
</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
|
) patient_base
|
||||||
) ranked_result
|
) ranked_result
|
||||||
WHERE rn = 1
|
WHERE rn = 1
|
||||||
|
|||||||
@@ -241,11 +241,21 @@ export function tansParams(params) {
|
|||||||
var part = encodeURIComponent(propName) + "=";
|
var part = encodeURIComponent(propName) + "=";
|
||||||
if (value !== null && value !== "" && typeof (value) !== "undefined") {
|
if (value !== null && value !== "" && typeof (value) !== "undefined") {
|
||||||
if (typeof value === 'object') {
|
if (typeof value === 'object') {
|
||||||
for (const key of Object.keys(value)) {
|
// 处理数组类型
|
||||||
if (value[key] !== null && value[key] !== "" && typeof (value[key]) !== 'undefined') {
|
if (Array.isArray(value)) {
|
||||||
let params = propName + '[' + key + ']';
|
for (const item of value) {
|
||||||
var subPart = encodeURIComponent(params) + "=";
|
if (item !== null && item !== "" && typeof (item) !== 'undefined') {
|
||||||
result += subPart + encodeURIComponent(value[key]) + "&";
|
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 {
|
} else {
|
||||||
|
|||||||
@@ -26,14 +26,12 @@
|
|||||||
>
|
>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</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-group v-model="queryParams.nursingLevelList" @change="getList">
|
||||||
<el-checkbox-button
|
<el-checkbox-button
|
||||||
v-for="item in levelList"
|
v-for="item in levelList"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
v-model="item.value"
|
:label="item.value"
|
||||||
style="display: inline-block"
|
|
||||||
:label="item.label"
|
|
||||||
>
|
>
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
</el-checkbox-button>
|
</el-checkbox-button>
|
||||||
@@ -187,7 +185,7 @@ const data = reactive({
|
|||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
searchKey: undefined, // 品名/商品名/英文品名/编码/拼音
|
searchKey: undefined, // 品名/商品名/英文品名/编码/拼音
|
||||||
checkboxGroup2: [], // 类型(包括 1:中药,2:成药)
|
nursingLevelList: [], // 护理级别列表(多选)
|
||||||
statusEnum: 1, // 状态
|
statusEnum: 1, // 状态
|
||||||
},
|
},
|
||||||
rules: {},
|
rules: {},
|
||||||
|
|||||||
Reference in New Issue
Block a user