|
|
|
@ -64,6 +64,8 @@
|
|
|
|
|
<result property="pvc" column="pvc"/>
|
|
|
|
|
<result property="supportPlate" column="support_plate"/>
|
|
|
|
|
<result property="other" column="other"/>
|
|
|
|
|
<result property="otherName" column="otherName"/>
|
|
|
|
|
|
|
|
|
|
<result property="reportRate" column="report_rate"/>
|
|
|
|
|
<result property="mvgr5" column="mvgr5"/>
|
|
|
|
|
<result property="mvgr5Nm" column="mvgr5_nm"/>
|
|
|
|
@ -75,59 +77,81 @@
|
|
|
|
|
</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, mtart, report_rate,mvgr5 from base_product
|
|
|
|
|
select bp.product_id,bp.product_code,bp.product_desc_zh,bp.product_model,bp.product_desc_en,bp.rule_code,bp.old_product_code,
|
|
|
|
|
bp.parts_product_code,bp.sku_barcode,bp.length,bp.width,bp.height,bp.gross_weight,bp.net_weight,bp.tare_weight,bp.volume,
|
|
|
|
|
bp.unit_price,bp.product_group,bp.product_group_name,bp.user_defined1,bp.user_defined2,bp.user_defined3,bp.user_defined4,
|
|
|
|
|
bp.user_defined5,bp.user_defined6,bp.create_by,bp.create_time,bp.update_by,bp.update_time,bp.factory_code,bp.active_flag,
|
|
|
|
|
bp.sync_flag,bp.primary_uom,bp.del_flag,bp.bstme,bp.basic_order,bp.conv_order,bp.ausme,bp.basic_issue,bp.conv_issue,bp.append_flag,
|
|
|
|
|
bp.append_percent,bp.mtart,bp.report_rate, bp.mvgr5,
|
|
|
|
|
bpa.id,
|
|
|
|
|
bpa.category,
|
|
|
|
|
bpa.pc,
|
|
|
|
|
bpa.iei,
|
|
|
|
|
bpa.man_standar,
|
|
|
|
|
bpa.spray_way,
|
|
|
|
|
bpa.blank_diameter,
|
|
|
|
|
bpa.blank_no,
|
|
|
|
|
bpa.spray_volume,
|
|
|
|
|
bpa.liquid_no,
|
|
|
|
|
bpa.endometrial_dosage,
|
|
|
|
|
bpa.outer_film_dosage,
|
|
|
|
|
bpa.support,
|
|
|
|
|
bpa.support_no,
|
|
|
|
|
bpa.pvc,
|
|
|
|
|
bpa.support_plate,
|
|
|
|
|
bpa.other,sdd.dict_label otherName,
|
|
|
|
|
bpa.warehouse_cycle,bpa.pallet_num palletNum,
|
|
|
|
|
bpa.pack_type
|
|
|
|
|
from base_product bp
|
|
|
|
|
left join base_product_attached bpa on bpa.product_code = right(bp.product_code,11)
|
|
|
|
|
left join lanju_op_cloud.dbo.sys_dict_data sdd on sdd.dict_value = bpa.other and sdd.dict_type= 'qms_category'
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseProductList" parameterType="BaseProduct" resultMap="BaseProductResult">
|
|
|
|
|
<include refid="selectBaseProductVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="productCode != null and productCode != ''">and product_code like concat('%', #{productCode},'%')</if>
|
|
|
|
|
<if test="productDescZh != null and productDescZh != ''">and product_desc_zh like concat('%',#{productDescZh}, '%')</if>
|
|
|
|
|
<if test="productModel != null and productModel != ''">and product_model = #{productModel}</if>
|
|
|
|
|
<if test="productDescEn != null and productDescEn != ''">and product_desc_en = #{productDescEn}</if>
|
|
|
|
|
<if test="ruleCode != null and ruleCode != ''">and rule_code = #{ruleCode}</if>
|
|
|
|
|
<if test="oldProductCode != null and oldProductCode != ''">and old_product_code = #{oldProductCode}</if>
|
|
|
|
|
<if test="partsProductCode != null and partsProductCode != ''">and parts_product_code = #{partsProductCode}</if>
|
|
|
|
|
<if test="skuBarcode != null and skuBarcode != ''">and sku_barcode = #{skuBarcode}</if>
|
|
|
|
|
<if test="length != null ">and length = #{length}</if>
|
|
|
|
|
<if test="width != null ">and width = #{width}</if>
|
|
|
|
|
<if test="height != null ">and height = #{height}</if>
|
|
|
|
|
<if test="grossWeight != null ">and gross_weight = #{grossWeight}</if>
|
|
|
|
|
<if test="netWeight != null ">and net_weight = #{netWeight}</if>
|
|
|
|
|
<if test="tareWeight != null ">and tare_weight = #{tareWeight}</if>
|
|
|
|
|
<if test="volume != null ">and volume = #{volume}</if>
|
|
|
|
|
<if test="unitPrice != null ">and unit_price = #{unitPrice}</if>
|
|
|
|
|
<if test="productGroup != null and productGroup != ''">and product_group = #{productGroup}</if>
|
|
|
|
|
<if test="productGroupName != null and productGroupName != ''">and product_group_name like concat('%',#{productGroupName}, '%')</if>
|
|
|
|
|
<if test="userDefined1 != null and userDefined1 != ''">and user_defined1 = #{userDefined1}</if>
|
|
|
|
|
<if test="userDefined2 != null and userDefined2 != ''">and user_defined2 = #{userDefined2}</if>
|
|
|
|
|
<if test="userDefined3 != null and userDefined3 != ''">and user_defined3 = #{userDefined3}</if>
|
|
|
|
|
<if test="userDefined4 != null and userDefined4 != ''">and user_defined4 = #{userDefined4}</if>
|
|
|
|
|
<if test="userDefined5 != null and userDefined5 != ''">and user_defined5 = #{userDefined5}</if>
|
|
|
|
|
<if test="userDefined6 != null and userDefined6 != ''">and user_defined6 = #{userDefined6}</if>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''">and factory_code = #{factoryCode}</if>
|
|
|
|
|
<if test="activeFlag != null and activeFlag != ''">and active_flag = #{activeFlag}</if>
|
|
|
|
|
<if test="syncFlag != null and syncFlag != ''">and sync_flag = #{syncFlag}</if>
|
|
|
|
|
<if test="primaryUom != null and primaryUom != ''">and primary_uom = #{primaryUom}</if>
|
|
|
|
|
<if test="bstme != null and bstme != ''">and bstme = #{bstme}</if>
|
|
|
|
|
<if test="basicOrder != null ">and basic_order = #{basicOrder}</if>
|
|
|
|
|
<if test="convOrder != null ">and conv_order = #{convOrder}</if>
|
|
|
|
|
<if test="ausme != null and ausme != ''">and ausme = #{ausme}</if>
|
|
|
|
|
<if test="basicIssue != null ">and basic_issue = #{basicIssue}</if>
|
|
|
|
|
<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>
|
|
|
|
|
<if test="reportRate != null and reportRate != ''">and report_rate = #{reportRate}</if>
|
|
|
|
|
<if test="mvgr5 != null and mvgr5 != ''">and mvgr5 like concat('%', #{mvgr5},'%') </if>
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
<if test="productCode != null and productCode != ''">and bp.product_code like concat('%', #{productCode},'%')</if>
|
|
|
|
|
<if test="productDescZh != null and productDescZh != ''">and bp.product_desc_zh like concat('%',#{productDescZh}, '%')</if>
|
|
|
|
|
<if test="productModel != null and productModel != ''">and bp.product_model = #{productModel}</if>
|
|
|
|
|
<if test="productDescEn != null and productDescEn != ''">and bp.product_desc_en = #{productDescEn}</if>
|
|
|
|
|
<if test="ruleCode != null and ruleCode != ''">and bp.rule_code = #{ruleCode}</if>
|
|
|
|
|
<if test="oldProductCode != null and oldProductCode != ''">and bp.old_product_code = #{oldProductCode}</if>
|
|
|
|
|
<if test="partsProductCode != null and partsProductCode != ''">and bp.parts_product_code = #{partsProductCode}</if>
|
|
|
|
|
<if test="skuBarcode != null and skuBarcode != ''">and bp.sku_barcode = #{skuBarcode}</if>
|
|
|
|
|
<if test="length != null ">and bp.length = #{length}</if>
|
|
|
|
|
<if test="width != null ">and bp.width = #{width}</if>
|
|
|
|
|
<if test="height != null ">and bp.height = #{height}</if>
|
|
|
|
|
<if test="grossWeight != null ">and bp.gross_weight = #{grossWeight}</if>
|
|
|
|
|
<if test="netWeight != null ">and bp.net_weight = #{netWeight}</if>
|
|
|
|
|
<if test="tareWeight != null ">and bp.tare_weight = #{tareWeight}</if>
|
|
|
|
|
<if test="volume != null ">and bp.volume = #{volume}</if>
|
|
|
|
|
<if test="unitPrice != null ">and bp.unit_price = #{unitPrice}</if>
|
|
|
|
|
<if test="productGroup != null and productGroup != ''">and bp.product_group = #{productGroup}</if>
|
|
|
|
|
<if test="productGroupName != null and productGroupName != ''">and bp.product_group_name like concat('%',#{productGroupName}, '%')</if>
|
|
|
|
|
<if test="userDefined1 != null and userDefined1 != ''">and bp.user_defined1 = #{userDefined1}</if>
|
|
|
|
|
<if test="userDefined2 != null and userDefined2 != ''">and bp.user_defined2 = #{userDefined2}</if>
|
|
|
|
|
<if test="userDefined3 != null and userDefined3 != ''">and bp.user_defined3 = #{userDefined3}</if>
|
|
|
|
|
<if test="userDefined4 != null and userDefined4 != ''">and bp.user_defined4 = #{userDefined4}</if>
|
|
|
|
|
<if test="userDefined5 != null and userDefined5 != ''">and bp.user_defined5 = #{userDefined5}</if>
|
|
|
|
|
<if test="userDefined6 != null and userDefined6 != ''">and bp.user_defined6 = #{userDefined6}</if>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''">and bp.factory_code = #{factoryCode}</if>
|
|
|
|
|
<if test="activeFlag != null and activeFlag != ''">and bp.active_flag = #{activeFlag}</if>
|
|
|
|
|
<if test="syncFlag != null and syncFlag != ''">and bp.sync_flag = #{syncFlag}</if>
|
|
|
|
|
<if test="primaryUom != null and primaryUom != ''">and bp.primary_uom = #{primaryUom}</if>
|
|
|
|
|
<if test="bstme != null and bstme != ''">and bp.bstme = #{bstme}</if>
|
|
|
|
|
<if test="basicOrder != null ">and bp.basic_order = #{basicOrder}</if>
|
|
|
|
|
<if test="convOrder != null ">and bp.conv_order = #{convOrder}</if>
|
|
|
|
|
<if test="ausme != null and ausme != ''">and bp.ausme = #{ausme}</if>
|
|
|
|
|
<if test="basicIssue != null ">and bp.basic_issue = #{basicIssue}</if>
|
|
|
|
|
<if test="convIssue != null ">and bp.conv_issue = #{convIssue}</if>
|
|
|
|
|
<if test="appendFlag != null and appendFlag != ''">and bp.append_flag = #{appendFlag}</if>
|
|
|
|
|
<if test="appendPercent != null and appendPercent != ''">and bp.append_percent = #{appendPercent}</if>
|
|
|
|
|
<if test="mtart != null and mtart != ''">and bp.mtart = #{mtart}</if>
|
|
|
|
|
<if test="reportRate != null and reportRate != ''">and bp.report_rate = #{reportRate}</if>
|
|
|
|
|
<if test="mvgr5 != null and mvgr5 != ''">and bp.mvgr5 like concat('%', #{mvgr5},'%') </if>
|
|
|
|
|
and bp.del_flag = '0'
|
|
|
|
|
</where>
|
|
|
|
|
order by product_code asc
|
|
|
|
|
order by bp.product_code asc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseProductByProductId" parameterType="String" resultMap="BaseProductResult">
|
|
|
|
|