|
|
|
@ -47,10 +47,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="convIssue" column="conv_issue" />
|
|
|
|
|
<result property="appendFlag" column="append_flag" />
|
|
|
|
|
<result property="appendPercent" column="append_percent" />
|
|
|
|
|
<result property="mtart" column="mtart" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectBaseProductVo">
|
|
|
|
|
select product_id, product_code, product_desc_zh, product_model,product_desc_en, rule_code, old_product_code, parts_product_code, sku_barcode, length, width, height, gross_weight, net_weight, tare_weight, volume, unit_price, product_group, product_group_name, user_defined1, user_defined2, user_defined3, user_defined4, user_defined5, user_defined6, create_by, create_time, update_by, update_time, factory_code, active_flag, sync_flag, primary_uom, del_flag, bstme, basic_order, conv_order, ausme, basic_issue, conv_issue, append_flag, append_percent from base_product
|
|
|
|
|
select product_id, product_code, product_desc_zh, product_model,product_desc_en, rule_code, old_product_code, parts_product_code, sku_barcode, length, width, height, gross_weight, net_weight, tare_weight, volume, unit_price, product_group, product_group_name, user_defined1, user_defined2, user_defined3, user_defined4, user_defined5, user_defined6, create_by, create_time, update_by, update_time, factory_code, active_flag, sync_flag, primary_uom, del_flag, bstme, basic_order, conv_order, ausme, basic_issue, conv_issue, append_flag, append_percent,mtart from base_product
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseProductList" parameterType="BaseProduct" resultMap="BaseProductResult">
|
|
|
|
@ -92,12 +93,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="convIssue != null "> and conv_issue = #{convIssue}</if>
|
|
|
|
|
<if test="appendFlag != null and appendFlag != ''"> and append_flag = #{appendFlag}</if>
|
|
|
|
|
<if test="appendPercent != null and appendPercent != ''"> and append_percent = #{appendPercent}</if>
|
|
|
|
|
<if test="mtart != null and mtart != ''"> and mtart = #{mtart}</if>
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseProductByProductId" parameterType="String" resultMap="BaseProductResult">
|
|
|
|
|
<include refid="selectBaseProductVo"/>
|
|
|
|
|
where product_id = #{productId}
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertBaseProduct" parameterType="BaseProduct">
|
|
|
|
@ -145,6 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="convIssue != null">conv_issue,</if>
|
|
|
|
|
<if test="appendFlag != null">append_flag,</if>
|
|
|
|
|
<if test="appendPercent != null">append_percent,</if>
|
|
|
|
|
<if test="mtart != null">mtart,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="productId != null">#{productId},</if>
|
|
|
|
@ -189,6 +194,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="convIssue != null">#{convIssue},</if>
|
|
|
|
|
<if test="appendFlag != null">#{appendFlag},</if>
|
|
|
|
|
<if test="appendPercent != null">#{appendPercent},</if>
|
|
|
|
|
<if test="mtart != null">#{mtart},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -227,7 +233,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="activeFlag != null">active_flag = #{activeFlag},</if>
|
|
|
|
|
<if test="syncFlag != null">sync_flag = #{syncFlag},</if>
|
|
|
|
|
<if test="primaryUom != null">primary_uom = #{primaryUom},</if>
|
|
|
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
|
|
<if test="bstme != null">bstme = #{bstme},</if>
|
|
|
|
|
<if test="basicOrder != null">basic_order = #{basicOrder},</if>
|
|
|
|
|
<if test="convOrder != null">conv_order = #{convOrder},</if>
|
|
|
|
@ -236,16 +241,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="convIssue != null">conv_issue = #{convIssue},</if>
|
|
|
|
|
<if test="appendFlag != null">append_flag = #{appendFlag},</if>
|
|
|
|
|
<if test="appendPercent != null">append_percent = #{appendPercent},</if>
|
|
|
|
|
<if test="mtart != null and mtart != ''">mtart = #{mtart},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where product_id = #{productId}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteBaseProductByProductId" parameterType="String">
|
|
|
|
|
delete from base_product where product_id = #{productId}
|
|
|
|
|
</delete>
|
|
|
|
|
<update id="deleteBaseProductByProductId" parameterType="String">
|
|
|
|
|
update base_product
|
|
|
|
|
set del_flag = '1'
|
|
|
|
|
where product_id = #{productId}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteBaseProductByProductIds" parameterType="String">
|
|
|
|
|
delete from base_product where product_id in
|
|
|
|
|
update base_product
|
|
|
|
|
set del_flag = '1'
|
|
|
|
|
where product_id in
|
|
|
|
|
<foreach item="productId" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{productId}
|
|
|
|
|
</foreach>
|
|
|
|
@ -255,12 +265,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
select product_desc_zh
|
|
|
|
|
from base_product
|
|
|
|
|
where product_desc_zh = #{productDescZh}
|
|
|
|
|
and del_flag ='0'
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="checkCodeUnique" parameterType="BaseProduct" resultType ="java.lang.String">
|
|
|
|
|
select product_code
|
|
|
|
|
from base_product
|
|
|
|
|
where product_code = #{productCode}
|
|
|
|
|
and del_flag ='0'
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|