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
Show whitespace changes
Inline
Side-by-side
Showing
53 changed files
with
1076 additions
and
284 deletions
+1076
-284
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
+35
-29
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
+3
-2
FireEquimtPointController.java
...os/fas/business/controller/FireEquimtPointController.java
+11
-5
FireSourceController.java
...in/amos/fas/business/controller/FireSourceController.java
+14
-12
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
+2
-0
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
+110
-99
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 {
...
@@ -42,6 +42,8 @@ public class FireEquipmentPoint extends BasicEntity {
@Column
(
name
=
"alarm_type"
)
@Column
(
name
=
"alarm_type"
)
private
Long
alarmType
;
private
Long
alarmType
;
@Column
(
name
=
"org_code"
)
private
String
orgCode
;
public
String
getCode
()
{
public
String
getCode
()
{
return
code
;
return
code
;
}
}
...
@@ -113,4 +115,12 @@ public class FireEquipmentPoint extends BasicEntity {
...
@@ -113,4 +115,12 @@ public class FireEquipmentPoint extends BasicEntity {
public
void
setAlarmType
(
Long
alarmType
)
{
public
void
setAlarmType
(
Long
alarmType
)
{
this
.
alarmType
=
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
...
@@ -83,6 +83,15 @@ public class WaterResource extends BasicEntity{
...
@@ -83,6 +83,15 @@ public class WaterResource extends BasicEntity{
@Column
(
name
=
"create_by"
)
@Column
(
name
=
"create_by"
)
private
String
createBy
;
private
String
createBy
;
@Column
(
name
=
"area"
)
private
String
area
;
@Column
(
name
=
"max_level"
)
private
String
maxLevel
;
@Column
(
name
=
"alarm_level"
)
private
String
alarmLevel
;
/**
/**
* ue4位置
* ue4位置
*/
*/
...
@@ -209,4 +218,28 @@ public class WaterResource extends BasicEntity{
...
@@ -209,4 +218,28 @@ public class WaterResource extends BasicEntity{
public
void
setUe4Rotation
(
String
ue4Rotation
)
{
public
void
setUe4Rotation
(
String
ue4Rotation
)
{
this
.
ue4Rotation
=
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;
...
@@ -12,20 +12,18 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
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.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.client.RestTemplate
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.yeejoin.amos.fas.business.action.result.ActionResult
;
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.BubbleTipResult
;
import
com.yeejoin.amos.fas.business.action.result.message.ActionResultMessage
;
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.FireStengthService
;
import
com.yeejoin.amos.fas.business.service.intfc.IContingencyInstance
;
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.service.model.ContingencyRo
;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
...
@@ -35,7 +33,7 @@ import com.yeejoin.amos.fas.dao.entity.FireStrength;
...
@@ -35,7 +33,7 @@ import com.yeejoin.amos.fas.dao.entity.FireStrength;
public
class
ContingencyAction
implements
CustomerAction
{
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
@Autowired
private
IContingencyInstance
iContingencyInstance
;
private
IContingencyInstance
iContingencyInstance
;
...
@@ -43,11 +41,13 @@ public class ContingencyAction implements CustomerAction {
...
@@ -43,11 +41,13 @@ public class ContingencyAction implements CustomerAction {
@Autowired
@Autowired
private
FireStengthService
fireStrengthService
;
private
FireStengthService
fireStrengthService
;
private
RestTemplate
restTemplate
=
new
RestTemplate
();
//
private RestTemplate restTemplate = new RestTemplate();
@Value
(
"${bussunis.domain}"
)
//
@Value("${bussunis.domain}")
private
String
bussunisDomain
;
//
private String bussunisDomain ;
@Autowired
private
IRiskSourceService
riskSourceService
;
private
static
Map
<
String
,
String
>
OPERATE_RECORD_ID
=
new
HashMap
<>();
private
static
Map
<
String
,
String
>
OPERATE_RECORD_ID
=
new
HashMap
<>();
...
@@ -77,8 +77,8 @@ public class ContingencyAction implements CustomerAction {
...
@@ -77,8 +77,8 @@ public class ContingencyAction implements CustomerAction {
Date
now
=
new
Date
();
Date
now
=
new
Date
();
String
time
=
sdf
.
format
(
now
);
String
time
=
sdf
.
format
(
now
);
List
<
FireStrength
>
strengths
=
null
;
//fireStrengthService.
List
<
FireStrength
>
strengths
=
fireStrengthService
.
queryForStrengthList
(
time
);
// List<FireStrength> strengths = iStrengthRepository.queryForStrengthList(time);
// List<FireStrength> strengths = iStrengthRepository.queryForStrengthList(time);
if
(!
CollectionUtils
.
isEmpty
(
strengths
))
if
(!
CollectionUtils
.
isEmpty
(
strengths
))
...
@@ -101,7 +101,7 @@ public class ContingencyAction implements CustomerAction {
...
@@ -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
;
Constructor
<?>
constructor
;
try
{
try
{
...
@@ -289,10 +289,10 @@ public class ContingencyAction implements CustomerAction {
...
@@ -289,10 +289,10 @@ public class ContingencyAction implements CustomerAction {
private
boolean
sendButton
(
String
batchNo
,
String
contingencyPlanId
,
String
equipmentId
,
String
actionName
,
String
buttonJson
)
{
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
();
ObjectMapper
objectMapper
=
new
ObjectMapper
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
//
Map<String,Object> map = new HashMap<>();
/**
/**
* batchNo
* batchNo
...
@@ -306,24 +306,30 @@ public class ContingencyAction implements CustomerAction {
...
@@ -306,24 +306,30 @@ public class ContingencyAction implements CustomerAction {
try
{
try
{
Map
button
=
objectMapper
.
readValue
(
buttonJson
,
Map
.
class
);
Map
button
=
objectMapper
.
readValue
(
buttonJson
,
Map
.
class
);
Map
operateInstance
=
(
Map
)((
List
)
button
.
get
(
"operate"
)).
get
(
0
);
Map
operateInstance
=
(
Map
)((
List
)
button
.
get
(
"operate"
)).
get
(
0
);
map
.
put
(
"batchNo"
,
batchNo
);
// map.put("batchNo",batchNo);
map
.
put
(
"actionName"
,
actionName
);
// map.put("actionName",actionName);
map
.
put
(
"equipmentId"
,
equipmentId
);
// map.put("equipmentId",equipmentId);
map
.
put
(
"stepCode"
,
button
.
get
(
"stepCode"
));
// map.put("stepCode",button.get("stepCode"));
map
.
put
(
"buttonCode"
,
operateInstance
.
get
(
"code"
));
// map.put("buttonCode",operateInstance.get("code"));
map
.
put
(
"confirm"
,
"CONFIRM"
);
// map.put("confirm","CONFIRM");
map
.
put
(
"stepState"
,
operateInstance
.
get
(
"stepState"
));
// map.put("stepState",operateInstance.get("stepState"));
map
.
put
(
"contingencyPlanId"
,
contingencyPlanId
);
// map.put("contingencyPlanId",contingencyPlanId);
ContingencyDeviceStatus
contingencyDeviceStatus
=
new
ContingencyDeviceStatus
();
HttpEntity
<
Map
>
entity
=
new
HttpEntity
<>(
map
);
contingencyDeviceStatus
.
setActionName
(
actionName
);
restTemplate
.
exchange
(
url
,
HttpMethod
.
POST
,
entity
,
Map
.
class
);
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
)
{
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
return
false
;
return
false
;
}
}
...
@@ -424,8 +430,8 @@ public class ContingencyAction implements CustomerAction {
...
@@ -424,8 +430,8 @@ public class ContingencyAction implements CustomerAction {
private
void
stopSnapshop
(
ContingencyRo
contingencyRo
)
{
private
void
stopSnapshop
(
ContingencyRo
contingencyRo
)
{
//
if (RuleRunigSnapshotServiceImpl.getReplayBatchNo() != null && !RuleRunigSnapshotServiceImpl.getReplayBatchNo().equals(contingencyRo.getBatchNo()))
if
(
RuleRunigSnapshotServiceImpl
.
getReplayBatchNo
()
!=
null
&&
!
RuleRunigSnapshotServiceImpl
.
getReplayBatchNo
().
equals
(
contingencyRo
.
getBatchNo
()))
//
RuleRunigSnapshotServiceImpl.setReplayBatchNoToNull();
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 {
...
@@ -249,6 +249,8 @@ public class BaseController {
if
(
reginParams
.
getCompany
()
!=
null
)
{
if
(
reginParams
.
getCompany
()
!=
null
)
{
return
reginParams
.
getCompany
().
getOrgCode
();
return
reginParams
.
getCompany
().
getOrgCode
();
}
}
return
null
;
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;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.fas.business.controller;
import
java.util.Date
;
import
java.util.Date
;
import
org.springframework.beans.factory.annotation.Autowired
;
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.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -69,8 +70,9 @@ public class FireCarController extends BaseController {
...
@@ -69,8 +70,9 @@ public class FireCarController extends BaseController {
//@Authorization(ingore = true)
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"上传消防车图片"
,
notes
=
"上传消防车图片"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"上传消防车图片"
,
notes
=
"上传消防车图片"
)
@RequestMapping
(
value
=
"/uploadCarImg"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
@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
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
String
compCode
=
getOrgCode
(
reginParams
);
fireCar
.
setOrgCode
(
compCode
);
fireCar
.
setOrgCode
(
compCode
);
...
@@ -78,5 +80,4 @@ public class FireCarController extends BaseController {
...
@@ -78,5 +80,4 @@ public class FireCarController extends BaseController {
fireCarService
.
saveFireCarAndPhoto
(
fireCar
,
file
);
fireCarService
.
saveFireCarAndPhoto
(
fireCar
,
file
);
return
CommonResponseUtil
.
success
();
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;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.fas.business.controller;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentPointEntity
;
import
com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentPointEntity
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireEquipPontService
;
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.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
...
@@ -45,11 +46,13 @@ public class FireEquimtPointController extends BaseController {
...
@@ -45,11 +46,13 @@ public class FireEquimtPointController extends BaseController {
if
(
fireEquipmentPoint
==
null
if
(
fireEquipmentPoint
==
null
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getName
())
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getName
())
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getFireEquipmentId
())
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getType
())
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getType
())
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getCode
()))
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getCode
())){
throw
new
Exception
(
"数据校验失败."
);
return
CommonResponseUtil
.
failure
(
"请检查必填字段"
);
};
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
fireEquipmentPoint
.
setOrgCode
(
compCode
);
fireEquipmentPoint
.
setCreateBy
(
getUserId
());
fireEquipmentPoint
.
setCreateBy
(
getUserId
());
fireEquipmentPoint
.
setCreateDate
(
new
Date
());
fireEquipmentPoint
.
setCreateDate
(
new
Date
());
return
CommonResponseUtil
.
success
(
fireEquipPontService
.
savePoint
(
fireEquipmentPoint
));
return
CommonResponseUtil
.
success
(
fireEquipPontService
.
savePoint
(
fireEquipmentPoint
));
...
@@ -100,13 +103,16 @@ public class FireEquimtPointController extends BaseController {
...
@@ -100,13 +103,16 @@ public class FireEquimtPointController extends BaseController {
@ApiParam
(
value
=
"监测点编号或者监测点名称模糊匹配"
)
@RequestParam
(
required
=
false
)
String
searchValue
,
@ApiParam
(
value
=
"监测点编号或者监测点名称模糊匹配"
)
@RequestParam
(
required
=
false
)
String
searchValue
,
@ApiParam
(
value
=
"类型(模拟量:ANALOGUE;开关量:SWITCH)"
)
@RequestParam
(
required
=
false
)
String
type
)
{
@ApiParam
(
value
=
"类型(模拟量:ANALOGUE;开关量:SWITCH)"
)
@RequestParam
(
required
=
false
)
String
type
)
{
Map
<
String
,
Object
>
queryMap
=
Maps
.
newHashMap
();
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
);
queryMap
.
put
(
"pageSize"
,
pageSize
);
if
(
isBindDevice
!=
null
&&
isBindDevice
==
0
)
{
if
(
isBindDevice
!=
null
&&
isBindDevice
==
0
)
{
queryMap
.
put
(
"fireEquipmentId"
,
0
);
queryMap
.
put
(
"fireEquipmentId"
,
0
);
}
}
queryMap
.
put
(
"searchValue"
,
searchValue
);
queryMap
.
put
(
"searchValue"
,
searchValue
);
queryMap
.
put
(
"type"
,
type
);
queryMap
.
put
(
"type"
,
type
);
queryMap
.
put
(
"compCode"
,
compCode
);
return
fireEquipPontService
.
queryByMap
(
queryMap
);
return
fireEquipPontService
.
queryByMap
(
queryMap
);
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireSourceController.java
View file @
28409f79
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.fas.business.controller;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.fas.business.controller;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireCarService
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireCarService
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireEquipService
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireEquipService
;
import
com.yeejoin.amos.fas.business.service.intfc.IWaterResourceService
;
import
com.yeejoin.amos.fas.business.util.CommonPageParamUtil
;
import
com.yeejoin.amos.fas.business.util.CommonPageParamUtil
;
import
com.yeejoin.amos.fas.business.vo.FireCarDetailVo
;
import
com.yeejoin.amos.fas.business.vo.FireCarDetailVo
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
...
@@ -32,12 +33,14 @@ public class FireSourceController extends BaseController {
...
@@ -32,12 +33,14 @@ public class FireSourceController extends BaseController {
private
IFireCarService
fireCarService
;
private
IFireCarService
fireCarService
;
@Autowired
@Autowired
private
IFireEquipService
iFireEquipService
;
private
IFireEquipService
iFireEquipService
;
@Autowired
private
IWaterResourceService
iWaterResourceService
;
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加消防装备"
,
notes
=
"添加消防装备"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加消防装备"
,
notes
=
"添加消防装备"
)
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
create
(
@RequestBody
FireEquipment
fireEquipment
)
throws
Exception
{
public
CommonResponse
create
(
@RequestBody
FireEquipment
fireEquipment
)
throws
Exception
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
String
compCode
=
getOrgCode
(
reginParams
);
fireEquipment
.
setCreateBy
(
getUserId
());
fireEquipment
.
setCreateBy
(
getUserId
());
fireEquipment
.
setCreateDate
(
new
Date
());
fireEquipment
.
setCreateDate
(
new
Date
());
fireEquipment
.
setOrgCode
(
compCode
);
fireEquipment
.
setOrgCode
(
compCode
);
...
@@ -62,13 +65,18 @@ public class FireSourceController extends BaseController {
...
@@ -62,13 +65,18 @@ public class FireSourceController extends BaseController {
@RequestMapping
(
value
=
"/{ids}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
@RequestMapping
(
value
=
"/{ids}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResponse
delete
(
@PathVariable
String
ids
)
throws
Exception
{
public
CommonResponse
delete
(
@PathVariable
String
ids
)
throws
Exception
{
String
[]
idArray
=
ids
.
split
(
","
);
String
[]
idArray
=
ids
.
split
(
","
);
if
(
iWaterResourceService
.
countAssociatedEquipWaterByIds
(
idArray
)
>
0
)
{
return
CommonResponseUtil
.
failure
(
"该设备已被灭火栓或消防水池绑定,请先删除绑定关系"
);
}
if
(
iFireEquipService
.
countAssociatedEquipStationByIds
(
idArray
)
>
0
)
{
return
CommonResponseUtil
.
failure
(
"该设备已被消防泡沫间或消防小室绑定,请先删除绑定关系"
);
}
return
CommonResponseUtil
.
success
(
iFireEquipService
.
delete
(
idArray
));
return
CommonResponseUtil
.
success
(
iFireEquipService
.
delete
(
idArray
));
}
}
/**
/**
* 消防车查询
* 消防车查询
*
*
* @param id
* @return
* @return
*/
*/
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询消防车"
,
notes
=
"查询消防车"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询消防车"
,
notes
=
"查询消防车"
)
...
@@ -77,7 +85,7 @@ public class FireSourceController extends BaseController {
...
@@ -77,7 +85,7 @@ public class FireSourceController extends BaseController {
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
Page
<
HashMap
<
String
,
Object
>>
carList
=
fireCarService
.
queryFireCar
(
getToken
(),
getProduct
(),
getAppKey
(),
param
);
Page
<
HashMap
<
String
,
Object
>>
carList
=
fireCarService
.
queryFireCar
(
getToken
(),
getProduct
(),
getAppKey
(),
param
);
return
CommonResponseUtil
.
success
(
carList
);
return
CommonResponseUtil
.
success
(
carList
);
}
}
...
@@ -90,14 +98,13 @@ public class FireSourceController extends BaseController {
...
@@ -90,14 +98,13 @@ public class FireSourceController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防车"
,
notes
=
"查询消防车"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防车"
,
notes
=
"查询消防车"
)
@RequestMapping
(
value
=
"/fire-car/det/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/fire-car/det/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryFireCar
(
@ApiParam
(
value
=
"查询条件"
,
required
=
true
)
@PathVariable
Long
id
)
{
public
CommonResponse
queryFireCar
(
@ApiParam
(
value
=
"查询条件"
,
required
=
true
)
@PathVariable
Long
id
)
{
FireCarDetailVo
car
=
fireCarService
.
findFireCarById
(
getToken
(),
getProduct
(),
getAppKey
(),
id
);
FireCarDetailVo
car
=
fireCarService
.
findFireCarById
(
getToken
(),
getProduct
(),
getAppKey
(),
id
);
return
CommonResponseUtil
.
success
(
car
);
return
CommonResponseUtil
.
success
(
car
);
}
}
/**
/**
* 消防装备查询-查询消防装备及视频监控
* 消防装备查询-查询消防装备及视频监控
*
*
* @param id
* @return
* @return
*/
*/
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"消防装备查询"
,
notes
=
"消防装备查询"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"消防装备查询"
,
notes
=
"消防装备查询"
)
...
@@ -113,7 +120,6 @@ public class FireSourceController extends BaseController {
...
@@ -113,7 +120,6 @@ public class FireSourceController extends BaseController {
/**
/**
* 配套设备查询
* 配套设备查询
*
*
* @param id
* @return
* @return
*/
*/
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"配套设备查询"
,
notes
=
"配套设备查询"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"配套设备查询"
,
notes
=
"配套设备查询"
)
...
@@ -129,7 +135,6 @@ public class FireSourceController extends BaseController {
...
@@ -129,7 +135,6 @@ public class FireSourceController extends BaseController {
/**
/**
* 生产区域查询查询
* 生产区域查询查询
*
*
* @param id
* @return
* @return
*/
*/
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生产区域查询"
,
notes
=
"生产区域查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生产区域查询"
,
notes
=
"生产区域查询"
)
...
@@ -139,7 +144,7 @@ public class FireSourceController extends BaseController {
...
@@ -139,7 +144,7 @@ public class FireSourceController extends BaseController {
return
CommonResponseUtil
.
success
(
car
);
return
CommonResponseUtil
.
success
(
car
);
}
}
// @Authorization(ingore = true)
// @Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防设备历史数据"
,
notes
=
"查询消防设备历史数据"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防设备历史数据"
,
notes
=
"查询消防设备历史数据"
)
@RequestMapping
(
value
=
"/data/history"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/data/history"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryForFireEquipmentHistory
(
public
CommonResponse
queryForFireEquipmentHistory
(
...
@@ -175,7 +180,4 @@ public class FireSourceController extends BaseController {
...
@@ -175,7 +180,4 @@ public class FireSourceController extends BaseController {
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForDetail
(
type
,
id
));
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForDetail
(
type
,
id
));
}
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireStationController.java
View file @
28409f79
...
@@ -55,7 +55,12 @@ public class FireStationController extends BaseController {
...
@@ -55,7 +55,12 @@ public class FireStationController extends BaseController {
fireStationFireEquipment
.
setCreateBy
(
"0"
);
fireStationFireEquipment
.
setCreateBy
(
"0"
);
fireStationFireEquipment
.
setCreateDate
(
new
Date
());
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
=
"解除绑定消防设备"
)
@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;
...
@@ -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.ContingencyDeviceStatus
;
import
com.yeejoin.amos.fas.business.service.model.FireEquimentDataRo
;
import
com.yeejoin.amos.fas.business.service.model.FireEquimentDataRo
;
import
com.yeejoin.amos.fas.business.service.model.ProtalDataRo
;
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.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
...
@@ -107,7 +108,9 @@ public class RiskSourceController extends BaseController {
...
@@ -107,7 +108,9 @@ public class RiskSourceController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取风险点树型结构"
,
notes
=
"获取风险点树型结构"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取风险点树型结构"
,
notes
=
"获取风险点树型结构"
)
@RequestMapping
(
value
=
"/riskSourceTress"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/riskSourceTress"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getRiskSourceTress
()
{
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
));
return
CommonResponseUtil
.
success
(
getRiskSourcesTree
(
riskSources
));
}
}
...
@@ -138,7 +141,9 @@ public class RiskSourceController extends BaseController {
...
@@ -138,7 +141,9 @@ public class RiskSourceController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"统计级别为1的风险点下面"
,
notes
=
"获取风险点树型结构"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"统计级别为1的风险点下面"
,
notes
=
"获取风险点树型结构"
)
@RequestMapping
(
value
=
"/riskSourceStatistics"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/riskSourceStatistics"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
riskSourceStatistics
()
throws
Exception
{
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
);
List
<
RiskSourceTreeResponse
>
treeRiskSources
=
getRiskSourcesTree
(
riskSources
);
return
CommonResponseUtil
.
success
(
riskSourceStatistics
(
treeRiskSources
));
return
CommonResponseUtil
.
success
(
riskSourceStatistics
(
treeRiskSources
));
}
}
...
@@ -632,7 +637,9 @@ public class RiskSourceController extends BaseController {
...
@@ -632,7 +637,9 @@ public class RiskSourceController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取危险因素树二级节点"
,
notes
=
"获取危险因素树二级节点"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取危险因素树二级节点"
,
notes
=
"获取危险因素树二级节点"
)
@RequestMapping
(
value
=
"/riskSourceSecondLevel"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/riskSourceSecondLevel"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryRiskSourceSecondLevel
()
{
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{
...
@@ -91,8 +91,9 @@ public class WaterResourceController extends BaseController{
@RequestParam
int
pageSize
@RequestParam
int
pageSize
)
{
)
{
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
queryForPage
(
StringUtils
.
trimToNull
(
name
),
StringUtils
.
trimToNull
(
code
),
StringUtils
.
trimToNull
(
type
),
commonPageable
));
String
compCode
=
getOrgCode
(
reginParams
);
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
queryForPage
(
compCode
,
StringUtils
.
trimToNull
(
name
),
StringUtils
.
trimToNull
(
code
),
StringUtils
.
trimToNull
(
type
),
commonPageable
));
}
}
//@Authorization(ingore = true)
//@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
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Param
;
import
com.yeejoin.amos.fas.dao.entity.FireStrength
;
public
interface
FireStrengthMapper
extends
BaseMapper
{
public
interface
FireStrengthMapper
extends
BaseMapper
{
Map
queryOne
(
@Param
(
"id"
)
Long
id
);
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
);
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
);
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 {
...
@@ -42,7 +42,7 @@ public interface RiskSourceMapper extends BaseMapper {
List
<
Map
>
queryForMatrix
();
List
<
Map
>
queryForMatrix
();
List
<
RiskSourceTreeResponse
>
getRiskSources
();
List
<
RiskSourceTreeResponse
>
getRiskSources
(
String
compCode
);
List
<
RiskSourceTreeResponse
>
getRiskSourcesEquipment
();
List
<
RiskSourceTreeResponse
>
getRiskSourcesEquipment
();
...
@@ -87,7 +87,7 @@ public interface RiskSourceMapper extends BaseMapper {
...
@@ -87,7 +87,7 @@ public interface RiskSourceMapper extends BaseMapper {
List
<
RiskSource
>
queryByFactor
(
@Param
(
"factorId"
)
Long
factorId
);
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
);
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{
...
@@ -9,4 +9,6 @@ public interface RuleRuningSnapshotMapper extends BaseMapper{
RuleRuningSnapshot
querForObject
(
String
batchNo
);
RuleRuningSnapshot
querForObject
(
String
batchNo
);
List
<
RuleRuningSnapshot
>
querForObjectList
(
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{
...
@@ -144,7 +144,7 @@ public interface View3dMapper extends BaseMapper{
*/
*/
List
<
View3dNodeVo
>
initViewErrorNode
(
String
type
,
Long
riskSourceId
,
String
orgCode
);
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
);
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 {
...
@@ -14,12 +14,14 @@ public interface WaterResourceMapper extends BaseMapper {
List
<
Map
>
queryForPage
(
List
<
Map
>
queryForPage
(
@Param
(
"orgCode"
)
String
compCode
,
@Param
(
"name"
)
String
name
,
@Param
(
"name"
)
String
name
,
@Param
(
"code"
)
String
code
,
@Param
(
"code"
)
String
code
,
@Param
(
"type"
)
String
type
,
@Param
(
"type"
)
String
type
,
@Param
(
"start"
)
long
start
,
@Param
(
"start"
)
long
start
,
@Param
(
"length"
)
Integer
length
);
@Param
(
"length"
)
Integer
length
);
Long
queryCountForPage
(
Long
queryCountForPage
(
@Param
(
"orgCode"
)
String
compCode
,
@Param
(
"name"
)
String
name
,
@Param
(
"name"
)
String
name
,
@Param
(
"code"
)
String
code
,
@Param
(
"code"
)
String
code
,
@Param
(
"type"
)
String
type
);
@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> {
...
@@ -16,4 +16,6 @@ public interface IFireEquipmentDao extends BaseDao<FireEquipment, Long> {
Optional
<
FireEquipment
>
findById
(
Long
id
);
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;
...
@@ -10,5 +10,4 @@ import com.yeejoin.amos.fas.dao.entity.FireStation;
public
interface
IFireStationDao
extends
BaseDao
<
FireStation
,
Long
>
{
public
interface
IFireStationDao
extends
BaseDao
<
FireStation
,
Long
>
{
Optional
<
FireStation
>
findById
(
Long
id
);
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;
...
@@ -4,6 +4,7 @@ import com.yeejoin.amos.fas.dao.entity.WaterResource;
import
java.util.Optional
;
import
java.util.Optional
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
@Repository
(
"iWaterResourceDao"
)
@Repository
(
"iWaterResourceDao"
)
...
@@ -11,4 +12,6 @@ public interface IWaterResourceDao extends BaseDao<WaterResource, Long> {
...
@@ -11,4 +12,6 @@ public interface IWaterResourceDao extends BaseDao<WaterResource, Long> {
Optional
<
WaterResource
>
findById
(
Long
id
);
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
;
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.mapper.ImpAndFireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyOriginalDataDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyOriginalDataDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyPlanInstanceRepository
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyPlanInstanceRepository
;
...
@@ -11,6 +14,8 @@ import com.yeejoin.amos.fas.business.service.model.OperateGroup;
...
@@ -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.ContingencyOriginalData
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.codehaus.jackson.map.ObjectMapper
;
import
org.codehaus.jackson.map.ObjectMapper
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -63,6 +68,8 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
...
@@ -63,6 +68,8 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
private
static
Map
<
String
,
String
>
stepMap
=
new
HashMap
<>();
private
static
Map
<
String
,
String
>
stepMap
=
new
HashMap
<>();
@Autowired
private
RuleTrigger
ruleTrigger
;
/* public ContingencyInstanceImpl(IContingencyPlanInstanceRepository repository) {
/* public ContingencyInstanceImpl(IContingencyPlanInstanceRepository repository) {
super(repository);
super(repository);
...
@@ -169,11 +176,17 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
...
@@ -169,11 +176,17 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
Equipment
equipment
=
impAndFireEquipMapper
.
queryImpEqumtByFireEquipmt
(
Long
.
parseLong
(
contingencyRo
.
getFireEquipmentId
()));
Equipment
equipment
=
impAndFireEquipMapper
.
queryImpEqumtByFireEquipmt
(
Long
.
parseLong
(
contingencyRo
.
getFireEquipmentId
()));
Object
result
=
remoteRuleServer
.
fireRuleFlow
(
contingencyRo
,
equipment
.
getReservePlan
(),
equipment
.
getName
());
//Object result = remoteRuleServer.fireRuleFlow(contingencyRo, equipment.getReservePlan(),equipment.getName());
equipment
.
setName
(
"极Ⅰ高端YY换流变A相"
);
ruleTrigger
.
publish
(
contingencyRo
,
equipment
.
getReservePlan
(),
ArrayUtils
.
toArray
(
equipment
.
getName
()));
String
url
=
remoteRuleUrl
+
"/urule/rule/refreshTimeline?batchNo="
+
batchNo
;
restTemplate
.
exchange
(
url
,
HttpMethod
.
GET
,
HttpEntity
.
EMPTY
,
Object
.
class
);
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
{
}
else
{
throw
new
Exception
(
"数据异常,请联系管理员."
);
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 {
...
@@ -243,6 +243,10 @@ public class EquipmentServiceImpl implements IEquipmentService {
}
}
long
total
=
this
.
impAndFireEquipMapper
.
queryBindFirEqumtPageCount
(
String
.
valueOf
(
equipmentId
));
long
total
=
this
.
impAndFireEquipMapper
.
queryBindFirEqumtPageCount
(
String
.
valueOf
(
equipmentId
));
List
<
FireEquipment
>
list
=
this
.
impAndFireEquipMapper
.
queryBindFirEqumtPage
(
start
,
length
,
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
);
Page
result
=
new
PageImpl
(
list
,
commonPageable
,
total
);
return
result
;
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 {
...
@@ -105,7 +105,7 @@ public class FireCarServiceImpl implements IFireCarService {
List
<
DepartmentModel
>
depts
=
remoteSecurityService
.
listDepartmentByDeptIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
deptIds
));
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
));
Map
<
Long
,
String
>
deptMap
=
depts
.
stream
().
collect
(
Collectors
.
toMap
(
DepartmentModel:
:
getSequenceNbr
,
DepartmentModel:
:
getDepartmentName
));
content
.
forEach
(
e
->
{
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 {
...
@@ -92,13 +92,14 @@ public class FireEquipPointServiceImpl implements IFireEquipPontService {
@Override
@Override
public
CommonResponse
queryByMap
(
Map
<
String
,
Object
>
map
)
{
public
CommonResponse
queryByMap
(
Map
<
String
,
Object
>
map
)
{
Long
total
=
fireEquipPointMapper
.
countByMap
(
map
);
if
(
total
.
equals
(
0L
))
{
return
CommonResponseUtil
.
success
(
new
PageImpl
<>(
Lists
.
newArrayList
(),
null
,
total
));
}
int
pageNumber
=
map
.
get
(
"pageNumber"
)
!=
null
?
Integer
.
parseInt
(
map
.
get
(
"pageNumber"
).
toString
())
:
0
;
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
;
int
pageSize
=
map
.
get
(
"pageSize"
)
!=
null
?
Integer
.
parseInt
(
map
.
get
(
"pageSize"
).
toString
())
:
0
;
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
Long
total
=
fireEquipPointMapper
.
countByMap
(
map
);
if
(
total
.
equals
(
0L
))
{
return
CommonResponseUtil
.
success
(
new
PageImpl
<>(
Lists
.
newArrayList
(),
commonPageable
,
total
));
}
map
.
put
(
"offset"
,
pageNumber
*
pageSize
);
List
<
FireEquipmentPointEntity
>
list
=
fireEquipPointMapper
.
listByMap
(
map
);
List
<
FireEquipmentPointEntity
>
list
=
fireEquipPointMapper
.
listByMap
(
map
);
return
CommonResponseUtil
.
success
(
new
PageImpl
<>(
list
,
commonPageable
,
total
));
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 {
...
@@ -189,7 +189,8 @@ public class FireEquipServiceImpl implements IFireEquipService {
return
returnEntity
;
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;
...
@@ -17,57 +17,46 @@ import java.util.Optional;
@Service
(
"fireStengthService"
)
@Service
(
"fireStengthService"
)
public
class
FireStrengthServiceImpl
implements
FireStengthService
{
public
class
FireStrengthServiceImpl
implements
FireStengthService
{
@Autowired
@Autowired
private
FireStrengthPointDao
fireStrengthPointDao
;
private
FireStrengthPointDao
fireStrengthPointDao
;
@Autowired
@Autowired
private
FireStrengthMapper
fireStrengthMapper
;
private
FireStrengthMapper
fireStrengthMapper
;
public
FireStrength
savePoint
(
FireStrength
fireEquipmentPoint
)
{
public
FireStrength
savePoint
(
FireStrength
fireEquipmentPoint
)
{
return
fireStrengthPointDao
.
save
(
fireEquipmentPoint
);
return
fireStrengthPointDao
.
save
(
fireEquipmentPoint
);
}
}
public
Map
queryOne
(
Long
id
)
{
public
Map
queryOne
(
Long
id
)
{
return
fireStrengthMapper
.
queryOne
(
id
);
return
fireStrengthMapper
.
queryOne
(
id
);
}
}
public
String
[]
deletePoint
(
String
[]
idArray
)
throws
Exception
public
String
[]
deletePoint
(
String
[]
idArray
)
throws
Exception
{
{
for
(
String
id
:
idArray
)
{
for
(
String
id:
idArray
)
{
Optional
<
FireStrength
>
fireEquipmentPoint1
=
fireStrengthPointDao
.
findById
(
Long
.
parseLong
(
id
));
Optional
<
FireStrength
>
fireEquipmentPoint1
=
fireStrengthPointDao
.
findById
(
Long
.
parseLong
(
id
));
FireStrength
fireEquipmentPoint
=
null
;
FireStrength
fireEquipmentPoint
=
null
;
if
(
fireEquipmentPoint1
.
isPresent
())
{
if
(
fireEquipmentPoint1
.
isPresent
())
{
fireEquipmentPoint
=
fireEquipmentPoint1
.
get
();
fireEquipmentPoint
=
fireEquipmentPoint1
.
get
();
}
}
if
(
fireEquipmentPoint
!=
null
)
if
(
fireEquipmentPoint
!=
null
)
{
{
this
.
fireStrengthPointDao
.
deleteById
(
Long
.
parseLong
(
id
));
this
.
fireStrengthPointDao
.
deleteById
(
Long
.
parseLong
(
id
));
}
else
}
else
{
{
throw
new
Exception
(
"找不到指定的监测点:"
+
id
);
throw
new
Exception
(
"找不到指定的监测点:"
+
id
);
}
}
}
}
return
idArray
;
return
idArray
;
}
}
public
Page
queryByFireEquimt
(
String
username
,
String
code
,
CommonPageable
pageable
)
{
public
Page
queryByFireEquimt
(
String
username
,
String
code
,
CommonPageable
pageable
)
Long
total
=
fireStrengthMapper
.
queryCountForPage
(
username
,
code
);
{
List
<
Map
>
content
=
fireStrengthMapper
.
queryForPage
(
username
,
code
,
pageable
.
getOffset
(),
Long
total
=
fireStrengthMapper
.
queryCountForPage
(
username
,
code
);
pageable
.
getPageSize
());
List
<
Map
>
content
=
fireStrengthMapper
.
queryForPage
(
username
,
code
,
pageable
.
getOffset
(),
pageable
.
getPageSize
());
Page
result
=
new
PageImpl
(
content
,
pageable
,
total
);
Page
result
=
new
PageImpl
(
content
,
pageable
,
total
);
return
result
;
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;
...
@@ -22,6 +22,7 @@ import java.util.stream.Collectors;
import
javax.annotation.PostConstruct
;
import
javax.annotation.PostConstruct
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
...
@@ -267,6 +268,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -267,6 +268,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
int
count
=
iRiskSourceDao
.
countByParentId
(
rId
);
int
count
=
iRiskSourceDao
.
countByParentId
(
rId
);
Optional
<
RiskSource
>
rs
=
iRiskSourceDao
.
findById
(
rId
);
Optional
<
RiskSource
>
rs
=
iRiskSourceDao
.
findById
(
rId
);
rs
.
ifPresent
(
riskSource
->
parentIds
.
add
(
riskSource
.
getParentId
()));
rs
.
ifPresent
(
riskSource
->
parentIds
.
add
(
riskSource
.
getParentId
()));
if
(
parentIds
.
contains
(
0
l
)){
throw
new
YeeException
(
"公司节点不能删除"
);
}
if
(
count
>
0
)
{
if
(
count
>
0
)
{
throw
new
YeeException
(
"该数据有关联子项,请先删除子项数据"
);
throw
new
YeeException
(
"该数据有关联子项,请先删除子项数据"
);
}
}
...
@@ -392,8 +396,8 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -392,8 +396,8 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
}
@Override
@Override
public
List
<
RiskSourceTreeResponse
>
findRiskSourceTrees
()
{
public
List
<
RiskSourceTreeResponse
>
findRiskSourceTrees
(
String
compCode
)
{
return
riskSourceMapper
.
getRiskSources
();
return
riskSourceMapper
.
getRiskSources
(
compCode
);
}
}
@Override
@Override
...
@@ -546,7 +550,8 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -546,7 +550,8 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
}
//Object result = remoteRuleServer.fireRuleFlow(contingencyRo, equipment.getReservePlan(), equipment.getName());
//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
();
ContingencyOriginalData
contingencyOriginalData
=
new
ContingencyOriginalData
();
BeanUtils
.
copyProperties
(
contingencyRo
,
contingencyOriginalData
);
BeanUtils
.
copyProperties
(
contingencyRo
,
contingencyOriginalData
);
iContingencyOriginalDataDao
.
save
(
contingencyOriginalData
);
iContingencyOriginalDataDao
.
save
(
contingencyOriginalData
);
...
@@ -588,9 +593,10 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -588,9 +593,10 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Override
@Override
public
Page
<
Map
<
String
,
Object
>>
listFmeaPointInputitem
(
String
toke
,
String
product
,
String
appKey
,
Long
fmeaId
,
Integer
pageNumber
,
Integer
pageSize
)
{
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
();
List
<
Map
<
String
,
Object
>>
content
=
Lists
.
newArrayList
();
CommonPageable
pageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
long
total
=
fmeaPointInputitemMapper
.
countByFmeaId
(
fmeaId
);
long
total
=
fmeaPointInputitemMapper
.
countByFmeaId
(
fmeaId
);
if
(
total
==
0L
)
{
if
(
total
==
0L
)
{
return
new
PageImpl
<>(
content
,
null
,
total
);
return
new
PageImpl
<>(
content
,
pageable
,
total
);
}
}
content
=
fmeaPointInputitemMapper
.
listByFmeaId
(
fmeaId
,
pageNumber
,
pageSize
);
content
=
fmeaPointInputitemMapper
.
listByFmeaId
(
fmeaId
,
pageNumber
,
pageSize
);
if
(!
CollectionUtils
.
isEmpty
(
content
)){
if
(!
CollectionUtils
.
isEmpty
(
content
)){
...
@@ -621,14 +627,14 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -621,14 +627,14 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
e
.
put
(
"tel"
,
userMap
.
get
(
String
.
valueOf
(
e
.
get
(
"deptId"
)+
"tel"
)));
e
.
put
(
"tel"
,
userMap
.
get
(
String
.
valueOf
(
e
.
get
(
"deptId"
)+
"tel"
)));
});
});
}
}
return
new
PageImpl
<>(
content
,
null
,
total
);
return
new
PageImpl
<>(
content
,
pageable
,
total
);
}
}
@Override
@Override
public
Page
<
Map
<
String
,
Object
>>
listFeamEquipmentPoint
(
Long
fmeaId
,
Integer
pageNumber
,
Integer
pageSize
)
{
public
Page
<
Map
<
String
,
Object
>>
listFeamEquipmentPoint
(
Long
fmeaId
,
Integer
pageNumber
,
Integer
pageSize
)
{
long
total
=
fmeaEquipmentPointMapper
.
countByFmeaId
(
fmeaId
);
long
total
=
fmeaEquipmentPointMapper
.
countByFmeaId
(
fmeaId
);
List
<
Map
<
String
,
Object
>>
content
=
fmeaEquipmentPointMapper
.
listByFmeaId
(
fmeaId
,
pageNumber
,
pageSize
);
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 {
...
@@ -1009,9 +1015,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
}
@Override
@Override
public
List
<
HashMap
<
String
,
Object
>>
queryRiskSourceSecondLevel
()
{
public
List
<
HashMap
<
String
,
Object
>>
queryRiskSourceSecondLevel
(
String
compCode
)
{
// TODO Auto-generated method stub
// TODO Auto-generated method stub
return
riskSourceMapper
.
queryRiskSourceSecondLevel
();
return
riskSourceMapper
.
queryRiskSourceSecondLevel
(
compCode
);
}
}
@Override
@Override
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RuleRunigSnapshotServiceImpl.java
View file @
28409f79
...
@@ -61,40 +61,40 @@ public class RuleRunigSnapshotServiceImpl
...
@@ -61,40 +61,40 @@ public class RuleRunigSnapshotServiceImpl
// }
// }
//
//
//
//
//
/**
/**
//
* 保存动作记录
* 保存动作记录
//
* @param methodName
* @param methodName
//
* @param paramsAndTypes
* @param paramsAndTypes
//
* @param matchedObj
* @param matchedObj
//
*/
*/
//
public void process(Object bean,String methodName,String paramsAndTypes,Object matchedObj)
public
void
process
(
Object
bean
,
String
methodName
,
String
paramsAndTypes
,
Object
matchedObj
)
//
{
{
//
//
if(bean instanceof CustomerAction)
if
(
bean
instanceof
CustomerAction
)
//
{
{
//
Set set = (Set) matchedObj;
Set
set
=
(
Set
)
matchedObj
;
//
BasicsRo fireEquimentDataRo = (BasicsRo) set.iterator().next();
BasicsRo
fireEquimentDataRo
=
(
BasicsRo
)
set
.
iterator
().
next
();
//
//
RuleRuningSnapshot ruleRuningSnapshot = new RuleRuningSnapshot();
RuleRuningSnapshot
ruleRuningSnapshot
=
new
RuleRuningSnapshot
();
//
ruleRuningSnapshot.setId(UUID.randomUUID().toString());
ruleRuningSnapshot
.
setId
(
UUID
.
randomUUID
().
toString
());
//
ruleRuningSnapshot.setMethodClass(bean.getClass().getName());
ruleRuningSnapshot
.
setMethodClass
(
bean
.
getClass
().
getName
());
//
ruleRuningSnapshot.setMethodName(methodName);
ruleRuningSnapshot
.
setMethodName
(
methodName
);
//
ruleRuningSnapshot.setMethodParam(paramsAndTypes);
ruleRuningSnapshot
.
setMethodParam
(
paramsAndTypes
);
//
ruleRuningSnapshot
.
setBatchNo
(
fireEquimentDataRo
.
getBatchNo
());
// ruleRuningSnapshot.setBatchNo(fireEquimentDataRo.getBatchNo
());
//ruleRuningSnapshot.setPackageId(fireEquimentDataRo.getPackageId
());
// ruleRuningSnapshot.setPackageId(fireEquimentDataRo.getPackageId(
));
//ruleRuningSnapshot.setEquipmentId(String.valueOf(fireEquimentDataRo.getId()
));
// ruleRuningSnapshot.setEquipmentId(String.valueOf(fireEquimentDataRo.getId()));
//
Date
now
=
new
Date
();
// Date now = new Date(
);
ruleRuningSnapshot
.
setCreateTime
(
now
);
// ruleRuningSnapshot.setCreateTime(now
);
ruleRuningSnapshot
.
setCreateMillisecond
(
String
.
valueOf
(
now
.
getTime
())
);
// ruleRuningSnapshot.setCreateMillisecond(String.valueOf(now.getTime())
);
ruleRuningSnapshot
.
setPreviousInterval
(
0L
);
// ruleRuningSnapshot.setPreviousInterval(0L
);
RuleRuningSnapshot
oldEntity
=
ruleRuningSnapshotMapper
.
querForObject
(
fireEquimentDataRo
.
getBatchNo
()
);
// RuleRuningSnapshot oldEntity = repository.querForObject(fireEquimentDataRo.getBatchNo());
if
(
oldEntity
!=
null
)
// if(oldEntity != null)
ruleRuningSnapshot
.
setPreviousInterval
(
now
.
getTime
()
-
Long
.
parseLong
(
oldEntity
.
getCreateMillisecond
()));
// ruleRuningSnapshot.setPreviousInterval(now.getTime() - Long.parseLong(oldEntity.getCreateMillisecond())
);
//repository.save(ruleRuningSnapshot
);
// this.repository
.save(ruleRuningSnapshot);
ruleRuningSnapshotMapper
.
save
(
ruleRuningSnapshot
);
//
}
}
//
}
}
@Async
@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 {
...
@@ -299,8 +299,7 @@ public class View3dServiceImpl implements IView3dService {
}
}
Optional
<
RiskSource
>
optional
=
iRiskSourceDao
.
findByOrgCodeAndParentId
(
orgCode
,
0L
);
Optional
<
RiskSource
>
optional
=
iRiskSourceDao
.
findByOrgCodeAndParentId
(
orgCode
,
0L
);
TodaySafetyIndexVo
vo
=
new
TodaySafetyIndexVo
();
TodaySafetyIndexVo
vo
=
new
TodaySafetyIndexVo
();
if
(
optional
.
isPresent
()){
if
(
optional
.
isPresent
()){
//1.按照等级进行转换rpn为分数-机构
//1.按照等级进行转换rpn为分数-机构
RiskSource
riskSource
=
optional
.
get
();
RiskSource
riskSource
=
optional
.
get
();
double
safetyIndex
=
this
.
changeRpnToSafetyIndex
(
riskSource
.
getRpn
());
double
safetyIndex
=
this
.
changeRpnToSafetyIndex
(
riskSource
.
getRpn
());
vo
.
setSafetyIndex
(
safetyIndex
);
vo
.
setSafetyIndex
(
safetyIndex
);
...
@@ -424,7 +423,8 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -424,7 +423,8 @@ public class View3dServiceImpl implements IView3dService {
List
<
RiskSource
>
regionList
=
iRiskSourceDao
.
findByParentIdAndIsRegion
(
optional
.
get
().
getId
(),
RiskSourceRegionEum
.
TRUE
.
getCode
());
List
<
RiskSource
>
regionList
=
iRiskSourceDao
.
findByParentIdAndIsRegion
(
optional
.
get
().
getId
(),
RiskSourceRegionEum
.
TRUE
.
getCode
());
exceptionList
=
regionList
.
stream
().
filter
(
riskSource
->
{
exceptionList
=
regionList
.
stream
().
filter
(
riskSource
->
{
BigDecimal
rpn
=
riskSource
.
getRpn
()
==
null
?
new
BigDecimal
(
"0"
)
:
riskSource
.
getRpn
();
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
->
{
}).
map
(
riskSource
->
{
ExceptionRegionVo
regionVo
=
new
ExceptionRegionVo
();
ExceptionRegionVo
regionVo
=
new
ExceptionRegionVo
();
regionVo
.
setId
(
riskSource
.
getId
());
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 {
...
@@ -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
);
Long
total
=
waterResourceMapper
.
queryCountForPage
(
compCode
,
username
,
code
,
type
);
List
<
Map
>
content
=
waterResourceMapper
.
queryForPage
(
username
,
code
,
type
,
pageable
.
getOffset
(),
pageable
.
getPageSize
());
List
<
Map
>
content
=
waterResourceMapper
.
queryForPage
(
compCode
,
username
,
code
,
type
,
pageable
.
getOffset
(),
pageable
.
getPageSize
());
Page
result
=
new
PageImpl
(
content
,
pageable
,
total
);
Page
result
=
new
PageImpl
(
content
,
pageable
,
total
);
return
result
;
return
result
;
}
}
...
@@ -98,7 +98,7 @@ public class WaterResourceServiceImpl implements IWaterResourceService {
...
@@ -98,7 +98,7 @@ public class WaterResourceServiceImpl implements IWaterResourceService {
for
(
WaterResourceEquipment
waterResourceEquipment:
waterResourceEquipments
){
for
(
WaterResourceEquipment
waterResourceEquipment:
waterResourceEquipments
){
WaterResourceEquipment
saveWaterResourceEquipment
=
iWaterResourceEquipmentDao
.
findByWaterResourceIdAndFireEquipmentId
(
waterResourceEquipment
.
getWaterResourceId
(),
waterResourceEquipment
.
getFireEquipmentId
());
WaterResourceEquipment
saveWaterResourceEquipment
=
iWaterResourceEquipmentDao
.
findByWaterResourceIdAndFireEquipmentId
(
waterResourceEquipment
.
getWaterResourceId
(),
waterResourceEquipment
.
getFireEquipmentId
());
if
(
StringUtil
.
isNotEmpty
(
saveWaterResourceEquipment
)){
if
(
StringUtil
.
isNotEmpty
(
saveWaterResourceEquipment
)){
deleteList
.
add
(
w
aterResourceEquipment
);
deleteList
.
add
(
saveW
aterResourceEquipment
);
}
}
}
}
iWaterResourceEquipmentDao
.
deleteAll
(
deleteList
);
iWaterResourceEquipmentDao
.
deleteAll
(
deleteList
);
...
@@ -120,8 +120,8 @@ public class WaterResourceServiceImpl implements IWaterResourceService {
...
@@ -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
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
...
@@ -41,4 +42,5 @@ public interface FireStengthService {
...
@@ -41,4 +42,5 @@ public interface FireStengthService {
Page
queryByFireEquimt
(
String
username
,
String
code
,
CommonPageable
pageable
);
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 {
...
@@ -18,15 +18,10 @@ public interface IFireEquipService {
List
<
String
>
findFireEquipArea
();
List
<
String
>
findFireEquipArea
();
FireEquipment
save
(
FireEquipment
fireEquipment
);
FireEquipment
save
(
FireEquipment
fireEquipment
);
FireEquipment
queryOne
(
Long
id
);
FireEquipment
queryOne
(
Long
id
);
/**
/**
* 删除单个风险点
* 删除单个风险点
* @return
* @return
...
@@ -34,8 +29,6 @@ public interface IFireEquipService {
...
@@ -34,8 +29,6 @@ public interface IFireEquipService {
*/
*/
String
[]
delete
(
String
[]
idArray
)
throws
Exception
;
String
[]
delete
(
String
[]
idArray
)
throws
Exception
;
Page
queryForFireEquipmentHistory
(
String
fireEquipmentName
,
Page
queryForFireEquipmentHistory
(
String
fireEquipmentName
,
String
equipmentName
,
String
equipmentName
,
String
startTime
,
String
startTime
,
...
@@ -44,9 +37,13 @@ public interface IFireEquipService {
...
@@ -44,9 +37,13 @@ public interface IFireEquipService {
Page
queryForEquipmentList
(
String
name
,
String
code
,
String
equipClassify
,
CommonPageable
commonPageable
);
Page
queryForEquipmentList
(
String
name
,
String
code
,
String
equipClassify
,
CommonPageable
commonPageable
);
//查询设备明细
//查询设备明细
Object
queryForDetail
(
String
type
,
Long
id
)
throws
Exception
;
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 {
...
@@ -52,7 +52,7 @@ public interface IRiskSourceService {
/**
/**
* 获取所有风险点
* 获取所有风险点
*/
*/
List
<
RiskSourceTreeResponse
>
findRiskSourceTrees
();
List
<
RiskSourceTreeResponse
>
findRiskSourceTrees
(
String
compCode
);
List
<
FmeaEquipmentPoint
>
bindFireEquiment
(
FmeaBindParam
fmeaBindParam
);
List
<
FmeaEquipmentPoint
>
bindFireEquiment
(
FmeaBindParam
fmeaBindParam
);
...
@@ -93,7 +93,7 @@ public interface IRiskSourceService {
...
@@ -93,7 +93,7 @@ public interface IRiskSourceService {
void
saveData
(
List
<
AlarmParam
>
deviceDatas
,
String
type
);
void
saveData
(
List
<
AlarmParam
>
deviceDatas
,
String
type
);
List
<
HashMap
<
String
,
Object
>>
queryRiskSourceSecondLevel
();
List
<
HashMap
<
String
,
Object
>>
queryRiskSourceSecondLevel
(
String
compCode
);
List
<
RiskSourceTreeResponse
>
findRiskSourceEquipStatistics
();
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
...
@@ -15,5 +15,4 @@ public interface IRuleRunningSnapshotService
void
replay
(
String
batchNo
)
throws
Exception
;
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 {
...
@@ -39,7 +39,7 @@ public interface IWaterResourceService {
* 查询指定设备的风险点列表
* 查询指定设备的风险点列表
* @return
* @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
);
void
saveBindFireEquipment
(
List
<
WaterResourceEquipment
>
waterResourceEquipments
);
...
@@ -54,4 +54,6 @@ public interface IWaterResourceService {
...
@@ -54,4 +54,6 @@ public interface IWaterResourceService {
Object
queryForList
();
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
;
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
;
public
String
getBatchNo
()
{
return
batchNo
;
}
public
void
setBatchNo
(
String
batchNo
)
{
this
.
batchNo
=
batchNo
;
}
/**
*
*/
private
static
final
long
serialVersionUID
=
451541541451L
;
private
String
fireEquipmentName
;
//消防设备名称
private
String
fireEquipmentName
;
//消防设备名称
private
String
fireEquipmentId
;
//消防设备id
private
String
fireEquipmentId
;
//消防设备id
private
int
layer
;
//显示图层
private
Integer
layer
=
0
;
//显示图层
//当前探测器
//当前探测器
private
int
fireEquipmentLayer
;
//当前探测器图层
private
Integer
fireEquipmentLayer
=
0
;
//当前探测器图层
private
String
fireEquipmentPosition
;
//消防设备位置
private
String
fireEquipmentPosition
;
//消防设备位置
//重点设备信息
//重点设备信息
...
@@ -26,7 +40,7 @@ public class ContingencyRo extends BasicsRo {
...
@@ -26,7 +40,7 @@ public class ContingencyRo extends BasicsRo {
private
String
cameraIds
;
//摄像头id
private
String
cameraIds
;
//摄像头id
private
int
fireCount
=
1
;
//火情数量
private
Integer
fireCount
=
1
;
//火情数量
private
String
confirm
=
"NONE"
;
//是否确认火情,确认 CONFIRM,取消CANCEL,未操作 NONE
private
String
confirm
=
"NONE"
;
//是否确认火情,确认 CONFIRM,取消CANCEL,未操作 NONE
...
@@ -37,7 +51,7 @@ public class ContingencyRo extends BasicsRo {
...
@@ -37,7 +51,7 @@ public class ContingencyRo extends BasicsRo {
private
String
fireTruckRoute
;
private
String
fireTruckRoute
;
private
b
oolean
runstep
;
//是否已经执行流程
private
B
oolean
runstep
;
//是否已经执行流程
private
String
step
;
//当前步骤
private
String
step
;
//当前步骤
...
@@ -46,96 +60,92 @@ public class ContingencyRo extends BasicsRo {
...
@@ -46,96 +60,92 @@ public class ContingencyRo extends BasicsRo {
private
String
stepState
;
//步骤操作状态
private
String
stepState
;
//步骤操作状态
public
String
getFireEquipmentName
()
{
public
String
getEquipmentPosition3d
()
{
return
fireEquipmentName
;
return
equipmentPosition3d
;
}
}
public
void
setEquipmentPosition3d
(
String
equipmentPosition3d
)
{
public
void
setFireEquipmentName
(
String
fireEquipmentName
)
{
this
.
equipmentPosition3d
=
equipmentPosition3d
;
this
.
fireEquipmentName
=
fireEquipmentName
;
}
}
public
String
getButtonState
()
{
public
String
getFireEquipmentId
()
{
return
buttonState
;
return
fireEquipmentId
;
}
}
public
void
setButtonState
(
String
buttonState
)
{
public
void
setFireEquipmentId
(
String
fireEquipmentId
)
{
this
.
buttonState
=
buttonState
;
this
.
fireEquipmentId
=
fireEquipmentId
;
}
}
public
String
getStepState
()
{
public
Integer
getLayer
()
{
return
stepState
;
return
layer
;
}
}
public
void
setStepState
(
String
stepState
)
{
public
void
setLayer
(
Integer
layer
)
{
this
.
stepState
=
stepState
;
this
.
layer
=
layer
;
}
}
public
String
getButtonCode
()
{
public
Integer
getFireEquipmentLayer
()
{
return
buttonCode
;
return
fireEquipmentLayer
;
}
}
public
void
setButtonCode
(
String
buttonCode
)
{
public
void
setFireEquipmentLayer
(
Integer
fireEquipmentLayer
)
{
this
.
buttonCode
=
buttonCode
;
this
.
fireEquipmentLayer
=
fireEquipmentLayer
;
}
}
public
String
getStep
()
{
public
String
getFireEquipmentPosition
()
{
return
step
;
return
fireEquipmentPosition
;
}
}
public
void
setStep
(
String
step
)
{
public
void
setFireEquipmentPosition
(
String
fireEquipmentPosition
)
{
this
.
step
=
step
;
this
.
fireEquipmentPosition
=
fireEquipmentPosition
;
}
}
public
String
getEquipmentId
()
{
return
equipmentId
;
public
boolean
getRunstep
()
{
return
runstep
;
}
}
public
void
setRunstep
(
boolean
runstep
)
{
public
void
setEquipmentId
(
String
equipmentId
)
{
this
.
runstep
=
runstep
;
this
.
equipmentId
=
equipmentId
;
}
}
public
String
getFireTruckRout
e
()
{
public
String
getEquipmentNam
e
()
{
return
fireTruckRout
e
;
return
equipmentNam
e
;
}
}
public
void
setFireTruckRoute
(
String
fireTruckRout
e
)
{
public
void
setEquipmentName
(
String
equipmentNam
e
)
{
this
.
fireTruckRoute
=
fireTruckRout
e
;
this
.
equipmentName
=
equipmentNam
e
;
}
}
public
String
getPicture1
()
{
public
String
getEquipmentPosition3d
()
{
return
picture1
;
return
equipmentPosition3d
;
}
}
public
void
setPicture1
(
String
picture1
)
{
public
void
setEquipmentPosition3d
(
String
equipmentPosition3d
)
{
this
.
picture1
=
picture1
;
this
.
equipmentPosition3d
=
equipmentPosition3d
;
}
}
public
String
getPicture2
()
{
public
String
getMobile
()
{
return
picture2
;
return
mobile
;
}
}
public
void
setPicture2
(
String
picture2
)
{
public
void
setMobile
(
String
mobile
)
{
this
.
picture2
=
picture2
;
this
.
mobile
=
mobile
;
}
}
public
String
getPicture3
()
{
public
String
getAdminName
()
{
return
picture3
;
return
adminName
;
}
}
public
void
setPicture3
(
String
picture3
)
{
public
void
setAdminName
(
String
adminName
)
{
this
.
picture3
=
picture3
;
this
.
adminName
=
adminName
;
}
}
public
String
getPicture4
()
{
public
String
getCameraCodes
()
{
return
picture4
;
return
cameraCodes
;
}
}
public
void
setPicture4
(
String
picture4
)
{
public
void
setCameraCodes
(
String
cameraCodes
)
{
this
.
picture4
=
picture4
;
this
.
cameraCodes
=
cameraCodes
;
}
}
public
String
getCameraIds
()
{
public
String
getCameraIds
()
{
...
@@ -146,12 +156,12 @@ public class ContingencyRo extends BasicsRo {
...
@@ -146,12 +156,12 @@ public class ContingencyRo extends BasicsRo {
this
.
cameraIds
=
cameraIds
;
this
.
cameraIds
=
cameraIds
;
}
}
public
String
getFireEquipmentPosition
()
{
public
Integer
getFireCount
()
{
return
fireEquipmentPosition
;
return
fireCount
;
}
}
public
void
setFireEquipmentPosition
(
String
fireEquipmentPosition
)
{
public
void
setFireCount
(
Integer
fireCount
)
{
this
.
fireEquipmentPosition
=
fireEquipmentPosition
;
this
.
fireCount
=
fireCount
;
}
}
public
String
getConfirm
()
{
public
String
getConfirm
()
{
...
@@ -162,85 +172,86 @@ public class ContingencyRo extends BasicsRo {
...
@@ -162,85 +172,86 @@ public class ContingencyRo extends BasicsRo {
this
.
confirm
=
confirm
;
this
.
confirm
=
confirm
;
}
}
public
int
getFireCount
()
{
public
String
getPicture1
()
{
return
fireCount
;
return
picture1
;
}
}
public
void
setFireCount
(
int
fireCount
)
{
public
void
setPicture1
(
String
picture1
)
{
this
.
fireCount
=
fireCount
;
this
.
picture1
=
picture1
;
}
}
public
String
getEquipmentName
()
{
public
String
getPicture2
()
{
return
equipmentName
;
return
picture2
;
}
}
public
void
setEquipmentName
(
String
equipmentName
)
{
public
void
setPicture2
(
String
picture2
)
{
this
.
equipmentName
=
equipmentName
;
this
.
picture2
=
picture2
;
}
}
public
String
getFireEquipmentId
()
{
public
String
getPicture3
()
{
return
fireEquipmentId
;
return
picture3
;
}
}
public
void
setFireEquipmentId
(
String
fireEquipmentId
)
{
public
void
setPicture3
(
String
picture3
)
{
this
.
fireEquipmentId
=
fireEquipmentId
;
this
.
picture3
=
picture3
;
}
}
public
String
getPicture4
()
{
public
String
getFireEquipmentName
()
{
return
picture4
;
return
fireEquipmentName
;
}
}
public
void
setFireEquipmentName
(
String
fireEquipmentName
)
{
public
void
setPicture4
(
String
picture4
)
{
this
.
fireEquipmentName
=
fireEquipmentName
;
this
.
picture4
=
picture4
;
}
}
public
int
getLayer
()
{
public
String
getFireTruckRoute
()
{
return
layer
;
return
fireTruckRoute
;
}
}
public
void
setLayer
(
int
layer
)
{
public
void
setFireTruckRoute
(
String
fireTruckRoute
)
{
this
.
layer
=
layer
;
this
.
fireTruckRoute
=
fireTruckRoute
;
}
}
public
int
getFireEquipmentLayer
()
{
public
Boolean
getRunstep
()
{
return
fireEquipmentLayer
;
return
runstep
;
}
}
public
void
setFireEquipmentLayer
(
int
fireEquipmentLayer
)
{
public
void
setRunstep
(
Boolean
runstep
)
{
this
.
fireEquipmentLayer
=
fireEquipmentLayer
;
this
.
runstep
=
runstep
;
}
}
public
String
getEquipmentId
()
{
public
String
getStep
()
{
return
equipmentId
;
return
step
;
}
}
public
void
setEquipmentId
(
String
equipmentId
)
{
public
void
setStep
(
String
step
)
{
this
.
equipmentId
=
equipmentId
;
this
.
step
=
step
;
}
}
public
String
getMobil
e
()
{
public
String
getButtonCod
e
()
{
return
mobil
e
;
return
buttonCod
e
;
}
}
public
void
setMobile
(
String
mobil
e
)
{
public
void
setButtonCode
(
String
buttonCod
e
)
{
this
.
mobile
=
mobil
e
;
this
.
buttonCode
=
buttonCod
e
;
}
}
public
String
getAdminNam
e
()
{
public
String
getButtonStat
e
()
{
return
adminNam
e
;
return
buttonStat
e
;
}
}
public
void
setAdminName
(
String
adminNam
e
)
{
public
void
setButtonState
(
String
buttonStat
e
)
{
this
.
adminName
=
adminNam
e
;
this
.
buttonState
=
buttonStat
e
;
}
}
public
String
getStepState
()
{
public
String
getCameraCodes
()
{
return
stepState
;
return
cameraCodes
;
}
}
public
void
setCameraCodes
(
String
cameraCodes
)
{
public
void
setStepState
(
String
stepState
)
{
this
.
cameraCodes
=
cameraCodes
;
this
.
stepState
=
stepState
;
}
}
}
}
YeeAmosFireAutoSysStart/src/main/java/com/yeejoin/amos/YeeAmosFireAutoSysStart.java
View file @
28409f79
...
@@ -8,9 +8,9 @@ import org.slf4j.Logger;
...
@@ -8,9 +8,9 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeansException
;
import
org.springframework.beans.BeansException
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.web.servlet.FilterRegistrationBean
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
...
@@ -18,6 +18,7 @@ import org.springframework.cloud.netflix.hystrix.EnableHystrix;
...
@@ -18,6 +18,7 @@ import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
...
@@ -27,6 +28,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
...
@@ -27,6 +28,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
import
com.yeejoin.amos.fas.client.invoke.RsDataQueue
;
import
com.yeejoin.amos.fas.client.invoke.RsDataQueue
;
import
com.yeejoin.amos.fas.context.IotContext
;
import
com.yeejoin.amos.fas.context.IotContext
;
import
com.yeejoin.amos.filter.CrossDomainFilter
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
...
@@ -91,4 +93,25 @@ public class YeeAmosFireAutoSysStart implements ApplicationContextAware
...
@@ -91,4 +93,25 @@ public class YeeAmosFireAutoSysStart implements ApplicationContextAware
IotContext
.
getInstance
().
setApplicationContext
(
applicationContext
);
IotContext
.
getInstance
().
setApplicationContext
(
applicationContext
);
RsDataQueue
.
getInstance
().
start
();
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
...
@@ -5,12 +5,12 @@ security.appKeyWeb=CONVERTER_STATION
#environment
#environment
#spring.profiles.active = dev
#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.register-with-eureka
=
true
eureka.client.fetch-registry
=
true
eureka.client.fetch-registry
=
true
eureka.client.healthcheck.enabled
=
true
eureka.client.healthcheck.enabled
=
true
eureka.client.fetchRegistry
=
true
eureka.client.fetchRegistry
=
true
eureka.instance.prefer-ip-address
=
true
#DB properties:
#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.url
=
jdbc:mysql://172.16.11.33:3306/safety-business-2.0?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username
=
root
spring.datasource.username
=
root
...
@@ -53,7 +53,10 @@ emqx.broker=tcp://172.16.10.85:1883
...
@@ -53,7 +53,10 @@ emqx.broker=tcp://172.16.10.85:1883
emqx.user-name
=
super
emqx.user-name
=
super
emqx.password
=
a123456
emqx.password
=
a123456
Push.fegin.name
=
PPMESSAGEPUSHSERVICE15
Push.fegin.name
=
PPMESSAGEPUSHSERVICE15
dutyMode.fegin.name
=
AMOS-DUTY
dutyMode.fegin.name
=
AMOS-DUTY
bussunis.domain
=
http://172.16.10.183:8083
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
\ No newline at end of file
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
...
@@ -10,6 +10,7 @@ eureka.client.register-with-eureka = true
eureka.client.fetch-registry
=
true
eureka.client.fetch-registry
=
true
eureka.client.healthcheck.enabled
=
true
eureka.client.healthcheck.enabled
=
true
eureka.client.fetchRegistry
=
true
eureka.client.fetchRegistry
=
true
eureka.instance.prefer-ip-address
=
true
#DB properties:
#DB properties:
spring.datasource.url
=
jdbc:mysql://amos-mysql:3306/yeejoin_safety_business?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
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
...
@@ -56,4 +57,6 @@ emqx.password=a123456
Push.fegin.name
=
AMOS-PUSH
Push.fegin.name
=
AMOS-PUSH
dutyMode.fegin.name
=
AMOS-DUTY
dutyMode.fegin.name
=
AMOS-DUTY
bussunis.domain
=
http://172.16.10.183:8083
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
\ No newline at end of file
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
...
@@ -10,6 +10,7 @@ eureka.client.register-with-eureka = true
eureka.client.fetch-registry
=
true
eureka.client.fetch-registry
=
true
eureka.client.healthcheck.enabled
=
true
eureka.client.healthcheck.enabled
=
true
eureka.client.fetchRegistry
=
true
eureka.client.fetchRegistry
=
true
eureka.instance.prefer-ip-address
=
true
#DB properties:
#DB properties:
spring.datasource.url
=
jdbc:mysql://47.103.14.66:3306/91-safety-business?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
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
...
@@ -56,4 +57,6 @@ emqx.password=a123456
Push.fegin.name
=
PPMESSAGEPUSHSERVICE15
Push.fegin.name
=
PPMESSAGEPUSHSERVICE15
dutyMode.fegin.name
=
AMOS-DUTY
dutyMode.fegin.name
=
AMOS-DUTY
bussunis.domain
=
http://172.16.10.183:8083
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
\ No newline at end of file
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
server.port
=
8083
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
View file @
28409f79
...
@@ -279,4 +279,16 @@
...
@@ -279,4 +279,16 @@
update f_risk_level set manage_level = 4 where level = '4';
update f_risk_level set manage_level = 4 where level = '4';
</sql>
</sql>
</changeSet>
</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>
</databaseChangeLog>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fier_station.xml
View file @
28409f79
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
left join f_risk_source frs on frs.id = f.risk_source_id
left join f_risk_source frs on frs.id = f.risk_source_id
WHERE
WHERE
fs.fire_station_id = ${fireStationId}
fs.fire_station_id = ${fireStationId}
and f.id is not null
LIMIT ${start}, ${length};
LIMIT ${start}, ${length};
</select>
</select>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fier_stength.xml
View file @
28409f79
...
@@ -62,5 +62,32 @@
...
@@ -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>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_equippoint.xml
View file @
28409f79
...
@@ -141,6 +141,7 @@
...
@@ -141,6 +141,7 @@
f_fire_equipment as b on a.fire_equipment_id = b.id
f_fire_equipment as b on a.fire_equipment_id = b.id
left join f_dict fd on fd.id = a.alarm_type
left join f_dict fd on fd.id = a.alarm_type
<where>
<where>
a.org_code = #{compCode}
<if
test=
"searchValue!=null and searchValue.trim() != ''"
>
<if
test=
"searchValue!=null and searchValue.trim() != ''"
>
and (a.name like concat('%',#{searchValue},'%') or a.code like concat('%',#{searchValue},'%'))
and (a.name like concat('%',#{searchValue},'%') or a.code like concat('%',#{searchValue},'%'))
</if>
</if>
...
@@ -163,6 +164,7 @@
...
@@ -163,6 +164,7 @@
from
from
f_fire_equipment_point as a
f_fire_equipment_point as a
<where>
<where>
a.org_code = #{compCode}
<if
test=
"searchValue!=null and searchValue.trim() != ''"
>
<if
test=
"searchValue!=null and searchValue.trim() != ''"
>
and (a.name like concat('%',#{searchValue},'%') or a.code like concat('%',#{searchValue},'%'))
and (a.name like concat('%',#{searchValue},'%') or a.code like concat('%',#{searchValue},'%'))
</if>
</if>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_impAndfire_equip.xml
View file @
28409f79
...
@@ -68,7 +68,9 @@
...
@@ -68,7 +68,9 @@
fe.room,
fe.room,
fe.risk_source_id,
fe.risk_source_id,
fe.is_indoor,
fe.is_indoor,
fe.model,fe.manufacturer
fe.model,
fe.manufacturer,
fe.floor3d
FROM
FROM
f_fire_equipment fe
f_fire_equipment fe
LEFT JOIN f_risk_source rs ON rs.id = fe.risk_source_id
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 @@
...
@@ -210,6 +210,7 @@
FROM
FROM
`f_risk_source` rs
`f_risk_source` rs
LEFT JOIN f_risk_level rl ON rl.id = rs.risk_level_id
LEFT JOIN f_risk_level rl ON rl.id = rs.risk_level_id
where rs.org_code = #{compCode}
ORDER BY rs.sort_num,rs.id ASC
ORDER BY rs.sort_num,rs.id ASC
</select>
</select>
...
@@ -597,7 +598,7 @@
...
@@ -597,7 +598,7 @@
FROM
FROM
f_risk_source
f_risk_source
WHERE
WHERE
parent_id = 0
parent_id = 0
and org_code = #{compCode}
)
)
ORDER BY sort_num ASC,id DESC
ORDER BY sort_num ASC,id DESC
</select>
</select>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_waterResource.xml
View file @
28409f79
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
FROM
FROM
f_water_resource fs
f_water_resource fs
WHERE
WHERE
1=1
fs.org_code = #{orgCode}
<if
test=
"name!=null"
>
<if
test=
"name!=null"
>
AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')
AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')
</if>
</if>
...
@@ -63,8 +63,7 @@
...
@@ -63,8 +63,7 @@
f_water_resource fs
f_water_resource fs
left join f_risk_source frs on frs.id = fs.risk_source_id
left join f_risk_source frs on frs.id = fs.risk_source_id
WHERE
WHERE
1=1
fs.org_code = #{orgCode}
<if
test=
"name!=null"
>
<if
test=
"name!=null"
>
AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')
AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')
</if>
</if>
...
@@ -100,6 +99,7 @@
...
@@ -100,6 +99,7 @@
left join f_risk_source frs on frs.id = f.risk_source_id
left join f_risk_source frs on frs.id = f.risk_source_id
WHERE
WHERE
fs.water_resource_id = ${waterResourceId}
fs.water_resource_id = ${waterResourceId}
and f.id is not null
LIMIT ${start}, ${length};
LIMIT ${start}, ${length};
</select>
</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