<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.zjt.mapper.SaleorderHeaderMapper">
    <resultMap id="BaseResultMap" type="com.zjt.entity.SaleorderHeader">
        <result column="order_number" property="orderNumber" jdbcType="VARCHAR"></result>
        <result column="variety" property="variety" jdbcType="VARCHAR"></result>
        <result column="details" property="details" jdbcType="VARCHAR"></result>
        <result column="colour" property="colour" jdbcType="VARCHAR"></result>
        <result column="position" property="position" jdbcType="VARCHAR"></result>
        <result column="spherical_lens" property="sphericalLens" jdbcType="VARCHAR"></result>
        <result column="cylindrical_lens" property="cylindricalLens" jdbcType="VARCHAR"></result>
        <result column="axis" property="axis" jdbcType="VARCHAR"></result>
        <result column="channel" property="channel" jdbcType="VARCHAR"></result>
        <result column="add_num" property="addNum" jdbcType="VARCHAR"></result>
        <result column="remarks" property="remarks" jdbcType="VARCHAR"></result>
        <result column="retail_price" property="retailPrice" jdbcType="VARCHAR"></result>
        <result column="diopter_range" property="diopterRange" jdbcType="VARCHAR"></result>
        <result column="range_description" property="rangeDescription" jdbcType="VARCHAR"></result>
        <result column="single_eye_pupillary_distance" property="singleEyePupillaryDistance" jdbcType="VARCHAR"></result>
        <result column="single_eye_pupillary_distance_right" property="singleEyePupillaryDistanceRight" jdbcType="VARCHAR"></result>
        <result column="single_eye_pupillary_distance_left" property="singleEyePupillaryDistanceLeft" jdbcType="VARCHAR"></result>
        <result column="lens_edge_distance" property="lensEdgeDistance" jdbcType="VARCHAR"></result>
        <result column="front_angle" property="frontAngle" jdbcType="VARCHAR"></result>
        <result column="frame_surface" property="frameSurface" jdbcType="VARCHAR"></result>
        <result column="habit_reading_distance" property="habitReadingDistance" jdbcType="VARCHAR"></result>
        <result column="near_use_pupillary_distance" property="nearUsePupillaryDistance" jdbcType="VARCHAR"></result>
        <result column="nvb" property="nvb" jdbcType="VARCHAR"></result>
        <result column="main_vision" property="mainVision" jdbcType="VARCHAR"></result>
        <result column="ercd" property="ercd" jdbcType="VARCHAR"></result>
        <result column="material_code" property="materialCode" jdbcType="VARCHAR"></result>
        <result column="materia_detile" property="materialDetile" jdbcType="VARCHAR"></result>
        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"></result>
        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"></result>
    </resultMap>

    <insert id="insertSh" parameterType="com.zjt.entity.SaleorderHeader">
        INSERT INTO saleorderheader (
            order_number,
            variety,
            details,
            colour,
            position,
            spherical_lens,
            cylindrical_lens,
            axis,
            channel,
            add_num,
            remarks,
            retail_price,
            diopter_range,
            range_description,
            single_eye_pupillary_distance,
            single_eye_pupillary_distance_right,
            single_eye_pupillary_distance_left,
            lens_edge_distance,
            front_angle,
            frame_surface,
            habit_reading_distance,
            near_use_pupillary_distance,
            nvb,
            main_vision,
            ercd,
            material_code,
            materia_detile,
            create_time,
            update_time
        ) VALUES (
                     #{orderNumber,jdbcType=VARCHAR},
                     #{variety,jdbcType=VARCHAR},
                     #{details,jdbcType=VARCHAR},
                     #{colour,jdbcType=VARCHAR},
                     #{position,jdbcType=VARCHAR},
                     #{sphericalLens,jdbcType=VARCHAR},
                     #{cylindricalLens,jdbcType=VARCHAR},
                     #{axis,jdbcType=VARCHAR},
                     #{channel,jdbcType=VARCHAR},
                     #{addNum,jdbcType=VARCHAR},
                     #{remarks,jdbcType=VARCHAR},
                     #{retailPrice,jdbcType=VARCHAR},
                     #{diopterRange,jdbcType=VARCHAR},
                     #{rangeDescription,jdbcType=VARCHAR},
                     #{singleEyePupillaryDistance,jdbcType=VARCHAR},
                     #{singleEyePupillaryDistanceRight,jdbcType=VARCHAR},
                     #{singleEyePupillaryDistanceLeft,jdbcType=VARCHAR},
                     #{lensEdgeDistance,jdbcType=VARCHAR},
                     #{frontAngle,jdbcType=VARCHAR},
                     #{frameSurface,jdbcType=VARCHAR},
                     #{habitReadingDistance,jdbcType=VARCHAR},
                     #{nearUsePupillaryDistance,jdbcType=VARCHAR},
                     #{nvb,jdbcType=VARCHAR},
                     #{mainVision,jdbcType=VARCHAR},
                     #{ercd,jdbcType=VARCHAR},
                     #{materialCode,jdbcType=VARCHAR},
                     #{materialDetile,jdbcType=VARCHAR},
                     #{createTime,jdbcType=TIMESTAMP},
                     #{updateTime,jdbcType=TIMESTAMP}
                 )
    </insert>
</mapper>
