qa-prevention-gwj/src/main/resources/mybatis/dsno2/map/MeteorologicalMapper.xml

522 lines
18 KiB
XML
Raw Normal View History

2024-01-02 14:12:40 +08:00
<?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.zcloud.mapper.dsno2.map.MeteorologicalMapper">
<!--表名 -->
<sql id="tableName">
BUS_METEOROLOGICAL
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.OUTSOURCED_ID,
f.CORPINFO_ID,
f.EQUIPMENTNAME,
f.EQUIPMENTTYPE,
f.OPDATE,
f.OPUSER,
f.ISDELETE,
f.CODE,
f.PLATFORMMETEOROLOGICAL_ID,
f.METEOROLOGICAL_ID,
f.LATITUDE,
f.LONGITUDE,
f.TYPE
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
OUTSOURCED_ID,
CORPINFO_ID,
EQUIPMENTNAME,
EQUIPMENTTYPE,
OPDATE,
OPUSER,
ISDELETE,
CODE,
PLATFORMMETEOROLOGICAL_ID,
METEOROLOGICAL_ID,
LATITUDE,
LONGITUDE,
TYPE
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{OUTSOURCED_ID},
#{CORPINFO_ID},
#{EQUIPMENTNAME},
#{EQUIPMENTTYPE},
#{OPDATE},
#{OPUSER},
#{ISDELETE},
#{CODE},
#{PLATFORMMETEOROLOGICAL_ID},
#{METEOROLOGICAL_ID},
#{LATITUDE},
#{LONGITUDE},
#{TYPE}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
METEOROLOGICAL_ID = #{METEOROLOGICAL_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
<if test="OUTSOURCED_ID != null and OUTSOURCED_ID != ''"><!-- 关键词检索 -->
OUTSOURCED_ID = #{OUTSOURCED_ID},
</if>
<if test="EQUIPMENTNAME != null and EQUIPMENTNAME != ''"><!-- 关键词检索 -->
EQUIPMENTNAME = #{EQUIPMENTNAME},
</if>
<if test="EQUIPMENTTYPE != null and EQUIPMENTTYPE != ''"><!-- 关键词检索 -->
EQUIPMENTTYPE = #{EQUIPMENTTYPE},
</if>
<if test="CODE != null and CODE != ''"><!-- 关键词检索 -->
CODE = #{CODE},
</if>
<if test="TYPE != null and TYPE != ''"><!-- 关键词检索 -->
TYPE = #{TYPE},
</if>
METEOROLOGICAL_ID = METEOROLOGICAL_ID
where
METEOROLOGICAL_ID = #{METEOROLOGICAL_ID}
</update>
<!-- 定位 -->
<update id="savePosition" parameterType="pd">
update
<include refid="tableName"></include>
set
LATITUDE = #{LATITUDE},
LONGITUDE = #{LONGITUDE}
where
METEOROLOGICAL_ID = #{METEOROLOGICAL_ID}
</update>
<update id="editIsShowBycorpinfoid" parameterType="pd">
update
<include refid="tableName"></include>
set CODE= #{CODE}
where
OUTSOURCED_ID = #{OUTSOURCED_ID}
</update>
<update id="editIsShow" parameterType="pd">
update
<include refid="tableName"></include>
set CODE= #{CODE}
where
METEOROLOGICAL_ID = #{METEOROLOGICAL_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.METEOROLOGICAL_ID = #{METEOROLOGICAL_ID} and
f.ISDELETE = '0'
<if test="OUTSOURCED_ID != null and OUTSOURCED_ID != ''"><!-- 关键词检索 -->
and f.OUTSOURCED_ID=#{OUTSOURCED_ID}
</if>
<if test="CODE != null and CODE != ''"><!-- 关键词检索 -->
and f.CODE=#{CODE}
</if>
</select>
<!-- 通过CODE获取数据 -->
<select id="findByCode" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.CODE=#{CODE}
</select>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>,
pv.INDEXCODE,
d.NAME as EQUIPMENTTYPE_NAME
from
<include refid="tableName"></include> f
left join bus_platformmeteorological pv on pv.PLATFORMMETEOROLOGICAL_ID = f.PLATFORMMETEOROLOGICAL_ID
left join `qa-gwj-prevention`.sys_dictionaries d on d.DICTIONARIES_ID = f.EQUIPMENTTYPE
where f.ISDELETE = '0'
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
and f.CORPINFO_ID=#{pd.CORPINFO_ID}
</if>
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and
(
f.EQUIPMENTNAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
)
</if>
</select>
<select id="listbyTypeLocation" parameterType="pd" resultType="pd">
select
f.CORPINFO_ID,
f.EQUIPMENTNAME as NAME,
f.EQUIPMENTTYPE,
f.OPDATE,
f.OPUSER,
f.ISDELETE,
f.CODE,
f.METEOROLOGICAL_ID as id,
f.LATITUDE,
f.LONGITUDE,
f.TYPE,
d.NAME as EQUIPMENTTYPE_NAME
from
<include refid="tableName"></include> f
left join `qa-gwj-prevention`.sys_dictionaries d on d.DICTIONARIES_ID = f.EQUIPMENTTYPE
left join `qa-gwj-prevention`.bus_corp_info a on a.CORPINFO_ID = f.CORPINFO_ID
where f.ISDELETE = '0' and f.LATITUDE is not null and f.LONGITUDE is not null
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
and f.CORPINFO_ID=#{CORPINFO_ID}
</if>
<if test="AREA != null and AREA != ''">
and a.AREA = #{AREA}
</if>
<if test="TYPE != null and TYPE != ''"><!-- 关键词检索 -->
and f.EQUIPMENTTYPE=#{TYPE}
</if>
</select>
<select id="listbyType" parameterType="page" resultType="pd">
select
f.CORPINFO_ID,
f.EQUIPMENTNAME as NAME,
f.EQUIPMENTTYPE as TYPE,
f.OPDATE,
f.OPUSER,
f.ISDELETE,
f.CODE,
f.METEOROLOGICAL_ID as id,
f.LATITUDE,
f.LONGITUDE,
f.TYPE as isshow,
d.NAME as EQUIPMENTTYPE_NAME
from
<include refid="tableName"></include> f
left join `qa-gwj-prevention`.sys_dictionaries d on d.DICTIONARIES_ID = f.EQUIPMENTTYPE
left join `qa-gwj-prevention`.bus_corp_info a on a.CORPINFO_ID = f.CORPINFO_ID
where f.ISDELETE = '0' and f.LATITUDE is not null and f.LONGITUDE is not null
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
and f.CORPINFO_ID=#{pd.CORPINFO_ID}
</if>
<if test="pd.ids!= null and pd.ids.size()>0">
AND f.CORPINFO_ID IN
<foreach item="item" index="index" collection="pd.ids" open="(" separator="," close=")">
#{pd.ids[${index}]}
</foreach>
</if>
<if test="pd.AREA != null and pd.AREA != ''">
and a.AREA = #{pd.AREA}
</if>
<if test="pd.TYPE != null and pd.TYPE != ''"><!-- 关键词检索 -->
and f.EQUIPMENTTYPE=#{pd.TYPE}
</if>
</select>
<!-- 列表 -->
<select id="listbyequipmentcount" parameterType="pd" resultType="pd">
SELECT
sum(case f.TYPE when 1 then 1 end ) as onlinecount,
sum(case f.TYPE when 2 then 1 end ) as offlinecount
FROM
BUS_METEOROLOGICAL f
left join `qa-gwj-prevention`.bus_corp_info a on a.CORPINFO_ID = f.CORPINFO_ID
where f.ISDELETE = '0' and f.LATITUDE is not null and f.LONGITUDE is not null
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
and f.CORPINFO_ID=#{CORPINFO_ID}
</if>
<if test="ids!= null and ids.size()>0">
AND f.CORPINFO_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{ids[${index}]}
</foreach>
</if>
<if test="AREA != null and AREA != ''">
and a.AREA = #{AREA}
</if>
</select>
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="OUTSOURCED_ID != null and OUTSOURCED_ID != ''"><!-- 关键词检索 -->
and f.CORPINFO_ID=#{CORPINFO_ID}
</if>
<if test="CODE != null and CODE != ''"><!-- 关键词检索 -->
and f.CODE=#{CODE}
</if>
</select>
<!-- 列表 -->
<select id="listByEquipmentdatalistPage" parameterType="page" resultType="pd">
select
sub.BIANMA,
sub.DICTIONARIES_ID,
f.*,
state.name as CORP_STATE_NAME,
d.NAME as REPORT_CYCLE_NAME,prvince.name as prvinceName,city.name as cityName ,country.name as countryName ,village.name as villageName,sd.NAME as INDUSTRY_NAME,
type.name as CORP_OF_TYPE_VAL ,type2.name as CORP_OF_TYPE2_VAL , corpState.name as corpStateName, sub.name as sub_VAL,COUNT(su.USER_ID) count,
(select u.STATUS from `qa-gwj-prevention`.sys_user u where u.CORPINFO_ID = f.CORPINFO_ID and u.ISMAIN = '1' ) AS STATUS,
(select count(1) from `qa-gwj-regulatory`.BUS_METEOROLOGICAL m where m.CORPINFO_ID = f.CORPINFO_ID and m.ISDELETE = '0') as EQUIPMENT_COUNT
from `qa-gwj-prevention`.bus_corp_info f
left join `qa-gwj-prevention`.sys_dictionaries d on d.DICTIONARIES_ID = f.REPORT_CYCLE
left join `qa-gwj-regulatory`.BUS_CORPTYPE type on type.CORPTYPE_ID = f.CORP_OF_TYPE
left join `qa-gwj-regulatory`.BUS_CORPTYPE type2 on type2.CORPTYPE_ID = f.CORP_OF_TYPE2
LEFT JOIN `qa-gwj-prevention`.sys_dictionaries prvince ON prvince.BIANMA = f.PROVINCE
left join `qa-gwj-prevention`.sys_dictionaries city on city.BIANMA = f.CITY
left join `qa-gwj-prevention`.sys_dictionaries country on country.BIANMA = f.COUNTRY
left join `qa-gwj-prevention`.sys_dictionaries village on village.BIANMA = f.VILLAGE
left join `qa-gwj-prevention`.sys_dictionaries corpState on corpState.BIANMA = f.CORP_STATE
left join `qa-gwj-prevention`.sys_dictionaries sub on sub.BIANMA = f.SUBORDINATION
LEFT JOIN `qa-gwj-prevention`.sys_dictionaries sd ON sd.DICTIONARIES_ID = f.INDUSTRY
left join `qa-gwj-prevention`.sys_dictionaries state on state.BIANMA = f.CORP_STATE
LEFT JOIN `qa-gwj-prevention`.sys_user su on su.CORPINFO_ID = f.CORPINFO_ID and su.isdelete = '0'
where 1=1 and f.ISDELETE ='0'
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 企业名称搜索-->
and ( f.CORP_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') )
</if>
<if test="pd.KEYQYLX != null and pd.KEYQYLX != ''"><!-- 请选企业类型 -->
and ( f.INDUSTRY = #{pd.KEYQYLX})
</if>
<if test="pd.KEYLS != null and pd.KEYLS != ''"><!-- 隶属关系 -->
and ( sub.DICTIONARIES_ID = #{pd.KEYLS})<!-- 因为前台传的参数是id所以将搜索条件改成id的搜索 -->
</if>
<if test="pd.ISUSE != null and pd.ISUSE != ''"><!-- 企业状态 -->
and ( f.ISUSE = #{pd.ISUSE} )
</if>
<!-- <if test="pd.KEYLS != null and pd.KEYLS != ''">&lt;!&ndash; 请选隶属关系 &ndash;&gt;-->
<!-- and ( f.SUBORDINATION LIKE CONCAT(CONCAT('%', #{pd.KEYLS}),'%') )-->
<!-- </if>-->
<if test="pd.CORP_NAME != null and pd.CORP_NAME != ''"><!-- 请选隶属关系 -->
and ( f.CORP_NAME LIKE CONCAT(CONCAT('%', #{pd.CORP_NAME}),'%') )
</if>
<if test="pd.KEYQYZT != null and pd.KEYQYZT != ''"><!-- 请选择企业状态 -->
and ( f.CORP_STATE = #{pd.KEYQYZT} )
</if>
<if test="pd.KEYSFQR != null and pd.KEYSFQR != ''"><!-- 请选择企业状态 -->
and ( f.CORP_CONFIRM = #{pd.KEYSFQR} )
</if>
<if test="pd.KEYCOUNTRY != null and pd.KEYCOUNTRY != ''"><!-- 请选择企业状态 -->
and ( f.PROVINCE = #{pd.KEYCOUNTRY} )
</if>
<if test="pd.STARTTIME != null and pd.STARTTIME != ''"><!-- 请选择企业状态 -->
and f.CREATTIME <![CDATA[ >= ]]> #{pd.STARTTIME}
</if>
<if test="pd.ENDTIME != null and pd.ENDTIME != ''"><!-- 请选择企业状态 -->
and f.CREATTIME <![CDATA[ <= ]]> #{pd.ENDTIME}
</if>
<if test="pd.ADDRESS != null and pd.ADDRESS != ''"><!-- 企事业单位注册地址 -->
and ( f.ADDRESS LIKE CONCAT(CONCAT('%', #{pd.ADDRESS}),'%') )
</if>
<if test="pd.ADDRESS_OFFICE != null and pd.ADDRESS_OFFICE != ''"><!-- 企事业单位办公地址 -->
and ( f.ADDRESS_OFFICE LIKE CONCAT(CONCAT('%', #{pd.ADDRESS_OFFICE}),'%') )
</if>
<if test="pd.ADDRESS_BUSINESS != null and pd.ADDRESS_BUSINESS != ''"><!-- 企事业单位经营地址 -->
and ( f.ADDRESS_BUSINESS LIKE CONCAT(CONCAT('%', #{pd.ADDRESS_BUSINESS}),'%') )
</if>
<if test="pd.CODE != null and pd.CODE != ''"><!-- 统一社会信用代码 -->
and ( f.CODE LIKE CONCAT(CONCAT('%', #{pd.CODE}),'%') )
</if>
<if test="pd.CORP_STATE != null and pd.CORP_STATE != ''"><!-- 企业状态 -->
and ( f.CORP_STATE = #{pd.CORP_STATE} )
</if>
<if test="pd.ECO_TYPE != null and pd.ECO_TYPE != ''"><!-- 企业经济类型 -->
and ( f.ECO_TYPE = #{pd.ECO_TYPE} )
</if>
<if test="pd.CREATE_DATE != null and pd.CREATE_DATE != ''"><!-- 成立日期 -->
and ( f.CREATE_DATE = #{pd.CREATE_DATE} )
</if>
<if test="pd.REGCAPITAL != null and pd.REGCAPITAL != ''"><!-- 注册资金 -->
and ( f.REGCAPITAL = #{pd.REGCAPITAL} )
</if>
<if test="pd.FIXED_ASSETS != null and pd.FIXED_ASSETS != ''"><!-- 固定资产 -->
and ( f.FIXED_ASSETS = #{pd.FIXED_ASSETS} )
</if>
<if test="pd.ANNUALPROFIT != null and pd.ANNUALPROFIT != ''"><!-- 年利润 -->
and ( f.ANNUALPROFIT = #{pd.ANNUALPROFIT} )
</if>
<if test="pd.YEAR_OUTPUT_VALUE != null and pd.YEAR_OUTPUT_VALUE != ''"><!-- 年产值 -->
and ( f.YEAR_OUTPUT_VALUE = #{pd.YEAR_OUTPUT_VALUE} )
</if>
<if test="pd.REG_TYPE != null and pd.REG_TYPE != ''"><!-- 单位注册登记类型 -->
and ( f.REG_TYPE = #{pd.REG_TYPE} )
</if>
<if test="pd.SUBORDINATION != null and pd.SUBORDINATION != ''"><!-- 隶属关系 -->
and ( f.SUBORDINATION = #{pd.SUBORDINATION} )
</if>
<if test="pd.CORP_OF_TYPE != null and pd.CORP_OF_TYPE != ''"><!-- 企业类型 -->
and ( f.CORP_OF_TYPE = #{pd.CORP_OF_TYPE} )
</if>
<if test="pd.CORP_OF_TYPE2 != null and pd.CORP_OF_TYPE2 != ''"><!-- 企业类型 -->
and ( f.CORP_OF_TYPE2 = #{pd.CORP_OF_TYPE2} )
</if>
<if test="pd.INDUSTRY_DEPARTMENT != null and pd.INDUSTRY_DEPARTMENT != ''"><!-- 行业监管部门 -->
and ( f.INDUSTRY_DEPARTMENT = #{pd.INDUSTRY_DEPARTMENT} )
</if>
<if test="pd.SCALE != null and pd.SCALE != ''"><!-- 企业规模 -->
and ( f.SCALE = #{pd.SCALE} )
</if>
<if test="pd.SCALE_TYPE != null and pd.SCALE_TYPE != ''"><!-- 是否规模以上 -->
and ( f.SCALE_TYPE = #{pd.SCALE_TYPE} )
</if>
<!-- <if test="pd.LONGITUDE != null and pd.LONGITUDE != ''">&lt;!&ndash; 经度 &ndash;&gt;-->
<!-- and ( f.LONGITUDE = #{pd.LONGITUDE} )-->
<!-- </if>-->
<!-- <if test="pd.LATITUDE != null and pd.LATITUDE != ''">&lt;!&ndash; 纬度 &ndash;&gt;-->
<!-- and ( f.LATITUDE = #{pd.LATITUDE} )-->
<!-- </if>-->
<if test="pd.LR_NAME != null and pd.LR_NAME != ''"><!-- 法定代表人信息 姓名 -->
and ( f.LR_NAME LIKE CONCAT(CONCAT('%', #{pd.LR_NAME}),'%') )
</if>
<if test="pd.LR_PHONE != null and pd.LR_PHONE != ''"><!-- 法定代表人信息 手机号码 -->
and ( f.LR_PHONE LIKE CONCAT(CONCAT('%', #{pd.LR_PHONE}),'%') )
</if>
<if test="pd.CONTACTS != null and pd.CONTACTS != ''"><!-- 主要负责人信息 姓名 -->
and ( f.CONTACTS LIKE CONCAT(CONCAT('%', #{pd.CONTACTS}),'%') )
</if>
<if test="pd.CONTACTS_PHONE != null and pd.CONTACTS_PHONE != ''"><!-- 主要负责人信息 手机号码 -->
and ( f.CONTACTS_PHONE LIKE CONCAT(CONCAT('%', #{pd.CONTACTS_PHONE}),'%') )
</if>
<if test="pd.SAFETY_NAME != null and pd.SAFETY_NAME != ''"><!-- 安全负责人信息 姓名 -->
and ( f.SAFETY_NAME LIKE CONCAT(CONCAT('%', #{pd.SAFETY_NAME}),'%') )
</if>
<if test="pd.SAFETY_POST != null and pd.SAFETY_POST != ''"><!-- 安全负责人信息 职务 -->
and ( f.SAFETY_POST LIKE CONCAT(CONCAT('%', #{pd.SAFETY_POST}),'%') )
</if>
<if test="pd.SAFETY_BACKGROUND != null and pd.SAFETY_BACKGROUND != ''"><!-- 安全负责人信息 学历 -->
and ( f.SAFETY_BACKGROUND LIKE CONCAT(CONCAT('%', #{pd.SAFETY_BACKGROUND}),'%') )
</if>
<if test="pd.SAFETY_MAJOR != null and pd.SAFETY_MAJOR != ''"><!-- 安全负责人信息 专业 -->
and ( f.SAFETY_MAJOR LIKE CONCAT(CONCAT('%', #{pd.SAFETY_MAJOR}),'%') )
</if>
<if test="pd.SAFETY_NUMBER != null and pd.SAFETY_NUMBER != ''"><!-- 安全负责人信息 单位电话 -->
and ( f.SAFETY_NUMBER LIKE CONCAT(CONCAT('%', #{pd.SAFETY_NUMBER}),'%') )
</if>
<if test="pd.SAFETY_PHONE != null and pd.SAFETY_PHONE != ''"><!-- 安全负责人信息 手机号码 -->
and ( f.SAFETY_PHONE LIKE CONCAT(CONCAT('%', #{pd.SAFETY_PHONE}),'%') )
</if>
<if test="pd.SAFETY_TECHNICAL != null and pd.SAFETY_TECHNICAL != ''"><!-- 安全负责人信息 技术职称 -->
and ( f.SAFETY_TECHNICAL LIKE CONCAT(CONCAT('%', #{pd.SAFETY_TECHNICAL}),'%') )
</if>
<if test="pd.CORP_ATTRIBUTE != null and pd.CORP_ATTRIBUTE != ''"><!-- 企业相关属性 -->
and ( f.CORP_ATTRIBUTE LIKE CONCAT(CONCAT('%', #{pd.CORP_ATTRIBUTE}),'%') )
</if>
<if test="pd.GAS_CORP != null and pd.GAS_CORP != ''"><!-- 企业相关属性 -->
and F.CORPINFO_ID not in (select gas.CORPINFO_ID from `qa-gwj-regulatory`.BUS_GASREPORTCORP gas)
</if>
<if test="pd.PROVINCE != null and pd.PROVINCE != ''">
and f.PROVINCE = #{pd.PROVINCE}
</if>
<if test="pd.CITY != null and pd.CITY != ''">
and f.CITY = #{pd.CITY}
</if>
<if test="pd.COUNTRY != null and pd.COUNTRY != ''">
and f.COUNTRY = #{pd.COUNTRY}
</if>
<if test="pd.VILLAGE != null and pd.VILLAGE != ''">
and f.VILLAGE = #{pd.VILLAGE}
</if>
GROUP BY f.CORPINFO_ID
ORDER BY (f.COR_ORDER+0) asc
</select>
<!-- 列表(全部) -->
<select id="listBo" parameterType="pd" resultType="pd">
select
f.EQUIPMENTNAME,
f.OPDATE,
f.OPUSER,
f.ISDELETE,
f.METEOROLOGICAL_ID,
f.TYPE,
f.EQUIPMENTTYPE GBSFENCEURL,
pv.INDEXCODE
from
<include refid="tableName"></include> f
left join BUS_PLATFORMELECTRONIC pv on pv.PLATFORMMETEOROLOGICAL_ID = f.PLATFORMMETEOROLOGICAL_ID
where f.ISDELETE = '0'
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
and f.CORPINFO_ID=#{CORPINFO_ID}
</if>
<if test="ArrayDATA_IDS != null and ArrayDATA_IDS != ''"><!-- 关键词检索 -->
and METEOROLOGICAL_ID in
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
<!-- 批量删除 -->
<delete id="deleteAll" parameterType="String">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
METEOROLOGICAL_ID in
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 列表(全部) -->
<select id="listAllForMap" parameterType="pd" resultType="pd">
select
f.*
from
<include refid="tableName"></include> f
where f.ISDELETE = '0' and f.LATITUDE is not null and f.LONGITUDE is not null
</select>
<!-- 消防点位已定位 -->
<select id="getPointsInfo" parameterType="pd" resultType="pd">
select
f.*
from
<include refid="tableName"></include> f
where f.ISDELETE = '0' and f.LATITUDE is not null and f.LONGITUDE is not null
</select>
</mapper>