Commit 088972edd0ac4796e269107421de4f7747427513
1 parent
d7f105c798
Exists in
master
and in
6 other branches
修改体重营养报告
Showing 1 changed file with 16 additions and 3 deletions
platform-biz-service/src/main/resources/mainOrm/master/PatientService.xml
View file @
088972e
| ... | ... | @@ -239,21 +239,27 @@ |
| 239 | 239 | |
| 240 | 240 | <!--查询只开通了标准服务的数据 --> |
| 241 | 241 | <select id="selectOnlyBzService" resultType="java.util.HashMap" parameterType="com.lyms.platform.permission.model.PatientServiceQuery"> |
| 242 | - SELECT parentid,id from patient_service where ser_status=1 | |
| 242 | + SELECT * from (SELECT parentid,id,ser_type from patient_service where ser_status=1 | |
| 243 | 243 | <if test="perType != null and perType != ''"> |
| 244 | 244 | and per_type = #{perType,jdbcType=INTEGER} |
| 245 | 245 | </if> |
| 246 | 246 | |
| 247 | 247 | and ser_type in (1,6,10,11) |
| 248 | 248 | |
| 249 | - GROUP BY parentid HAVING count(parentid)=1 | |
| 249 | + GROUP BY parentid HAVING count(parentid)=1 )as b | |
| 250 | + <if test="perType == 1"> | |
| 251 | + where b.ser_type=6 | |
| 252 | + </if> | |
| 253 | + <if test="perType == 2"> | |
| 254 | + where b.ser_type=11 | |
| 255 | + </if> | |
| 250 | 256 | <include refid="orderAndLimit"/> |
| 251 | 257 | </select> |
| 252 | 258 | |
| 253 | 259 | |
| 254 | 260 | <!--查询只开通了标准服务的数据 --> |
| 255 | 261 | <select id="selectOnlyBzServiceCount" resultType="int" parameterType="com.lyms.platform.permission.model.PatientServiceQuery"> |
| 256 | - SELECT count(1) from (SELECT parentid,id from patient_service where ser_status=1 | |
| 262 | + SELECT count(1) from ( SELECT count(1) from (SELECT parentid,id from patient_service where ser_status=1 | |
| 257 | 263 | <if test="perType != null and perType != ''"> |
| 258 | 264 | and per_type = #{perType,jdbcType=INTEGER} |
| 259 | 265 | </if> |
| ... | ... | @@ -261,6 +267,13 @@ |
| 261 | 267 | and ser_type in (1,6,10,11) |
| 262 | 268 | |
| 263 | 269 | GROUP BY parentid HAVING count(parentid)=1) as b |
| 270 | + <if test="perType == 1"> | |
| 271 | + where b.ser_type=6 | |
| 272 | + </if> | |
| 273 | + <if test="perType == 2"> | |
| 274 | + where b.ser_type=11 | |
| 275 | + </if> | |
| 276 | + ) as c | |
| 264 | 277 | </select> |
| 265 | 278 | |
| 266 | 279 | <select id="queryPatientServiceCount" resultType="int" |