Commit f30399c7 authored by chenhao's avatar chenhao

Merge branch 'developer' of http://172.16.10.76/moa/amos-boot-biz into developer

parents 4f383310 83f73fe6
......@@ -60,19 +60,43 @@
u.sequence_nbr sequenceNbr,
u.biz_org_name bizOrgName,
u.biz_org_code bizOrgCode,
<if test="map.fields != null">
<foreach collection="map.fields" item="item" separator=",">MAX(case f.field_code when #{item} then IFNULL(v.field_value_label, v.field_value)
end) ${item}
</foreach>
</if>
g.*
FROM
cb_org_usr u
LEFT JOIN
cb_dynamic_form_instance v on u.sequence_nbr = v.instance_id
LEFT JOIN cb_dynamic_form_column f ON f.sequence_nbr = v.form_column_id
( SELECT
v.`instance_id`,
max(case v.field_code when 'personNumber' then IFNULL(v.field_value_label,v.field_value) end) personNumber,
max(case v.field_code when 'certificates_type' then IFNULL(v.field_value_label,v.field_value) end) certificates_type,
max(case v.field_code when 'gender' then IFNULL(v.field_value_label,v.field_value) end) gender,
max(case v.field_code when 'certificates_number' then IFNULL(v.field_value_label,v.field_value) end) certificates_number,
max(case v.field_code when 'telephone' then IFNULL(v.field_value_label,v.field_value) end) telephone,
max(case v.field_code when 'state' then IFNULL(v.field_value_label,v.field_value) end) state,
max(case v.field_code when 'safety_training' then IFNULL(v.field_value_label,v.field_value) end) safety_training,
max(case v.field_code when 'administrative_position' then IFNULL(v.field_value_label,v.field_value) end) administrative_position,
max(case v.field_code when 'internal_position' then IFNULL(v.field_value_label,v.field_value) end) internal_position,
max(case v.field_code when 'fireManagement_post' then IFNULL(v.field_value_label,v.field_value) end) fireManagement_post,
max(case v.field_code when 'position_type' then IFNULL(v.field_value_label,v.field_value) end) position_type,
max(case v.field_code when 'certificate_type' then IFNULL(v.field_value_label,v.field_value) end) certificate_type,
max(case v.field_code when 'holding_time' then IFNULL(v.field_value_label,v.field_value) end) holding_time,
max(case v.field_code when 'audit_cycle' then IFNULL(v.field_value_label,v.field_value) end) audit_cycle,
max(case v.field_code when 'person_img' then IFNULL(v.field_value_label,v.field_value) end) person_img,
max(case v.field_code when 'certificate_img' then IFNULL(v.field_value_label,v.field_value) end) certificate_img
FROM
`cb_dynamic_form_instance` v
WHERE
v.group_code = 246
GROUP BY
v.`instance_id`
) g
on u.sequence_nbr = g.instance_id
where
u.biz_org_type = #{map.bizOrgType}
AND u.is_delete = 0
u.biz_org_type = 'person'
AND
u.is_delete = 0
<if test="map.bizOrgName != null">
AND u.biz_org_name like concat('%',#{map.bizOrgName},'%')
</if>
......@@ -92,6 +116,7 @@
<foreach collection="map.fieldsValue.keys" item="item">AND a.${item} = #{map.fieldsValue[${item}]}</foreach>
</if>
LIMIT #{map.pageNum}, #{map.pageSize}
</select>
<!--机场单位查询机构下所有子数据 2021-09-16 by litw -->
......
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