55 lines
2.4 KiB
XML
55 lines
2.4 KiB
XML
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||
|
|
<mapper namespace="com.securityControl.system.mapper.SysSelectedDao">
|
||
|
|
|
||
|
|
<select id="getOrgSelected" resultType="com.securityControl.system.domain.vo.SelectedEntity" parameterType="String">
|
||
|
|
select org_id code
|
||
|
|
<if test='code=="1"'>
|
||
|
|
,org_name name
|
||
|
|
</if>
|
||
|
|
<if test='code=="2"'>
|
||
|
|
,abb_name name
|
||
|
|
</if>
|
||
|
|
<if test='code=="3"'>
|
||
|
|
,city_name name
|
||
|
|
</if>
|
||
|
|
from sys_org
|
||
|
|
where is_active=1
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="getRoleSelected" resultType="com.securityControl.system.domain.vo.SelectedEntity" parameterType="String">
|
||
|
|
select id code,name
|
||
|
|
from sys_role where status=0
|
||
|
|
</select>
|
||
|
|
<select id="getMenuSelected" resultType="com.securityControl.system.domain.vo.SelectedEntity" parameterType="String">
|
||
|
|
select id code,menu_name name
|
||
|
|
from sys_menu where status=0 and types=#{types}
|
||
|
|
|
||
|
|
</select>
|
||
|
|
<!--设备下拉选-->
|
||
|
|
<select id="getDeviceTypeSelected" resultType="com.securityControl.system.domain.vo.SelectedEntity" parameterType="String">
|
||
|
|
select tbt2.id code,tbt2.type_name name
|
||
|
|
from t_ball_type tbt
|
||
|
|
left join t_ball_type tbt2 on tbt2.p_id=tbt.id AND tbt2.is_flag='0'
|
||
|
|
where tbt.p_id=0 and tbt2.id is not null and tbt.type_code='device_type' and tbt.is_flag='0'
|
||
|
|
</select>
|
||
|
|
<!--字典表数据下拉选-->
|
||
|
|
<select id="getDictSelected" resultType="com.securityControl.system.domain.vo.SelectedEntity" parameterType="String">
|
||
|
|
select sd2.code id,sd2.id code,sd2.name
|
||
|
|
from sys_dist sd
|
||
|
|
left join sys_dist sd2 on sd.id=sd2.p_id and sd2.is_flag='0'
|
||
|
|
where sd.p_id=0 and sd.code=#{code} and sd.is_flag=0
|
||
|
|
</select>
|
||
|
|
<!--工程/标段工程下拉选-->
|
||
|
|
<select id="getProSelected" resultType="com.securityControl.system.domain.vo.SelectedEntity">
|
||
|
|
<if test="param == 1">
|
||
|
|
SELECT DISTINCT single_project_code AS code,single_project_name AS name
|
||
|
|
FROM jj_single_info
|
||
|
|
</if>
|
||
|
|
<if test="param == 2">
|
||
|
|
SELECT DISTINCT bidding_section_code AS code,bidding_section_name AS name
|
||
|
|
FROM jj_bid_info
|
||
|
|
</if>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
</mapper>
|