Commit 22f0d9c3 authored by chenzhao's avatar chenzhao

修改代码

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