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
309750f6
Commit
309750f6
authored
Nov 29, 2022
by
maoying
Browse files
Options
Browse Files
Download
Plain Diff
合并代码
parents
dc2f8f48
c4b43c74
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
45 changed files
with
940 additions
and
156 deletions
+940
-156
PlanReplyMessageEnum.java
...m/yeejoin/amos/fas/common/enums/PlanReplyMessageEnum.java
+71
-0
ContingencyInstanceInfo.java
.../yeejoin/amos/fas/dao/entity/ContingencyInstanceInfo.java
+3
-0
ContingencyPlanInstance.java
.../yeejoin/amos/fas/dao/entity/ContingencyPlanInstance.java
+1
-0
WarehouseStructure.java
...a/com/yeejoin/amos/fas/dao/entity/WarehouseStructure.java
+73
-0
pom.xml
YeeAmosFireAutoSysService/pom.xml
+6
-0
ContingencyAction.java
...m/yeejoin/amos/fas/business/action/ContingencyAction.java
+0
-0
IKafkaProducer.java
...m/yeejoin/amos/fas/business/action/mq/IKafkaProducer.java
+14
-0
KafkaProducer.java
...om/yeejoin/amos/fas/business/action/mq/KafkaProducer.java
+60
-0
ContingencyInstanceInfoController.java
...usiness/controller/ContingencyInstanceInfoController.java
+70
-0
ContingencyPlanController.java
...os/fas/business/controller/ContingencyPlanController.java
+8
-1
PlanVisual3dController.java
.../amos/fas/business/controller/PlanVisual3dController.java
+29
-46
RiskSourceController.java
...in/amos/fas/business/controller/RiskSourceController.java
+26
-4
TimeLineController.java
...join/amos/fas/business/controller/TimeLineController.java
+1
-1
View3dController.java
...eejoin/amos/fas/business/controller/View3dController.java
+17
-0
ContingencyInstanceInfoMapper.java
...as/business/dao/mapper/ContingencyInstanceInfoMapper.java
+6
-4
ContingencyPlanInstanceMapper.java
...as/business/dao/mapper/ContingencyPlanInstanceMapper.java
+24
-0
WarehouseStructureMapper.java
...mos/fas/business/dao/mapper/WarehouseStructureMapper.java
+16
-0
PrivilegeFeign.java
...a/com/yeejoin/amos/fas/business/feign/PrivilegeFeign.java
+6
-0
ContingencyInstanceImpl.java
...os/fas/business/service/impl/ContingencyInstanceImpl.java
+0
-0
ContingencyInstanceInfoServiceImpl.java
...ness/service/impl/ContingencyInstanceInfoServiceImpl.java
+103
-0
ContingencyPlanServiceImpl.java
...fas/business/service/impl/ContingencyPlanServiceImpl.java
+46
-9
EquipmentFireEquipmentServiceImpl.java
...iness/service/impl/EquipmentFireEquipmentServiceImpl.java
+2
-6
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+0
-0
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+16
-0
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+1
-43
ContingencyInstanceInfoService.java
...usiness/service/intfc/ContingencyInstanceInfoService.java
+25
-0
IContingencyInstance.java
...amos/fas/business/service/intfc/IContingencyInstance.java
+22
-1
IContingencyPlanService.java
...s/fas/business/service/intfc/IContingencyPlanService.java
+4
-1
IPlanVisual3dService.java
...amos/fas/business/service/intfc/IPlanVisual3dService.java
+30
-21
IRiskSourceService.java
...n/amos/fas/business/service/intfc/IRiskSourceService.java
+2
-0
ButtonJsonVO.java
...n/java/com/yeejoin/amos/fas/business/vo/ButtonJsonVO.java
+15
-0
ContingencyInstanceInfoVO.java
...ejoin/amos/fas/business/vo/ContingencyInstanceInfoVO.java
+37
-0
ContingencyPlanInstanceVO.java
...ejoin/amos/fas/business/vo/ContingencyPlanInstanceVO.java
+63
-0
EquipmentSpecificForRiskVo.java
...join/amos/fas/business/vo/EquipmentSpecificForRiskVo.java
+3
-0
MessageVO.java
...main/java/com/yeejoin/amos/fas/business/vo/MessageVO.java
+40
-0
PlanStepJsonVO.java
...java/com/yeejoin/amos/fas/business/vo/PlanStepJsonVO.java
+13
-0
application-dev.properties
...utoSysStart/src/main/resources/application-dev.properties
+26
-0
application.properties
...ireAutoSysStart/src/main/resources/application.properties
+2
-0
fas-2.0.1.xml
...utoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
+13
-2
ContingencyInstanceInfoMapper.xml
...ain/resources/db/mapper/ContingencyInstanceInfoMapper.xml
+31
-15
ContingencyPlanInstanceMapper.xml
...ain/resources/db/mapper/ContingencyPlanInstanceMapper.xml
+0
-0
WarehouseStructureMapper.xml
...src/main/resources/db/mapper/WarehouseStructureMapper.xml
+11
-0
dbTemplate_equipment_specific.xml
...ain/resources/db/mapper/dbTemplate_equipment_specific.xml
+1
-0
dbTemplate_impt_equip.xml
...rt/src/main/resources/db/mapper/dbTemplate_impt_equip.xml
+1
-1
plan-step.json
...osFireAutoSysStart/src/main/resources/json/plan-step.json
+2
-1
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/common/enums/PlanReplyMessageEnum.java
0 → 100644
View file @
309750f6
package
com
.
yeejoin
.
amos
.
fas
.
common
.
enums
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author gaojianqiang
*/
public
enum
PlanReplyMessageEnum
{
TEXT
(
"文本"
,
"text"
),
IMAGE
(
"图片"
,
"image"
),
VIDEO
(
"视频"
,
"video"
);
/**
* 名称,描述
*/
private
String
name
;
/**
* 编码
*/
private
String
code
;
private
PlanReplyMessageEnum
(
String
name
,
String
code
){
this
.
name
=
name
;
this
.
code
=
code
;
}
public
static
PlanReplyMessageEnum
getEnum
(
String
code
)
{
PlanReplyMessageEnum
checkStatusEnum
=
null
;
for
(
PlanReplyMessageEnum
type:
PlanReplyMessageEnum
.
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
(
PlanReplyMessageEnum
c:
PlanReplyMessageEnum
.
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
;
}
}
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/ContingencyInstanceInfo.java
View file @
309750f6
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
...
@@ -42,6 +43,8 @@ public class ContingencyInstanceInfo extends Model<ContingencyInstanceInfo>{
...
@@ -42,6 +43,8 @@ public class ContingencyInstanceInfo extends Model<ContingencyInstanceInfo>{
private
String
orgCode
;
private
String
orgCode
;
@TableField
private
String
duration
;
}
}
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/ContingencyPlanInstance.java
View file @
309750f6
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/WarehouseStructure.java
0 → 100644
View file @
309750f6
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.List
;
/**
* 货架结构
*
* @author wujiang
* @date 2020-07-07
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"wl_warehouse_structure"
)
@ApiModel
(
value
=
"WarehouseStructure对象"
,
description
=
"货架结构"
)
public
class
WarehouseStructure
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"位置编码"
)
private
String
code
;
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"全称"
)
private
String
fullName
;
@ApiModelProperty
(
value
=
"父ID"
)
private
Long
parentId
;
@ApiModelProperty
(
value
=
"位置类型"
)
private
Long
cellType
;
@ApiModelProperty
(
value
=
"货位code"
)
private
String
cellCode
;
@ApiModelProperty
(
value
=
"仓库ID"
)
private
Long
warehouseId
;
//新加
@ApiModelProperty
(
value
=
"机构/部门名称"
)
@TableField
(
"biz_org_name"
)
private
String
bizOrgName
;
@ApiModelProperty
(
value
=
"机构编码"
)
@TableField
(
"biz_org_code"
)
private
String
bizOrgCode
;
private
String
remark
;
@ApiModelProperty
(
value
=
"预控系统中的ID字段"
)
private
Long
sourceId
;
@ApiModelProperty
(
value
=
"预控系统中的code字段"
)
private
String
sourceCode
;
@TableField
(
exist
=
false
)
private
List
<
WarehouseStructure
>
children
;
}
YeeAmosFireAutoSysService/pom.xml
View file @
309750f6
...
@@ -141,6 +141,11 @@
...
@@ -141,6 +141,11 @@
<artifactId>
amos-component-security
</artifactId>
<artifactId>
amos-component-security
</artifactId>
<version>
1.7.13-SNAPSHOT
</version>
<version>
1.7.13-SNAPSHOT
</version>
</dependency>
</dependency>
<!-- kafka -->
<dependency>
<groupId>
org.springframework.kafka
</groupId>
<artifactId>
spring-kafka
</artifactId>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
\ No newline at end of file
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/ContingencyAction.java
View file @
309750f6
This diff is collapsed.
Click to expand it.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/mq/IKafkaProducer.java
0 → 100644
View file @
309750f6
package
com
.
yeejoin
.
amos
.
fas
.
business
.
action
.
mq
;
/**
* @author keyong
* @title: IKafkaProducer
* <pre>
* @description:
* </pre>
* @date 2022/10/14 15:16
*/
public
interface
IKafkaProducer
{
void
sendMessage
(
String
topic
,
String
key
,
Object
message
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/mq/KafkaProducer.java
0 → 100644
View file @
309750f6
package
com
.
yeejoin
.
amos
.
fas
.
business
.
action
.
mq
;
import
com.alibaba.fastjson.JSON
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.kafka.annotation.EnableKafka
;
import
org.springframework.kafka.core.KafkaTemplate
;
import
org.springframework.kafka.support.SendResult
;
import
org.springframework.util.concurrent.ListenableFuture
;
import
org.springframework.util.concurrent.ListenableFutureCallback
;
/**
* @author keyong
* @title: KafkaProducer
* <pre>
* @description:
* </pre>
* @date 2022/10/14 10:59
*/
@Configuration
@EnableKafka
public
class
KafkaProducer
implements
IKafkaProducer
{
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
KafkaProducer
.
class
);
@Value
(
"${kafka.producer.sysIsUsed}"
)
private
String
sysIsUsed
;
@Autowired
private
KafkaTemplate
<
String
,
Object
>
kafkaTemplate
;
private
static
class
KafkaFutureCallback
implements
ListenableFutureCallback
<
SendResult
>
{
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
KafkaProducer
.
class
);
@Override
public
void
onFailure
(
Throwable
ex
)
{
log
.
error
(
"send kafka failed: {}"
,
ex
);
}
@Override
public
void
onSuccess
(
SendResult
result
)
{
log
.
info
(
"send kafka success: {}"
,
result
.
getProducerRecord
());
}
}
@Override
public
void
sendMessage
(
String
topic
,
String
key
,
Object
message
)
{
if
(
"on"
.
equalsIgnoreCase
(
sysIsUsed
)){
log
.
info
(
"Kafka Topic===="
+
topic
);
log
.
info
(
"Kafka msg===="
+
JSON
.
toJSONString
(
message
));
kafkaTemplate
.
send
(
topic
,
key
,
message
).
addCallback
(
new
KafkaFutureCallback
());
}
else
{
log
.
info
(
"Kafka SendResult====kafka.producer.sysIsUsed is not open !!!"
);
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/ContingencyInstanceInfoController.java
0 → 100644
View file @
309750f6
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
com.yeejoin.amos.fas.business.service.intfc.ContingencyInstanceInfoService
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.config.Permission
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil2
;
import
com.yeejoin.amos.fas.core.util.ResponseModel
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyInstanceInfo
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
value
=
"/plan/record"
)
@Api
(
tags
=
"应急预案执行记录实例"
)
public
class
ContingencyInstanceInfoController
extends
BaseController
{
@Autowired
private
ContingencyInstanceInfoService
contingencyInstanceInfoService
;
@Permission
@ApiOperation
(
value
=
"应急预案执行记录信息"
,
notes
=
"应急预案执行记录信息"
)
@GetMapping
(
value
=
"/selectDisposalDetails"
)
public
ResponseModel
selectDisposalDetails
(
@RequestParam
(
"batchNo"
)
String
batchNo
)
{
return
CommonResponseUtil
.
successNew
(
contingencyInstanceInfoService
.
selectDisposalDetails
(
batchNo
));
}
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询应急预案执行记录信息"
,
notes
=
"分页查询应急预案执行记录信息"
)
@GetMapping
(
value
=
"/selectDisposalListPage"
)
public
ResponseModel
selectDisposalListPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
if
(
current
<
1
||
size
<
1
)
{
throw
new
YeeException
(
"分页参数有误"
);
}
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
return
CommonResponseUtil2
.
success
(
contingencyInstanceInfoService
.
selectDisposalListPage
(
current
,
size
,
orgCode
));
}
@Permission
@ApiOperation
(
value
=
"新增应急预案执行记录"
,
notes
=
"新增应急预案执行记录"
)
@PostMapping
(
value
=
"/addDisposalDetails"
)
public
ResponseModel
addDisposalDetails
(
@RequestBody
ContingencyInstanceInfo
contingencyInstanceInfo
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
contingencyInstanceInfo
.
setOrgCode
(
orgCode
);
return
CommonResponseUtil
.
successNew
(
contingencyInstanceInfoService
.
addDisposalDetails
(
contingencyInstanceInfo
));
}
@Permission
@ApiOperation
(
value
=
"修改应急预案执行记录信息"
,
notes
=
"修改应急预案执行记录信息"
)
@PostMapping
(
value
=
"/updateDisposalDetails"
)
public
ResponseModel
updateDisposalDetails
(
@RequestBody
ContingencyInstanceInfo
contingencyInstanceInfo
)
{
return
CommonResponseUtil
.
successNew
(
contingencyInstanceInfoService
.
updateDisposalDetails
(
contingencyInstanceInfo
));
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/ContingencyPlanController.java
View file @
309750f6
...
@@ -14,6 +14,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -14,6 +14,7 @@ import io.swagger.annotations.ApiOperation;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.*
;
import
java.util.*
;
...
@@ -236,7 +237,13 @@ public class ContingencyPlanController extends BaseController {
...
@@ -236,7 +237,13 @@ public class ContingencyPlanController extends BaseController {
@ApiOperation
(
value
=
"获取预案状态"
)
@ApiOperation
(
value
=
"获取预案状态"
)
@RequestMapping
(
value
=
"/getPlanStatus"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getPlanStatus"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
getPlanStatus
()
{
public
ResponseModel
getPlanStatus
()
{
return
CommonResponseUtil2
.
success
(
contingencyPlanService
.
getPlanStatus
());
return
CommonResponseUtil2
.
success
(
CollectionUtils
.
isEmpty
(
contingencyPlanService
.
getPlanStatus
()));
}
@ApiOperation
(
value
=
"获取执行预案序列号"
)
@RequestMapping
(
value
=
"/getPlanBatchNo"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
getPlanBatchNo
()
{
return
CommonResponseUtil2
.
success
(
contingencyPlanService
.
getPlanBatchNo
());
}
}
@ApiOperation
(
value
=
"获取当前登录人待处置任务及预案信息"
)
@ApiOperation
(
value
=
"获取当前登录人待处置任务及预案信息"
)
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/PlanVisual3dController.java
View file @
309750f6
...
@@ -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.ContingencyPlanInstanceVO
;
import
com.yeejoin.amos.fas.business.vo.PlanStepVo
;
import
com.yeejoin.amos.fas.business.vo.PlanStepVo
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.config.Permission
;
import
com.yeejoin.amos.fas.config.Permission
;
...
@@ -201,55 +202,17 @@ public class PlanVisual3dController extends BaseController {
...
@@ -201,55 +202,17 @@ public class PlanVisual3dController extends BaseController {
}
}
@Permission
@Permission
@ApiOperation
(
value
=
"处置详情信息"
,
notes
=
"处置详情信息"
)
@GetMapping
(
value
=
"/plan/selectDisposalDetails"
)
public
ResponseModel
selectDisposalDetails
(
@RequestParam
(
"disposalId"
)
String
disposalId
)
{
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
selectDisposalDetails
(
disposalId
));
}
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询处置详情信息"
,
notes
=
"分页查询处置详情信息"
)
@GetMapping
(
value
=
"/plan/selectDisposalListPage"
)
public
ResponseModel
selectDisposalListPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
if
(
current
<
1
||
size
<
1
)
{
throw
new
YeeException
(
"分页参数有误"
);
}
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
return
CommonResponseUtil2
.
success
(
planVisual3dService
.
selectDisposalListPage
(
current
,
size
,
orgCode
));
}
@Permission
@ApiOperation
(
value
=
"新增处置信息"
,
notes
=
"新增处置信息"
)
@PostMapping
(
value
=
"/plan/addDisposalDetails"
)
public
ResponseModel
addDisposalDetails
(
@RequestBody
ContingencyInstanceInfo
contingencyInstanceInfo
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
contingencyInstanceInfo
.
setOrgCode
(
orgCode
);
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
addDisposalDetails
(
contingencyInstanceInfo
));
}
@Permission
@ApiOperation
(
value
=
"修改处置信息"
,
notes
=
"修改处置信息"
)
@PostMapping
(
value
=
"/plan/updateDisposalDetails"
)
public
ResponseModel
updateDisposalDetails
(
@RequestBody
ContingencyInstanceInfo
contingencyInstanceInfo
)
{
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
updateDisposalDetails
(
contingencyInstanceInfo
));
}
@Permission
@ApiOperation
(
value
=
"根据批次号获取预案的消息等记录"
,
notes
=
"根据批次号获取预案的消息等记录"
)
@ApiOperation
(
value
=
"根据批次号获取预案的消息等记录"
,
notes
=
"根据批次号获取预案的消息等记录"
)
@GetMapping
(
value
=
"/plan/getPlaneRecordByNew"
)
@GetMapping
(
value
=
"/plan/getPlaneRecordByNew"
)
public
ResponseModel
getPlaneRecordByNew
(
@RequestParam
Integer
pageNum
,
@RequestParam
Integer
size
,
@RequestParam
(
required
=
false
)
String
batchNo
)
{
public
ResponseModel
<
ContingencyPlanInstanceVO
>
getPlaneRecordByNew
(
@RequestParam
Integer
pageNum
,
@RequestParam
Integer
size
,
@RequestParam
(
required
=
false
)
String
batchNo
)
{
AgencyUserModel
user
=
getUserInfo
();
if
(!
StringUtil
.
isNotEmpty
(
batchNo
))
{
if
(!
StringUtil
.
isNotEmpty
(
batchNo
))
{
batchNo
=
planVisual3dService
.
getNewestBatchNo
();
batchNo
=
planVisual3dService
.
getNewestBatchNo
();
}
}
if
(!
StringUtil
.
isNotEmpty
(
batchNo
))
{
if
(!
StringUtil
.
isNotEmpty
(
batchNo
))
{
return
CommonResponseUtil
.
successNew
(
null
);
return
CommonResponseUtil
.
successNew
(
null
);
}
}
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
getPlaneRecordByNew
(
pageNum
,
size
,
batchNo
));
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
getPlaneRecordByNew
(
pageNum
,
size
,
batchNo
,
user
));
}
}
@Permission
@Permission
...
@@ -257,16 +220,15 @@ public class PlanVisual3dController extends BaseController {
...
@@ -257,16 +220,15 @@ public class PlanVisual3dController extends BaseController {
@PostMapping
(
value
=
"/plan/replyMessage"
)
@PostMapping
(
value
=
"/plan/replyMessage"
)
public
ResponseModel
replyMessage
(
@RequestBody
ContingencyPlanInstance
dto
)
{
public
ResponseModel
replyMessage
(
@RequestBody
ContingencyPlanInstance
dto
)
{
AgencyUserModel
user
=
getUserInfo
();
AgencyUserModel
user
=
getUserInfo
();
planVisual3dService
.
replyMessage
(
user
,
dto
);
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
replyMessage
(
user
,
dto
));
return
CommonResponseUtil
.
successNew
(
null
);
}
}
@Permission
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询
处置详情信息"
,
notes
=
"分页查询处置详情信息
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询
预案下处置动作列表"
,
notes
=
"分页查询预案下处置动作列表
"
)
@GetMapping
(
value
=
"/plan/selectDisposalActionPage"
)
@GetMapping
(
value
=
"/plan/selectDisposalActionPage"
)
public
ResponseModel
selectDisposalActionPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
public
ResponseModel
selectDisposalActionPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"
disposalId"
)
String
disposalId
,
@RequestParam
(
value
=
"
batchNo"
)
String
batchNo
,
@RequestParam
(
value
=
"dataType"
)
int
dataType
@RequestParam
(
value
=
"dataType"
)
int
dataType
)
{
)
{
if
(
current
<
1
||
size
<
1
)
{
if
(
current
<
1
||
size
<
1
)
{
...
@@ -278,6 +240,27 @@ public class PlanVisual3dController extends BaseController {
...
@@ -278,6 +240,27 @@ public class PlanVisual3dController extends BaseController {
for
(
Long
key
:
user
.
getOrgRoles
().
keySet
())
{
for
(
Long
key
:
user
.
getOrgRoles
().
keySet
())
{
roleModelList
.
addAll
(
user
.
getOrgRoles
().
get
(
key
));
roleModelList
.
addAll
(
user
.
getOrgRoles
().
get
(
key
));
}
}
return
CommonResponseUtil2
.
success
(
planVisual3dService
.
selectDisposalActionPage
(
current
,
size
,
disposalId
,
roleModelList
,
dataType
));
return
CommonResponseUtil2
.
success
(
planVisual3dService
.
selectDisposalActionPage
(
current
,
size
,
batchNo
,
roleModelList
,
dataType
));
}
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询预案下处置动作列表"
,
notes
=
"查询预案下处置动作列表"
)
@GetMapping
(
value
=
"/plan/selectDisposalActionList"
)
public
ResponseModel
selectDisposalActionList
(
@RequestParam
(
value
=
"batchNo"
)
String
batchNo
,
@RequestParam
(
value
=
"dataType"
)
int
dataType
)
{
AgencyUserModel
user
=
getUserInfo
();
List
<
RoleModel
>
roleModelList
=
new
ArrayList
<>();
for
(
Long
key
:
user
.
getOrgRoles
().
keySet
())
{
roleModelList
.
addAll
(
user
.
getOrgRoles
().
get
(
key
));
}
return
CommonResponseUtil2
.
success
(
planVisual3dService
.
selectDisposalActionList
(
batchNo
,
roleModelList
,
dataType
));
}
@Permission
@ApiOperation
(
value
=
"修改动作执行状态"
,
notes
=
"修改动作执行状态"
)
@PostMapping
(
value
=
"/updateStatusById"
)
public
ResponseModel
updateStatusById
(
@RequestParam
(
"id"
)
String
id
)
{
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
updateStatusById
(
id
));
}
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/RiskSourceController.java
View file @
309750f6
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.fas.business.action.model.ProtalDataRo;
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.fas.business.action.model.ProtalDataRo;
import
com.yeejoin.amos.fas.business.bo.DangerResultBo
;
import
com.yeejoin.amos.fas.business.bo.DangerResultBo
;
import
com.yeejoin.amos.fas.business.bo.PlanFlagBo
;
import
com.yeejoin.amos.fas.business.bo.PlanFlagBo
;
import
com.yeejoin.amos.fas.business.bo.RiskSourceSynBo
;
import
com.yeejoin.amos.fas.business.bo.RiskSourceSynBo
;
import
com.yeejoin.amos.fas.business.dao.mapper.ContingencyPlanInstanceMapper
;
import
com.yeejoin.amos.fas.business.param.AlarmParam
;
import
com.yeejoin.amos.fas.business.param.AlarmParam
;
import
com.yeejoin.amos.fas.business.param.FmeaBindParam
;
import
com.yeejoin.amos.fas.business.param.FmeaBindParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskFactorService
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskFactorService
;
...
@@ -16,10 +17,7 @@ import com.yeejoin.amos.fas.config.Permission;
...
@@ -16,10 +17,7 @@ import com.yeejoin.amos.fas.config.Permission;
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.enums.ReserveEnum
;
import
com.yeejoin.amos.fas.core.enums.ReserveEnum
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.*
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil2
;
import
com.yeejoin.amos.fas.core.util.ResponseModel
;
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
;
...
@@ -48,6 +46,9 @@ public class RiskSourceController extends BaseController {
...
@@ -48,6 +46,9 @@ public class RiskSourceController extends BaseController {
@Autowired
@Autowired
IRiskSourceService
riskSourceService
;
IRiskSourceService
riskSourceService
;
@Autowired
ContingencyPlanInstanceMapper
contingencyPlanInstanceMapper
;
@Permission
@Permission
//@Authorization(ingore = true)
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询风险点子项"
,
notes
=
"查询风险点子项"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询风险点子项"
,
notes
=
"查询风险点子项"
)
...
@@ -719,6 +720,27 @@ public class RiskSourceController extends BaseController {
...
@@ -719,6 +720,27 @@ public class RiskSourceController extends BaseController {
return
CommonResponseUtil
.
success
(
riskSourceService
.
queryContingencyWater
());
return
CommonResponseUtil
.
success
(
riskSourceService
.
queryContingencyWater
());
}
}
@ApiOperation
(
value
=
"概览水源信息"
)
@GetMapping
(
"/getWaterInfo"
)
@Permission
public
CommonResponse
getWaterInfo
(
CommonPageable
commonPageable
)
{
if
(
commonPageable
.
getPageNumber
()
==
0
)
{
commonPageable
.
setPageNumber
(
1
);
}
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
String
bizOrgCode
=
null
;
if
(
StringUtil
.
isNotEmpty
(
orgCode
))
{
bizOrgCode
=
contingencyPlanInstanceMapper
.
getBizOrgCode
(
orgCode
);
if
(!
StringUtil
.
isNotEmpty
(
bizOrgCode
))
{
return
CommonResponseUtil
.
success
(
null
);
}
}
else
{
return
CommonResponseUtil
.
success
(
null
);
}
return
CommonResponseUtil
.
success
(
riskSourceService
.
getWaterInfo
(
commonPageable
,
bizOrgCode
));
}
/**
/**
* 获取危险因素树二级节点
* 获取危险因素树二级节点
*
*
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/TimeLineController.java
View file @
309750f6
...
@@ -75,7 +75,7 @@ public class TimeLineController extends BaseController {
...
@@ -75,7 +75,7 @@ public class TimeLineController extends BaseController {
@RequestParam
(
"confirm"
)
String
confirm
,
@RequestParam
(
"confirm"
)
String
confirm
,
@RequestParam
(
"contingencyPlanId"
)
String
contingencyPlanId
,
@RequestParam
(
"contingencyPlanId"
)
String
contingencyPlanId
,
@RequestParam
(
"stepState"
)
String
stepState
)
throws
Exception
{
@RequestParam
(
"stepState"
)
String
stepState
)
throws
Exception
{
iContingencyInstance
.
fire
(
batchNo
,
stepCode
,
contingencyPlanId
,
buttonCode
,
confirm
,
stepState
,
getToken
(),
getProduct
());
iContingencyInstance
.
fire
(
batchNo
,
stepCode
,
contingencyPlanId
,
buttonCode
,
confirm
,
stepState
,
getToken
(),
getProduct
()
,
getAppKey
()
);
return
CommonResponseUtil
.
success
(
"SUCCESS"
);
return
CommonResponseUtil
.
success
(
"SUCCESS"
);
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/View3dController.java
View file @
309750f6
...
@@ -7,6 +7,7 @@ import static com.yeejoin.amos.fas.business.constants.FasConstant.token;
...
@@ -7,6 +7,7 @@ import static com.yeejoin.amos.fas.business.constants.FasConstant.token;
import
java.util.List
;
import
java.util.List
;
import
com.yeejoin.amos.fas.business.action.mq.IKafkaProducer
;
import
org.apache.rocketmq.client.producer.DefaultMQProducer
;
import
org.apache.rocketmq.client.producer.DefaultMQProducer
;
import
org.apache.rocketmq.client.producer.SendResult
;
import
org.apache.rocketmq.client.producer.SendResult
;
import
org.apache.rocketmq.common.message.Message
;
import
org.apache.rocketmq.common.message.Message
;
...
@@ -338,6 +339,9 @@ public class View3dController extends BaseController {
...
@@ -338,6 +339,9 @@ public class View3dController extends BaseController {
@Autowired
@Autowired
IRocketMQService
rocketMQService
;
IRocketMQService
rocketMQService
;
@Autowired
IKafkaProducer
iKafkaProducer
;
@ApiOperation
(
value
=
"rocketMQ消息推送测试"
,
notes
=
"rocketMQ消息推送测试"
)
@ApiOperation
(
value
=
"rocketMQ消息推送测试"
,
notes
=
"rocketMQ消息推送测试"
)
@PostMapping
(
value
=
"rocketMQ/send"
)
@PostMapping
(
value
=
"rocketMQ/send"
)
public
CommonResponse
rocketMQTemplate
(
@RequestParam
(
required
=
true
,
defaultValue
=
"all"
)
String
topic
,
public
CommonResponse
rocketMQTemplate
(
@RequestParam
(
required
=
true
,
defaultValue
=
"all"
)
String
topic
,
...
@@ -352,4 +356,17 @@ public class View3dController extends BaseController {
...
@@ -352,4 +356,17 @@ public class View3dController extends BaseController {
return
CommonResponseUtil
.
success
(
msg
);
return
CommonResponseUtil
.
success
(
msg
);
}
}
@ApiOperation
(
value
=
"kafka消息推送测试"
,
notes
=
"kafka消息推送测试"
)
@PostMapping
(
value
=
"kafka/send"
)
public
CommonResponse
kafkaMsgSendTest
(
@RequestParam
(
name
=
"topic"
,
required
=
false
)
String
topic
,
@RequestBody
Object
msg
)
{
try
{
iKafkaProducer
.
sendMessage
(
topic
,
"kafka_msg_test"
,
JSON
.
toJSONString
(
msg
));
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
e
.
getMessage
());
}
return
CommonResponseUtil
.
success
(
msg
);
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/ContingencyInstanceInfoMapper.java
View file @
309750f6
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.fas.business.vo.ContingencyInstanceInfoVO
;
import
com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyInstanceInfo
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyInstanceInfo
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
...
@@ -12,7 +14,7 @@ import java.util.List;
...
@@ -12,7 +14,7 @@ import java.util.List;
@Repository
@Repository
public
interface
ContingencyInstanceInfoMapper
extends
BaseMapper
<
ContingencyInstanceInfo
>
{
public
interface
ContingencyInstanceInfoMapper
extends
BaseMapper
<
ContingencyInstanceInfo
>
{
ContingencyInstanceInfo
selectDisposalDetails
(
@Param
(
"id"
)
String
id
);
ContingencyInstanceInfo
VO
selectDisposalDetails
(
@Param
(
"id"
)
String
id
);
Boolean
addDisposalDetails
(
@Param
(
"dto"
)
ContingencyInstanceInfo
contingencyInstanceInfo
);
Boolean
addDisposalDetails
(
@Param
(
"dto"
)
ContingencyInstanceInfo
contingencyInstanceInfo
);
...
@@ -20,12 +22,12 @@ public interface ContingencyInstanceInfoMapper extends BaseMapper<ContingencyIns
...
@@ -20,12 +22,12 @@ public interface ContingencyInstanceInfoMapper extends BaseMapper<ContingencyIns
int
selectCount
(
@Param
(
"orgCode"
)
String
orgCode
);
int
selectCount
(
@Param
(
"orgCode"
)
String
orgCode
);
List
<
ContingencyInstanceInfo
>
selectDisposalListPage
(
@Param
(
"current"
)
int
current
,
@Param
(
"size"
)
int
size
,
@Param
(
"orgCode"
)
String
orgCode
);
List
<
ContingencyInstanceInfo
VO
>
selectDisposalListPage
(
@Param
(
"current"
)
int
current
,
@Param
(
"size"
)
int
size
,
@Param
(
"orgCode"
)
String
orgCode
);
List
<
ContingencyPlanInstance
>
selectDisposalActionPage
(
@Param
(
"current"
)
int
current
,
@Param
(
"size"
)
int
size
,
@Param
(
"type"
)
String
type
,
@Param
(
"status"
)
String
status
,
@Param
(
"list"
)
List
<
String
>
roles
,
@Param
(
"batchNo"
)
String
batchNo
);
List
<
ContingencyPlanInstance
VO
>
selectDisposalActionPage
(
@Param
(
"current"
)
int
current
,
@Param
(
"size"
)
int
size
,
@Param
(
"type"
)
String
type
,
@Param
(
"status"
)
String
status
,
@Param
(
"list"
)
List
<
String
>
roles
,
@Param
(
"batchNo"
)
String
batchNo
);
int
selectCountDisposalActionPage
(
@Param
(
"type"
)
String
type
,
@Param
(
"status"
)
String
status
,
@Param
(
"list"
)
List
<
String
>
roles
,
@Param
(
"batchNo"
)
String
batchNo
);
int
selectCountDisposalActionPage
(
@Param
(
"type"
)
String
type
,
@Param
(
"status"
)
String
status
,
@Param
(
"list"
)
List
<
String
>
roles
,
@Param
(
"batchNo"
)
String
batchNo
);
List
<
ContingencyPlanInstance
>
selectDisposalActionList
(
@Param
(
"type"
)
String
type
,
@Param
(
"status"
)
String
status
,
@Param
(
"list"
)
List
<
String
>
roles
,
@Param
(
"batchNo"
)
String
batchNo
);
List
<
ContingencyPlanInstance
VO
>
selectDisposalActionList
(
@Param
(
"type"
)
String
type
,
@Param
(
"status"
)
String
status
,
@Param
(
"list"
)
List
<
String
>
roles
,
@Param
(
"batchNo"
)
String
batchNo
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/ContingencyPlanInstanceMapper.java
View file @
309750f6
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -17,4 +18,27 @@ public interface ContingencyPlanInstanceMapper extends BaseMapper<ContingencyPla
...
@@ -17,4 +18,27 @@ public interface ContingencyPlanInstanceMapper extends BaseMapper<ContingencyPla
Integer
getPlanInstanceCount
(
@Param
(
"batchNo"
)
String
batchNo
);
Integer
getPlanInstanceCount
(
@Param
(
"batchNo"
)
String
batchNo
);
Map
<
String
,
String
>
getUserByUserId
(
@Param
(
"userId"
)
String
userId
);
Map
<
String
,
String
>
getUserByUserId
(
@Param
(
"userId"
)
String
userId
);
/**
* 修改动作执行状态
* @param id
* @return
*/
Boolean
updateStatusById
(
@Param
(
"id"
)
String
id
,
@Param
(
"content"
)
String
content
);
ContingencyPlanInstance
getMessageById
(
@Param
(
"id"
)
String
id
);
/**
* 信息更新
* @param contingencyPlanInstance
* @return
*/
Boolean
updateMessageById
(
@Param
(
"dto"
)
ContingencyPlanInstance
contingencyPlanInstance
);
String
getBizOrgCode
(
@Param
(
"amosOrgCode"
)
String
amosOrgCode
);
List
<
Map
<
String
,
Object
>>
getWaterInfo
(
@Param
(
"current"
)
Integer
current
,
@Param
(
"size"
)
Integer
size
,
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
long
countWater
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/WarehouseStructureMapper.java
0 → 100644
View file @
309750f6
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.fas.dao.entity.WarehouseStructure
;
import
org.apache.ibatis.annotations.Param
;
/**
* 货架结构 Mapper 接口
*
* @author wujiang
* @date 2020-07-07
*/
public
interface
WarehouseStructureMapper
extends
BaseMapper
<
WarehouseStructure
>
{
WarehouseStructure
getMessageById
(
@Param
(
"id"
)
Long
id
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/feign/PrivilegeFeign.java
View file @
309750f6
...
@@ -32,4 +32,10 @@ public interface PrivilegeFeign {
...
@@ -32,4 +32,10 @@ public interface PrivilegeFeign {
@RequestHeader
(
name
=
"product"
,
required
=
true
)
String
product
,
@RequestHeader
(
name
=
"product"
,
required
=
true
)
String
product
,
@RequestHeader
(
name
=
"token"
,
required
=
true
)
String
token
,
@RequestHeader
(
name
=
"token"
,
required
=
true
)
String
token
,
@RequestParam
(
value
=
"roleIds"
,
required
=
true
)
String
roleIds
);
@RequestParam
(
value
=
"roleIds"
,
required
=
true
)
String
roleIds
);
@RequestMapping
(
value
=
"/privilege/v1/role/list"
,
method
=
RequestMethod
.
GET
)
FeignClientResult
getRoleList
(
@RequestHeader
(
name
=
"appKey"
,
required
=
true
)
String
appKey
,
@RequestHeader
(
name
=
"product"
,
required
=
true
)
String
product
,
@RequestHeader
(
name
=
"token"
,
required
=
true
)
String
token
,
@RequestParam
(
value
=
"roleName"
,
required
=
true
)
String
roleName
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceImpl.java
View file @
309750f6
This diff is collapsed.
Click to expand it.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceInfoServiceImpl.java
0 → 100644
View file @
309750f6
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.fas.business.dao.mapper.ContingencyInstanceInfoMapper
;
import
com.yeejoin.amos.fas.business.service.intfc.ContingencyInstanceInfoService
;
import
com.yeejoin.amos.fas.business.vo.ContingencyInstanceInfoVO
;
import
com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO
;
import
com.yeejoin.amos.fas.core.util.DateUtil
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyInstanceInfo
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
import
java.util.List
;
@Service
(
"contingencyInstanceInfoService"
)
public
class
ContingencyInstanceInfoServiceImpl
implements
ContingencyInstanceInfoService
{
@Autowired
private
ContingencyInstanceInfoMapper
contingencyInstanceInfoMapper
;
@Override
public
ContingencyInstanceInfoVO
selectDisposalDetails
(
String
disposalId
)
{
ContingencyInstanceInfoVO
instanceInfo
=
contingencyInstanceInfoMapper
.
selectDisposalDetails
(
disposalId
);
if
(!
ObjectUtils
.
isEmpty
(
instanceInfo
.
getStartTime
())
&&
!
ObjectUtils
.
isEmpty
(
instanceInfo
.
getEndTime
())){
String
datePoorToMin
=
getDatePoorToMin
(
instanceInfo
.
getEndTime
(),
instanceInfo
.
getStartTime
());
instanceInfo
.
setDuration
(
datePoorToMin
);
}
return
instanceInfo
;
}
@Override
public
Page
<
ContingencyInstanceInfoVO
>
selectDisposalListPage
(
int
current
,
int
size
,
String
orgCode
)
{
Page
<
ContingencyInstanceInfoVO
>
page
=
new
Page
<>(
current
,
size
);
int
total
=
contingencyInstanceInfoMapper
.
selectCount
(
orgCode
);
page
.
setTotal
(
total
);
long
start
=
(
page
.
getCurrent
()
-
1
)
*
page
.
getSize
();
if
(
total
==
0
)
{
page
.
setCurrent
(
1
);
}
else
{
if
(
total
<
start
)
{
page
.
setCurrent
(
1
);
start
=
0
;
}
List
<
ContingencyInstanceInfoVO
>
infoList
=
contingencyInstanceInfoMapper
.
selectDisposalListPage
((
int
)
start
,
size
,
orgCode
);
for
(
ContingencyInstanceInfoVO
instanceInfo
:
infoList
)
{
if
(!
ObjectUtils
.
isEmpty
(
instanceInfo
.
getStartTime
())
&&
!
ObjectUtils
.
isEmpty
(
instanceInfo
.
getEndTime
())){
String
datePoorToMin
=
getDatePoorToMin
(
instanceInfo
.
getEndTime
(),
instanceInfo
.
getStartTime
());
instanceInfo
.
setDuration
(
datePoorToMin
);
}
}
page
.
setRecords
(
infoList
);
}
return
page
;
}
@Override
public
Boolean
addDisposalDetails
(
ContingencyInstanceInfo
contingencyInstanceInfo
)
{
contingencyInstanceInfo
.
setIsDelete
(
false
);
contingencyInstanceInfo
.
setCreateDate
(
DateUtil
.
getDateNow
());
return
contingencyInstanceInfoMapper
.
addDisposalDetails
(
contingencyInstanceInfo
);
}
@Override
public
Boolean
updateDisposalDetails
(
ContingencyInstanceInfo
contingencyInstanceInfo
)
{
return
contingencyInstanceInfoMapper
.
updateDisposalDetails
(
contingencyInstanceInfo
);
}
@Override
public
Boolean
updateEndTimeById
(
String
id
)
{
ContingencyInstanceInfoVO
instanceInfoVO
=
selectDisposalDetails
(
id
);
ContingencyInstanceInfo
instanceInfo
=
new
ContingencyInstanceInfo
();
BeanUtils
.
copyProperties
(
instanceInfoVO
,
instanceInfo
);
if
(
instanceInfo
!=
null
)
{
instanceInfo
.
setEndTime
(
new
Date
());
return
contingencyInstanceInfoMapper
.
updateDisposalDetails
(
instanceInfo
);
}
return
false
;
}
public
static
String
getDatePoorToMin
(
Date
endDate
,
Date
nowDate
)
{
long
nd
=
1000
*
24
*
60
*
60
;
long
nh
=
1000
*
60
*
60
;
long
nm
=
1000
*
60
;
long
ns
=
1000
;
// 获得两个时间的毫秒时间差异
long
diff
=
endDate
.
getTime
()
-
nowDate
.
getTime
();
// 计算差多少天
long
day
=
diff
/
nd
;
// 计算差多少小时
long
hour
=
diff
/
nh
;
// 计算差多少分钟
long
min
=
diff
%
nh
/
nm
;
// 计算差多少秒//输出结果
long
sec
=
diff
%
nd
%
nh
%
nm
/
ns
;
return
hour
+
"小时"
+
min
+
"分钟 "
+
sec
+
"秒"
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyPlanServiceImpl.java
View file @
309750f6
...
@@ -61,6 +61,8 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -61,6 +61,8 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
@Autowired
@Autowired
private
EquipmentSpecificMapper
equipmentSpecificMapper
;
private
EquipmentSpecificMapper
equipmentSpecificMapper
;
@Autowired
@Autowired
private
WarehouseStructureMapper
warehouseStructureMapper
;
@Autowired
private
IEquipmentHandlerService
equipmentHandlerService
;
private
IEquipmentHandlerService
equipmentHandlerService
;
@Autowired
@Autowired
private
IContingencyPlanInstanceRepository
repository
;
private
IContingencyPlanInstanceRepository
repository
;
...
@@ -70,6 +72,9 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -70,6 +72,9 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
@Autowired
@Autowired
private
CustomerAction
customerAction
;
private
CustomerAction
customerAction
;
@Autowired
private
ContingencyInstanceInfoService
contingencyInstanceInfoService
;
@Value
(
"${systemctl.sync.switch}"
)
@Value
(
"${systemctl.sync.switch}"
)
private
Boolean
dataSyncSwitch
;
private
Boolean
dataSyncSwitch
;
...
@@ -167,18 +172,25 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -167,18 +172,25 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
return
result
;
return
result
;
}
}
}
}
String
specificCode
=
equipmentSpecific
.
getCode
();
String
specificName
=
equipmentSpecific
.
getName
();
Date
date
=
new
Date
();
// 插入预案基本信息
ContingencyInstanceInfo
instanceInfo
=
new
ContingencyInstanceInfo
();
instanceInfo
.
setStartTime
(
date
);
instanceInfo
.
setEquipmentCode
(
specificCode
);
instanceInfo
.
setEquipmentName
(
specificName
);
//插入运行记录表
//插入运行记录表
PlanOperationRecord
PlanOperationRecord
=
new
PlanOperationRecord
();
PlanOperationRecord
PlanOperationRecord
=
new
PlanOperationRecord
();
PlanOperationRecord
.
setStatus
(
PlanRecordStatusEnum
.
OPERATION
.
getCode
());
PlanOperationRecord
.
setStatus
(
PlanRecordStatusEnum
.
OPERATION
.
getCode
());
PlanOperationRecord
.
setPlanId
(
PlanDetailOp
.
get
().
getId
());
PlanOperationRecord
.
setPlanId
(
PlanDetailOp
.
get
().
getId
());
PlanOperationRecord
.
setIsDelete
(
false
);
PlanOperationRecord
.
setIsDelete
(
false
);
PlanOperationRecord
.
setStartTime
(
new
Date
()
);
PlanOperationRecord
.
setStartTime
(
date
);
PlanOperationRecord
.
setPlanPattern
(
vo
.
getStatus
());
PlanOperationRecord
.
setPlanPattern
(
vo
.
getStatus
());
PlanOperationRecord
.
setStartUserId
(
vo
.
getUserId
());
PlanOperationRecord
.
setStartUserId
(
vo
.
getUserId
());
PlanOperationRecord
.
setStartUserName
(
vo
.
getUserName
());
PlanOperationRecord
.
setStartUserName
(
vo
.
getUserName
());
PlanOperationRecord
.
setEquipmentCode
(
equipmentSpecific
.
getCode
()
);
PlanOperationRecord
.
setEquipmentCode
(
specificCode
);
PlanOperationRecord
.
setEquipmentName
(
equipmentSpecific
.
getName
()
);
PlanOperationRecord
.
setEquipmentName
(
specificName
);
PlanOperationRecord
.
setEquipmentId
(
equipmentSpecific
.
getId
());
PlanOperationRecord
.
setEquipmentId
(
equipmentSpecific
.
getId
());
PlanOperationRecord
.
setFireEquipmentId
(
equipment
.
getId
());
PlanOperationRecord
.
setFireEquipmentId
(
equipment
.
getId
());
if
(
ContingencyPlanStatusEnum
.
SIMULATION_START
.
getCode
().
equals
(
vo
.
getStatus
()))
{
if
(
ContingencyPlanStatusEnum
.
SIMULATION_START
.
getCode
().
equals
(
vo
.
getStatus
()))
{
...
@@ -205,6 +217,16 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -205,6 +217,16 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
//更新预案执行记录表的批次号
//更新预案执行记录表的批次号
operationRecord
.
setBatchNo
(
batchNo
);
operationRecord
.
setBatchNo
(
batchNo
);
PlanOperationRecord
record
=
planOperationRecordDao
.
save
(
operationRecord
);
PlanOperationRecord
record
=
planOperationRecordDao
.
save
(
operationRecord
);
// 保存预案基本信息
instanceInfo
.
setId
(
batchNo
);
instanceInfo
.
setName
(
detail
.
getPlanName
());
instanceInfo
.
setOrgCode
(
detail
.
getOrgCode
());
WarehouseStructure
warehouseStructure
=
warehouseStructureMapper
.
getMessageById
(
equipmentSpecific
.
getWarehouseStructureId
());
if
(
warehouseStructure
!=
null
)
{
instanceInfo
.
setPosition
(
warehouseStructure
.
getName
());
}
contingencyInstanceInfoService
.
addDisposalDetails
(
instanceInfo
);
// 异步数据同步之消息发送
// 异步数据同步之消息发送
planOperationRecordDataSync
(
record
);
planOperationRecordDataSync
(
record
);
result
.
setMessage
(
ReserveEnum
.
RUN
.
getText
());
result
.
setMessage
(
ReserveEnum
.
RUN
.
getText
());
...
@@ -774,6 +796,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -774,6 +796,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
if
(!
planList
.
isEmpty
())
{
if
(!
planList
.
isEmpty
())
{
planList
.
forEach
(
PlanOperationRecord
->
{
planList
.
forEach
(
PlanOperationRecord
->
{
String
batchNo
=
PlanOperationRecord
.
getBatchNo
();
String
batchNo
=
PlanOperationRecord
.
getBatchNo
();
customerAction
.
intreeuptPlan
(
batchNo
);
redisTemplate
.
delete
(
RiskSourceServiceImpl
.
cacheKeyForCanBeRunning
());
redisTemplate
.
delete
(
RiskSourceServiceImpl
.
cacheKeyForCanBeRunning
());
Optional
<
Equipment
>
equipment
;
Optional
<
Equipment
>
equipment
;
try
{
try
{
...
@@ -786,7 +809,6 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -786,7 +809,6 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
equip
.
setStatus
(
NumberEnum
.
ONE
.
getValue
());
equip
.
setStatus
(
NumberEnum
.
ONE
.
getValue
());
equipmentService
.
save
(
equip
);
equipmentService
.
save
(
equip
);
});
});
customerAction
.
intreeuptPlan
(
batchNo
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
info
(
"预案重置失败batchNo:{}"
,
batchNo
,
e
);
logger
.
info
(
"预案重置失败batchNo:{}"
,
batchNo
,
e
);
e
.
printStackTrace
();
e
.
printStackTrace
();
...
@@ -820,8 +842,18 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -820,8 +842,18 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
}
}
@Override
@Override
public
Boolean
getPlanStatus
()
{
public
List
<
PlanOperationRecord
>
getPlanStatus
()
{
return
CollectionUtils
.
isEmpty
(
planOperationRecordDao
.
findByStatus
(
0
));
return
planOperationRecordDao
.
findByStatus
(
0
);
// return CollectionUtils.isEmpty(planOperationRecordDao.findByStatus(0));
}
@Override
public
String
getPlanBatchNo
()
{
List
<
PlanOperationRecord
>
records
=
planOperationRecordDao
.
findByStatus
(
0
);
if
(!
CollectionUtils
.
isEmpty
(
records
))
{
return
records
.
get
(
0
).
getBatchNo
();
}
return
""
;
}
}
@Override
@Override
...
@@ -830,10 +862,15 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -830,10 +862,15 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
List
<
PlanOperationRecord
>
recordList
=
planOperationRecordDao
.
findByStatus
(
0
);
List
<
PlanOperationRecord
>
recordList
=
planOperationRecordDao
.
findByStatus
(
0
);
if
(!
CollectionUtils
.
isEmpty
(
recordList
))
{
if
(!
CollectionUtils
.
isEmpty
(
recordList
))
{
PlanOperationRecord
record
=
recordList
.
get
(
0
);
PlanOperationRecord
record
=
recordList
.
get
(
0
);
map
.
put
(
"planName"
,
record
.
getBatchNo
());
String
batchNo
=
record
.
getBatchNo
();
List
<
ContingencyPlanInstance
>
list
=
planVisual3dService
.
selectDisposalActionList
(
record
.
getBatchNo
(),
roleModelList
,
1
);
ContingencyInstanceInfoVO
instanceInfo
=
contingencyInstanceInfoService
.
selectDisposalDetails
(
batchNo
);
if
(
instanceInfo
!=
null
)
{
map
.
put
(
"planName"
,
instanceInfo
.
getName
());
map
.
put
(
"batchNo"
,
batchNo
);
List
<
ContingencyPlanInstanceVO
>
list
=
planVisual3dService
.
selectDisposalActionList
(
batchNo
,
roleModelList
,
1
);
map
.
put
(
"taskNum"
,
list
.
size
());
map
.
put
(
"taskNum"
,
list
.
size
());
}
}
}
return
map
;
return
map
;
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/EquipmentFireEquipmentServiceImpl.java
View file @
309750f6
...
@@ -112,13 +112,9 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen
...
@@ -112,13 +112,9 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen
Integer
total
=
Integer
.
parseInt
(
map
.
get
(
"total"
).
toString
());
Integer
total
=
Integer
.
parseInt
(
map
.
get
(
"total"
).
toString
());
Integer
count
=
Integer
.
parseInt
(
map
.
get
(
"count"
).
toString
());
Integer
count
=
Integer
.
parseInt
(
map
.
get
(
"count"
).
toString
());
if
(
SqlKeyWordEnum
.
AND
.
getKey
().
equalsIgnoreCase
(
type
))
{
if
(
SqlKeyWordEnum
.
AND
.
getKey
().
equalsIgnoreCase
(
type
))
{
if
(
total
.
equals
(
count
))
{
return
total
.
equals
(
count
);
return
true
;
}
}
else
if
(
SqlKeyWordEnum
.
OR
.
getKey
().
equalsIgnoreCase
(
type
))
{
}
else
if
(
SqlKeyWordEnum
.
OR
.
getKey
().
equalsIgnoreCase
(
type
))
{
if
(
count
!=
0
)
{
return
count
!=
0
;
return
true
;
}
}
}
}
}
return
false
;
return
false
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
309750f6
This diff is collapsed.
Click to expand it.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
309750f6
...
@@ -193,6 +193,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -193,6 +193,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Autowired
@Autowired
private
WebMqttComponent
webMqttComponent
;
private
WebMqttComponent
webMqttComponent
;
@Autowired
private
EquipmentSpecificMapper
equipmentSpecificMapper
;
@Override
@Override
public
RiskSource
editRiskSource
(
HashMap
<
String
,
Object
>
map
)
throws
Exception
{
public
RiskSource
editRiskSource
(
HashMap
<
String
,
Object
>
map
)
throws
Exception
{
RiskSource
riskSource
=
(
RiskSource
)
map
.
get
(
"param"
);
RiskSource
riskSource
=
(
RiskSource
)
map
.
get
(
"param"
);
...
@@ -2010,6 +2013,19 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -2010,6 +2013,19 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
return
riskSource
;
return
riskSource
;
}
}
@Autowired
private
ContingencyPlanInstanceMapper
contingencyPlanInstanceMapper
;
@Override
public
Page
<
Map
<
String
,
Object
>>
getWaterInfo
(
CommonPageable
commonPageable
,
String
bizOrgCode
)
{
List
<
Map
<
String
,
Object
>>
content
=
Lists
.
newArrayList
();
long
total
=
contingencyPlanInstanceMapper
.
countWater
(
bizOrgCode
);
if
(
total
<=
0
)
{
return
new
PageImpl
<>(
content
,
commonPageable
,
total
);
}
Integer
start
=
(
commonPageable
.
getPageNumber
()
-
1
)
*
commonPageable
.
getPageSize
();
content
=
contingencyPlanInstanceMapper
.
getWaterInfo
(
start
,
commonPageable
.
getPageSize
(),
bizOrgCode
);
return
new
PageImpl
<>(
content
,
commonPageable
,
total
);
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
309750f6
...
@@ -17,7 +17,6 @@ import com.yeejoin.amos.fas.business.dao.repository.IEquipmentDao;
...
@@ -17,7 +17,6 @@ import com.yeejoin.amos.fas.business.dao.repository.IEquipmentDao;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskLevelDao
;
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.JcsFeign
;
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
;
...
@@ -57,10 +56,6 @@ import java.util.*;
...
@@ -57,10 +56,6 @@ import java.util.*;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
//import com.yeejoin.amos.fas.business.dao.repository.IWaterResourceDao;
//import com.yeejoin.amos.fas.dao.entity.FireStation;
//import com.yeejoin.amos.fas.dao.entity.WaterResource;
/**
/**
* @author DELL
* @author DELL
*/
*/
...
@@ -74,11 +69,9 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -74,11 +69,9 @@ public class View3dServiceImpl implements IView3dService {
@Autowired
@Autowired
private
IRiskSourceDao
iRiskSourceDao
;
private
IRiskSourceDao
iRiskSourceDao
;
@Autowired
@Autowired
private
IEquipmentDao
iEquipmentDao
;
private
IEquipmentDao
iEquipmentDao
;
// @Autowired
// private IWaterResourceDao iWaterResourceDao;
@Autowired
@Autowired
private
PatrolMapper
patrolMapper
;
private
PatrolMapper
patrolMapper
;
@Autowired
@Autowired
...
@@ -87,9 +80,6 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -87,9 +80,6 @@ public class View3dServiceImpl implements IView3dService {
private
ISafetyIndexChangeLogDao
iSafetyIndexChangeLogDao
;
private
ISafetyIndexChangeLogDao
iSafetyIndexChangeLogDao
;
@Autowired
@Autowired
private
IDutyModeServer
dutyModeServer
;
@Autowired
private
JcsFeign
jcsFeign
;
private
JcsFeign
jcsFeign
;
@Value
(
"${param.system.online.date}"
)
@Value
(
"${param.system.online.date}"
)
...
@@ -134,11 +124,7 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -134,11 +124,7 @@ public class View3dServiceImpl implements IView3dService {
this
.
updateFireCarPosition
(
pointBo
);
this
.
updateFireCarPosition
(
pointBo
);
case
"fireChamber"
:
case
"fireChamber"
:
case
"fireFoamRoom"
:
case
"fireFoamRoom"
:
// this.updateFireStationPosition(pointBo);
// break;
case
"hydrant"
:
case
"hydrant"
:
// case "pool":
// this.updateWaterSourcePosition(pointBo);
break
;
break
;
default
:
default
:
log
.
error
(
"不支持的类型-->"
+
pointType
);
log
.
error
(
"不支持的类型-->"
+
pointType
);
...
@@ -160,34 +146,6 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -160,34 +146,6 @@ public class View3dServiceImpl implements IView3dService {
// }
// }
}
}
// public void updateWaterSourcePosition(BindPointBo pointBo) {
// Optional<WaterResource> data = iWaterResourceDao.findById(pointBo.getPointId());
// if(data.isPresent()){
// WaterResource waterResource = data.get();
// String ue4Location = pointBo.getUe4Location();
// String ue4Rotation = pointBo.getUe4Rotation();
// String position3d = pointBo.getPosition3d();
// if(ue4Location != null) waterResource.setUe4Location(ue4Location);
// if(ue4Rotation != null) waterResource.setUe4Rotation(ue4Rotation);
// if(position3d != null) waterResource.setPosition3d(position3d);
// iWaterResourceDao.save(waterResource);
// }
// }
// public void updateFireStationPosition(BindPointBo pointBo) {
// Optional<FireStation> data = iFireStationDao.findById(pointBo.getPointId());
// if(data.isPresent()){
// FireStation fireStation = data.get();
// String ue4Location = pointBo.getUe4Location();
// String ue4Rotation = pointBo.getUe4Rotation();
// String position3d = pointBo.getPosition3d();
// if(ue4Location != null) fireStation.setUe4Location(ue4Location);
// if(ue4Rotation != null) fireStation.setUe4Rotation(ue4Rotation);
// if(position3d != null) fireStation.setPosition3d(position3d);
// iFireStationDao.save(fireStation);
// }
// }
public
void
updateFireEquipmentPosition
(
BindPointBo
pointBo
)
{
public
void
updateFireEquipmentPosition
(
BindPointBo
pointBo
)
{
// Optional<FireEquipment> data = iFireEquipmentDao.findById(pointBo.getPointId());
// Optional<FireEquipment> data = iFireEquipmentDao.findById(pointBo.getPointId());
// if(data.isPresent()){
// if(data.isPresent()){
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/ContingencyInstanceInfoService.java
0 → 100644
View file @
309750f6
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.fas.business.vo.ContingencyInstanceInfoVO
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyInstanceInfo
;
public
interface
ContingencyInstanceInfoService
{
ContingencyInstanceInfoVO
selectDisposalDetails
(
String
batchNo
);
Page
<
ContingencyInstanceInfoVO
>
selectDisposalListPage
(
int
current
,
int
size
,
String
orgCode
);
Boolean
addDisposalDetails
(
ContingencyInstanceInfo
contingencyInstanceInfo
);
Boolean
updateDisposalDetails
(
ContingencyInstanceInfo
contingencyInstanceInfo
);
/**
* 通过ID更新预案的结束时间
* @param id
* @return
*/
Boolean
updateEndTimeById
(
String
id
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IContingencyInstance.java
View file @
309750f6
...
@@ -23,5 +23,26 @@ public interface IContingencyInstance {
...
@@ -23,5 +23,26 @@ public interface IContingencyInstance {
void
updateStep
(
String
step
,
String
batchNo
);
void
updateStep
(
String
step
,
String
batchNo
);
Optional
<
Equipment
>
fire
(
String
batchNo
,
String
stepCode
,
String
contingencyPlanId
,
String
buttonCode
,
String
buttonState
,
String
stepStateOnbutton
,
String
token
,
String
product
)
throws
Exception
;
Optional
<
Equipment
>
fire
(
String
batchNo
,
String
stepCode
,
String
contingencyPlanId
,
String
buttonCode
,
String
buttonState
,
String
stepStateOnbutton
,
String
token
,
String
product
,
String
appKey
)
throws
Exception
;
/**
* 扩展属性赋值
* @param contingencyPlanInstance
* @return
*/
ContingencyPlanInstance
updateExtendColumn
(
ContingencyPlanInstance
contingencyPlanInstance
);
/**
* 根据id 查询信息
* @param id
* @return
*/
ContingencyPlanInstance
getMessageById
(
String
id
);
/**
* 通过buttonCode获取执行角色编码
* @param buttonCode
* @return
*/
String
getPlanStepRoleCodeByButtonCode
(
String
buttonCode
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IContingencyPlanService.java
View file @
309750f6
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.fas.business.vo.ContingencyPlanResponseVo;
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.fas.business.vo.ContingencyPlanResponseVo;
import
com.yeejoin.amos.fas.business.vo.PlanDetailVo
;
import
com.yeejoin.amos.fas.business.vo.PlanDetailVo
;
import
com.yeejoin.amos.fas.business.vo.Toke
;
import
com.yeejoin.amos.fas.business.vo.Toke
;
import
com.yeejoin.amos.fas.dao.entity.PlanDetail
;
import
com.yeejoin.amos.fas.dao.entity.PlanDetail
;
import
com.yeejoin.amos.fas.dao.entity.PlanOperationRecord
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -136,7 +137,9 @@ public interface IContingencyPlanService {
...
@@ -136,7 +137,9 @@ public interface IContingencyPlanService {
AtomicBoolean
planReset
();
AtomicBoolean
planReset
();
Boolean
getPlanStatus
();
List
<
PlanOperationRecord
>
getPlanStatus
();
Map
<
String
,
Object
>
getUserOperateCountAndPlanName
(
List
<
RoleModel
>
roleModelList
);
Map
<
String
,
Object
>
getUserOperateCountAndPlanName
(
List
<
RoleModel
>
roleModelList
);
String
getPlanBatchNo
();
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanVisual3dService.java
View file @
309750f6
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.ContingencyPlanInstanceVO
;
import
com.yeejoin.amos.fas.business.vo.MessageVO
;
import
com.yeejoin.amos.fas.business.vo.PlanStepVo
;
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.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyInstanceInfo
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
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
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
java.util.List
;
import
java.util.List
;
...
@@ -31,6 +26,7 @@ public interface IPlanVisual3dService {
...
@@ -31,6 +26,7 @@ public interface IPlanVisual3dService {
/**
/**
* 上传文字预案
* 上传文字预案
*
* @param appId 预案ID
* @param appId 预案ID
* @param pathNameMap 文字预案文件路径:文件名称map
* @param pathNameMap 文字预案文件路径:文件名称map
*/
*/
...
@@ -46,9 +42,9 @@ public interface IPlanVisual3dService {
...
@@ -46,9 +42,9 @@ public interface IPlanVisual3dService {
CommonResponse
getResourceListByType
(
String
type
);
CommonResponse
getResourceListByType
(
String
type
);
List
<
Map
<
String
,
Object
>>
getResourceById
(
String
type
,
Long
id
);
List
<
Map
<
String
,
Object
>>
getResourceById
(
String
type
,
Long
id
);
List
<
Map
<
String
,
Object
>>
getResourceTypeList
();
List
<
Map
<
String
,
Object
>>
getResourceTypeList
();
List
<
TreeSubjectVo
>
getTextPlanBySubjectId
(
String
appId
);
List
<
TreeSubjectVo
>
getTextPlanBySubjectId
(
String
appId
);
...
@@ -67,8 +63,10 @@ public interface IPlanVisual3dService {
...
@@ -67,8 +63,10 @@ public interface IPlanVisual3dService {
*/
*/
String
getLastBatchNo
();
String
getLastBatchNo
();
/**
/**
* 根据批次号获取预案步骤
* 根据批次号获取预案步骤
*
* @param batchNo 批次号
* @param batchNo 批次号
* @return 预案步骤
* @return 预案步骤
*/
*/
...
@@ -76,6 +74,7 @@ public interface IPlanVisual3dService {
...
@@ -76,6 +74,7 @@ public interface IPlanVisual3dService {
/**
/**
* 根据批次号获取预案记录
* 根据批次号获取预案记录
*
* @param batchNo 批次号
* @param batchNo 批次号
* @return 预案记录
* @return 预案记录
*/
*/
...
@@ -83,6 +82,7 @@ public interface IPlanVisual3dService {
...
@@ -83,6 +82,7 @@ public interface IPlanVisual3dService {
/**
/**
* 根据批次号获取预案记录
* 根据批次号获取预案记录
*
* @param batchNo 批次号
* @param batchNo 批次号
* @return 预案记录
* @return 预案记录
*/
*/
...
@@ -90,25 +90,34 @@ public interface IPlanVisual3dService {
...
@@ -90,25 +90,34 @@ public interface IPlanVisual3dService {
PlanStepVo
updatePlanStep
(
PlanStepVo
planStepVo
);
PlanStepVo
updatePlanStep
(
PlanStepVo
planStepVo
);
ContingencyInstanceInfo
selectDisposalDetails
(
String
disposalId
);
Page
<
ContingencyPlanInstanceVO
>
selectDisposalActionPage
(
int
current
,
int
size
,
String
batchNo
,
List
<
RoleModel
>
roleModelList
,
int
dataType
);
Page
<
ContingencyInstanceInfo
>
selectDisposalListPage
(
int
current
,
int
size
,
String
orgCode
);
Boolean
addDisposalDetails
(
ContingencyInstanceInfo
contingencyInstanceInfo
);
Boolean
updateDisposalDetails
(
ContingencyInstanceInfo
contingencyInstanceInfo
);
Page
<
ContingencyPlanInstance
>
selectDisposalActionPage
(
int
current
,
int
size
,
String
disposalId
,
List
<
RoleModel
>
roleModelList
,
int
dataType
);
/**
/**
* 根据批次号获取预案的消息等记录
* 根据批次号获取预案的消息等记录
*
* @param batchNo
* @param batchNo
* @return
* @return
*/
*/
Page
<
ContingencyPlanInstance
>
getPlaneRecordByNew
(
Integer
pageNum
,
Integer
size
,
String
batchNo
);
Page
<
ContingencyPlanInstanceVO
>
getPlaneRecordByNew
(
Integer
pageNum
,
Integer
size
,
String
batchNo
,
AgencyUserModel
user
);
ContingencyPlanInstance
replyMessage
(
AgencyUserModel
user
,
ContingencyPlanInstance
dto
);
List
<
ContingencyPlanInstanceVO
>
selectDisposalActionList
(
String
batchNo
,
List
<
RoleModel
>
roleModelList
,
int
dataType
);
void
replyMessage
(
AgencyUserModel
user
,
ContingencyPlanInstance
dto
);
/**
* 极光推送消息
*
* @param buttonCode
* @param messageVO
*/
void
sendMessage
(
String
buttonCode
,
MessageVO
messageVO
);
List
<
ContingencyPlanInstance
>
selectDisposalActionList
(
String
disposalId
,
List
<
RoleModel
>
roleModelList
,
int
dataType
);
/**
* 修改动作执行状态
*
* @param id
* @return
*/
boolean
updateStatusById
(
String
id
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IRiskSourceService.java
View file @
309750f6
...
@@ -220,4 +220,6 @@ public interface IRiskSourceService {
...
@@ -220,4 +220,6 @@ public interface IRiskSourceService {
void
processProtalDataFromDanger
(
DangerResultBo
dangerResultBo
)
throws
Exception
;
void
processProtalDataFromDanger
(
DangerResultBo
dangerResultBo
)
throws
Exception
;
RiskSource
updateAreaSyn
(
String
code
,
String
compCode
,
RiskSourceSynBo
synBo
);
RiskSource
updateAreaSyn
(
String
code
,
String
compCode
,
RiskSourceSynBo
synBo
);
Page
<
Map
<
String
,
Object
>>
getWaterInfo
(
CommonPageable
commonPageable
,
String
bizOrgCode
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/ButtonJsonVO.java
0 → 100644
View file @
309750f6
package
com
.
yeejoin
.
amos
.
fas
.
business
.
vo
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.Map
;
@Data
public
class
ButtonJsonVO
{
String
type
;
String
stepCode
;
List
<
Map
<
String
,
Object
>>
operate
;
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/ContingencyInstanceInfoVO.java
0 → 100644
View file @
309750f6
package
com
.
yeejoin
.
amos
.
fas
.
business
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
java.util.Date
;
@Data
@ApiModel
(
value
=
"应急预案执行记录实例"
,
description
=
"应急预案执行记录实例"
)
public
class
ContingencyInstanceInfoVO
{
private
String
id
;
private
String
name
;
private
String
position
;
private
String
equipmentCode
;
private
String
equipmentName
;
private
Date
startTime
;
private
Date
endTime
;
private
Boolean
isDelete
=
false
;
private
Date
createDate
;
private
String
orgCode
;
private
String
duration
;
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/ContingencyPlanInstanceVO.java
0 → 100644
View file @
309750f6
package
com
.
yeejoin
.
amos
.
fas
.
business
.
vo
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
ContingencyPlanInstanceVO
{
protected
String
id
;
private
String
recordType
;
// 记录类型:消息MESSAGE,操作OPERATE ,回复消息REPLYMESSAGE
private
String
content
;
// 记录内容:文本信息或者json数据
private
String
category
;
//一级分类
private
String
icon
;
//图标,url,或者文件名
private
Integer
sort
;
// 所有节点一起的排序号
private
String
sequenceNum
;
// 用于显示的序号
private
String
batchNo
;
// 预案实例编号,暂时无法区分多个火灾,暂时存储报警设备id
private
String
tips
;
private
Boolean
runstate
;
private
String
filePath
;
//文件名称
private
String
fileType
;
// 文件类型
private
String
roleName
;
//角色名称
private
String
roleCode
;
//角色编码
private
String
startUserName
;
//人员名称
private
String
startUserId
;
//人员ID
private
String
personImg
;
private
String
playImg
;
private
String
loginUserId
;
private
String
name
;
private
Date
createDate
;
private
String
createUser
;
private
Date
updateDate
;
private
String
updateUser
;
private
Boolean
isDelete
=
false
;
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/EquipmentSpecificForRiskVo.java
View file @
309750f6
...
@@ -29,6 +29,9 @@ public class EquipmentSpecificForRiskVo {
...
@@ -29,6 +29,9 @@ public class EquipmentSpecificForRiskVo {
@ApiModelProperty
(
value
=
"detailid"
)
@ApiModelProperty
(
value
=
"detailid"
)
private
Long
equipmentDetailId
;
private
Long
equipmentDetailId
;
@ApiModelProperty
(
value
=
"warehouseStructureId"
)
private
Long
warehouseStructureId
;
@ApiModelProperty
(
value
=
"二维码"
)
@ApiModelProperty
(
value
=
"二维码"
)
private
String
qrCode
;
private
String
qrCode
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/MessageVO.java
0 → 100644
View file @
309750f6
package
com
.
yeejoin
.
amos
.
fas
.
business
.
vo
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
MessageVO
{
/**
* 接收人ids
*/
private
List
<
String
>
recivers
;
/**
* 关联id
*/
private
String
relationId
;
private
String
title
;
private
String
body
;
/**
* 任务 0 通知 1
*/
private
Integer
category
;
private
String
msgType
;
private
String
terminal
;
private
Boolean
isRead
;
private
Boolean
isSendApp
;
private
Boolean
isSendWeb
;
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/PlanStepJsonVO.java
0 → 100644
View file @
309750f6
package
com
.
yeejoin
.
amos
.
fas
.
business
.
vo
;
import
lombok.Data
;
@Data
public
class
PlanStepJsonVO
{
private
String
stepCode
;
private
String
stepName
;
private
String
stepStatus
;
private
String
isParallel
;
private
String
roleCode
;
private
String
buttonCode
;
}
YeeAmosFireAutoSysStart/src/main/resources/application-dev.properties
View file @
309750f6
...
@@ -57,6 +57,13 @@ emqx.password=public
...
@@ -57,6 +57,13 @@ emqx.password=public
#文件服务器地址
#文件服务器地址
file.downLoad.url
=
http://172.16.11.201:9000/
file.downLoad.url
=
http://172.16.11.201:9000/
#应急处置移动端默认头像地址
plan.instance.personImg
=
upload/3dview_icon/plan_via.png
plan.instance.playImg
=
upload/3dview_icon/plan_play.png
#应急预案动作执行默认角色编码
plan.default.roleCode
=
Digital_Responsing_Plan_A
# 是否使用rocketmq on/off
# 是否使用rocketmq on/off
rocketmq.producer.sysIsUsed
=
off
rocketmq.producer.sysIsUsed
=
off
#rocketmq生产者配置
#rocketmq生产者配置
...
@@ -104,3 +111,22 @@ sso.client.secret=6t5oDDKhEODXa++UNUxxLHSF5kVqECq6j+wahtCbv8c=
...
@@ -104,3 +111,22 @@ sso.client.secret=6t5oDDKhEODXa++UNUxxLHSF5kVqECq6j+wahtCbv8c=
sso.login.type
=
server_auth
sso.login.type
=
server_auth
sso.login.client
=
dce
sso.login.client
=
dce
sso.client.url
=
https://198.87.103.88:30443/oauth2/oauth/rest_token
sso.client.url
=
https://198.87.103.88:30443/oauth2/oauth/rest_token
#Kafka 相关配置
kafka.producer.sysIsUsed
=
on
spring.kafka.bootstrap-servers
=
172.16.3.51:9092
###########【初始化生产者配置】###########
# 重试次数
spring.kafka.producer.retries
=
0
# 应答级别:多少个分区副本备份完成时向生产者发送ack确认(可选0、1、all/-1)
spring.kafka.producer.acks
=
1
# 批量大小
spring.kafka.producer.batch-size
=
16384
# 提交延时
spring.kafka.producer.properties.linger.ms
=
0
# 生产端缓冲区大小
spring.kafka.producer.buffer-memory
=
33554432
# Kafka提供的序列化和反序列化类
spring.kafka.producer.key-serializer
=
org.apache.kafka.common.serialization.StringSerializer
spring.kafka.producer.value-serializer
=
org.apache.kafka.common.serialization.StringSerializer
YeeAmosFireAutoSysStart/src/main/resources/application.properties
View file @
309750f6
...
@@ -62,6 +62,8 @@ number.plan.projectName=换流站消防专项预案
...
@@ -62,6 +62,8 @@ number.plan.projectName=换流站消防专项预案
#站端名称使用全拼 与三维iotree 消息用到了,暂时统一设置为yinan
#站端名称使用全拼 与三维iotree 消息用到了,暂时统一设置为yinan
station.name
=
yinan
station.name
=
yinan
#极光推送开关
aurora.push.switch
=
false
param.safetyIndexChange.cron
=
0 0 2 * * ?
param.safetyIndexChange.cron
=
0 0 2 * * ?
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
View file @
309750f6
...
@@ -746,13 +746,13 @@
...
@@ -746,13 +746,13 @@
ALTER TABLE `toip_rm_snapshot` MODIFY COLUMN `method_param` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '方法参数' AFTER `equipment_id`;
ALTER TABLE `toip_rm_snapshot` MODIFY COLUMN `method_param` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '方法参数' AFTER `equipment_id`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"gaojianqiang"
id=
"202210
17
-01"
>
<changeSet
author=
"gaojianqiang"
id=
"202210
28
-01"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<columnExists
tableName=
"c_plan_rule"
columnName=
"plan_step"
/>
<columnExists
tableName=
"c_plan_rule"
columnName=
"plan_step"
/>
</preConditions>
</preConditions>
<comment>
修改属性字段值 plan_step
</comment>
<comment>
修改属性字段值 plan_step
</comment>
<sql>
<sql>
UPDATE c_plan_rule SET plan_step = '[{"
stepCode": "0", "stepName": "确认灾情", "buttonCode": "FIRE_CONFIRM", "isParallel": "1", "stepStatus": "0"}, {"stepCode": "1", "stepName": "停运换流阀", "buttonCode": "STOP_COMMUTATION", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "2", "stepName": "拨打报警电话", "buttonCode": "CALL_PHONE", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "3", "stepName": "确认油枕排油系统已开启", "buttonCode": "DRAIN_OIL_CONFIRM", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "4", "stepName": "确认水喷雾系统已开启", "buttonCode": "OPEN_WATERSYSTEM", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "5", "stepName": "断开上级电源", "buttonCode": "OFF_POWER", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "6", "stepName": "停运阀厅空调系统", "buttonCode": "STOP_AIRCON", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "7", "stepName": "一键开启消防炮", "buttonCode": "MONITOR_START", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "8", "stepName": "驻站消防队指挥权交接", "buttonCode": "HANDOVER_COMMAND", "isParallel": "1", "stepStatus": "0"}, {"stepCode": "9", "stepName": "确认本体排油已开启", "buttonCode": "OWNER_DRAIN_OIL", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "10", "stepName": "启动阀厅应急预案", "buttonCode": "START_VALVE_HALL_CONTINGENCY", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "11", "stepName": "电缆沟封堵", "buttonCode": "PLUG_CABLETRENCH", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "12", "stepName": "政府消防队指挥权交接", "buttonCode": "HANDOVER_FIGTHHING", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "13", "stepName": "确认明火扑灭", "buttonCode": "FIRE_EXTINCT", "isParallel": "0", "stepStatus": "0"}, {
"stepCode": "14", "stepName": "应急处置结束", "buttonCode": "END_EMERGENCY", "isParallel": "1", "stepStatus": "0"}]';
UPDATE c_plan_rule SET plan_step = '[{"
roleCode": "Digital_Responsing_Plan_A", "stepCode": "0", "stepName": "确认灾情", "buttonCode": "FIRE_CONFIRM", "isParallel": "1", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "1", "stepName": "停运换流阀", "buttonCode": "STOP_COMMUTATION", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "2", "stepName": "拨打报警电话", "buttonCode": "CALL_PHONE", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "3", "stepName": "确认油枕排油系统已开启", "buttonCode": "DRAIN_OIL_CONFIRM", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "4", "stepName": "确认水喷雾系统已开启", "buttonCode": "OPEN_WATERSYSTEM", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "5", "stepName": "断开上级电源", "buttonCode": "OFF_POWER", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "6", "stepName": "停运阀厅空调系统", "buttonCode": "STOP_AIRCON", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "7", "stepName": "一键开启消防炮", "buttonCode": "MONITOR_START", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B", "stepCode": "8", "stepName": "驻站消防队指挥权交接", "buttonCode": "HANDOVER_COMMAND", "isParallel": "1", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B", "stepCode": "9", "stepName": "确认本体排油已开启", "buttonCode": "OWNER_DRAIN_OIL", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B", "stepCode": "10", "stepName": "启动阀厅应急预案", "buttonCode": "START_VALVE_HALL_CONTINGENCY", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B", "stepCode": "11", "stepName": "电缆沟封堵", "buttonCode": "PLUG_CABLETRENCH", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B", "stepCode": "12", "stepName": "政府消防队指挥权交接", "buttonCode": "HANDOVER_FIGTHHING", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B", "stepCode": "13", "stepName": "确认明火扑灭", "buttonCode": "FIRE_EXTINCT", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B",
"stepCode": "14", "stepName": "应急处置结束", "buttonCode": "END_EMERGENCY", "isParallel": "1", "stepStatus": "0"}]';
</sql>
</sql>
</changeSet>
</changeSet>
...
@@ -811,4 +811,14 @@
...
@@ -811,4 +811,14 @@
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '应急预案执行记录实例' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '应急预案执行记录实例' ROW_FORMAT = Dynamic;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"gaojianqiang"
id=
"20221026-01"
>
<preConditions
onFail=
"MARK_RAN"
>
<columnExists
tableName=
"contingency_plan_instance"
columnName=
"update_date"
/>
</preConditions>
<comment>
修改属性字段 update_date
</comment>
<sql>
ALTER TABLE `contingency_plan_instance`
MODIFY COLUMN `update_date` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) AFTER `create_user`;
</sql>
</changeSet>
</databaseChangeLog>
</databaseChangeLog>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/ContingencyInstanceInfoMapper.xml
View file @
309750f6
...
@@ -20,11 +20,11 @@
...
@@ -20,11 +20,11 @@
</update>
</update>
<select
id=
"selectDisposalDetails"
resultType=
"com.yeejoin.amos.fas.
dao.entity.ContingencyInstanceInfo
"
>
<select
id=
"selectDisposalDetails"
resultType=
"com.yeejoin.amos.fas.
business.vo.ContingencyInstanceInfoVO
"
>
select * from contingency_instance_info where id=#{id}
select * from contingency_instance_info where id=#{id}
</select>
</select>
<select
id=
"selectDisposalListPage"
resultType=
"com.yeejoin.amos.fas.
dao.entity.ContingencyInstanceInfo
"
>
<select
id=
"selectDisposalListPage"
resultType=
"com.yeejoin.amos.fas.
business.vo.ContingencyInstanceInfoVO
"
>
select * from contingency_instance_info where is_delete = 0
select * from contingency_instance_info where is_delete = 0
and org_code = #{orgCode}
and org_code = #{orgCode}
ORDER BY create_date DESC
ORDER BY create_date DESC
...
@@ -34,25 +34,34 @@
...
@@ -34,25 +34,34 @@
select count(1) from contingency_instance_info
select count(1) from contingency_instance_info
where is_delete = 0 and org_code = #{orgCode}
where is_delete = 0 and org_code = #{orgCode}
</select>
</select>
<select
id=
"selectDisposalActionPage"
resultType=
"com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance"
>
<select
id=
"selectDisposalActionPage"
resultType=
"com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO"
>
select * from contingency_plan_instance
select cpi.id, cpi.`record_type`, cpi.`category`, cpi.`content`, cpi.`icon`, cpi.`sort`, cpi.`sequence_num`
, cpi.`batch_no`, cpi.`create_date`, cpi.`create_user`, cpi.`update_date`
, cpi.`update_user`, cpi.`is_delete`, cpi.`tips`, IFNULL(cpi.`runstate`, 0) AS runstate, cpi.`file_path`
, `file_type`, `role_name`, `role_code`, `start_user_name`
, cpi.`start_user_id`, cpi.`person_img`,cii.name
from contingency_plan_instance cpi left join contingency_instance_info cii
on cpi.batch_no = cii.id
<where>
<where>
<if
test=
"batchNo != null and batchNo != ''"
>
<if
test=
"batchNo != null and batchNo != ''"
>
batch_no = #{batchNo}
cpi.
batch_no = #{batchNo}
</if>
</if>
<if
test=
"type != null and type != ''"
>
<if
test=
"type != null and type != ''"
>
and
record_type = #{type}
and cpi.
record_type = #{type}
</if>
</if>
<if
test=
"status != null and status != ''"
>
<if
test=
"status != null and status != ''"
>
and runstate = #{status}
and cpi.runstate is null
</if>
</if>
<if
test=
"list != null and list.size() >0"
>
<if
test=
"list != null and list.size() >0"
>
<foreach
collection=
"list"
item=
"role"
index=
"index"
open=
"and ("
close=
") "
separator=
"or"
>
<foreach
collection=
"list"
item=
"role"
index=
"index"
open=
"and ("
close=
") "
separator=
"or"
>
role_code like concat('%',#{role},'%')
cpi.
role_code like concat('%',#{role},'%')
</foreach>
</foreach>
</if>
</if>
</where>
</where>
order by cpi.`create_date`
LIMIT #{current}, #{size}
LIMIT #{current}, #{size}
</select>
</select>
<select
id=
"selectCountDisposalActionPage"
resultType=
"java.lang.Integer"
>
<select
id=
"selectCountDisposalActionPage"
resultType=
"java.lang.Integer"
>
...
@@ -65,7 +74,7 @@
...
@@ -65,7 +74,7 @@
and record_type = #{type}
and record_type = #{type}
</if>
</if>
<if
test=
"status != null and status != ''"
>
<if
test=
"status != null and status != ''"
>
and runstate
= #{status}
and runstate
is null
</if>
</if>
<if
test=
"list != null and list.size() >0"
>
<if
test=
"list != null and list.size() >0"
>
...
@@ -76,25 +85,32 @@
...
@@ -76,25 +85,32 @@
</where>
</where>
</select>
</select>
<select
id=
"selectDisposalActionList"
resultType=
"com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance"
>
<select
id=
"selectDisposalActionList"
resultType=
"com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO"
>
select * from contingency_plan_instance
select cpi.id, cpi.`record_type`, cpi.`category`, cpi.`content`, cpi.`icon`, cpi.`sort`, cpi.`sequence_num`
, cpi.`batch_no`, cpi.`create_date`, cpi.`create_user`, cpi.`update_date`
, cpi.`update_user`, cpi.`is_delete`, cpi.`tips`, IFNULL(cpi.`runstate`, 0) AS runstate, cpi.`file_path`
, `file_type`, `role_name`, `role_code`, `start_user_name`
, cpi.`start_user_id`, cpi.`person_img`,cii.name
from contingency_plan_instance cpi left join contingency_instance_info cii
on cpi.batch_no = cii.id
<where>
<where>
<if
test=
"batchNo != null and batchNo != ''"
>
<if
test=
"batchNo != null and batchNo != ''"
>
batch_no = #{batchNo}
cpi.
batch_no = #{batchNo}
</if>
</if>
<if
test=
"type != null and type != ''"
>
<if
test=
"type != null and type != ''"
>
and record_type = #{type}
and
cpi.
record_type = #{type}
</if>
</if>
<if
test=
"status != null and status != ''"
>
<if
test=
"status != null and status != ''"
>
and
runstate = #{status}
and
cpi.runstate is null
</if>
</if>
<if
test=
"list != null and list.size() >0"
>
<if
test=
"list != null and list.size() >0"
>
<foreach
collection=
"list"
item=
"role"
index=
"index"
open=
"and ("
close=
") "
separator=
"or"
>
<foreach
collection=
"list"
item=
"role"
index=
"index"
open=
"and ("
close=
") "
separator=
"or"
>
role_code like concat('%',#{role},'%')
cpi.
role_code like concat('%',#{role},'%')
</foreach>
</foreach>
</if>
</if>
</where>
</where>
order by cpi.`create_date`
</select>
</select>
</mapper>
</mapper>
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/ContingencyPlanInstanceMapper.xml
View file @
309750f6
This diff is collapsed.
Click to expand it.
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/WarehouseStructureMapper.xml
0 → 100644
View file @
309750f6
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.WarehouseStructureMapper"
>
<select
id=
"getMessageById"
resultType=
"com.yeejoin.amos.fas.dao.entity.WarehouseStructure"
>
select * from wl_warehouse_structure where id = #{id}
</select>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_equipment_specific.xml
View file @
309750f6
...
@@ -220,6 +220,7 @@
...
@@ -220,6 +220,7 @@
wes.code as code,
wes.code as code,
wes.org_code as orgCode,
wes.org_code as orgCode,
wes.equipment_code as equipmentCode,
wes.equipment_code as equipmentCode,
wes.warehouse_structure_id,
IF(substr(wes.equipment_code ,1,4) = '9204','true','false') as push3D
IF(substr(wes.equipment_code ,1,4) = '9204','true','false') as push3D
from
from
wl_equipment_specific wes
wl_equipment_specific wes
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_impt_equip.xml
View file @
309750f6
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
<if
test=
"name !=null and name != ''"
>
and (eq.name like concat(concat("%",#{name}),"%") or eq.code like concat(concat("%",#{name}),"%"))
</if>
<if
test=
"name !=null and name != ''"
>
and (eq.name like concat(concat("%",#{name}),"%") or eq.code like concat(concat("%",#{name}),"%"))
</if>
<if
test=
"id != null and id != ''"
>
and eq.id = #{id}
</if>
<if
test=
"id != null and id != ''"
>
and eq.id = #{id}
</if>
</trim>
</trim>
order by eq.id
order by eq.id
desc
<choose>
<choose>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
...
...
YeeAmosFireAutoSysStart/src/main/resources/json/plan-step.json
View file @
309750f6
...
@@ -117,6 +117,6 @@
...
@@ -117,6 +117,6 @@
"stepStatus"
:
"0"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"END_EMERGENCY"
,
"buttonCode"
:
"END_EMERGENCY"
,
"isParallel"
:
"1"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_
C
"
"roleCode"
:
"Digital_Responsing_Plan_
B
"
}
}
]
]
\ 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