|
|
|
@ -65,18 +65,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="hourlyUnitPrice" column="hourly_unit_price" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<resultMap type="Bom" id="BomResult">
|
|
|
|
|
<result property="factoryCode" column="factory_code" />
|
|
|
|
|
<result property="productionVersion" column="production_version" />
|
|
|
|
|
<resultMap type="BomComponent" id="BomComponentResult">
|
|
|
|
|
<result property="handle" column="handle" />
|
|
|
|
|
<result property="bomCode" column="bom_code" />
|
|
|
|
|
<result property="optionalBom" column="optional_bom" />
|
|
|
|
|
<result property="optionalBomText" column="optional_bom_text" />
|
|
|
|
|
<result property="pvvd" column="pvvd" />
|
|
|
|
|
<result property="pved" column="pved" />
|
|
|
|
|
<result property="bomCalculateNumber" column="bom_calculate_number" />
|
|
|
|
|
<result property="bomCalculateUnit" column="bom_calculate_unit" />
|
|
|
|
|
<result property="bomBaseNumber" column="bom_base_number" />
|
|
|
|
|
<result property="bomBaseUnit" column="bom_base_unit" />
|
|
|
|
|
<result property="bomName" column="product_desc_zh" />
|
|
|
|
|
<result property="site" column="site" />
|
|
|
|
|
<result property="productCode" column="product_code" />
|
|
|
|
|
<result property="cumc" column="cumc" />
|
|
|
|
|
<result property="component" column="component" />
|
|
|
|
|
<result property="bomHierarchy" column="bom_hierarchy" />
|
|
|
|
|
<result property="projectNo" column="project_no" />
|
|
|
|
|
<result property="standardDosage" column="standard_dosage" />
|
|
|
|
|
<result property="lossRate" column="loss_rate" />
|
|
|
|
|
<result property="lossAmount" column="loss_amount" />
|
|
|
|
|
<result property="cilosses" column="cilosses" />
|
|
|
|
|
<result property="componentUnit" column="component_unit" />
|
|
|
|
|
<result property="componentProFlag" column="component_pro_flag" />
|
|
|
|
|
<result property="msi" column="msi" />
|
|
|
|
@ -89,7 +91,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
|
<result property="currentVersion" column="current_version" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectBomVo">
|
|
|
|
@ -267,29 +268,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectBomList" parameterType="Bom" resultMap="BomResult">
|
|
|
|
|
<include refid="selectBomVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
|
|
|
|
<if test="productionVersion != null and productionVersion != ''"> and production_version = #{productionVersion}</if>
|
|
|
|
|
<select id="selectBaseBomComponentList" parameterType="BomComponent" resultMap="BomComponentResult">
|
|
|
|
|
-- select bbc.bom_code,bpc1.product_desc_zh
|
|
|
|
|
-- from base_bom_component bbc,base_product_copy1 bpc1
|
|
|
|
|
-- left join base_product_copy1 bpc1 on bbc.product_code = (right(bpc1.product_code,11))
|
|
|
|
|
-- Where
|
|
|
|
|
<!-- <if test="bomCode != null and bomCode != ''"> and bom_code = #{bomCode}</if>-->
|
|
|
|
|
-- bbc.product_code = right(bpc1.product_code,11)
|
|
|
|
|
select distinct bbc.bom_code,bpc1.product_desc_zh,right(bpc1.product_code,11) as pc,bbc.product_code
|
|
|
|
|
from base_bom_component bbc,base_product_copy1 bpc1
|
|
|
|
|
Where
|
|
|
|
|
bbc.product_code = right(bpc1.product_code,11)
|
|
|
|
|
<if test="bomCode != null and bomCode != ''"> and bom_code = #{bomCode}</if>
|
|
|
|
|
<if test="optionalBom != null and optionalBom != ''"> and optional_bom = #{optionalBom}</if>
|
|
|
|
|
<if test="optionalBomText != null and optionalBomText != ''"> and optional_bom_text = #{optionalBomText}</if>
|
|
|
|
|
<if test="pvvd != null "> and pvvd = #{pvvd}</if>
|
|
|
|
|
<if test="pved != null "> and pved = #{pved}</if>
|
|
|
|
|
<if test="bomCalculateNumber != null "> and bom_calculate_number = #{bomCalculateNumber}</if>
|
|
|
|
|
<if test="bomCalculateUnit != null and bomCalculateUnit != ''"> and bom_calculate_unit = #{bomCalculateUnit}</if>
|
|
|
|
|
<if test="bomBaseNumber != null "> and bom_base_number = #{bomBaseNumber}</if>
|
|
|
|
|
<if test="bomBaseUnit != null and bomBaseUnit != ''"> and bom_base_unit = #{bomBaseUnit}</if>
|
|
|
|
|
<if test="componentUnit != null and componentUnit != ''"> and component_unit = #{componentUnit}</if>
|
|
|
|
|
<if test="componentProFlag != null and componentProFlag != ''"> and component_pro_flag = #{componentProFlag}</if>
|
|
|
|
|
<if test="msi != null and msi != ''"> and msi = #{msi}</if>
|
|
|
|
|
<if test="sanka != null and sanka != ''"> and sanka = #{sanka}</if>
|
|
|
|
|
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
|
|
|
|
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
|
|
|
|
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
|
|
|
|
|
<if test="currentVersion != null and currentVersion != ''"> and current_version = #{currentVersion}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
|