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
691d1c27
Commit
691d1c27
authored
Dec 12, 2022
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改ugp任务逻辑
parent
d6ebfffd
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
63 additions
and
366 deletions
+63
-366
TaskDto.java
...ava/com/yeejoin/amos/boot/module/ugp/api/dto/TaskDto.java
+3
-3
TzUgpPathDto.java
...om/yeejoin/amos/boot/module/ugp/api/dto/TzUgpPathDto.java
+0
-11
TzUgpPath.java
...om/yeejoin/amos/boot/module/ugp/api/entity/TzUgpPath.java
+1
-9
CompanyController.java
...mos/boot/module/ugp/biz/controller/CompanyController.java
+1
-3
CompanyServiceImpl.java
.../boot/module/ugp/biz/service/impl/CompanyServiceImpl.java
+1
-3
ProblemInitiationServiceImpl.java
...le/ugp/biz/service/impl/ProblemInitiationServiceImpl.java
+2
-3
ProjectInitiationServiceImpl.java
...le/ugp/biz/service/impl/ProjectInitiationServiceImpl.java
+2
-24
TaskServiceImpl.java
...mos/boot/module/ugp/biz/service/impl/TaskServiceImpl.java
+53
-310
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/TaskDto.java
View file @
691d1c27
...
...
@@ -20,7 +20,7 @@ public class TaskDto extends BaseDto {
private
String
title
;
private
Long
project
Id
;
private
Long
source
Id
;
private
Boolean
status
;
...
...
@@ -34,9 +34,9 @@ public class TaskDto extends BaseDto {
private
String
agencyCode
;
private
Integer
companyId
;
Object
extend
;
//url
Integer
number
;
//状态码
private
Date
sendTime
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/TzUgpPathDto.java
View file @
691d1c27
...
...
@@ -25,14 +25,4 @@ public class TzUgpPathDto extends BaseDto {
private
String
url
;
private
Integer
status
;
private
Long
recUserId
;
private
Date
recDate
;
private
Integer
isDelete
;
private
String
recUserName
;
}
\ No newline at end of file
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/entity/TzUgpPath.java
View file @
691d1c27
...
...
@@ -19,6 +19,7 @@ import java.util.Date;
@TableName
(
"tz_ugp_path"
)
public
class
TzUgpPath
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
name
;
/**
* url路径
...
...
@@ -26,14 +27,6 @@ public class TzUgpPath extends BaseEntity {
private
String
url
;
private
Integer
status
;
private
Long
recUserId
;
private
Date
recDate
;
private
Integer
isDelete
;
private
String
recUserName
;
}
\ No newline at end of file
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/CompanyController.java
View file @
691d1c27
...
...
@@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.mysql.cj.xdevapi.JsonArray
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
...
...
@@ -49,7 +48,6 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.swing.text.StyledEditorKit
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -132,7 +130,7 @@ public class CompanyController extends BaseController {
unitIds
.
add
(
superviseRule
.
getSuperviseDeptId
());
unitIds
.
add
(
superviseRule
.
getInspectionUnitId
());
//新增企业审核任务信息
taskService
.
s
et
Task
(
null
,
false
,
TaskTypeEnum
.
企业审核
.
getKey
(),
new
Date
(),
model
.
getSequenceNbr
(),
TaskTypeEnum
.
企业审核
.
getKey
(),
unitIds
);
taskService
.
s
aveOrUpdate
Task
(
null
,
false
,
TaskTypeEnum
.
企业审核
.
getKey
(),
new
Date
(),
model
.
getSequenceNbr
(),
TaskTypeEnum
.
企业审核
.
getKey
(),
unitIds
);
return
ResponseHelper
.
buildResponse
(
model
);
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/CompanyServiceImpl.java
View file @
691d1c27
...
...
@@ -33,7 +33,6 @@ import java.util.ArrayList;
import
java.util.Date
;
import
java.util.List
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* 企业信息表服务实现类
...
...
@@ -261,8 +260,7 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
unitIds
.
add
(
superviseRule
.
getSuperviseDeptId
());
unitIds
.
add
(
superviseRule
.
getInspectionUnitId
());
//新增企业审核任务信息
taskService
.
setTask
(
null
,
true
,
TaskTypeEnum
.
企业审核
.
getKey
(),
new
Date
(),
model
.
getSequenceNbr
(),
TaskTypeEnum
.
企业审核
.
getKey
(),
unitIds
);
taskService
.
saveOrUpdateTask
(
null
,
true
,
TaskTypeEnum
.
企业审核
.
getKey
(),
new
Date
(),
model
.
getSequenceNbr
(),
TaskTypeEnum
.
企业审核
.
getKey
(),
unitIds
);
return
this
.
updateById
(
company
);
}
public
CompanyDto
queryBySeq1
(
Long
sequenceNbr
)
{
...
...
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 @
691d1c27
...
...
@@ -20,7 +20,6 @@ import com.yeejoin.amos.feign.workflow.model.AjaxResult;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.parsing.Problem
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
...
...
@@ -150,7 +149,7 @@ public class ProblemInitiationServiceImpl {
//更新任务表的状态 已办
if
(!
ValidationUtil
.
isEmpty
(
unitIds
))
{
taskType
=
getUnitId
(
unitIds
,
objectd
);
taskService
.
s
et
Task
(
objectd
.
getStatus
(),
true
,
taskType
,
new
Date
(),
object
.
getLong
(
"sequenceNbr"
),
TaskTypeEnum
.
质量问题
.
getKey
(),
unitIds
);
taskService
.
s
aveOrUpdate
Task
(
objectd
.
getStatus
(),
true
,
taskType
,
new
Date
(),
object
.
getLong
(
"sequenceNbr"
),
TaskTypeEnum
.
质量问题
.
getKey
(),
unitIds
);
}
//更新problem中的status字段,表示当前流程下一个执行的任务
...
...
@@ -161,7 +160,7 @@ public class ProblemInitiationServiceImpl {
if
(!
ValidationUtil
.
isEmpty
(
unitIds
))
{
taskType
=
getUnitId
(
unitIds
,
objectd
);
taskService
.
s
et
Task
(
objectd
.
getStatus
(),
false
,
taskType
,
new
Date
(),
object
.
getLong
(
"sequenceNbr"
),
TaskTypeEnum
.
质量问题
.
getKey
(),
unitIds
);
taskService
.
s
aveOrUpdate
Task
(
objectd
.
getStatus
(),
false
,
taskType
,
new
Date
(),
object
.
getLong
(
"sequenceNbr"
),
TaskTypeEnum
.
质量问题
.
getKey
(),
unitIds
);
}
}
}
...
...
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 @
691d1c27
...
...
@@ -3,54 +3,32 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.google.common.collect.Maps
;
import
com.mao.expertSystem.WeldingQualification
;
import
com.mao.expertSystem.material.MyPqr
;
import
com.mao.expertSystem.material.MyWps
;
import
com.yeejoin.amos.boot.biz.common.service.impl.WorkflowExcuteServiceImpl
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.AuditEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectInitiationEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.SMSEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.TaskTypeEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Util.CommonResponse
;
import
com.yeejoin.amos.boot.module.ugp.api.Util.HttpUtil
;
import
com.yeejoin.amos.boot.module.ugp.api.constants.XJConstant
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectInitiationDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.*
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectInitiationMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IProjectInitiationService
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.client.AgencyUserClient
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.rule.model.IdxProjectModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.SmsRecordModel
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.client.TaskClient
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
org.bouncycastle.pqc.crypto.newhope.NHOtherInfoGenerator
;
import
org.drools.core.factmodel.traits.TraitTypeEnum
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.*
;
...
...
@@ -194,7 +172,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
//更新任务表的状态 已办
if
(!
ValidationUtil
.
isEmpty
(
unitIds
))
{
taskType
=
getUnitId
(
unitIds
,
project
,
superviseRule
);
taskService
.
s
et
Task
(
project
.
getStatus
(),
true
,
taskType
,
new
Date
(),
object
.
getLong
(
"sequenceNbr"
),
TaskTypeEnum
.
项目立项
.
getKey
(),
unitIds
);
taskService
.
s
aveOrUpdate
Task
(
project
.
getStatus
(),
true
,
taskType
,
new
Date
(),
object
.
getLong
(
"sequenceNbr"
),
TaskTypeEnum
.
项目立项
.
getKey
(),
unitIds
);
}
//更新project种的status字段,表示当前流程下一个执行的任务
...
...
@@ -204,7 +182,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
if
(!
ValidationUtil
.
isEmpty
(
unitIds
))
{
project
=
projectService
.
getById
(
object
.
getLong
(
"sequenceNbr"
));
taskType
=
getUnitId
(
unitIds
,
project
,
superviseRule
);
taskService
.
s
et
Task
(
project
.
getStatus
(),
false
,
taskType
,
new
Date
(),
object
.
getLong
(
"sequenceNbr"
),
TaskTypeEnum
.
项目立项
.
getKey
(),
unitIds
);
taskService
.
s
aveOrUpdate
Task
(
project
.
getStatus
(),
false
,
taskType
,
new
Date
(),
object
.
getLong
(
"sequenceNbr"
),
TaskTypeEnum
.
项目立项
.
getKey
(),
unitIds
);
}
}
}
...
...
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 @
691d1c27
...
...
@@ -51,328 +51,71 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
TzUgpPathDao
tzUgpPathDao
;
/**
* 获取当前登录人的所有待办事项
* @return
*/
@BusinessIdentify
public
List
<
TaskDto
>
unDoneTask
(){
List
<
TaskDto
>
taskDtoList
=
new
ArrayList
<>();
TaskDto
task
=
new
TaskDto
();
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"extend"
,
""
);
ReginParams
ReginParams
=
orgService
.
getReginParams
();
String
companyType
=
ReginParams
.
getBusinessInfo
().
getCompanyType
();
Long
companyId
=
ReginParams
.
getBusinessInfo
().
getCompanySequenceNbr
();
List
<
Project
>
projectList
=
projectResourceService
.
getProjectList
();
if
(!
ValidationUtil
.
isEmpty
(
projectList
))
{
//项目流程任务
if
(
OrgEnum
.
安装单位
.
getKey
().
equals
(
companyType
))
{
for
(
Project
project
:
projectList
)
{
if
(
ProjectInitiationEnum
.
提交资料
.
getName
().
equals
(
project
.
getStatus
())
)
{
TaskDto
taskDto
=
setTask
(
project
.
getStatus
(),
false
,
TaskTypeEnum
.
填报
.
getKey
(),
project
.
getRecDate
(),
project
.
getSequenceNbr
(),
UrlEnum
.
待办安装单位上传监检资料
.
getStatus
());
taskDtoList
.
add
(
taskDto
);
}
if
(
ProjectInitiationEnum
.
告知申请
.
getName
().
equals
(
project
.
getStatus
()))
{
TaskDto
taskDto
=
setTask
(
project
.
getStatus
(),
false
,
TaskTypeEnum
.
填报
.
getKey
(),
project
.
getRecDate
(),
project
.
getSequenceNbr
(),
UrlEnum
.
待办安装单位告知申请
.
getStatus
());
taskDtoList
.
add
(
taskDto
);
}
if
(
ProjectInitiationEnum
.
审核人审核
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
审批人审批
.
getName
().
equals
(
project
.
getStatus
()))
{
taskDtoList
.
add
(
setTask
(
project
.
getStatus
(),
false
,
TaskTypeEnum
.
流程
.
getKey
(),
project
.
getRecDate
(),
project
.
getSequenceNbr
(),
null
));
}
}
}
else
if
(
OrgEnum
.
建设单位
.
getKey
().
equals
(
companyType
))
{
for
(
Project
project
:
projectList
)
{
if
(
ProjectInitiationEnum
.
项目立项
.
getName
().
equals
(
project
.
getStatus
()))
{
taskDtoList
.
add
(
setTask
(
project
.
getStatus
(),
false
,
TaskTypeEnum
.
填报
.
getKey
(),
project
.
getRecDate
(),
project
.
getSequenceNbr
(),
null
));
}
}
}
else
if
(
OrgEnum
.
设计单位
.
getKey
().
equals
(
companyType
))
{
for
(
Project
project
:
projectList
)
{
if
(
ProjectInitiationEnum
.
提交资料
.
getName
().
equals
(
project
.
getStatus
()))
{
taskDtoList
.
add
(
setTask
(
project
.
getStatus
(),
false
,
TaskTypeEnum
.
填报
.
getKey
(),
project
.
getRecDate
(),
project
.
getSequenceNbr
(),
UrlEnum
.
待办设计单位上传监检资料
.
getStatus
()));
}
if
(
ProjectInitiationEnum
.
审批人审批
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
审核人审核
.
getName
().
equals
(
project
.
getStatus
()))
{
taskDtoList
.
add
(
setTask
(
project
.
getStatus
(),
false
,
TaskTypeEnum
.
流程
.
getKey
(),
project
.
getRecDate
(),
project
.
getSequenceNbr
(),
null
));
}
}
}
else
if
(
OrgEnum
.
监察部门
.
getKey
().
equals
(
companyType
))
{
for
(
Project
project
:
projectList
)
{
if
(
ProjectInitiationEnum
.
平台审核
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
接受审查意见
.
getName
().
equals
(
project
.
getStatus
())
)
{
taskDtoList
.
add
(
setTask
(
project
.
getStatus
(),
false
,
TaskTypeEnum
.
流程
.
getKey
(),
project
.
getRecDate
(),
project
.
getSequenceNbr
(),
null
));
}
if
(
ProjectInitiationEnum
.
接受告知
.
getName
().
equals
(
project
.
getStatus
()))
{
taskDtoList
.
add
(
setTask
(
project
.
getStatus
(),
false
,
TaskTypeEnum
.
流程
.
getKey
(),
project
.
getRecDate
(),
project
.
getSequenceNbr
(),
UrlEnum
.
待办监察单位确认接收的告知申请
.
getStatus
()));
}
}
}
else
if
(
OrgEnum
.
监检机构
.
getKey
().
equals
(
companyType
))
{
for
(
Project
project
:
projectList
)
{
if
(
ProjectInitiationEnum
.
监检科室分配
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
监检员分配
.
getName
().
equals
(
project
.
getStatus
())
)
{
taskDtoList
.
add
(
setTask
(
project
.
getStatus
(),
false
,
TaskTypeEnum
.
流程
.
getKey
(),
project
.
getRecDate
(),
project
.
getSequenceNbr
(),
null
));
}
if
(
ProjectInitiationEnum
.
监检员审核
.
getName
().
equals
(
project
.
getStatus
()))
{
taskDtoList
.
add
(
setTask
(
project
.
getStatus
(),
false
,
TaskTypeEnum
.
流程
.
getKey
(),
project
.
getRecDate
(),
project
.
getSequenceNbr
(),
UrlEnum
.
待办验检测单位审核告知申请
.
getStatus
()));
}
if
(
ProjectInitiationEnum
.
审查项目
.
getName
().
equals
(
project
.
getStatus
())
)
{
taskDtoList
.
add
(
setTask
(
project
.
getStatus
(),
false
,
TaskTypeEnum
.
流程
.
getKey
(),
project
.
getRecDate
(),
project
.
getSequenceNbr
(),
UrlEnum
.
待办检验检测单位审批项目监检资料
.
getStatus
()));
}
}
}
//问题处置环节流程任务
List
<
QualityProblem
>
qualityProblemList
=
new
ArrayList
<>();
for
(
Project
project:
projectList
){
qualityProblemList
.
addAll
(
qualityProblemService
.
list
(
new
LambdaQueryWrapper
<
QualityProblem
>().
eq
(
QualityProblem:
:
getProjectId
,
project
.
getSequenceNbr
())));
}
if
(
OrgEnum
.
安装单位
.
getKey
().
equals
(
companyType
))
{
for
(
QualityProblem
qualityProblem
:
qualityProblemList
)
{
if
(
ProblemProcessEnum
.
编制处理方案
.
getName
().
equals
(
qualityProblem
.
getStatus
())
)
{
TaskDto
taskDto
=
setTask
(
qualityProblem
.
getStatus
(),
false
,
TaskTypeEnum
.
填报
.
getKey
(),
qualityProblem
.
getRecDate
(),
qualityProblem
.
getSequenceNbr
(),
UrlEnum
.
待办安装单位编制质量问题处理
.
getStatus
());
taskDtoList
.
add
(
taskDto
);
}
if
(
ProblemProcessEnum
.
提交整改书
.
getName
().
equals
(
qualityProblem
.
getStatus
()))
{
TaskDto
taskDto
=
setTask
(
qualityProblem
.
getStatus
(),
false
,
TaskTypeEnum
.
填报
.
getKey
(),
qualityProblem
.
getRecDate
(),
qualityProblem
.
getSequenceNbr
(),
UrlEnum
.
待办安装单位提交整改书
.
getStatus
());
taskDtoList
.
add
(
taskDto
);
}
}
}
else
if
(
OrgEnum
.
建设单位
.
getKey
().
equals
(
companyType
))
{
for
(
QualityProblem
qualityProblem
:
qualityProblemList
)
{
if
(
ProblemProcessEnum
.
审查处理方案
.
getName
().
equals
(
qualityProblem
.
getStatus
()))
{
taskDtoList
.
add
(
setTask
(
qualityProblem
.
getStatus
(),
false
,
TaskTypeEnum
.
流程
.
getKey
(),
qualityProblem
.
getRecDate
(),
qualityProblem
.
getSequenceNbr
(),
UrlEnum
.
待办建设单位审查质量问题处理方案
.
getStatus
()));
}
}
}
else
if
(
OrgEnum
.
监检机构
.
getKey
().
equals
(
companyType
))
{
for
(
QualityProblem
qualityProblem
:
qualityProblemList
)
{
if
(
ProblemProcessEnum
.
问题分类
.
getName
().
equals
(
qualityProblem
.
getStatus
())
)
{
taskDtoList
.
add
(
setTask
(
qualityProblem
.
getStatus
(),
false
,
TaskTypeEnum
.
流程
.
getKey
(),
qualityProblem
.
getRecDate
(),
qualityProblem
.
getSequenceNbr
(),
UrlEnum
.
待办检验检测单位问题分类
.
getStatus
()));
}
if
(
ProblemProcessEnum
.
确定问题
.
getName
().
equals
(
qualityProblem
.
getStatus
())
)
{
taskDtoList
.
add
(
setTask
(
qualityProblem
.
getStatus
(),
false
,
TaskTypeEnum
.
流程
.
getKey
(),
qualityProblem
.
getRecDate
(),
qualityProblem
.
getSequenceNbr
(),
UrlEnum
.
待办检验检测单位审查质量问题
.
getStatus
()));
}
if
(
ProblemProcessEnum
.
审查整改过程
.
getName
().
equals
(
qualityProblem
.
getStatus
()))
{
taskDtoList
.
add
(
setTask
(
qualityProblem
.
getStatus
(),
false
,
TaskTypeEnum
.
流程
.
getKey
(),
qualityProblem
.
getRecDate
(),
qualityProblem
.
getSequenceNbr
(),
UrlEnum
.
待办检验检测单位审查整改过程
.
getStatus
()));
}
}
}
}
//企业审核任务
Set
<
Integer
>
regionCodes
=
new
HashSet
<>();
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
if
(
OrgEnum
.
监察部门
.
getKey
().
equals
(
companyType
))
{
wrapper
.
eq
(
SuperviseRule:
:
getSuperviseDeptId
,
companyId
);
}
else
if
(
OrgEnum
.
监检机构
.
getKey
().
equals
(
companyType
))
{
wrapper
.
eq
(
SuperviseRule:
:
getInspectionUnitId
,
companyId
);
}
for
(
SuperviseRule
superviseRule:
superviseRuleService
.
list
(
wrapper
)){
regionCodes
.
add
(
superviseRule
.
getAdminRegionCode
());
}
LambdaQueryWrapper
<
Company
>
companyWrapper
=
new
LambdaQueryWrapper
<>();
companyWrapper
.
in
(
Company:
:
getRegionCode
,
regionCodes
).
eq
(
Company
::
getApproved
,
CompanyExamineEnum
.
企业审核
.
getNo
());
if
(
OrgEnum
.
监察部门
.
getKey
().
equals
(
companyType
)||
OrgEnum
.
监检机构
.
getKey
().
equals
(
companyType
)){
List
<
Company
>
companyList
=
companyService
.
list
(
companyWrapper
);
for
(
Company
company
:
companyList
)
{
taskDtoList
.
add
(
setTask
(
null
,
false
,
TaskTypeEnum
.
企业审核
.
getKey
(),
company
.
getRecDate
(),
company
.
getSequenceNbr
(),
UrlEnum
.
待办企业审核任务
.
getStatus
()));
}
}
return
taskDtoList
;
}
/**
* 项目流程创建TaskDto对象
* 项目流程新增、更新任务表信息
* @param InitiationStatus 项目/问题处置 表中的 status字段
* @param taskType 任务类型(填报、流程)
* @param sendTime
* @Param sequenceNbr 项目/问题处置的sequenceNbr
* @return
*/
public
TaskDto
setTask
(
String
InitiationStatus
,
boolean
status
,
String
taskType
,
Date
sendTime
,
Long
sequenceNbr
,
Integer
number
){
TaskDto
task
=
new
TaskDto
();
String
title
=
""
,
taskStatus
=
""
;
task
.
setTaskType
(
taskType
);
if
(!
ValidationUtil
.
isEmpty
(
InitiationStatus
)){
title
=
ProjectInitiationEnum
.
getTaskNameMap
.
get
(
InitiationStatus
);
taskStatus
=
ProjectInitiationEnum
.
getTaskStatusMap
.
get
(
InitiationStatus
);
if
(
ValidationUtil
.
isEmpty
(
title
)){
//不是项目立项流程,是问题处置流程
title
=
ProblemProcessEnum
.
getTaskNameMap
.
get
(
InitiationStatus
);
taskStatus
=
ProblemProcessEnum
.
getTaskStatusMap
.
get
(
InitiationStatus
);
}
}
if
(
ValidationUtil
.
isEmpty
(
title
))
{
//不是问题处置流程,企业注册任务
title
=
CompanyExamineEnum
.
企业审核
.
getName
();
if
(
status
){
taskStatus
=
CompanyExamineEnum
.
企业审核
.
getYes
();
}
else
{
taskStatus
=
CompanyExamineEnum
.
企业审核
.
getNo
();
}
}
task
.
setTitle
(
title
);
task
.
setStatus
(
status
);
if
(
status
){
task
.
setStatusLabel
(
TaskTypeEnum
.
已办
.
getName
());
taskStatus
=
"已完成"
;
}
else
{
task
.
setStatusLabel
(
TaskTypeEnum
.
待办
.
getName
());
}
task
.
setSendTime
(
sendTime
);
task
.
setContent
(
title
+
", "
+
taskStatus
);
task
.
setSequenceNbr
(
sequenceNbr
);
if
(
TaskTypeEnum
.
填报
.
getKey
().
equals
(
taskType
)){
task
.
setTaskTypeLabel
(
TaskTypeEnum
.
填报
.
getName
());
}
else
if
(
TaskTypeEnum
.
流程
.
getKey
().
equals
(
taskType
)){
task
.
setTaskTypeLabel
(
TaskTypeEnum
.
流程
.
getName
());
}
else
{
task
.
setTaskTypeLabel
(
TaskTypeEnum
.
企业审核
.
getName
());
}
//再加一个url路径 和状态
JSONObject
jsonObject
=
new
JSONObject
();
if
(!
ValidationUtil
.
isEmpty
(
number
))
{
jsonObject
.
put
(
"extend"
,
tzUgpPathDao
.
selectOne
(
new
LambdaQueryWrapper
<
TzUgpPath
>().
eq
(
TzUgpPath:
:
getStatus
,
number
)).
getUrl
());
task
.
setExtend
(
jsonObject
);
task
.
setNumber
(
number
);
}
return
task
;
}
/**
* 已办任务查询
* @return
*/
public
List
<
TaskDto
>
doneTask
(){
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"extend"
,
""
);
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
.
安装单位
.
getKey
().
equals
(
companyType
))
{
for
(
ProjectInitiation
projectInitiation
:
projectInitiationList
)
{
if
(
ProjectInitiationEnum
.
提交资料
.
getName
().
equals
(
projectInitiation
.
getTaskName
()))
{
TaskDto
taskDto
=
setTask
(
projectInitiation
.
getTaskName
(),
true
,
TaskTypeEnum
.
填报
.
getKey
(),
projectInitiation
.
getRecDate
(),
project
.
getSequenceNbr
(),
UrlEnum
.
已办安装单位上传监检资料
.
getStatus
());
taskDtoList
.
add
(
taskDto
);
}
}
}
else
if
(
OrgEnum
.
设计单位
.
getKey
().
equals
(
companyType
))
{
for
(
ProjectInitiation
projectInitiation
:
projectInitiationList
)
{
if
(
ProjectInitiationEnum
.
提交资料
.
getName
().
equals
(
projectInitiation
.
getTaskName
()))
{
taskDtoList
.
add
(
setTask
(
projectInitiation
.
getTaskName
(),
true
,
TaskTypeEnum
.
填报
.
getKey
(),
projectInitiation
.
getRecDate
(),
project
.
getSequenceNbr
(),
UrlEnum
.
已办设计单位上传监检资料
.
getStatus
()));
}
}
}
else
if
(
OrgEnum
.
监察部门
.
getKey
().
equals
(
companyType
))
{
for
(
ProjectInitiation
projectInitiation
:
projectInitiationList
)
{
if
(
ProjectInitiationEnum
.
接受告知
.
getName
().
equals
(
projectInitiation
.
getTaskName
()))
{
taskDtoList
.
add
(
setTask
(
projectInitiation
.
getTaskName
(),
true
,
TaskTypeEnum
.
流程
.
getKey
(),
projectInitiation
.
getRecDate
(),
project
.
getSequenceNbr
(),
UrlEnum
.
已办监察单位确认接收的告知申请
.
getStatus
()));
}
}
}
else
if
(
OrgEnum
.
监检机构
.
getKey
().
equals
(
companyType
))
{
for
(
ProjectInitiation
projectInitiation
:
projectInitiationList
)
{
if
(
ProjectInitiationEnum
.
监检科室分配
.
getName
().
equals
(
projectInitiation
.
getTaskName
())
||
ProjectInitiationEnum
.
监检员分配
.
getName
().
equals
(
projectInitiation
.
getTaskName
())
)
{
taskDtoList
.
add
(
setTask
(
projectInitiation
.
getTaskName
(),
true
,
TaskTypeEnum
.
流程
.
getKey
(),
projectInitiation
.
getRecDate
(),
project
.
getSequenceNbr
(),
null
));
}
if
(
ProjectInitiationEnum
.
监检员审核
.
getName
().
equals
(
projectInitiation
.
getTaskName
()))
{
taskDtoList
.
add
(
setTask
(
projectInitiation
.
getTaskName
(),
true
,
TaskTypeEnum
.
流程
.
getKey
(),
projectInitiation
.
getRecDate
(),
project
.
getSequenceNbr
(),
UrlEnum
.
已办验检测单位审核告知申请
.
getStatus
()));
}
if
(
ProjectInitiationEnum
.
审查项目
.
getName
().
equals
(
projectInitiation
.
getTaskName
())
)
{
taskDtoList
.
add
(
setTask
(
projectInitiation
.
getTaskName
(),
true
,
TaskTypeEnum
.
流程
.
getKey
(),
projectInitiation
.
getRecDate
(),
project
.
getSequenceNbr
(),
UrlEnum
.
已办检验检测单位审批项目监检资料
.
getStatus
()));
}
}
public
void
saveOrUpdateTask
(
String
InitiationStatus
,
boolean
status
,
String
taskType
,
Date
sendTime
,
Long
sourceId
,
String
type
,
List
<
Long
>
unitIds
){
for
(
Long
unitId:
unitIds
)
{
Task
task
=
new
Task
();
String
title
=
""
,
taskStatus
=
""
;
task
.
setTaskType
(
taskType
);
if
(!
ValidationUtil
.
isEmpty
(
InitiationStatus
))
{
title
=
ProjectInitiationEnum
.
getTaskNameMap
.
get
(
InitiationStatus
);
taskStatus
=
ProjectInitiationEnum
.
getTaskStatusMap
.
get
(
InitiationStatus
);
if
(
ValidationUtil
.
isEmpty
(
title
))
{
//不是项目立项流程,是问题处置流程
title
=
ProblemProcessEnum
.
getTaskNameMap
.
get
(
InitiationStatus
);
taskStatus
=
ProblemProcessEnum
.
getTaskStatusMap
.
get
(
InitiationStatus
);
}
}
//质量问题
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
(
ValidationUtil
.
isEmpty
(
title
))
{
//不是问题处置流程,企业注册任务
title
=
CompanyExamineEnum
.
企业审核
.
getName
();
if
(
status
)
{
taskStatus
=
CompanyExamineEnum
.
企业审核
.
getYes
();
}
else
{
taskStatus
=
CompanyExamineEnum
.
企业审核
.
getNo
();
}
if
(
OrgEnum
.
安装单位
.
getKey
().
equals
(
companyType
))
{
for
(
ProjectInitiation
projectInitiation
:
projectInitiations
)
{
if
(
ProblemProcessEnum
.
编制处理方案
.
getName
().
equals
(
projectInitiation
.
getTaskName
())
)
{
TaskDto
taskDto
=
setTask
(
projectInitiation
.
getTaskName
(),
true
,
TaskTypeEnum
.
填报
.
getKey
(),
projectInitiation
.
getRecDate
(),
project
.
getSequenceNbr
(),
UrlEnum
.
已办安装单位编制质量问题处理
.
getStatus
());
taskDtoList
.
add
(
taskDto
);
}
if
(
ProblemProcessEnum
.
提交整改书
.
getName
().
equals
(
projectInitiation
.
getTaskName
()))
{
TaskDto
taskDto
=
setTask
(
projectInitiation
.
getTaskName
(),
true
,
TaskTypeEnum
.
填报
.
getKey
(),
projectInitiation
.
getRecDate
(),
project
.
getSequenceNbr
(),
UrlEnum
.
已办安装单位提交整改书
.
getStatus
());
taskDtoList
.
add
(
taskDto
);
}
}
}
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
(),
UrlEnum
.
已办建设单位审查质量问题处理方案
.
getStatus
()));
}
}
}
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
(),
UrlEnum
.
已办检验检测单位审查质量问题
.
getStatus
()));
}
if
(
ProblemProcessEnum
.
确定问题
.
getName
().
equals
(
projectInitiation
.
getTaskName
())
)
{
taskDtoList
.
add
(
setTask
(
projectInitiation
.
getTaskName
(),
true
,
TaskTypeEnum
.
流程
.
getKey
(),
projectInitiation
.
getRecDate
(),
project
.
getSequenceNbr
(),
UrlEnum
.
已办检验检测单位问题分类
.
getStatus
()));
}
if
(
ProblemProcessEnum
.
审查整改过程
.
getName
().
equals
(
projectInitiation
.
getTaskName
()))
{
taskDtoList
.
add
(
setTask
(
projectInitiation
.
getTaskName
(),
true
,
TaskTypeEnum
.
流程
.
getKey
(),
projectInitiation
.
getRecDate
(),
project
.
getSequenceNbr
(),
UrlEnum
.
已办检验检测单位审查整改过程
.
getStatus
()));
}
}
}
}
//企业审核任务
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
());
if
(
TaskTypeEnum
.
填报
.
getKey
().
equals
(
taskType
))
{
task
.
setTaskTypeLabel
(
TaskTypeEnum
.
填报
.
getName
());
}
else
if
(
TaskTypeEnum
.
流程
.
getKey
().
equals
(
taskType
))
{
task
.
setTaskTypeLabel
(
TaskTypeEnum
.
流程
.
getName
());
}
else
{
task
.
setTaskTypeLabel
(
TaskTypeEnum
.
企业审核
.
getName
());
}
LambdaQueryWrapper
<
Company
>
companyWrapper
=
new
LambdaQueryWrapper
<>();
companyWrapper
.
in
(
Company:
:
getRegionCode
,
regionCodes
).
eq
(
Company
::
getApproved
,
CompanyExamineEnum
.
企业审核
.
getYes
());
if
(
OrgEnum
.
监察部门
.
getKey
().
equals
(
companyType
)||
OrgEnum
.
监检机构
.
getKey
().
equals
(
companyType
))
{
List
<
Company
>
companyList
=
companyService
.
list
(
companyWrapper
);
for
(
Company
company
:
companyList
)
{
taskDtoList
.
add
(
setTask
(
null
,
true
,
TaskTypeEnum
.
企业审核
.
getKey
(),
company
.
getRecDate
(),
company
.
getSequenceNbr
(),
UrlEnum
.
已办企业审核任务
.
getStatus
()));
}
task
.
setUnitId
(
unitId
);
task
.
setTitle
(
title
);
task
.
setStatus
(
status
);
task
.
setSendTime
(
sendTime
);
task
.
setSourceId
(
sourceId
);
task
.
setType
(
type
);
if
(
status
)
{
//更新任务表 已办
LambdaQueryWrapper
<
Task
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Task:
:
getType
,
type
)
.
eq
(
Task:
:
getStatus
,
false
)
.
eq
(
Task:
:
getTitle
,
InitiationStatus
)
.
eq
(
Task:
:
getSourceId
,
sourceId
)
.
eq
(
Task:
:
getUnitId
,
unitId
);
task
=
this
.
getOne
(
wrapper
);
task
.
setStatusLabel
(
TaskTypeEnum
.
已办
.
getName
());
taskStatus
=
"已完成"
;
}
else
{
//添加任务表 待办
task
.
setStatusLabel
(
TaskTypeEnum
.
待办
.
getName
());
}
task
.
setContent
(
title
+
", "
+
taskStatus
);
this
.
saveOrUpdate
(
task
);
}
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