Commit 3a0b685f authored by zhangyingbin's avatar zhangyingbin

修改告知分页查询

parent 23f1d2cc
...@@ -4,21 +4,34 @@ ...@@ -4,21 +4,34 @@
<!-- 查询安装告知申请页面--> <!-- 查询安装告知申请页面-->
<select id="installNoticePage" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto"> <select id="installNoticePage" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto">
SELECT a.* ,u1.biz_org_name AS superviseDept,u2.biz_org_name AS chargerPerson,u3.biz_org_name AS inspectionUnit SELECT a.* ,u2.biz_org_name,u1.biz_org_name
FROM FROM (SELECT
(SELECT tz_ugp_install_notice.sequence_nbr,tz_ugp_project.name,install_region,start_date,construction_unit,charge_person,installation_unit,install_pri tz_ugp_install_notice.sequence_nbr,
,supervise_dept_id tz_ugp_project.`NAME`,
,charger_person_id install_region,
,inspection_unit_id start_date,
,notice_status,notice_date construction_unit,
FROM tz_ugp_install_notice, tz_ugp_project ,tz_ugp_supervise_rule ,tz_ugp_verify charge_person,
WHERE tz_ugp_install_notice.project_id=tz_ugp_project.sequence_nbr installation_unit,
AND tz_ugp_install_notice.project_id=tz_ugp_verify.project_id install_pri,
AND tz_ugp_supervise_rule.admin_region_code=tz_ugp_project.install_region_code supervise_dept_id,
AND tz_ugp_project.name LIKE '%${name}%' AND construction_unit LIKE '%${constructionUnit}%') AS a inspection_unit_id,
LEFT JOIN cb_org_usr AS u1 ON a.supervise_dept_id=u1.sequence_nbr notice_status,
LEFT JOIN cb_org_usr AS u2 ON a.charger_person_id=u2.sequence_nbr notice_date
LEFT JOIN cb_org_usr AS u3 ON a.inspection_unit_id=u3.sequence_nbr FROM
tz_ugp_install_notice
LEFT JOIN tz_ugp_project ON tz_ugp_install_notice.project_id = tz_ugp_project.sequence_nbr
LEFT JOIN tz_ugp_supervise_rule ON tz_ugp_supervise_rule.admin_region_code = tz_ugp_project.install_region_code ) AS a
LEFT JOIN cb_org_usr AS u2 ON a.inspection_unit_id = u2.sequence_nbr
LEFT JOIN cb_org_usr AS u1 ON a.supervise_dept_id=u1.sequence_nbr
<where>
<if test="name != '' and name != null">
and a.`NAME` LIKE concat("%",#{name},"%")
</if>
<if test="constructionUnit != '' and constructionUnit != null">
and a.construction_unit LIKE concat("%",#{constructionUnit},"%")
</if>
</where>
</select> </select>
<!-- //根据project_id查询一条数据--> <!-- //根据project_id查询一条数据-->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment