|
|
|
@ -29,31 +29,31 @@
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectMesUnitPriceList" parameterType="MesUnitPrice" resultMap="MesUnitPriceResult">
|
|
|
|
|
select pic_id, factory_id, product_code, product_name, line_code,
|
|
|
|
|
line_name, childprocess_id, childprocess_code, childprocess_name, attr1,
|
|
|
|
|
attr2, attr3, attr4, create_by, create_time, update_by, update_time from mes_unit_price
|
|
|
|
|
select mup.pic_id, mup.factory_id, mup.product_code, mup.product_name, mup.line_code,
|
|
|
|
|
mup.line_name, mup.childprocess_id, mup.childprocess_code, mup.childprocess_name, mup.attr1,
|
|
|
|
|
mup.attr2, mup.attr3, mup.attr4, mup.create_by, mup.create_time, mup.update_by, mup.update_time from mes_unit_price mup
|
|
|
|
|
<where>
|
|
|
|
|
<if test="factoryId != null ">and factory_id = #{factoryId}</if>
|
|
|
|
|
<if test="productCode != null and productCode != ''">and product_code = #{productCode}</if>
|
|
|
|
|
<if test="productName != null and productName != ''">and product_name like concat('%', #{productName},
|
|
|
|
|
<if test="factoryId != null ">and mup.factory_id = #{factoryId}</if>
|
|
|
|
|
<if test="productCode != null and productCode != ''">and mup.product_code = #{productCode}</if>
|
|
|
|
|
<if test="productName != null and productName != ''">and mup.product_name like concat('%', #{productName},
|
|
|
|
|
'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="lineCode != null and lineCode != ''">and line_code = #{lineCode}</if>
|
|
|
|
|
<if test="lineName != null and lineName != ''">and line_name like concat('%', #{lineName}, '%')</if>
|
|
|
|
|
<if test="childprocessId != null and childprocessId != ''">and childprocess_id = #{childprocessId}</if>
|
|
|
|
|
<if test="childprocessCode != null and childprocessCode != ''">and childprocess_code =
|
|
|
|
|
<if test="lineCode != null and lineCode != ''">and mup.line_code = #{lineCode}</if>
|
|
|
|
|
<if test="lineName != null and lineName != ''">and mup.line_name like concat('%', #{lineName}, '%')</if>
|
|
|
|
|
<if test="childprocessId != null and childprocessId != ''">and mup.childprocess_id = #{childprocessId}</if>
|
|
|
|
|
<if test="childprocessCode != null and childprocessCode != ''">and mup.childprocess_code =
|
|
|
|
|
#{childprocessCode}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="childprocessName != null and childprocessName != ''">and childprocess_name like concat('%',
|
|
|
|
|
<if test="childprocessName != null and childprocessName != ''">and mup.childprocess_name like concat('%',
|
|
|
|
|
#{childprocessName}, '%')
|
|
|
|
|
</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 = #{attr3}</if>
|
|
|
|
|
<if test="attr4 != null ">and attr4 = #{attr4}</if>
|
|
|
|
|
<if test="createBy != null">and create_by = #{createBy}</if>
|
|
|
|
|
<if test="attr1 != null and attr1 != ''">and mup.attr1 = #{attr1}</if>
|
|
|
|
|
<if test="attr2 != null and attr2 != ''">and mup.attr2 = #{attr2}</if>
|
|
|
|
|
<if test="attr3 != null ">and mup.attr3 = #{attr3}</if>
|
|
|
|
|
<if test="attr4 != null ">and mup.attr4 = #{attr4}</if>
|
|
|
|
|
<if test="createBy != null">and mup.create_by = #{createBy}</if>
|
|
|
|
|
</where>
|
|
|
|
|
ORDER BY childprocess_code ASC
|
|
|
|
|
ORDER BY mup.childprocess_code ASC
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectMesUnitPriceByPicId" parameterType="String" resultMap="MesUnitPriceResult">
|
|
|
|
@ -70,6 +70,7 @@
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertMesUnitPrice" parameterType="MesUnitPrice">
|
|
|
|
|
insert into mes_unit_price
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|