| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.aps.job.mapper.ApsBomLineJobMapper"> |
| | | |
| | | <resultMap type="ApsBomLineJob" id="ApsBomLineJobResult"> |
| | | <resultMap type="com.aps.job.domain.ApsBomLineJob" id="ApsBomLineJobResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="bomLineId" column="bom_line_id" /> |
| | | <result property="bomHeaderId" column="bom_header_id" /> |
| | |
| | | select id, bom_line_id, bom_header_id, item_code, item_name, start_date, end_date, org_code, del_flag, create_by, create_time, update_by, update_time, drawing_no, process_no, unit, num, total_num, preparation_time, processing_time from aps_bom_line_job |
| | | </sql> |
| | | |
| | | <select id="selectApsBomLineJobList" parameterType="ApsBomLineJob" resultMap="ApsBomLineJobResult"> |
| | | <select id="selectApsBomLineJobList" parameterType="com.aps.job.domain.ApsBomLineJob" resultMap="ApsBomLineJobResult"> |
| | | <include refid="selectApsBomLineJobVo"/> |
| | | <where> |
| | | <if test="bomLineId != null and bomLineId != ''"> and bom_line_id = #{bomLineId}</if> |
| | |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertApsBomLineJob" parameterType="ApsBomLineJob"> |
| | | <insert id="insertApsBomLineJob" parameterType="com.aps.job.domain.ApsBomLineJob"> |
| | | insert into aps_bom_line_job |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateApsBomLineJob" parameterType="ApsBomLineJob"> |
| | | <update id="updateApsBomLineJob" parameterType="com.aps.job.domain.ApsBomLineJob"> |
| | | update aps_bom_line_job |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="bomLineId != null">bom_line_id = #{bomLineId},</if> |
| | |
| | | end_date, |
| | | org_code, |
| | | num, |
| | | create_by, |
| | | create_time |
| | | ) VALUES |
| | | <foreach collection="list" item="item" separator=","> |
| | |
| | | #{item.endDate}, |
| | | #{item.orgCode}, |
| | | #{item.num}, |
| | | #{item.createBy}, |
| | | now() |
| | | ) |
| | | </foreach> |
| | |
| | | end_date, |
| | | org_code, |
| | | num, |
| | | create_by, |
| | | create_time |
| | | ) |
| | | SELECT |
| | |
| | | end_date, |
| | | org_code, |
| | | num, |
| | | create_by, |
| | | now() |
| | | FROM aps_bom_line_job |
| | | -- FROM aps_bom_line_job as a |
| | | -- LEFT JOIN aps_material_storage_management as b ON a.item_code = b.item_number |
| | | -- where b.material_type='制造件' |
| | | </insert> |
| | | |
| | | <!-- 删除 aps_bom_line 表中的数据 --> |