From bc595e3843c6b873578b7403531373ca586a0b0b Mon Sep 17 00:00:00 2001 From: xiaoming <13564692840@163.com> Date: Thu, 14 May 2026 18:10:46 +0800 Subject: [PATCH] =?UTF-8?q?bug499=20=E3=80=90=E4=BD=8F=E9=99=A2=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E5=B7=A5=E4=BD=9C=E7=AB=99-=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E3=80=91=E6=A3=80=E6=9F=A5=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=BC=BA=E5=A4=B1=E6=9F=A5=E8=AF=A2=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=B8=8D=E7=AC=A6=E5=90=88?= =?UTF-8?q?=E4=B8=B4=E5=BA=8A=E9=AB=98=E6=95=88=E6=A3=80=E7=B4=A2=E8=A6=81?= =?UTF-8?q?=E6=B1=82=20=E6=95=B0=E6=8D=AE=E5=BA=93=E8=AF=AD=E5=8F=A5?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RequestFormManageAppMapper.xml | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml index fafd10ae4..8a9479fdb 100755 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml @@ -45,18 +45,6 @@ AND drf.create_time <= (#{endDate}::date + INTERVAL '1 day' - INTERVAL '1 second') - - AND CASE - WHEN MIN(wsr.status_enum) = 1 THEN 0 - WHEN MIN(wsr.status_enum) = 2 THEN 1 - WHEN MIN(wsr.status_enum) = 3 AND MAX(CASE WHEN wsr.performer_check_id IS NOT NULL THEN 1 ELSE 0 END) = 1 THEN 2 - WHEN MIN(wsr.status_enum) = 3 THEN 4 - WHEN MIN(wsr.status_enum) = 4 THEN 3 - WHEN MIN(wsr.status_enum) = 5 OR MIN(wsr.status_enum) = 6 OR MIN(wsr.status_enum) = 7 THEN 7 - WHEN MIN(wsr.status_enum) = 8 THEN 6 - ELSE NULL - END = #{status}::integer - AND (drf.prescription_no ILIKE '%' || #{keyword} || '%' OR EXISTS ( @@ -72,6 +60,19 @@ GROUP BY drf.id, drf.encounter_id, drf.prescription_no, drf.name, drf.desc_json, drf.requester_id, drf.create_time, ap.name + + HAVING CASE MIN(wsr.status_enum) + WHEN 1 THEN 0 + WHEN 2 THEN 1 + WHEN 3 THEN 4 + WHEN 4 THEN 4 + WHEN 5 THEN 5 + WHEN 6 THEN 5 + WHEN 7 THEN 5 + WHEN 8 THEN 6 + ELSE NULL + END = #{status}::integer +