Commit 22f0d9c3 authored by chenzhao's avatar chenzhao

修改代码

parent 2bc3904c
......@@ -183,7 +183,8 @@
group_name AS displayName,
- 1 AS parentId,
NULL AS equipCode,
NULL AS bizOrgCode
NULL AS bizOrgCode,
NULL AS groupType
FROM
wl_form_group
WHERE
......@@ -193,7 +194,8 @@
nam.field_value AS displayName,
par.field_value AS parentId,
cd.field_value AS equipCode,
bzc.field_value AS bizOrgCode
bzc.field_value AS bizOrgCode,
ins.group_type as groupType
FROM
wl_form_instance AS ins
LEFT JOIN wl_form_instance AS nam ON nam.instance_id = ins.instance_id
......@@ -205,8 +207,19 @@
LEFT JOIN wl_form_instance AS bzc ON bzc.instance_id = ins.instance_id
AND bzc.field_name = 'bizOrgCode'
<where>
1 =1
<if test="bizOrgCode != null and bizOrgCode != ''">
bzc.field_value LIKE CONCAT(#{bizOrgCode},'%')
and bzc.field_value LIKE CONCAT(#{bizOrgCode},'%')
</if>
<if test="instanceId != null and instanceId != ''">
and ins.instance_id IN
(
select instance_id from wl_form_instance where field_name = 'parentId' AND field_value in(
select instance_id from wl_form_instance where field_name = 'parentId' AND field_value = #{instanceId})
union
select instance_id from wl_form_instance where field_name = 'parentId' AND field_value = #{instanceId} or
instance_id = #{instanceId}
)
</if>
</where>
GROUP BY
......
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