Commit b026ff27 authored by maoying's avatar maoying

解决冲突

parents 70943b80 d4157401
......@@ -166,25 +166,37 @@
</if>
</select>
<select id="getAssoEquips" resultType="com.yeejoin.amos.fas.business.vo.AssoEquipsVo">
select DISTINCT
sto.id as equipmentId,
spe.code as equipmentCode,
det.name as equipmentName ,
fqe.name as importantEquipName ,
group_concat( concat( speind.equipment_index_name, '##', poin.state ) ) AS equipmentPointNames,
poin.important_equipment_id as importantEquipId,
fmea_id as fmeaId
from
f_fmea_equipment_point as poin
left join f_equipment as fqe on poin.important_equipment_id = fqe.id
left join wl_equipment_specific_index as speind on poin.equipment_point_id = speind.id
left join wl_equipment_specific as spe on speind.equipment_specific_id = spe.id
left join wl_stock_detail as sto on sto.qr_code = spe.qr_code
left join wl_equipment_detail as det on spe.equipment_detail_id = det.id
left join wl_equipment as equip on det.equipment_id = equip.id
SELECT
sto.id AS equipmentId,
spe.code AS equipmentCode,
det.name AS equipmentName,
fqe.name AS importantEquipName,
GROUP_CONCAT( speind.equipment_index_name, '##', poin.state ) AS equipmentPointNames,
poin.important_equipment_id AS importantEquipId,
fmea_id AS fmeaId
FROM
f_fmea_equipment_point poin
LEFT JOIN f_equipment AS fqe ON poin.important_equipment_id = fqe.id
LEFT JOIN wl_equipment_specific_index AS speind ON poin.equipment_point_id = speind.id
LEFT JOIN wl_equipment_specific AS spe ON speind.equipment_specific_id = spe.id
LEFT JOIN wl_stock_detail AS sto ON sto.qr_code = spe.qr_code
LEFT JOIN wl_equipment_detail AS det ON spe.equipment_detail_id = det.id
LEFT JOIN wl_equipment_index ei ON ei.id = speind.equipment_index_id
<where>
ei.type_code = 'BREAKDOWN'
<if test="fmeaId != null ">
where fmea_id = #{fmeaId}
AND fmea_id = #{fmeaId}
</if>
<if test="indexIds.size > 0">
AND ei.id IN
<foreach collection="indexIds" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
GROUP BY
poin.important_equipment_id,
fmeaId
limit #{pageNumber},#{pageSize}
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment