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
c276a15e
Commit
c276a15e
authored
May 10, 2024
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化Autosys服务及解决潜在bug
parent
5ed1e91d
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
233 additions
and
48 deletions
+233
-48
PlanStepJsonVO.java
...ain/java/com/yeejoin/amos/fas/dao/dto/PlanStepJsonVO.java
+54
-0
PlanStepTree.java
...in/java/com/yeejoin/amos/fas/dao/entity/PlanStepTree.java
+34
-0
ContingencyPlanController.java
...os/fas/business/controller/ContingencyPlanController.java
+10
-2
EmergencyTaskController.java
...amos/fas/business/controller/EmergencyTaskController.java
+7
-2
PlanVisual3dController.java
.../amos/fas/business/controller/PlanVisual3dController.java
+27
-0
ContingencyInstanceInfoMapper.java
...as/business/dao/mapper/ContingencyInstanceInfoMapper.java
+2
-2
EmergencyTaskRoleMapper.java
...amos/fas/business/dao/mapper/EmergencyTaskRoleMapper.java
+2
-0
ContingencyInstanceImpl.java
...os/fas/business/service/impl/ContingencyInstanceImpl.java
+17
-17
ContingencyPlanServiceImpl.java
...fas/business/service/impl/ContingencyPlanServiceImpl.java
+3
-3
EmergencyTaskServiceImpl.java
...s/fas/business/service/impl/EmergencyTaskServiceImpl.java
+1
-1
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+8
-0
IContingencyPlanService.java
...s/fas/business/service/intfc/IContingencyPlanService.java
+1
-1
IPlanVisual3dService.java
...amos/fas/business/service/intfc/IPlanVisual3dService.java
+4
-4
ContingencyInstanceInfoMapper.xml
...ain/resources/db/mapper/ContingencyInstanceInfoMapper.xml
+20
-0
EmergencyTaskRoleMapper.xml
.../src/main/resources/db/mapper/EmergencyTaskRoleMapper.xml
+14
-0
dbTemplate_emergency_task.xml
...rc/main/resources/db/mapper/dbTemplate_emergency_task.xml
+1
-2
plan-step.json
...osFireAutoSysStart/src/main/resources/json/plan-step.json
+28
-14
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/dto/PlanStepJsonVO.java
0 → 100644
View file @
c276a15e
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
dto
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
PlanStepJsonVO
{
private
String
stepCode
;
private
String
stepName
;
private
String
stepStatus
;
/**
* 是否并行,用于卡片展示;1:是,0:否
*/
private
String
isParallel
;
private
String
roleCode
;
private
String
buttonCode
;
private
String
batchNo
;
private
String
caseId
;
private
String
buttonJson
;
private
String
time
=
""
;
/**
* 进度条标识
*/
private
boolean
showLine
=
false
;
/**
* 1:是,0:否
*/
private
String
checkYesOrNo
=
""
;
/**
* 进度索引
*/
private
Integer
index
;
/**
* 节点物联设备指标之间关系
*/
private
String
inAndOr
;
/**
* 节点物联设备之间关系
*/
private
String
outAndOr
;
/**
* 是否自动执行;1自动,0非自动
*/
private
Integer
isAuto
;
}
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/PlanStepTree.java
0 → 100644
View file @
c276a15e
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
com.yeejoin.amos.fas.dao.dto.PlanStepJsonVO
;
import
lombok.Data
;
import
java.util.ArrayList
;
import
java.util.List
;
@Data
public
class
PlanStepTree
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
sequenceNbr
;
//职责id
private
Long
obligationId
;
//人员名称
private
String
name
;
private
String
stepName
;
//子级
private
List
<
PlanStepJsonVO
>
children
=
new
ArrayList
<>();
//树节点展示标识
private
String
type
;
private
String
code
;
private
Integer
index
;
}
\ No newline at end of file
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/ContingencyPlanController.java
View file @
c276a15e
...
@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.*;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
java.util.stream.Collectors
;
@RestController
@RestController
@RequestMapping
(
"/api/contingencyPlan"
)
@RequestMapping
(
"/api/contingencyPlan"
)
...
@@ -283,7 +284,8 @@ public class ContingencyPlanController extends BaseController {
...
@@ -283,7 +284,8 @@ public class ContingencyPlanController extends BaseController {
@RequestParam
(
value
=
"batchNo"
,
required
=
false
)
String
batchNo
,
@RequestParam
(
value
=
"batchNo"
,
required
=
false
)
String
batchNo
,
@RequestParam
(
value
=
"runState"
,
required
=
false
)
String
runState
,
@RequestParam
(
value
=
"runState"
,
required
=
false
)
String
runState
,
@RequestParam
(
value
=
"updateDate"
,
required
=
false
)
String
updateDate
,
@RequestParam
(
value
=
"updateDate"
,
required
=
false
)
String
updateDate
,
@RequestParam
(
value
=
"roleName"
,
required
=
false
)
String
roleName
@RequestParam
(
value
=
"roleName"
,
required
=
false
)
String
roleName
,
@RequestParam
(
value
=
"stepCode"
,
required
=
false
)
String
stepCode
)
{
)
{
if
(
current
<
1
||
size
<
1
)
{
if
(
current
<
1
||
size
<
1
)
{
throw
new
YeeException
(
"分页参数有误"
);
throw
new
YeeException
(
"分页参数有误"
);
...
@@ -293,7 +295,13 @@ public class ContingencyPlanController extends BaseController {
...
@@ -293,7 +295,13 @@ public class ContingencyPlanController extends BaseController {
String
[]
ids
=
new
String
(
roleName
).
split
(
","
);
String
[]
ids
=
new
String
(
roleName
).
split
(
","
);
list
=
Arrays
.
asList
(
ids
);
list
=
Arrays
.
asList
(
ids
);
}
}
return
CommonResponseUtil2
.
success
(
contingencyPlanService
.
selectTaskActionPage
(
current
,
size
,
batchNo
,
runState
,
updateDate
,
list
));
List
<
String
>
steps
=
new
ArrayList
<>();
if
(!
StringUtils
.
isEmpty
(
stepCode
))
{
String
[]
codes
=
new
String
(
stepCode
).
split
(
","
);
steps
=
Arrays
.
asList
(
codes
);
steps
=
steps
.
stream
().
map
(
x
->
String
.
valueOf
(
Integer
.
valueOf
(
x
)
-
1
)).
collect
(
Collectors
.
toList
());
}
return
CommonResponseUtil2
.
success
(
contingencyPlanService
.
selectTaskActionPage
(
current
,
size
,
batchNo
,
runState
,
updateDate
,
list
,
steps
));
}
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/EmergencyTaskController.java
View file @
c276a15e
...
@@ -62,12 +62,17 @@ public class EmergencyTaskController extends BaseController{
...
@@ -62,12 +62,17 @@ public class EmergencyTaskController extends BaseController{
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"岗位人员树"
,
notes
=
"岗位人员树"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"岗位人员树"
,
notes
=
"岗位人员树"
)
@RequestMapping
(
value
=
"/tree"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/tree"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
tree
(){
public
CommonResponse
tree
(
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
){
Dict
dict
=
new
Dict
();
Dict
dict
=
new
Dict
();
dict
.
setDictCode
(
"YJZC"
);
dict
.
setDictCode
(
"YJZC"
);
//查询应急角色
//查询应急角色
// List<Dict> dictList = dictService.getDictList(dict);
// List<Dict> dictList = dictService.getDictList(dict);
List
<
EmergencyTaskRole
>
emergencyTaskRoles
=
emergencyTaskRoleMapper
.
selectList
();
List
<
EmergencyTaskRole
>
emergencyTaskRoles
=
new
ArrayList
<>();
if
(
StringUtils
.
isNotEmpty
(
type
))
{
emergencyTaskRoles
=
emergencyTaskRoleMapper
.
selectListFilterEmptyTask
();
}
else
{
emergencyTaskRoles
=
emergencyTaskRoleMapper
.
selectList
();
}
List
<
EmergencyRelationTree
>
list
=
new
ArrayList
<>();
List
<
EmergencyRelationTree
>
list
=
new
ArrayList
<>();
List
<
EmergencyRelationTree
>
root
=
new
ArrayList
<>();
List
<
EmergencyRelationTree
>
root
=
new
ArrayList
<>();
List
<
EmergencyRelationTree
>
treeNodes
=
iEmergencyTaskService
.
treeList
();
List
<
EmergencyRelationTree
>
treeNodes
=
iEmergencyTaskService
.
treeList
();
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/PlanVisual3dController.java
View file @
c276a15e
...
@@ -10,7 +10,9 @@ import com.yeejoin.amos.fas.core.util.CommonResponse;
...
@@ -10,7 +10,9 @@ 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.CommonResponseUtil2
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil2
;
import
com.yeejoin.amos.fas.core.util.ResponseModel
;
import
com.yeejoin.amos.fas.core.util.ResponseModel
;
import
com.yeejoin.amos.fas.dao.dto.PlanStepJsonVO
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.PlanStepTree
;
import
com.yeejoin.amos.fas.dao.entity.TextPlan
;
import
com.yeejoin.amos.fas.dao.entity.TextPlan
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
...
@@ -30,6 +32,7 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -30,6 +32,7 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.*
;
import
java.io.*
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@RestController
@RestController
@RequestMapping
(
value
=
"/api/visual"
)
@RequestMapping
(
value
=
"/api/visual"
)
...
@@ -165,6 +168,30 @@ public class PlanVisual3dController extends BaseController {
...
@@ -165,6 +168,30 @@ public class PlanVisual3dController extends BaseController {
}
}
@Permission
@Permission
@ApiOperation
(
value
=
"根据批次号获取预案的步骤"
,
notes
=
"根据批次号获取预案的步骤"
)
@GetMapping
(
value
=
"/plan/step/tree"
)
public
ResponseModel
getPlanStepTree
(
@RequestParam
(
value
=
"batchNo"
,
required
=
false
)
String
batchNo
)
{
if
(
StringUtils
.
isEmpty
(
batchNo
))
{
batchNo
=
planVisual3dService
.
getNewestBatchNo
();
}
List
<
PlanStepTree
>
root
=
new
ArrayList
<>();
List
<
PlanStepJsonVO
>
list
=
planVisual3dService
.
getPlanStepList
(
batchNo
);
list
.
stream
().
map
(
x
->
{
x
.
setIndex
(
x
.
getIndex
()
+
1
);
return
x
;}).
collect
(
Collectors
.
toList
());
//增加根节点
PlanStepTree
tree
=
new
PlanStepTree
();
tree
.
setId
(
0
);
tree
.
setIndex
(
0
);
tree
.
setSequenceNbr
(
"0"
);
tree
.
setName
(
"全部"
);
tree
.
setStepName
(
"全部"
);
tree
.
setType
(
"3"
);
tree
.
setCode
(
"0"
);
tree
.
setChildren
(
list
);
root
.
add
(
tree
);
return
CommonResponseUtil
.
successNew
(
root
);
}
@Permission
@ApiOperation
(
value
=
"根据批次号更新预案的步骤"
,
notes
=
"根据批次号更新预案的步骤"
)
@ApiOperation
(
value
=
"根据批次号更新预案的步骤"
,
notes
=
"根据批次号更新预案的步骤"
)
@PostMapping
(
value
=
"/plan/updatePlanStep"
)
@PostMapping
(
value
=
"/plan/updatePlanStep"
)
public
ResponseModel
updatePlanStep
(
@RequestBody
PlanStepVo
planStepVo
)
{
public
ResponseModel
updatePlanStep
(
@RequestBody
PlanStepVo
planStepVo
)
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/ContingencyInstanceInfoMapper.java
View file @
c276a15e
...
@@ -38,8 +38,8 @@ public interface ContingencyInstanceInfoMapper extends BaseMapper<ContingencyIns
...
@@ -38,8 +38,8 @@ public interface ContingencyInstanceInfoMapper extends BaseMapper<ContingencyIns
List
<
ContingencyPlanInstanceVO
>
getTaskActionList
(
@Param
(
"type"
)
String
type
,
@Param
(
"status"
)
String
status
,
@Param
(
"batchNo"
)
String
batchNo
);
List
<
ContingencyPlanInstanceVO
>
getTaskActionList
(
@Param
(
"type"
)
String
type
,
@Param
(
"status"
)
String
status
,
@Param
(
"batchNo"
)
String
batchNo
);
int
countTaskPage
(
@Param
(
"type"
)
String
type
,
@Param
(
"batchNo"
)
String
batchNo
,
@Param
(
"list"
)
List
<
String
>
roles
);
int
countTaskPage
(
@Param
(
"type"
)
String
type
,
@Param
(
"batchNo"
)
String
batchNo
,
@Param
(
"list"
)
List
<
String
>
roles
,
@Param
(
"steps"
)
List
<
String
>
steps
);
List
<
ContingencyPlanInstanceVO
>
getTaskActionPage
(
@Param
(
"current"
)
int
current
,
@Param
(
"size"
)
int
size
,
@Param
(
"batchNo"
)
String
batchNo
,
@Param
(
"type"
)
String
type
,
@Param
(
"runState"
)
String
runState
,
@Param
(
"updateDate"
)
String
updateDate
,
@Param
(
"list"
)
List
<
String
>
roles
);
List
<
ContingencyPlanInstanceVO
>
getTaskActionPage
(
@Param
(
"current"
)
int
current
,
@Param
(
"size"
)
int
size
,
@Param
(
"batchNo"
)
String
batchNo
,
@Param
(
"type"
)
String
type
,
@Param
(
"runState"
)
String
runState
,
@Param
(
"updateDate"
)
String
updateDate
,
@Param
(
"list"
)
List
<
String
>
roles
,
@Param
(
"steps"
)
List
<
String
>
steps
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/EmergencyTaskRoleMapper.java
View file @
c276a15e
...
@@ -32,5 +32,7 @@ public interface EmergencyTaskRoleMapper extends BaseMapper<EmergencyTaskRole> {
...
@@ -32,5 +32,7 @@ public interface EmergencyTaskRoleMapper extends BaseMapper<EmergencyTaskRole> {
List
<
EmergencyTaskRole
>
selectList
();
List
<
EmergencyTaskRole
>
selectList
();
List
<
EmergencyTaskRole
>
selectListFilterEmptyTask
();
String
getPlanStepInfoByType
(
@Param
(
"planType"
)
String
planType
);
String
getPlanStepInfoByType
(
@Param
(
"planType"
)
String
planType
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceImpl.java
View file @
c276a15e
...
@@ -455,12 +455,19 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -455,12 +455,19 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
@Override
@Override
public
Optional
<
Equipment
>
clickButton
(
String
batchNo
,
String
stepCode
,
String
buttonJson
,
String
contingencyPlanId
,
String
buttonCode
,
String
buttonState
,
String
stepStateOnbutton
,
String
isExecute
,
String
isAuto
,
String
token
,
String
product
,
String
appKey
,
String
startUserName
)
throws
Exception
{
public
Optional
<
Equipment
>
clickButton
(
String
batchNo
,
String
stepCode
,
String
buttonJson
,
String
contingencyPlanId
,
String
buttonCode
,
String
buttonState
,
String
stepStateOnbutton
,
String
isExecute
,
String
isAuto
,
String
token
,
String
product
,
String
appKey
,
String
startUserName
)
throws
Exception
{
if
(
"0"
.
equals
(
stepCode
))
{
String
planType
=
null
;
if
(
redisTemplate
.
hasKey
(
"planType"
))
{
planType
=
redisTemplate
.
boundValueOps
(
"planType"
).
get
(
0
,
-
1
);
}
// 此处逻辑修改为所有任务执行完成才会点亮节点
List
<
EmergencyTaskContentVo
>
tasks
=
emergencyTaskService
.
getMustTaskList
(
stepCode
,
planType
);
boolean
flag
=
judgeIfConfirmed
(
tasks
,
batchNo
);
if
(
"0"
.
equals
(
stepCode
)
&&
flag
)
{
contingencyInstance
.
fire
(
batchNo
,
stepCode
,
buttonJson
,
contingencyPlanId
,
contingencyInstance
.
fire
(
batchNo
,
stepCode
,
buttonJson
,
contingencyPlanId
,
"FIRE_CONFIRM"
,
buttonState
,
stepStateOnbutton
,
"true"
,
"false"
,
token
,
"FIRE_CONFIRM"
,
buttonState
,
stepStateOnbutton
,
"true"
,
"false"
,
token
,
product
,
appKey
,
startUserName
);
product
,
appKey
,
startUserName
);
}
}
ContingencyPlanInstance
instance
=
contingencyPlanInstanceMapper
.
getMessageById
(
contingencyPlanId
);
ContingencyPlanInstance
instance
=
contingencyPlanInstanceMapper
.
getMessageById
(
contingencyPlanId
);
instance
.
setId
(
null
);
instance
.
setId
(
null
);
instance
.
setRecordType
(
"REPLYMESSAGE"
);
instance
.
setRecordType
(
"REPLYMESSAGE"
);
...
@@ -468,12 +475,6 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -468,12 +475,6 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
instance
.
setContent
(
instance
.
getCategory
());
instance
.
setContent
(
instance
.
getCategory
());
ContingencyPlanInstance
res
=
repository
.
save
(
instance
);
ContingencyPlanInstance
res
=
repository
.
save
(
instance
);
if
(!
ObjectUtils
.
isEmpty
(
res
))
{
if
(!
ObjectUtils
.
isEmpty
(
res
))
{
String
planType
=
null
;
if
(
redisTemplate
.
hasKey
(
"planType"
))
{
planType
=
redisTemplate
.
boundValueOps
(
"planType"
).
get
(
0
,
-
1
);
}
List
<
EmergencyTaskContentVo
>
mustTasks
=
emergencyTaskService
.
getMustTaskList
(
stepCode
,
planType
);
boolean
flag
=
judgeIfConfirmed
(
mustTasks
,
batchNo
);
if
(!
"-1"
.
equals
(
stepCode
)
&&
flag
)
{
if
(!
"-1"
.
equals
(
stepCode
)
&&
flag
)
{
PlanExecuteVo
vo
=
new
PlanExecuteVo
();
PlanExecuteVo
vo
=
new
PlanExecuteVo
();
vo
.
setConfirm
(
buttonState
);
vo
.
setConfirm
(
buttonState
);
...
@@ -536,17 +537,16 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -536,17 +537,16 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
return
Optional
.
empty
();
return
Optional
.
empty
();
}
}
private
boolean
judgeIfConfirmed
(
List
<
EmergencyTaskContentVo
>
mustTasks
,
String
batchNo
)
{
private
boolean
judgeIfConfirmed
(
List
<
EmergencyTaskContentVo
>
tasks
,
String
batchNo
)
{
if
(
0
==
mustTasks
.
size
())
{
boolean
flag
=
Boolean
.
TRUE
;
return
true
;
if
(!
CollectionUtils
.
isEmpty
(
tasks
))
{
EmergencyTaskContentVo
contentVo
=
tasks
.
get
(
0
);
Integer
count
=
contingencyPlanInstanceMapper
.
getPlanInstanceByRunState
(
contentVo
.
getStepCode
(),
batchNo
);
if
(
0
!=
count
)
{
flag
=
Boolean
.
FALSE
;
}
}
EmergencyTaskContentVo
vo
=
mustTasks
.
get
(
0
);
Integer
count
=
contingencyPlanInstanceMapper
.
getPlanInstanceByRunState
(
vo
.
getStepCode
(),
batchNo
);
if
(
0
==
count
)
{
return
true
;
}
else
{
return
false
;
}
}
return
flag
;
}
}
@Autowired
@Autowired
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyPlanServiceImpl.java
View file @
c276a15e
...
@@ -871,11 +871,11 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -871,11 +871,11 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
}
}
@Override
@Override
public
Page
<
ContingencyPlanInstanceVO
>
selectTaskActionPage
(
int
current
,
int
size
,
String
batchNo
,
String
runState
,
String
updateDate
,
List
<
String
>
roleList
)
{
public
Page
<
ContingencyPlanInstanceVO
>
selectTaskActionPage
(
int
current
,
int
size
,
String
batchNo
,
String
runState
,
String
updateDate
,
List
<
String
>
roleList
,
List
<
String
>
steps
)
{
String
type
=
"TASKOPERATE"
;
String
type
=
"TASKOPERATE"
;
Page
<
ContingencyPlanInstanceVO
>
page
=
new
Page
<>(
current
,
size
);
Page
<
ContingencyPlanInstanceVO
>
page
=
new
Page
<>(
current
,
size
);
int
total
=
0
;
int
total
=
0
;
total
=
contingencyInstanceInfoMapper
.
countTaskPage
(
type
,
batchNo
,
roleList
);
total
=
contingencyInstanceInfoMapper
.
countTaskPage
(
type
,
batchNo
,
roleList
,
steps
);
long
start
=
(
page
.
getCurrent
()
-
1
)
*
page
.
getSize
();
long
start
=
(
page
.
getCurrent
()
-
1
)
*
page
.
getSize
();
if
(
total
==
0
)
{
if
(
total
==
0
)
{
page
.
setCurrent
(
1
);
page
.
setCurrent
(
1
);
...
@@ -884,7 +884,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -884,7 +884,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
page
.
setCurrent
(
1
);
page
.
setCurrent
(
1
);
start
=
0
;
start
=
0
;
}
}
List
<
ContingencyPlanInstanceVO
>
list
=
contingencyInstanceInfoMapper
.
getTaskActionPage
((
int
)
start
,
size
,
batchNo
,
type
,
runState
,
updateDate
,
roleList
);
List
<
ContingencyPlanInstanceVO
>
list
=
contingencyInstanceInfoMapper
.
getTaskActionPage
((
int
)
start
,
size
,
batchNo
,
type
,
runState
,
updateDate
,
roleList
,
steps
);
list
.
stream
().
forEach
(
e
->{
list
.
stream
().
forEach
(
e
->{
if
(
ObjectUtils
.
isEmpty
(
e
.
getCreateUser
()))
{
if
(
ObjectUtils
.
isEmpty
(
e
.
getCreateUser
()))
{
List
<
String
>
userName
=
planVisual3dService
.
getUserName
(
e
.
getRoleCode
());
List
<
String
>
userName
=
planVisual3dService
.
getUserName
(
e
.
getRoleCode
());
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/EmergencyTaskServiceImpl.java
View file @
c276a15e
...
@@ -170,7 +170,7 @@ public class EmergencyTaskServiceImpl implements IEmergencyTaskService {
...
@@ -170,7 +170,7 @@ public class EmergencyTaskServiceImpl implements IEmergencyTaskService {
contingencyPlanInstance
.
setTaskSort
(
taskNum
);
contingencyPlanInstance
.
setTaskSort
(
taskNum
);
contingencyPlanInstance
.
setStepCode
(
stepCode
);
contingencyPlanInstance
.
setStepCode
(
stepCode
);
contingencyPlanInstance
.
setContent
(
buttonJson
);
contingencyPlanInstance
.
setContent
(
buttonJson
);
contingencyPlanInstanceRepository
.
save
(
contingencyPlanInstance
);
contingencyPlanInstanceRepository
.
save
AndFlush
(
contingencyPlanInstance
);
if
(
"0"
.
equals
(
stepCode
))
{
if
(
"0"
.
equals
(
stepCode
))
{
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
c276a15e
...
@@ -25,6 +25,7 @@ import com.yeejoin.amos.fas.core.util.CommonResponse;
...
@@ -25,6 +25,7 @@ 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.ResponseModel
;
import
com.yeejoin.amos.fas.dao.entity.*
;
import
com.yeejoin.amos.fas.dao.entity.*
;
import
com.yeejoin.amos.fas.dao.dto.PlanStepJsonVO
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
...
@@ -277,6 +278,13 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -277,6 +278,13 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
}
}
@Override
@Override
public
List
<
PlanStepJsonVO
>
getPlanStepList
(
String
batchNo
)
{
String
json
=
planStepService
.
getPlanStep
();
List
<
PlanStepJsonVO
>
res
=
JSONObject
.
parseArray
(
json
,
PlanStepJsonVO
.
class
);
return
res
;
}
@Override
public
ToipResponse
getPlaneRecordByBatchNo
(
String
batchNo
)
{
public
ToipResponse
getPlaneRecordByBatchNo
(
String
batchNo
)
{
// 根据批次号获取预案记录
// 根据批次号获取预案记录
List
<
Map
<
String
,
Object
>>
instancesList
=
contingencyPlanInstanceRepository
.
queryRecord
(
batchNo
,
"MESSAGE"
);
List
<
Map
<
String
,
Object
>>
instancesList
=
contingencyPlanInstanceRepository
.
queryRecord
(
batchNo
,
"MESSAGE"
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IContingencyPlanService.java
View file @
c276a15e
...
@@ -142,5 +142,5 @@ public interface IContingencyPlanService {
...
@@ -142,5 +142,5 @@ public interface IContingencyPlanService {
String
getPlanBatchNo
();
String
getPlanBatchNo
();
Page
<
ContingencyPlanInstanceVO
>
selectTaskActionPage
(
int
current
,
int
size
,
String
batchNo
,
String
runState
,
String
updateDate
,
List
<
String
>
roleList
);
Page
<
ContingencyPlanInstanceVO
>
selectTaskActionPage
(
int
current
,
int
size
,
String
batchNo
,
String
runState
,
String
updateDate
,
List
<
String
>
roleList
,
List
<
String
>
steps
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanVisual3dService.java
View file @
c276a15e
...
@@ -2,10 +2,8 @@ package com.yeejoin.amos.fas.business.service.intfc;
...
@@ -2,10 +2,8 @@ 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.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.*
;
import
com.yeejoin.amos.fas.business.vo.MessageVO
;
import
com.yeejoin.amos.fas.dao.dto.PlanStepJsonVO
;
import
com.yeejoin.amos.fas.business.vo.PlanStepVo
;
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.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.TextPlan
;
import
com.yeejoin.amos.fas.dao.entity.TextPlan
;
...
@@ -142,4 +140,6 @@ public interface IPlanVisual3dService {
...
@@ -142,4 +140,6 @@ public interface IPlanVisual3dService {
* @return
* @return
*/
*/
ContingencyPlanInstance
updateStatusByIdWeb
(
ContingencyPlanInstance
contingencyPlanInstance
,
Boolean
runStatus
);
ContingencyPlanInstance
updateStatusByIdWeb
(
ContingencyPlanInstance
contingencyPlanInstance
,
Boolean
runStatus
);
List
<
PlanStepJsonVO
>
getPlanStepList
(
String
batchNo
);
}
}
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/ContingencyInstanceInfoMapper.xml
View file @
c276a15e
...
@@ -321,6 +321,11 @@
...
@@ -321,6 +321,11 @@
role_code like concat('%',#{role},'%')
role_code like concat('%',#{role},'%')
</foreach>
</foreach>
</if>
</if>
<if
test=
"steps != null and steps.size() >0"
>
<foreach
collection=
"steps"
item=
"code"
index=
"index"
open=
"and ("
close=
") "
separator=
"or"
>
step_code = #{code}
</foreach>
</if>
</where>
</where>
UNION ALL
UNION ALL
select count(1) AS tmpcount from contingency_plan_instance
select count(1) AS tmpcount from contingency_plan_instance
...
@@ -337,6 +342,11 @@
...
@@ -337,6 +342,11 @@
role_code like concat('%',#{role},'%')
role_code like concat('%',#{role},'%')
</foreach>
</foreach>
</if>
</if>
<if
test=
"steps != null and steps.size() >0"
>
<foreach
collection=
"steps"
item=
"code"
index=
"index"
open=
"and ("
close=
") "
separator=
"or"
>
step_code = #{code}
</foreach>
</if>
</where>
</where>
) a
) a
</select>
</select>
...
@@ -363,6 +373,11 @@
...
@@ -363,6 +373,11 @@
cpi.role_code like concat('%',#{role},'%')
cpi.role_code like concat('%',#{role},'%')
</foreach>
</foreach>
</if>
</if>
<if
test=
"steps != null and steps.size() >0"
>
<foreach
collection=
"steps"
item=
"code"
index=
"index"
open=
"and ("
close=
") "
separator=
"or"
>
step_code = #{code}
</foreach>
</if>
</where>
</where>
UNION ALL
UNION ALL
select cpi.id, cpi.`record_type`, cpi.`category`, cpi.`content`, cpi.`icon`, cpi.`sort`, cpi.`sequence_num`
select cpi.id, cpi.`record_type`, cpi.`category`, cpi.`content`, cpi.`icon`, cpi.`sort`, cpi.`sequence_num`
...
@@ -385,6 +400,11 @@
...
@@ -385,6 +400,11 @@
cpi.role_code like concat('%',#{role},'%')
cpi.role_code like concat('%',#{role},'%')
</foreach>
</foreach>
</if>
</if>
<if
test=
"steps != null and steps.size() >0"
>
<foreach
collection=
"steps"
item=
"code"
index=
"index"
open=
"and ("
close=
") "
separator=
"or"
>
step_code = #{code}
</foreach>
</if>
</where>
</where>
) tmp
) tmp
<if
test=
"updateDate != null and updateDate != '' and updateDate == 0"
>
<if
test=
"updateDate != null and updateDate != '' and updateDate == 0"
>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/EmergencyTaskRoleMapper.xml
View file @
c276a15e
...
@@ -59,6 +59,20 @@
...
@@ -59,6 +59,20 @@
select * from c_emergency_task_role where is_delete = 0 order by sort desc
select * from c_emergency_task_role where is_delete = 0 order by sort desc
</select>
</select>
<select
id=
"selectListFilterEmptyTask"
resultType=
"com.yeejoin.amos.fas.dao.entity.EmergencyTaskRole"
>
SELECT
*
FROM
c_emergency_task_role cet
JOIN c_emergency_task_content cetc ON cetc.obligation_id = cet.id
WHERE
is_delete = 0
GROUP BY
cet.`code`
ORDER BY
cet.sort DESC
</select>
<select
id=
"getPlanStepInfoByType"
resultType=
"java.lang.String"
>
<select
id=
"getPlanStepInfoByType"
resultType=
"java.lang.String"
>
select `data` from c_plan_step_config
select `data` from c_plan_step_config
<where>
<where>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_emergency_task.xml
View file @
c276a15e
...
@@ -148,9 +148,8 @@
...
@@ -148,9 +148,8 @@
FROM
FROM
c_emergency_task_content
c_emergency_task_content
<where>
<where>
is_must = true
<if
test=
"stepCode != null and stepCode != ''"
>
<if
test=
"stepCode != null and stepCode != ''"
>
and
step_code = #{stepCode}
step_code = #{stepCode}
</if>
</if>
<if
test=
"planType != null "
>
<if
test=
"planType != null "
>
AND plan_type = #{planType}
AND plan_type = #{planType}
...
...
YeeAmosFireAutoSysStart/src/main/resources/json/plan-step.json
View file @
c276a15e
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
"stepStatus"
:
"0"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"CALL_PHONE"
,
"buttonCode"
:
"CALL_PHONE"
,
"isParallel"
:
"1"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_
B
"
,
"roleCode"
:
"Digital_Responsing_Plan_
A
"
,
"index"
:
1
,
"index"
:
1
,
"checkYesOrNo"
:
""
"checkYesOrNo"
:
""
},
},
...
@@ -27,7 +27,8 @@
...
@@ -27,7 +27,8 @@
"isParallel"
:
"0"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
2
,
"index"
:
2
,
"isAuto"
:
0
"isAuto"
:
0
,
"checkYesOrNo"
:
""
},
},
{
{
"stepCode"
:
"3"
,
"stepCode"
:
"3"
,
...
@@ -54,36 +55,49 @@
...
@@ -54,36 +55,49 @@
},
},
{
{
"stepCode"
:
"4"
,
"stepCode"
:
"4"
,
"stepName"
:
"启动
应急排油
"
,
"stepName"
:
"启动
CAFS消防系统
"
,
"stepStatus"
:
"0"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"
FIRE_TRANSVERTER_TO_OVERHAUL
"
,
"buttonCode"
:
"
OPEN_WATERSYSTEM
"
,
"isParallel"
:
"0"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_
B
"
,
"roleCode"
:
"Digital_Responsing_Plan_
A
"
,
"index"
:
4
,
"index"
:
4
,
"checkYesOrNo"
:
""
"checkYesOrNo"
:
""
,
"condition"
:
[
{
"equipName"
:
"雨淋阀"
,
"equipCode"
:
"92130300BH644"
,
"equipSpeName"
:
""
,
"equipSpeCode"
:
""
,
"equipSpeIndexKey"
:
"WSS_DelugeValve_Start"
,
"standardValue"
:
"true"
,
"inAndOr"
:
"and"
}
],
"outAndOr"
:
"and"
,
"isAuto"
:
0
},
},
{
{
"stepCode"
:
"5"
,
"stepCode"
:
"5"
,
"stepName"
:
"
CAFS喷淋系统已开启
"
,
"stepName"
:
"
启动应急排油
"
,
"stepStatus"
:
"0"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"
VERIFY_EQUIP_STATUS
"
,
"buttonCode"
:
"
DRAIN_OIL_CONFIRM
"
,
"isParallel"
:
"0"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
5
,
"index"
:
5
,
"checkYesOrNo"
:
""
,
"condition"
:
[
"condition"
:
[
{
{
"equipName"
:
"
雨淋
阀"
,
"equipName"
:
"
排油
阀"
,
"equipCode"
:
"921
30300BH6
44"
,
"equipCode"
:
"921
00400VWE
44"
,
"equipSpeName"
:
""
,
"equipSpeName"
:
""
,
"equipSpeCode"
:
""
,
"equipSpeCode"
:
""
,
"equipSpeIndexKey"
:
"
WSS_DelugeValve_Start
"
,
"equipSpeIndexKey"
:
"
ONL_DrainOilValve_Open
"
,
"standardValue"
:
"true"
,
"standardValue"
:
"true"
,
"inAndOr"
:
"and"
"inAndOr"
:
"and"
}
}
],
],
"outAndOr"
:
"and"
,
"outAndOr"
:
"and"
,
"isAuto"
:
0
"isAuto"
:
0
,
"checkYesOrNo"
:
""
},
},
{
{
"stepCode"
:
"6"
,
"stepCode"
:
"6"
,
...
@@ -122,7 +136,7 @@
...
@@ -122,7 +136,7 @@
"stepStatus"
:
"0"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"FIRE_TRANSVERTER_TO_OVERHAUL"
,
"buttonCode"
:
"FIRE_TRANSVERTER_TO_OVERHAUL"
,
"isParallel"
:
"0"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_
A
"
,
"roleCode"
:
"Digital_Responsing_Plan_
B
"
,
"index"
:
9
,
"index"
:
9
,
"checkYesOrNo"
:
""
"checkYesOrNo"
:
""
},
},
...
...
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