Merge remote-tracking branch 'origin/master'

This commit is contained in:
Wang.Huan
2025-03-05 16:58:15 +08:00
4 changed files with 24 additions and 17 deletions

View File

@@ -1,12 +1,11 @@
package com.openhis.web.patientmanage.controller;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.common.core.domain.R;
@@ -52,10 +51,14 @@ public class OutpatientRecordController {
* @param pageSize 每页大小默认为10
*/
@GetMapping("/outpatient-record-page")
public R<?> getPatient(@RequestParam(required = false) OutpatientRecordSearchParam outpatientRecordSearchParam,
public R<?> getPatient(OutpatientRecordSearchParam outpatientRecordSearchParam,
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
System.out.println("doctorName"+outpatientRecordSearchParam.getDoctorName());
System.out.println("phone"+outpatientRecordSearchParam.getPhone());
System.out.println("searchKey"+outpatientRecordSearchParam.getSearchKey());
// 跳过的记录数
Integer offset = (pageNo - 1) * pageSize;
// 连表查询患者信息

View File

@@ -25,9 +25,9 @@ public class OutpatientRecordSearchParam {
private String doctorName;
/** 筛选开始时间 */
private Date beginTime;
private String beginTime;
/** 筛选结束时间 */
private Date endTime;
private String endTime;
}

View File

@@ -139,13 +139,14 @@
<!-- 如果传入phone参数且不为空 -->
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.phone != null and OutpatientRecordSearchParam.phone != ''">
AND pt.phone LIKE CONCAT('%',#{phone}, '%')
AND pt.phone LIKE CONCAT('%',#{OutpatientRecordSearchParam.phone}, '%')
</if>
<!-- 时间筛选 -->
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.startTime != null and OutpatientRecordSearchParam.endTime != null">
AND e.start_time BETWEEN #{OutpatientRecordSearchParam.startTime} AND
#{OutpatientRecordSearchParam.endTime}
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.beginTime != null and OutpatientRecordSearchParam.endTime != null">
AND e.start_time BETWEEN
TO_TIMESTAMP(#{OutpatientRecordSearchParam.beginTime} || ' 00:00:00', 'YYYY-MM-DD HH24:MI:SS') AND
TO_TIMESTAMP(#{OutpatientRecordSearchParam.endTime} || ' 23:59:59', 'YYYY-MM-DD HH24:MI:SS')
</if>
<!-- 如果传入doctorName参数且不为空 -->
@@ -184,13 +185,14 @@
<!-- 如果传入phone参数且不为空 -->
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.phone != null and OutpatientRecordSearchParam.phone != ''">
AND pt.phone LIKE CONCAT('%',#{phone}, '%')
AND pt.phone LIKE CONCAT('%',#{OutpatientRecordSearchParam.phone}, '%')
</if>
<!-- 时间筛选 -->
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.startTime != null and OutpatientRecordSearchParam.endTime != null">
AND e.start_time BETWEEN #{OutpatientRecordSearchParam.startTime} AND
#{OutpatientRecordSearchParam.endTime}
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.beginTime != null and OutpatientRecordSearchParam.endTime != null">
AND e.start_time BETWEEN
TO_TIMESTAMP(#{OutpatientRecordSearchParam.beginTime} || ' 00:00:00', 'YYYY-MM-DD HH24:MI:SS') AND
TO_TIMESTAMP(#{OutpatientRecordSearchParam.endTime} || ' 23:59:59', 'YYYY-MM-DD HH24:MI:SS')
</if>
<!-- 如果传入doctorName参数且不为空 -->

View File

@@ -80,7 +80,7 @@ const doctorOptions = computed(() => {
/** 查询门诊记录列表 */
function getList() {
listOutpatienRecords(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
listOutpatienRecords(queryParams.value).then(response => {
console.log(response);
outpatienRecordsList.value = response.data.records;
total.value = response.data.total;
@@ -92,8 +92,10 @@ function getList() {
/** 搜索按钮操作 */
function handleQuery() {
console.log("123",queryParams.value)
queryParams.value.beginTime = dateRange.value[0];
queryParams.value.endTime = dateRange.value[1];
queryParams.value.pageNo = 1;
console.log("123",queryParams.value,typeof queryParams.value.beginTime)
getList();
}
/** 重置按钮操作 */