Commit 8425b7c9 authored by maoying's avatar maoying

Merge branch 'dev_upgrade' of 172.16.10.76:station/YeeAmosFireAutoSysRoot into upgrade

parents bc36d2dd c5fb067f
...@@ -554,18 +554,37 @@ ...@@ -554,18 +554,37 @@
ALTER TABLE `f_station_info` ADD COLUMN `safety_user_phone_num` varchar(20) NULL COMMENT '安全负责人联系方式'; ALTER TABLE `f_station_info` ADD COLUMN `safety_user_phone_num` varchar(20) NULL COMMENT '安全负责人联系方式';
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="zjw" id="16062323232111"> <changeSet author="keyong" id="1608279637-1">
<preConditions onFail="MARK_RAN"> <preConditions onFail="MARK_RAN">
<not> <not>
<columnExists tableName="f_station_info" columnName="safety_user_phone_num" /> <columnExists tableName="f_station_info" columnName="fire_captain_name" />
</not> </not>
</preConditions> </preConditions>
<comment>修改f_station_info表结构</comment> <comment>修改f_station_info表结构</comment>
<sql> <sql>
ALTER TABLE `f_station_info` ADD COLUMN `fire_captain_name` varchar(20) NULL COMMENT '驻站消防队队长姓名'; ALTER TABLE `f_station_info` ADD COLUMN `fire_captain_name` varchar(20) NULL COMMENT '驻站消防队队长姓名';
</sql>
</changeSet>
<changeSet author="keyong" id="1608279637-2">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_station_info" columnName="fire_captain_phone_num" />
</not>
</preConditions>
<comment>修改f_station_info表结构</comment>
<sql>
ALTER TABLE `f_station_info` ADD COLUMN `fire_captain_phone_num` varchar(20) NULL COMMENT '驻站消防队队长电话'; ALTER TABLE `f_station_info` ADD COLUMN `fire_captain_phone_num` varchar(20) NULL COMMENT '驻站消防队队长电话';
</sql>
</changeSet>
<changeSet author="keyong" id="1608279637-3">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_station_info" columnName="fire_captain_user_id" />
</not>
</preConditions>
<comment>修改f_station_info表结构</comment>
<sql>
ALTER TABLE `f_station_info` ADD COLUMN `fire_captain_user_id` varchar(20) NULL COMMENT '驻站消防队队长'; ALTER TABLE `f_station_info` ADD COLUMN `fire_captain_user_id` varchar(20) NULL COMMENT '驻站消防队队长';
</sql> </sql>
</changeSet> </changeSet>
</databaseChangeLog> </databaseChangeLog>
\ No newline at end of file
...@@ -136,6 +136,7 @@ ...@@ -136,6 +136,7 @@
wl_equipment_specific_index ind wl_equipment_specific_index ind
left join wl_equipment_specific as spe on spe.id = ind.equipment_specific_id left join wl_equipment_specific as spe on spe.id = ind.equipment_specific_id
left join wl_equipment_detail as det on spe.equipment_detail_id = det.id left join wl_equipment_detail as det on spe.equipment_detail_id = det.id
WHERE 1=1 AND ind.value IS NOT NULL
) d ) d
WHERE WHERE
1 = 1 1 = 1
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
order by rs.id desc order by rs.id desc
<choose> <choose>
<when test="pageSize==-1"></when> <when test="pageSize==-1"></when>
<when test="pageSize!=-1">limit #{offset},#{pageSize}</when> <when test="pageSize!=-1">limit #{offset},#{pageSize}</when>
</choose> </choose>
</select> </select>
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
GROUP BY GROUP BY
ff1.risk_source_id; ff1.risk_source_id;
</select> </select>
<resultMap id="riskSourceMap" type="com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse"> <resultMap id="riskSourceMap" type="com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="parentId" column="parent_id" /> <result property="parentId" column="parent_id" />
...@@ -191,7 +191,7 @@ ...@@ -191,7 +191,7 @@
<result property="omission" column="omission" /> <result property="omission" column="omission" />
<result property="unplan" column="unplan" /> <result property="unplan" column="unplan" />
</resultMap> </resultMap>
<select id="getRiskSources" resultMap="riskSourceMap"> <select id="getRiskSources" resultMap="riskSourceMap">
SELECT SELECT
rs.id, rs.id,
...@@ -213,9 +213,9 @@ ...@@ -213,9 +213,9 @@
where rs.org_code = #{compCode} where rs.org_code = #{compCode}
ORDER BY rs.sort_num,rs.id ASC ORDER BY rs.sort_num,rs.id ASC
</select> </select>
<select id="getRiskSourcesEquipment" resultMap="riskSourceMap"> <select id="getRiskSourcesEquipment" resultMap="riskSourceMap">
SELECT SELECT
sum(a.cc) ccount, sum(a.cc) ccount,
a.`name`, a.`name`,
...@@ -240,10 +240,10 @@ ...@@ -240,10 +240,10 @@
a.`name`, a.`name`,
a.position3d, a.position3d,
a.parent_id, a.parent_id,
a.id a.id
</select> </select>
<select id="getCheckPointRiskSource" resultMap="riskSourceMap"> <select id="getCheckPointRiskSource" resultMap="riskSourceMap">
SELECT SELECT
sum(a.cc) ccount, sum(a.cc) ccount,
...@@ -280,9 +280,9 @@ ...@@ -280,9 +280,9 @@
a.parent_id, a.parent_id,
a.id a.id
</select> </select>
<select id="getRiskSourcesFireEquipmentByType" resultMap="riskSourceMap"> <select id="getRiskSourcesFireEquipmentByType" resultMap="riskSourceMap">
SELECT SELECT
sum(a.cc) ccount, sum(a.cc) ccount,
...@@ -338,13 +338,13 @@ ...@@ -338,13 +338,13 @@
FROM FROM
`f_risk_source_point_inputitem` rspi `f_risk_source_point_inputitem` rspi
LEFT JOIN p_point pp ON pp.id = rspi.point_id LEFT JOIN p_point pp ON pp.id = rspi.point_id
LEFT JOIN p_input_item pii ON pii.id = rspi.point_inputitem_id LEFT JOIN p_input_item pii ON pii.id = rspi.point_inputitem_id
WHERE pii.`name` is not NULL WHERE pii.`name` is not NULL
AND rspi.risk_source_id = #{riskSourceId} AND rspi.risk_source_id = #{riskSourceId}
GROUP BY riskId,pointId,pointNo,pointName,depName,username,telephone GROUP BY riskId,pointId,pointNo,pointName,depName,username,telephone
<choose> <choose>
<when test="pageSize==-1"></when> <when test="pageSize==-1"></when>
<when test="pageSize!=-1">limit #{offset},#{pageSize}</when> <when test="pageSize!=-1">limit #{offset},#{pageSize}</when>
</choose> </choose>
</select> </select>
...@@ -540,7 +540,7 @@ ...@@ -540,7 +540,7 @@
</select> </select>
<select id="queryForUnqualified" resultType="map"> <select id="queryForUnqualified" resultType="map">
SELECT SELECT
( (
SELECT SELECT
...@@ -564,11 +564,11 @@ ...@@ -564,11 +564,11 @@
LEFT JOIN f_fmea fm ON fm.id = pi.fmea_id LEFT JOIN f_fmea fm ON fm.id = pi.fmea_id
WHERE WHERE
pi.`state` = 1 pi.`state` = 1
AND fm.risk_source_id = #{riskSourceId}; AND fm.risk_source_id = #{riskSourceId};
</select> </select>
<select id="queryForFmeaEquipAlarm" resultType="map"> <select id="queryForFmeaEquipAlarm" resultType="map">
SELECT SELECT
ed.`name` as 'fireEquipmentName', ed.`name` as 'fireEquipmentName',
ei.`name` as 'name' ei.`name` as 'name'
...@@ -584,15 +584,15 @@ ...@@ -584,15 +584,15 @@
AND fm.risk_source_id = #{riskSourceId} AND fm.risk_source_id = #{riskSourceId}
GROUP BY fireEquipmentName,name GROUP BY fireEquipmentName,name
</select> </select>
<select id="queryRiskAreaRpn" resultType="java.util.HashMap"> <select id="queryRiskAreaRpn" resultType="java.util.HashMap">
SELECT SELECT
rs.id, rs.id,
rs.name, rs.name,
rs.rpn, rs.rpn,
rs.rpni, rs.rpni,
rs.risk_level_id as riskLevelId, rs.risk_level_id as riskLevelId,
rl.`name` as riskLevelName, rl.`name` as riskLevelName,
rl.level, rl.level,
rl.color rl.color
FROM FROM
...@@ -601,20 +601,20 @@ ...@@ -601,20 +601,20 @@
WHERE rs.parent_id &gt; 0 WHERE rs.parent_id &gt; 0
order by rs.sort_num,rs.id order by rs.sort_num,rs.id
</select> </select>
<select id="queryRiskSourceSecondLevel" resultType="java.util.HashMap"> <select id="queryRiskSourceSecondLevel" resultType="java.util.HashMap">
SELECT SELECT
rs.id, rs.id,
rs.name, rs.name,
rs.rpn, rs.rpn,
rs.rpni, rs.rpni,
rs.risk_level_id as riskLevelId, rs.risk_level_id as riskLevelId,
rl.`name` as riskLevelName, rl.`name` as riskLevelName,
rl.level, rl.level,
rl.color rl.color
FROM FROM
`f_risk_source` rs `f_risk_source` rs
LEFT JOIN f_risk_level rl ON rl.id = rs.risk_level_id LEFT JOIN f_risk_level rl ON rl.id = rs.risk_level_id
WHERE WHERE
rs.parent_id = ( rs.parent_id = (
SELECT SELECT
...@@ -642,12 +642,12 @@ ...@@ -642,12 +642,12 @@
rf.id = ${factorId} rf.id = ${factorId}
) )
</select> </select>
<select id="queryContingencyWater" resultType="java.util.HashMap"> <select id="queryContingencyWater" resultType="java.util.HashMap">
<!-- SELECT <!--SELECT
wr.alarm_level, wr.alarm_level,
wr.max_level, wr.max_level,
wr.area, wr.area,
...@@ -664,7 +664,31 @@ ...@@ -664,7 +664,31 @@
wr.alarm_level, wr.alarm_level,
wr.max_level, wr.max_level,
wr.area, wr.area,
wr.`name` --> wr.`name`-->
SELECT
*
FROM
(
SELECT
building.height AS alarm_level,
building.warn_height AS max_level,
building.area_measure AS area,
building.CODE AS CODE,
building.NAME AS NAME,
3.6 AS
VALUE
FROM
wl_building building
LEFT JOIN wl_equipment_category category ON building.equipment_code = category.id
WHERE
category.CODE = 93020000
) wr
GROUP BY
wr.alarm_level,
wr.max_level,
wr.area,
wr.`name`
</select> </select>
...@@ -728,7 +752,7 @@ ...@@ -728,7 +752,7 @@
</set> </set>
where id = #{id} where id = #{id}
</update> </update>
<select id="getRegionList" parameterType="string" resultType="com.yeejoin.amos.fas.core.common.response.RegionTreeResponse"> <select id="getRegionList" parameterType="string" resultType="com.yeejoin.amos.fas.core.common.response.RegionTreeResponse">
select select
rs.id,rs.name,rs.code,rs.parent_id,rs.ue4_location,rs.ue4_rotation,rs.ue4_extent, rs.id,rs.name,rs.code,rs.parent_id,rs.ue4_location,rs.ue4_rotation,rs.ue4_extent,
...@@ -737,7 +761,7 @@ ...@@ -737,7 +761,7 @@
IF(ISNULL(rs.route_path) || LENGTH(trim(rs.route_path)) <![CDATA[ <]]> 1,0,1) as is_bind, IF(ISNULL(rs.route_path) || LENGTH(trim(rs.route_path)) <![CDATA[ <]]> 1,0,1) as is_bind,
</when> </when>
<otherwise> <otherwise>
IF(ISNULL(IF(replace(trim(rs.ue4_rotation),'[]','')='',NULL,rs.ue4_rotation)) IF(ISNULL(IF(replace(trim(rs.ue4_rotation),'[]','')='',NULL,rs.ue4_rotation))
AND ISNULL(IF(replace(trim(rs.ue4_location),'[]','')='',NULL,rs.ue4_location)),0,1) as is_bind, AND ISNULL(IF(replace(trim(rs.ue4_location),'[]','')='',NULL,rs.ue4_location)),0,1) as is_bind,
</otherwise> </otherwise>
</choose> </choose>
...@@ -750,7 +774,7 @@ ...@@ -750,7 +774,7 @@
left join f_risk_level rl ON rs.risk_level_id = rl.id left join f_risk_level rl ON rs.risk_level_id = rl.id
where is_region = 'TRUE' AND (rs.org_code = #{orgCode} OR rs.org_code like CONCAT(#{orgCode},'-%')) where is_region = 'TRUE' AND (rs.org_code = #{orgCode} OR rs.org_code like CONCAT(#{orgCode},'-%'))
</select> </select>
<select id="findRegionById" resultType="java.util.HashMap"> <select id="findRegionById" resultType="java.util.HashMap">
select select
id,name,code,parent_id as parentId,ue4_location as ue4Location,ue4_rotation as ue4Rotation,ue4_extent as ue4Extent,route_path as routePath, id,name,code,parent_id as parentId,ue4_location as ue4Location,ue4_rotation as ue4Rotation,ue4_extent as ue4Extent,route_path as routePath,
...@@ -759,7 +783,7 @@ ...@@ -759,7 +783,7 @@
IF(ISNULL(route_path) || LENGTH(trim(route_path)) <![CDATA[ <]]> 1,0,1) as isBind, IF(ISNULL(route_path) || LENGTH(trim(route_path)) <![CDATA[ <]]> 1,0,1) as isBind,
</when> </when>
<otherwise> <otherwise>
IF(ISNULL(IF(replace(trim(ue4_rotation),'[]','')='',NULL,ue4_rotation)) IF(ISNULL(IF(replace(trim(ue4_rotation),'[]','')='',NULL,ue4_rotation))
AND ISNULL(IF(replace(trim(ue4_location),'[]','')='',NULL,ue4_location)),0,1) as isBind, AND ISNULL(IF(replace(trim(ue4_location),'[]','')='',NULL,ue4_location)),0,1) as isBind,
</otherwise> </otherwise>
</choose> </choose>
...@@ -768,7 +792,7 @@ ...@@ -768,7 +792,7 @@
from f_risk_source r from f_risk_source r
where id=#{id} AND (org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%')) where id=#{id} AND (org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</select> </select>
<update id="batchSaveRegionUe4" parameterType="java.util.List"> <update id="batchSaveRegionUe4" parameterType="java.util.List">
<foreach collection="list" item="item" index="index" open="" close="" separator=";"> <foreach collection="list" item="item" index="index" open="" close="" separator=";">
update f_risk_source update f_risk_source
......
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