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
6b043e1d
Commit
6b043e1d
authored
May 08, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
7cb0a5e3
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
175 additions
and
65 deletions
+175
-65
ContingencyPlanController.java
...os/fas/business/controller/ContingencyPlanController.java
+7
-6
PlanVisual3dController.java
.../amos/fas/business/controller/PlanVisual3dController.java
+23
-12
ContingencyPlanInstanceMapper.java
...as/business/dao/mapper/ContingencyPlanInstanceMapper.java
+2
-0
ContingencyInstanceImpl.java
...os/fas/business/service/impl/ContingencyInstanceImpl.java
+44
-0
ContingencyPlanServiceImpl.java
...fas/business/service/impl/ContingencyPlanServiceImpl.java
+3
-4
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+32
-25
IContingencyPlanService.java
...s/fas/business/service/intfc/IContingencyPlanService.java
+1
-1
IPlanVisual3dService.java
...amos/fas/business/service/intfc/IPlanVisual3dService.java
+3
-3
ContingencyPlanInstanceVO.java
...ejoin/amos/fas/business/vo/ContingencyPlanInstanceVO.java
+4
-0
ContingencyInstanceInfoMapper.xml
...ain/resources/db/mapper/ContingencyInstanceInfoMapper.xml
+42
-14
ContingencyPlanInstanceMapper.xml
...ain/resources/db/mapper/ContingencyPlanInstanceMapper.xml
+14
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/ContingencyPlanController.java
View file @
6b043e1d
...
...
@@ -265,14 +265,15 @@ public class ContingencyPlanController extends BaseController {
@RequestMapping
(
value
=
"/getUserOperateCountAndTaskName"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
getUserOperateCountAndTaskName
()
{
AgencyUserModel
user
=
getUserInfo
();
List
<
RoleModel
>
roleModelList
=
new
ArrayList
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
for
(
Long
key
:
user
.
getOrgRoles
().
keySet
())
{
roleModelList
.
addAll
(
user
.
getOrgRoles
().
get
(
key
));
}
String
obligationIds
=
emergencyTaskService
.
getRolesByUserId
(
user
.
getUserId
());
map
.
put
(
"roleCodes"
,
obligationIds
);
return
CommonResponseUtil2
.
success
(
contingencyPlanService
.
getUserOperateCountAndTaskName
(
roleModelList
,
map
));
map
.
put
(
"roleCodes"
,
obligationIds
);
List
<
String
>
list
=
new
ArrayList
<>();
if
(!
StringUtils
.
isEmpty
(
obligationIds
))
{
String
[]
ids
=
new
String
(
obligationIds
).
split
(
","
);
list
=
Arrays
.
asList
(
ids
);
}
return
CommonResponseUtil2
.
success
(
contingencyPlanService
.
getUserOperateCountAndTaskName
(
list
,
map
));
}
@ApiOperation
(
value
=
"获取当前登录人待处置任务及预案信息"
)
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/PlanVisual3dController.java
View file @
6b043e1d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
com.yeejoin.amos.fas.business.service.impl.EmergencyTaskServiceImpl
;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService
;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
import
com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO
;
...
...
@@ -27,9 +28,7 @@ import org.springframework.web.bind.annotation.*;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.*
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
@RestController
@RequestMapping
(
value
=
"/api/visual"
)
...
...
@@ -46,6 +45,9 @@ public class PlanVisual3dController extends BaseController {
private
IPlanVisual3dService
planVisual3dService
;
@Autowired
private
EmergencyTaskServiceImpl
emergencyTaskService
;
@Autowired
HttpServletResponse
response
;
@Autowired
HttpServletRequest
request
;
...
...
@@ -263,11 +265,15 @@ public class PlanVisual3dController extends BaseController {
}
AgencyUserModel
user
=
getUserInfo
();
List
<
RoleModel
>
roleModelList
=
new
ArrayList
<>();
for
(
Long
key
:
user
.
getOrgRoles
().
keySet
())
{
roleModelList
.
addAll
(
user
.
getOrgRoles
().
get
(
key
));
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
String
obligationIds
=
emergencyTaskService
.
getRolesByUserId
(
user
.
getUserId
());
map
.
put
(
"roleCodes"
,
obligationIds
);
List
<
String
>
list
=
new
ArrayList
<>();
if
(!
StringUtils
.
isEmpty
(
obligationIds
))
{
String
[]
ids
=
new
String
(
obligationIds
).
split
(
","
);
list
=
Arrays
.
asList
(
ids
);
}
return
CommonResponseUtil2
.
success
(
planVisual3dService
.
selectTaskActionPage
(
current
,
size
,
batchNo
,
roleModelL
ist
,
dataType
));
return
CommonResponseUtil2
.
success
(
planVisual3dService
.
selectTaskActionPage
(
current
,
size
,
batchNo
,
l
ist
,
dataType
));
}
@Permission
...
...
@@ -277,11 +283,15 @@ public class PlanVisual3dController extends BaseController {
@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
));
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
String
obligationIds
=
emergencyTaskService
.
getRolesByUserId
(
user
.
getUserId
());
map
.
put
(
"roleCodes"
,
obligationIds
);
List
<
String
>
list
=
new
ArrayList
<>();
if
(!
StringUtils
.
isEmpty
(
obligationIds
))
{
String
[]
ids
=
new
String
(
obligationIds
).
split
(
","
);
list
=
Arrays
.
asList
(
ids
);
}
return
CommonResponseUtil2
.
success
(
planVisual3dService
.
selectTaskActionList
(
batchNo
,
roleModelL
ist
,
dataType
));
return
CommonResponseUtil2
.
success
(
planVisual3dService
.
selectTaskActionList
(
batchNo
,
l
ist
,
dataType
));
}
@Permission
...
...
@@ -295,6 +305,7 @@ public class PlanVisual3dController extends BaseController {
@ApiOperation
(
value
=
"修改任务动作执行状态"
,
notes
=
"修改任务动作执行状态"
)
@PostMapping
(
value
=
"/status/modify"
)
public
ResponseModel
updateTaskStatusById
(
@RequestParam
(
"id"
)
String
id
,
@RequestParam
(
"runStatus"
)
Boolean
runStatus
)
{
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
updateTaskStatusById
(
id
,
runStatus
));
AgencyUserModel
user
=
getUserInfo
();
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
updateTaskStatusById
(
id
,
runStatus
,
user
.
getRealName
()));
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/ContingencyPlanInstanceMapper.java
View file @
6b043e1d
...
...
@@ -46,4 +46,6 @@ public interface ContingencyPlanInstanceMapper extends BaseMapper<ContingencyPla
Integer
getPlanInstanceCountByCondition
(
@Param
(
"category"
)
String
category
,
@Param
(
"recordType"
)
String
recordType
,
@Param
(
"batchNo"
)
String
batchNo
,
@Param
(
"content"
)
String
content
);
String
getInstanceIdByBatchNOAndCategory
(
@Param
(
"recordType"
)
String
recordType
,
@Param
(
"category"
)
String
category
,
@Param
(
"batchNo"
)
String
batchNo
);
Boolean
updateTaskStatusById
(
@Param
(
"id"
)
String
id
,
@Param
(
"content"
)
String
content
,
Boolean
runStatus
,
@Param
(
"userName"
)
String
userName
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceImpl.java
View file @
6b043e1d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.rule.RuleTrigger
;
...
...
@@ -497,6 +498,23 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
@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
{
List
<
String
>
strs
=
list
.
stream
().
filter
(
x
->
x
.
equals
(
stepCode
)).
collect
(
Collectors
.
toList
());
ContingencyPlanInstance
instance
=
contingencyPlanInstanceMapper
.
getMessageById
(
contingencyPlanId
);
instance
.
setId
(
null
);
instance
.
setRecordType
(
"MESSAGE"
);
repository
.
save
(
instance
);
List
<
String
>
models
=
new
ArrayList
<>();
models
.
add
(
instance
.
getRoleCode
());
List
<
ContingencyPlanInstanceVO
>
list
=
planVisual3dService
.
selectTaskActionList
(
instance
.
getBatchNo
(),
models
,
1
);
if
(
redisTemplate
.
hasKey
(
"planTask"
))
{
redisTemplate
.
delete
(
"planTask"
);
String
planTask
=
""
;
List
<
ContingencyPlanInstanceVO
>
arr
=
list
.
stream
().
filter
(
x
->
!
x
.
getId
().
equalsIgnoreCase
(
contingencyPlanId
)).
collect
(
Collectors
.
toList
());
if
(
0
<
list
.
size
())
{
planTask
=
JSON
.
toJSONString
(
arr
);
}
JSONArray
taskObjects
=
JSON
.
parseArray
(
planTask
);
redisTemplate
.
opsForValue
().
set
(
"planTask"
,
taskObjects
);
}
if
(
0
<
strs
.
size
())
{
PlanExecuteVo
vo
=
new
PlanExecuteVo
();
vo
.
setConfirm
(
buttonState
);
...
...
@@ -523,6 +541,32 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
else
{
String
planStep
=
""
;
if
(
redisTemplate
.
hasKey
(
"planStep"
))
{
planStep
=
Objects
.
requireNonNull
(
redisTemplate
.
opsForValue
().
get
(
"planStep"
)).
toString
();
}
else
{
planStep
=
planStepService
.
getPlanStep
();
}
JSONArray
objects
=
JSON
.
parseArray
(
planStep
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"plan"
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"contingency"
,
new
ContingencyRo
());
result
.
put
(
"msgContext"
,
Collections
.
EMPTY_MAP
);
result
.
put
(
"msgType"
,
"getStepList"
);
result
.
put
(
"planStep"
,
objects
);
String
planTask
=
""
;
if
(
redisTemplate
.
hasKey
(
"planTask"
))
{
planTask
=
Objects
.
requireNonNull
(
redisTemplate
.
opsForValue
().
get
(
"planTask"
)).
toString
();
}
else
{
List
<
ContingencyPlanInstanceVO
>
lists
=
planVisual3dService
.
selectTaskActionList
(
batchNo
,
models
,
1
);
if
(
0
<
list
.
size
())
{
planTask
=
JSON
.
toJSONString
(
lists
);
}
}
JSONArray
taskObjects
=
JSON
.
parseArray
(
planTask
);
result
.
put
(
"planTask"
,
taskObjects
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
result
));
}
return
Optional
.
empty
();
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyPlanServiceImpl.java
View file @
6b043e1d
...
...
@@ -887,7 +887,6 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
@Override
public
Page
<
ContingencyPlanInstanceVO
>
selectTaskActionPage
(
int
current
,
int
size
,
String
batchNo
,
String
runState
,
String
updateDate
,
List
<
String
>
roleList
)
{
List
<
String
>
roles
=
new
ArrayList
<>();
String
type
=
"TASKOPERATE"
;
Page
<
ContingencyPlanInstanceVO
>
page
=
new
Page
<>(
current
,
size
);
int
total
=
0
;
...
...
@@ -900,7 +899,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
page
.
setCurrent
(
1
);
start
=
0
;
}
List
<
ContingencyPlanInstanceVO
>
list
=
contingencyInstanceInfoMapper
.
getTaskActionPage
((
int
)
start
,
size
,
batchNo
,
type
,
runState
,
updateDate
,
role
s
);
List
<
ContingencyPlanInstanceVO
>
list
=
contingencyInstanceInfoMapper
.
getTaskActionPage
((
int
)
start
,
size
,
batchNo
,
type
,
runState
,
updateDate
,
role
List
);
page
.
setRecords
(
list
);
page
.
setTotal
(
total
);
}
...
...
@@ -926,7 +925,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
}
@Override
public
Map
<
String
,
Object
>
getUserOperateCountAndTaskName
(
List
<
RoleModel
>
roleModelList
,
Map
<
String
,
Object
>
map
)
{
public
Map
<
String
,
Object
>
getUserOperateCountAndTaskName
(
List
<
String
>
roleList
,
Map
<
String
,
Object
>
map
)
{
List
<
PlanOperationRecord
>
recordList
=
planOperationRecordDao
.
findByStatus
(
0
);
if
(!
CollectionUtils
.
isEmpty
(
recordList
))
{
...
...
@@ -936,7 +935,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
if
(
instanceInfo
!=
null
)
{
map
.
put
(
"planName"
,
instanceInfo
.
getName
());
map
.
put
(
"batchNo"
,
batchNo
);
List
<
ContingencyPlanInstanceVO
>
list
=
planVisual3dService
.
selectTaskActionList
(
batchNo
,
role
Model
List
,
1
);
List
<
ContingencyPlanInstanceVO
>
list
=
planVisual3dService
.
selectTaskActionList
(
batchNo
,
roleList
,
1
);
map
.
put
(
"taskNum"
,
list
.
size
());
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
6b043e1d
...
...
@@ -118,6 +118,9 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
@Value
(
"${aurora.push.switch}"
)
private
Boolean
auroraPushSwitch
;
@Autowired
private
IPlanVisual3dService
planVisual3dService
;
@Override
public
void
uploadTextPlan
(
String
appId
,
Map
<
String
,
String
>
pathNameMap
)
{
if
(
null
!=
pathNameMap
&&
!
pathNameMap
.
isEmpty
())
{
...
...
@@ -536,19 +539,22 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
}
@Override
public
Page
<
ContingencyPlanInstanceVO
>
selectTaskActionPage
(
int
current
,
int
size
,
String
disposalId
,
List
<
RoleModel
>
roleModelList
,
int
dataType
)
{
List
<
String
>
roles
=
new
ArrayList
<>();
public
Page
<
ContingencyPlanInstanceVO
>
selectTaskActionPage
(
int
current
,
int
size
,
String
disposalId
,
List
<
String
>
roleModelList
,
int
dataType
)
{
String
type
=
"TASKOPERATE"
;
String
status
=
""
;
Page
<
ContingencyPlanInstanceVO
>
page
=
new
Page
<>(
current
,
size
);
for
(
RoleModel
roleModel
:
roleModelList
)
{
roles
.
add
(
roleModel
.
getRoleName
());
// for (RoleModel roleModel : roleModelList) {
// roles.add(roleModel.getRoleName());
// }
if
(
"1"
.
equals
(
String
.
valueOf
(
dataType
)))
{
// 根据当前用户预案角色、未执行动作 (dataType = 2 查询所有)
status
=
"1"
;
}
int
total
=
0
;
if
(
ObjectUtils
.
isEmpty
(
status
))
{
total
=
contingencyInstanceInfoMapper
.
selectCountTaskActionPage
(
type
,
null
,
role
s
,
disposalId
);
total
=
contingencyInstanceInfoMapper
.
selectCountTaskActionPage
(
type
,
null
,
role
ModelList
,
disposalId
);
}
else
{
total
=
contingencyInstanceInfoMapper
.
selectCountTaskActionPage
(
type
,
status
,
role
s
,
disposalId
);
total
=
contingencyInstanceInfoMapper
.
selectCountTaskActionPage
(
type
,
status
,
role
ModelList
,
disposalId
);
}
long
start
=
(
page
.
getCurrent
()
-
1
)
*
page
.
getSize
();
...
...
@@ -559,7 +565,7 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
page
.
setCurrent
(
1
);
start
=
0
;
}
List
<
ContingencyPlanInstanceVO
>
list
=
contingencyInstanceInfoMapper
.
selectTaskActionPage
((
int
)
start
,
size
,
type
,
status
,
role
s
,
disposalId
);
List
<
ContingencyPlanInstanceVO
>
list
=
contingencyInstanceInfoMapper
.
selectTaskActionPage
((
int
)
start
,
size
,
type
,
status
,
role
ModelList
,
disposalId
);
page
.
setRecords
(
list
);
page
.
setTotal
(
total
);
}
...
...
@@ -567,25 +573,14 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
}
@Override
public
List
<
ContingencyPlanInstanceVO
>
selectTaskActionList
(
String
batchNo
,
List
<
RoleModel
>
roleModelList
,
int
dataType
)
{
List
<
String
>
roles
=
new
ArrayList
<>();
public
List
<
ContingencyPlanInstanceVO
>
selectTaskActionList
(
String
batchNo
,
List
<
String
>
roleModelList
,
int
dataType
)
{
String
type
=
"TASKOPERATE"
;
String
status
=
""
;
if
(
"1"
.
equals
(
String
.
valueOf
(
dataType
)))
{
if
(
null
!=
roleModelList
&&
0
<
roleModelList
.
size
())
{
for
(
RoleModel
roleModel
:
roleModelList
)
{
roles
.
add
(
roleModel
.
getRoleName
());
}
}
// 根据当前用户预案角色、未执行动作
// 根据当前用户预案角色、未执行动作 (dataType = 2 查询所有)
status
=
"1"
;
}
else
if
(
"2"
.
equals
(
String
.
valueOf
(
dataType
)))
{
// 当前用户预案角色、全部动作数据
for
(
RoleModel
roleModel
:
roleModelList
)
{
roles
.
add
(
roleModel
.
getRoleName
());
}
}
return
contingencyInstanceInfoMapper
.
selectTaskActionList
(
type
,
status
,
role
s
,
batchNo
);
return
contingencyInstanceInfoMapper
.
selectTaskActionList
(
type
,
status
,
role
ModelList
,
batchNo
);
}
@Override
...
...
@@ -665,16 +660,28 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
}
@Override
public
boolean
updateTaskStatusById
(
String
id
,
Boolean
runStatus
)
{
public
boolean
updateTaskStatusById
(
String
id
,
Boolean
runStatus
,
String
userName
)
{
boolean
bool
=
false
;
if
(
runStatus
)
{
ContingencyPlanInstance
instance
=
contingencyPlanInstanceMapper
.
getMessageById
(
id
);
ContingencyPlanInstance
contingencyPlanInstance
=
deleteButton
(
instance
);
bool
=
contingencyPlanInstanceMapper
.
update
StatusById
(
id
,
contingencyPlanInstance
.
getContent
(),
runStatus
);
bool
=
contingencyPlanInstanceMapper
.
update
TaskStatusById
(
id
,
contingencyPlanInstance
.
getContent
(),
runStatus
,
userName
);
}
else
{
bool
=
contingencyPlanInstanceMapper
.
updateStatusById
(
id
,
null
,
runStatus
);
bool
=
contingencyPlanInstanceMapper
.
updateTaskStatusById
(
id
,
null
,
runStatus
,
userName
);
}
if
(
redisTemplate
.
hasKey
(
"planTask"
))
{
redisTemplate
.
delete
(
"planTask"
);
String
planTask
=
""
;
ContingencyPlanInstance
instance
=
contingencyPlanInstanceMapper
.
getMessageById
(
id
);
List
<
String
>
models
=
new
ArrayList
<>();
models
.
add
(
instance
.
getRoleCode
());
List
<
ContingencyPlanInstanceVO
>
list
=
this
.
selectTaskActionList
(
instance
.
getBatchNo
(),
models
,
1
);
if
(
0
<
list
.
size
())
{
planTask
=
JSON
.
toJSONString
(
list
);
}
JSONArray
taskObjects
=
JSON
.
parseArray
(
planTask
);
redisTemplate
.
opsForValue
().
set
(
"planTask"
,
taskObjects
);
}
if
(
bool
)
{
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"plan"
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IContingencyPlanService.java
View file @
6b043e1d
...
...
@@ -138,7 +138,7 @@ public interface IContingencyPlanService {
Map
<
String
,
Object
>
getUserOperateCountAndPlanName
(
List
<
RoleModel
>
roleModelList
);
Map
<
String
,
Object
>
getUserOperateCountAndTaskName
(
List
<
RoleModel
>
roleModelList
,
Map
<
String
,
Object
>
map
);
Map
<
String
,
Object
>
getUserOperateCountAndTaskName
(
List
<
String
>
list
,
Map
<
String
,
Object
>
map
);
String
getPlanBatchNo
();
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanVisual3dService.java
View file @
6b043e1d
...
...
@@ -91,7 +91,7 @@ public interface IPlanVisual3dService {
Page
<
ContingencyPlanInstanceVO
>
selectDisposalActionPage
(
int
current
,
int
size
,
String
batchNo
,
List
<
RoleModel
>
roleModelList
,
int
dataType
);
Page
<
ContingencyPlanInstanceVO
>
selectTaskActionPage
(
int
current
,
int
size
,
String
batchNo
,
List
<
RoleModel
>
roleModelList
,
int
dataType
);
Page
<
ContingencyPlanInstanceVO
>
selectTaskActionPage
(
int
current
,
int
size
,
String
batchNo
,
List
<
String
>
roleModelList
,
int
dataType
);
/**
* 根据批次号获取预案的消息等记录
...
...
@@ -105,7 +105,7 @@ public interface IPlanVisual3dService {
List
<
ContingencyPlanInstanceVO
>
selectDisposalActionList
(
String
batchNo
,
List
<
RoleModel
>
roleModelList
,
int
dataType
);
List
<
ContingencyPlanInstanceVO
>
selectTaskActionList
(
String
batchNo
,
List
<
RoleModel
>
roleModelList
,
int
dataType
);
List
<
ContingencyPlanInstanceVO
>
selectTaskActionList
(
String
batchNo
,
List
<
String
>
roleModelList
,
int
dataType
);
/**
* 极光推送消息
...
...
@@ -124,7 +124,7 @@ public interface IPlanVisual3dService {
*/
boolean
updateStatusById
(
String
id
,
Boolean
runStatus
);
boolean
updateTaskStatusById
(
String
id
,
Boolean
runStatus
);
boolean
updateTaskStatusById
(
String
id
,
Boolean
runStatus
,
String
userName
);
/**
* 修改动作执行状态-web
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/ContingencyPlanInstanceVO.java
View file @
6b043e1d
...
...
@@ -58,6 +58,10 @@ public class ContingencyPlanInstanceVO {
private
String
updateUser
;
private
String
createTime
;
private
String
updateTime
;
private
Boolean
isDelete
=
false
;
}
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/ContingencyInstanceInfoMapper.xml
View file @
6b043e1d
...
...
@@ -71,7 +71,6 @@
, 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>
...
...
@@ -90,16 +89,42 @@
</foreach>
</if>
</where>
order by cpi.`create_date` ASC
order by cpi.`create_date` ASC;
UNION ALL
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>
cpi.step_code = "-1"
<if
test=
"batchNo != null and batchNo != ''"
>
AND cpi.batch_no = #{batchNo}
</if>
<if
test=
"type != null and type != ''"
>
and cpi.record_type = #{type}
</if>
<if
test=
"status != null and status != ''"
>
and (cpi.runstate is null or cpi.runstate = 0)
</if>
<if
test=
"list != null and list.size() >0"
>
<foreach
collection=
"list"
item=
"role"
index=
"index"
open=
"and ("
close=
") "
separator=
"or"
>
cpi.role_code like concat('%',#{role},'%')
</foreach>
</if>
</where>
order by cpi.`create_date` ASC;
LIMIT #{current}, #{size}
</select>
<select
id=
"selectCountTaskActionPage"
resultType=
"java.lang.Integer"
>
select count(1) from contingency_plan_instance
<where>
step_code = "-1"
<if
test=
"batchNo != null and batchNo != ''"
>
batch_no = #{batchNo}
and
batch_no = #{batchNo}
</if>
<if
test=
"type != null and type != ''"
>
and record_type = #{type}
...
...
@@ -165,15 +190,16 @@
<select
id=
"selectTaskActionList"
resultType=
"com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO"
>
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`
, cpi.`batch_no`, cpi.`create_date`,
DATE_FORMAT(cpi.`create_date`,'%Y-%m-%d %H:%i:%s') AS createTime,
cpi.`create_user`, cpi.`update_date`
,
DATE_FORMAT(cpi.`update_date`,'%Y-%m-%d %H:%i:%s') AS updateTime,
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>
cpi.step_code = "-1"
<if
test=
"batchNo != null and batchNo != ''"
>
cpi.batch_no = #{batchNo}
AND
cpi.batch_no = #{batchNo}
</if>
<if
test=
"type != null and type != ''"
>
and cpi.record_type = #{type}
...
...
@@ -193,13 +219,14 @@
<select
id=
"countTaskPage"
resultType=
"java.lang.Integer"
>
select count(1) from contingency_plan_instance
<where>
step_code = "-1"
<if
test=
"type != null and type != ''"
>
and
record_type = #{type}
AND
record_type = #{type}
</if>
<if
test=
"batchNo != null and batchNo != ''"
>
batch_no = #{batchNo}
and
batch_no = #{batchNo}
</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"
>
role_code like concat('%', #{role}, '%')
</foreach>
...
...
@@ -213,12 +240,13 @@
, 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 ci
i
on cpi.batch_no = cii.id
from
contingency_plan_instance cp
i
left join contingency_instance_info cii
on cpi.batch_no = cii.id
<where>
cpi.step_code = "-1"
<if
test=
"batchNo != null and batchNo != ''"
>
cpi.batch_no = #{batchNo}
AND
cpi.batch_no = #{batchNo}
</if>
<if
test=
"type != null and type != ''"
>
and cpi.record_type = #{type}
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/ContingencyPlanInstanceMapper.xml
View file @
6b043e1d
...
...
@@ -12,6 +12,20 @@
</if>
where id = #{id}
</update>
<update
id=
"updateTaskStatusById"
>
UPDATE
contingency_plan_instance
SET
runstate = ${runStatus}
<if
test=
"content != null and content != ''"
>
, content = #{content}
</if>
<if
test=
"userName != null and userName != ''"
>
, start_user_name = #{userName}
</if>
where id = #{id}
</update>
<update
id=
"updateMessageById"
>
UPDATE `contingency_plan_instance`
SET
...
...
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