yangys
2025-06-27 26f07223e1b33a8eb5ee184041575e9b204cfebe
blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/mapper/NcNodeMapper.xml
@@ -45,4 +45,18 @@
        parent_id = n.id and is_deleted = 0
        ) AS "has_children" from mdm_nc_node n where is_deleted=0 and parent_id=#{parentId}
    </select>
    <select id="programPageQuery" resultType="org.springblade.mdm.program.vo.NcNodeProgramVO">
        select id,parent_id,machine_code,drawing_no,drawing_no_edition,part_no,process_name,craft_edition from mdm_nc_node n
        <where>
            <if test="query.name!=null and query.name!=''">
                and n.name like CONCAT('%', #{query.name,jdbcType=VARCHAR},'%')
            </if>
        </where>
    </select>
    <!--获取 最新版本的程序(即程序包名 节点 node_type=60)-->
    <select id="getLastProgramNode" resultType="org.springblade.mdm.program.entity.NcNode">
        select <include refid="all_columns"/> from mdm_nc_node
        where is_deleted=0 and node_type='60' and is_last_edition=1 order by create_time desc limit 1
    </select>
</mapper>