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
28409f79
Commit
28409f79
authored
May 27, 2020
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
669f9a3c
c747033e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
53 changed files
with
1120 additions
and
330 deletions
+1120
-330
FireEquipmentPoint.java
...a/com/yeejoin/amos/fas/dao/entity/FireEquipmentPoint.java
+11
-0
Message.java
...rc/main/java/com/yeejoin/amos/fas/dao/entity/Message.java
+183
-0
WaterResource.java
...n/java/com/yeejoin/amos/fas/dao/entity/WaterResource.java
+33
-0
BubbleTipAction.java
...com/yeejoin/amos/fas/business/action/BubbleTipAction.java
+67
-0
ContingencyAction.java
...m/yeejoin/amos/fas/business/action/ContingencyAction.java
+36
-30
RiskSituationAction.java
...yeejoin/amos/fas/business/action/RiskSituationAction.java
+125
-0
SimpleTipAction.java
...com/yeejoin/amos/fas/business/action/SimpleTipAction.java
+100
-0
ELEvaluationContext.java
...join/amos/fas/business/action/el/ELEvaluationContext.java
+37
-0
DataItemUtil.java
...m/yeejoin/amos/fas/business/action/util/DataItemUtil.java
+75
-0
WebSocketConfig.java
...n/amos/fas/business/action/websocket/WebSocketConfig.java
+14
-0
BaseController.java
.../yeejoin/amos/fas/business/controller/BaseController.java
+2
-0
FireCarController.java
...ejoin/amos/fas/business/controller/FireCarController.java
+4
-3
FireEquimtPointController.java
...os/fas/business/controller/FireEquimtPointController.java
+11
-5
FireSourceController.java
...in/amos/fas/business/controller/FireSourceController.java
+0
-0
FireStationController.java
...n/amos/fas/business/controller/FireStationController.java
+6
-1
RiskSourceController.java
...in/amos/fas/business/controller/RiskSourceController.java
+10
-3
WaterResourceController.java
...amos/fas/business/controller/WaterResourceController.java
+3
-2
FireStrengthMapper.java
...join/amos/fas/business/dao/mapper/FireStrengthMapper.java
+7
-3
RiskSourceMapper.java
...eejoin/amos/fas/business/dao/mapper/RiskSourceMapper.java
+2
-2
RuleRuningSnapshotMapper.java
...mos/fas/business/dao/mapper/RuleRuningSnapshotMapper.java
+2
-0
View3dMapper.java
...om/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
+1
-1
WaterResourceMapper.java
...oin/amos/fas/business/dao/mapper/WaterResourceMapper.java
+2
-0
IFireEquipmentDao.java
...n/amos/fas/business/dao/repository/IFireEquipmentDao.java
+2
-0
IFireStationDao.java
...oin/amos/fas/business/dao/repository/IFireStationDao.java
+0
-1
IWaterResourceDao.java
...n/amos/fas/business/dao/repository/IWaterResourceDao.java
+3
-0
ContingencyInstanceImpl.java
...os/fas/business/service/impl/ContingencyInstanceImpl.java
+18
-5
EquipmentServiceImpl.java
.../amos/fas/business/service/impl/EquipmentServiceImpl.java
+4
-0
FireCarServiceImpl.java
...in/amos/fas/business/service/impl/FireCarServiceImpl.java
+1
-1
FireEquipPointServiceImpl.java
.../fas/business/service/impl/FireEquipPointServiceImpl.java
+5
-4
FireEquipServiceImpl.java
.../amos/fas/business/service/impl/FireEquipServiceImpl.java
+4
-3
FireStrengthServiceImpl.java
...os/fas/business/service/impl/FireStrengthServiceImpl.java
+18
-29
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+14
-8
RuleRunigSnapshotServiceImpl.java
...s/business/service/impl/RuleRunigSnapshotServiceImpl.java
+34
-34
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+3
-3
WaterResourceServiceImpl.java
...s/fas/business/service/impl/WaterResourceServiceImpl.java
+8
-8
FireStengthService.java
...n/amos/fas/business/service/intfc/FireStengthService.java
+3
-1
IFireEquipService.java
...in/amos/fas/business/service/intfc/IFireEquipService.java
+7
-10
IRiskSourceService.java
...n/amos/fas/business/service/intfc/IRiskSourceService.java
+2
-2
IRuleRunningSnapshotService.java
...s/business/service/intfc/IRuleRunningSnapshotService.java
+0
-1
IWaterResourceService.java
...mos/fas/business/service/intfc/IWaterResourceService.java
+3
-1
ContingencyRo.java
...eejoin/amos/fas/business/service/model/ContingencyRo.java
+165
-154
YeeAmosFireAutoSysStart.java
...c/main/java/com/yeejoin/amos/YeeAmosFireAutoSysStart.java
+25
-1
application-dev.properties
...utoSysStart/src/main/resources/application-dev.properties
+7
-4
application-docker.properties
...SysStart/src/main/resources/application-docker.properties
+5
-2
application-test.properties
...toSysStart/src/main/resources/application-test.properties
+5
-2
application.properties
...ireAutoSysStart/src/main/resources/application.properties
+1
-1
fas-2.0.1.xml
...utoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
+13
-0
dbTemplate_fier_station.xml
.../src/main/resources/db/mapper/dbTemplate_fier_station.xml
+1
-0
dbTemplate_fier_stength.xml
.../src/main/resources/db/mapper/dbTemplate_fier_stength.xml
+28
-0
dbTemplate_fire_equippoint.xml
...c/main/resources/db/mapper/dbTemplate_fire_equippoint.xml
+2
-0
dbTemplate_impAndfire_equip.xml
.../main/resources/db/mapper/dbTemplate_impAndfire_equip.xml
+3
-1
dbTemplate_risk_source.xml
...t/src/main/resources/db/mapper/dbTemplate_risk_source.xml
+2
-1
dbTemplate_waterResource.xml
...src/main/resources/db/mapper/dbTemplate_waterResource.xml
+3
-3
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FireEquipmentPoint.java
View file @
28409f79
...
...
@@ -42,6 +42,8 @@ public class FireEquipmentPoint extends BasicEntity {
@Column
(
name
=
"alarm_type"
)
private
Long
alarmType
;
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
public
String
getCode
()
{
return
code
;
}
...
...
@@ -113,4 +115,12 @@ public class FireEquipmentPoint extends BasicEntity {
public
void
setAlarmType
(
Long
alarmType
)
{
this
.
alarmType
=
alarmType
;
}
public
String
getOrgCode
()
{
return
orgCode
;
}
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/Message.java
0 → 100644
View file @
28409f79
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
java.util.Date
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
org.hibernate.annotations.GenericGenerator
;
/**
*
* <pre>
* 消息实体
* </pre>
*
* @author HK
* @version $Id: Message.java, v 0.1 2018年1月18日 下午7:48:58 HK Exp $
*/
@Entity
@Table
(
name
=
"toip_sys_message"
)
public
class
Message
extends
BusinessEntity
{
/**
* <pre>
*
* </pre>
*/
private
static
final
long
serialVersionUID
=
292329658525267887L
;
/**
* id
*/
@Id
@GeneratedValue
(
generator
=
"uuid"
)
@GenericGenerator
(
name
=
"uuid"
,
strategy
=
"uuid2"
)
@Column
(
name
=
"id"
,
nullable
=
false
,
length
=
36
)
protected
String
id
;
/**
* 时间
*/
private
Date
time
;
/**
* 标题
*/
private
String
title
;
/**
* 内容
*/
private
String
content
;
/**
* 类型
*/
private
String
type
;
/**
* 发送者
*/
private
String
sender
;
/**
* 接收者
*/
private
String
receiver
;
/**
* 已读者
*/
private
String
reader
;
/**
* 业务id
*/
private
String
bizId
;
/**
* 业务员实体名,例如com.yeejoin.amos.toip.bizrulebridge.entity.Fire
*/
private
String
bizclassName
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
Date
getTime
()
{
return
time
;
}
public
void
setTime
(
Date
time
)
{
this
.
time
=
time
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
String
getContent
()
{
return
content
;
}
public
void
setContent
(
String
content
)
{
this
.
content
=
content
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getSender
()
{
return
sender
;
}
public
void
setSender
(
String
sender
)
{
this
.
sender
=
sender
;
}
public
String
getReceiver
()
{
return
receiver
;
}
public
void
setReceiver
(
String
receiver
)
{
this
.
receiver
=
receiver
;
}
public
String
getReader
()
{
return
reader
;
}
public
void
setReader
(
String
reader
)
{
this
.
reader
=
reader
;
}
public
String
getBizId
()
{
return
bizId
;
}
public
void
setBizId
(
String
bizId
)
{
this
.
bizId
=
bizId
;
}
public
String
getBizclassName
()
{
return
bizclassName
;
}
public
void
setBizclassName
(
String
bizclassName
)
{
this
.
bizclassName
=
bizclassName
;
}
}
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/WaterResource.java
View file @
28409f79
...
...
@@ -82,6 +82,15 @@ public class WaterResource extends BasicEntity{
*/
@Column
(
name
=
"create_by"
)
private
String
createBy
;
@Column
(
name
=
"area"
)
private
String
area
;
@Column
(
name
=
"max_level"
)
private
String
maxLevel
;
@Column
(
name
=
"alarm_level"
)
private
String
alarmLevel
;
/**
* ue4位置
...
...
@@ -209,4 +218,28 @@ public class WaterResource extends BasicEntity{
public
void
setUe4Rotation
(
String
ue4Rotation
)
{
this
.
ue4Rotation
=
ue4Rotation
;
}
public
String
getArea
()
{
return
area
;
}
public
void
setArea
(
String
area
)
{
this
.
area
=
area
;
}
public
String
getMaxLevel
()
{
return
maxLevel
;
}
public
void
setMaxLevel
(
String
maxLevel
)
{
this
.
maxLevel
=
maxLevel
;
}
public
String
getAlarmLevel
()
{
return
alarmLevel
;
}
public
void
setAlarmLevel
(
String
alarmLevel
)
{
this
.
alarmLevel
=
alarmLevel
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/BubbleTipAction.java
0 → 100644
View file @
28409f79
package
com
.
yeejoin
.
amos
.
fas
.
business
.
action
;
import
java.lang.reflect.Constructor
;
import
java.util.HashMap
;
import
java.util.Map
;
import
org.springframework.stereotype.Component
;
import
com.yeejoin.amos.fas.business.action.result.ActionResult
;
import
com.yeejoin.amos.fas.business.action.result.BubbleTipResult
;
import
com.yeejoin.amos.fas.business.action.result.message.ActionResultMessage
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
/**
*
* <pre>
* 气泡提示动作
* </pre>
*
* @author amos
* @version $Id: BubbleTipAction.java, v 0.1 2019年5月16日 上午10:42:32 amos Exp $
*/
@Component
public
class
BubbleTipAction
implements
CustomerAction
{
private
static
String
PACKAGEURL
=
"com.yeejoin.amos.rule.map.action.result.message."
;
//@ExposeAction("气泡提示")
public
void
sendBubbleTip
(
Object
bizobj
,
Boolean
showInfo
,
Object
title
,
String
type
)
{
BubbleTipResult
result
=
new
BubbleTipResult
();
Map
<
String
,
Object
>
tempmap1
=
new
HashMap
<>();
tempmap1
.
put
(
"bizobj"
,
bizobj
);
result
.
add
(
tempmap1
);
//是否显示气泡
Map
<
String
,
Object
>
tempmap2
=
new
HashMap
<>();
tempmap2
.
put
(
"showInfo"
,
showInfo
);
result
.
add
(
tempmap2
);
//显示title提示
Map
<
String
,
Object
>
tempmap3
=
new
HashMap
<>();
tempmap3
.
put
(
"title"
,
title
);
result
.
add
(
tempmap3
);
//节点类型
Map
<
String
,
Object
>
tempmap4
=
new
HashMap
<>();
tempmap4
.
put
(
"type"
,
type
);
result
.
add
(
tempmap4
);
Constructor
<?>
constructor
;
try
{
constructor
=
Class
.
forName
(
PACKAGEURL
+
result
.
getClass
().
getSimpleName
()
+
"Message"
)
.
getConstructor
(
ActionResult
.
class
);
ActionResultMessage
<?>
action
=
(
ActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
String
firstStr
=
"fromws"
;
String
secondStr
=
"map"
;
String
thirdStr
=
"bubble"
;
Object
obj
=
action
.
execute
(
firstStr
,
secondStr
,
thirdStr
);
result
.
setToipResponse
((
ToipResponse
)
obj
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/ContingencyAction.java
View file @
28409f79
...
...
@@ -12,20 +12,18 @@ import java.util.List;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.client.RestTemplate
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.yeejoin.amos.fas.business.action.result.ActionResult
;
import
com.yeejoin.amos.fas.business.action.result.BubbleTipResult
;
import
com.yeejoin.amos.fas.business.action.result.message.ActionResultMessage
;
import
com.yeejoin.amos.fas.business.service.impl.
FireStrength
ServiceImpl
;
import
com.yeejoin.amos.fas.business.service.impl.
RuleRunigSnapshot
ServiceImpl
;
import
com.yeejoin.amos.fas.business.service.intfc.FireStengthService
;
import
com.yeejoin.amos.fas.business.service.intfc.IContingencyInstance
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus
;
import
com.yeejoin.amos.fas.business.service.model.ContingencyRo
;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
...
...
@@ -35,19 +33,21 @@ import com.yeejoin.amos.fas.dao.entity.FireStrength;
public
class
ContingencyAction
implements
CustomerAction
{
private
static
String
PACKAGEURL
=
"com.yeejoin.amos.
rule.map
.action.result.message."
;
private
static
String
PACKAGEURL
=
"com.yeejoin.amos.
fas.business
.action.result.message."
;
@Autowired
private
IContingencyInstance
iContingencyInstance
;
@Autowired
private
FireStengthService
fireStrengthService
;
private
RestTemplate
restTemplate
=
new
RestTemplate
();
//
private RestTemplate restTemplate = new RestTemplate();
@Value
(
"${bussunis.domain}"
)
private
String
bussunisDomain
;
//
@Value("${bussunis.domain}")
//
private String bussunisDomain ;
@Autowired
private
IRiskSourceService
riskSourceService
;
private
static
Map
<
String
,
String
>
OPERATE_RECORD_ID
=
new
HashMap
<>();
...
...
@@ -77,8 +77,8 @@ public class ContingencyAction implements CustomerAction {
Date
now
=
new
Date
();
String
time
=
sdf
.
format
(
now
);
List
<
FireStrength
>
strengths
=
null
;
//fireStrengthService.
List
<
FireStrength
>
strengths
=
fireStrengthService
.
queryForStrengthList
(
time
);
// List<FireStrength> strengths = iStrengthRepository.queryForStrengthList(time);
if
(!
CollectionUtils
.
isEmpty
(
strengths
))
...
...
@@ -101,7 +101,7 @@ public class ContingencyAction implements CustomerAction {
}
public
void
sendcmd
(
String
firstStr
,
String
secondStr
,
String
thirdStr
,
BubbleTipResult
result
)
{
public
static
void
sendcmd
(
String
firstStr
,
String
secondStr
,
String
thirdStr
,
BubbleTipResult
result
)
{
Constructor
<?>
constructor
;
try
{
...
...
@@ -289,10 +289,10 @@ public class ContingencyAction implements CustomerAction {
private
boolean
sendButton
(
String
batchNo
,
String
contingencyPlanId
,
String
equipmentId
,
String
actionName
,
String
buttonJson
)
{
String
url
=
bussunisDomain
+
"/api/risksource/contingency/setup"
;
//
String url = bussunisDomain+ "/api/risksource/contingency/setup";
ObjectMapper
objectMapper
=
new
ObjectMapper
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
//
Map<String,Object> map = new HashMap<>();
/**
* batchNo
...
...
@@ -306,24 +306,30 @@ public class ContingencyAction implements CustomerAction {
try
{
Map
button
=
objectMapper
.
readValue
(
buttonJson
,
Map
.
class
);
Map
operateInstance
=
(
Map
)((
List
)
button
.
get
(
"operate"
)).
get
(
0
);
map
.
put
(
"batchNo"
,
batchNo
);
map
.
put
(
"actionName"
,
actionName
);
map
.
put
(
"equipmentId"
,
equipmentId
);
map
.
put
(
"stepCode"
,
button
.
get
(
"stepCode"
));
map
.
put
(
"buttonCode"
,
operateInstance
.
get
(
"code"
));
map
.
put
(
"confirm"
,
"CONFIRM"
);
map
.
put
(
"stepState"
,
operateInstance
.
get
(
"stepState"
));
map
.
put
(
"contingencyPlanId"
,
contingencyPlanId
);
HttpEntity
<
Map
>
entity
=
new
HttpEntity
<>(
map
);
restTemplate
.
exchange
(
url
,
HttpMethod
.
POST
,
entity
,
Map
.
class
);
// map.put("batchNo",batchNo);
// map.put("actionName",actionName);
// map.put("equipmentId",equipmentId);
// map.put("stepCode",button.get("stepCode"));
// map.put("buttonCode",operateInstance.get("code"));
// map.put("confirm","CONFIRM");
// map.put("stepState",operateInstance.get("stepState"));
// map.put("contingencyPlanId",contingencyPlanId);
ContingencyDeviceStatus
contingencyDeviceStatus
=
new
ContingencyDeviceStatus
();
contingencyDeviceStatus
.
setActionName
(
actionName
);
contingencyDeviceStatus
.
setButtonCode
(
String
.
valueOf
(
operateInstance
.
get
(
"code"
)));
contingencyDeviceStatus
.
setConfirm
(
"CONFIRM"
);
contingencyDeviceStatus
.
setContingencyPlanId
(
contingencyPlanId
);
contingencyDeviceStatus
.
setEquipmentId
(
equipmentId
);
contingencyDeviceStatus
.
setStepCode
(
String
.
valueOf
(
button
.
get
(
"stepCode"
)));
contingencyDeviceStatus
.
setStepState
(
String
.
valueOf
(
operateInstance
.
get
(
"stepState"
)));
riskSourceService
.
queryContingencyDeviceStatus
(
contingencyDeviceStatus
);
//HttpEntity<Map> entity = new HttpEntity<>(map);
// restTemplate.exchange(url, HttpMethod.POST,entity,Map.class);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
...
...
@@ -424,8 +430,8 @@ public class ContingencyAction implements CustomerAction {
private
void
stopSnapshop
(
ContingencyRo
contingencyRo
)
{
//
if (RuleRunigSnapshotServiceImpl.getReplayBatchNo() != null && !RuleRunigSnapshotServiceImpl.getReplayBatchNo().equals(contingencyRo.getBatchNo()))
//
RuleRunigSnapshotServiceImpl.setReplayBatchNoToNull();
if
(
RuleRunigSnapshotServiceImpl
.
getReplayBatchNo
()
!=
null
&&
!
RuleRunigSnapshotServiceImpl
.
getReplayBatchNo
().
equals
(
contingencyRo
.
getBatchNo
()))
RuleRunigSnapshotServiceImpl
.
setReplayBatchNoToNull
();
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/RiskSituationAction.java
0 → 100644
View file @
28409f79
package
com
.
yeejoin
.
amos
.
fas
.
business
.
action
;
import
java.lang.reflect.Constructor
;
import
java.util.HashMap
;
import
java.util.Map
;
import
org.springframework.stereotype.Component
;
import
com.yeejoin.amos.fas.business.action.result.ActionResult
;
import
com.yeejoin.amos.fas.business.action.result.BubbleTipResult
;
import
com.yeejoin.amos.fas.business.action.result.message.ActionResultMessage
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
/**
*
* <pre>
* 风险态势图动作
* </pre>
*
* @author amos
* @version $Id: RiskSituationAction.java, v 0.1 2019年5月16日 下午5:26:27 amos Exp $
*/
@Component
public
class
RiskSituationAction
implements
CustomerAction
{
private
static
String
PACKAGEURL
=
"com.yeejoin.amos.rule.map.action.result.message."
;
//@ExposeAction("气泡提示")
public
void
sendBubbleTip
(
Object
bizobj
,
Boolean
showInfo
,
String
title
)
{
BubbleTipResult
result
=
new
BubbleTipResult
();
Map
<
String
,
Object
>
tempmap1
=
new
HashMap
<>();
tempmap1
.
put
(
"bizobj"
,
bizobj
);
result
.
add
(
tempmap1
);
//是否显示气泡
Map
<
String
,
Object
>
tempmap2
=
new
HashMap
<>();
tempmap2
.
put
(
"showInfo"
,
showInfo
);
result
.
add
(
tempmap2
);
//显示title提示
Map
<
String
,
Object
>
tempmap3
=
new
HashMap
<>();
tempmap3
.
put
(
"title"
,
title
);
result
.
add
(
tempmap3
);
Constructor
<?>
constructor
;
try
{
constructor
=
Class
.
forName
(
PACKAGEURL
+
result
.
getClass
().
getSimpleName
()
+
"Message"
)
.
getConstructor
(
ActionResult
.
class
);
ActionResultMessage
<?>
action
=
(
ActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
String
firstStr
=
"fromws"
;
String
secondStr
=
"riskSituation"
;
String
thirdStr
=
"bubble"
;
Object
obj
=
action
.
execute
(
firstStr
,
secondStr
,
thirdStr
);
result
.
setToipResponse
((
ToipResponse
)
obj
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
//@ExposeAction("区域颜色改变")
public
void
regionChange
(
Object
bizobj
,
String
colour
)
{
BubbleTipResult
result
=
new
BubbleTipResult
();
Map
<
String
,
Object
>
tempmap1
=
new
HashMap
<>();
tempmap1
.
put
(
"bizobj"
,
bizobj
);
result
.
add
(
tempmap1
);
//更改颜色
Map
<
String
,
Object
>
tempmap2
=
new
HashMap
<>();
tempmap2
.
put
(
"colour"
,
colour
);
result
.
add
(
tempmap2
);
Constructor
<?>
constructor
;
try
{
constructor
=
Class
.
forName
(
PACKAGEURL
+
result
.
getClass
().
getSimpleName
()
+
"Message"
)
.
getConstructor
(
ActionResult
.
class
);
ActionResultMessage
<?>
action
=
(
ActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
String
firstStr
=
"fromws"
;
String
secondStr
=
"riskSituation"
;
String
thirdStr
=
"colour"
;
Object
obj
=
action
.
execute
(
firstStr
,
secondStr
,
thirdStr
);
result
.
setToipResponse
((
ToipResponse
)
obj
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
//@ExposeAction(value = "区域闪烁",snapshot = false)
public
void
regionFlicker
(
Object
bizobj
,
Integer
frequency
)
{
BubbleTipResult
result
=
new
BubbleTipResult
();
Map
<
String
,
Object
>
tempmap1
=
new
HashMap
<>();
tempmap1
.
put
(
"bizobj"
,
bizobj
);
result
.
add
(
tempmap1
);
//更改颜色
Map
<
String
,
Object
>
tempmap2
=
new
HashMap
<>();
tempmap2
.
put
(
"frequency"
,
frequency
);
result
.
add
(
tempmap2
);
Constructor
<?>
constructor
;
try
{
constructor
=
Class
.
forName
(
PACKAGEURL
+
result
.
getClass
().
getSimpleName
()
+
"Message"
)
.
getConstructor
(
ActionResult
.
class
);
ActionResultMessage
<?>
action
=
(
ActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
String
firstStr
=
"fromws"
;
String
secondStr
=
"riskSituation"
;
String
thirdStr
=
"flicker"
;
Object
obj
=
action
.
execute
(
firstStr
,
secondStr
,
thirdStr
);
result
.
setToipResponse
((
ToipResponse
)
obj
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/SimpleTipAction.java
0 → 100644
View file @
28409f79
package
com
.
yeejoin
.
amos
.
fas
.
business
.
action
;
import
java.lang.reflect.Constructor
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
com.yeejoin.amos.fas.business.action.el.ELEvaluationContext
;
import
com.yeejoin.amos.fas.business.action.result.AbstractActionResult
;
import
com.yeejoin.amos.fas.business.action.result.ActionResult
;
import
com.yeejoin.amos.fas.business.action.result.TipResult
;
import
com.yeejoin.amos.fas.business.action.result.message.ActionResultMessage
;
import
com.yeejoin.amos.fas.business.action.util.DataItemUtil
;
import
com.yeejoin.amos.fas.business.service.model.BasicsRo
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
import
com.yeejoin.amos.fas.dao.entity.BusinessEntity
;
import
com.yeejoin.amos.fas.dao.entity.Message
;
/**
*
* <pre>
* 消息提示动作
* </pre>
*
* @author amos
* @version $Id: SimpleTipAction.java, v 0.1 2019年4月24日 下午2:47:37 amos Exp $
*/
@Component
public
class
SimpleTipAction
implements
CustomerAction
{
private
static
String
PACKAGEURL
=
"com.yeejoin.amos.rule.map.action.result.message."
;
// @Autowired
// private IMessageService messageService;
//@ExposeAction("消息提示")
// public void sendMessageTip(Object bizobj, String title, String content,String type)
// {
//
// try
// {
//
// ELEvaluationContext.setVariable("bizobj",bizobj);
// TipResult result = new TipResult();
// result.add(bizobj);
// Map<String, Object> tempmap1 = new HashMap<>();
// tempmap1.put("title", title);
// result.add(tempmap1);
// Map<String, Object> tempmap2 = new HashMap<>();
// content =DataItemUtil.getNative(content);
// tempmap2.put("content", content);
// result.add(tempmap2);
//
//
// Constructor<?> constructor;
//
// constructor = Class.forName(
// PACKAGEURL + result.getClass().getSimpleName() + "Message")
// .getConstructor(ActionResult.class);
// ActionResultMessage<?> action = (ActionResultMessage<?>) constructor.newInstance(result);
// String firstStr = "fromws";
// String secondStr = "global";
// String thirdStr = "msg";
// result.setBizObj((BusinessEntity)bizobj);
// Object obj = action.execute(firstStr, secondStr, thirdStr);
// result.setToipResponse((ToipResponse) obj);
// saveMessageAction(result,type);
// }
// catch (Exception e)
// {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
// }
// @SuppressWarnings("unchecked")
// private void saveMessageAction(AbstractActionResult abstractActionResult,String type)
// {
// Message message = new Message();
// List<Map<String, Object>> list = (List<Map<String, Object>>) abstractActionResult.getData();
// for(Map<String, Object> map : list) {
// for(String str: map.keySet()) {
// if(str.equals("content")) {
// message.setContent(map.get("content").toString());
// }else
// if (str.equals("title"))
// {
// message.setTitle(map.get("title").toString());
// }
// }
// BasicsRo basicsRo = (BasicsRo)abstractActionResult.getToipResponse().getBizObj();
// message.setTime(basicsRo.getDateTime());
// message.setBizId(basicsRo.getId());
// message.setBizclassName(abstractActionResult.getToipResponse().getBizObj().getClass().toString());
// message.setType(type);
// messageService.save(message);
// }
// }
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/el/ELEvaluationContext.java
0 → 100644
View file @
28409f79
package
com
.
yeejoin
.
amos
.
fas
.
business
.
action
.
el
;
import
java.util.Map
;
import
org.springframework.expression.EvaluationContext
;
import
org.springframework.expression.ExpressionParser
;
import
org.springframework.expression.spel.standard.SpelExpressionParser
;
import
org.springframework.expression.spel.support.StandardEvaluationContext
;
public
class
ELEvaluationContext
{
private
static
EvaluationContext
instance
=
new
StandardEvaluationContext
();
private
static
ExpressionParser
parser
=
new
SpelExpressionParser
();
public
static
EvaluationContext
getInstance
()
{
return
instance
;
}
public
static
void
setVariable
(
String
name
,
Object
value
)
{
instance
.
setVariable
(
name
,
value
);
}
public
static
void
setVariable
(
Map
<
String
,
Object
>
vars
)
{
for
(
Map
.
Entry
<
String
,
Object
>
entry
:
vars
.
entrySet
())
{
instance
.
setVariable
(
entry
.
getKey
(),
entry
.
getValue
());
}
}
public
static
Object
getValue
(
String
Expression
){
return
parser
.
parseExpression
(
Expression
).
getValue
(
instance
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/util/DataItemUtil.java
0 → 100644
View file @
28409f79
package
com
.
yeejoin
.
amos
.
fas
.
business
.
action
.
util
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.fas.business.action.el.ELEvaluationContext
;
public
class
DataItemUtil
{
public
static
boolean
getEnable
(
JSONObject
jsonObject
)
{
try
{
return
jsonObject
.
getBooleanValue
(
"enable"
);
}
catch
(
Exception
e
)
{
return
false
;
}
}
public
static
String
getDisplayName
(
JSONObject
jsonObject
)
{
try
{
return
jsonObject
.
get
(
"displayname"
).
toString
();
}
catch
(
Exception
e
)
{
return
null
;
}
}
public
static
String
getValue
(
JSONObject
jsonObject
)
{
try
{
return
jsonObject
.
get
(
"value"
).
toString
();
}
catch
(
Exception
e
)
{
return
null
;
}
}
public
static
String
getName
(
JSONObject
jsonObject
)
{
try
{
return
jsonObject
.
get
(
"name"
).
toString
();
}
catch
(
Exception
e
)
{
return
null
;
}
}
public
static
String
getNative
(
String
str
)
{
Pattern
p
=
Pattern
.
compile
(
"\\{(.*?)\\}"
);
Matcher
m
=
p
.
matcher
(
str
);
while
(
m
.
find
())
{
String
parameter
=
m
.
group
();
Object
parametervalue
=
ELEvaluationContext
.
getValue
(
parameter
.
substring
(
1
,
parameter
.
length
()
-
1
));
if
(
parametervalue
!=
null
)
str
=
str
.
replace
(
parameter
,
parametervalue
!=
null
?
parametervalue
.
toString
()
:
null
);
}
return
str
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/websocket/WebSocketConfig.java
0 → 100644
View file @
28409f79
package
com
.
yeejoin
.
amos
.
fas
.
business
.
action
.
websocket
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.socket.server.standard.ServerEndpointExporter
;
@Configuration
public
class
WebSocketConfig
{
@Bean
public
ServerEndpointExporter
serverEndpointExporter
()
{
return
new
ServerEndpointExporter
();
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/BaseController.java
View file @
28409f79
...
...
@@ -249,6 +249,8 @@ public class BaseController {
if
(
reginParams
.
getCompany
()
!=
null
)
{
return
reginParams
.
getCompany
().
getOrgCode
();
}
return
null
;
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireCarController.java
View file @
28409f79
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.fas.business.controller;
import
java.util.Date
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -69,8 +70,9 @@ public class FireCarController extends BaseController {
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"上传消防车图片"
,
notes
=
"上传消防车图片"
)
@RequestMapping
(
value
=
"/uploadCarImg"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
uploadCarImg
(
@ApiParam
(
value
=
"消防车图片"
,
required
=
false
)
@RequestParam
(
value
=
"file"
,
required
=
false
)
MultipartFile
[]
file
,
FireCar
fireCar
)
{
public
CommonResponse
uploadCarImg
(
@ApiParam
(
value
=
"消防车图片"
,
required
=
false
)
@RequestParam
(
value
=
"file"
,
required
=
false
)
MultipartFile
[]
file
,
FireCar
fireCar
,
BindingResult
bindingResult
)
{
System
.
out
.
print
(
fireCar
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
fireCar
.
setOrgCode
(
compCode
);
...
...
@@ -78,5 +80,4 @@ public class FireCarController extends BaseController {
fireCarService
.
saveFireCarAndPhoto
(
fireCar
,
file
);
return
CommonResponseUtil
.
success
();
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireEquimtPointController.java
View file @
28409f79
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.fas.business.controller;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentPointEntity
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireEquipPontService
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
...
...
@@ -45,11 +46,13 @@ public class FireEquimtPointController extends BaseController {
if
(
fireEquipmentPoint
==
null
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getName
())
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getFireEquipmentId
())
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getType
())
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getCode
()))
throw
new
Exception
(
"数据校验失败."
);
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getCode
())){
return
CommonResponseUtil
.
failure
(
"请检查必填字段"
);
};
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
fireEquipmentPoint
.
setOrgCode
(
compCode
);
fireEquipmentPoint
.
setCreateBy
(
getUserId
());
fireEquipmentPoint
.
setCreateDate
(
new
Date
());
return
CommonResponseUtil
.
success
(
fireEquipPontService
.
savePoint
(
fireEquipmentPoint
));
...
...
@@ -100,13 +103,16 @@ public class FireEquimtPointController extends BaseController {
@ApiParam
(
value
=
"监测点编号或者监测点名称模糊匹配"
)
@RequestParam
(
required
=
false
)
String
searchValue
,
@ApiParam
(
value
=
"类型(模拟量:ANALOGUE;开关量:SWITCH)"
)
@RequestParam
(
required
=
false
)
String
type
)
{
Map
<
String
,
Object
>
queryMap
=
Maps
.
newHashMap
();
queryMap
.
put
(
"offset"
,
pageNumber
*
pageSize
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
queryMap
.
put
(
"pageNumber"
,
pageNumber
);
queryMap
.
put
(
"pageSize"
,
pageSize
);
if
(
isBindDevice
!=
null
&&
isBindDevice
==
0
)
{
queryMap
.
put
(
"fireEquipmentId"
,
0
);
}
queryMap
.
put
(
"searchValue"
,
searchValue
);
queryMap
.
put
(
"type"
,
type
);
queryMap
.
put
(
"compCode"
,
compCode
);
return
fireEquipPontService
.
queryByMap
(
queryMap
);
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireSourceController.java
View file @
28409f79
This diff is collapsed.
Click to expand it.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireStationController.java
View file @
28409f79
...
...
@@ -55,7 +55,12 @@ public class FireStationController extends BaseController {
fireStationFireEquipment
.
setCreateBy
(
"0"
);
fireStationFireEquipment
.
setCreateDate
(
new
Date
());
}
return
CommonResponseUtil
.
success
(
iFireStationService
.
saveStationFireEquipment
(
fireStationFireEquipments
));
try
{
List
<
FireStationFireEquipment
>
fireStationFireEquipments1
=
iFireStationService
.
saveStationFireEquipment
(
fireStationFireEquipments
);
return
CommonResponseUtil
.
success
(
fireStationFireEquipments1
);
}
catch
(
Exception
e
){
return
CommonResponseUtil
.
failure
(
e
.
getMessage
());
}
}
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"解除绑定消防设备"
,
notes
=
"解除绑定消防设备"
)
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/RiskSourceController.java
View file @
28409f79
...
...
@@ -27,6 +27,7 @@ import com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService;
import
com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus
;
import
com.yeejoin.amos.fas.business.service.model.FireEquimentDataRo
;
import
com.yeejoin.amos.fas.business.service.model.ProtalDataRo
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
...
...
@@ -107,7 +108,9 @@ public class RiskSourceController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取风险点树型结构"
,
notes
=
"获取风险点树型结构"
)
@RequestMapping
(
value
=
"/riskSourceTress"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getRiskSourceTress
()
{
List
<
RiskSourceTreeResponse
>
riskSources
=
riskSourceService
.
findRiskSourceTrees
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
List
<
RiskSourceTreeResponse
>
riskSources
=
riskSourceService
.
findRiskSourceTrees
(
compCode
);
return
CommonResponseUtil
.
success
(
getRiskSourcesTree
(
riskSources
));
}
...
...
@@ -138,7 +141,9 @@ public class RiskSourceController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"统计级别为1的风险点下面"
,
notes
=
"获取风险点树型结构"
)
@RequestMapping
(
value
=
"/riskSourceStatistics"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
riskSourceStatistics
()
throws
Exception
{
List
<
RiskSourceTreeResponse
>
riskSources
=
riskSourceService
.
findRiskSourceTrees
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
List
<
RiskSourceTreeResponse
>
riskSources
=
riskSourceService
.
findRiskSourceTrees
(
compCode
);
List
<
RiskSourceTreeResponse
>
treeRiskSources
=
getRiskSourcesTree
(
riskSources
);
return
CommonResponseUtil
.
success
(
riskSourceStatistics
(
treeRiskSources
));
}
...
...
@@ -632,7 +637,9 @@ public class RiskSourceController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取危险因素树二级节点"
,
notes
=
"获取危险因素树二级节点"
)
@RequestMapping
(
value
=
"/riskSourceSecondLevel"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryRiskSourceSecondLevel
()
{
return
CommonResponseUtil
.
success
(
riskSourceService
.
queryRiskSourceSecondLevel
());
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
return
CommonResponseUtil
.
success
(
riskSourceService
.
queryRiskSourceSecondLevel
(
compCode
));
}
/**
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/WaterResourceController.java
View file @
28409f79
...
...
@@ -91,8 +91,9 @@ public class WaterResourceController extends BaseController{
@RequestParam
int
pageSize
)
{
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
queryForPage
(
StringUtils
.
trimToNull
(
name
),
StringUtils
.
trimToNull
(
code
),
StringUtils
.
trimToNull
(
type
),
commonPageable
));
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
queryForPage
(
compCode
,
StringUtils
.
trimToNull
(
name
),
StringUtils
.
trimToNull
(
code
),
StringUtils
.
trimToNull
(
type
),
commonPageable
));
}
//@Authorization(ingore = true)
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/FireStrengthMapper.java
View file @
28409f79
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Param
;
import
com.yeejoin.amos.fas.dao.entity.FireStrength
;
public
interface
FireStrengthMapper
extends
BaseMapper
{
Map
queryOne
(
@Param
(
"id"
)
Long
id
);
List
<
Map
>
queryForPage
(
@Param
(
"username"
)
String
username
,
@Param
(
"code"
)
String
code
,
@Param
(
"start"
)
long
start
,
@Param
(
"length"
)
Integer
length
);
Long
queryCountForPage
(
@Param
(
"username"
)
String
username
,
@Param
(
"code"
)
String
code
);
List
<
FireStrength
>
queryForStrengthList
(
@Param
(
"time"
)
String
time
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/RiskSourceMapper.java
View file @
28409f79
...
...
@@ -42,7 +42,7 @@ public interface RiskSourceMapper extends BaseMapper {
List
<
Map
>
queryForMatrix
();
List
<
RiskSourceTreeResponse
>
getRiskSources
();
List
<
RiskSourceTreeResponse
>
getRiskSources
(
String
compCode
);
List
<
RiskSourceTreeResponse
>
getRiskSourcesEquipment
();
...
...
@@ -87,7 +87,7 @@ public interface RiskSourceMapper extends BaseMapper {
List
<
RiskSource
>
queryByFactor
(
@Param
(
"factorId"
)
Long
factorId
);
List
<
HashMap
<
String
,
Object
>>
queryRiskSourceSecondLevel
();
List
<
HashMap
<
String
,
Object
>>
queryRiskSourceSecondLevel
(
String
compCode
);
List
<
RiskSourceTreeResponse
>
getRiskSourcesFireEquipmentByType
(
@Param
(
"type"
)
String
[]
type
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/RuleRuningSnapshotMapper.java
View file @
28409f79
...
...
@@ -9,4 +9,6 @@ public interface RuleRuningSnapshotMapper extends BaseMapper{
RuleRuningSnapshot
querForObject
(
String
batchNo
);
List
<
RuleRuningSnapshot
>
querForObjectList
(
String
batchNo
);
void
save
(
RuleRuningSnapshot
ruleRuningSnapshot
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
View file @
28409f79
...
...
@@ -144,7 +144,7 @@ public interface View3dMapper extends BaseMapper{
*/
List
<
View3dNodeVo
>
initViewErrorNode
(
String
type
,
Long
riskSourceId
,
String
orgCode
);
List
<
Node3DVoResponse
>
findViewDataByType
(
String
type
,
Long
riskSourceId
,
String
orgCode
);
List
<
Node3DVoResponse
>
findViewDataByType
(
@Param
(
"type"
)
String
type
,
@Param
(
"riskSourceId"
)
Long
riskSourceId
,
@Param
(
"orgCode"
)
String
orgCode
);
Long
retrieveAllCount
(
String
type
,
String
inputText
,
String
orgCode
,
String
dataLevel
,
String
protectObjName
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/WaterResourceMapper.java
View file @
28409f79
...
...
@@ -14,12 +14,14 @@ public interface WaterResourceMapper extends BaseMapper {
List
<
Map
>
queryForPage
(
@Param
(
"orgCode"
)
String
compCode
,
@Param
(
"name"
)
String
name
,
@Param
(
"code"
)
String
code
,
@Param
(
"type"
)
String
type
,
@Param
(
"start"
)
long
start
,
@Param
(
"length"
)
Integer
length
);
Long
queryCountForPage
(
@Param
(
"orgCode"
)
String
compCode
,
@Param
(
"name"
)
String
name
,
@Param
(
"code"
)
String
code
,
@Param
(
"type"
)
String
type
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IFireEquipmentDao.java
View file @
28409f79
...
...
@@ -16,4 +16,6 @@ public interface IFireEquipmentDao extends BaseDao<FireEquipment, Long> {
Optional
<
FireEquipment
>
findById
(
Long
id
);
@Query
(
value
=
"SELECT count(1) FROM `f_fire_station_equipment` WHERE fire_equipment_id in ?1"
,
nativeQuery
=
true
)
int
countAssociatedEquipStationByIds
(
String
[]
ids
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IFireStationDao.java
View file @
28409f79
...
...
@@ -10,5 +10,4 @@ import com.yeejoin.amos.fas.dao.entity.FireStation;
public
interface
IFireStationDao
extends
BaseDao
<
FireStation
,
Long
>
{
Optional
<
FireStation
>
findById
(
Long
id
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IWaterResourceDao.java
View file @
28409f79
...
...
@@ -4,6 +4,7 @@ import com.yeejoin.amos.fas.dao.entity.WaterResource;
import
java.util.Optional
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.stereotype.Repository
;
@Repository
(
"iWaterResourceDao"
)
...
...
@@ -11,4 +12,6 @@ public interface IWaterResourceDao extends BaseDao<WaterResource, Long> {
Optional
<
WaterResource
>
findById
(
Long
id
);
@Query
(
value
=
"SELECT count(1) FROM `f_water_resource_equipment` WHERE fire_equipment_id in ?1"
,
nativeQuery
=
true
)
int
countAssociatedEquipWaterByIds
(
String
[]
ids
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceImpl.java
View file @
28409f79
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
com.yeejoin.amos.component.rule.RuleTrigger
;
import
com.yeejoin.amos.fas.business.action.ContingencyAction
;
import
com.yeejoin.amos.fas.business.action.result.BubbleTipResult
;
import
com.yeejoin.amos.fas.business.dao.mapper.ImpAndFireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyOriginalDataDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyPlanInstanceRepository
;
...
...
@@ -11,6 +14,8 @@ import com.yeejoin.amos.fas.business.service.model.OperateGroup;
import
com.yeejoin.amos.fas.dao.entity.ContingencyOriginalData
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.codehaus.jackson.map.ObjectMapper
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -63,6 +68,8 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
private
static
Map
<
String
,
String
>
stepMap
=
new
HashMap
<>();
@Autowired
private
RuleTrigger
ruleTrigger
;
/* public ContingencyInstanceImpl(IContingencyPlanInstanceRepository repository) {
super(repository);
...
...
@@ -169,11 +176,17 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
Equipment
equipment
=
impAndFireEquipMapper
.
queryImpEqumtByFireEquipmt
(
Long
.
parseLong
(
contingencyRo
.
getFireEquipmentId
()));
Object
result
=
remoteRuleServer
.
fireRuleFlow
(
contingencyRo
,
equipment
.
getReservePlan
(),
equipment
.
getName
());
String
url
=
remoteRuleUrl
+
"/urule/rule/refreshTimeline?batchNo="
+
batchNo
;
restTemplate
.
exchange
(
url
,
HttpMethod
.
GET
,
HttpEntity
.
EMPTY
,
Object
.
class
);
//Object result = remoteRuleServer.fireRuleFlow(contingencyRo, equipment.getReservePlan(),equipment.getName());
equipment
.
setName
(
"极Ⅰ高端YY换流变A相"
);
ruleTrigger
.
publish
(
contingencyRo
,
equipment
.
getReservePlan
(),
ArrayUtils
.
toArray
(
equipment
.
getName
()));
BubbleTipResult
result1
=
new
BubbleTipResult
();
Map
<
String
,
Object
>
tempmap2
=
new
HashMap
<>();
tempmap2
.
put
(
"refresh"
,
"refresh"
);
tempmap2
.
put
(
"batchNo"
,
batchNo
);
ContingencyAction
.
sendcmd
(
"fromws"
,
"recordArea"
,
"refresh"
,
result1
);
// String url = remoteRuleUrl + "/urule/rule/refreshTimeline?batchNo=" + batchNo;
//restTemplate.exchange(url, HttpMethod.GET, HttpEntity.EMPTY, Object.class);
}
else
{
throw
new
Exception
(
"数据异常,请联系管理员."
);
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/EquipmentServiceImpl.java
View file @
28409f79
...
...
@@ -243,6 +243,10 @@ public class EquipmentServiceImpl implements IEquipmentService {
}
long
total
=
this
.
impAndFireEquipMapper
.
queryBindFirEqumtPageCount
(
String
.
valueOf
(
equipmentId
));
List
<
FireEquipment
>
list
=
this
.
impAndFireEquipMapper
.
queryBindFirEqumtPage
(
start
,
length
,
String
.
valueOf
(
equipmentId
));
if
(
commonPageable
==
null
)
{
commonPageable
=
new
CommonPageable
();
}
Page
result
=
new
PageImpl
(
list
,
commonPageable
,
total
);
return
result
;
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireCarServiceImpl.java
View file @
28409f79
...
...
@@ -105,7 +105,7 @@ public class FireCarServiceImpl implements IFireCarService {
List
<
DepartmentModel
>
depts
=
remoteSecurityService
.
listDepartmentByDeptIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
deptIds
));
Map
<
Long
,
String
>
deptMap
=
depts
.
stream
().
collect
(
Collectors
.
toMap
(
DepartmentModel:
:
getSequenceNbr
,
DepartmentModel:
:
getDepartmentName
));
content
.
forEach
(
e
->
{
e
.
put
(
"departmentName"
,
deptMap
.
get
(
e
.
get
(
"dept_id"
)));
e
.
put
(
"departmentName"
,
deptMap
.
get
(
Long
.
valueOf
(
e
.
get
(
"dept_id"
).
toString
()
)));
});
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireEquipPointServiceImpl.java
View file @
28409f79
...
...
@@ -92,13 +92,14 @@ public class FireEquipPointServiceImpl implements IFireEquipPontService {
@Override
public
CommonResponse
queryByMap
(
Map
<
String
,
Object
>
map
)
{
int
pageNumber
=
map
.
get
(
"pageNumber"
)
!=
null
?
Integer
.
parseInt
(
map
.
get
(
"pageNumber"
).
toString
())
:
0
;
int
pageSize
=
map
.
get
(
"pageSize"
)
!=
null
?
Integer
.
parseInt
(
map
.
get
(
"pageSize"
).
toString
())
:
0
;
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
Long
total
=
fireEquipPointMapper
.
countByMap
(
map
);
if
(
total
.
equals
(
0L
))
{
return
CommonResponseUtil
.
success
(
new
PageImpl
<>(
Lists
.
newArrayList
(),
null
,
total
));
return
CommonResponseUtil
.
success
(
new
PageImpl
<>(
Lists
.
newArrayList
(),
commonPageable
,
total
));
}
int
pageNumber
=
map
.
get
(
"pageNumber"
)
!=
null
?
Integer
.
parseInt
(
map
.
get
(
"pageNumber"
).
toString
())
:
0
;
int
pageSize
=
map
.
get
(
"pageSize"
)
!=
null
?
Integer
.
parseInt
(
map
.
get
(
"pageSize"
).
toString
())
:
0
;
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
map
.
put
(
"offset"
,
pageNumber
*
pageSize
);
List
<
FireEquipmentPointEntity
>
list
=
fireEquipPointMapper
.
listByMap
(
map
);
return
CommonResponseUtil
.
success
(
new
PageImpl
<>(
list
,
commonPageable
,
total
));
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireEquipServiceImpl.java
View file @
28409f79
...
...
@@ -189,7 +189,8 @@ public class FireEquipServiceImpl implements IFireEquipService {
return
returnEntity
;
}
@Override
public
int
countAssociatedEquipStationByIds
(
String
[]
ids
)
{
return
iFireEquipmentDao
.
countAssociatedEquipStationByIds
(
ids
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireStrengthServiceImpl.java
View file @
28409f79
...
...
@@ -17,57 +17,46 @@ import java.util.Optional;
@Service
(
"fireStengthService"
)
public
class
FireStrengthServiceImpl
implements
FireStengthService
{
@Autowired
private
FireStrengthPointDao
fireStrengthPointDao
;
@Autowired
private
FireStrengthMapper
fireStrengthMapper
;
public
FireStrength
savePoint
(
FireStrength
fireEquipmentPoint
)
{
public
FireStrength
savePoint
(
FireStrength
fireEquipmentPoint
)
{
return
fireStrengthPointDao
.
save
(
fireEquipmentPoint
);
}
public
Map
queryOne
(
Long
id
)
{
public
Map
queryOne
(
Long
id
)
{
return
fireStrengthMapper
.
queryOne
(
id
);
}
public
String
[]
deletePoint
(
String
[]
idArray
)
throws
Exception
{
for
(
String
id:
idArray
)
{
public
String
[]
deletePoint
(
String
[]
idArray
)
throws
Exception
{
for
(
String
id
:
idArray
)
{
Optional
<
FireStrength
>
fireEquipmentPoint1
=
fireStrengthPointDao
.
findById
(
Long
.
parseLong
(
id
));
FireStrength
fireEquipmentPoint
=
null
;
if
(
fireEquipmentPoint1
.
isPresent
())
{
fireEquipmentPoint
=
fireEquipmentPoint1
.
get
();
FireStrength
fireEquipmentPoint
=
null
;
if
(
fireEquipmentPoint1
.
isPresent
())
{
fireEquipmentPoint
=
fireEquipmentPoint1
.
get
();
}
if
(
fireEquipmentPoint
!=
null
)
{
if
(
fireEquipmentPoint
!=
null
)
{
this
.
fireStrengthPointDao
.
deleteById
(
Long
.
parseLong
(
id
));
}
else
{
throw
new
Exception
(
"找不到指定的监测点:"
+
id
);
}
else
{
throw
new
Exception
(
"找不到指定的监测点:"
+
id
);
}
}
return
idArray
;
}
public
Page
queryByFireEquimt
(
String
username
,
String
code
,
CommonPageable
pageable
)
{
Long
total
=
fireStrengthMapper
.
queryCountForPage
(
username
,
code
);
List
<
Map
>
content
=
fireStrengthMapper
.
queryForPage
(
username
,
code
,
pageable
.
getOffset
(),
pageable
.
getPageSize
());
Page
result
=
new
PageImpl
(
content
,
pageable
,
total
);
public
Page
queryByFireEquimt
(
String
username
,
String
code
,
CommonPageable
pageable
)
{
Long
total
=
fireStrengthMapper
.
queryCountForPage
(
username
,
code
);
List
<
Map
>
content
=
fireStrengthMapper
.
queryForPage
(
username
,
code
,
pageable
.
getOffset
(),
pageable
.
getPageSize
());
Page
result
=
new
PageImpl
(
content
,
pageable
,
total
);
return
result
;
}
public
List
<
FireStrength
>
queryForStrengthList
(
String
time
)
{
return
fireStrengthMapper
.
queryForStrengthList
(
time
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
28409f79
...
...
@@ -22,6 +22,7 @@ import java.util.stream.Collectors;
import
javax.annotation.PostConstruct
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -267,6 +268,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
int
count
=
iRiskSourceDao
.
countByParentId
(
rId
);
Optional
<
RiskSource
>
rs
=
iRiskSourceDao
.
findById
(
rId
);
rs
.
ifPresent
(
riskSource
->
parentIds
.
add
(
riskSource
.
getParentId
()));
if
(
parentIds
.
contains
(
0
l
)){
throw
new
YeeException
(
"公司节点不能删除"
);
}
if
(
count
>
0
)
{
throw
new
YeeException
(
"该数据有关联子项,请先删除子项数据"
);
}
...
...
@@ -392,8 +396,8 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
@Override
public
List
<
RiskSourceTreeResponse
>
findRiskSourceTrees
()
{
return
riskSourceMapper
.
getRiskSources
();
public
List
<
RiskSourceTreeResponse
>
findRiskSourceTrees
(
String
compCode
)
{
return
riskSourceMapper
.
getRiskSources
(
compCode
);
}
@Override
...
...
@@ -546,7 +550,8 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
//Object result = remoteRuleServer.fireRuleFlow(contingencyRo, equipment.getReservePlan(), equipment.getName());
ruleTrigger
.
publish
(
contingencyRo
,
equipment
.
getReservePlan
());
equipment
.
setName
(
"极Ⅰ高端YY换流变A相"
);
ruleTrigger
.
publish
(
contingencyRo
,
equipment
.
getReservePlan
(),
ArrayUtils
.
toArray
(
equipment
.
getName
()));
ContingencyOriginalData
contingencyOriginalData
=
new
ContingencyOriginalData
();
BeanUtils
.
copyProperties
(
contingencyRo
,
contingencyOriginalData
);
iContingencyOriginalDataDao
.
save
(
contingencyOriginalData
);
...
...
@@ -588,9 +593,10 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Override
public
Page
<
Map
<
String
,
Object
>>
listFmeaPointInputitem
(
String
toke
,
String
product
,
String
appKey
,
Long
fmeaId
,
Integer
pageNumber
,
Integer
pageSize
)
{
List
<
Map
<
String
,
Object
>>
content
=
Lists
.
newArrayList
();
CommonPageable
pageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
long
total
=
fmeaPointInputitemMapper
.
countByFmeaId
(
fmeaId
);
if
(
total
==
0L
)
{
return
new
PageImpl
<>(
content
,
null
,
total
);
return
new
PageImpl
<>(
content
,
pageable
,
total
);
}
content
=
fmeaPointInputitemMapper
.
listByFmeaId
(
fmeaId
,
pageNumber
,
pageSize
);
if
(!
CollectionUtils
.
isEmpty
(
content
)){
...
...
@@ -621,14 +627,14 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
e
.
put
(
"tel"
,
userMap
.
get
(
String
.
valueOf
(
e
.
get
(
"deptId"
)+
"tel"
)));
});
}
return
new
PageImpl
<>(
content
,
null
,
total
);
return
new
PageImpl
<>(
content
,
pageable
,
total
);
}
@Override
public
Page
<
Map
<
String
,
Object
>>
listFeamEquipmentPoint
(
Long
fmeaId
,
Integer
pageNumber
,
Integer
pageSize
)
{
long
total
=
fmeaEquipmentPointMapper
.
countByFmeaId
(
fmeaId
);
List
<
Map
<
String
,
Object
>>
content
=
fmeaEquipmentPointMapper
.
listByFmeaId
(
fmeaId
,
pageNumber
,
pageSize
);
return
new
PageImpl
<>(
content
,
n
ull
,
total
);
return
new
PageImpl
<>(
content
,
n
ew
CommonPageable
(
pageNumber
,
pageSize
)
,
total
);
}
...
...
@@ -1009,9 +1015,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
@Override
public
List
<
HashMap
<
String
,
Object
>>
queryRiskSourceSecondLevel
()
{
public
List
<
HashMap
<
String
,
Object
>>
queryRiskSourceSecondLevel
(
String
compCode
)
{
// TODO Auto-generated method stub
return
riskSourceMapper
.
queryRiskSourceSecondLevel
();
return
riskSourceMapper
.
queryRiskSourceSecondLevel
(
compCode
);
}
@Override
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RuleRunigSnapshotServiceImpl.java
View file @
28409f79
...
...
@@ -61,40 +61,40 @@ public class RuleRunigSnapshotServiceImpl
// }
//
//
//
/**
//
* 保存动作记录
//
* @param methodName
//
* @param paramsAndTypes
//
* @param matchedObj
//
*/
//
public void process(Object bean,String methodName,String paramsAndTypes,Object matchedObj)
//
{
//
//
if(bean instanceof CustomerAction)
//
{
//
Set set = (Set) matchedObj;
//
BasicsRo fireEquimentDataRo = (BasicsRo) set.iterator().next();
//
//
RuleRuningSnapshot ruleRuningSnapshot = new RuleRuningSnapshot();
//
ruleRuningSnapshot.setId(UUID.randomUUID().toString());
//
ruleRuningSnapshot.setMethodClass(bean.getClass().getName());
//
ruleRuningSnapshot.setMethodName(methodName);
//
ruleRuningSnapshot.setMethodParam(paramsAndTypes);
//
// ruleRuningSnapshot.setBatchNo(fireEquimentDataRo.getBatchNo
());
// ruleRuningSnapshot.setPackageId(fireEquimentDataRo.getPackageId(
));
// ruleRuningSnapshot.setEquipmentId(String.valueOf(fireEquimentDataRo.getId()));
//
// Date now = new Date(
);
// ruleRuningSnapshot.setCreateTime(now
);
// ruleRuningSnapshot.setCreateMillisecond(String.valueOf(now.getTime())
);
// ruleRuningSnapshot.setPreviousInterval(0L
);
// RuleRuningSnapshot oldEntity = repository.querForObject(fireEquimentDataRo.getBatchNo());
// if(oldEntity != null)
// ruleRuningSnapshot.setPreviousInterval(now.getTime() - Long.parseLong(oldEntity.getCreateMillisecond())
);
// this.repository
.save(ruleRuningSnapshot);
//
}
//
}
/**
* 保存动作记录
* @param methodName
* @param paramsAndTypes
* @param matchedObj
*/
public
void
process
(
Object
bean
,
String
methodName
,
String
paramsAndTypes
,
Object
matchedObj
)
{
if
(
bean
instanceof
CustomerAction
)
{
Set
set
=
(
Set
)
matchedObj
;
BasicsRo
fireEquimentDataRo
=
(
BasicsRo
)
set
.
iterator
().
next
();
RuleRuningSnapshot
ruleRuningSnapshot
=
new
RuleRuningSnapshot
();
ruleRuningSnapshot
.
setId
(
UUID
.
randomUUID
().
toString
());
ruleRuningSnapshot
.
setMethodClass
(
bean
.
getClass
().
getName
());
ruleRuningSnapshot
.
setMethodName
(
methodName
);
ruleRuningSnapshot
.
setMethodParam
(
paramsAndTypes
);
ruleRuningSnapshot
.
setBatchNo
(
fireEquimentDataRo
.
getBatchNo
());
//ruleRuningSnapshot.setPackageId(fireEquimentDataRo.getPackageId
());
//ruleRuningSnapshot.setEquipmentId(String.valueOf(fireEquimentDataRo.getId()
));
Date
now
=
new
Date
();
ruleRuningSnapshot
.
setCreateTime
(
now
);
ruleRuningSnapshot
.
setCreateMillisecond
(
String
.
valueOf
(
now
.
getTime
())
);
ruleRuningSnapshot
.
setPreviousInterval
(
0L
);
RuleRuningSnapshot
oldEntity
=
ruleRuningSnapshotMapper
.
querForObject
(
fireEquimentDataRo
.
getBatchNo
()
);
if
(
oldEntity
!=
null
)
ruleRuningSnapshot
.
setPreviousInterval
(
now
.
getTime
()
-
Long
.
parseLong
(
oldEntity
.
getCreateMillisecond
()));
//repository.save(ruleRuningSnapshot
);
ruleRuningSnapshotMapper
.
save
(
ruleRuningSnapshot
);
}
}
@Async
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
28409f79
...
...
@@ -299,8 +299,7 @@ public class View3dServiceImpl implements IView3dService {
}
Optional
<
RiskSource
>
optional
=
iRiskSourceDao
.
findByOrgCodeAndParentId
(
orgCode
,
0L
);
TodaySafetyIndexVo
vo
=
new
TodaySafetyIndexVo
();
if
(
optional
.
isPresent
()){
//1.按照等级进行转换rpn为分数-机构
if
(
optional
.
isPresent
()){
//1.按照等级进行转换rpn为分数-机构
RiskSource
riskSource
=
optional
.
get
();
double
safetyIndex
=
this
.
changeRpnToSafetyIndex
(
riskSource
.
getRpn
());
vo
.
setSafetyIndex
(
safetyIndex
);
...
...
@@ -424,7 +423,8 @@ public class View3dServiceImpl implements IView3dService {
List
<
RiskSource
>
regionList
=
iRiskSourceDao
.
findByParentIdAndIsRegion
(
optional
.
get
().
getId
(),
RiskSourceRegionEum
.
TRUE
.
getCode
());
exceptionList
=
regionList
.
stream
().
filter
(
riskSource
->
{
BigDecimal
rpn
=
riskSource
.
getRpn
()
==
null
?
new
BigDecimal
(
"0"
)
:
riskSource
.
getRpn
();
return
rpn
.
subtract
(
riskSource
.
getRpni
()).
doubleValue
()
>
0
;
BigDecimal
rpni
=
riskSource
.
getRpni
()
==
null
?
new
BigDecimal
(
"0"
)
:
riskSource
.
getRpni
();
return
rpn
.
subtract
(
rpni
).
doubleValue
()
>
0
;
}).
map
(
riskSource
->
{
ExceptionRegionVo
regionVo
=
new
ExceptionRegionVo
();
regionVo
.
setId
(
riskSource
.
getId
());
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/WaterResourceServiceImpl.java
View file @
28409f79
...
...
@@ -68,10 +68,10 @@ public class WaterResourceServiceImpl implements IWaterResourceService {
}
public
Page
queryForPage
(
String
username
,
String
code
,
String
type
,
CommonPageable
pageable
)
public
Page
queryForPage
(
String
compCode
,
String
username
,
String
code
,
String
type
,
CommonPageable
pageable
)
{
Long
total
=
waterResourceMapper
.
queryCountForPage
(
username
,
code
,
type
);
List
<
Map
>
content
=
waterResourceMapper
.
queryForPage
(
username
,
code
,
type
,
pageable
.
getOffset
(),
pageable
.
getPageSize
());
Long
total
=
waterResourceMapper
.
queryCountForPage
(
compCode
,
username
,
code
,
type
);
List
<
Map
>
content
=
waterResourceMapper
.
queryForPage
(
compCode
,
username
,
code
,
type
,
pageable
.
getOffset
(),
pageable
.
getPageSize
());
Page
result
=
new
PageImpl
(
content
,
pageable
,
total
);
return
result
;
}
...
...
@@ -98,7 +98,7 @@ public class WaterResourceServiceImpl implements IWaterResourceService {
for
(
WaterResourceEquipment
waterResourceEquipment:
waterResourceEquipments
){
WaterResourceEquipment
saveWaterResourceEquipment
=
iWaterResourceEquipmentDao
.
findByWaterResourceIdAndFireEquipmentId
(
waterResourceEquipment
.
getWaterResourceId
(),
waterResourceEquipment
.
getFireEquipmentId
());
if
(
StringUtil
.
isNotEmpty
(
saveWaterResourceEquipment
)){
deleteList
.
add
(
w
aterResourceEquipment
);
deleteList
.
add
(
saveW
aterResourceEquipment
);
}
}
iWaterResourceEquipmentDao
.
deleteAll
(
deleteList
);
...
...
@@ -120,8 +120,8 @@ public class WaterResourceServiceImpl implements IWaterResourceService {
}
@Override
public
int
countAssociatedEquipWaterByIds
(
String
[]
ids
)
{
return
iWaterResourceDao
.
countAssociatedEquipWaterByIds
(
ids
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/FireStengthService.java
View file @
28409f79
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.data.domain.Page
;
...
...
@@ -40,5 +41,6 @@ public interface FireStengthService {
*/
Page
queryByFireEquimt
(
String
username
,
String
code
,
CommonPageable
pageable
);
List
<
FireStrength
>
queryForStrengthList
(
String
time
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IFireEquipService.java
View file @
28409f79
...
...
@@ -18,15 +18,10 @@ public interface IFireEquipService {
List
<
String
>
findFireEquipArea
();
FireEquipment
save
(
FireEquipment
fireEquipment
);
FireEquipment
queryOne
(
Long
id
);
/**
* 删除单个风险点
* @return
...
...
@@ -34,8 +29,6 @@ public interface IFireEquipService {
*/
String
[]
delete
(
String
[]
idArray
)
throws
Exception
;
Page
queryForFireEquipmentHistory
(
String
fireEquipmentName
,
String
equipmentName
,
String
startTime
,
...
...
@@ -44,9 +37,13 @@ public interface IFireEquipService {
Page
queryForEquipmentList
(
String
name
,
String
code
,
String
equipClassify
,
CommonPageable
commonPageable
);
//查询设备明细
Object
queryForDetail
(
String
type
,
Long
id
)
throws
Exception
;
/**
* 查询关联数量
* @param ids
* @return
*/
int
countAssociatedEquipStationByIds
(
String
[]
ids
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IRiskSourceService.java
View file @
28409f79
...
...
@@ -52,7 +52,7 @@ public interface IRiskSourceService {
/**
* 获取所有风险点
*/
List
<
RiskSourceTreeResponse
>
findRiskSourceTrees
();
List
<
RiskSourceTreeResponse
>
findRiskSourceTrees
(
String
compCode
);
List
<
FmeaEquipmentPoint
>
bindFireEquiment
(
FmeaBindParam
fmeaBindParam
);
...
...
@@ -93,7 +93,7 @@ public interface IRiskSourceService {
void
saveData
(
List
<
AlarmParam
>
deviceDatas
,
String
type
);
List
<
HashMap
<
String
,
Object
>>
queryRiskSourceSecondLevel
();
List
<
HashMap
<
String
,
Object
>>
queryRiskSourceSecondLevel
(
String
compCode
);
List
<
RiskSourceTreeResponse
>
findRiskSourceEquipStatistics
();
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IRuleRunningSnapshotService.java
View file @
28409f79
...
...
@@ -15,5 +15,4 @@ public interface IRuleRunningSnapshotService
void
replay
(
String
batchNo
)
throws
Exception
;
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IWaterResourceService.java
View file @
28409f79
...
...
@@ -39,7 +39,7 @@ public interface IWaterResourceService {
* 查询指定设备的风险点列表
* @return
*/
Page
queryForPage
(
String
username
,
String
code
,
String
type
,
CommonPageable
pageable
);
Page
queryForPage
(
String
compCode
,
String
username
,
String
code
,
String
type
,
CommonPageable
pageable
);
void
saveBindFireEquipment
(
List
<
WaterResourceEquipment
>
waterResourceEquipments
);
...
...
@@ -54,4 +54,6 @@ public interface IWaterResourceService {
Object
queryForList
();
int
countAssociatedEquipWaterByIds
(
String
[]
ids
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/model/ContingencyRo.java
View file @
28409f79
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
model
;
public
class
ContingencyRo
extends
BasicsRo
{
import
java.io.Serializable
;
public
class
ContingencyRo
implements
Serializable
{
private
String
batchNo
;
private
String
fireEquipmentName
;
//消防设备名称
public
String
getBatchNo
()
{
return
batchNo
;
}
public
void
setBatchNo
(
String
batchNo
)
{
this
.
batchNo
=
batchNo
;
}
/**
*
*/
private
static
final
long
serialVersionUID
=
451541541451L
;
private
String
fireEquipmentName
;
//消防设备名称
private
String
fireEquipmentId
;
//消防设备id
private
int
layer
;
//显示图层
private
Integer
layer
=
0
;
//显示图层
//当前探测器
private
int
fireEquipmentLayer
;
//当前探测器图层
private
Integer
fireEquipmentLayer
=
0
;
//当前探测器图层
private
String
fireEquipmentPosition
;
//消防设备位置
//重点设备信息
...
...
@@ -26,7 +40,7 @@ public class ContingencyRo extends BasicsRo {
private
String
cameraIds
;
//摄像头id
private
int
fireCount
=
1
;
//火情数量
private
Integer
fireCount
=
1
;
//火情数量
private
String
confirm
=
"NONE"
;
//是否确认火情,确认 CONFIRM,取消CANCEL,未操作 NONE
...
...
@@ -37,7 +51,7 @@ public class ContingencyRo extends BasicsRo {
private
String
fireTruckRoute
;
private
b
oolean
runstep
;
//是否已经执行流程
private
B
oolean
runstep
;
//是否已经执行流程
private
String
step
;
//当前步骤
...
...
@@ -46,201 +60,198 @@ public class ContingencyRo extends BasicsRo {
private
String
stepState
;
//步骤操作状态
public
String
getFireEquipmentName
()
{
return
fireEquipmentName
;
}
public
String
getEquipmentPosition3d
()
{
return
equipmentPosition3d
;
}
public
void
setEquipmentPosition3d
(
String
equipmentPosition3d
)
{
this
.
equipmentPosition3d
=
equipmentPosition3d
;
}
public
String
getButtonState
()
{
return
buttonState
;
}
public
void
setButtonState
(
String
buttonState
)
{
this
.
buttonState
=
buttonState
;
}
public
void
setFireEquipmentName
(
String
fireEquipmentName
)
{
this
.
fireEquipmentName
=
fireEquipmentName
;
}
public
String
getStepState
()
{
return
stepState
;
}
public
void
setStepState
(
String
stepState
)
{
this
.
stepState
=
stepState
;
}
public
String
getFireEquipmentId
()
{
return
fireEquipmentId
;
}
public
String
getButtonCode
(
)
{
return
buttonCode
;
}
public
void
setFireEquipmentId
(
String
fireEquipmentId
)
{
this
.
fireEquipmentId
=
fireEquipmentId
;
}
public
void
setButtonCode
(
String
buttonCode
)
{
this
.
buttonCode
=
buttonCode
;
}
public
Integer
getLayer
(
)
{
return
layer
;
}
public
String
getStep
(
)
{
return
step
;
}
public
void
setLayer
(
Integer
layer
)
{
this
.
layer
=
layer
;
}
public
void
setStep
(
String
step
)
{
this
.
step
=
step
;
}
public
Integer
getFireEquipmentLayer
(
)
{
return
fireEquipmentLayer
;
}
public
void
setFireEquipmentLayer
(
Integer
fireEquipmentLayer
)
{
this
.
fireEquipmentLayer
=
fireEquipmentLayer
;
}
public
String
getFireEquipmentPosition
()
{
return
fireEquipmentPosition
;
}
public
void
setFireEquipmentPosition
(
String
fireEquipmentPosition
)
{
this
.
fireEquipmentPosition
=
fireEquipmentPosition
;
}
public
boolean
getRunstep
()
{
return
runstep
;
}
public
String
getEquipmentId
()
{
return
equipmentId
;
}
public
void
setRunstep
(
boolean
runstep
)
{
this
.
runstep
=
runstep
;
}
public
void
setEquipmentId
(
String
equipmentId
)
{
this
.
equipmentId
=
equipmentId
;
}
public
String
getFireTruckRout
e
()
{
return
fireTruckRout
e
;
}
public
String
getEquipmentNam
e
()
{
return
equipmentNam
e
;
}
public
void
setFireTruckRoute
(
String
fireTruckRout
e
)
{
this
.
fireTruckRoute
=
fireTruckRout
e
;
}
public
void
setEquipmentName
(
String
equipmentNam
e
)
{
this
.
equipmentName
=
equipmentNam
e
;
}
public
String
getPicture1
()
{
return
picture1
;
}
public
String
getEquipmentPosition3d
()
{
return
equipmentPosition3d
;
}
public
void
setPicture1
(
String
picture1
)
{
this
.
picture1
=
picture1
;
}
public
void
setEquipmentPosition3d
(
String
equipmentPosition3d
)
{
this
.
equipmentPosition3d
=
equipmentPosition3d
;
}
public
String
getPicture2
()
{
return
picture2
;
}
public
String
getMobile
()
{
return
mobile
;
}
public
void
setPicture2
(
String
picture2
)
{
this
.
picture2
=
picture2
;
}
public
void
setMobile
(
String
mobile
)
{
this
.
mobile
=
mobile
;
}
public
String
getPicture3
()
{
return
picture3
;
}
public
String
getAdminName
()
{
return
adminName
;
}
public
void
setPicture3
(
String
picture3
)
{
this
.
picture3
=
picture3
;
}
public
void
setAdminName
(
String
adminName
)
{
this
.
adminName
=
adminName
;
}
public
String
getPicture4
()
{
return
picture4
;
}
public
String
getCameraCodes
()
{
return
cameraCodes
;
}
public
void
setPicture4
(
String
picture4
)
{
this
.
picture4
=
picture4
;
}
public
void
setCameraCodes
(
String
cameraCodes
)
{
this
.
cameraCodes
=
cameraCodes
;
}
public
String
getCameraIds
()
{
return
cameraIds
;
}
public
String
getCameraIds
()
{
return
cameraIds
;
}
public
void
setCameraIds
(
String
cameraIds
)
{
this
.
cameraIds
=
cameraIds
;
}
public
void
setCameraIds
(
String
cameraIds
)
{
this
.
cameraIds
=
cameraIds
;
}
public
String
getFireEquipmentPosition
()
{
return
fireEquipmentPosition
;
}
public
Integer
getFireCount
()
{
return
fireCount
;
}
public
void
setFireEquipmentPosition
(
String
fireEquipmentPosition
)
{
this
.
fireEquipmentPosition
=
fireEquipmentPosition
;
}
public
void
setFireCount
(
Integer
fireCount
)
{
this
.
fireCount
=
fireCount
;
}
public
String
getConfirm
()
{
return
confirm
;
}
public
String
getConfirm
()
{
return
confirm
;
}
public
void
setConfirm
(
String
confirm
)
{
this
.
confirm
=
confirm
;
}
public
void
setConfirm
(
String
confirm
)
{
this
.
confirm
=
confirm
;
}
public
int
getFireCount
()
{
return
fireCount
;
}
public
String
getPicture1
()
{
return
picture1
;
}
public
void
setFireCount
(
int
fireCount
)
{
this
.
fireCount
=
fireCount
;
}
public
void
setPicture1
(
String
picture1
)
{
this
.
picture1
=
picture1
;
}
public
String
getEquipmentName
()
{
return
equipmentName
;
}
public
String
getPicture2
()
{
return
picture2
;
}
public
void
setEquipmentName
(
String
equipmentName
)
{
this
.
equipmentName
=
equipmentName
;
}
public
void
setPicture2
(
String
picture2
)
{
this
.
picture2
=
picture2
;
}
public
String
getFireEquipmentId
()
{
return
fireEquipmentId
;
}
public
String
getPicture3
()
{
return
picture3
;
}
public
void
setFireEquipmentId
(
String
fireEquipmentId
)
{
this
.
fireEquipmentId
=
fireEquipmentId
;
}
public
void
setPicture3
(
String
picture3
)
{
this
.
picture3
=
picture3
;
}
public
String
getPicture4
()
{
return
picture4
;
}
public
String
getFireEquipmentName
(
)
{
return
fireEquipmentName
;
}
public
void
setPicture4
(
String
picture4
)
{
this
.
picture4
=
picture4
;
}
public
void
setFireEquipmentName
(
String
fireEquipmentName
)
{
this
.
fireEquipmentName
=
fireEquipmentNam
e
;
}
public
String
getFireTruckRoute
(
)
{
return
fireTruckRout
e
;
}
public
int
getLayer
(
)
{
return
layer
;
}
public
void
setFireTruckRoute
(
String
fireTruckRoute
)
{
this
.
fireTruckRoute
=
fireTruckRoute
;
}
public
void
setLayer
(
int
layer
)
{
this
.
layer
=
layer
;
}
public
Boolean
getRunstep
(
)
{
return
runstep
;
}
public
int
getFireEquipmentLayer
(
)
{
return
fireEquipmentLayer
;
}
public
void
setRunstep
(
Boolean
runstep
)
{
this
.
runstep
=
runstep
;
}
public
void
setFireEquipmentLayer
(
int
fireEquipmentLayer
)
{
this
.
fireEquipmentLayer
=
fireEquipmentLayer
;
}
public
String
getStep
(
)
{
return
step
;
}
public
String
getEquipmentId
(
)
{
return
equipmentId
;
}
public
void
setStep
(
String
step
)
{
this
.
step
=
step
;
}
public
void
setEquipmentId
(
String
equipmentId
)
{
this
.
equipmentId
=
equipmentId
;
}
public
String
getButtonCode
(
)
{
return
buttonCode
;
}
public
String
getMobile
(
)
{
return
mobil
e
;
}
public
void
setButtonCode
(
String
buttonCode
)
{
this
.
buttonCode
=
buttonCod
e
;
}
public
void
setMobile
(
String
mobile
)
{
this
.
mobile
=
mobil
e
;
}
public
String
getButtonState
(
)
{
return
buttonStat
e
;
}
public
String
getAdminName
(
)
{
return
adminNam
e
;
}
public
void
setButtonState
(
String
buttonState
)
{
this
.
buttonState
=
buttonStat
e
;
}
public
void
setAdminName
(
String
adminName
)
{
this
.
adminName
=
adminNam
e
;
}
public
String
getStepState
(
)
{
return
stepStat
e
;
}
public
void
setStepState
(
String
stepState
)
{
this
.
stepState
=
stepState
;
}
public
String
getCameraCodes
()
{
return
cameraCodes
;
}
public
void
setCameraCodes
(
String
cameraCodes
)
{
this
.
cameraCodes
=
cameraCodes
;
}
}
YeeAmosFireAutoSysStart/src/main/java/com/yeejoin/amos/YeeAmosFireAutoSysStart.java
View file @
28409f79
...
...
@@ -8,9 +8,9 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeansException
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.web.servlet.FilterRegistrationBean
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
...
...
@@ -18,6 +18,7 @@ import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.core.env.Environment
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
...
...
@@ -27,6 +28,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
import
com.yeejoin.amos.fas.client.invoke.RsDataQueue
;
import
com.yeejoin.amos.fas.context.IotContext
;
import
com.yeejoin.amos.filter.CrossDomainFilter
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
...
...
@@ -91,4 +93,25 @@ public class YeeAmosFireAutoSysStart implements ApplicationContextAware
IotContext
.
getInstance
().
setApplicationContext
(
applicationContext
);
RsDataQueue
.
getInstance
().
start
();
}
/**
*
* <pre>
* 跨域处理的FilterBean
* </pre>
*
* @return
*/
@Bean
public
FilterRegistrationBean
crossFilterRegistrationBean
()
{
FilterRegistrationBean
registrationBean
=
new
FilterRegistrationBean
();
CrossDomainFilter
crossDomainFilter
=
new
CrossDomainFilter
();
registrationBean
.
setFilter
(
crossDomainFilter
);
// List<String> urlPatterns = new ArrayList<String>();
// urlPatterns.add("/*");
// registrationBean.setUrlPatterns(urlPatterns);
registrationBean
.
setOrder
(
0
);
//值小的Filter先执行
return
registrationBean
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/application-dev.properties
View file @
28409f79
...
...
@@ -5,12 +5,12 @@ security.appKeyWeb=CONVERTER_STATION
#environment
#spring.profiles.active = dev
eureka.client.serviceUrl.defaultZone
=
http://172.16.
10.72
:10001/eureka/
eureka.client.serviceUrl.defaultZone
=
http://172.16.
3.75
:10001/eureka/
eureka.client.register-with-eureka
=
true
eureka.client.fetch-registry
=
true
eureka.client.healthcheck.enabled
=
true
eureka.client.fetchRegistry
=
true
eureka.instance.prefer-ip-address
=
true
#DB properties:
spring.datasource.url
=
jdbc:mysql://172.16.11.33:3306/safety-business-2.0?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username
=
root
...
...
@@ -53,7 +53,10 @@ emqx.broker=tcp://172.16.10.85:1883
emqx.user-name
=
super
emqx.password
=
a123456
Push.fegin.name
=
PPMESSAGEPUSHSERVICE15
dutyMode.fegin.name
=
AMOS-DUTY
bussunis.domain
=
http://172.16.10.183:8083
\ No newline at end of file
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
rule.definition.load
=
true
rule.definition.model-package
=
com.yeejoin.amos.fas.business.service.model
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/application-docker.properties
View file @
28409f79
...
...
@@ -10,6 +10,7 @@ eureka.client.register-with-eureka = true
eureka.client.fetch-registry
=
true
eureka.client.healthcheck.enabled
=
true
eureka.client.fetchRegistry
=
true
eureka.instance.prefer-ip-address
=
true
#DB properties:
spring.datasource.url
=
jdbc:mysql://amos-mysql:3306/yeejoin_safety_business?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
...
...
@@ -56,4 +57,6 @@ emqx.password=a123456
Push.fegin.name
=
AMOS-PUSH
dutyMode.fegin.name
=
AMOS-DUTY
bussunis.domain
=
http://172.16.10.183:8083
\ No newline at end of file
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
rule.definition.load
=
true
rule.definition.model-package
=
com.yeejoin.amos.fas.business.service.model
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/application-test.properties
View file @
28409f79
...
...
@@ -10,6 +10,7 @@ eureka.client.register-with-eureka = true
eureka.client.fetch-registry
=
true
eureka.client.healthcheck.enabled
=
true
eureka.client.fetchRegistry
=
true
eureka.instance.prefer-ip-address
=
true
#DB properties:
spring.datasource.url
=
jdbc:mysql://47.103.14.66:3306/91-safety-business?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
...
...
@@ -56,4 +57,6 @@ emqx.password=a123456
Push.fegin.name
=
PPMESSAGEPUSHSERVICE15
dutyMode.fegin.name
=
AMOS-DUTY
bussunis.domain
=
http://172.16.10.183:8083
\ No newline at end of file
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
rule.definition.load
=
true
rule.definition.model-package
=
com.yeejoin.amos.fas.business.service.model
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/application.properties
View file @
28409f79
spring.application.name
=
AMOS-AUTOSYS
spring.application.name
=
AMOS-AUTOSYS
-WJ
server.port
=
8083
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
View file @
28409f79
...
...
@@ -279,4 +279,16 @@
update f_risk_level set manage_level = 4 where level = '4';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"11590390304001-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<columnExists
tableName=
"f_fire_equipment_point "
columnName=
"fire_equipment_id"
/>
</preConditions>
<comment>
修改fire_equipment_id可为空
</comment>
<sql>
ALTER TABLE `f_fire_equipment_point`
MODIFY COLUMN `fire_equipment_id` bigint(20) NULL COMMENT '消防装备id' AFTER `code`;
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fier_station.xml
View file @
28409f79
...
...
@@ -45,6 +45,7 @@
left join f_risk_source frs on frs.id = f.risk_source_id
WHERE
fs.fire_station_id = ${fireStationId}
and f.id is not null
LIMIT ${start}, ${length};
</select>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fier_stength.xml
View file @
28409f79
...
...
@@ -62,5 +62,32 @@
<select
id=
"queryForStrengthList"
resultType=
"com.yeejoin.amos.fas.dao.entity.FireStrength"
>
SELECT
*
FROM
f_fire_strength t
WHERE
TIME_TO_SEC(#{time})
>
= TIME_TO_SEC( t.day_begin )
AND TIME_TO_SEC(#{time})
<
= TIME_TO_SEC(
t.day_end)
</select>
<insert
id=
"save"
parameterType=
"com.yeejoin.amos.fas.dao.entity.FireStrength"
>
INSERT INTO f_fire_strength
username,
`code`,
position,
tel,
phone_num,
job_des,
remark,
org_code,
create_by,
create_date,
day_end ,
day_begin
VALUES(#{username},#{code},#{position},#{tel},#{phoneNum},#{jobDes},#{remark},#{orgCode},#{createBy},NOW(),#{dayEnd},#{dayBegin})
</insert>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_equippoint.xml
View file @
28409f79
...
...
@@ -141,6 +141,7 @@
f_fire_equipment as b on a.fire_equipment_id = b.id
left join f_dict fd on fd.id = a.alarm_type
<where>
a.org_code = #{compCode}
<if
test=
"searchValue!=null and searchValue.trim() != ''"
>
and (a.name like concat('%',#{searchValue},'%') or a.code like concat('%',#{searchValue},'%'))
</if>
...
...
@@ -163,6 +164,7 @@
from
f_fire_equipment_point as a
<where>
a.org_code = #{compCode}
<if
test=
"searchValue!=null and searchValue.trim() != ''"
>
and (a.name like concat('%',#{searchValue},'%') or a.code like concat('%',#{searchValue},'%'))
</if>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_impAndfire_equip.xml
View file @
28409f79
...
...
@@ -68,7 +68,9 @@
fe.room,
fe.risk_source_id,
fe.is_indoor,
fe.model,fe.manufacturer
fe.model,
fe.manufacturer,
fe.floor3d
FROM
f_fire_equipment fe
LEFT JOIN f_risk_source rs ON rs.id = fe.risk_source_id
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_risk_source.xml
View file @
28409f79
...
...
@@ -210,6 +210,7 @@
FROM
`f_risk_source` rs
LEFT JOIN f_risk_level rl ON rl.id = rs.risk_level_id
where rs.org_code = #{compCode}
ORDER BY rs.sort_num,rs.id ASC
</select>
...
...
@@ -597,7 +598,7 @@
FROM
f_risk_source
WHERE
parent_id = 0
parent_id = 0
and org_code = #{compCode}
)
ORDER BY sort_num ASC,id DESC
</select>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_waterResource.xml
View file @
28409f79
...
...
@@ -32,7 +32,7 @@
FROM
f_water_resource fs
WHERE
1=1
fs.org_code = #{orgCode}
<if
test=
"name!=null"
>
AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')
</if>
...
...
@@ -63,8 +63,7 @@
f_water_resource fs
left join f_risk_source frs on frs.id = fs.risk_source_id
WHERE
1=1
fs.org_code = #{orgCode}
<if
test=
"name!=null"
>
AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')
</if>
...
...
@@ -100,6 +99,7 @@
left join f_risk_source frs on frs.id = f.risk_source_id
WHERE
fs.water_resource_id = ${waterResourceId}
and f.id is not null
LIMIT ${start}, ${length};
</select>
...
...
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