<?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.ximai.mes.pro.mapper.proWorkOrder.ProWorkOrderSoSizeItemMapper">
    <resultMap type="ProWorkOrderSoSizeItem" id="ProWorkOrderSoSizeItemResult">
        <result property="workorderSoSizeItemId" column="workorder_so_size_item_id"/>
        <result property="workorderId" column="workorder_id"/>
        <result property="workorderCode" column="workorder_code"/>
        <result property="idx" column="idx"/>
        <result property="brandCode" column="brand_code"/>
        <result property="salePath" column="sale_path"/>
        <result property="sizeType" column="size_type"/>
        <result property="itemType" column="item_type"/>
        <result property="segment" column="segment"/>
        <result property="quarter" column="quarter"/>
        <result property="specSize" column="spec_size"/>
        <result property="wholeSize" column="whole_size"/>
        <result property="prodSpec" column="prod_spec"/>
        <result property="standardSizeType" column="standard_size_type"/>
        <result property="usa" column="usa"/>
        <result property="uk" column="uk"/>
        <result property="pus" column="pus"/>
        <result property="jan" column="jan"/>
        <result property="tha" column="tha"/>
        <result property="chn" column="chn"/>
        <result property="ind" column="ind"/>
        <result property="kket" column="kket"/>
        <result property="us" column="us"/>
        <result property="eu" column="eu"/>
        <result property="jp" column="jp"/>
        <result property="mm" column="mm"/>
        <result property="bra" column="bra"/>
        <result property="eur" column="eur"/>
        <result property="cm" column="cm"/>
        <result property="u" column="u"/>
        <result property="mx" column="mx"/>
        <result property="chi" column="chi"/>
        <result property="jap" column="jap"/>
        <result property="japan" column="japan"/>
        <result property="mex" column="mex"/>
        <result property="metric" column="metric"/>
        <result property="pack" column="pack"/>
        <result property="usm" column="usm"/>
        <result property="usw" column="usw"/>
        <result property="kx" column="kx"/>
        <result property="au" column="au"/>
        <result property="cn" column="cn"/>
        <result property="euro" column="euro"/>
        <result property="gen" column="gen"/>
        <result property="jpnY" column="jpn_y"/>
        <result property="jpn" column="jpn"/>
        <result property="ukm" column="ukm"/>
        <result property="ukw" column="ukw"/>
        <result property="eum" column="eum"/>
        <result property="euw" column="euw"/>
        <result property="japm" column="japm"/>
        <result property="japw" column="japw"/>
        <result property="br" column="br"/>
        <result property="usf" column="usf"/>
        <result property="foot" column="foot"/>
        <result property="shoeInnerLength" column="shoe_inner_length"/>
        <result property="kor" column="kor"/>
        <result property="xx" column="xx"/>
        <result property="fr" column="fr"/>
        <result property="mules" column="mules"/>
        <result property="s" column="s"/>
        <result property="xs" column="xs"/>
        <result property="m" column="m"/>
        <result property="l" column="l"/>
        <result property="xl" column="xl"/>
        <result property="xxl" column="xxl"/>
        <result property="reFit" column="re_fit"/>
        <result property="jpnCm" column="jpn_cm"/>
        <result property="cmm" column="cmm"/>
        <result property="cmw" column="cmw"/>
        <result property="eurm" column="eurm"/>
        <result property="eurw" column="eurw"/>
        <result property="jpm" column="jpm"/>
        <result property="jpw" column="jpw"/>
        <result property="eor" column="eor"/>
        <result property="mo" column="mo"/>
        <result property="aus" column="aus"/>
        <result property="usl" column="usl"/>
        <result property="mexCm" column="mex_cm"/>
        <result property="size" column="size"/>
        <result property="shoeNum" column="shoe_num"/>
        <result property="cad" column="cad"/>
        <result property="mondo" column="mondo"/>
        <result property="arg" column="arg"/>
        <result property="usws" column="usws"/>
        <result property="ms" column="ms"/>
        <result property="footLength" column="foot_length"/>
        <result property="weights" column="weights"/>
        <result property="shoeShape" column="shoe_shape"/>
        <result property="lastShape" column="last_shape"/>
        <result property="ukAuNz" column="uk_au_nz"/>
        <result property="ru" column="ru"/>
        <result property="unaunz" column="unaunz"/>
        <result property="ngg" column="ngg"/>
        <result property="eng" column="eng"/>
        <result property="koreaAge" column="korea_age"/>
        <result property="us1" column="us1"/>
        <result property="us2" column="us2"/>
        <result property="chnEu" column="chn_eu"/>
        <result property="cmJp" column="cm_jp"/>
        <result property="months" column="months"/>
        <result property="cnCm" column="cn_cm"/>
        <result property="dps" column="dps"/>
        <result property="nbj" column="nbj"/>
        <result property="ar" column="ar"/>
        <result property="por" column="por"/>
        <result property="spain" column="spain"/>
        <result property="mp" column="mp"/>
        <result property="ua" column="ua"/>
        <result property="chnw" column="chnw"/>
        <result property="chnm" column="chnm"/>
        <result property="usCan" column="us_can"/>
        <result property="type" column="type"/>
        <result property="usmUsw" column="usm_usw"/>
        <result property="can" column="can"/>
        <result property="es" column="es"/>
        <result property="kr" column="kr"/>
        <result property="salesId" column="sales_id"/>
        <result property="salesItem" column="sales_item"/>
        <result property="clientCmd" column="client_cmd"/>
        <result property="dispatchMultiple" column="dispatch_multiple"/>
        <result property="lossNum" column="loss_num"/>
        <result property="quantityProduced" column="quantity_produced"/>
        <result property="quantityQualify" column="quantity_qualify"/>
        <result property="quantityUnqualify" column="quantity_unqualify"/>
        <result property="quantity" column="quantity"/>
        <result property="createTime" column="create_time"/>
        <result property="createBy" column="create_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="updateBy" column="update_by"/>
    </resultMap>

    <sql id="selectProWorkOrderSoSizeItemVo">
        select workorder_so_size_item_id,
               workorder_id,
               workorder_code,
               idx,
               brand_code,
               sale_path,
               size_type,
               item_type,
               segment,
               quarter,
               spec_size,
               whole_size,
               prod_spec,
               standard_size_type,
               usa,
               uk,
               pus,
               jan,
               tha,
               chn,
               ind,
               kket,
               us,
               eu,
               jp,
               mm,
               bra,
               eur,
               cm,
               u,
               mx,
               chi,
               jap,
               japan,
               mex,
               metric,
               pack,
               usm,
               usw,
               kx,
               au,
               cn,
               euro,
               gen,
               jpn_y,
               jpn,
               ukm,
               ukw,
               eum,
               euw,
               japm,
               japw,
               br,
               usf,
               foot,
               shoe_inner_length,
               kor,
               xx,
               fr,
               mules,
               s,
               xs,
               m,
               l,
               xl,
               xxl,
               re_fit,
               jpn_cm,
               cmm,
               cmw,
               eurm,
               eurw,
               jpm,
               jpw,
               eor,
               mo,
               aus,
               usl,
               mex_cm, size, shoe_num, cad, mondo, arg, usws, ms, foot_length, weights, shoe_shape, last_shape, uk_au_nz, ru, unaunz, ngg, eng, korea_age, us1, us2, chn_eu, cm_jp, months, cn_cm, dps, nbj, ar, por, spain, mp, ua, chnw, chnm, us_can, type, usm_usw, can, es, kr, sales_id, sales_item, client_cmd, dispatch_multiple, loss_num, quantity_produced, quantity_qualify, quantity_unqualify, quantity

        from pro_work_order_so_size_item
    </sql>

    <select id="selectProWorkOrderSoSizeItemList" parameterType="ProWorkOrderSoSizeItem"
            resultMap="ProWorkOrderSoSizeItemResult">
        <include refid="selectProWorkOrderSoSizeItemVo"/>
        <where>
            <if test="workorderId != null ">and workorder_id = #{workorderId}</if>
            <if test="idx != null  and idx != ''">and idx = #{idx}</if>
            <if test="brandCode != null  and brandCode != ''">and brand_code = #{brandCode}</if>
            <if test="salePath != null  and salePath != ''">and sale_path = #{salePath}</if>
            <if test="sizeType != null  and sizeType != ''">and size_type = #{sizeType}</if>
            <if test="itemType != null  and itemType != ''">and item_type = #{itemType}</if>
            <if test="segment != null  and segment != ''">and segment = #{segment}</if>
            <if test="quarter != null  and quarter != ''">and quarter = #{quarter}</if>
            <if test="specSize != null  and specSize != ''">and spec_size = #{specSize}</if>
            <if test="wholeSize != null  and wholeSize != ''">and whole_size = #{wholeSize}</if>
            <if test="prodSpec != null  and prodSpec != ''">and prod_spec = #{prodSpec}</if>
            <if test="standardSizeType != null  and standardSizeType != ''">and standard_size_type =
                #{standardSizeType}
            </if>
            <if test="usa != null  and usa != ''">and usa = #{usa}</if>
            <if test="uk != null  and uk != ''">and uk = #{uk}</if>
            <if test="pus != null  and pus != ''">and pus = #{pus}</if>
            <if test="jan != null  and jan != ''">and jan = #{jan}</if>
            <if test="tha != null  and tha != ''">and tha = #{tha}</if>
            <if test="chn != null  and chn != ''">and chn = #{chn}</if>
            <if test="ind != null  and ind != ''">and ind = #{ind}</if>
            <if test="kket != null  and kket != ''">and kket = #{kket}</if>
            <if test="us != null  and us != ''">and us = #{us}</if>
            <if test="eu != null  and eu != ''">and eu = #{eu}</if>
            <if test="jp != null  and jp != ''">and jp = #{jp}</if>
            <if test="mm != null  and mm != ''">and mm = #{mm}</if>
            <if test="bra != null  and bra != ''">and bra = #{bra}</if>
            <if test="eur != null  and eur != ''">and eur = #{eur}</if>
            <if test="cm != null  and cm != ''">and cm = #{cm}</if>
            <if test="u != null  and u != ''">and u = #{u}</if>
            <if test="mx != null  and mx != ''">and mx = #{mx}</if>
            <if test="chi != null  and chi != ''">and chi = #{chi}</if>
            <if test="jap != null  and jap != ''">and jap = #{jap}</if>
            <if test="japan != null  and japan != ''">and japan = #{japan}</if>
            <if test="mex != null  and mex != ''">and mex = #{mex}</if>
            <if test="metric != null  and metric != ''">and metric = #{metric}</if>
            <if test="pack != null  and pack != ''">and pack = #{pack}</if>
            <if test="usm != null  and usm != ''">and usm = #{usm}</if>
            <if test="usw != null  and usw != ''">and usw = #{usw}</if>
            <if test="kx != null  and kx != ''">and kx = #{kx}</if>
            <if test="au != null  and au != ''">and au = #{au}</if>
            <if test="cn != null  and cn != ''">and cn = #{cn}</if>
            <if test="euro != null  and euro != ''">and euro = #{euro}</if>
            <if test="gen != null  and gen != ''">and gen = #{gen}</if>
            <if test="jpnY != null  and jpnY != ''">and jpn_y = #{jpnY}</if>
            <if test="jpn != null  and jpn != ''">and jpn = #{jpn}</if>
            <if test="ukm != null  and ukm != ''">and ukm = #{ukm}</if>
            <if test="ukw != null  and ukw != ''">and ukw = #{ukw}</if>
            <if test="eum != null  and eum != ''">and eum = #{eum}</if>
            <if test="euw != null  and euw != ''">and euw = #{euw}</if>
            <if test="japm != null  and japm != ''">and japm = #{japm}</if>
            <if test="japw != null  and japw != ''">and japw = #{japw}</if>
            <if test="br != null  and br != ''">and br = #{br}</if>
            <if test="usf != null  and usf != ''">and usf = #{usf}</if>
            <if test="foot != null  and foot != ''">and foot = #{foot}</if>
            <if test="shoeInnerLength != null  and shoeInnerLength != ''">and shoe_inner_length = #{shoeInnerLength}
            </if>
            <if test="kor != null  and kor != ''">and kor = #{kor}</if>
            <if test="xx != null  and xx != ''">and xx = #{xx}</if>
            <if test="fr != null  and fr != ''">and fr = #{fr}</if>
            <if test="mules != null  and mules != ''">and mules = #{mules}</if>
            <if test="s != null  and s != ''">and s = #{s}</if>
            <if test="xs != null  and xs != ''">and xs = #{xs}</if>
            <if test="m != null  and m != ''">and m = #{m}</if>
            <if test="l != null  and l != ''">and l = #{l}</if>
            <if test="xl != null  and xl != ''">and xl = #{xl}</if>
            <if test="xxl != null  and xxl != ''">and xxl = #{xxl}</if>
            <if test="reFit != null  and reFit != ''">and re_fit = #{reFit}</if>
            <if test="jpnCm != null  and jpnCm != ''">and jpn_cm = #{jpnCm}</if>
            <if test="cmm != null  and cmm != ''">and cmm = #{cmm}</if>
            <if test="cmw != null  and cmw != ''">and cmw = #{cmw}</if>
            <if test="eurm != null  and eurm != ''">and eurm = #{eurm}</if>
            <if test="eurw != null  and eurw != ''">and eurw = #{eurw}</if>
            <if test="jpm != null  and jpm != ''">and jpm = #{jpm}</if>
            <if test="jpw != null  and jpw != ''">and jpw = #{jpw}</if>
            <if test="eor != null  and eor != ''">and eor = #{eor}</if>
            <if test="mo != null  and mo != ''">and mo = #{mo}</if>
            <if test="aus != null  and aus != ''">and aus = #{aus}</if>
            <if test="usl != null  and usl != ''">and usl = #{usl}</if>
            <if test="mexCm != null  and mexCm != ''">and mex_cm = #{mexCm}</if>
            <if test="size != null  and size != ''">and size = #{size}</if>
            <if test="shoeNum != null  and shoeNum != ''">and shoe_num = #{shoeNum}</if>
            <if test="cad != null  and cad != ''">and cad = #{cad}</if>
            <if test="mondo != null  and mondo != ''">and mondo = #{mondo}</if>
            <if test="arg != null  and arg != ''">and arg = #{arg}</if>
            <if test="usws != null  and usws != ''">and usws = #{usws}</if>
            <if test="ms != null  and ms != ''">and ms = #{ms}</if>
            <if test="footLength != null  and footLength != ''">and foot_length = #{footLength}</if>
            <if test="weights != null  and weights != ''">and weights = #{weights}</if>
            <if test="shoeShape != null  and shoeShape != ''">and shoe_shape = #{shoeShape}</if>
            <if test="lastShape != null  and lastShape != ''">and last_shape = #{lastShape}</if>
            <if test="ukAuNz != null  and ukAuNz != ''">and uk_au_nz = #{ukAuNz}</if>
            <if test="ru != null  and ru != ''">and ru = #{ru}</if>
            <if test="unaunz != null  and unaunz != ''">and unaunz = #{unaunz}</if>
            <if test="ngg != null  and ngg != ''">and ngg = #{ngg}</if>
            <if test="eng != null  and eng != ''">and eng = #{eng}</if>
            <if test="koreaAge != null  and koreaAge != ''">and korea_age = #{koreaAge}</if>
            <if test="us1 != null  and us1 != ''">and us1 = #{us1}</if>
            <if test="us2 != null  and us2 != ''">and us2 = #{us2}</if>
            <if test="chnEu != null  and chnEu != ''">and chn_eu = #{chnEu}</if>
            <if test="cmJp != null  and cmJp != ''">and cm_jp = #{cmJp}</if>
            <if test="months != null  and months != ''">and months = #{months}</if>
            <if test="cnCm != null  and cnCm != ''">and cn_cm = #{cnCm}</if>
            <if test="dps != null  and dps != ''">and dps = #{dps}</if>
            <if test="nbj != null  and nbj != ''">and nbj = #{nbj}</if>
            <if test="ar != null  and ar != ''">and ar = #{ar}</if>
            <if test="por != null  and por != ''">and por = #{por}</if>
            <if test="spain != null  and spain != ''">and spain = #{spain}</if>
            <if test="mp != null  and mp != ''">and mp = #{mp}</if>
            <if test="ua != null  and ua != ''">and ua = #{ua}</if>
            <if test="chnw != null  and chnw != ''">and chnw = #{chnw}</if>
            <if test="chnm != null  and chnm != ''">and chnm = #{chnm}</if>
            <if test="usCan != null  and usCan != ''">and us_can = #{usCan}</if>
            <if test="type != null  and type != ''">and type = #{type}</if>
            <if test="usmUsw != null  and usmUsw != ''">and usm_usw = #{usmUsw}</if>
            <if test="can != null  and can != ''">and can = #{can}</if>
            <if test="es != null  and es != ''">and es = #{es}</if>
            <if test="kr != null  and kr != ''">and kr = #{kr}</if>
        </where>
    </select>

    <select id="selectProWorkOrderSoSizeItemByWorkorderSoSizeItemId" parameterType="Long"
            resultMap="ProWorkOrderSoSizeItemResult">
        <include refid="selectProWorkOrderSoSizeItemVo"/>
        where workorder_so_size_item_id = #{workorderSoSizeItemId}
    </select>
    <select id="selectProWorkOrderSoSizeItemByWorkorderId"
            parameterType="Long"
            resultMap="ProWorkOrderSoSizeItemResult">
        <include refid="selectProWorkOrderSoSizeItemVo"/>
        where workorder_id = #{workorderId}
    </select>

    <insert id="insertProWorkOrderSoSizeItem" parameterType="ProWorkOrderSoSizeItem" useGeneratedKeys="true"
            keyProperty="workorderSoSizeItemId">
        insert into pro_work_order_so_size_item
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="workorderId != null">workorder_id,</if>
            <if test="workorderCode != null">workorder_code,</if>
            <if test="idx != null">idx,</if>
            <if test="brandCode != null">brand_code,</if>
            <if test="salePath != null">sale_path,</if>
            <if test="sizeType != null">size_type,</if>
            <if test="itemType != null">item_type,</if>
            <if test="segment != null">segment,</if>
            <if test="quarter != null">quarter,</if>
            <if test="specSize != null">spec_size,</if>
            <if test="wholeSize != null">whole_size,</if>
            <if test="prodSpec != null">prod_spec,</if>
            <if test="standardSizeType != null">standard_size_type,</if>
            <if test="usa != null">usa,</if>
            <if test="uk != null">uk,</if>
            <if test="pus != null">pus,</if>
            <if test="jan != null">jan,</if>
            <if test="tha != null">tha,</if>
            <if test="chn != null">chn,</if>
            <if test="ind != null">ind,</if>
            <if test="kket != null">kket,</if>
            <if test="us != null">us,</if>
            <if test="eu != null">eu,</if>
            <if test="jp != null">jp,</if>
            <if test="mm != null">mm,</if>
            <if test="bra != null">bra,</if>
            <if test="eur != null">eur,</if>
            <if test="cm != null">cm,</if>
            <if test="u != null">u,</if>
            <if test="mx != null">mx,</if>
            <if test="chi != null">chi,</if>
            <if test="jap != null">jap,</if>
            <if test="japan != null">japan,</if>
            <if test="mex != null">mex,</if>
            <if test="metric != null">metric,</if>
            <if test="pack != null">pack,</if>
            <if test="usm != null">usm,</if>
            <if test="usw != null">usw,</if>
            <if test="kx != null">kx,</if>
            <if test="au != null">au,</if>
            <if test="cn != null">cn,</if>
            <if test="euro != null">euro,</if>
            <if test="gen != null">gen,</if>
            <if test="jpnY != null">jpn_y,</if>
            <if test="jpn != null">jpn,</if>
            <if test="ukm != null">ukm,</if>
            <if test="ukw != null">ukw,</if>
            <if test="eum != null">eum,</if>
            <if test="euw != null">euw,</if>
            <if test="japm != null">japm,</if>
            <if test="japw != null">japw,</if>
            <if test="br != null">br,</if>
            <if test="usf != null">usf,</if>
            <if test="foot != null">foot,</if>
            <if test="shoeInnerLength != null">shoe_inner_length,</if>
            <if test="kor != null">kor,</if>
            <if test="xx != null">xx,</if>
            <if test="fr != null">fr,</if>
            <if test="mules != null">mules,</if>
            <if test="s != null">s,</if>
            <if test="xs != null">xs,</if>
            <if test="m != null">m,</if>
            <if test="l != null">l,</if>
            <if test="xl != null">xl,</if>
            <if test="xxl != null">xxl,</if>
            <if test="reFit != null">re_fit,</if>
            <if test="jpnCm != null">jpn_cm,</if>
            <if test="cmm != null">cmm,</if>
            <if test="cmw != null">cmw,</if>
            <if test="eurm != null">eurm,</if>
            <if test="eurw != null">eurw,</if>
            <if test="jpm != null">jpm,</if>
            <if test="jpw != null">jpw,</if>
            <if test="eor != null">eor,</if>
            <if test="mo != null">mo,</if>
            <if test="aus != null">aus,</if>
            <if test="usl != null">usl,</if>
            <if test="mexCm != null">mex_cm,</if>
            <if test="size != null">size,</if>
            <if test="shoeNum != null">shoe_num,</if>
            <if test="cad != null">cad,</if>
            <if test="mondo != null">mondo,</if>
            <if test="arg != null">arg,</if>
            <if test="usws != null">usws,</if>
            <if test="ms != null">ms,</if>
            <if test="footLength != null">foot_length,</if>
            <if test="weights != null">weights,</if>
            <if test="shoeShape != null">shoe_shape,</if>
            <if test="lastShape != null">last_shape,</if>
            <if test="ukAuNz != null">uk_au_nz,</if>
            <if test="ru != null">ru,</if>
            <if test="unaunz != null">unaunz,</if>
            <if test="ngg != null">ngg,</if>
            <if test="eng != null">eng,</if>
            <if test="koreaAge != null">korea_age,</if>
            <if test="us1 != null">us1,</if>
            <if test="us2 != null">us2,</if>
            <if test="chnEu != null">chn_eu,</if>
            <if test="cmJp != null">cm_jp,</if>
            <if test="months != null">months,</if>
            <if test="cnCm != null">cn_cm,</if>
            <if test="dps != null">dps,</if>
            <if test="nbj != null">nbj,</if>
            <if test="ar != null">ar,</if>
            <if test="por != null">por,</if>
            <if test="spain != null">spain,</if>
            <if test="mp != null">mp,</if>
            <if test="ua != null">ua,</if>
            <if test="chnw != null">chnw,</if>
            <if test="chnm != null">chnm,</if>
            <if test="usCan != null">us_can,</if>
            <if test="type != null">type,</if>
            <if test="usmUsw != null">usm_usw,</if>
            <if test="can != null">can,</if>
            <if test="es != null">es,</if>
            <if test="kr != null">kr,</if>
            <if test="salesId != null">sales_id,</if>
            <if test="salesItem != null">sales_item,</if>
            <if test="clientCmd != null">client_cmd,</if>
            <if test="dispatchMultiple != null">dispatch_multiple,</if>
            <if test="lossNum != null">loss_num,</if>
            <if test="quantity != null">quantity,</if>
            <if test="quantityProduced != null">quantity_produced,</if>
            <if test="createTime != null">create_time,</if>
            <if test="createBy != null">create_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="updateBy != null">update_by,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="workorderId != null">#{workorderId},</if>
            <if test="workorderCode != null">#{workorderCode},</if>
            <if test="idx != null">#{idx},</if>
            <if test="brandCode != null">#{brandCode},</if>
            <if test="salePath != null">#{salePath},</if>
            <if test="sizeType != null">#{sizeType},</if>
            <if test="itemType != null">#{itemType},</if>
            <if test="segment != null">#{segment},</if>
            <if test="quarter != null">#{quarter},</if>
            <if test="specSize != null">#{specSize},</if>
            <if test="wholeSize != null">#{wholeSize},</if>
            <if test="prodSpec != null">#{prodSpec},</if>
            <if test="standardSizeType != null">#{standardSizeType},</if>
            <if test="usa != null">#{usa},</if>
            <if test="uk != null">#{uk},</if>
            <if test="pus != null">#{pus},</if>
            <if test="jan != null">#{jan},</if>
            <if test="tha != null">#{tha},</if>
            <if test="chn != null">#{chn},</if>
            <if test="ind != null">#{ind},</if>
            <if test="kket != null">#{kket},</if>
            <if test="us != null">#{us},</if>
            <if test="eu != null">#{eu},</if>
            <if test="jp != null">#{jp},</if>
            <if test="mm != null">#{mm},</if>
            <if test="bra != null">#{bra},</if>
            <if test="eur != null">#{eur},</if>
            <if test="cm != null">#{cm},</if>
            <if test="u != null">#{u},</if>
            <if test="mx != null">#{mx},</if>
            <if test="chi != null">#{chi},</if>
            <if test="jap != null">#{jap},</if>
            <if test="japan != null">#{japan},</if>
            <if test="mex != null">#{mex},</if>
            <if test="metric != null">#{metric},</if>
            <if test="pack != null">#{pack},</if>
            <if test="usm != null">#{usm},</if>
            <if test="usw != null">#{usw},</if>
            <if test="kx != null">#{kx},</if>
            <if test="au != null">#{au},</if>
            <if test="cn != null">#{cn},</if>
            <if test="euro != null">#{euro},</if>
            <if test="gen != null">#{gen},</if>
            <if test="jpnY != null">#{jpnY},</if>
            <if test="jpn != null">#{jpn},</if>
            <if test="ukm != null">#{ukm},</if>
            <if test="ukw != null">#{ukw},</if>
            <if test="eum != null">#{eum},</if>
            <if test="euw != null">#{euw},</if>
            <if test="japm != null">#{japm},</if>
            <if test="japw != null">#{japw},</if>
            <if test="br != null">#{br},</if>
            <if test="usf != null">#{usf},</if>
            <if test="foot != null">#{foot},</if>
            <if test="shoeInnerLength != null">#{shoeInnerLength},</if>
            <if test="kor != null">#{kor},</if>
            <if test="xx != null">#{xx},</if>
            <if test="fr != null">#{fr},</if>
            <if test="mules != null">#{mules},</if>
            <if test="s != null">#{s},</if>
            <if test="xs != null">#{xs},</if>
            <if test="m != null">#{m},</if>
            <if test="l != null">#{l},</if>
            <if test="xl != null">#{xl},</if>
            <if test="xxl != null">#{xxl},</if>
            <if test="reFit != null">#{reFit},</if>
            <if test="jpnCm != null">#{jpnCm},</if>
            <if test="cmm != null">#{cmm},</if>
            <if test="cmw != null">#{cmw},</if>
            <if test="eurm != null">#{eurm},</if>
            <if test="eurw != null">#{eurw},</if>
            <if test="jpm != null">#{jpm},</if>
            <if test="jpw != null">#{jpw},</if>
            <if test="eor != null">#{eor},</if>
            <if test="mo != null">#{mo},</if>
            <if test="aus != null">#{aus},</if>
            <if test="usl != null">#{usl},</if>
            <if test="mexCm != null">#{mexCm},</if>
            <if test="size != null">#{size},</if>
            <if test="shoeNum != null">#{shoeNum},</if>
            <if test="cad != null">#{cad},</if>
            <if test="mondo != null">#{mondo},</if>
            <if test="arg != null">#{arg},</if>
            <if test="usws != null">#{usws},</if>
            <if test="ms != null">#{ms},</if>
            <if test="footLength != null">#{footLength},</if>
            <if test="weights != null">#{weights},</if>
            <if test="shoeShape != null">#{shoeShape},</if>
            <if test="lastShape != null">#{lastShape},</if>
            <if test="ukAuNz != null">#{ukAuNz},</if>
            <if test="ru != null">#{ru},</if>
            <if test="unaunz != null">#{unaunz},</if>
            <if test="ngg != null">#{ngg},</if>
            <if test="eng != null">#{eng},</if>
            <if test="koreaAge != null">#{koreaAge},</if>
            <if test="us1 != null">#{us1},</if>
            <if test="us2 != null">#{us2},</if>
            <if test="chnEu != null">#{chnEu},</if>
            <if test="cmJp != null">#{cmJp},</if>
            <if test="months != null">#{months},</if>
            <if test="cnCm != null">#{cnCm},</if>
            <if test="dps != null">#{dps},</if>
            <if test="nbj != null">#{nbj},</if>
            <if test="ar != null">#{ar},</if>
            <if test="por != null">#{por},</if>
            <if test="spain != null">#{spain},</if>
            <if test="mp != null">#{mp},</if>
            <if test="ua != null">#{ua},</if>
            <if test="chnw != null">#{chnw},</if>
            <if test="chnm != null">#{chnm},</if>
            <if test="usCan != null">#{usCan},</if>
            <if test="type != null">#{type},</if>
            <if test="usmUsw != null">#{usmUsw},</if>
            <if test="can != null">#{can},</if>
            <if test="es != null">#{es},</if>
            <if test="kr != null">#{kr},</if>
            <if test="salesId != null">#{salesId},</if>
            <if test="salesItem != null">#{salesItem},</if>
            <if test="clientCmd != null">#{clientCmd},</if>
            <if test="dispatchMultiple != null">#{dispatchMultiple},</if>
            <if test="lossNum != null">#{lossNum},</if>
            <if test="quantity != null">#{quantity},</if>
            <if test="quantityProduced != null">#{quantityProduced},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="updateBy != null">#{updateBy},</if>

        </trim>
    </insert>

    <update id="updateProWorkOrderSoSizeItem" parameterType="ProWorkOrderSoSizeItem">
        update pro_work_order_so_size_item
        <trim prefix="SET" suffixOverrides=",">
            <if test="workorderId != null">workorder_id = #{workorderId},</if>
            <if test="workorderCode != null">workorder_code = #{workorderCode},</if>
            <if test="idx != null">idx = #{idx},</if>
            <if test="brandCode != null">brand_code = #{brandCode},</if>
            <if test="salePath != null">sale_path = #{salePath},</if>
            <if test="sizeType != null">size_type = #{sizeType},</if>
            <if test="itemType != null">item_type = #{itemType},</if>
            <if test="segment != null">segment = #{segment},</if>
            <if test="quarter != null">quarter = #{quarter},</if>
            <if test="specSize != null">spec_size = #{specSize},</if>
            <if test="wholeSize != null">whole_size = #{wholeSize},</if>
            <if test="prodSpec != null">prod_spec = #{prodSpec},</if>
            <if test="standardSizeType != null">standard_size_type = #{standardSizeType},</if>
            <if test="usa != null">usa = #{usa},</if>
            <if test="uk != null">uk = #{uk},</if>
            <if test="pus != null">pus = #{pus},</if>
            <if test="jan != null">jan = #{jan},</if>
            <if test="tha != null">tha = #{tha},</if>
            <if test="chn != null">chn = #{chn},</if>
            <if test="ind != null">ind = #{ind},</if>
            <if test="kket != null">kket = #{kket},</if>
            <if test="us != null">us = #{us},</if>
            <if test="eu != null">eu = #{eu},</if>
            <if test="jp != null">jp = #{jp},</if>
            <if test="mm != null">mm = #{mm},</if>
            <if test="bra != null">bra = #{bra},</if>
            <if test="eur != null">eur = #{eur},</if>
            <if test="cm != null">cm = #{cm},</if>
            <if test="u != null">u = #{u},</if>
            <if test="mx != null">mx = #{mx},</if>
            <if test="chi != null">chi = #{chi},</if>
            <if test="jap != null">jap = #{jap},</if>
            <if test="japan != null">japan = #{japan},</if>
            <if test="mex != null">mex = #{mex},</if>
            <if test="metric != null">metric = #{metric},</if>
            <if test="pack != null">pack = #{pack},</if>
            <if test="usm != null">usm = #{usm},</if>
            <if test="usw != null">usw = #{usw},</if>
            <if test="kx != null">kx = #{kx},</if>
            <if test="au != null">au = #{au},</if>
            <if test="cn != null">cn = #{cn},</if>
            <if test="euro != null">euro = #{euro},</if>
            <if test="gen != null">gen = #{gen},</if>
            <if test="jpnY != null">jpn_y = #{jpnY},</if>
            <if test="jpn != null">jpn = #{jpn},</if>
            <if test="ukm != null">ukm = #{ukm},</if>
            <if test="ukw != null">ukw = #{ukw},</if>
            <if test="eum != null">eum = #{eum},</if>
            <if test="euw != null">euw = #{euw},</if>
            <if test="japm != null">japm = #{japm},</if>
            <if test="japw != null">japw = #{japw},</if>
            <if test="br != null">br = #{br},</if>
            <if test="usf != null">usf = #{usf},</if>
            <if test="foot != null">foot = #{foot},</if>
            <if test="shoeInnerLength != null">shoe_inner_length = #{shoeInnerLength},</if>
            <if test="kor != null">kor = #{kor},</if>
            <if test="xx != null">xx = #{xx},</if>
            <if test="fr != null">fr = #{fr},</if>
            <if test="mules != null">mules = #{mules},</if>
            <if test="s != null">s = #{s},</if>
            <if test="xs != null">xs = #{xs},</if>
            <if test="m != null">m = #{m},</if>
            <if test="l != null">l = #{l},</if>
            <if test="xl != null">xl = #{xl},</if>
            <if test="xxl != null">xxl = #{xxl},</if>
            <if test="reFit != null">re_fit = #{reFit},</if>
            <if test="jpnCm != null">jpn_cm = #{jpnCm},</if>
            <if test="cmm != null">cmm = #{cmm},</if>
            <if test="cmw != null">cmw = #{cmw},</if>
            <if test="eurm != null">eurm = #{eurm},</if>
            <if test="eurw != null">eurw = #{eurw},</if>
            <if test="jpm != null">jpm = #{jpm},</if>
            <if test="jpw != null">jpw = #{jpw},</if>
            <if test="eor != null">eor = #{eor},</if>
            <if test="mo != null">mo = #{mo},</if>
            <if test="aus != null">aus = #{aus},</if>
            <if test="usl != null">usl = #{usl},</if>
            <if test="mexCm != null">mex_cm = #{mexCm},</if>
            <if test="size != null">size = #{size},</if>
            <if test="shoeNum != null">shoe_num = #{shoeNum},</if>
            <if test="cad != null">cad = #{cad},</if>
            <if test="mondo != null">mondo = #{mondo},</if>
            <if test="arg != null">arg = #{arg},</if>
            <if test="usws != null">usws = #{usws},</if>
            <if test="ms != null">ms = #{ms},</if>
            <if test="footLength != null">foot_length = #{footLength},</if>
            <if test="weights != null">weights = #{weights},</if>
            <if test="shoeShape != null">shoe_shape = #{shoeShape},</if>
            <if test="lastShape != null">last_shape = #{lastShape},</if>
            <if test="ukAuNz != null">uk_au_nz = #{ukAuNz},</if>
            <if test="ru != null">ru = #{ru},</if>
            <if test="unaunz != null">unaunz = #{unaunz},</if>
            <if test="ngg != null">ngg = #{ngg},</if>
            <if test="eng != null">eng = #{eng},</if>
            <if test="koreaAge != null">korea_age = #{koreaAge},</if>
            <if test="us1 != null">us1 = #{us1},</if>
            <if test="us2 != null">us2 = #{us2},</if>
            <if test="chnEu != null">chn_eu = #{chnEu},</if>
            <if test="cmJp != null">cm_jp = #{cmJp},</if>
            <if test="months != null">months = #{months},</if>
            <if test="cnCm != null">cn_cm = #{cnCm},</if>
            <if test="dps != null">dps = #{dps},</if>
            <if test="nbj != null">nbj = #{nbj},</if>
            <if test="ar != null">ar = #{ar},</if>
            <if test="por != null">por = #{por},</if>
            <if test="spain != null">spain = #{spain},</if>
            <if test="mp != null">mp = #{mp},</if>
            <if test="ua != null">ua = #{ua},</if>
            <if test="chnw != null">chnw = #{chnw},</if>
            <if test="chnm != null">chnm = #{chnm},</if>
            <if test="usCan != null">us_can = #{usCan},</if>
            <if test="type != null">type = #{type},</if>
            <if test="usmUsw != null">usm_usw = #{usmUsw},</if>
            <if test="can != null">can = #{can},</if>
            <if test="es != null">es = #{es},</if>
            <if test="kr != null">kr = #{kr},</if>
            <if test="salesId != null">sales_id = #{salesId},</if>
            <if test="salesItem != null">sales_item = #{salesItem},</if>
            <if test="clientCmd != null">client_cmd = #{clientCmd},</if>
            <if test="dispatchMultiple != null">dispatch_multiple = #{dispatchMultiple},</if>
            <if test="lossNum != null">loss_num = #{lossNum},</if>
            <if test="quantityProduced != null">quantity_produced = #{quantityProduced},</if>
            <if test="quantityQualify != null">quantity_qualify = #{quantityQualify},</if>
            <if test="quantityUnqualify != null">quantity_unqualify = #{quantityUnqualify},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>

        </trim>
        where workorder_so_size_item_id = #{workorderSoSizeItemId}
    </update>

    <delete id="deleteProWorkOrderSoSizeItemByWorkorderSoSizeItemId" parameterType="Long">
        delete
        from pro_work_order_so_size_item
        where workorder_so_size_item_id = #{workorderSoSizeItemId}
    </delete>

    <delete id="deleteProWorkOrderSoSizeItemByWorkorderSoSizeItemIds" parameterType="String">
        delete from pro_work_order_so_size_item where workorder_so_size_item_id in
        <foreach item="workorderSoSizeItemId" collection="array" open="(" separator="," close=")">
            #{workorderSoSizeItemId}
        </foreach>
    </delete>
</mapper>
