yangys
2025-08-14 047bb771200a233eff32141b963cfdc5b362b4a1
blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/mapper/NcProgramApprovedMapper.xml
@@ -11,19 +11,21 @@
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
    <select id="exportDncPageQuery" resultType="org.springblade.mdm.program.vo.NcProgramExportDncPageVO">
        select a.id,a.nc_program_id,p.name,p.nc_node_id,p.drawing_no,p.drawing_no_edition,p.process_name,a.create_time from mdm_nc_program_approved a inner join mdm_nc_program p on a.nc_program_id=p.id
        where a.is_deleted=0
        select a.id,a.title,n.name,a.nc_node_id,n.drawing_no,n.drawing_no_edition,n.process_name,a.create_time from mdm_nc_program_approved a
            inner join mdm_nc_node n on a.nc_node_id=n.id
        <where>
            a.is_deleted=0 and a.status=#{query.status}
            <if test="query.name!=null and query.name!=''">
                and p.name like CONCAT('%', #{query.name,jdbcType=VARCHAR},'%')
                and n.name like CONCAT('%', #{query.name,jdbcType=VARCHAR},'%')
            </if>
            <if test="query.passTimeBegin!=null">
                and a.create_time &gt;= #{query.passTimeBegin}
            <if test="query.createTimeBegin!=null">
                and a.create_time &gt;= #{query.createTimeBegin}
            </if>
            <if test="query.passTimeEnd!=null">
                and a.create_time &lt;= #{query.passTimeEnd}
            <if test="query.createTimeEnd!=null">
                and a.create_time &lt;= #{query.createTimeEnd}
            </if>
        </where>
        order by a.create_time desc
    </select>
</mapper>