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
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
FROM tz_ugp_rectify_msg AS msg
LEFT JOIN tz_ugp_quality_problem AS pro ON pro.sequence_nbr = msg.problem_id
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 cb_org_usr AS org ON org.sequence_nbr = msg.msg_receiver
...
@@ -11,11 +11,11 @@
...
@@ -11,11 +11,11 @@
LEFT JOIN cb_org_usr AS gro ON gro.amos_org_id = msg.notice_unit_id
LEFT JOIN cb_org_usr AS gro ON gro.amos_org_id = msg.notice_unit_id
<where>
<where>
<iftest="name != '' and name != null">
<iftest="name != '' and name != null">
and up.`name` like concat("%", #{name},"%")
and up.name like concat('%', #{name},'%')
</if>
</if>
<iftest="installationUnit != '' and installationUnit != null">
<iftest="installationUnit != '' and installationUnit != null">
and up.installation_unit like concat("%",#{installationUnit},"%")
and up.installation_unit like concat('%',#{installationUnit},'%')
SELECT tz_ugp_weld.`sequence_nbr`,`code`,project_id,install_company,region,coding_status,coding_method,coding_date,project.`name`, tz_ugp_weld.rec_date,project.installation_unit FROM tz_ugp_weld,
SELECT tz_ugp_weld.sequence_nbr,tz_ugp_weld.code,project_id,install_company,region,coding_status,coding_method,coding_date,project.name, tz_ugp_weld.rec_date,project.installation_unit FROM tz_ugp_weld,
(SELECT `sequence_nbr`,`name`,installation_unit FROM tz_ugp_project ) AS project
(SELECT sequence_nbr,p.name,installation_unit FROM tz_ugp_project p ) AS "project"
<where>
<where>
project.sequence_nbr=tz_ugp_weld.project_id
project.sequence_nbr=tz_ugp_weld.project_id
<iftest="weldDto!=null">
<iftest="weldDto!=null">
<iftest="weldDto.name !=null and weldDto.name !=''">
<iftest="weldDto.name !=null and weldDto.name !=''">
AND project.name LIKE CONCAT("%",#{weldDto.name},"%")
AND project.name LIKE CONCAT('%',#{weldDto.name},'%')
</if>
</if>
<iftest="weldDto.projectId !=null and weldDto.projectId !=''">
<iftest="weldDto.projectId !=null and weldDto.projectId !=''">
AND project_id LIKE CONCAT("%",#{weldDto.projectId},"%")
AND project_id LIKE CONCAT('%',#{weldDto.projectId},'%')
</if>
</if>
</if>
</if>
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
SELECT * FROM tz_ugp_weld
SELECT * FROM tz_ugp_weld
<where>
<where>
<iftest="region != '' and region != null">
<iftest="region != '' and region != null">
and tz_ugp_weld.region like concat("%", #{region},"%")
and tz_ugp_weld.region like concat('%', #{region},'%')