|
|
@@ -137,20 +137,21 @@
|
|
|
cpm.content,
|
|
|
cpm.reminder_type
|
|
|
FROM
|
|
|
- cost_project_memo cpm,
|
|
|
- cost_project_approval cpa,
|
|
|
- uc_user uc
|
|
|
- WHERE
|
|
|
+ cost_project_memo cpm left join
|
|
|
+ cost_project_approval cpa
|
|
|
+ on
|
|
|
cpm.project_id = cpa.project_id
|
|
|
- <if test="userId != null and userId != ''">
|
|
|
- and (cpa.leader_id = #{userId} or cpa.audit_group like concat('%,',#{userId},',%'))
|
|
|
- </if>
|
|
|
- <if test=" content != null and content != '' ">
|
|
|
- AND cpm.content LIKE CONCAT('%', #{content}, '%')
|
|
|
- </if>
|
|
|
- <if test=" memoDate != null and memoDate != '' ">
|
|
|
- AND DATE_FORMAT(cpm.memo_date, '%Y-%m-%d') = #{memoDate}
|
|
|
- </if>
|
|
|
+ <where>
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
+ and (cpa.leader_id = #{userId} or cpa.audit_group like concat('%,',#{userId},',%'))
|
|
|
+ </if>
|
|
|
+ <if test=" content != null and content != '' ">
|
|
|
+ AND cpm.content LIKE CONCAT('%', #{content}, '%')
|
|
|
+ </if>
|
|
|
+ <if test=" memoDate != null and memoDate != '' ">
|
|
|
+ AND DATE_FORMAT(cpm.memo_date, '%Y-%m-%d') = #{memoDate}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|