Commit 35c33b42d6ebe7bb699cb5ada1d17f60067d114d
1 parent
9ef64658ae
Exists in
master
and in
6 other branches
update
Showing 1 changed file with 43 additions and 2 deletions
platform-biz-service/src/main/resources/mainOrm/master/MasterLis.xml
View file @
35c33b4
| ... | ... | @@ -111,12 +111,53 @@ |
| 111 | 111 | <if test="lisId != null and lisId != ''"> |
| 112 | 112 | AND LIS_ID = #{lisId} |
| 113 | 113 | </if> |
| 114 | - <if test="vcCardNo != null || phone != null"> | |
| 115 | - AND (VCCARDNO = #{vcCardNo} OR PHONE = #{phone}) | |
| 114 | + <if test="vcCardNo != null"> | |
| 115 | + AND VCCARDNO = #{vcCardNo} | |
| 116 | 116 | </if> |
| 117 | + <if test="vcCardNo == null"> | |
| 118 | + AND VCCARDNO = '' | |
| 119 | + </if> | |
| 117 | 120 | <if test="hospitalId != null and hospitalId != ''"> |
| 118 | 121 | AND HOSPITAL_ID = #{hospitalId} |
| 119 | 122 | </if> |
| 123 | + UNION | |
| 124 | + SELECT | |
| 125 | + ID AS id, | |
| 126 | + LIS_ID AS lisId, | |
| 127 | + TITLE AS title, | |
| 128 | + TYPE AS type, | |
| 129 | + VCCARDNO AS vcCardNo, | |
| 130 | + NAME AS name, | |
| 131 | + BHNUM AS bhnum, | |
| 132 | + AGE AS age, | |
| 133 | + SEX AS sex, | |
| 134 | + APPLY_TIME AS applyTime, | |
| 135 | + CHECK_TIME AS checkTime, | |
| 136 | + PUBLISH_TIME AS publishTime, | |
| 137 | + APPLY_DOCTOR AS applyDoctor, | |
| 138 | + APPLY_DEPT AS applyDept, | |
| 139 | + CHECKER AS checker, | |
| 140 | + MODIFIED AS modified, | |
| 141 | + CREATED AS created, | |
| 142 | + HOSPITAL_ID AS hospitalId, | |
| 143 | + PHONE AS phone, | |
| 144 | + ITEM_JSON AS itemJson | |
| 145 | + FROM LIS_REPORT_TBL | |
| 146 | + WHERE 1 = 1 | |
| 147 | + <if test="lisId != null and lisId != ''"> | |
| 148 | + AND LIS_ID = #{lisId} | |
| 149 | + </if> | |
| 150 | + <if test="phone != null"> | |
| 151 | + AND PHONE = #{phone} | |
| 152 | + </if> | |
| 153 | + <if test="phone == null"> | |
| 154 | + AND PHONE = '' | |
| 155 | + </if> | |
| 156 | + <if test="hospitalId != null and hospitalId != ''"> | |
| 157 | + AND HOSPITAL_ID = #{hospitalId} | |
| 158 | + </if> | |
| 159 | + | |
| 160 | + | |
| 120 | 161 | |
| 121 | 162 | </select> |
| 122 | 163 |