SELECT msg.*,pro.project_id,org.biz_org_name,up.installation_unit,pro.`code`,pro.generate_stage,pro.problem_describe,up.`name`,up.address,pro.process_progress,gro.biz_org_name AS notice_unit_name
SELECT msg.*,pro.project_id,org.biz_org_name AS msg_receiver_name,up.installation_unit,pro.`code`,pro.generate_stage,pro.problem_describe,up.`name`,up.install_region AS address,pro.process_progress,gro.biz_org_name AS notice_unit_name
FROM tz_ugp_rectify_msg AS msg
LEFT JOIN tz_ugp_quality_problem AS pro ON pro.sequence_nbr = msg.problem_id
LEFT JOIN cb_org_usr AS org ON org.sequence_nbr = msg.msg_receiver
LEFT JOIN tz_ugp_project AS up ON up.sequence_nbr = pro.project_id
LEFT JOIN cb_org_usr AS gro ON gro.sequence_nbr = msg.notice_unit_id
LEFT JOIN cb_org_usr AS gro ON gro.amos_org_id = msg.notice_unit_id
<where>
<iftest="name != '' and name != null">
and up.`name` like concat("%", #{name},"%")
...
...
@@ -17,14 +17,23 @@
<iftest="installationUnit != '' and installationUnit != null">
and up.installation_unit like concat("%",#{installationUnit},"%")
</if>
<iftest="isProblem != '' and isProblem != null">
and msg.is_problem = #{isProblem}
</if>
<iftest="projectIds != null and projectIds.size>0">