yangys
2025-07-08 ffd5abc74eea1f6ee6433ac11e401aaa57bcc4ab
blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/mapper/NcProgramMapper.xml
@@ -8,7 +8,7 @@
        <result column="package_name" property="packageName"/>
        <result column="machine_code" property="machineCode"/>
        <result column="part_no" property="partNo"/>
        <result column="drawing_no" property="drawingNo"/>
        <result column="is_cured" property="isCured"/>
        <result column="expire_date" property="expireDate"/>
        <result column="process_edition" property="processEdition"/>
@@ -34,18 +34,24 @@
    <!--    <select id="parentTree" resultMap="treeNodeResultMap">-->
<!--        select id, parent_id, dict_value as title, id as "value", id as "key" from blade_dict where is_deleted = 0 and parent_id = 0-->
<!--    </select>-->
    <sql id="all_columns">id,tenant_id,nc_node_id,code,name,machine_code,part_no,is_cured,
    <sql id="all_columns">id,tenant_id,nc_node_id,code,name,machine_code,drawing_no,is_cured,
  expire_date,process_edition,is_last_edition,is_locked,task_assign_time,status,create_dept,is_deleted,create_time,create_user,update_time,update_user</sql>
    <select id="getCuredNcProgram" resultMap="BaseResultMap">
        select <include refid="all_columns"/> from mdm_nc_program
        where is_deleted=0 and is_cured=1 and part_no=#{partNo} and is_last_edition=1
        where is_deleted=0 and is_cured=1 and drawing_no=#{drawingNo} and is_last_edition=1
        and machine_code in (select code from mdm_machine where machine_group_code=#{machineGroupCode})
        order by create_time desc
    </select>
    <!--
    <select id="getLastNcProgram" resultType="org.springblade.mdm.program.entity.NcProgram">
        select <include refid="all_columns"/> from mdm_nc_program
        where is_deleted=0 and is_last_edition=1 order by create_time desc limit 1
    <select id="pageQuery" resultType="org.springblade.mdm.program.vo.NcProgramVO">
        select id,nc_node_id,name,machine_code,drawing_no,drawing_no_edition,process_name,craft_edition from mdm_nc_program p
        where is_deleted=0 and is_last_edition=1 and (category='program' or category='subprogram')
        <where>
            <if test="query.name!=null and query.name!=''">
                and p.name like CONCAT('%', #{query.name,jdbcType=VARCHAR},'%')
            </if>
        </where>
    </select>
    -->
</mapper>