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
7929fe50
Commit
7929fe50
authored
Aug 01, 2023
by
litengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码提交
parent
7b90d177
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
9 deletions
+30
-9
ProjectInitiationServiceImpl.java
...le/ugp/biz/service/impl/ProjectInitiationServiceImpl.java
+4
-2
TaskServiceImpl.java
...mos/boot/module/ugp/biz/service/impl/TaskServiceImpl.java
+26
-7
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProjectInitiationServiceImpl.java
View file @
7929fe50
...
@@ -523,7 +523,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
...
@@ -523,7 +523,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
* @param instanceId
* @param instanceId
* @return
* @return
*/
*/
public
String
getFlowTaskName
(
String
InitiationStatus
,
boolean
status
,
String
taskType
,
Date
sendTime
,
Long
sourceId
,
String
type
,
List
<
Long
>
unitIds
,
Long
extendId
,
String
instanceId
){
public
String
getFlowTaskName
(
Project
project
,
boolean
status
,
String
taskType
,
Date
sendTime
,
Long
sourceId
,
String
type
,
List
<
Long
>
unitIds
,
Long
extendId
,
String
instanceId
){
JSONObject
dataObject
=
new
JSONObject
();
JSONObject
dataObject
=
new
JSONObject
();
boolean
isEnd
=
false
;
boolean
isEnd
=
false
;
try
{
try
{
...
@@ -540,11 +540,13 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
...
@@ -540,11 +540,13 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
return
ProjectInitiationEnum
.
修改资料
.
getName
();
return
ProjectInitiationEnum
.
修改资料
.
getName
();
}
}
if
(
ProjectInitiationEnum
.
安装负责人指定项目负责人
.
getName
().
equals
(
name
)){
if
(
ProjectInitiationEnum
.
安装负责人指定项目负责人
.
getName
().
equals
(
name
)){
unitIds
.
add
(
project
.
getInstallationUnitId
());
if
(!
taskService
.
findTheTask
(
instanceId
,
ProjectInitiationEnum
.
安装负责人指定项目负责人
.
getName
()))
{
if
(!
taskService
.
findTheTask
(
instanceId
,
ProjectInitiationEnum
.
安装负责人指定项目负责人
.
getName
()))
{
taskService
.
saveOrUpdateTask
(
ProjectInitiationEnum
.
安装负责人指定项目负责人
.
getName
(),
false
,
taskType
,
sendTime
,
sourceId
,
TaskTypeEnum
.
项目立项
.
getKey
(),
unitIds
,
extendId
,
instanceId
);
taskService
.
saveOrUpdateTask
(
ProjectInitiationEnum
.
安装负责人指定项目负责人
.
getName
(),
false
,
taskType
,
sendTime
,
sourceId
,
TaskTypeEnum
.
项目立项
.
getKey
(),
unitIds
,
extendId
,
instanceId
);
}
}
}
}
if
(
ProjectInitiationEnum
.
设计负责人指定项目负责人
.
getName
().
equals
(
name
)){
if
(
ProjectInitiationEnum
.
设计负责人指定项目负责人
.
getName
().
equals
(
name
)){
unitIds
.
add
(
project
.
getDesignUnitId
());
if
(!
taskService
.
findTheTask
(
instanceId
,
ProjectInitiationEnum
.
安装负责人指定项目负责人
.
getName
()))
{
if
(!
taskService
.
findTheTask
(
instanceId
,
ProjectInitiationEnum
.
安装负责人指定项目负责人
.
getName
()))
{
taskService
.
saveOrUpdateTask
(
ProjectInitiationEnum
.
设计负责人指定项目负责人
.
getName
(),
false
,
taskType
,
sendTime
,
sourceId
,
TaskTypeEnum
.
项目立项
.
getKey
(),
unitIds
,
extendId
,
instanceId
);
taskService
.
saveOrUpdateTask
(
ProjectInitiationEnum
.
设计负责人指定项目负责人
.
getName
(),
false
,
taskType
,
sendTime
,
sourceId
,
TaskTypeEnum
.
项目立项
.
getKey
(),
unitIds
,
extendId
,
instanceId
);
}
}
...
@@ -574,7 +576,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
...
@@ -574,7 +576,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Project:
:
getInstanceId
,
instanceId
);
wrapper
.
eq
(
Project:
:
getInstanceId
,
instanceId
);
Project
project
=
projectService
.
getOne
(
wrapper
);
Project
project
=
projectService
.
getOne
(
wrapper
);
String
taskName
=
getFlowTaskName
(
InitiationStatus
,
status
,
taskType
,
sendTime
,
sourceId
,
type
,
unitIds
,
extendId
,
instanceId
);
String
taskName
=
getFlowTaskName
(
project
,
status
,
taskType
,
sendTime
,
sourceId
,
type
,
unitIds
,
extendId
,
instanceId
);
boolean
bool
=
true
;
boolean
bool
=
true
;
if
((
project
.
getStatus
().
contains
(
ProjectInitiationEnum
.
安装资料审批
.
getName
())
||
project
.
getStatus
().
contains
(
ProjectInitiationEnum
.
设计资料审批
.
getName
()))
&&
"流程结束!"
.
equals
(
taskName
)){
if
((
project
.
getStatus
().
contains
(
ProjectInitiationEnum
.
安装资料审批
.
getName
())
||
project
.
getStatus
().
contains
(
ProjectInitiationEnum
.
设计资料审批
.
getName
()))
&&
"流程结束!"
.
equals
(
taskName
)){
bool
=
false
;
bool
=
false
;
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/TaskServiceImpl.java
View file @
7929fe50
...
@@ -159,7 +159,7 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
...
@@ -159,7 +159,7 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
}
}
task
.
setContent
(
title
+
", "
+
taskStatus
);
task
.
setContent
(
title
+
", "
+
taskStatus
);
task
.
setInstanceId
(
instanceId
);
task
.
setInstanceId
(
instanceId
);
List
<
String
>
roleList
=
getRoleList
(
instanceId
);
List
<
String
>
roleList
=
getRoleList
(
instanceId
,
InitiationStatus
);
if
(!
ObjectUtils
.
isEmpty
(
roleList
))
{
if
(!
ObjectUtils
.
isEmpty
(
roleList
))
{
String
join
=
String
.
join
(
","
,
roleList
);
String
join
=
String
.
join
(
","
,
roleList
);
task
.
setRoleIds
(
join
);
task
.
setRoleIds
(
join
);
...
@@ -186,7 +186,7 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
...
@@ -186,7 +186,7 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
task
.
setType
(
TaskTypeEnum
.
项目资料补充
.
getKey
());
task
.
setType
(
TaskTypeEnum
.
项目资料补充
.
getKey
());
task
.
setTitle
(
title
);
task
.
setTitle
(
title
);
task
.
setContent
(
title
+
", 待审批"
);
task
.
setContent
(
title
+
", 待审批"
);
List
<
String
>
roleList
=
getRoleList
(
instanceId
);
List
<
String
>
roleList
=
getRoleList
(
instanceId
,
""
);
if
(!
ObjectUtils
.
isEmpty
(
roleList
))
{
if
(!
ObjectUtils
.
isEmpty
(
roleList
))
{
String
join
=
String
.
join
(
","
,
roleList
);
String
join
=
String
.
join
(
","
,
roleList
);
task
.
setRoleIds
(
join
);
task
.
setRoleIds
(
join
);
...
@@ -196,13 +196,32 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
...
@@ -196,13 +196,32 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
}
}
public
List
<
String
>
getRoleList
(
String
instanceId
)
{
public
List
<
String
>
getRoleList
(
String
instanceId
,
String
processName
)
{
ArrayList
<
String
>
roleIds
=
new
ArrayList
<>();
ArrayList
<
String
>
roleIds
=
new
ArrayList
<>();
try
{
try
{
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
// AjaxResult ajaxResult = Workflow.taskClient.getTask(instanceId);
JSONObject
data
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
// JSONObject data = JSON.parseObject(JSON.toJSONString(ajaxResult.get("data")));
if
(!
ObjectUtils
.
isEmpty
(
data
))
{
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
String
.
valueOf
(
data
.
get
(
"id"
)));
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
Workflow
.
taskClient
.
getTaskList
(
instanceId
)));
JSONArray
jsonArray
=
jsonObject
.
getJSONArray
(
"data"
);
if
(
jsonArray
.
size
()
>
1
)
{
for
(
Object
o:
jsonArray
){
String
name
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
)).
getString
(
"name"
);
if
(
processName
.
equals
(
name
)){
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
String
.
valueOf
(
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
)).
getString
(
"id"
)));
if
(!
ObjectUtils
.
isEmpty
(
taskGroupName
))
{
JSONArray
data2
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
if
(!
ObjectUtils
.
isEmpty
(
data2
))
{
data2
.
forEach
(
item
->
{
Map
item1
=
(
Map
)
item
;
roleIds
.
add
(
String
.
valueOf
(
item1
.
get
(
"groupId"
)));
});
}
}
}
}
}
else
if
(
jsonArray
.
size
()
==
1
)
{
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
String
.
valueOf
(
JSON
.
parseObject
(
JSON
.
toJSONString
(
jsonArray
.
get
(
0
))).
getString
(
"id"
)));
if
(!
ObjectUtils
.
isEmpty
(
taskGroupName
))
{
if
(!
ObjectUtils
.
isEmpty
(
taskGroupName
))
{
JSONArray
data2
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
JSONArray
data2
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
if
(!
ObjectUtils
.
isEmpty
(
data2
))
{
if
(!
ObjectUtils
.
isEmpty
(
data2
))
{
...
...
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