Commit da97a385 authored by zhengjiawei's avatar zhengjiawei

marger修复

parent 0adcd6e7
...@@ -85,54 +85,54 @@ ...@@ -85,54 +85,54 @@
</if> </if>
</select> </select>
<select id="getFireEquiments" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpeVo"> <select id="getFireEquiments" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpeVo">
select
sto.equipment_specific_id as id ,
equ.code as f_code,
det.name as f_name
from
wl_stock_detail as sto
left join wl_equipment_detail as det on sto.equipment_detail_id = det.id
left join wl_equipment as equ on det.equipment_id = equ.id
left join f_equipment_fire_equipment as fire on sto.equipment_specific_id = fire.fire_equipment_id
where sto.amount <![CDATA[>]]> 0
<if test="fname != null and fname!='null' ">
and det.name like CONCAT('%',#{fname},'%' )
</if>
<if test="equipmentId != null and equipmentId!='null' ">
and fire.equipment_id = #{equipmentId}
</if>
</select>
<select id="getBindEquipment" resultType="com.yeejoin.amos.fas.business.vo.EquipmentPointVo">
select
speind.id,
equindex.name,
(
select select
sto.id as id , case when count(1) > 0 then 'bound' else 'noBound' end
equ.code as f_code,
det.name as f_name
from from
wl_stock_detail as sto f_fmea_equipment_point as d
left join wl_equipment_detail as det on sto.equipment_detail_id = det.id where
left join wl_equipment as equ on det.equipment_id = equ.id d.equipment_point_id = speind.id
left join f_equipment_fire_equipment as fire on sto.id = fire.fire_equipment_id and
where sto.amount <![CDATA[>]]> 0 d.fmea_id = #{fmeaId}
<if test="fname != null and fname!='null' "> and
and det.name like CONCAT('%',#{fname},'%' ) d.important_equipment_id = #{importantEquipId} ) isBound
from
f_equipment_fire_equipment as fire
left join wl_stock_detail as sto on fire.fire_equipment_id = sto.equipment_specific_id
left join wl_equipment_specific as spe on sto.qr_code = spe.qr_code
left join wl_equipment_specific_index as speind on sto.equipment_specific_id = speind.equipment_specific_id
left join wl_equipment_index as equindex on speind.equipment_index_id = equindex.id
where equindex.type_code ='BREAKDOWN'
<if test="importantEquipId != null ">
and fire.equipment_id = #{importantEquipId}
</if> </if>
<if test="equipmentId != null and equipmentId!='null' "> <if test="equimentId != null ">
and fire.equipment_id = #{equipmentId} and fire.fire_equipment_id =#{equimentId}
</if>
<if test="equipmentPointName != null and equipmentPointName!='null' ">
and equindex.name like CONCAT('%',#{equipmentPointName},'%' )
</if> </if>
</select>
<select id="getBindEquipment" resultType="com.yeejoin.amos.fas.business.vo.EquipmentPointVo">
select
speind.id,
equindex.name,
(
select
case when count(1) > 0 then 'bound' else 'noBound' end
from
f_fmea_equipment_point as d
where
d.equipment_point_id = speind.id
and
d.fmea_id = #{fmeaId}
and
d.important_equipment_id = #{importantEquipId} ) isBound
from
f_equipment_fire_equipment as fire
left join wl_stock_detail as sto on fire.fire_equipment_id = sto.id
left join wl_equipment_specific as spe on sto.qr_code = spe.qr_code
left join wl_equipment_specific_index as speind on spe.id = speind.equipment_specific_id
left join wl_equipment_index as equindex on speind.equipment_index_id = equindex.id
where equindex.type_code ='BREAKDOWN'
<if test="importantEquipId != null ">
and fire.equipment_id = #{importantEquipId}
</if>
<if test="equimentId != null ">
and fire.fire_equipment_id =#{equimentId}
</if>
<if test="equipmentPointName != null and equipmentPointName!='null' ">
and equindex.name like CONCAT('%',#{equipmentPointName},'%' )
</if>
</select> </select>
<select id="getAssoEquips" resultType="com.yeejoin.amos.fas.business.vo.AssoEquipsVo"> <select id="getAssoEquips" resultType="com.yeejoin.amos.fas.business.vo.AssoEquipsVo">
select 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