Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
station
YeeAmosFireAutoSysRoot
Commits
1089fe4b
Commit
1089fe4b
authored
Jan 07, 2021
by
高建强
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_upgrade' of
http://172.16.10.76/station/YeeAmosFireAutoSysRoot
into dev_upgrade
parents
95e19c5e
66909669
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
194 additions
and
79 deletions
+194
-79
DateUtil.java
...va/com/yeejoin/amos/fas/core/common/request/DateUtil.java
+4
-0
BubbleTipAction.java
...com/yeejoin/amos/fas/business/action/BubbleTipAction.java
+1
-1
CheckInputItemRo.java
...join/amos/fas/business/action/model/CheckInputItemRo.java
+1
-1
FireEquimentDataRo.java
...in/amos/fas/business/action/model/FireEquimentDataRo.java
+1
-1
ProtalDataRo.java
.../yeejoin/amos/fas/business/action/model/ProtalDataRo.java
+1
-1
RiskSourceRo.java
.../yeejoin/amos/fas/business/action/model/RiskSourceRo.java
+1
-1
RiskSourceRuleRo.java
...join/amos/fas/business/action/model/RiskSourceRuleRo.java
+1
-1
FireSourceController.java
...in/amos/fas/business/controller/FireSourceController.java
+11
-2
RiskSourceController.java
...in/amos/fas/business/controller/RiskSourceController.java
+2
-2
FireEquipMapper.java
...yeejoin/amos/fas/business/dao/mapper/FireEquipMapper.java
+6
-0
ImpAndFireEquipMapper.java
...n/amos/fas/business/dao/mapper/ImpAndFireEquipMapper.java
+3
-0
FireEquipServiceImpl.java
.../amos/fas/business/service/impl/FireEquipServiceImpl.java
+15
-15
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+4
-4
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+0
-4
application.properties
...ireAutoSysStart/src/main/resources/application.properties
+15
-5
fas-2.0.1.xml
...utoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
+22
-2
dbTemplate_fire_equip.xml
...rt/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
+32
-1
dbTemplate_impAndfire_equip.xml
.../main/resources/db/mapper/dbTemplate_impAndfire_equip.xml
+12
-0
dbTemplate_risk_source.xml
...t/src/main/resources/db/mapper/dbTemplate_risk_source.xml
+62
-38
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+0
-0
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/core/common/request/DateUtil.java
View file @
1089fe4b
...
...
@@ -1346,6 +1346,10 @@ public class DateUtil {
int
toDay
=
to
.
get
(
Calendar
.
DAY_OF_YEAR
);
int
year
=
toYear
-
fromYear
;
int
day
=
toDay
-
fromDay
;
if
(
day
<
0
){
day
+=
365
;
year
-=
1
;
}
param
.
put
(
"year"
,
year
);
param
.
put
(
"day"
,
day
);
return
param
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/BubbleTipAction.java
View file @
1089fe4b
...
...
@@ -30,7 +30,7 @@ public class BubbleTipAction implements CustomerAction
//@ExposeAction("气泡提示")
@RuleMethod
(
methodLabel
=
"气泡提示"
,
project
=
"
青海
风险管控"
)
@RuleMethod
(
methodLabel
=
"气泡提示"
,
project
=
"风险管控"
)
public
void
sendBubbleTip
(
Object
bizobj
,
Boolean
showInfo
,
Object
title
,
String
type
)
{
BubbleTipResult
result
=
new
BubbleTipResult
();
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/model/CheckInputItemRo.java
View file @
1089fe4b
...
...
@@ -9,7 +9,7 @@ import lombok.Data;
/**
* @author DELL
*/
@RuleFact
(
value
=
"检查项"
,
project
=
"
青海
风险管控"
)
@RuleFact
(
value
=
"检查项"
,
project
=
"风险管控"
)
@Data
public
class
CheckInputItemRo
implements
Serializable
{
/**
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/model/FireEquimentDataRo.java
View file @
1089fe4b
...
...
@@ -7,7 +7,7 @@ import lombok.Data;
import
java.security.acl.LastOwnerException
;
@RuleFact
(
value
=
"消防设备"
,
project
=
"
青海
风险管控"
)
@RuleFact
(
value
=
"消防设备"
,
project
=
"风险管控"
)
@Data
public
class
FireEquimentDataRo
extends
BasicsRo
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/model/ProtalDataRo.java
View file @
1089fe4b
...
...
@@ -7,7 +7,7 @@ import com.yeejoin.amos.component.rule.RuleFact;
import
lombok.Data
;
@RuleFact
(
value
=
"巡检点"
,
project
=
"
青海
风险管控"
)
@RuleFact
(
value
=
"巡检点"
,
project
=
"风险管控"
)
@Data
public
class
ProtalDataRo
extends
BasicsRo
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/model/RiskSourceRo.java
View file @
1089fe4b
...
...
@@ -8,7 +8,7 @@ import com.yeejoin.amos.component.rule.RuleFact;
import
lombok.Data
;
@RuleFact
(
value
=
"风险点"
,
project
=
"
青海
风险管控"
)
@RuleFact
(
value
=
"风险点"
,
project
=
"风险管控"
)
@Data
public
class
RiskSourceRo
extends
BasicsRo
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/model/RiskSourceRuleRo.java
View file @
1089fe4b
...
...
@@ -7,7 +7,7 @@ import com.yeejoin.amos.component.rule.RuleFact;
import
lombok.Data
;
@RuleFact
(
value
=
"风险点-关联巡检点"
,
project
=
"
青海
风险管控"
)
@RuleFact
(
value
=
"风险点-关联巡检点"
,
project
=
"风险管控"
)
@Data
public
class
RiskSourceRuleRo
extends
BasicsRo
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireSourceController.java
View file @
1089fe4b
...
...
@@ -20,6 +20,8 @@ import io.swagger.annotations.ApiOperation;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -40,6 +42,7 @@ public class FireSourceController extends BaseController {
private
IWaterResourceService
iWaterResourceService
;
@Autowired
private
IEquipmentService
iEquipService
;
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
FireSourceController
.
class
);
@Permission
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加消防装备"
,
notes
=
"添加消防装备"
)
...
...
@@ -207,9 +210,15 @@ public class FireSourceController extends BaseController {
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消防状态明细信息"
,
notes
=
"消防状态明细信息"
)
@RequestMapping
(
value
=
"/info/detail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryForEquipmentList
(
@ApiParam
(
value
=
"设备名称"
,
required
=
true
)
@RequestParam
Lo
ng
id
,
public
CommonResponse
queryForEquipmentList
(
@ApiParam
(
value
=
"设备名称"
,
required
=
true
)
@RequestParam
Stri
ng
id
,
@ApiParam
(
value
=
"设备编号"
,
required
=
true
)
@RequestParam
String
type
)
throws
Exception
{
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForDetail
(
type
,
id
));
try
{
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForDetail
(
type
,
Long
.
valueOf
(
id
)));
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
"消防装备明细查询失败"
+
e
.
getMessage
());
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/RiskSourceController.java
View file @
1089fe4b
...
...
@@ -690,8 +690,8 @@ public class RiskSourceController extends BaseController {
@Permission
@ApiOperation
(
value
=
"风险预警详情"
,
notes
=
"风险预警详情"
)
@GetMapping
(
value
=
"/warning/detail"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
earlyWarning
(
@RequestParam
Lo
ng
riskSourceId
)
{
Map
map
=
riskSourceService
.
earlyWarning
(
riskSourceId
);
public
CommonResponse
earlyWarning
(
@RequestParam
Stri
ng
riskSourceId
)
{
Map
map
=
riskSourceService
.
earlyWarning
(
Long
.
valueOf
(
riskSourceId
)
);
return
CommonResponseUtil
.
success
(
map
);
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/FireEquipMapper.java
View file @
1089fe4b
...
...
@@ -6,6 +6,8 @@ import com.yeejoin.amos.fas.business.param.FireEquipmentParam;
import
com.yeejoin.amos.fas.business.vo.EquipCommunicationData
;
import
com.yeejoin.amos.fas.core.common.response.EquipDetailsResponse
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.FireStation
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.HashMap
;
...
...
@@ -55,6 +57,8 @@ public interface FireEquipMapper extends BaseMapper {
List
<
Map
>
queryForGroupCount
(
@Param
(
"fireStationId"
)
Long
fireStationId
);
List
<
Map
>
queryStorageEquips
(
@Param
(
"riskSourceId"
)
Long
riskSourceId
);
EquipDetailsResponse
findEquipDetailsById
(
@Param
(
"id"
)
Long
id
);
...
...
@@ -85,4 +89,6 @@ public interface FireEquipMapper extends BaseMapper {
FireEquipment
findFireEquipById
(
@Param
(
"id"
)
Long
id
);
FireEquipment
findVideoById
(
@Param
(
"id"
)
Long
id
);
FireStation
findFireStationById
(
@Param
(
"id"
)
Long
id
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/ImpAndFireEquipMapper.java
View file @
1089fe4b
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
com.yeejoin.amos.fas.dao.entity.EquipmentFireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipment
;
...
...
@@ -35,5 +36,7 @@ public interface ImpAndFireEquipMapper extends BaseMapper {
public
Boolean
existsAlarmPointByEqpPointIdAndEquipId
(
@Param
(
"pointId"
)
long
pointId
,
@Param
(
"equipmentId"
)
long
equipmentId
);
// Boolean containGroupedPoint(long id);
EquipmentSpecificIndexVo
findFireEqupmentByCode
(
String
code
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireEquipServiceImpl.java
View file @
1089fe4b
...
...
@@ -147,25 +147,25 @@ public class FireEquipServiceImpl implements IFireEquipService {
switch
(
fireEquipmentType
)
{
case
pool:
case
hydrant:
Optional
<
WaterResource
>
waterResource
=
this
.
iWaterResourceDao
.
findById
(
id
);
if
(
waterResource
.
isPresent
()){
returnEntity
=
waterResource
.
get
();
}
break
;
FireStation
fireStation
=
fireEquipMapper
.
findFireStationById
(
id
);
fireStation
.
setType
(
"2"
);
fireStation
.
setFireEquipmentInfo
(
this
.
fireEquipMapper
.
queryStorageEquips
(
id
));
returnEntity
=
fireStation
;
break
;
case
fireFoamRoom:
FireStation
fireStation1
=
fireEquipMapper
.
findFireStationById
(
id
);
fireStation1
.
setType
(
"2"
);
fireStation1
.
setFireEquipmentInfo
(
this
.
fireEquipMapper
.
queryStorageEquips
(
id
));
returnEntity
=
fireStation1
;
break
;
case
fireChamber:
Optional
<
FireStation
>
fireStation1
=
iFireStationDao
.
findById
(
id
);
FireStation
fireStation
=
null
;
if
(
fireStation1
.
isPresent
()){
fireStation
=
fireStation1
.
get
();
}
fireStation
.
setFireEquipmentInfo
(
this
.
fireEquipMapper
.
queryForGroupCount
(
id
));
returnEntity
=
fireStation
;
FireStation
fireStation11
=
fireEquipMapper
.
findFireStationById
(
id
);
fireStation11
.
setType
(
"1"
);
fireStation11
.
setFireEquipmentInfo
(
this
.
fireEquipMapper
.
queryStorageEquips
(
id
));
returnEntity
=
fireStation11
;
break
;
case
extinguisher:
case
hydrant:
case
monitorEquipment:
FireEquipment
fireEquipment
=
fireEquipMapper
.
findFireEquipById
(
id
);
fireEquipment
.
setEquipClassify
(
Integer
.
parseInt
(
EquipClassifyEnum
.
EQUIPMENT
.
getCode
()));
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
1089fe4b
...
...
@@ -1025,10 +1025,10 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Override
@javax
.
transaction
.
Transactional
public
String
processFireEqumtData
(
AlarmParam
deviceData
)
throws
Exception
{
EquipmentSpecificIndexVo
equipmentSpecificIndexVo
=
new
EquipmentSpecificIndexVo
();
equipmentSpecificIndexVo
.
setEquipmentSpecificId
(
Long
.
valueOf
(
deviceData
.
getPointCode
()));
equipmentSpecificIndexVo
.
setType
(
"FIREALARM"
);
EquipmentSpecificIndexVo
equipmentSpecificIndexVo
=
impAndFireEquipMapper
.
findFireEqupmentByCode
(
deviceData
.
getPointCode
());
//
new EquipmentSpecificIndexVo();
//
equipmentSpecificIndexVo.setEquipmentSpecificId(Long.valueOf(deviceData.getPointCode()));
//
equipmentSpecificIndexVo.setType("FIREALARM");
TopicEntityVo
topicEntity
=
new
TopicEntityVo
();
topicEntity
.
setMessage
(
JSON
.
toJSONString
(
equipmentSpecificIndexVo
));
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
1089fe4b
...
...
@@ -126,10 +126,6 @@ public class View3dServiceImpl implements IView3dService {
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
@Value
(
"${station.equipment.code}"
)
private
String
equipmentCode
;
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
CommonResponse
setPoint3dPosition
(
List
<
BindPointBo
>
pointBoList
)
{
...
...
YeeAmosFireAutoSysStart/src/main/resources/application.properties
View file @
1089fe4b
...
...
@@ -75,13 +75,23 @@ amos.feign.gennerator.use-gateway=true
autoSys.push.type
=
mqtt
#查询装备分类
#消防视频:xfsp
#消防车:2101
#灭火器:3104
#消火栓:3105
#探测器:8501
data.type.fireChamber
=
2101
#消防小室:9301
data.type.fireChamber
=
9301
#消防水池:9302
data.type.pool
=
9302
#消防泡沫间:9305
#消防视频:xfsp
station.equipment.code
=
2101,3104,3105,8501,9301,9302,9305,xfsp
data.type.fireFoamRoom
=
9305
#探测器:8501
data.type.monitorEquipment
=
8501
#灭火器:3104
data.type.extinguisher
=
3104
#消火栓:3105
data.type.hydrant
=
3105
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
View file @
1089fe4b
...
...
@@ -554,16 +554,36 @@
ALTER TABLE `f_station_info` ADD COLUMN `safety_user_phone_num` varchar(20) NULL COMMENT '安全负责人联系方式';
</sql>
</changeSet>
<changeSet
author=
"
zjw"
id=
"1606232323211
1"
>
<changeSet
author=
"
keyong"
id=
"1608279637-
1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_station_info"
columnName=
"
safety_user_phone_num
"
/>
<columnExists
tableName=
"f_station_info"
columnName=
"
fire_captain_name
"
/>
</not>
</preConditions>
<comment>
修改f_station_info表结构
</comment>
<sql>
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 '驻站消防队队长电话';
</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 '驻站消防队队长';
</sql>
</changeSet>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
View file @
1089fe4b
...
...
@@ -196,7 +196,7 @@
<if
test=
"startTime!=null"
>
AND d.create_date BETWEEN '${startTime}' AND '${endTime}'
</if>
AND e_value IS NOT NULL
AND e_value IS NOT NULL
AND e_value != ''
ORDER BY d.create_date desc
LIMIT ${start},${length}
</select>
...
...
@@ -286,6 +286,24 @@
AND se.fire_equipment_id = fe.id
)
</select>
<select
id=
"queryStorageEquips"
resultType=
"map"
>
SELECT
wed.`name`,
u.`name` AS unit,
sum(wsd.amount) fireEquipmentCount
FROM
wl_stock_detail wsd
LEFT JOIN wl_equipment_detail wed ON wed.id = wsd.equipment_detail_id
LEFT JOIN wl_equipment we ON we.id = wed.equipment_id
LEFT JOIN wl_unit u ON u.id = we.unit_id
LEFT JOIN wl_warehouse_structure ws ON ws.id = wsd.warehouse_structure_id
WHERE
ws.source_id = #{riskSourceId}
GROUP BY
wsd.equipment_detail_id,
wed.`name`
</select>
<select
id=
"findEquipDetailsById"
resultType=
"com.yeejoin.amos.fas.core.common.response.EquipDetailsResponse"
>
SELECT
...
...
@@ -583,4 +601,16 @@
video.id = #{id}
</if>
</select>
<select
id=
"findFireStationById"
resultType=
"com.yeejoin.amos.fas.dao.entity.FireStation"
>
SELECT
wb.`name`,
wb.`code`,
wb.address,
wb.region_id AS riskSourceId
FROM
wl_building wb
WHERE
wb.id = #{id}
</select>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_impAndfire_equip.xml
View file @
1089fe4b
...
...
@@ -157,5 +157,16 @@
and fe.equipment_id = #{equipmentId}
and ep.id = #{pointId}
</select>
<select
id=
"findFireEqupmentByCode"
resultType=
"com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo"
>
SELECT
id as equipmentSpecificId,
'FIREALARM' as type
FROM
wl_equipment_specific
WHERE
`code` = #{code}
LIMIT 1
</select>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_risk_source.xml
View file @
1089fe4b
...
...
@@ -27,7 +27,7 @@
order by rs.id desc
<choose>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
</choose>
</select>
...
...
@@ -172,7 +172,7 @@
GROUP BY
ff1.risk_source_id;
</select>
<resultMap
id=
"riskSourceMap"
type=
"com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"parentId"
column=
"parent_id"
/>
...
...
@@ -191,7 +191,7 @@
<result
property=
"omission"
column=
"omission"
/>
<result
property=
"unplan"
column=
"unplan"
/>
</resultMap>
<select
id=
"getRiskSources"
resultMap=
"riskSourceMap"
>
SELECT
rs.id,
...
...
@@ -213,9 +213,9 @@
where rs.org_code = #{compCode}
ORDER BY rs.sort_num,rs.id ASC
</select>
<select
id=
"getRiskSourcesEquipment"
resultMap=
"riskSourceMap"
>
SELECT
sum(a.cc) ccount,
a.`name`,
...
...
@@ -240,10 +240,10 @@
a.`name`,
a.position3d,
a.parent_id,
a.id
a.id
</select>
<select
id=
"getCheckPointRiskSource"
resultMap=
"riskSourceMap"
>
SELECT
sum(a.cc) ccount,
...
...
@@ -280,9 +280,9 @@
a.parent_id,
a.id
</select>
<select
id=
"getRiskSourcesFireEquipmentByType"
resultMap=
"riskSourceMap"
>
SELECT
sum(a.cc) ccount,
...
...
@@ -338,13 +338,13 @@
FROM
`f_risk_source_point_inputitem` rspi
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
AND rspi.risk_source_id = #{riskSourceId}
GROUP BY riskId,pointId,pointNo,pointName,depName,username,telephone
<choose>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
</choose>
</select>
...
...
@@ -540,7 +540,7 @@
</select>
<select
id=
"queryForUnqualified"
resultType=
"map"
>
SELECT
(
SELECT
...
...
@@ -564,11 +564,11 @@
LEFT JOIN f_fmea fm ON fm.id = pi.fmea_id
WHERE
pi.`state` = 1
AND fm.risk_source_id = #{riskSourceId};
AND fm.risk_source_id = #{riskSourceId};
</select>
<select
id=
"queryForFmeaEquipAlarm"
resultType=
"map"
>
SELECT
ed.`name` as 'fireEquipmentName',
ei.`name` as 'name'
...
...
@@ -584,15 +584,15 @@
AND fm.risk_source_id = #{riskSourceId}
GROUP BY fireEquipmentName,name
</select>
<select
id=
"queryRiskAreaRpn"
resultType=
"java.util.HashMap"
>
SELECT
rs.id,
rs.name,
rs.rpn,
rs.rpni,
rs.name,
rs.rpn,
rs.rpni,
rs.risk_level_id as riskLevelId,
rl.`name` as riskLevelName,
rl.`name` as riskLevelName,
rl.level,
rl.color
FROM
...
...
@@ -601,20 +601,20 @@
WHERE rs.parent_id
>
0
order by rs.sort_num,rs.id
</select>
<select
id=
"queryRiskSourceSecondLevel"
resultType=
"java.util.HashMap"
>
SELECT
rs.id,
rs.name,
rs.rpn,
rs.rpni,
rs.name,
rs.rpn,
rs.rpni,
rs.risk_level_id as riskLevelId,
rl.`name` as riskLevelName,
rl.`name` as riskLevelName,
rl.level,
rl.color
FROM
`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
rs.parent_id = (
SELECT
...
...
@@ -642,12 +642,12 @@
rf.id = ${factorId}
)
</select>
<select
id=
"queryContingencyWater"
resultType=
"java.util.HashMap"
>
<!--
SELECT
<!--
SELECT
wr.alarm_level,
wr.max_level,
wr.area,
...
...
@@ -664,7 +664,31 @@
wr.alarm_level,
wr.max_level,
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>
...
...
@@ -728,7 +752,7 @@
</set>
where id = #{id}
</update>
<select
id=
"getRegionList"
parameterType=
"string"
resultType=
"com.yeejoin.amos.fas.core.common.response.RegionTreeResponse"
>
select
rs.id,rs.name,rs.code,rs.parent_id,rs.ue4_location,rs.ue4_rotation,rs.ue4_extent,
...
...
@@ -737,7 +761,7 @@
IF(ISNULL(rs.route_path) || LENGTH(trim(rs.route_path))
<![CDATA[ <]]>
1,0,1) as is_bind,
</when>
<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,
</otherwise>
</choose>
...
...
@@ -750,7 +774,7 @@
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},'-%'))
</select>
<select
id=
"findRegionById"
resultType=
"java.util.HashMap"
>
select
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 @@
IF(ISNULL(route_path) || LENGTH(trim(route_path))
<![CDATA[ <]]>
1,0,1) as isBind,
</when>
<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,
</otherwise>
</choose>
...
...
@@ -768,7 +792,7 @@
from f_risk_source r
where id=#{id} AND (org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</select>
<update
id=
"batchSaveRegionUe4"
parameterType=
"java.util.List"
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
""
close=
""
separator=
";"
>
update f_risk_source
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
1089fe4b
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment