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
1d8d86f2
Commit
1d8d86f2
authored
Jan 16, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.撤回修改url参数拼接
parent
ba362ad3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
8 deletions
+30
-8
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+27
-6
JgChangeRegistrationNameServiceImpl.java
...biz/service/impl/JgChangeRegistrationNameServiceImpl.java
+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/CommonServiceImpl.java
View file @
1d8d86f2
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.aspose.words.SaveFormat
;
...
...
@@ -850,17 +849,14 @@ public class CommonServiceImpl implements ICommonService {
* @param obj 自己的实体:taskType为BusinessTypeEnum code;nextExecuteUser
*/
public
void
rollbackTask
(
String
id
,
JSONObject
obj
)
{
List
<
TaskV2Model
>
result
=
Systemctl
.
taskV2Client
.
selectListByRelationId
(
id
).
getResult
();
List
<
TaskV2Model
>
list
=
result
.
stream
().
sorted
((
r1
,
r2
)
->
r2
.
getSequenceNbr
().
compareTo
(
r1
.
getSequenceNbr
())).
collect
(
Collectors
.
toList
());
TaskV2Model
model
=
list
.
get
(
0
);
Systemctl
.
taskV2Client
.
delete
(
String
.
valueOf
(
model
.
getSequenceNbr
()));
String
urlParams
=
""
;
try
{
urlParams
=
"&"
+
toQueryParams
(
obj
);
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
}
urlParams
=
"&"
+
toQueryParams2
(
obj
);
List
<
Map
>
urlList
=
JsonUtils
.
getResourceList
(
urlInfo
);
if
(
list
.
size
()
>
1
)
{
...
...
@@ -911,6 +907,28 @@ public class CommonServiceImpl implements ICommonService {
}
}
private
static
String
toQueryParams2
(
JSONObject
jsonObject
)
{
StringBuilder
sb
=
new
StringBuilder
();
Set
<
String
>
keys
=
jsonObject
.
keySet
();
keys
.
forEach
(
key
->{
Object
value
=
jsonObject
.
get
(
key
);
if
(
sb
.
length
()
>
0
)
{
sb
.
append
(
'&'
);
}
try
{
sb
.
append
(
URLEncoder
.
encode
(
key
,
"UTF-8"
))
.
append
(
'='
)
.
append
(
URLEncoder
.
encode
(
value
.
toString
(),
"UTF-8"
));
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
}
});
return
sb
.
toString
();
}
public
<
T
>
String
toQueryParams
(
T
obj
)
throws
UnsupportedEncodingException
{
StringBuilder
sb
=
new
StringBuilder
();
...
...
@@ -938,6 +956,9 @@ public class CommonServiceImpl implements ICommonService {
return
sb
.
length
()
>
0
?
sb
.
substring
(
0
,
sb
.
length
()
-
1
)
:
""
;
}
/**
* 根据流程状态name 获取流程状态code
*
...
...
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/JgChangeRegistrationNameServiceImpl.java
View file @
1d8d86f2
...
...
@@ -37,6 +37,7 @@ import com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
org.apache.commons.lang3.SerializationUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpStatus
;
...
...
@@ -409,6 +410,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
JgChangeRegistrationName
jgChangeRegistrationName
=
new
JgChangeRegistrationName
();
LambdaQueryWrapper
<
JgChangeRegistrationName
>
lambda
=
new
QueryWrapper
<
JgChangeRegistrationName
>().
lambda
();
lambda
.
eq
(
JgChangeRegistrationName:
:
getInstanceId
,
instanceId
);
jgChangeRegistrationName
=
this
.
getOne
(
lambda
);
List
<
String
>
roleListNext
=
new
ArrayList
<>();
List
<
String
>
roleListAll
=
new
ArrayList
<>();
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
rollBack
(
instanceId
);
...
...
@@ -426,10 +428,9 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
// 更新下一步可执行人
String
nextUserIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorUserIds
();
jgChangeRegistrationName
.
setNextExecuteUserIds
(
nextUserIds
);
this
.
update
(
jgChangeRegistrationName
,
lambda
);
this
.
update
ById
(
jgChangeRegistrationName
);
// 删除待办
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
jgChangeRegistrationName
));
jsonObject
.
put
(
"nextTaskId"
,
jgChangeRegistrationName
.
getNextTaskId
());
jsonObject
.
put
(
"nextExecuteUser"
,
jgChangeRegistrationName
.
getNextExecutorIds
());
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_NAME_CHANGE_REGISTRATION
.
getCode
());
jsonObject
.
put
(
"flowStatus"
,
this
.
getTaskCodeByName
(
jgChangeRegistrationName
.
getAuditStatus
()));
...
...
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