|
|
@@ -25,8 +25,8 @@
|
|
|
|
|
|
<select id="selectHandwriteCollectionList" parameterType="HandwriteCollection" resultMap="HandwriteCollectionResult">
|
|
|
select hc.id, hc.patient_name, hc.patient_phone, hc.create_time, hc.update_time,
|
|
|
- hc.bill_img_url, hc.order_code, hc.create_by, hc.update_by, hc.company_user_id,hc.extra_img_url,
|
|
|
- cu.nick_name as companyUserName
|
|
|
+ hc.bill_img_url, hc.order_code, hc.create_by, hc.update_by, hc.company_user_id, hc.extra_img_url,
|
|
|
+ cu.nick_name as companyUserName
|
|
|
from fs_handwrite_collection hc left join company_user cu on cu.user_id = hc.company_user_id
|
|
|
<where>
|
|
|
<if test="patientName != null and patientName != ''"> and hc.patient_name like concat('%', #{patientName}, '%')</if>
|
|
|
@@ -34,6 +34,13 @@
|
|
|
<if test="companyUserName != null and companyUserName != ''"> and cu.nick_name like concat('%', #{companyUserName}, '%')</if>
|
|
|
<if test="orderCode != null and orderCode != ''"> and hc.order_code = #{orderCode}</if>
|
|
|
<if test="billImgUrl != null and billImgUrl != ''"> and hc.bill_img_url = #{billImgUrl}</if>
|
|
|
+ <!-- 创建时间范围过滤 -->
|
|
|
+ <if test="startDate != null">
|
|
|
+ and DATE(hc.create_time) >= #{startDate}
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null">
|
|
|
+ and DATE(hc.create_time) <= #{endDate}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
order by hc.create_time desc
|
|
|
</select>
|