Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
f2e90cf2
Commit
f2e90cf2
authored
Jan 08, 2024
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工作台待办bug修改
parent
030d8193
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
13 deletions
+20
-13
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+17
-11
urlInfo.json
...s-boot-module-jg-biz/src/main/resources/json/urlInfo.json
+3
-2
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
View file @
f2e90cf2
...
...
@@ -185,6 +185,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
*/
@SuppressWarnings
({
"rawtypes"
,
"Duplicates"
})
public
JgInstallationNoticeDto
updateInstallationNotice
(
String
submitType
,
JgInstallationNoticeDto
noticeDto
,
String
op
)
{
boolean
instancedId
=
ObjectUtils
.
isEmpty
(
noticeDto
.
getInstanceId
());
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
throw
new
IllegalArgumentException
(
"参数不能为空"
);
}
...
...
@@ -231,11 +232,14 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
notice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
jgInstallationNoticeMapper
.
updateById
(
notice
);
}
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"relationId"
,
notice
.
getInstanceId
());
map
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
map
.
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
updateTaskModel
(
map
);
if
(!
instancedId
)
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"relationId"
,
notice
.
getInstanceId
());
map
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
map
.
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
updateTaskModel
(
map
);
}
TaskV2Model
taskV2Model
=
new
TaskV2Model
();
//获取待办任务执行人
List
<
AgencyUserModel
>
userList
=
Privilege
.
agencyUserClient
...
...
@@ -250,7 +254,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
taskV2Model
.
setTaskType
(
"installNotice"
);
taskV2Model
.
setTaskTypeLabel
(
"安装告知"
);
String
url
=
getUrl
(
taskV2Model
.
getTaskType
(),
"look"
);
String
format
=
String
.
format
(
url
,
notice
.
getSequenceNbr
(),
roleIds
,
notice
.
getNextExecuteIds
(),
notice
.
getNoticeStatus
());
String
format
=
String
.
format
(
url
,
notice
.
getSequenceNbr
(),
notice
.
getNextExecuteIds
(),
notice
.
getNextExecuteIds
(),
notice
.
getNoticeStatus
(),
notice
.
getInstanceId
());
taskV2Model
.
setRoutePath
(
format
);
...
...
@@ -554,7 +558,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
taskV2Model
.
setTaskType
(
"installNotice"
);
taskV2Model
.
setTaskTypeLabel
(
"安装告知"
);
String
url
=
getUrl
(
taskV2Model
.
getTaskType
(),
"look"
);
String
format
=
String
.
format
(
url
,
item
.
getSequenceNbr
(),
roleIds
,
item
.
getNextExecuteIds
(),
item
.
getNoticeStatus
());
String
format
=
String
.
format
(
url
,
item
.
getSequenceNbr
(),
item
.
getNextExecuteIds
(),
item
.
getNextExecuteIds
(),
item
.
getNoticeStatus
(),
item
.
getInstanceId
());
taskV2Model
.
setRoutePath
(
format
);
taskV2Model
.
setTaskTitle
(
item
.
getStatus
());
taskV2Model
.
setTaskName
(
item
.
getStatus
());
...
...
@@ -880,13 +884,13 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
map
.
put
(
"relationId"
,
jgInstallationNotice
.
getInstanceId
());
map
.
put
(
"taskStatus"
,
FlowStatusEnum
.
REJECTED
.
getCode
());
map
.
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
REJECTED
.
getName
());
updateTaskModel
(
map
);
TaskV2Model
taskV2ModelOld
=
updateTaskModel
(
map
);
TaskV2Model
taskV2Model
=
new
TaskV2Model
();
//获取待办任务执行人
List
<
AgencyUserModel
>
userList
=
Privilege
.
agencyUserClient
.
queryByRoleId
(
jgInstallationNotice
.
getNextExecuteIds
(),
null
,
Boolean
.
FALSE
).
getResult
();
List
<
String
>
userIds
=
userList
.
stream
().
map
(
AgencyUserModel:
:
getUserId
).
collect
(
Collectors
.
toList
());
taskV2Model
.
setExecuteUserIds
(
CollectionUtils
.
isEmpty
(
userIds
)?
""
:
String
.
join
(
","
,
userIds
));
taskV2Model
.
setExecuteUserIds
(
taskV2ModelOld
.
getCreateUserId
(
));
taskV2Model
.
setExtras
(
JSON
.
toJSONString
(
jgInstallationNotice
));
taskV2Model
.
setRelationId
(
jgInstallationNotice
.
getInstanceId
());
Map
<
String
,
Object
>
userOrgRoleMap
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
userOrgRoleClient
.
getme
());
...
...
@@ -895,7 +899,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
taskV2Model
.
setTaskType
(
"installNotice"
);
taskV2Model
.
setTaskTypeLabel
(
"安装告知"
);
String
url
=
getUrl
(
taskV2Model
.
getTaskType
(),
"edit"
);
String
format
=
String
.
format
(
url
,
jgInstallationNotice
.
getSequenceNbr
(),
roleIds
,
jgInstallationNotice
.
getNextExecuteIds
(),
jgInstallationNotice
.
getNoticeStatus
(),
jgInstallationNotice
.
getPromoter
(),
""
);
String
format
=
String
.
format
(
url
,
jgInstallationNotice
.
getSequenceNbr
(),
jgInstallationNotice
.
getNextExecuteIds
(),
jgInstallationNotice
.
getNextExecuteIds
(),
jgInstallationNotice
.
getNoticeStatus
(),
""
,
jgInstallationNotice
.
getInstanceId
()
);
taskV2Model
.
setRoutePath
(
format
);
taskV2Model
.
setTaskTitle
(
jgInstallationNotice
.
getStatus
());
taskV2Model
.
setTaskName
(
jgInstallationNotice
.
getStatus
());
...
...
@@ -922,7 +926,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
Systemctl
.
taskV2Client
.
create
(
model
);
}
public
void
updateTaskModel
(
Map
<
String
,
Object
>
params
){
public
TaskV2Model
updateTaskModel
(
Map
<
String
,
Object
>
params
){
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
List
<
TaskV2Model
>
result
=
Systemctl
.
taskV2Client
.
selectListByRelationId
(
params
.
get
(
"relationId"
).
toString
()).
getResult
();
...
...
@@ -930,6 +934,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
.
findFirst
()
.
orElse
(
null
);
model
.
setTaskStatus
(
Integer
.
valueOf
(
params
.
get
(
"taskStatus"
).
toString
()));
model
.
setRoutePath
(
model
.
getRoutePath
().
replace
(
"nextExecuteIds"
,
"nextExecuteIdsOld"
));
model
.
setTaskStatusLabel
(
params
.
get
(
"taskStatusLabel"
).
toString
());
model
.
setEndDate
(
new
Date
());
model
.
setFinishStatus
(
Boolean
.
TRUE
);
...
...
@@ -939,6 +944,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
else
{
Systemctl
.
taskV2Client
.
update
(
model
,
model
.
getSequenceNbr
());
}
return
model
;
}
private
String
getUrl
(
String
type
,
String
pageType
)
{
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/json/urlInfo.json
View file @
f2e90cf2
...
...
@@ -2,11 +2,11 @@
{
"type"
:
"installNotice"
,
"pageType"
:
"look"
,
"url"
:
"/mixuap?appId=1742358052905971713&id=1735246137364869121&sequenceNbr=%s&roleIds=%s&nextExecuteIds=%s&formType=detail¬iceStatus=%s"
"url"
:
"/mixuap?appId=1742358052905971713&id=1735246137364869121&sequenceNbr=%s&roleIds=%s&nextExecuteIds=%s&formType=detail¬iceStatus=%s
&instanceId=%s
"
},
{
"type"
:
"installNotice"
,
"pageType"
:
"edit"
,
"url"
:
"/mixuap?appId=1742358052905971713&id=1734127099570057217&sequenceNbr=%s&roleIds=%s&nextExecuteIds=%s&formType=edit¬iceStatus=%s&
promoter=%s&user
Id=%s"
"url"
:
"/mixuap?appId=1742358052905971713&id=1734127099570057217&sequenceNbr=%s&roleIds=%s&nextExecuteIds=%s&formType=edit¬iceStatus=%s&
userId=%s&instance
Id=%s"
}
]
\ 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