From 38e0cad3107b0a43e9afac4e5e55cf769e84d01c Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 09 七月 2025 16:58:18 +0800
Subject: [PATCH] 代码提交
---
smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java | 4 +-
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml | 25 +++++++++---
smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml | 8 ++--
smartor/src/main/resources/mapper/smartor/ExternallInfoMapper.xml | 32 +++++++++-------
ruoyi-admin/src/main/resources/application-local.yml | 2
smartor/src/main/java/com/smartor/domain/PatMedInhosp.java | 8 ++--
ruoyi-admin/src/main/resources/application-wx.yml | 12 +++---
smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml | 9 ++--
8 files changed, 59 insertions(+), 41 deletions(-)
diff --git a/ruoyi-admin/src/main/resources/application-local.yml b/ruoyi-admin/src/main/resources/application-local.yml
index d675a23..c03a5b5 100644
--- a/ruoyi-admin/src/main/resources/application-local.yml
+++ b/ruoyi-admin/src/main/resources/application-local.yml
@@ -19,7 +19,7 @@
# password: csbsbxt@123
# driver-class-name: org.postgresql.Driver
# 鏈湴楂樻柉
- url: jdbc:postgresql://127.0.0.1:5432/postgres
+ url: jdbc:postgresql://192.168.100.138:5432/postgres
username: gaussdb
password: Ls@123456
driver-class-name: org.postgresql.Driver
diff --git a/ruoyi-admin/src/main/resources/application-wx.yml b/ruoyi-admin/src/main/resources/application-wx.yml
index 60b6fec..623ded6 100644
--- a/ruoyi-admin/src/main/resources/application-wx.yml
+++ b/ruoyi-admin/src/main/resources/application-wx.yml
@@ -19,10 +19,10 @@
# password: csbsbxt@123
# driver-class-name: org.postgresql.Driver
# 鏈湴楂樻柉
-# url: jdbc:postgresql://192.168.100.120:5432/postgres
-# username: gaussdb
-# password: Ls@123456
-# driver-class-name: org.postgresql.Driver
+ # url: jdbc:postgresql://192.168.100.120:5432/postgres
+ # username: gaussdb
+ # password: Ls@123456
+ # driver-class-name: org.postgresql.Driver
# 楂樻柉鏁版嵁搴撻摼鎺�
url: jdbc:postgresql://172.20.32.115:15400/smartorwx?prepareThreshold=0
username: shuifang
@@ -90,8 +90,8 @@
port: 6020
# 鍦板潃锛堝叕鍙革級
-# host: 116.62.18.175
-# port: 6020
+ # host: 116.62.18.175
+ # port: 6020
# 鏁版嵁搴撶储寮�
database: 0
# 瀵嗙爜
diff --git a/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java b/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
index 9036ae4..b1fd2b8 100644
--- a/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
+++ b/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
@@ -363,25 +363,25 @@
* 寮�濮嬪嚭闄㈡棩鏈�
*/
@ApiModelProperty(value = "寮�濮嬪嚭闄㈡棩鏈�")
- private Date startOutHospTime;
+ private String startOutHospTime;
/**
* 缁撴潫鍑洪櫌鏃ユ湡
*/
@ApiModelProperty(value = "缁撴潫鍑洪櫌鏃ユ湡")
- private Date endOutHospTime;
+ private String endOutHospTime;
/**
* 寮�濮嬪叆闄㈡棩鏈�
*/
@ApiModelProperty(value = "寮�濮嬪叆闄㈡棩鏈�")
- private Date startInHospTime;
+ private String startInHospTime;
/**
* 缁撴潫鍏ラ櫌鏃ユ湡
*/
@ApiModelProperty(value = "缁撴潫鍏ラ櫌鏃ユ湡")
- private Date endInHospTime;
+ private String endInHospTime;
@ApiModelProperty(value = "鏄惁澶栭儴瀵煎叆锛�0涓嶆槸 1鏄�")
private Integer outImport = 0;
diff --git a/smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java b/smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java
index df2fbbd..9bcc5de 100644
--- a/smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java
+++ b/smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java
@@ -198,14 +198,14 @@
*/
@ApiModelProperty(value = "灏辫瘖寮�濮嬫椂闂�")
@JsonFormat(pattern = "yyyy-MM-dd")
- private Date starttime;
+ private String starttime;
/**
* 灏辫瘖缁撴潫鏃堕棿
*/
@ApiModelProperty(value = "灏辫瘖缁撴潫鏃堕棿")
@JsonFormat(pattern = "yyyy-MM-dd")
- private Date endtime;
+ private String endtime;
/**
diff --git a/smartor/src/main/resources/mapper/smartor/ExternallInfoMapper.xml b/smartor/src/main/resources/mapper/smartor/ExternallInfoMapper.xml
index 798b39e..bd5b2b2 100644
--- a/smartor/src/main/resources/mapper/smartor/ExternallInfoMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ExternallInfoMapper.xml
@@ -303,8 +303,9 @@
<select id="getExternalOutHospInfo" resultMap="ExternalOutHospInfResult">
<include refid="selectOutHospitalRecordVo"/>
<where>
- <if test="startTime != null and endTime != null ">and jzrq between TO_DATE(#{startTime}, 'YYYY-MM-DD') AND
- TO_DATE(#{endTime},'YYYY-MM-DD')
+ <if test="startTime != null and endTime != null">
+ and jzrq > TO_DATE(#{startTime}, 'YYYY-MM-DD')
+ and jzrq <= TO_DATE(#{endTime}, 'YYYY-MM-DD')
</if>
</where>
</select>
@@ -312,8 +313,9 @@
<select id="getExternalOutHospPatientInfo" resultMap="ExternalPatientInfoResult">
<include refid="selectOutHospitalPatientRecordVo"/>
<where>
- <if test="startTime != null and endTime != null ">and jdsj between TO_DATE(#{startTime}, 'YYYY-MM-DD') AND
- TO_DATE(#{endTime},'YYYY-MM-DD')
+ <if test="startTime != null and endTime != null ">
+ and jdsj > TO_DATE(#{startTime}, 'YYYY-MM-DD')
+ and jdsj <= TO_DATE(#{endTime}, 'YYYY-MM-DD')
</if>
<if test="brid != null ">and BRID = #{brid}</if>
</where>
@@ -322,8 +324,9 @@
<select id="getExternalLeaveHospPatientInfo" resultMap="ExternalLeaveHospPatientInfoResult">
<include refid="selectLeaveHospitalRecordVo"/>
<where>
- <if test="startTime != null and endTime != null ">and cysq between TO_DATE(#{startTime}, 'YYYY-MM-DD') AND
- TO_DATE(#{endTime},'YYYY-MM-DD')
+ <if test="startTime != null and endTime != null ">
+ and cysq > TO_DATE(#{startTime}, 'YYYY-MM-DD')
+ and cysq <= TO_DATE(#{endTime}, 'YYYY-MM-DD')
</if>
</where>
</select>
@@ -331,8 +334,9 @@
<select id="getExternalInHospPatientInfo" resultMap="ExternalInHospPatientInfoResult">
<include refid="selectInHospitalRecordVo"/>
<where>
- <if test="startTime != null and endTime != null ">and ryrq between TO_DATE(#{startTime}, 'YYYY-MM-DD') AND
- TO_DATE(#{endTime},'YYYY-MM-DD')
+ <if test="startTime != null and endTime != null ">
+ and ryrq > TO_DATE(#{startTime}, 'YYYY-MM-DD')
+ and ryrq <= TO_DATE(#{endTime}, 'YYYY-MM-DD')
</if>
<if test="brid != null ">and BRID = #{brid}</if>
</where>
@@ -341,9 +345,9 @@
<select id="getExternalUserInfo" resultMap="ExternalUserInfoResult">
<include refid="selectUserVo"/>
<where>
- <if test="startTime != null and endTime != null ">and create_time between TO_DATE(#{startTime},
- 'YYYY-MM-DD') AND
- TO_DATE(#{endTime},'YYYY-MM-DD')
+ <if test="startTime != null and endTime != null ">
+ and create_time > TO_DATE(#{startTime}, 'YYYY-MM-DD')
+ and create_time <= TO_DATE(#{endTime}, 'YYYY-MM-DD')
</if>
</where>
</select>
@@ -351,9 +355,9 @@
<select id="getExternalDeptInfo" resultMap="ExternalDeptInfoResult">
<include refid="selectDeptVo"/>
<where>
- <if test="startTime != null and endTime != null ">and create_time between TO_DATE(#{startTime},
- 'YYYY-MM-DD') AND
- TO_DATE(#{endTime},'YYYY-MM-DD')
+ <if test="startTime != null and endTime != null ">
+ and create_time > TO_DATE(#{startTime}, 'YYYY-MM-DD')
+ and create_time <= TO_DATE(#{endTime}, 'YYYY-MM-DD')
</if>
</where>
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
index 533dd4c..5e154e3 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -909,10 +909,15 @@
</if>
<if test="patid != null and patid != ''">AND a.id = #{patid}</if>
<if test="telcode != null and telcode != ''">AND a.telcode LIKE concat('%', #{telcode}, '%')</if>
- <if test="notrequiredFlag != null and notrequiredFlag != ''">AND a.notrequired_flag = #{notrequiredFlag}</if>
+ <if test="notrequiredFlag != null and notrequiredFlag != ''">AND a.notrequired_flag = #{notrequiredFlag}
+ </if>
<if test="hospitalname != null and hospitalname != ''">AND d.hospitalname = #{hospitalname}</if>
- <if test="hospitaldistrictname != null and hospitaldistrictname != ''">AND d.hospitaldistrictname LIKE concat('%',#{hospitaldistrictname}, '%')</if>
- <if test="leaveicd10code != null and leaveicd10code != ''">AND d.leaveicd10code LIKE concat('%',#{leaveicd10code}, '%')</if>
+ <if test="hospitaldistrictname != null and hospitaldistrictname != ''">AND d.hospitaldistrictname LIKE
+ concat('%',#{hospitaldistrictname}, '%')
+ </if>
+ <if test="leaveicd10code != null and leaveicd10code != ''">AND d.leaveicd10code LIKE
+ concat('%',#{leaveicd10code}, '%')
+ </if>
<if test="endtime != null">AND d.endtime = #{endtime}</if>
<if test="cry != null and cry == 0 ">AND d.endtime IS NULL</if>
<if test="cry != null and cry == 1 ">AND d.endtime IS NOT NULL</if>
@@ -922,11 +927,18 @@
<if test="diagname != null and diagname != ''">AND d.diagname LIKE concat('%',#{diagname}, '%')</if>
<if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size()>0">
AND d.leavehospitaldistrictcode IN
- <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," close=")">
+ <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
+ close=")">
#{leavehospitaldistrictcode}
</foreach>
</if>
- <if test="leaveldeptcodes != null and leaveldeptcodes.size() > 0">
+ <if test="leaveldeptcodes != null and leaveldeptcodes.size() > 0 and leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size()>0">
+ OR d.leaveldeptcode IN
+ <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator="," close=")">
+ #{leaveldeptcode}
+ </foreach>
+ </if>
+ <if test="leaveldeptcodes != null and leaveldeptcodes.size() > 0 and leavehospitaldistrictcodes == null">
AND d.leaveldeptcode IN
<foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator="," close=")">
#{leaveldeptcode}
@@ -934,7 +946,8 @@
</if>
<if test="hospitaldistrictcodes != null and hospitaldistrictcodes.size()>0">
AND d.hospitaldistrictcode IN
- <foreach collection="hospitaldistrictcodes" item="hospitaldistrictcode" open="(" separator="," close=")">
+ <foreach collection="hospitaldistrictcodes" item="hospitaldistrictcode" open="(" separator=","
+ close=")">
#{hospitaldistrictcode}
</foreach>
</if>
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
index a3ccaf0..9c9ec38 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -188,16 +188,16 @@
)
</if>
<if test="startOutHospTime != null">
- AND TO_DATE(b.endtime,'YYYY-MM-DD') >= TO_DATE(#{startOutHospTime},'YYYY-MM-DD')
+ AND b.endtime >= TO_DATE(#{startOutHospTime},'YYYY-MM-DD')
</if>
<if test="endOutHospTime != null">
- AND TO_DATE(b.endtime,'YYYY-MM-DD') <= TO_DATE(#{endOutHospTime},'YYYY-MM-DD')
+ AND b.endtime <= TO_DATE(#{endOutHospTime},'YYYY-MM-DD')
</if>
<if test="startInHospTime != null">
- AND TO_DATE(b.starttime, 'YYYY-MM-DD') >= TO_DATE(#{startInHospTime}, 'YYYY-MM-DD')
+ AND b.starttime >= TO_DATE(#{startInHospTime}, 'YYYY-MM-DD')
</if>
<if test="endInHospTime != null">
- AND TO_DATE(b.starttime, 'YYYY-MM-DD') <= TO_DATE(#{startInHospTime}, 'YYYY-MM-DD')
+ AND b.starttime <= TO_DATE(#{endInHospTime}, 'YYYY-MM-DD')
</if>
<if test="hospitalname != null and hospitalname != ''">and hospitalname like concat('%', #{hospitalname},
'%')
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml
index be7d71a..b7b643c 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml
@@ -115,13 +115,14 @@
'%')
</if>
<if test="deptname != null and deptname != ''">and b.deptname like concat('%', #{deptname}, '%')</if>
+ <if test="patname != null and patname != ''">and b.patname like concat('%', #{patname}, '%')</if>
<if test="deptcode != null and deptcode != ''">and b.deptcode =#{deptcode}</if>
<if test="drname != null and drname != ''">and b.drname like concat('%', #{drname}, '%')</if>
- <if test="starttime != null ">and date_format(pmo.admitdate,'%y%m%d') >=
- date_format(#{starttime},'%y%m%d')
+ <if test="starttime != null ">and b.admitdate >=
+ TO_DATE(#{starttime},'YYYY-MM-DD')
</if>
- <if test="endtime != null ">and date_format(pmo.admitdate,'%y%m%d') <=
- date_format(#{endtime},'%y%m%d')
+ <if test="endtime != null ">and b.admitdate <=
+ TO_DATE(#{endtime},'YYYY-MM-DD')
</if>
<if test="orgid != null and orgid != ''">and b.orgid = #{orgid}</if>
<if test="outhospno != null and outhospno != ''">and b.outhospno = #{outhospno}</if>
--
Gitblit v1.9.3