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
49dec6b2
Commit
49dec6b2
authored
Sep 30, 2022
by
maoying
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_upgrade' of…
Merge branch 'dev_upgrade' of
http://39.98.45.134:8090/station/YeeAmosFireAutoSysRoot
into dev_upgrade
parents
c9e6635d
93984635
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
518 additions
and
80 deletions
+518
-80
DutyPersonEnum.java
...ava/com/yeejoin/amos/fas/common/enums/DutyPersonEnum.java
+77
-0
pom.xml
YeeAmosFireAutoSysService/pom.xml
+15
-1
ContingencyAction.java
...m/yeejoin/amos/fas/business/action/ContingencyAction.java
+0
-0
ContingencyPlanController.java
...os/fas/business/controller/ContingencyPlanController.java
+6
-0
LoginController.java
...yeejoin/amos/fas/business/controller/LoginController.java
+2
-2
PlanVisual3dController.java
.../amos/fas/business/controller/PlanVisual3dController.java
+11
-5
View3dController.java
...eejoin/amos/fas/business/controller/View3dController.java
+10
-7
PlanOperationRecordMapper.java
...os/fas/business/dao/mapper/PlanOperationRecordMapper.java
+3
-0
IContingencyPlanInstanceRepository.java
...ss/dao/repository/IContingencyPlanInstanceRepository.java
+3
-0
IPlanOperationRecordDao.java
.../fas/business/dao/repository/IPlanOperationRecordDao.java
+1
-0
JcsFeign.java
...in/java/com/yeejoin/amos/fas/business/feign/JcsFeign.java
+38
-0
RemoteSecurityService.java
...eejoin/amos/fas/business/feign/RemoteSecurityService.java
+12
-23
ContingencyInstanceImpl.java
...os/fas/business/service/impl/ContingencyInstanceImpl.java
+10
-1
ContingencyPlanServiceImpl.java
...fas/business/service/impl/ContingencyPlanServiceImpl.java
+7
-0
HandlerMqttMessageImpl.java
...mos/fas/business/service/impl/HandlerMqttMessageImpl.java
+1
-1
PlanRuleServiceImpl.java
...n/amos/fas/business/service/impl/PlanRuleServiceImpl.java
+40
-0
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+46
-20
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+64
-5
IContingencyPlanService.java
...s/fas/business/service/intfc/IContingencyPlanService.java
+1
-0
IPlanRuleService.java
...oin/amos/fas/business/service/intfc/IPlanRuleService.java
+8
-0
IPlanVisual3dService.java
...amos/fas/business/service/intfc/IPlanVisual3dService.java
+4
-0
IView3dService.java
...ejoin/amos/fas/business/service/intfc/IView3dService.java
+7
-1
PlanStepVo.java
...ain/java/com/yeejoin/amos/fas/business/vo/PlanStepVo.java
+10
-0
PermissionAspect.java
...in/java/com/yeejoin/amos/fas/config/PermissionAspect.java
+2
-2
application-dev.properties
...utoSysStart/src/main/resources/application-dev.properties
+8
-4
application-docker.properties
...SysStart/src/main/resources/application-docker.properties
+8
-4
application-test.properties
...toSysStart/src/main/resources/application-test.properties
+8
-4
application.properties
...ireAutoSysStart/src/main/resources/application.properties
+4
-0
fas-2.0.1.xml
...utoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
+10
-0
PlanOperationRecordMapper.xml
...rc/main/resources/db/mapper/PlanOperationRecordMapper.xml
+9
-0
plan-step.json
...osFireAutoSysStart/src/main/resources/json/plan-step.json
+93
-0
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/common/enums/DutyPersonEnum.java
0 → 100644
View file @
49dec6b2
package
com
.
yeejoin
.
amos
.
fas
.
common
.
enums
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
*0、运行中,1、完毕,3、中断
* @author suhg
*/
public
enum
DutyPersonEnum
{
FIRE_PERSON
(
"驻站消防"
,
"fire"
),
OPS_PERSON
(
"运维人员"
,
"ops"
),
REAL_PERSON
(
"物业安保"
,
"realEstate"
);
/**
* 名称,描述
*/
private
String
name
;
/**
* 编码
*/
private
String
code
;
/**
* 颜色
*/
private
String
color
;
private
DutyPersonEnum
(
String
name
,
String
code
){
this
.
name
=
name
;
this
.
code
=
code
;
}
public
static
DutyPersonEnum
getEnum
(
String
code
)
{
DutyPersonEnum
checkStatusEnum
=
null
;
for
(
DutyPersonEnum
type:
DutyPersonEnum
.
values
())
{
if
(
type
.
getCode
().
equals
(
code
))
{
checkStatusEnum
=
type
;
break
;
}
}
return
checkStatusEnum
;
}
public
static
List
<
Map
<
String
,
Object
>>
getEnumList
()
{
List
<
Map
<
String
,
Object
>>
nameList
=
new
ArrayList
<>();
for
(
DutyPersonEnum
c:
DutyPersonEnum
.
values
())
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"name"
,
c
.
getName
());
map
.
put
(
"code"
,
c
.
getCode
());
nameList
.
add
(
map
);
}
return
nameList
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
}
YeeAmosFireAutoSysService/pom.xml
View file @
49dec6b2
...
@@ -136,7 +136,21 @@
...
@@ -136,7 +136,21 @@
<version>
6.11
</version>
<version>
6.11
</version>
<scope>
test
</scope>
<scope>
test
</scope>
</dependency>
</dependency>
<dependency>
<groupId>
com.yeejoin
</groupId>
<artifactId>
amos-component-authtoken
</artifactId>
<version>
1.7.13-SNAPSHOT
</version>
<exclusions>
<exclusion>
<groupId>
org.typroject
</groupId>
<artifactId>
*
</artifactId>
</exclusion>
<exclusion>
<groupId>
io.springfox
</groupId>
<artifactId>
*
</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencies>
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/ContingencyAction.java
View file @
49dec6b2
This diff is collapsed.
Click to expand it.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/ContingencyPlanController.java
View file @
49dec6b2
...
@@ -232,4 +232,10 @@ public class ContingencyPlanController extends BaseController {
...
@@ -232,4 +232,10 @@ public class ContingencyPlanController extends BaseController {
return
CommonResponseUtil2
.
success
(
bool
);
return
CommonResponseUtil2
.
success
(
bool
);
}
}
@ApiOperation
(
value
=
"获取预案状态"
)
@RequestMapping
(
value
=
"/getPlanStatus"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
getPlanStatus
()
{
return
CommonResponseUtil2
.
success
(
contingencyPlanService
.
getPlanStatus
());
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/LoginController.java
View file @
49dec6b2
...
@@ -64,10 +64,10 @@ public class LoginController {
...
@@ -64,10 +64,10 @@ public class LoginController {
@Value
(
"${outSystem.user.password}"
)
@Value
(
"${outSystem.user.password}"
)
private
String
password
;
private
String
password
;
@Value
(
"${
security.productWeb
}"
)
@Value
(
"${
amos.system.user.product
}"
)
private
String
product
;
private
String
product
;
@Value
(
"${
security.appK
ey}"
)
@Value
(
"${
amos.system.user.app-k
ey}"
)
private
String
appKey
;
private
String
appKey
;
@ApiOperation
(
value
=
"通过userId登录"
,
notes
=
"查询设备指标"
)
@ApiOperation
(
value
=
"通过userId登录"
,
notes
=
"查询设备指标"
)
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/PlanVisual3dController.java
View file @
49dec6b2
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.fas.business.controller;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.fas.business.controller;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService
;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService
;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
import
com.yeejoin.amos.fas.business.vo.PlanStepVo
;
import
com.yeejoin.amos.fas.config.Permission
;
import
com.yeejoin.amos.fas.config.Permission
;
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
;
...
@@ -10,6 +11,7 @@ import com.yeejoin.amos.fas.dao.entity.TextPlan;
...
@@ -10,6 +11,7 @@ import com.yeejoin.amos.fas.dao.entity.TextPlan;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -151,17 +153,21 @@ public class PlanVisual3dController extends BaseController {
...
@@ -151,17 +153,21 @@ public class PlanVisual3dController extends BaseController {
@Permission
@Permission
@ApiOperation
(
value
=
"根据批次号获取预案的步骤"
,
notes
=
"根据批次号获取预案的步骤"
)
@ApiOperation
(
value
=
"根据批次号获取预案的步骤"
,
notes
=
"根据批次号获取预案的步骤"
)
@GetMapping
(
value
=
"/plan/getPlanStep"
)
@GetMapping
(
value
=
"/plan/getPlanStep"
)
public
ResponseModel
getPlanStep
(
@RequestParam
(
"batchNo"
)
String
batchNo
)
{
public
ResponseModel
getPlanStep
(
@RequestParam
(
value
=
"batchNo"
,
required
=
false
)
String
batchNo
)
{
if
(
!
StringUtil
.
isNot
Empty
(
batchNo
))
{
if
(
StringUtils
.
is
Empty
(
batchNo
))
{
batchNo
=
planVisual3dService
.
getNewestBatchNo
();
batchNo
=
planVisual3dService
.
getNewestBatchNo
();
}
}
if
(!
StringUtil
.
isNotEmpty
(
batchNo
))
{
return
CommonResponseUtil
.
successNew
(
null
);
}
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
getPlanStepByBatchNo
(
batchNo
));
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
getPlanStepByBatchNo
(
batchNo
));
}
}
@Permission
@Permission
@ApiOperation
(
value
=
"根据批次号更新预案的步骤"
,
notes
=
"根据批次号更新预案的步骤"
)
@PostMapping
(
value
=
"/plan/updatePlanStep"
)
public
ResponseModel
updatePlanStep
(
@RequestBody
PlanStepVo
planStepVo
)
{
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
updatePlanStep
(
planStepVo
));
}
@Permission
@ApiOperation
(
value
=
"根据批次号获取预案的记录"
,
notes
=
"根据R批次号获取预案的记录"
)
@ApiOperation
(
value
=
"根据批次号获取预案的记录"
,
notes
=
"根据R批次号获取预案的记录"
)
@GetMapping
(
value
=
"/plan/getPlaneRecord"
)
@GetMapping
(
value
=
"/plan/getPlaneRecord"
)
public
ResponseModel
getPlaneRecord
(
@RequestParam
(
"batchNo"
)
String
batchNo
)
{
public
ResponseModel
getPlaneRecord
(
@RequestParam
(
"batchNo"
)
String
batchNo
)
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/View3dController.java
View file @
49dec6b2
...
@@ -180,13 +180,7 @@ public class View3dController extends BaseController {
...
@@ -180,13 +180,7 @@ public class View3dController extends BaseController {
@ApiOperation
(
value
=
"今日值班统计"
,
notes
=
"今日值班统计"
)
@ApiOperation
(
value
=
"今日值班统计"
,
notes
=
"今日值班统计"
)
@GetMapping
(
value
=
"statistics/duty"
)
@GetMapping
(
value
=
"statistics/duty"
)
public
CommonResponse
getStatisticsDuty
(){
public
CommonResponse
getStatisticsDuty
(){
ReginParams
reginParams
=
getSelectedOrgInfo
();
return
CommonResponseUtil
.
success
(
view3dService
.
getStatisticsDuty
());
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
appKey
=
getAppKey
();
product
=
getProduct
();
staticOrgCode
=
orgCode
;
token
=
getToken
();
return
view3dService
.
getStatisticsDuty
(
getAppKey
(),
getProduct
(),
token
,
orgCode
);
}
}
@Permission
@Permission
...
@@ -332,6 +326,15 @@ public class View3dController extends BaseController {
...
@@ -332,6 +326,15 @@ public class View3dController extends BaseController {
return
CommonResponseUtil
.
success
(
view3dService
.
listPointsByRegionId
(
regionId
,
type
));
return
CommonResponseUtil
.
success
(
view3dService
.
listPointsByRegionId
(
regionId
,
type
));
}
}
@Permission
@ApiOperation
(
value
=
"今日值班列表"
,
notes
=
"今日值班列表"
)
@GetMapping
(
value
=
"dutyList"
)
public
CommonResponse
dutyList
(){
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
return
CommonResponseUtil
.
success
(
view3dService
.
dutyList
(
orgCode
));
}
@Autowired
@Autowired
IRocketMQService
rocketMQService
;
IRocketMQService
rocketMQService
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/PlanOperationRecordMapper.java
View file @
49dec6b2
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
com.google.gson.JsonObject
;
import
com.google.gson.JsonObject
;
import
com.yeejoin.amos.fas.dao.entity.PlanRule
;
import
com.yeejoin.amos.fas.datasync.bo.PlanOperationRecordSyncBo
;
import
com.yeejoin.amos.fas.datasync.bo.PlanOperationRecordSyncBo
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
...
@@ -34,4 +35,6 @@ public interface PlanOperationRecordMapper {
...
@@ -34,4 +35,6 @@ public interface PlanOperationRecordMapper {
* @return
* @return
*/
*/
String
getNewestBatchNo
();
String
getNewestBatchNo
();
PlanRule
getPlanRuleByBatchNo
(
String
batchNo
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IContingencyPlanInstanceRepository.java
View file @
49dec6b2
...
@@ -81,4 +81,7 @@ public interface IContingencyPlanInstanceRepository extends BaseDao<ContingencyP
...
@@ -81,4 +81,7 @@ public interface IContingencyPlanInstanceRepository extends BaseDao<ContingencyP
" ORDER BY"
+
" ORDER BY"
+
" t.create_date DESC limit 1"
,
nativeQuery
=
true
)
" t.create_date DESC limit 1"
,
nativeQuery
=
true
)
String
queryRecordOne
(
String
batchNo
,
String
recordType
);
String
queryRecordOne
(
String
batchNo
,
String
recordType
);
@Query
(
value
=
"SELECT * FROM `contingency_plan_instance` WHERE batch_no = ?1"
,
nativeQuery
=
true
)
List
<
ContingencyPlanInstance
>
findByBatchNo
(
String
batchNo
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IPlanOperationRecordDao.java
View file @
49dec6b2
...
@@ -30,4 +30,5 @@ public interface IPlanOperationRecordDao extends BaseDao<PlanOperationRecord, Lo
...
@@ -30,4 +30,5 @@ public interface IPlanOperationRecordDao extends BaseDao<PlanOperationRecord, Lo
*/
*/
List
<
PlanOperationRecord
>
findByStatus
(
Integer
status
);
List
<
PlanOperationRecord
>
findByStatus
(
Integer
status
);
List
<
PlanOperationRecord
>
findByBatchNoAndStatus
(
String
batchNo
,
Integer
status
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/feign/JcsFeign.java
0 → 100644
View file @
49dec6b2
package
com
.
yeejoin
.
amos
.
fas
.
business
.
feign
;
import
com.yeejoin.amos.fas.business.jpush.PushMsgParam
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.ResponseModel
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
/**
* 消息推送
* @author maoying
*
*/
@FeignClient
(
name
=
"${Jcs.fegin.name}"
,
configuration
={
MultipartSupportConfig
.
class
})
public
interface
JcsFeign
{
/**
* 新值班月视图
* @param dutyDay
* @param shiftId
* @param postType
* @return
*/
@RequestMapping
(
value
=
"/jcs/common/duty-person/new-duty-detail"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
ResponseModel
dutyStatisticsByDate
(
@RequestParam
String
beginDate
,
@RequestParam
String
endDate
,
@RequestParam
(
required
=
false
)
String
fieldCode
);
/**
* 查询当前值班人信息列表
* @return
*/
@RequestMapping
(
value
=
"/jcs/common/duty-person/person/on_duty/list"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
ResponseModel
dutyPersonList
();
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/feign/RemoteSecurityService.java
View file @
49dec6b2
...
@@ -9,6 +9,7 @@ import java.util.Set;
...
@@ -9,6 +9,7 @@ import java.util.Set;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.component.authtoken.robot.AmosRequestContext
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
...
@@ -38,20 +39,12 @@ import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
...
@@ -38,20 +39,12 @@ import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
@Service
(
"remoteSecurityService"
)
@Service
(
"remoteSecurityService"
)
public
class
RemoteSecurityService
{
public
class
RemoteSecurityService
{
@Autowired
AmosRequestContext
amosRequestContext
;
@Value
(
"${
security
.password}"
)
@Value
(
"${
amos.system.user
.password}"
)
private
String
password
;
private
String
password
;
@Value
(
"${security.loginId}"
)
private
String
loginId
;
@Value
(
"${security.productWeb}"
)
private
String
productWeb
;
@Value
(
"${security.appKey}"
)
private
String
appKey
;
@Autowired
@Autowired
private
RedisTemplate
<
String
,
String
>
redisTemplate
;
private
RedisTemplate
<
String
,
String
>
redisTemplate
;
...
@@ -157,15 +150,15 @@ public class RemoteSecurityService {
...
@@ -157,15 +150,15 @@ public class RemoteSecurityService {
public
Toke
getServerToken
()
{
public
Toke
getServerToken
()
{
IdPasswordAuthModel
dPasswordAuthModel
=
new
IdPasswordAuthModel
();
IdPasswordAuthModel
dPasswordAuthModel
=
new
IdPasswordAuthModel
();
dPasswordAuthModel
.
setLoginId
(
loginId
);
dPasswordAuthModel
.
setLoginId
(
amosRequestContext
.
getUserName
()
);
dPasswordAuthModel
.
setPassword
(
DesUtil
.
encode
(
password
,
"qaz"
));
dPasswordAuthModel
.
setPassword
(
DesUtil
.
encode
(
password
,
"qaz"
));
Toke
toke
=
null
;
Toke
toke
=
null
;
try
{
try
{
toke
=
JSON
.
parseObject
(
redisTemplate
.
opsForValue
().
get
(
buildKey
(
loginId
)),
Toke
.
class
);
toke
=
JSON
.
parseObject
(
redisTemplate
.
opsForValue
().
get
(
buildKey
(
amosRequestContext
.
getUserName
()
)),
Toke
.
class
);
if
(
ObjectUtils
.
isEmpty
(
toke
)){
if
(
ObjectUtils
.
isEmpty
(
toke
)){
toke
=
getLogin
(
dPasswordAuthModel
);
toke
=
getLogin
(
dPasswordAuthModel
);
}
else
{
}
else
{
RequestContext
.
setProduct
(
productWeb
);
RequestContext
.
setProduct
(
amosRequestContext
.
getProduct
()
);
if
(!
TokenOperation
.
refresh
(
toke
.
getToke
()))
{
if
(!
TokenOperation
.
refresh
(
toke
.
getToke
()))
{
toke
=
getLogin
(
dPasswordAuthModel
);
toke
=
getLogin
(
dPasswordAuthModel
);
}
}
...
@@ -178,15 +171,11 @@ public class RemoteSecurityService {
...
@@ -178,15 +171,11 @@ public class RemoteSecurityService {
private
Toke
getLogin
(
IdPasswordAuthModel
dPasswordAuthModel
){
private
Toke
getLogin
(
IdPasswordAuthModel
dPasswordAuthModel
){
Toke
toke
=
new
Toke
();
Toke
toke
=
new
Toke
();
RequestContext
.
setProduct
(
productWeb
);
RequestContext
.
setProduct
(
amosRequestContext
.
getProduct
());
FeignClientResult
feignClientResult
=
Privilege
.
authClient
.
idpassword
(
dPasswordAuthModel
);
toke
.
setToke
(
amosRequestContext
.
getToken
());
Map
map
=
(
Map
)
feignClientResult
.
getResult
();
toke
.
setProduct
(
amosRequestContext
.
getProduct
());
if
(
map
!=
null
){
toke
.
setAppKey
(
amosRequestContext
.
getAppKey
());
toke
.
setToke
(
map
.
get
(
"token"
).
toString
());
redisTemplate
.
opsForValue
().
set
(
buildKey
(
dPasswordAuthModel
.
getLoginId
()),
JSONObject
.
toJSONString
(
toke
),
28
,
TimeUnit
.
DAYS
);
toke
.
setProduct
(
productWeb
);
toke
.
setAppKey
(
appKey
);
redisTemplate
.
opsForValue
().
set
(
buildKey
(
dPasswordAuthModel
.
getLoginId
()),
JSONObject
.
toJSONString
(
toke
),
28
,
TimeUnit
.
DAYS
);
}
return
toke
;
return
toke
;
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceImpl.java
View file @
49dec6b2
...
@@ -8,6 +8,7 @@ import java.util.List;
...
@@ -8,6 +8,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.Optional
;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanRuleService
;
import
com.yeejoin.amos.fas.datasync.bo.ContingencyOriginalDataSyncBo
;
import
com.yeejoin.amos.fas.datasync.bo.ContingencyOriginalDataSyncBo
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -92,6 +93,9 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
...
@@ -92,6 +93,9 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
@Autowired
@Autowired
private
ContingencyOriginalMapper
contingencyOriginalMapper
;
private
ContingencyOriginalMapper
contingencyOriginalMapper
;
@Autowired
private
IPlanRuleService
planRuleService
;
private
static
Map
<
String
,
String
>
stepMap
=
new
HashMap
<>();
private
static
Map
<
String
,
String
>
stepMap
=
new
HashMap
<>();
...
@@ -313,8 +317,13 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
...
@@ -313,8 +317,13 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
if
(
"CONFIRM"
.
equals
(
buttonState
))
{
if
(
"CONFIRM"
.
equals
(
buttonState
))
{
if
(
code
.
equals
(
operate
.
getCode
()))
{
if
(
code
.
equals
(
operate
.
getCode
()))
{
operate
.
setState
(
"executed"
);
operate
.
setState
(
"executed"
);
if
(
"FIRE_CANCEL"
.
equals
(
code
)
||
"END_EMERGENCY"
.
equals
(
code
))
if
(
"FIRE_CANCEL"
.
equals
(
code
)
||
"END_EMERGENCY"
.
equals
(
code
))
{
redisTemplate
.
delete
(
RiskSourceServiceImpl
.
cacheKeyForCanBeRunning
());
redisTemplate
.
delete
(
RiskSourceServiceImpl
.
cacheKeyForCanBeRunning
());
}
if
(
"END_EMERGENCY"
.
equals
(
code
))
{
// 应急处置中断,初始化planStep,json数据
planRuleService
.
updatePlanRuleByBatchNo
(
batchNo
);
}
}
else
{
}
else
{
operate
.
setState
(
"disable"
);
operate
.
setState
(
"disable"
);
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyPlanServiceImpl.java
View file @
49dec6b2
...
@@ -33,6 +33,7 @@ import org.springframework.beans.factory.annotation.Value;
...
@@ -33,6 +33,7 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
...
@@ -814,4 +815,9 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -814,4 +815,9 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
return
bool
;
return
bool
;
}
}
@Override
public
Boolean
getPlanStatus
()
{
return
CollectionUtils
.
isEmpty
(
planOperationRecordDao
.
findByStatus
(
0
));
}
}
}
\ No newline at end of file
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/HandlerMqttMessageImpl.java
View file @
49dec6b2
...
@@ -130,7 +130,7 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
...
@@ -130,7 +130,7 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
@Value
(
"${autoSys.alarm.nameKeys}"
)
@Value
(
"${autoSys.alarm.nameKeys}"
)
private
String
nameKeys
;
private
String
nameKeys
;
@Value
(
"${
security.loginId
}"
)
@Value
(
"${
amos.system.user.user-name
}"
)
private
String
loginId
;
private
String
loginId
;
@Value
(
"${autoSys.fire.pool.index_key}"
)
@Value
(
"${autoSys.fire.pool.index_key}"
)
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanRuleServiceImpl.java
0 → 100644
View file @
49dec6b2
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
com.yeejoin.amos.fas.business.dao.mapper.PlanOperationRecordMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IPlanRuleDao
;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanRuleService
;
import
com.yeejoin.amos.fas.dao.entity.PlanRule
;
import
org.apache.commons.io.IOUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
import
org.springframework.stereotype.Service
;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
@Service
public
class
PlanRuleServiceImpl
implements
IPlanRuleService
{
@Autowired
private
IPlanRuleDao
planRuleDao
;
@Autowired
private
PlanOperationRecordMapper
planOperationRecordMapper
;
@Value
(
"classpath:/json/plan-step.json"
)
private
Resource
planStepResource
;
@Override
public
void
updatePlanRuleByBatchNo
(
String
batchNo
)
{
try
{
// 根据批次号查询预案步骤
PlanRule
planRule
=
planOperationRecordMapper
.
getPlanRuleByBatchNo
(
batchNo
);
String
json
=
IOUtils
.
toString
(
planStepResource
.
getInputStream
(),
String
.
valueOf
(
StandardCharsets
.
UTF_8
));
planRule
.
setPlanStep
(
json
);
planRuleDao
.
save
(
planRule
);
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
"初始化预案规则planStep数据失败!"
);
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
49dec6b2
...
@@ -2,30 +2,27 @@ package com.yeejoin.amos.fas.business.service.impl;
...
@@ -2,30 +2,27 @@ package com.yeejoin.amos.fas.business.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
import
com.yeejoin.amos.fas.business.dao.mapper.DictMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.DictMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.PlanOperationRecordMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.PlanOperationRecordMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.PlanVisual3dMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.PlanVisual3dMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyOriginalDataDao
;
import
com.yeejoin.amos.fas.business.dao.repository.*
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyPlanInstanceRepository
;
import
com.yeejoin.amos.fas.business.dao.repository.ITextPlanDao
;
import
com.yeejoin.amos.fas.business.feign.IMaasVisualServer
;
import
com.yeejoin.amos.fas.business.feign.IMaasVisualServer
;
import
com.yeejoin.amos.fas.business.service.intfc.IDictService
;
import
com.yeejoin.amos.fas.business.service.intfc.IDictService
;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService
;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
import
com.yeejoin.amos.fas.business.util.JSONUtil
;
import
com.yeejoin.amos.fas.business.util.JSONUtil
;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
import
com.yeejoin.amos.fas.business.vo.PlanStepVo
;
import
com.yeejoin.amos.fas.business.vo.TreeSubjectVo
;
import
com.yeejoin.amos.fas.business.vo.TreeSubjectVo
;
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
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyOriginalData
;
import
com.yeejoin.amos.fas.dao.entity.*
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
org.apache.commons.lang3.StringUtils
;
import
com.yeejoin.amos.fas.dao.entity.Dict
;
import
com.yeejoin.amos.fas.dao.entity.TextPlan
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
...
@@ -59,6 +56,12 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -59,6 +56,12 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
@Autowired
@Autowired
private
IContingencyPlanInstanceRepository
contingencyPlanInstanceRepository
;
private
IContingencyPlanInstanceRepository
contingencyPlanInstanceRepository
;
@Autowired
private
IPlanRuleDao
planRuleDao
;
@Autowired
private
IPlanOperationRecordDao
planOperationRecordDao
;
@Override
@Override
public
List
<
TreeSubjectVo
>
getPlanTree
()
{
public
List
<
TreeSubjectVo
>
getPlanTree
()
{
...
@@ -88,8 +91,8 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -88,8 +91,8 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
@Override
@Override
public
TextPlan
getTextPlanInfoById
(
Long
id
)
{
public
TextPlan
getTextPlanInfoById
(
Long
id
)
{
Optional
<
TextPlan
>
textPlan
=
iTextPlanDao
.
findById
(
id
);
Optional
<
TextPlan
>
textPlan
=
iTextPlanDao
.
findById
(
id
);
if
(
textPlan
.
isPresent
())
{
if
(
textPlan
.
isPresent
())
{
return
textPlan
.
get
();
return
textPlan
.
get
();
}
}
return
null
;
return
null
;
...
@@ -119,7 +122,7 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -119,7 +122,7 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
res
.
forEach
(
r
->
{
res
.
forEach
(
r
->
{
LinkedHashMap
<
String
,
Object
>
map1
=
(
LinkedHashMap
<
String
,
Object
>)
r
;
LinkedHashMap
<
String
,
Object
>
map1
=
(
LinkedHashMap
<
String
,
Object
>)
r
;
Integer
state
=
(
Integer
)
map1
.
get
(
"publishState"
);
Integer
state
=
(
Integer
)
map1
.
get
(
"publishState"
);
if
(
state
==
0
)
{
//过滤 未发布状态
if
(
state
==
0
)
{
//过滤 未发布状态
return
;
return
;
}
}
TreeSubjectVo
subjectVo
=
new
TreeSubjectVo
();
TreeSubjectVo
subjectVo
=
new
TreeSubjectVo
();
...
@@ -187,8 +190,7 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -187,8 +190,7 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
Dict
dict
=
new
Dict
();
Dict
dict
=
new
Dict
();
dict
.
setDictCode
(
type
);
dict
.
setDictCode
(
type
);
List
<
Dict
>
dictList
=
dictService
.
getDictList
(
dict
);
List
<
Dict
>
dictList
=
dictService
.
getDictList
(
dict
);
Map
<
String
,
String
>
dicts
=
dictList
.
stream
().
collect
(
Map
<
String
,
String
>
dicts
=
dictList
.
stream
().
collect
(
Collectors
.
toMap
(
Dict:
:
getDictValue
,
Dict:
:
getDictName
,
(
key1
,
key2
)
->
key2
));
Collectors
.
toMap
(
Dict:
:
getDictValue
,
Dict:
:
getDictName
,
(
key1
,
key2
)
->
key2
));
//2.1换key为中文
//2.1换key为中文
Map
<
String
,
Object
>
tempMap
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
tempMap
=
new
HashMap
<
String
,
Object
>();
...
@@ -215,13 +217,13 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -215,13 +217,13 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
dict
.
setDictCode
(
FasConstant
.
PLAN_SOURCE_TYPE
);
dict
.
setDictCode
(
FasConstant
.
PLAN_SOURCE_TYPE
);
List
<
Dict
>
dictList
=
dictMapper
.
getDictList
(
dict
);
List
<
Dict
>
dictList
=
dictMapper
.
getDictList
(
dict
);
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
list
=
dictList
.
stream
().
map
(
e
->
{
list
=
dictList
.
stream
().
map
(
e
->
{
Map
<
String
,
Object
>
newMap
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
newMap
=
new
HashMap
<
String
,
Object
>();
newMap
.
put
(
"key"
,
e
.
getDictValue
());
newMap
.
put
(
"key"
,
e
.
getDictValue
());
newMap
.
put
(
"value"
,
e
.
getDictValue
());
//前端级联Cascader使用
newMap
.
put
(
"value"
,
e
.
getDictValue
());
//前端级联Cascader使用
newMap
.
put
(
"isLeaf"
,
false
);
////前端级联Cascader使用
newMap
.
put
(
"isLeaf"
,
false
);
////前端级联Cascader使用
newMap
.
put
(
"dataType"
,
"type"
);
newMap
.
put
(
"dataType"
,
"type"
);
newMap
.
put
(
"label"
,
e
.
getDictName
());
newMap
.
put
(
"label"
,
e
.
getDictName
());
return
newMap
;
return
newMap
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
return
list
;
return
list
;
...
@@ -263,9 +265,19 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -263,9 +265,19 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
// 查询当前步骤
// 查询当前步骤
ContingencyOriginalData
contingencyOriginalData
=
contingencyOriginalDataDao
.
findByBatchNo
(
batchNo
);
ContingencyOriginalData
contingencyOriginalData
=
contingencyOriginalDataDao
.
findByBatchNo
(
batchNo
);
String
step
=
contingencyOriginalData
.
getStep
();
String
step
=
contingencyOriginalData
.
getStep
();
String
confirm
=
contingencyOriginalData
.
getConfirm
();
Map
<
String
,
Object
>
msgContext
=
new
HashMap
<>(
2
);
Map
<
String
,
Object
>
msgContext
=
new
HashMap
<>(
2
);
msgContext
.
put
(
"step"
,
objects
);
msgContext
.
put
(
"step"
,
objects
);
msgContext
.
put
(
"currentStep"
,
step
);
msgContext
.
put
(
"currentStep"
,
contingencyOriginalData
.
getStep
());
msgContext
.
put
(
"confirm"
,
contingencyOriginalData
.
getConfirm
());
msgContext
.
put
(
"createDate"
,
contingencyOriginalData
.
getCreateDate
());
List
<
ContingencyPlanInstance
>
list
=
contingencyPlanInstanceRepository
.
findByBatchNo
(
batchNo
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
List
<
ContingencyPlanInstance
>
collect
=
list
.
stream
().
filter
(
x
->
"OPERATE"
.
equals
(
x
.
getRecordType
())).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
msgContext
.
put
(
"caseId"
,
collect
.
get
(
0
).
getId
());
}
}
toipResponse
.
setMsgType
(
"steparea"
);
toipResponse
.
setMsgType
(
"steparea"
);
toipResponse
.
setMsgContext
(
msgContext
);
toipResponse
.
setMsgContext
(
msgContext
);
toipResponse
.
setContingency
(
contingencyOriginalData
);
toipResponse
.
setContingency
(
contingencyOriginalData
);
...
@@ -303,4 +315,18 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -303,4 +315,18 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
}
}
return
toipResponse
;
return
toipResponse
;
}
}
@Override
@Transactional
public
PlanStepVo
updatePlanStep
(
PlanStepVo
planStepVo
)
{
// 运行中的设置为重置
List
<
PlanOperationRecord
>
planList
=
planOperationRecordDao
.
findByStatus
(
0
);
if
(!
CollectionUtils
.
isEmpty
(
planList
))
{
// 根据批次号查询预案步骤
PlanRule
planRule
=
planOperationRecordMapper
.
getPlanRuleByBatchNo
(
planStepVo
.
getBatchNo
());
planRule
.
setPlanStep
(
planStepVo
.
getPlanStep
());
planRuleDao
.
save
(
planRule
);
}
return
planStepVo
;
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
49dec6b2
...
@@ -18,6 +18,7 @@ import com.yeejoin.amos.fas.business.dao.repository.IRiskLevelDao;
...
@@ -18,6 +18,7 @@ import com.yeejoin.amos.fas.business.dao.repository.IRiskLevelDao;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskSourceDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskSourceDao
;
import
com.yeejoin.amos.fas.business.dao.repository.ISafetyIndexChangeLogDao
;
import
com.yeejoin.amos.fas.business.dao.repository.ISafetyIndexChangeLogDao
;
import
com.yeejoin.amos.fas.business.feign.IDutyModeServer
;
import
com.yeejoin.amos.fas.business.feign.IDutyModeServer
;
import
com.yeejoin.amos.fas.business.feign.JcsFeign
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.service.intfc.IDataRefreshService
;
import
com.yeejoin.amos.fas.business.service.intfc.IDataRefreshService
;
import
com.yeejoin.amos.fas.business.service.intfc.IView3dService
;
import
com.yeejoin.amos.fas.business.service.intfc.IView3dService
;
...
@@ -30,6 +31,7 @@ import com.yeejoin.amos.fas.core.common.response.Node3DVoResponse;
...
@@ -30,6 +31,7 @@ import com.yeejoin.amos.fas.core.common.response.Node3DVoResponse;
import
com.yeejoin.amos.fas.core.common.response.RegionTreeResponse
;
import
com.yeejoin.amos.fas.core.common.response.RegionTreeResponse
;
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
;
import
com.yeejoin.amos.fas.core.util.ResponseModel
;
import
com.yeejoin.amos.fas.core.util.StringUtil
;
import
com.yeejoin.amos.fas.core.util.StringUtil
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
com.yeejoin.amos.fas.dao.entity.RiskLevel
;
import
com.yeejoin.amos.fas.dao.entity.RiskLevel
;
...
@@ -87,6 +89,9 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -87,6 +89,9 @@ public class View3dServiceImpl implements IView3dService {
@Autowired
@Autowired
private
IDutyModeServer
dutyModeServer
;
private
IDutyModeServer
dutyModeServer
;
@Autowired
private
JcsFeign
jcsFeign
;
@Value
(
"${param.system.online.date}"
)
@Value
(
"${param.system.online.date}"
)
private
String
onLineDate
;
private
String
onLineDate
;
...
@@ -495,12 +500,45 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -495,12 +500,45 @@ public class View3dServiceImpl implements IView3dService {
}
}
@Override
@Override
public
CommonResponse
getStatisticsDuty
(
String
appKey
,
String
product
,
String
token
,
String
orgCode
)
{
public
Map
<
String
,
Object
>
getStatisticsDuty
()
{
Date
curDate
=
new
Date
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Date
date
=
new
Date
();
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
JSONObject
param
=
new
JSONObject
();
String
dateStr
=
format
.
format
(
date
);
param
.
put
(
"dutyDate"
,
curDate
);
ResponseModel
responseModel
=
jcsFeign
.
dutyStatisticsByDate
(
dateStr
,
dateStr
,
"personType"
);
return
dutyModeServer
.
dutyListByDay
(
appKey
,
product
,
token
,
orgCode
,
param
.
toJSONString
());
if
(
"SUCCESS"
.
equals
(
responseModel
.
getDevMessage
()))
{
String
JSONStr
=
JSON
.
toJSONString
(
responseModel
.
getResult
());
JSONArray
dataList
=
JSONObject
.
parseArray
(
JSONStr
);
if
(!
ObjectUtils
.
isEmpty
(
dataList
))
{
for
(
Object
x
:
dataList
)
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
String
json
=
JSON
.
toJSONString
(((
JSONObject
)
x
).
get
(
"data"
));
JSONArray
array
=
JSONObject
.
parseArray
(
json
);
if
(!
ObjectUtils
.
isEmpty
(
array
))
{
Map
<
String
,
String
>
result
=
(
Map
<
String
,
String
>)
array
.
get
(
0
);
String
total
=
result
.
get
(
"total"
);
String
postTypeName
=
result
.
get
(
"postTypeName"
);
if
(
DutyPersonEnum
.
FIRE_PERSON
.
getName
().
equals
(
postTypeName
))
{
map
.
put
(
"firePersonNumber"
,
total
);
}
else
if
(
DutyPersonEnum
.
OPS_PERSON
.
getName
().
equals
(
postTypeName
))
{
map
.
put
(
"dutyPersonNumber"
,
total
);
}
else
if
(
DutyPersonEnum
.
REAL_PERSON
.
getName
().
equals
(
postTypeName
))
{
map
.
put
(
"securityPersonNumber"
,
total
);
}
}
}
}
}
if
(!
map
.
containsKey
(
"firePersonNumber"
))
{
map
.
put
(
"firePersonNumber"
,
0
);
}
if
(!
map
.
containsKey
(
"dutyPersonNumber"
))
{
map
.
put
(
"dutyPersonNumber"
,
0
);
}
if
(!
map
.
containsKey
(
"securityPersonNumber"
))
{
map
.
put
(
"securityPersonNumber"
,
0
);
}
return
map
;
}
}
@Override
@Override
...
@@ -657,6 +695,27 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -657,6 +695,27 @@ public class View3dServiceImpl implements IView3dService {
return
pointList
;
return
pointList
;
}
}
@Override
public
List
<
Map
<
String
,
Object
>>
dutyList
(
String
orgCode
)
{
ArrayList
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
ResponseModel
responseModel
=
jcsFeign
.
dutyPersonList
();
if
(
"SUCCESS"
.
equals
(
responseModel
.
getDevMessage
()))
{
String
JSONStr
=
JSON
.
toJSONString
(
responseModel
.
getResult
());
JSONArray
dataList
=
JSONObject
.
parseArray
(
JSONStr
);
if
(!
ObjectUtils
.
isEmpty
(
dataList
))
{
dataList
.
forEach
(
x
->
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
JSONObject
obj
=
(
JSONObject
)
x
;
resultMap
.
put
(
"postName"
,
obj
.
getString
(
"postTypeName"
));
resultMap
.
put
(
"name"
,
obj
.
getString
(
"userName"
));
resultMap
.
put
(
"phone"
,
obj
.
getString
(
"telephone"
));
list
.
add
(
resultMap
);
});
}
}
return
list
;
}
private
List
<
Map
<
String
,
Object
>>
getPointsByRegionIds
(
List
<
Long
>
ids
)
{
private
List
<
Map
<
String
,
Object
>>
getPointsByRegionIds
(
List
<
Long
>
ids
)
{
return
view3dMapper
.
getAllPointInRegions
(
ids
);
return
view3dMapper
.
getAllPointInRegions
(
ids
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IContingencyPlanService.java
View file @
49dec6b2
...
@@ -135,4 +135,5 @@ public interface IContingencyPlanService {
...
@@ -135,4 +135,5 @@ public interface IContingencyPlanService {
AtomicBoolean
planReset
();
AtomicBoolean
planReset
();
Boolean
getPlanStatus
();
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanRuleService.java
0 → 100644
View file @
49dec6b2
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
import
com.yeejoin.amos.fas.dao.entity.PlanRule
;
public
interface
IPlanRuleService
{
void
updatePlanRuleByBatchNo
(
String
batchNo
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanVisual3dService.java
View file @
49dec6b2
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
import
com.yeejoin.amos.fas.business.vo.PlanStepVo
;
import
com.yeejoin.amos.fas.business.vo.TreeSubjectVo
;
import
com.yeejoin.amos.fas.business.vo.TreeSubjectVo
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.dao.entity.PlanRule
;
import
com.yeejoin.amos.fas.dao.entity.TextPlan
;
import
com.yeejoin.amos.fas.dao.entity.TextPlan
;
import
java.util.List
;
import
java.util.List
;
...
@@ -68,4 +70,6 @@ public interface IPlanVisual3dService {
...
@@ -68,4 +70,6 @@ public interface IPlanVisual3dService {
* @return 预案记录
* @return 预案记录
*/
*/
ToipResponse
getPlaneRecordOneByBatchNo
(
String
batchNo
);
ToipResponse
getPlaneRecordOneByBatchNo
(
String
batchNo
);
PlanStepVo
updatePlanStep
(
PlanStepVo
planStepVo
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IView3dService.java
View file @
49dec6b2
...
@@ -104,7 +104,7 @@ public interface IView3dService {
...
@@ -104,7 +104,7 @@ public interface IView3dService {
* 今日值班统计
* 今日值班统计
* @return
* @return
*/
*/
CommonResponse
getStatisticsDuty
(
String
appKey
,
String
product
,
String
token
,
String
orgCode
);
Map
<
String
,
Object
>
getStatisticsDuty
(
);
/**
/**
* 设备状态消息最新5条
* 设备状态消息最新5条
...
@@ -189,4 +189,10 @@ public interface IView3dService {
...
@@ -189,4 +189,10 @@ public interface IView3dService {
*/
*/
List
<
Map
<
String
,
Object
>>
listPointsByRegionId
(
Long
regionId
,
String
type
);
List
<
Map
<
String
,
Object
>>
listPointsByRegionId
(
Long
regionId
,
String
type
);
/**
* 今日值班列表
* @param orgCode
* @return
*/
List
<
Map
<
String
,
Object
>>
dutyList
(
String
orgCode
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/PlanStepVo.java
0 → 100644
View file @
49dec6b2
package
com
.
yeejoin
.
amos
.
fas
.
business
.
vo
;
import
lombok.Data
;
@Data
public
class
PlanStepVo
{
private
String
batchNo
;
private
String
planStep
;
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/config/PermissionAspect.java
View file @
49dec6b2
...
@@ -85,10 +85,10 @@ public class PermissionAspect {
...
@@ -85,10 +85,10 @@ public class PermissionAspect {
if
(
reginParams
==
null
&&
userModel
.
getCompanys
().
size
()
>
0
){
if
(
reginParams
==
null
&&
userModel
.
getCompanys
().
size
()
>
0
){
CompanyModel
companyModel
=
userModel
.
getCompanys
().
get
(
0
);
CompanyModel
companyModel
=
userModel
.
getCompanys
().
get
(
0
);
List
<
DepartmentModel
>
deptList
=
remoteSecurityService
.
getDepartmentTreeByCompanyId
(
token
,
product
,
appKey
,
companyModel
.
getSequenceNbr
().
toString
());
List
<
DepartmentModel
>
deptList
=
remoteSecurityService
.
getDepartmentTreeByCompanyId
(
token
,
product
,
appKey
,
companyModel
.
getSequenceNbr
().
toString
());
if
(
deptList
.
size
()
>
0
){
CompanyBo
companyBo
=
convertCompanyModelToBo
(
companyModel
);
CompanyBo
companyBo
=
convertCompanyModelToBo
(
companyModel
);
DepartmentBo
departmentBo
=
convertDepartmentModelToBo
(
deptList
.
get
(
0
));
regionParam
.
setCompany
(
companyBo
);
regionParam
.
setCompany
(
companyBo
);
if
(
deptList
.
size
()
>
0
){
DepartmentBo
departmentBo
=
convertDepartmentModelToBo
(
deptList
.
get
(
0
));
regionParam
.
setDepartment
(
departmentBo
);
regionParam
.
setDepartment
(
departmentBo
);
}
}
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
userModel
.
getOrgRoles
();
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
userModel
.
getOrgRoles
();
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-dev.properties
View file @
49dec6b2
...
@@ -9,12 +9,16 @@ spring.datasource.testWhileIdle = true
...
@@ -9,12 +9,16 @@ spring.datasource.testWhileIdle = true
spring.datasource.validationQuery
=
SELECT 1
spring.datasource.validationQuery
=
SELECT 1
#系统服务账号,用户后端服务调用
#系统服务账号,用户后端服务调用
security.password
=
a1234560
#security.password=a1234560
security.loginId
=
fas_autosys
#security.loginId=fas_autosys
amos.system.user.user-name
=
fas_autosys
amos.system.user.password
=
a1234560
#应用product appkey
#应用product appkey
security.productWeb
=
STUDIO_APP_WEB
#security.productWeb=STUDIO_APP_WEB
security.appKey
=
studio_normalapp_3056965
#security.appKey =studio_normalapp_3056965
amos.system.user.app-key
=
studio_normalapp_3056965
amos.system.user.product
=
STUDIO_APP_WEB
eureka.client.serviceUrl.defaultZone
=
http://172.16.11.201:10001/eureka/
eureka.client.serviceUrl.defaultZone
=
http://172.16.11.201:10001/eureka/
eureka.client.register-with-eureka
=
true
eureka.client.register-with-eureka
=
true
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-docker.properties
View file @
49dec6b2
...
@@ -9,12 +9,16 @@ spring.datasource.testWhileIdle = true
...
@@ -9,12 +9,16 @@ spring.datasource.testWhileIdle = true
spring.datasource.validationQuery
=
SELECT 1
spring.datasource.validationQuery
=
SELECT 1
#系统服务账号,用户后端服务调用
#系统服务账号,用户后端服务调用
security.password
=
a1234560
#security.password=a1234560
security.loginId
=
fas_autosys
#security.loginId=fas_autosys
amos.system.user.user-name
=
fas_autosys
amos.system.user.password
=
a1234560
#应用product appkey
#应用product appkey
security.productWeb
=
STUDIO_APP_WEB
#security.productWeb=STUDIO_APP_WEB
security.appKey
=
studio_normalapp_2681691
#security.appKey =studio_normalapp_3056965
amos.system.user.app-key
=
studio_normalapp_3056965
amos.system.user.product
=
STUDIO_APP_WEB
eureka.client.serviceUrl.defaultZone
=
http://172.16.11.20:10001/eureka/
eureka.client.serviceUrl.defaultZone
=
http://172.16.11.20:10001/eureka/
eureka.client.register-with-eureka
=
true
eureka.client.register-with-eureka
=
true
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-test.properties
View file @
49dec6b2
...
@@ -9,12 +9,16 @@ spring.datasource.testWhileIdle = true
...
@@ -9,12 +9,16 @@ spring.datasource.testWhileIdle = true
spring.datasource.validationQuery
=
SELECT 1
spring.datasource.validationQuery
=
SELECT 1
#系统服务账号,用户后端服务调用
#系统服务账号,用户后端服务调用
security.password
=
a1234560
#security.password=a1234560
security.loginId
=
fas_autosys
#security.loginId=fas_autosys
amos.system.user.user-name
=
fas_autosys
amos.system.user.password
=
a1234560
#应用product appkey
#应用product appkey
security.productWeb
=
STUDIO_APP_WEB
#security.productWeb=STUDIO_APP_WEB
security.appKey
=
studio_normalapp_2681691
#security.appKey =studio_normalapp_3056965
amos.system.user.app-key
=
studio_normalapp_3056965
amos.system.user.product
=
STUDIO_APP_WEB
eureka.client.serviceUrl.defaultZone
=
http://172.16.11.20:10001/eureka/
eureka.client.serviceUrl.defaultZone
=
http://172.16.11.20:10001/eureka/
eureka.client.register-with-eureka
=
true
eureka.client.register-with-eureka
=
true
...
...
YeeAmosFireAutoSysStart/src/main/resources/application.properties
View file @
49dec6b2
...
@@ -52,6 +52,10 @@ equipManage.fegin.name=AMOS-EQUIPMANAGE
...
@@ -52,6 +52,10 @@ equipManage.fegin.name=AMOS-EQUIPMANAGE
#jpush 服务名称
#jpush 服务名称
Push.fegin.name
=
AMOS-JPUSH
Push.fegin.name
=
AMOS-JPUSH
#JCS 服务名称
Jcs.fegin.name
=
JCS
#feginName
#feginName
number.plan.projectName
=
换流站消防专项预案
number.plan.projectName
=
换流站消防专项预案
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
View file @
49dec6b2
...
@@ -737,4 +737,13 @@
...
@@ -737,4 +737,13 @@
alter table `c_plan_rule` add column `plan_step` json DEFAULT NULL COMMENT '预案步骤';
alter table `c_plan_rule` add column `plan_step` json DEFAULT NULL COMMENT '预案步骤';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"gaojianqiang"
id=
"20220901-01"
>
<preConditions
onFail=
"MARK_RAN"
>
<columnExists
tableName=
"toip_rm_snapshot"
columnName=
"method_param"
/>
</preConditions>
<comment>
修改属性字段 method_param
</comment>
<sql>
ALTER TABLE `toip_rm_snapshot` MODIFY COLUMN `method_param` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '方法参数' AFTER `equipment_id`;
</sql>
</changeSet>
</databaseChangeLog>
</databaseChangeLog>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/PlanOperationRecordMapper.xml
View file @
49dec6b2
...
@@ -115,6 +115,15 @@
...
@@ -115,6 +115,15 @@
WHERE
WHERE
cpor.batch_no = #{batchNo}
cpor.batch_no = #{batchNo}
</select>
</select>
<select
id=
"getPlanRuleByBatchNo"
resultType=
"com.yeejoin.amos.fas.dao.entity.PlanRule"
>
SELECT
cpr.*
FROM
c_plan_rule cpr
LEFT JOIN c_plan_operation_record cpor ON cpor.plan_id = cpr.plan_id
WHERE
cpor.batch_no = #{batchNo}
</select>
<select
id=
"getNewestBatchNo"
resultType=
"java.lang.String"
>
<select
id=
"getNewestBatchNo"
resultType=
"java.lang.String"
>
select batch_no as batchNo from c_plan_operation_record where status = 0 and is_delete = 0 order by create_date desc limit 1
select batch_no as batchNo from c_plan_operation_record where status = 0 and is_delete = 0 order by create_date desc limit 1
...
...
YeeAmosFireAutoSysStart/src/main/resources/json/plan-step.json
0 → 100644
View file @
49dec6b2
[
{
"stepCode"
:
"0"
,
"stepName"
:
"确认灾情"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"FIRE_CONFIRM"
},
{
"stepCode"
:
"1"
,
"stepName"
:
"停运换流阀"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"STOP_COMMUTATION"
},
{
"stepCode"
:
"2"
,
"stepName"
:
"拨打报警电话"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"CALL_PHONE"
},
{
"stepCode"
:
"3"
,
"stepName"
:
"确认油枕排油系统已开启"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"DRAIN_OIL_CONFIRM"
},
{
"stepCode"
:
"4"
,
"stepName"
:
"确认水喷雾系统已开启"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"OPEN_WATERSYSTEM"
},
{
"stepCode"
:
"5"
,
"stepName"
:
"断开上级电源"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"OFF_POWER"
},
{
"stepCode"
:
"6"
,
"stepName"
:
"停运阀厅空调系统"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"STOP_AIRCON"
},
{
"stepCode"
:
"7"
,
"stepName"
:
"一键开启消防炮"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"MONITOR_START"
},
{
"stepCode"
:
"8"
,
"stepName"
:
"驻站消防队指挥权交接"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"HANDOVER_COMMAND"
},
{
"stepCode"
:
"9"
,
"stepName"
:
"确认本体排油已开启"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"OWNER_DRAIN_OIL"
},
{
"stepCode"
:
"10"
,
"stepName"
:
"启动阀厅应急预案"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"START_VALVE_HALL_CONTINGENCY"
},
{
"stepCode"
:
"11"
,
"stepName"
:
"电缆沟封堵"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"PLUG_CABLETRENCH"
},
{
"stepCode"
:
"12"
,
"stepName"
:
"政府消防队指挥权交接"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"HANDOVER_FIGTHHING"
},
{
"stepCode"
:
"13"
,
"stepName"
:
"确认明火扑灭"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"FIRE_EXTINCT"
},
{
"stepCode"
:
"14"
,
"stepName"
:
"应急处置结束"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"END_EMERGENCY"
}
]
\ No newline at end of file
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