|  |  | 
 |  |  |             </if> | 
 |  |  |         </where> | 
 |  |  |         order by a.update_time desc | 
 |  |  |         <if test="pageSize != null  and pageSize != ''"> limit ${pageNum},${pageSize} </if> | 
 |  |  |         <if test="pn != null  and ps != null"> limit ${pn},${ps} </if> | 
 |  |  |  | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  | 
 |  |  |             </if> | 
 |  |  |         </where> | 
 |  |  |         order by a.update_time desc | 
 |  |  |         <if test="pn != null  and ps != null"> limit ${pn},${ps} </if> | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <select id="selectPatArchiveInfoByOuthosp" parameterType="com.smartor.domain.PatArchiveReq" | 
 |  |  | 
 |  |  |             </if> | 
 |  |  |         </where> | 
 |  |  |         order by a.update_time desc | 
 |  |  |         <if test="pn != null  and ps != null"> limit ${pn},${ps} </if> | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <select id="selectPatArchiveInfoByPhysical" parameterType="com.smartor.domain.PatArchiveReq" | 
 |  |  | 
 |  |  |             </if> | 
 |  |  |         </where> | 
 |  |  |         order by a.update_time desc | 
 |  |  |         <if test="pn != null  and ps != null"> limit ${pn},${ps} </if> | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <select id="selectPatArchiveInfoByInhospQC" parameterType="com.smartor.domain.PatArchiveReq" | 
 |  |  | 
 |  |  |             </if> | 
 |  |  |         </where> | 
 |  |  |         order by a.id,a.update_time desc ) as tmp order by endtime desc | 
 |  |  |         <if test="pn != null  and ps != null"> limit ${pn},${ps} </if> | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <select id="selectPatArchiveInfoByOuthospQC" parameterType="com.smartor.domain.PatArchiveReq" |