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
fcb8c653
Commit
fcb8c653
authored
Jul 17, 2023
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目立项流程修改
parent
b021b330
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
131 additions
and
3 deletions
+131
-3
ProjectInitiationEnum.java
.../amos/boot/module/ugp/api/Enum/ProjectInitiationEnum.java
+7
-0
FileDto.java
...ava/com/yeejoin/amos/boot/module/ugp/api/dto/FileDto.java
+4
-0
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+85
-2
ProjectInitiationServiceImpl.java
...le/ugp/biz/service/impl/ProjectInitiationServiceImpl.java
+29
-0
ProjectServiceImpl.java
.../boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
+6
-1
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 @
fcb8c653
...
...
@@ -13,6 +13,13 @@ public enum ProjectInitiationEnum {
设计开工资料提交
(
"2"
,
"设计提交资料"
,
"SJZLTJ"
,
"设计资料待提交"
,
"设计提交资料"
,
"待提交"
),
安装开工资料提交
(
"3"
,
"安装提交资料"
,
"AZZLTJ"
,
"安装资料待提交"
,
"安装提交资料"
,
"待提交"
),
设计资料审核
(
""
,
"设计资料审核"
,
"SJZISH"
,
"设计资料待审核"
,
"设计资料审核"
,
"待审核"
),
设计资料审批
(
""
,
"设计资料审批"
,
"SJZISP"
,
"设计资料待审批"
,
"设计资料审批"
,
"待审批"
),
安装资料审核
(
""
,
"安装资料审核"
,
"AZZLSH"
,
"安装资料待审核"
,
"安装资料审核"
,
"待审核"
),
安装资料审批
(
""
,
"安装资料审批"
,
"AZZLSP"
,
"安装资料待审批"
,
"安装资料待审批"
,
"待审批"
),
告知申请
(
"4"
,
"告知申请"
,
"GZSQ"
,
"告知待申请"
,
"告知申请"
,
"待申请"
),
接受告知
(
"5"
,
"接收告知"
,
"JSGZ"
,
"告知待接收"
,
"告知接收"
,
"待接收"
),
//设计和安装合并使用。
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/FileDto.java
View file @
fcb8c653
...
...
@@ -32,4 +32,8 @@ public class FileDto {
// 前端定制组件格式 文件
Page
<
Map
<
String
,
Object
>>
mapPage
;
private
String
remark
;
private
String
projectStatus
;
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectController.java
View file @
fcb8c653
...
...
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.mysql.cj.xdevapi.JsonString
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
...
...
@@ -20,6 +21,7 @@ import com.yeejoin.amos.boot.module.ugp.api.constants.XJConstant;
import
com.yeejoin.amos.boot.module.ugp.api.dto.*
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.InstallNotice
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProjectInitiation
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IProcessRelationService
;
...
...
@@ -38,6 +40,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.text.ParseException
;
import
java.util.*
;
import
static
com
.
sun
.
org
.
apache
.
xalan
.
internal
.
xsltc
.
compiler
.
util
.
Type
.
Int
;
...
...
@@ -576,7 +579,7 @@ public class ProjectController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据projectId查询信息"
,
notes
=
"根据projectId查询信息"
)
@GetMapping
(
value
=
"/getProjectDetails"
)
public
ResponseModel
<
JSONObject
>
getProjectDetails
(
@RequestParam
(
"projectId"
)
Long
projectId
){
public
ResponseModel
<
JSONObject
>
getProjectDetails
(
@RequestParam
(
"projectId"
)
Long
projectId
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
){
if
(
ValidationUtil
.
isEmpty
(
projectServiceImpl
.
getById
(
projectId
))){
InstallNotice
installNotice
=
iInstallNoticeService
.
getById
(
projectId
);
if
(!
ValidationUtil
.
isEmpty
(
installNotice
)){
...
...
@@ -587,7 +590,11 @@ public class ProjectController extends BaseController {
//项目基本信息
jsonObject
.
put
(
TabLogoEnum
.
项目基本信息
.
getLogo
(),
projectServiceImpl
.
selectById
(
projectId
));
//项目资料信息
jsonObject
.
put
(
TabLogoEnum
.
项目资料信息
.
getLogo
(),
projectServiceImpl
.
getInformationDetail
(
projectId
));
if
(!
ObjectUtils
.
isEmpty
(
type
)){
jsonObject
.
put
(
TabLogoEnum
.
项目资料信息
.
getLogo
(),
getStatus
(
projectId
,
type
));
}
else
{
jsonObject
.
put
(
TabLogoEnum
.
项目资料信息
.
getLogo
(),
projectServiceImpl
.
getInformationDetail
(
projectId
));
}
//项目告知信息
jsonObject
.
put
(
TabLogoEnum
.
项目告知信息
.
getLogo
(),
iInstallNoticeService
.
getInfoByProjectId
(
projectId
));
//项目竣工信息
...
...
@@ -598,6 +605,82 @@ public class ProjectController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据projectId查询信息"
,
notes
=
"根据projectId查询信息"
)
@GetMapping
(
value
=
"/auditMessage"
)
public
ResponseModel
<
JSONObject
>
aduitMessage
(
@RequestParam
(
"projectId"
)
Long
projectId
,
@RequestParam
(
"type"
)
String
type
)
{
if
(
ValidationUtil
.
isEmpty
(
projectServiceImpl
.
getById
(
projectId
)))
{
InstallNotice
installNotice
=
iInstallNoticeService
.
getById
(
projectId
);
if
(!
ValidationUtil
.
isEmpty
(
installNotice
))
{
projectId
=
installNotice
.
getProjectId
();
}
}
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
TabLogoEnum
.
项目资料信息
.
getLogo
(),
getStatus
(
projectId
,
type
));
//项目基本信息
jsonObject
.
put
(
TabLogoEnum
.
项目基本信息
.
getLogo
(),
projectServiceImpl
.
selectById
(
projectId
));
return
ResponseHelper
.
buildResponse
(
jsonObject
);
}
private
FileDto
getStatus
(
Long
projectId
,
String
type
)
{
//项目资料信息
FileDto
informationDetail
=
projectServiceImpl
.
getInformationDetail
(
projectId
);
ProjectDto
detail
=
projectMapper
.
getDetail
(
projectId
);
informationDetail
.
setProjectStatus
(
detail
.
getStatus
());
LambdaQueryWrapper
<
ProjectInitiation
>
lambda
=
new
QueryWrapper
<
ProjectInitiation
>().
lambda
();
lambda
.
eq
(
ProjectInitiation:
:
getInstanceId
,
detail
.
getInstanceId
());
lambda
.
orderByDesc
(
ProjectInitiation:
:
getRecDate
);
ArrayList
<
String
>
azStatus
=
new
ArrayList
<>();
ArrayList
<
String
>
sjStatus
=
new
ArrayList
<>();
List
<
ProjectInitiation
>
projectInitiations
=
projectInitiationService
.
getBaseMapper
().
selectList
(
lambda
);
if
(!
ObjectUtils
.
isEmpty
(
projectInitiations
))
{
projectInitiations
.
forEach
(
item
->
{
JSONObject
context
=
JSONObject
.
parseObject
(
item
.
getContext
());
if
(!
ObjectUtils
.
isEmpty
(
context
)
&&
!
ObjectUtils
.
isEmpty
(
context
.
get
(
"sj_status"
)))
{
sjStatus
.
add
(
String
.
valueOf
(
context
.
get
(
"sj_status"
)));
}
if
(!
ObjectUtils
.
isEmpty
(
context
)
&&
!
ObjectUtils
.
isEmpty
(
context
.
get
(
"az_status"
)))
{
azStatus
.
add
(
String
.
valueOf
(
context
.
get
(
"az_status"
)));
}
});
if
(
"design"
.
equals
(
type
)
&&
!
ObjectUtils
.
isEmpty
(
sjStatus
))
{
informationDetail
.
setRemark
(
sjStatus
.
get
(
0
));
}
if
(
"install"
.
equals
(
type
)
&&
!
ObjectUtils
.
isEmpty
(
azStatus
))
{
informationDetail
.
setRemark
(
azStatus
.
get
(
0
));
}
}
return
informationDetail
;
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"资料部门审核、审批"
,
notes
=
"资料部门审核、审批"
)
@PostMapping
(
value
=
"/messageAudit"
)
public
ResponseModel
<
Object
>
informationSaveOrUpdate
(
@RequestParam
(
"sequenceNbr"
)
String
sequenceNbr
,
@RequestParam
(
"type"
)
String
type
,
@RequestBody
JSONObject
object
)
throws
ParseException
{
Project
project
=
projectServiceImpl
.
getById
(
sequenceNbr
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
project
));
JSONObject
fileInfo
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
object
.
get
(
"fileInfo"
)));
String
status
=
String
.
valueOf
(
fileInfo
.
get
(
"option"
));
if
(
"design"
.
equals
(
type
)){
if
(
"1"
.
equals
(
String
.
valueOf
(
fileInfo
.
get
(
"option"
)))){
jsonObject
.
put
(
"sj_status"
,
DateUtils
.
dateFormat
(
DateUtils
.
getDateNow
(),
DateUtils
.
DATE_TIME_PATTERN
)
+
" 部门审核通过"
);
}
else
{
jsonObject
.
put
(
"sj_status"
,
DateUtils
.
dateFormat
(
DateUtils
.
getDateNow
(),
DateUtils
.
DATE_TIME_PATTERN
)
+
" 部门审核驳回"
+
" 原因:"
+
fileInfo
.
get
(
"reason"
));
}
}
if
(
"install"
.
equals
(
type
)){
if
(
"1"
.
equals
(
String
.
valueOf
(
fileInfo
.
get
(
"option"
)))){
jsonObject
.
put
(
"az_status"
,
DateUtils
.
dateFormat
(
DateUtils
.
getDateNow
(),
DateUtils
.
DATE_TIME_PATTERN
)
+
" 部门审核通过"
);
}
else
{
jsonObject
.
put
(
"az_status"
,
DateUtils
.
dateFormat
(
DateUtils
.
getDateNow
(),
DateUtils
.
DATE_TIME_PATTERN
)
+
" 部门审核驳回"
+
" 原因:"
+
fileInfo
.
get
(
"reason"
));
}
}
projectInitiationService
.
execute
(
project
.
getInstanceId
(),
jsonObject
,
status
,
null
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
/**
* 获取当前登录人下所在单位的项目总数
* @return
...
...
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 @
fcb8c653
...
...
@@ -26,6 +26,7 @@ import com.yeejoin.amos.feign.workflow.model.AjaxResult;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils
;
import
org.apache.ibatis.type.LocalDateTypeHandler
;
import
org.joda.time.LocalDateTime
;
...
...
@@ -537,6 +538,34 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
taskName
=
"流程结束!"
;
}
// 部门审核/审批逻辑
if
(
ProjectInitiationEnum
.
提交资料
.
getName
().
equals
(
project
.
getStatus
()))
{
if
(
ProjectInitiationEnum
.
设计资料审核
.
getName
().
equals
(
taskName
))
{
// 当前执行-设计单位资料提交
taskName
=
ProjectInitiationEnum
.
安装开工资料提交
.
getName
()
+
"/"
+
ProjectInitiationEnum
.
设计资料审核
.
getName
();
}
else
{
// 当前执行-安裝单位资料提交
taskName
=
ProjectInitiationEnum
.
安装资料审核
.
getName
()
+
"/"
+
ProjectInitiationEnum
.
设计开工资料提交
.
getName
();
}
}
if
(!
"流程结束!"
.
equals
(
taskName
)
&&
!
ObjectUtils
.
isEmpty
(
project
.
getStatus
())
&&
project
.
getStatus
().
contains
(
"/"
))
{
String
azStatus
=
StringUtils
.
substringBefore
(
project
.
getStatus
(),
"/"
);
String
sjStatus
=
StringUtils
.
substringAfter
(
project
.
getStatus
(),
"/"
);
if
(
taskName
.
contains
(
"安装"
))
{
taskName
=
taskName
+
"/"
+
sjStatus
;
}
else
{
taskName
=
azStatus
+
"/"
+
taskName
;
}
}
if
(
"流程结束!"
.
equals
(
taskName
)
&&
!
ObjectUtils
.
isEmpty
(
project
.
getStatus
()))
{
if
(
project
.
getStatus
().
contains
(
ProjectInitiationEnum
.
设计资料审批
.
getName
()))
{
taskName
=
StringUtils
.
substringBefore
(
project
.
getStatus
(),
"/"
);
}
else
if
(
project
.
getStatus
().
contains
(
ProjectInitiationEnum
.
安装资料审批
.
getName
()))
{
taskName
=
StringUtils
.
substringAfter
(
project
.
getStatus
(),
"/"
);
}
}
project
.
setStatus
(
taskName
);
projectService
.
updateById
(
project
);
processRelationService
.
updateState
(
instanceId
,
taskName
);
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
View file @
fcb8c653
...
...
@@ -301,7 +301,12 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
insPerson
=
jsonObject
.
getString
(
XJConstant
.
INS_PRESON
);
}
}
state
=
ProjectInitiationEnum
.
getTaskDetailStatusMap
.
get
(
project
.
getStatus
());
String
status
=
ProjectInitiationEnum
.
getTaskDetailStatusMap
.
get
(
project
.
getStatus
());
if
(!
ObjectUtils
.
isEmpty
(
status
)){
state
=
ProjectInitiationEnum
.
getTaskDetailStatusMap
.
get
(
project
.
getStatus
());
}
else
{
state
=
project
.
getStatus
();
}
}
project
.
setExamineProjectState
(
state
);
...
...
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