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
Hide whitespace changes
Inline
Side-by-side
Showing
53 changed files
with
1272 additions
and
480 deletions
+1272
-480
FireEquipmentPoint.java
...a/com/yeejoin/amos/fas/dao/entity/FireEquipmentPoint.java
+11
-0
Message.java
...rc/main/java/com/yeejoin/amos/fas/dao/entity/Message.java
+183
-0
WaterResource.java
...n/java/com/yeejoin/amos/fas/dao/entity/WaterResource.java
+33
-0
BubbleTipAction.java
...com/yeejoin/amos/fas/business/action/BubbleTipAction.java
+67
-0
ContingencyAction.java
...m/yeejoin/amos/fas/business/action/ContingencyAction.java
+36
-30
RiskSituationAction.java
...yeejoin/amos/fas/business/action/RiskSituationAction.java
+125
-0
SimpleTipAction.java
...com/yeejoin/amos/fas/business/action/SimpleTipAction.java
+100
-0
ELEvaluationContext.java
...join/amos/fas/business/action/el/ELEvaluationContext.java
+37
-0
DataItemUtil.java
...m/yeejoin/amos/fas/business/action/util/DataItemUtil.java
+75
-0
WebSocketConfig.java
...n/amos/fas/business/action/websocket/WebSocketConfig.java
+14
-0
BaseController.java
.../yeejoin/amos/fas/business/controller/BaseController.java
+2
-0
FireCarController.java
...ejoin/amos/fas/business/controller/FireCarController.java
+4
-3
FireEquimtPointController.java
...os/fas/business/controller/FireEquimtPointController.java
+11
-5
FireSourceController.java
...in/amos/fas/business/controller/FireSourceController.java
+152
-150
FireStationController.java
...n/amos/fas/business/controller/FireStationController.java
+6
-1
RiskSourceController.java
...in/amos/fas/business/controller/RiskSourceController.java
+10
-3
WaterResourceController.java
...amos/fas/business/controller/WaterResourceController.java
+3
-2
FireStrengthMapper.java
...join/amos/fas/business/dao/mapper/FireStrengthMapper.java
+7
-3
RiskSourceMapper.java
...eejoin/amos/fas/business/dao/mapper/RiskSourceMapper.java
+2
-2
RuleRuningSnapshotMapper.java
...mos/fas/business/dao/mapper/RuleRuningSnapshotMapper.java
+2
-0
View3dMapper.java
...om/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
+1
-1
WaterResourceMapper.java
...oin/amos/fas/business/dao/mapper/WaterResourceMapper.java
+2
-0
IFireEquipmentDao.java
...n/amos/fas/business/dao/repository/IFireEquipmentDao.java
+2
-0
IFireStationDao.java
...oin/amos/fas/business/dao/repository/IFireStationDao.java
+0
-1
IWaterResourceDao.java
...n/amos/fas/business/dao/repository/IWaterResourceDao.java
+3
-0
ContingencyInstanceImpl.java
...os/fas/business/service/impl/ContingencyInstanceImpl.java
+18
-5
EquipmentServiceImpl.java
.../amos/fas/business/service/impl/EquipmentServiceImpl.java
+4
-0
FireCarServiceImpl.java
...in/amos/fas/business/service/impl/FireCarServiceImpl.java
+1
-1
FireEquipPointServiceImpl.java
.../fas/business/service/impl/FireEquipPointServiceImpl.java
+5
-4
FireEquipServiceImpl.java
.../amos/fas/business/service/impl/FireEquipServiceImpl.java
+4
-3
FireStrengthServiceImpl.java
...os/fas/business/service/impl/FireStrengthServiceImpl.java
+18
-29
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+14
-8
RuleRunigSnapshotServiceImpl.java
...s/business/service/impl/RuleRunigSnapshotServiceImpl.java
+34
-34
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+3
-3
WaterResourceServiceImpl.java
...s/fas/business/service/impl/WaterResourceServiceImpl.java
+8
-8
FireStengthService.java
...n/amos/fas/business/service/intfc/FireStengthService.java
+3
-1
IFireEquipService.java
...in/amos/fas/business/service/intfc/IFireEquipService.java
+7
-10
IRiskSourceService.java
...n/amos/fas/business/service/intfc/IRiskSourceService.java
+2
-2
IRuleRunningSnapshotService.java
...s/business/service/intfc/IRuleRunningSnapshotService.java
+0
-1
IWaterResourceService.java
...mos/fas/business/service/intfc/IWaterResourceService.java
+3
-1
ContingencyRo.java
...eejoin/amos/fas/business/service/model/ContingencyRo.java
+165
-154
YeeAmosFireAutoSysStart.java
...c/main/java/com/yeejoin/amos/YeeAmosFireAutoSysStart.java
+25
-1
application-dev.properties
...utoSysStart/src/main/resources/application-dev.properties
+7
-4
application-docker.properties
...SysStart/src/main/resources/application-docker.properties
+5
-2
application-test.properties
...toSysStart/src/main/resources/application-test.properties
+5
-2
application.properties
...ireAutoSysStart/src/main/resources/application.properties
+1
-1
fas-2.0.1.xml
...utoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
+13
-0
dbTemplate_fier_station.xml
.../src/main/resources/db/mapper/dbTemplate_fier_station.xml
+1
-0
dbTemplate_fier_stength.xml
.../src/main/resources/db/mapper/dbTemplate_fier_stength.xml
+28
-0
dbTemplate_fire_equippoint.xml
...c/main/resources/db/mapper/dbTemplate_fire_equippoint.xml
+2
-0
dbTemplate_impAndfire_equip.xml
.../main/resources/db/mapper/dbTemplate_impAndfire_equip.xml
+3
-1
dbTemplate_risk_source.xml
...t/src/main/resources/db/mapper/dbTemplate_risk_source.xml
+2
-1
dbTemplate_waterResource.xml
...src/main/resources/db/mapper/dbTemplate_waterResource.xml
+3
-3
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FireEquipmentPoint.java
View file @
28409f79
...
@@ -42,6 +42,8 @@ public class FireEquipmentPoint extends BasicEntity {
...
@@ -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
...
@@ -82,6 +82,15 @@ public class WaterResource extends BasicEntity{
...
@@ -82,6 +82,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,19 +33,21 @@ import com.yeejoin.amos.fas.dao.entity.FireStrength;
...
@@ -35,19 +33,21 @@ 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
;
@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
;
...
@@ -28,154 +29,155 @@ import java.util.List;
...
@@ -28,154 +29,155 @@ import java.util.List;
@RequestMapping
(
value
=
"/api/fireSource"
)
@RequestMapping
(
value
=
"/api/fireSource"
)
@Api
(
tags
=
"消防资源api"
)
@Api
(
tags
=
"消防资源api"
)
public
class
FireSourceController
extends
BaseController
{
public
class
FireSourceController
extends
BaseController
{
@Autowired
@Autowired
private
IFireCarService
fireCarService
;
private
IFireCarService
fireCarService
;
@Autowired
@Autowired
private
IFireEquipService
iFireEquipService
;
private
IFireEquipService
iFireEquipService
;
@Autowired
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加消防装备"
,
notes
=
"添加消防装备"
)
private
IWaterResourceService
iWaterResourceService
;
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
create
(
@RequestBody
FireEquipment
fireEquipment
)
throws
Exception
{
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加消防装备"
,
notes
=
"添加消防装备"
)
ReginParams
reginParams
=
getSelectedOrgInfo
();
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
String
compCode
=
getOrgCode
(
reginParams
);
public
CommonResponse
create
(
@RequestBody
FireEquipment
fireEquipment
)
throws
Exception
{
fireEquipment
.
setCreateBy
(
getUserId
());
ReginParams
reginParams
=
getSelectedOrgInfo
();
fireEquipment
.
setCreateDate
(
new
Date
());
String
compCode
=
getOrgCode
(
reginParams
);
fireEquipment
.
setOrgCode
(
compCode
);
fireEquipment
.
setCreateBy
(
getUserId
());
return
CommonResponseUtil
.
success
(
iFireEquipService
.
save
(
fireEquipment
));
fireEquipment
.
setCreateDate
(
new
Date
());
}
fireEquipment
.
setOrgCode
(
compCode
);
return
CommonResponseUtil
.
success
(
iFireEquipService
.
save
(
fireEquipment
));
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"编辑消防装备"
,
notes
=
"编辑消防装备"
)
}
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
public
CommonResponse
udpate
(
@PathVariable
Long
id
,
@RequestBody
FireEquipment
fireEquipment
)
{
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"编辑消防装备"
,
notes
=
"编辑消防装备"
)
fireEquipment
.
setId
(
id
);
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
return
CommonResponseUtil
.
success
(
iFireEquipService
.
save
(
fireEquipment
));
public
CommonResponse
udpate
(
@PathVariable
Long
id
,
@RequestBody
FireEquipment
fireEquipment
)
{
}
fireEquipment
.
setId
(
id
);
return
CommonResponseUtil
.
success
(
iFireEquipService
.
save
(
fireEquipment
));
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询单个消防装备"
,
notes
=
"查询单个消防装备"
)
}
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
query
(
@PathVariable
Long
id
)
{
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询单个消防装备"
,
notes
=
"查询单个消防装备"
)
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryOne
(
id
));
public
CommonResponse
query
(
@PathVariable
Long
id
)
{
}
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryOne
(
id
));
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"删除消防装备"
,
notes
=
"查询单个消防装备"
)
}
@RequestMapping
(
value
=
"/{ids}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResponse
delete
(
@PathVariable
String
ids
)
throws
Exception
{
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"删除消防装备"
,
notes
=
"查询单个消防装备"
)
String
[]
idArray
=
ids
.
split
(
","
);
@RequestMapping
(
value
=
"/{ids}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
return
CommonResponseUtil
.
success
(
iFireEquipService
.
delete
(
idArray
));
public
CommonResponse
delete
(
@PathVariable
String
ids
)
throws
Exception
{
}
String
[]
idArray
=
ids
.
split
(
","
);
if
(
iWaterResourceService
.
countAssociatedEquipWaterByIds
(
idArray
)
>
0
)
{
/**
return
CommonResponseUtil
.
failure
(
"该设备已被灭火栓或消防水池绑定,请先删除绑定关系"
);
* 消防车查询
}
*
if
(
iFireEquipService
.
countAssociatedEquipStationByIds
(
idArray
)
>
0
)
{
* @param id
return
CommonResponseUtil
.
failure
(
"该设备已被消防泡沫间或消防小室绑定,请先删除绑定关系"
);
* @return
}
*/
return
CommonResponseUtil
.
success
(
iFireEquipService
.
delete
(
idArray
));
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询消防车"
,
notes
=
"查询消防车"
)
}
@RequestMapping
(
value
=
"/fire-car/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
queryFireCar
(
/**
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
* 消防车查询
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
*
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
* @return
Page
<
HashMap
<
String
,
Object
>>
carList
=
fireCarService
.
queryFireCar
(
getToken
(),
getProduct
(),
getAppKey
(),
param
);
*/
return
CommonResponseUtil
.
success
(
carList
);
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询消防车"
,
notes
=
"查询消防车"
)
}
@RequestMapping
(
value
=
"/fire-car/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
queryFireCar
(
/**
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
* 消防车详情查询
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
*
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
* @param id
Page
<
HashMap
<
String
,
Object
>>
carList
=
fireCarService
.
queryFireCar
(
getToken
(),
getProduct
(),
getAppKey
(),
param
);
* @return
return
CommonResponseUtil
.
success
(
carList
);
*/
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防车"
,
notes
=
"查询消防车"
)
@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
)
{
* 消防车详情查询
FireCarDetailVo
car
=
fireCarService
.
findFireCarById
(
getToken
(),
getProduct
(),
getAppKey
(),
id
);
*
return
CommonResponseUtil
.
success
(
car
);
* @param id
}
* @return
*/
/**
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防车"
,
notes
=
"查询消防车"
)
* 消防装备查询-查询消防装备及视频监控
@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
)
{
* @param id
FireCarDetailVo
car
=
fireCarService
.
findFireCarById
(
getToken
(),
getProduct
(),
getAppKey
(),
id
);
* @return
return
CommonResponseUtil
.
success
(
car
);
*/
}
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"消防装备查询"
,
notes
=
"消防装备查询"
)
@RequestMapping
(
value
=
"/fire-equip/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
/**
public
CommonResponse
queryFireEquipment
(
* 消防装备查询-查询消防装备及视频监控
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
*
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
* @return
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
*/
Page
<
HashMap
<
String
,
Object
>>
carList
=
iFireEquipService
.
queryFireEquip
(
param
);
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"消防装备查询"
,
notes
=
"消防装备查询"
)
return
CommonResponseUtil
.
success
(
carList
);
@RequestMapping
(
value
=
"/fire-equip/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
}
public
CommonResponse
queryFireEquipment
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
/**
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
* 配套设备查询
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
*
Page
<
HashMap
<
String
,
Object
>>
carList
=
iFireEquipService
.
queryFireEquip
(
param
);
* @param id
return
CommonResponseUtil
.
success
(
carList
);
* @return
}
*/
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"配套设备查询"
,
notes
=
"配套设备查询"
)
/**
@RequestMapping
(
value
=
"/matching-equip/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
* 配套设备查询
public
CommonResponse
queryFireEquipmentByProId
(
*
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
true
)
List
<
CommonRequest
>
queryRequests
,
* @return
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
*/
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"配套设备查询"
,
notes
=
"配套设备查询"
)
Page
<
HashMap
<
String
,
Object
>>
carList
=
iFireEquipService
.
queryFireEquipByProId
(
param
);
@RequestMapping
(
value
=
"/matching-equip/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
return
CommonResponseUtil
.
success
(
carList
);
public
CommonResponse
queryFireEquipmentByProId
(
}
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
true
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
/**
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
* 生产区域查询查询
Page
<
HashMap
<
String
,
Object
>>
carList
=
iFireEquipService
.
queryFireEquipByProId
(
param
);
*
return
CommonResponseUtil
.
success
(
carList
);
* @param id
}
* @return
*/
/**
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生产区域查询"
,
notes
=
"生产区域查询"
)
* 生产区域查询查询
@RequestMapping
(
value
=
"/fire-equip/area"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
*
public
CommonResponse
queryProArea
()
{
* @return
List
<
String
>
car
=
iFireEquipService
.
findFireEquipArea
();
*/
return
CommonResponseUtil
.
success
(
car
);
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生产区域查询"
,
notes
=
"生产区域查询"
)
}
@RequestMapping
(
value
=
"/fire-equip/area"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryProArea
()
{
// @Authorization(ingore = true)
List
<
String
>
car
=
iFireEquipService
.
findFireEquipArea
();
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防设备历史数据"
,
notes
=
"查询消防设备历史数据"
)
return
CommonResponseUtil
.
success
(
car
);
@RequestMapping
(
value
=
"/data/history"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
}
public
CommonResponse
queryForFireEquipmentHistory
(
@ApiParam
(
value
=
"设备名称"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
fireEquipmentName
,
// @Authorization(ingore = true)
@ApiParam
(
value
=
"按保护对象名称"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
equipmentName
,
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防设备历史数据"
,
notes
=
"查询消防设备历史数据"
)
@ApiParam
(
value
=
"开始日期"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
startTime
,
@RequestMapping
(
value
=
"/data/history"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@ApiParam
(
value
=
"结束日期"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
endTime
,
int
pageNumber
,
public
CommonResponse
queryForFireEquipmentHistory
(
int
pageSize
)
{
@ApiParam
(
value
=
"设备名称"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
fireEquipmentName
,
@ApiParam
(
value
=
"按保护对象名称"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
equipmentName
,
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
@ApiParam
(
value
=
"开始日期"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
startTime
,
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForFireEquipmentHistory
(
@ApiParam
(
value
=
"结束日期"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
endTime
,
int
pageNumber
,
StringUtils
.
trimToNull
(
fireEquipmentName
),
StringUtils
.
trimToNull
(
equipmentName
),
int
pageSize
)
{
StringUtils
.
trimToNull
(
startTime
),
StringUtils
.
trimToNull
(
endTime
),
commonPageable
));
}
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForFireEquipmentHistory
(
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防设备列表"
,
notes
=
"查询消防设备列表"
)
StringUtils
.
trimToNull
(
fireEquipmentName
),
StringUtils
.
trimToNull
(
equipmentName
),
@RequestMapping
(
value
=
"/info/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
StringUtils
.
trimToNull
(
startTime
),
StringUtils
.
trimToNull
(
endTime
),
commonPageable
));
public
CommonResponse
queryForEquipmentList
(
}
@ApiParam
(
value
=
"设备名称"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
name
,
@ApiParam
(
value
=
"设备编号"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
code
,
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询消防设备列表"
,
notes
=
"查询消防设备列表"
)
@ApiParam
(
value
=
"设备类型"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
equipClassify
,
@RequestMapping
(
value
=
"/info/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
int
pageNumber
,
int
pageSize
)
{
public
CommonResponse
queryForEquipmentList
(
@ApiParam
(
value
=
"设备名称"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
name
,
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
@ApiParam
(
value
=
"设备编号"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
code
,
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForEquipmentList
(
StringUtils
.
trimToNull
(
name
),
@ApiParam
(
value
=
"设备类型"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
equipClassify
,
StringUtils
.
trimToNull
(
code
),
StringUtils
.
trimToNull
(
equipClassify
),
commonPageable
));
int
pageNumber
,
int
pageSize
)
{
}
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消防状态明细信息"
,
notes
=
"消防状态明细信息"
)
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForEquipmentList
(
StringUtils
.
trimToNull
(
name
),
@RequestMapping
(
value
=
"/info/detail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
StringUtils
.
trimToNull
(
code
),
StringUtils
.
trimToNull
(
equipClassify
),
commonPageable
));
public
CommonResponse
queryForEquipmentList
(
@ApiParam
(
value
=
"设备名称"
,
required
=
true
)
@RequestParam
Long
id
,
}
@ApiParam
(
value
=
"设备编号"
,
required
=
true
)
@RequestParam
String
type
)
throws
Exception
{
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消防状态明细信息"
,
notes
=
"消防状态明细信息"
)
return
CommonResponseUtil
.
success
(
iFireEquipService
.
queryForDetail
(
type
,
id
));
@RequestMapping
(
value
=
"/info/detail"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
}
public
CommonResponse
queryForEquipmentList
(
@ApiParam
(
value
=
"设备名称"
,
required
=
true
)
@RequestParam
Long
id
,
@ApiParam
(
value
=
"设备编号"
,
required
=
true
)
@RequestParam
String
type
)
throws
Exception
{
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
)
{
int
pageNumber
=
map
.
get
(
"pageNumber"
)
!=
null
?
Integer
.
parseInt
(
map
.
get
(
"pageNumber"
).
toString
())
:
0
;
int
pageSize
=
map
.
get
(
"pageSize"
)
!=
null
?
Integer
.
parseInt
(
map
.
get
(
"pageSize"
).
toString
())
:
0
;
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
Long
total
=
fireEquipPointMapper
.
countByMap
(
map
);
Long
total
=
fireEquipPointMapper
.
countByMap
(
map
);
if
(
total
.
equals
(
0L
))
{
if
(
total
.
equals
(
0L
))
{
return
CommonResponseUtil
.
success
(
new
PageImpl
<>(
Lists
.
newArrayList
(),
null
,
total
));
return
CommonResponseUtil
.
success
(
new
PageImpl
<>(
Lists
.
newArrayList
(),
commonPageable
,
total
));
}
}
int
pageNumber
=
map
.
get
(
"pageNumber"
)
!=
null
?
Integer
.
parseInt
(
map
.
get
(
"pageNumber"
).
toString
())
:
0
;
map
.
put
(
"offset"
,
pageNumber
*
pageSize
);
int
pageSize
=
map
.
get
(
"pageSize"
)
!=
null
?
Integer
.
parseInt
(
map
.
get
(
"pageSize"
).
toString
())
:
0
;
CommonPageable
commonPageable
=
new
CommonPageable
(
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
;
...
@@ -40,5 +41,6 @@ public interface FireStengthService {
...
@@ -40,5 +41,6 @@ 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
;
private
String
fireEquipmentName
;
//消防设备名称
public
String
getBatchNo
()
{
return
batchNo
;
}
public
void
setBatchNo
(
String
batchNo
)
{
this
.
batchNo
=
batchNo
;
}
/**
*
*/
private
static
final
long
serialVersionUID
=
451541541451L
;
private
String
fireEquipmentName
;
//消防设备名称
private
String
fireEquipmentId
;
//消防设备id
private
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,201 +60,198 @@ public class ContingencyRo extends BasicsRo {
...
@@ -46,201 +60,198 @@ public class ContingencyRo extends BasicsRo {
private
String
stepState
;
//步骤操作状态
private
String
stepState
;
//步骤操作状态
public
String
getFireEquipmentName
()
{
return
fireEquipmentName
;
}
public
String
getEquipmentPosition3d
()
{
public
void
setFireEquipmentName
(
String
fireEquipmentName
)
{
return
equipmentPosition3d
;
this
.
fireEquipmentName
=
fireEquipmentName
;
}
}
public
void
setEquipmentPosition3d
(
String
equipmentPosition3d
)
{
this
.
equipmentPosition3d
=
equipmentPosition3d
;
}
public
String
getButtonState
()
{
return
buttonState
;
}
public
void
setButtonState
(
String
buttonState
)
{
this
.
buttonState
=
buttonState
;
}
public
String
getStepState
()
{
public
String
getFireEquipmentId
()
{
return
stepState
;
return
fireEquipmentId
;
}
}
public
void
setStepState
(
String
stepState
)
{
this
.
stepState
=
stepState
;
}
public
String
getButtonCode
(
)
{
public
void
setFireEquipmentId
(
String
fireEquipmentId
)
{
return
buttonCode
;
this
.
fireEquipmentId
=
fireEquipmentId
;
}
}
public
void
setButtonCode
(
String
buttonCode
)
{
public
Integer
getLayer
(
)
{
this
.
buttonCode
=
buttonCode
;
return
layer
;
}
}
public
String
getStep
(
)
{
public
void
setLayer
(
Integer
layer
)
{
return
step
;
this
.
layer
=
layer
;
}
}
public
void
setStep
(
String
step
)
{
public
Integer
getFireEquipmentLayer
(
)
{
this
.
step
=
step
;
return
fireEquipmentLayer
;
}
}
public
void
setFireEquipmentLayer
(
Integer
fireEquipmentLayer
)
{
this
.
fireEquipmentLayer
=
fireEquipmentLayer
;
}
public
String
getFireEquipmentPosition
()
{
return
fireEquipmentPosition
;
}
public
void
setFireEquipmentPosition
(
String
fireEquipmentPosition
)
{
this
.
fireEquipmentPosition
=
fireEquipmentPosition
;
}
public
boolean
getRunstep
()
{
public
String
getEquipmentId
()
{
return
runstep
;
return
equipmentId
;
}
}
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
()
{
return
cameraIds
;
return
cameraIds
;
}
}
public
void
setCameraIds
(
String
cameraIds
)
{
public
void
setCameraIds
(
String
cameraIds
)
{
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
()
{
return
confirm
;
return
confirm
;
}
}
public
void
setConfirm
(
String
confirm
)
{
public
void
setConfirm
(
String
confirm
)
{
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
()
{
return
picture4
;
}
public
String
getFireEquipmentName
(
)
{
public
void
setPicture4
(
String
picture4
)
{
return
fireEquipmentName
;
this
.
picture4
=
picture4
;
}
}
public
void
setFireEquipmentName
(
String
fireEquipmentName
)
{
public
String
getFireTruckRoute
(
)
{
this
.
fireEquipmentName
=
fireEquipmentNam
e
;
return
fireTruckRout
e
;
}
}
public
int
getLayer
(
)
{
public
void
setFireTruckRoute
(
String
fireTruckRoute
)
{
return
layer
;
this
.
fireTruckRoute
=
fireTruckRoute
;
}
}
public
void
setLayer
(
int
layer
)
{
public
Boolean
getRunstep
(
)
{
this
.
layer
=
layer
;
return
runstep
;
}
}
public
int
getFireEquipmentLayer
(
)
{
public
void
setRunstep
(
Boolean
runstep
)
{
return
fireEquipmentLayer
;
this
.
runstep
=
runstep
;
}
}
public
void
setFireEquipmentLayer
(
int
fireEquipmentLayer
)
{
public
String
getStep
(
)
{
this
.
fireEquipmentLayer
=
fireEquipmentLayer
;
return
step
;
}
}
public
String
getEquipmentId
(
)
{
public
void
setStep
(
String
step
)
{
return
equipmentId
;
this
.
step
=
step
;
}
}
public
void
setEquipmentId
(
String
equipmentId
)
{
public
String
getButtonCode
(
)
{
this
.
equipmentId
=
equipmentId
;
return
buttonCode
;
}
}
public
String
getMobile
(
)
{
public
void
setButtonCode
(
String
buttonCode
)
{
return
mobil
e
;
this
.
buttonCode
=
buttonCod
e
;
}
}
public
void
setMobile
(
String
mobile
)
{
public
String
getButtonState
(
)
{
this
.
mobile
=
mobil
e
;
return
buttonStat
e
;
}
}
public
String
getAdminName
(
)
{
public
void
setButtonState
(
String
buttonState
)
{
return
adminNam
e
;
this
.
buttonState
=
buttonStat
e
;
}
}
public
void
setAdminName
(
String
adminName
)
{
public
String
getStepState
(
)
{
this
.
adminName
=
adminNam
e
;
return
stepStat
e
;
}
}
public
void
setStepState
(
String
stepState
)
{
this
.
stepState
=
stepState
;
}
public
String
getCameraCodes
()
{
return
cameraCodes
;
}
public
void
setCameraCodes
(
String
cameraCodes
)
{
this
.
cameraCodes
=
cameraCodes
;
}
}
}
YeeAmosFireAutoSysStart/src/main/java/com/yeejoin/amos/YeeAmosFireAutoSysStart.java
View file @
28409f79
...
@@ -8,9 +8,9 @@ import org.slf4j.Logger;
...
@@ -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