|
@@ -156,12 +156,12 @@ public interface MzyReqrecMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select({"<script>",
|
|
|
- "select count(1) from mzy_reqrec WITH(NOLOCK) where patient_id=#{patientId} and visit_date>#{befoDate} ",
|
|
|
+ "select count(1) from mzy_reqrec WITH(NOLOCK) where patient_id=#{patientId} and isnull(visit_date,request_day)>#{befoDate} ",
|
|
|
"<when test='doctorCode!=null'>",
|
|
|
" and visit_doctor =#{doctorCode} ",
|
|
|
"</when>",
|
|
|
"<when test='deptCode!=null'>",
|
|
|
- " and visit_dept =#{deptCode}",
|
|
|
+ " and isnull(visit_dept,unit_code) =#{deptCode}",
|
|
|
"</when>",
|
|
|
"</script>"})
|
|
|
Integer selectValidMzyReqrec(@Param("patientId")String patientId,@Param("doctorCode")String doctorCode,@Param("deptCode")String deptCode,@Param("befoDate")Date befoDate);
|