Commit 66522a18 authored by litengwei's avatar litengwei

任务 15327

parent 1af5d25f
......@@ -13,4 +13,6 @@ import org.apache.ibatis.annotations.Param;
public interface WarehouseStructureMapper extends BaseMapper<WarehouseStructure> {
WarehouseStructure getMessageById(@Param("id")Long id);
WarehouseStructure getMessageByRiskId(@Param("id")Long id);
}
......@@ -227,7 +227,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
instanceInfo.setName(detail.getPlanName());
instanceInfo.setOrgCode(detail.getOrgCode());
WarehouseStructure warehouseStructure = warehouseStructureMapper.getMessageById(equipmentSpecific.getWarehouseStructureId());
WarehouseStructure warehouseStructure = warehouseStructureMapper.getMessageByRiskId(equipmentSpecific.getId());
if (warehouseStructure != null) {
instanceInfo.setPosition(warehouseStructure.getName());
}
......
......@@ -7,4 +7,12 @@
select * from wl_warehouse_structure where id = #{id}
</select>
<select id="getMessageByRiskId" resultType="com.yeejoin.amos.fas.dao.entity.WarehouseStructure">
select * from wl_warehouse_structure where id = (
SELECT risk_source_id from f_equipment where id = (
select equipment_id from f_equipment_fire_equipment where fire_equipment_id = #{id}
)
)
</select>
</mapper>
\ No newline at end of file
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