From b5a460b95120173afa83006d08221fe43923f106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E8=8F=B2?= <12704587+yvwen@user.noreply.gitee.com> Date: Wed, 5 Mar 2025 16:24:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=97=A8=E8=AF=8A=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/patientManagement/outpatienRecords/index.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openhis-ui-vue3/src/views/patientManagement/outpatienRecords/index.vue b/openhis-ui-vue3/src/views/patientManagement/outpatienRecords/index.vue index edc0d8c3..77818af0 100644 --- a/openhis-ui-vue3/src/views/patientManagement/outpatienRecords/index.vue +++ b/openhis-ui-vue3/src/views/patientManagement/outpatienRecords/index.vue @@ -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(); } /** 重置按钮操作 */ From 4c1f703fb4924bfaa6c679b87a55984ea9ef87f2 Mon Sep 17 00:00:00 2001 From: liuhongrui Date: Wed, 5 Mar 2025 16:45:45 +0800 Subject: [PATCH 2/2] up --- .../controller/OutpatientRecordController.java | 13 ++++++++----- .../dto/OutpatientRecordSearchParam.java | 4 ++-- .../patientmanage/PatientManageMapper.xml | 18 ++++++++++-------- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/controller/OutpatientRecordController.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/controller/OutpatientRecordController.java index c30c9bd9..2c484030 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/controller/OutpatientRecordController.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/controller/OutpatientRecordController.java @@ -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; // 连表查询患者信息 diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/dto/OutpatientRecordSearchParam.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/dto/OutpatientRecordSearchParam.java index 4ff8c830..09674301 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/dto/OutpatientRecordSearchParam.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/dto/OutpatientRecordSearchParam.java @@ -25,9 +25,9 @@ public class OutpatientRecordSearchParam { private String doctorName; /** 筛选开始时间 */ - private Date beginTime; + private String beginTime; /** 筛选结束时间 */ - private Date endTime; + private String endTime; } diff --git a/openhis-server/openhis-application/src/main/resources/mapper/patientmanage/PatientManageMapper.xml b/openhis-server/openhis-application/src/main/resources/mapper/patientmanage/PatientManageMapper.xml index 59f9b2d5..852b13d1 100644 --- a/openhis-server/openhis-application/src/main/resources/mapper/patientmanage/PatientManageMapper.xml +++ b/openhis-server/openhis-application/src/main/resources/mapper/patientmanage/PatientManageMapper.xml @@ -139,13 +139,14 @@ - AND pt.phone LIKE CONCAT('%',#{phone}, '%') + AND pt.phone LIKE CONCAT('%',#{OutpatientRecordSearchParam.phone}, '%') - - AND e.start_time BETWEEN #{OutpatientRecordSearchParam.startTime} AND - #{OutpatientRecordSearchParam.endTime} + + 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') @@ -184,13 +185,14 @@ - AND pt.phone LIKE CONCAT('%',#{phone}, '%') + AND pt.phone LIKE CONCAT('%',#{OutpatientRecordSearchParam.phone}, '%') - - AND e.start_time BETWEEN #{OutpatientRecordSearchParam.startTime} AND - #{OutpatientRecordSearchParam.endTime} + + 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')