|
|
|
@ -75,16 +75,19 @@
|
|
|
|
|
|
|
|
|
|
<select id="getUserMaterialListUndo" resultType="com.op.quality.domain.QcUserMaterial">
|
|
|
|
|
select
|
|
|
|
|
bp.product_code materialCode,
|
|
|
|
|
concat(bp.product_desc_zh,'(',bp.product_code,')') label,
|
|
|
|
|
concat(bp.product_desc_zh,'(',bp.product_code,')') materialName,
|
|
|
|
|
bp.product_id materialId
|
|
|
|
|
from base_product bp
|
|
|
|
|
where bp.active_flag = '1' and bp.del_flag = '0'
|
|
|
|
|
and bp.product_code not in (
|
|
|
|
|
bp.equipment_code materialCode,
|
|
|
|
|
concat(bp.equipment_name,'(',bp.equipment_code,')') label,
|
|
|
|
|
concat(bp.equipment_name,'(',bp.equipment_code,')') materialName,
|
|
|
|
|
bp.equipment_id materialId
|
|
|
|
|
from base_equipment bp
|
|
|
|
|
where bp.status = '1' and bp.del_flag = '0' and bp.equipment_type_code = 'equ_type_bzx'
|
|
|
|
|
and bp.equipment_code not in (
|
|
|
|
|
select um.material_code
|
|
|
|
|
from qc_user_material um
|
|
|
|
|
where um.user_code =#{userCode}
|
|
|
|
|
where um.user_code in
|
|
|
|
|
<foreach collection="userCodes" item="userCode" open="(" close=")" separator=",">
|
|
|
|
|
#{userCode}
|
|
|
|
|
</foreach>
|
|
|
|
|
)
|
|
|
|
|
<if test="materialName != null and materialName != ''">and bp.product_desc_zh like concat('%', #{materialName},
|
|
|
|
|
'%')
|
|
|
|
@ -93,11 +96,14 @@
|
|
|
|
|
|
|
|
|
|
<select id="getUserMaterialListDo" resultType="com.op.quality.domain.QcUserMaterial">
|
|
|
|
|
select distinct um.material_code materialCode,
|
|
|
|
|
concat(bp.product_desc_zh,'(',bp.product_code,')') label
|
|
|
|
|
concat(bp.equipment_name,'(',bp.equipment_code,')') label
|
|
|
|
|
from qc_user_material um
|
|
|
|
|
left join base_product bp on um.material_code = bp.product_code
|
|
|
|
|
where um.user_code = #{userCode}
|
|
|
|
|
<if test="materialName != null and materialName != ''">and bp.product_desc_zh like concat('%', #{materialName},
|
|
|
|
|
left join base_equipment bp on um.material_code = bp.equipment_code
|
|
|
|
|
where bp.equipment_type_code = 'equ_type_bzx' and um.user_code in
|
|
|
|
|
<foreach collection="userCodes" item="userCode" open="(" close=")" separator=",">
|
|
|
|
|
#{userCode}
|
|
|
|
|
</foreach>
|
|
|
|
|
<if test="materialName != null and materialName != ''">and bp.equipment_name like concat('%', #{materialName},
|
|
|
|
|
'%')
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|