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
c5918493
Commit
c5918493
authored
Mar 16, 2023
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增项目详情公共接口
parent
a47f6110
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
97 additions
and
17 deletions
+97
-17
TabLogoEnum.java
...om/yeejoin/amos/boot/module/ugp/api/Enum/TabLogoEnum.java
+16
-0
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+28
-1
ProjectOverFlowController.java
.../module/ugp/biz/controller/ProjectOverFlowController.java
+6
-16
ProjectOverFlowService.java
...t/module/ugp/biz/service/impl/ProjectOverFlowService.java
+47
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/Enum/TabLogoEnum.java
0 → 100644
View file @
c5918493
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
Enum
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
@Getter
@AllArgsConstructor
public
enum
TabLogoEnum
{
项目基本信息
(
"projectInfo"
),
项目资料信息
(
"fileInfo"
),
项目告知信息
(
"noticeInfo"
),
项目进度信息
(
"progressInfo"
),
项目竣工信息
(
"completeInfo"
);
String
logo
;
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectController.java
View file @
c5918493
...
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.TabLogoEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.WhetherItPassEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.constants.XJConstant
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.*
;
...
...
@@ -76,6 +77,10 @@ public class ProjectController extends BaseController {
AttachmentServiceImpl
attachmentServiceImpl
;
@Autowired
ProjectResourceServiceImpl
projectResourceServiceImpl
;
@Autowired
InstallNoticeServiceImpl
iInstallNoticeService
;
@Autowired
ProjectOverFlowService
projectOverFlowService
;
/**
...
...
@@ -344,7 +349,7 @@ public class ProjectController extends BaseController {
e
.
printStackTrace
();
}
JSONObject
jo
=
new
JSONObject
();
jo
.
put
(
"projectInfo"
,
projectServiceImpl
.
selectById
(
sequenceNbr
));
jo
.
put
(
TabLogoEnum
.
项目基本信息
.
getLogo
(),
projectServiceImpl
.
selectById
(
sequenceNbr
));
jo
.
put
(
"fileInfo"
,
jsonObject
);
return
ResponseHelper
.
buildResponse
(
jo
);
}
...
...
@@ -538,5 +543,27 @@ public class ProjectController extends BaseController {
public
ResponseModel
<
List
<
OrgUsr
>>
getPersonByCompanyId
(
String
companyId
){
return
ResponseHelper
.
buildResponse
(
orgServiceImpl
.
getPersonByCompanyId
(
companyId
));
}
/**
* 根据projectId查询 项目基本信息、资料信息、告知信息、竣工结项信息
* @param projectId
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据projectId查询信息"
,
notes
=
"根据projectId查询信息"
)
@GetMapping
(
value
=
"/getProjectDetails"
)
public
ResponseModel
<
JSONObject
>
getProjectDetails
(
@RequestParam
(
"projectId"
)
Long
projectId
){
JSONObject
jsonObject
=
new
JSONObject
();
//项目基本信息
jsonObject
.
put
(
TabLogoEnum
.
项目基本信息
.
getLogo
(),
projectServiceImpl
.
selectById
(
projectId
));
//项目资料信息
jsonObject
.
put
(
TabLogoEnum
.
项目资料信息
.
getLogo
(),
projectServiceImpl
.
getInformationDetail
(
projectId
));
//项目告知信息
jsonObject
.
put
(
TabLogoEnum
.
项目告知信息
.
getLogo
(),
iInstallNoticeService
.
getInfoByProjectId
(
projectId
));
//项目竣工信息
jsonObject
.
put
(
TabLogoEnum
.
项目竣工信息
.
getLogo
(),
projectOverFlowService
.
selectOne
(
projectId
));
return
ResponseHelper
.
buildResponse
(
jsonObject
);
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectOverFlowController.java
View file @
c5918493
...
...
@@ -12,9 +12,11 @@ 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.service.IProjectInitiationService
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectInitiationServiceImpl
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectOverFlowService
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
...
@@ -44,6 +46,9 @@ public class ProjectOverFlowController extends BaseController {
@Resource
private
ProjectInitiationServiceImpl
projectInitiationServiceImpl
;
@Autowired
private
ProjectOverFlowService
projectOverFlowService
;
/**
* 项目结项流程启动API
*
...
...
@@ -89,21 +94,6 @@ public class ProjectOverFlowController extends BaseController {
@ApiOperation
(
value
=
"根据项目表sequenceNbr查询结项流程相关信息"
,
notes
=
"根据项目表sequenceNbr查询结项流程相关信息"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
ResponseModel
<
OverProjectDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
Project
project
=
projectServiceImpl
.
getById
(
sequenceNbr
);
LambdaQueryWrapper
<
ProjectInitiation
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
ProjectInitiation:
:
getInstanceId
,
project
.
getInstanceId
());
wrapper
.
eq
(
ProjectInitiation:
:
getType
,
ProcessTypeEnum
.
项目结项
.
getType
());
wrapper
.
orderByDesc
(
ProjectInitiation:
:
getRecDate
);
wrapper
.
last
(
" limit 1"
);
ProjectInitiation
one
=
projectInitiationServiceImpl
.
getOne
(
wrapper
);
if
(
ObjectUtils
.
isNotEmpty
(
one
)
&&
StringUtils
.
isNotEmpty
(
one
.
getContext
()))
{
OverProjectDto
overProjectDto
=
JSON
.
parseObject
(
one
.
getContext
(),
OverProjectDto
.
class
);
if
((
StringUtils
.
isNotEmpty
(
overProjectDto
.
getAuditOpinion
())
&&
WhetherItPassEnum
.
REJECT
.
getCode
().
equals
(
overProjectDto
.
getCondition
()))
||
(
StringUtils
.
isNotEmpty
(
overProjectDto
.
getIsAgree
())
&&
WhetherItPassEnum
.
REJECT
.
getCode
().
equals
(
overProjectDto
.
getIsAgree
())))
{
return
ResponseHelper
.
buildResponse
(
new
OverProjectDto
());
}
return
ResponseHelper
.
buildResponse
(
overProjectDto
);
}
return
ResponseHelper
.
buildResponse
(
new
OverProjectDto
());
return
ResponseHelper
.
buildResponse
(
projectOverFlowService
.
selectOne
(
sequenceNbr
));
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProjectOverFlowService.java
0 → 100644
View file @
c5918493
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProcessTypeEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.WhetherItPassEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.OverProjectDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectResourceDto
;
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.entity.ProjectResource
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IProjectResourceService
;
import
org.kie.internal.runtime.cdi.Activate
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
@Service
public
class
ProjectOverFlowService
{
@Autowired
ProjectServiceImpl
projectServiceImpl
;
@Autowired
ProjectInitiationServiceImpl
projectInitiationServiceImpl
;
public
OverProjectDto
selectOne
(
Long
sequenceNbr
){
Project
project
=
projectServiceImpl
.
getById
(
sequenceNbr
);
LambdaQueryWrapper
<
ProjectInitiation
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
ProjectInitiation:
:
getInstanceId
,
project
.
getInstanceId
());
wrapper
.
eq
(
ProjectInitiation:
:
getType
,
ProcessTypeEnum
.
项目结项
.
getType
());
wrapper
.
orderByDesc
(
ProjectInitiation:
:
getRecDate
);
wrapper
.
last
(
" limit 1"
);
ProjectInitiation
one
=
projectInitiationServiceImpl
.
getOne
(
wrapper
);
if
(
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
ObjectUtils
.
isNotEmpty
(
one
)
&&
StringUtils
.
isNotEmpty
(
one
.
getContext
()))
{
OverProjectDto
overProjectDto
=
JSON
.
parseObject
(
one
.
getContext
(),
OverProjectDto
.
class
);
if
((
StringUtils
.
isNotEmpty
(
overProjectDto
.
getAuditOpinion
())
&&
WhetherItPassEnum
.
REJECT
.
getCode
().
equals
(
overProjectDto
.
getCondition
()))
||
(
StringUtils
.
isNotEmpty
(
overProjectDto
.
getIsAgree
())
&&
WhetherItPassEnum
.
REJECT
.
getCode
().
equals
(
overProjectDto
.
getIsAgree
())))
{
return
new
OverProjectDto
();
}
return
overProjectDto
;
}
return
new
OverProjectDto
();
}
}
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