Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
01dfe880
Commit
01dfe880
authored
Dec 01, 2022
by
limei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
已办任务接口开发、任务统计
parent
09fde518
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
120 additions
and
8 deletions
+120
-8
TaskController.java
...n/amos/boot/module/ugp/biz/controller/TaskController.java
+20
-8
TaskServiceImpl.java
...mos/boot/module/ugp/biz/service/impl/TaskServiceImpl.java
+100
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/TaskController.java
View file @
01dfe880
...
...
@@ -19,9 +19,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.*
;
/**
...
...
@@ -140,16 +138,30 @@ public class TaskController {
*/
@RequestMapping
(
value
=
"/getTaskList"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取当前登录人的所有任务列表"
,
notes
=
"获取当前登录人的所有任务列表"
)
public
ResponseModel
<
List
<
TaskDto
>>
getTaskList
(
String
type
){
public
ResponseModel
<
Page
<
TaskDto
>>
getTaskList
(
String
type
,
Long
current
,
Long
size
){
Page
page
=
new
Page
(
current
,
size
);
List
<
TaskDto
>
taskDtoList
=
new
ArrayList
<>();
if
(
TaskTypeEnum
.
已
办
.
getKey
().
equals
(
type
)){
if
(
TaskTypeEnum
.
待
办
.
getKey
().
equals
(
type
)){
taskDtoList
.
addAll
(
iTzUgpTaskService
.
unDoneTask
());
}
else
{
taskDtoList
.
addAll
(
iTzUgpTaskService
.
doneTask
());
}
page
.
setRecords
(
taskDtoList
);
page
.
setTotal
(
taskDtoList
.
size
());
return
ResponseHelper
.
buildResponse
(
page
);
}
return
ResponseHelper
.
buildResponse
(
taskDtoList
);
/**
* 获取当前登录人的所有任务统计
* @return
*/
@RequestMapping
(
value
=
"/getTaskCount"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取当前登录人的所有任务统计"
,
notes
=
"获取当前登录人的所有任务统计"
)
public
ResponseModel
<
Map
>
getCount
(){
Map
<
String
,
String
>
map
=
new
HashMap
();
map
.
put
(
"myTask"
,
String
.
valueOf
(
iTzUgpTaskService
.
unDoneTask
().
size
()));
map
.
put
(
"todyCompletedTask"
,
String
.
valueOf
(
iTzUgpTaskService
.
doneTask
().
size
()));
return
ResponseHelper
.
buildResponse
(
map
);
}
}
...
...
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 @
01dfe880
...
...
@@ -42,6 +42,9 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
@Autowired
CompanyServiceImpl
companyService
;
@Autowired
ProjectInitiationServiceImpl
projectInitiationService
;
/**
* 获取当前登录人的所有待办事项
* @return
...
...
@@ -198,4 +201,101 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
return
task
;
}
/**
* 已办任务查询
* @return
*/
public
List
<
TaskDto
>
doneTask
(){
List
<
Project
>
projectList
=
projectResourceService
.
getProjectList
();
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
ReginParams
ReginParams
=
orgService
.
getReginParams
();
String
companyType
=
ReginParams
.
getBusinessInfo
().
getCompanyType
();
Long
companyId
=
ReginParams
.
getBusinessInfo
().
getCompanySequenceNbr
();
List
<
TaskDto
>
taskDtoList
=
new
ArrayList
<>();
if
(!
ValidationUtil
.
isEmpty
(
projectList
)){
for
(
Project
project
:
projectList
)
{
LambdaQueryWrapper
<
ProjectInitiation
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
ProjectInitiation:
:
getInstanceId
,
project
.
getInstanceId
());
List
<
ProjectInitiation
>
projectInitiationList
=
projectInitiationService
.
list
(
wrapper
);
if
(
OrgEnum
.
安装单位
.
getName
().
equals
(
companyType
))
{
for
(
ProjectInitiation
projectInitiation
:
projectInitiationList
)
{
if
(
ProjectInitiationEnum
.
提交资料
.
getName
().
equals
(
projectInitiation
.
getTaskName
()))
{
taskDtoList
.
add
(
setTask
(
projectInitiation
.
getTaskName
(),
true
,
TaskTypeEnum
.
填报
.
getKey
(),
projectInitiation
.
getRecDate
(),
project
.
getSequenceNbr
()));
}
}
}
else
if
(
OrgEnum
.
设计单位
.
getName
().
equals
(
companyType
))
{
for
(
ProjectInitiation
projectInitiation
:
projectInitiationList
)
{
if
(
ProjectInitiationEnum
.
提交资料
.
getName
().
equals
(
projectInitiation
.
getTaskName
()))
{
taskDtoList
.
add
(
setTask
(
projectInitiation
.
getTaskName
(),
true
,
TaskTypeEnum
.
填报
.
getKey
(),
projectInitiation
.
getRecDate
(),
project
.
getSequenceNbr
()));
}
}
}
else
if
(
OrgEnum
.
监察部门
.
getName
().
equals
(
companyType
))
{
for
(
ProjectInitiation
projectInitiation
:
projectInitiationList
)
{
if
(
ProjectInitiationEnum
.
接受告知
.
getName
().
equals
(
projectInitiation
.
getTaskName
()))
{
taskDtoList
.
add
(
setTask
(
projectInitiation
.
getTaskName
(),
true
,
TaskTypeEnum
.
流程
.
getKey
(),
projectInitiation
.
getRecDate
(),
project
.
getSequenceNbr
()));
}
}
}
else
if
(
OrgEnum
.
监检机构
.
getName
().
equals
(
companyType
))
{
for
(
ProjectInitiation
projectInitiation
:
projectInitiationList
)
{
if
(
ProjectInitiationEnum
.
审查项目
.
getName
().
equals
(
projectInitiation
.
getTaskName
())
||
ProjectInitiationEnum
.
监检科室分配
.
getName
().
equals
(
projectInitiation
.
getTaskName
())
||
ProjectInitiationEnum
.
监检员分配
.
getName
().
equals
(
projectInitiation
.
getTaskName
())
||
ProjectInitiationEnum
.
监检员审核
.
getName
().
equals
(
projectInitiation
.
getTaskName
()))
{
taskDtoList
.
add
(
setTask
(
projectInitiation
.
getTaskName
(),
true
,
TaskTypeEnum
.
流程
.
getKey
(),
projectInitiation
.
getRecDate
(),
project
.
getSequenceNbr
()));
}
}
}
//质量问题
List
<
ProjectInitiation
>
projectInitiations
=
new
ArrayList
<>();
for
(
Project
project1
:
projectList
)
{
LambdaQueryWrapper
<
QualityProblem
>
queryWrapper
=
new
LambdaQueryWrapper
();
queryWrapper
.
eq
(
QualityProblem:
:
getProjectId
,
project1
.
getSequenceNbr
());
List
<
QualityProblem
>
qualityProblems
=
qualityProblemService
.
list
(
queryWrapper
);
for
(
QualityProblem
qualityProblem
:
qualityProblems
)
{
LambdaQueryWrapper
<
ProjectInitiation
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrapper
.
eq
(
ProjectInitiation:
:
getInstanceId
,
qualityProblem
.
getInstanceId
());
List
<
ProjectInitiation
>
projectInitiation
=
projectInitiationService
.
list
(
lambdaQueryWrapper
);
projectInitiations
.
addAll
(
projectInitiation
);
}
}
if
(
OrgEnum
.
安装单位
.
getKey
().
equals
(
companyType
))
{
for
(
ProjectInitiation
projectInitiation
:
projectInitiations
)
{
if
(
ProblemProcessEnum
.
编制处理方案
.
getName
().
equals
(
projectInitiation
.
getTaskName
())
||
ProblemProcessEnum
.
提交整改书
.
getName
().
equals
(
projectInitiation
.
getTaskName
()))
{
taskDtoList
.
add
(
setTask
(
projectInitiation
.
getTaskName
(),
true
,
TaskTypeEnum
.
填报
.
getKey
(),
projectInitiation
.
getRecDate
(),
project
.
getSequenceNbr
()));
}
}
}
else
if
(
OrgEnum
.
建设单位
.
getKey
().
equals
(
companyType
))
{
for
(
ProjectInitiation
projectInitiation
:
projectInitiations
)
{
if
(
ProblemProcessEnum
.
审查处理方案
.
getName
().
equals
(
projectInitiation
.
getTaskName
()))
{
taskDtoList
.
add
(
setTask
(
projectInitiation
.
getTaskName
(),
true
,
TaskTypeEnum
.
流程
.
getKey
(),
projectInitiation
.
getRecDate
(),
project
.
getSequenceNbr
()));
}
}
}
else
if
(
OrgEnum
.
监检机构
.
getKey
().
equals
(
companyType
))
{
for
(
ProjectInitiation
projectInitiation
:
projectInitiations
)
{
if
(
ProblemProcessEnum
.
确定问题
.
getName
().
equals
(
projectInitiation
.
getTaskName
())
||
ProblemProcessEnum
.
问题分类
.
getName
().
equals
(
projectInitiation
.
getTaskName
())
||
ProblemProcessEnum
.
审查整改过程
.
getName
().
equals
(
projectInitiation
.
getTaskName
()))
{
taskDtoList
.
add
(
setTask
(
projectInitiation
.
getTaskName
(),
true
,
TaskTypeEnum
.
流程
.
getKey
(),
projectInitiation
.
getRecDate
(),
project
.
getSequenceNbr
()));
}
}
}
}
//企业审核任务
Set
<
Integer
>
regionCodes
=
new
HashSet
<>();
LambdaQueryWrapper
<
SuperviseRule
>
wrapper1
=
new
LambdaQueryWrapper
<>();
if
(
OrgEnum
.
监察部门
.
getKey
().
equals
(
companyType
))
{
wrapper1
.
eq
(
SuperviseRule:
:
getSuperviseDeptId
,
companyId
);
}
else
if
(
OrgEnum
.
监检机构
.
getKey
().
equals
(
companyType
))
{
wrapper1
.
eq
(
SuperviseRule:
:
getInspectionUnitId
,
companyId
);
}
for
(
SuperviseRule
superviseRule:
superviseRuleService
.
list
(
wrapper1
)){
regionCodes
.
add
(
superviseRule
.
getAdminRegionCode
());
}
LambdaQueryWrapper
<
Company
>
companyWrapper
=
new
LambdaQueryWrapper
<>();
companyWrapper
.
in
(
Company:
:
getRegionCode
,
regionCodes
).
eq
(
Company
::
getApproved
,
CompanyExamineEnum
.
企业审核
.
getYes
());
List
<
Company
>
companyList
=
companyService
.
list
(
companyWrapper
);
for
(
Company
company
:
companyList
)
{
taskDtoList
.
add
(
setTask
(
null
,
true
,
TaskTypeEnum
.
企业审核
.
getKey
(),
company
.
getRecDate
(),
company
.
getSequenceNbr
()));
}
}
return
taskDtoList
;
}
}
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