|
@@ -26,22 +26,20 @@
|
|
|
u.plan_status AS planStatus,
|
|
|
u.gmt_create AS gmtCreate,
|
|
|
GROUP_CONCAT(
|
|
|
- pd.NAME
|
|
|
+ pd. NAME
|
|
|
ORDER BY
|
|
|
pd.order_no ASC
|
|
|
) AS planDetail
|
|
|
FROM
|
|
|
- tran_plan u,
|
|
|
- tran_plan_detail pd
|
|
|
+ tran_plan u
|
|
|
+ LEFT JOIN tran_plan_detail pd ON pd.plan_id = u.id AND pd.status = 1 AND pd.is_deleted = 'N'
|
|
|
+ AND pd.parent_id = - 1
|
|
|
WHERE
|
|
|
u.is_deleted = 'N'
|
|
|
- AND pd.is_deleted = 'N'
|
|
|
- and pd.status= 1
|
|
|
<if test="hospitalId !=null">
|
|
|
and u.hospital_id =#{hospitalId}
|
|
|
</if>
|
|
|
- AND pd.plan_id = u.id
|
|
|
- AND pd.parent_id = -1
|
|
|
+
|
|
|
<if test="planName != null and planName!=''">
|
|
|
AND UPPER(u.plan_name) LIKE CONCAT('%', UPPER(trim(#{planName})), '%')
|
|
|
</if>
|