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
93972071
Commit
93972071
authored
Aug 01, 2023
by
litengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码提交
parent
ff4c6fbb
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
54 additions
and
23 deletions
+54
-23
ProjectInitiationEnum.java
.../amos/boot/module/ugp/api/Enum/ProjectInitiationEnum.java
+5
-0
XJConstant.java
...eejoin/amos/boot/module/ugp/api/constants/XJConstant.java
+1
-0
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+5
-0
TaskController.java
...n/amos/boot/module/ugp/biz/controller/TaskController.java
+5
-0
ProblemInitiationServiceImpl.java
...le/ugp/biz/service/impl/ProblemInitiationServiceImpl.java
+2
-2
ProcessRelationServiceImpl.java
...dule/ugp/biz/service/impl/ProcessRelationServiceImpl.java
+1
-1
ProjectInitiationServiceImpl.java
...le/ugp/biz/service/impl/ProjectInitiationServiceImpl.java
+22
-20
TaskServiceImpl.java
...mos/boot/module/ugp/biz/service/impl/TaskServiceImpl.java
+13
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/Enum/ProjectInitiationEnum.java
View file @
93972071
...
...
@@ -23,6 +23,11 @@ public enum ProjectInitiationEnum {
设计负责人指定项目资料员
(
""
,
"设计项目负责人分配资料员"
,
""
,
"设计项目负责人分配资料员"
,
"设计项目负责人分配资料员"
,
"待审核"
),
安装负责人指定项目负责人
(
""
,
"安装负责人分配项目负责人"
,
""
,
"安装负责人分配项目负责人"
,
"安装负责人分配项目负责人"
,
"待审核"
),
安装负责人指定项目资料员
(
""
,
"安装项目负责人分配资料员"
,
""
,
"安装项目负责人分配资料员"
,
"安装项目负责人分配资料员"
,
"待审核"
),
建设单位资料员预审
(
""
,
"建设单位资料员预审"
,
""
,
"建设单位资料员预审"
,
"建设单位资料员预审"
,
"待审核"
),
项目负责任人审核
(
""
,
"项目负责任人审核"
,
""
,
"项目负责任人审核"
,
"项目负责任人审核"
,
"待审核"
),
负责人审批
(
""
,
"负责人审批"
,
""
,
"负责人审批"
,
"负责人审批"
,
"待审核"
),
提交指定
(
"6"
,
"提交指定"
,
"TJZL"
,
""
,
""
,
""
),
安装资料审核
(
""
,
"安装资料审核"
,
"AZZLSH"
,
"安装资料待审核"
,
"安装资料审核"
,
"待审核"
),
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/constants/XJConstant.java
View file @
93972071
...
...
@@ -58,6 +58,7 @@ public class XJConstant {
public
static
final
String
SJZL_PRESON
=
"sjzlPerson"
;
public
static
final
String
AZFZ_PRESON
=
"azfzPerson"
;
public
static
final
String
AZZL_PRESON
=
"azzlPerson"
;
public
static
final
String
CONDITION
=
"condition"
;
/**
* 构造方法
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectController.java
View file @
93972071
...
...
@@ -282,6 +282,7 @@ public class ProjectController extends BaseController {
String
sjzl
=
json
.
getString
(
XJConstant
.
SJZL_PRESON
);
String
azfz
=
json
.
getString
(
XJConstant
.
AZFZ_PRESON
);
String
azzl
=
json
.
getString
(
XJConstant
.
AZZL_PRESON
);
String
condition
=
json
.
getString
(
XJConstant
.
CONDITION
);
if
(!
ValidationUtil
.
isEmpty
(
insPerson
)){
Map
map
=
orgServiceImpl
.
getdetialInfo
(
insDepId
);
jsonObject
.
put
(
XJConstant
.
INS_PRESON
,
insPerson
);
...
...
@@ -332,6 +333,10 @@ public class ProjectController extends BaseController {
if
(
ValidationUtil
.
isEmpty
(
option
)){
option
=
"1"
;
}
if
(
condition
.
equals
(
"0"
))
{
option
=
"0"
;
}
projectInitiationService
.
execute
(
project
.
getInstanceId
(),
jsonObject
,
option
,
null
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/TaskController.java
View file @
93972071
...
...
@@ -172,9 +172,14 @@ public class TaskController {
Long
amosBizCode
=
reginParams
.
getBusinessInfo
().
getAmosBizCode
();
List
<
RoleModel
>
roleModels
=
reginParams
.
getUserModel
().
getOrgRoles
().
get
(
amosBizCode
);
ArrayList
<
String
>
roleIds
=
new
ArrayList
<>();
if
(
null
==
roleModels
)
{
roleModels
=
reginParams
.
getUserModel
().
getOrgRoles
().
get
(
reginParams
.
getDepartment
().
getSequenceNbr
());
}
roleModels
.
forEach
(
item
->{
roleIds
.
add
(
String
.
valueOf
(
item
.
getSequenceNbr
()));
});
IPage
<
Task
>
page
=
new
Page
(
current
,
size
);
// LambdaQueryWrapper<Task> wrapper = new LambdaQueryWrapper<>();
// wrapper.eq(Task::getUnitId,unitId);
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProblemInitiationServiceImpl.java
View file @
93972071
...
...
@@ -102,7 +102,7 @@ public class ProblemInitiationServiceImpl {
}
qualityProblem
.
setInstanceId
(
instanceId
);
try
{
qualityProblem
.
setStatus
(
projectInitiationService
.
getFlowTaskName
(
instanceId
));
qualityProblem
.
setStatus
(
projectInitiationService
.
getFlowTaskName
(
null
,
false
,
null
,
null
,
null
,
null
,
null
,
null
,
instanceId
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -441,7 +441,7 @@ public class ProblemInitiationServiceImpl {
wrapper
.
eq
(
QualityProblem:
:
getInstanceId
,
instanceId
);
QualityProblem
qualityProblem
=
qualityProblemService
.
getOne
(
wrapper
);
try
{
qualityProblem
.
setStatus
(
projectInitiationService
.
getFlowTaskName
(
instanceId
));
qualityProblem
.
setStatus
(
projectInitiationService
.
getFlowTaskName
(
null
,
false
,
null
,
null
,
null
,
null
,
null
,
null
,
instanceId
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProcessRelationServiceImpl.java
View file @
93972071
...
...
@@ -62,7 +62,7 @@ public class ProcessRelationServiceImpl extends BaseService<ProcessRelationDto,
ProcessRelation
processRelation
=
this
.
getOne
(
wrapper
);
try
{
if
(
ValidationUtil
.
isEmpty
(
taskName
))
{
taskName
=
projectInitiationService
.
getFlowTaskName
(
instanceId
);
taskName
=
projectInitiationService
.
getFlowTaskName
(
null
,
false
,
null
,
null
,
null
,
null
,
null
,
null
,
instanceId
);
}
processRelation
.
setStatus
(
taskName
);
this
.
updateById
(
processRelation
);
...
...
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 @
93972071
...
...
@@ -204,7 +204,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
}
String
taskName
=
null
;
try
{
taskName
=
getFlowTaskName
(
instanceId
);
taskName
=
getFlowTaskName
(
null
,
false
,
null
,
null
,
null
,
null
,
null
,
null
,
instanceId
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -313,7 +313,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
taskService
.
saveOrUpdateTask
(
project
.
getStatus
(),
true
,
taskType
,
new
Date
(),
project
.
getSequenceNbr
(),
TaskTypeEnum
.
项目立项
.
getKey
(),
unitIds
,
extendId
,
instanceId
);
//更新project种的status字段,更新关系表中的state字段,表示当前流程下一个执行的任务
boolean
bool
=
updateFlowStatus
(
instanceId
);
boolean
bool
=
updateFlowStatus
(
project
.
getStatus
(),
true
,
taskType
,
new
Date
(),
project
.
getSequenceNbr
(),
TaskTypeEnum
.
项目立项
.
getKey
(),
unitIds
,
extendId
,
instanceId
);
//如果更新了status状态 新增任务表的状态 待办
if
(
bool
)
{
...
...
@@ -346,6 +346,10 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
unitIds
.
add
(
project
.
getConstructionUnitId
());
taskType
=
TaskTypeEnum
.
填报
.
getKey
();
}
if
(
ProjectInitiationEnum
.
建设单位资料员预审
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
项目负责任人审核
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
负责人审批
.
getName
().
equals
(
project
.
getStatus
()))
{
unitIds
.
add
(
project
.
getConstructionUnitId
());
taskType
=
TaskTypeEnum
.
流程
.
getKey
();
}
if
(
ProjectInitiationEnum
.
设计负责人指定项目负责人
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
设计负责人指定项目资料员
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
安装负责人指定项目负责人
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
安装负责人指定项目资料员
.
getName
().
equals
(
project
.
getStatus
()))
{
if
(
OrgEnum
.
安装单位
.
getKey
().
equals
(
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanyType
())){
...
...
@@ -519,7 +523,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
* @param instanceId
* @return
*/
public
String
getFlowTaskName
(
String
instanceId
){
public
String
getFlowTaskName
(
String
InitiationStatus
,
boolean
status
,
String
taskType
,
Date
sendTime
,
Long
sourceId
,
String
type
,
List
<
Long
>
unitIds
,
Long
extendId
,
String
instanceId
){
JSONObject
dataObject
=
new
JSONObject
();
boolean
isEnd
=
false
;
try
{
...
...
@@ -539,10 +543,14 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
return
ProjectInitiationEnum
.
提交资料
.
getName
();
}
if
(
ProjectInitiationEnum
.
安装负责人指定项目负责人
.
getName
().
equals
(
name
)){
return
ProjectInitiationEnum
.
安装负责人指定项目负责人
.
getName
();
if
(!
taskService
.
findTheTask
(
instanceId
,
ProjectInitiationEnum
.
安装负责人指定项目负责人
.
getName
()))
{
taskService
.
saveOrUpdateTask
(
ProjectInitiationEnum
.
安装负责人指定项目负责人
.
getName
(),
false
,
taskType
,
sendTime
,
sourceId
,
TaskTypeEnum
.
项目立项
.
getKey
(),
unitIds
,
extendId
,
instanceId
);
}
}
if
(
ProjectInitiationEnum
.
设计负责人指定项目负责人
.
getName
().
equals
(
name
)){
return
ProjectInitiationEnum
.
设计负责人指定项目负责人
.
getName
();
if
(!
taskService
.
findTheTask
(
instanceId
,
ProjectInitiationEnum
.
安装负责人指定项目负责人
.
getName
()))
{
taskService
.
saveOrUpdateTask
(
ProjectInitiationEnum
.
设计负责人指定项目负责人
.
getName
(),
false
,
taskType
,
sendTime
,
sourceId
,
TaskTypeEnum
.
项目立项
.
getKey
(),
unitIds
,
extendId
,
instanceId
);
}
}
if
(
ProjectInitiationEnum
.
监检员审核
.
getName
().
equals
(
name
)){
isEnd
=
true
;
...
...
@@ -565,20 +573,14 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
OrgServiceImpl
orgService
;
@BusinessIdentify
public
boolean
updateFlowStatus
(
String
instanceId
){
public
boolean
updateFlowStatus
(
String
InitiationStatus
,
boolean
status
,
String
taskType
,
Date
sendTime
,
Long
sourceId
,
String
type
,
List
<
Long
>
unitIds
,
Long
extendId
,
String
instanceId
){
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Project:
:
getInstanceId
,
instanceId
);
Project
project
=
projectService
.
getOne
(
wrapper
);
String
taskName
=
getFlowTaskName
(
instanceId
);
String
taskName
=
getFlowTaskName
(
InitiationStatus
,
status
,
taskType
,
sendTime
,
sourceId
,
type
,
unitIds
,
extendId
,
instanceId
);
boolean
bool
=
true
;
if
((
project
.
getStatus
().
contains
(
ProjectInitiationEnum
.
安装资料审批
.
getName
())
||
project
.
getStatus
().
contains
(
ProjectInitiationEnum
.
设计资料审批
.
getName
()))
&&
"流程结束!"
.
equals
(
taskName
)){
bool
=
false
;
// if(OrgEnum.安装单位.getKey().equals(orgService.getReginParams().getBusinessInfo().getCompanyType())){
// taskName = ProjectInitiationEnum.设计开工资料提交.getName();
// }
// if(OrgEnum.设计单位.getKey().equals(orgService.getReginParams().getBusinessInfo().getCompanyType())){
// taskName = ProjectInitiationEnum.安装开工资料提交.getName();
// }
}
if
(
ProjectInitiationEnum
.
修改资料
.
getName
().
equals
(
project
.
getStatus
())
&&
ProjectInitiationEnum
.
监检员审核
.
getName
().
equals
(
taskName
)){
String
companyType
=
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanyType
();
...
...
@@ -630,13 +632,13 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
return
bool
;
}
public
void
updateProjectFlowStatus
(
String
instanceId
){
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Project:
:
getInstanceId
,
instanceId
);
Project
project
=
projectService
.
getOne
(
wrapper
);
project
.
setStatus
(
getFlowTaskName
(
instanceId
));
projectService
.
updateById
(
project
);
}
//
public void updateProjectFlowStatus(String instanceId){
//
LambdaQueryWrapper<Project> wrapper = new LambdaQueryWrapper<>();
//
wrapper.eq(Project::getInstanceId,instanceId);
//
Project project = projectService.getOne(wrapper);
//
project.setStatus(getFlowTaskName(instanceId));
//
projectService.updateById(project);
//
}
@Override
...
...
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 @
93972071
...
...
@@ -234,4 +234,17 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
}
}
public
boolean
findTheTask
(
String
instanceId
,
String
title
)
{
LambdaQueryWrapper
<
Task
>
lambda
=
new
QueryWrapper
<
Task
>().
lambda
();
lambda
.
eq
(
Task:
:
getInstanceId
,
instanceId
);
lambda
.
eq
(
Task:
:
getTitle
,
title
);
List
<
Task
>
tasks
=
this
.
getBaseMapper
().
selectList
(
lambda
);
if
(!
ObjectUtils
.
isEmpty
(
tasks
))
{
return
true
;
}
else
{
return
false
;
}
}
}
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