|
@@ -186,16 +186,18 @@ public interface MzfzPatientOrderMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select({"<script>",
|
|
|
- "select * from mzfz_patient_order WITH(NOLOCK) where patient_id = #{patientId} and ((status_flag in (0,1,2,3,8) and (doctor_code=#{userIdCode} or req_type in('10', '16') ",
|
|
|
- //"select * from mzfz_patient_order WITH(NOLOCK) where patient_id = #{patientId} and ((status_flag in (0,1,2,3,8) and (doctor_code=#{userIdCode} or req_type ='16' ",
|
|
|
+ //"select * from mzfz_patient_order WITH(NOLOCK) where patient_id = #{patientId} and ((status_flag in (0,1,2,3,8) and (doctor_code=#{userIdCode} or req_type in('10', '16') ",
|
|
|
+ "select * from mzfz_patient_order WITH(NOLOCK) where patient_id = #{patientId} and ((status_flag in (0,1,2,3,8) and (doctor_code=#{userIdCode} or req_type ='16' ",
|
|
|
" or (dept_code in ",
|
|
|
"<foreach item='item' index='index' collection='deptNos' open='(' separator=',' close=')'>",
|
|
|
"#{item}",
|
|
|
"</foreach>",
|
|
|
+ "<when test='jzReqTypes!=null and jzReqTypes.size > 0'>",
|
|
|
" and req_type IN ",
|
|
|
"<foreach item='item' index='index' collection='jzReqTypes' open='(' separator=',' close=')'>",
|
|
|
"#{item}",
|
|
|
"</foreach>",
|
|
|
+ "</when>",
|
|
|
" ))) or (status_flag =9 and DateDiff(hh,visit_date,getDate()) <=24 and dept_code in ",
|
|
|
"<foreach item='item' index='index' collection='deptNos' open='(' separator=',' close=')'>",
|
|
|
"#{item}",
|