<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//oos.juyouhx.com//DTD Mapper 3.0//EN" "http://oss.juyouhx.com/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.scpyun.platform.standard.jilinsscgsdp.keyDmOutbound" name="出库记录">

    <insert id="insertOutboundRecord" parameterType="map">
        INSERT INTO jl_key_dm_outbound_record(
            id,outbound_no,outbound_type,outbound_date,receiver_id,receiver_name,receiver_department_id,receiver_department_name,outbound_status,remark,is_used,create_by,create_time
        ) VALUES (
            #{id},#{outbound_no},#{outbound_type},#{outbound_date},#{receiver_id},#{receiver_name},#{receiver_department_id},#{receiver_department_name},#{outbound_status},#{remark},1,#{_user.id},NOW()
        )
    </insert>

    <insert id="insertOutboundDetail" parameterType="map">
        INSERT INTO jl_key_dm_outbound_detail(
            id,outbound_id,material_id,outbound_type,outbound_quantity,unit_price,total_amount,borrow_application_detail_id,is_used,create_by,create_time
        ) VALUES (
            #{id},#{outbound_id},#{material_id},#{outbound_type},#{outbound_quantity},#{unit_price},#{total_amount},#{borrow_application_detail_id},1,#{_user.id},NOW()
        )
    </insert>

</mapper>


