| | |
| | | where n.is_deleted=0 and n.parent_id in (select id from mdm_nc_node where parent_id=#{parentNode.parentId}) and n.name=#{name} |
| | | |
| | | </select> |
| | | <select id="searchList2" resultType="org.springblade.mdm.program.vo.NcNodeVO"> |
| | | select <include refid="all_columns_n"/>,dt.dict_value as node_type_name,u.name create_user_name,( |
| | | SELECT |
| | | CASE WHEN count(1) > 0 THEN 1 ELSE 0 END |
| | | FROM |
| | | mdm_nc_node |
| | | WHERE |
| | | parent_id = n.id and is_deleted = 0 |
| | | ) AS "has_children" from mdm_nc_node n left join blade_user u on n.create_user=u.id |
| | | left join blade_dict_biz dt on n.node_type=dt.dict_key and dt.code='nc_node_type' and dt.is_deleted=0 |
| | | <where> |
| | | n.is_deleted=0 and n.node_type='20' and n.name=#{drawingNo} |
| | | <if test="status != null and status != ''"> |
| | | and |
| | | ( |
| | | 1=1 |
| | | <if test='status.contains("1")'> |
| | | or n.parent_ids LIKE '0,1,%' |
| | | </if> |
| | | <if test='status.contains("2")'> |
| | | or n.parent_ids LIKE '0,2,%' |
| | | </if> |
| | | <if test='status.contains("3")'> |
| | | or n.parent_ids LIKE '0,3,%' |
| | | </if> |
| | | ) |
| | | </if> |
| | | <if test="createTimeBegin != null"> |
| | | and n.create_time>=#{createTimeBegin} |
| | | </if> |
| | | <if test="createTimeEnd != null"> |
| | | and n.create_time<=#{createTimeEnd} |
| | | </if> |
| | | </where> |
| | | |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |