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
c3b55f7b
Commit
c3b55f7b
authored
Oct 14, 2022
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化 查询当前登陆人所在单位下的所以项目列表 接口
parent
21d2501f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+7
-1
OrgServiceImpl.java
...amos/boot/module/ugp/biz/service/impl/OrgServiceImpl.java
+5
-1
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectController.java
View file @
c3b55f7b
...
...
@@ -13,9 +13,11 @@ import io.swagger.annotations.Api;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectServiceImpl
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -176,8 +178,12 @@ public class ProjectController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询当前登陆人所在单位下的所以项目列表"
,
notes
=
"查询当前登陆人所在单位下的所以项目列表"
)
@GetMapping
(
value
=
"/getCompanyProjects"
)
public
ResponseModel
<
List
<
Project
>>
getCompanyProjects
(){
Long
companyId
=
orgServiceImpl
.
getCompanyId
();
if
(
ValidationUtil
.
isEmpty
(
companyId
)){
return
ResponseHelper
.
buildResponse
(
new
ArrayList
<>());
}
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Project:
:
getConstructionUnitId
,
orgServiceImpl
.
getCompanyId
()
);
wrapper
.
eq
(
Project:
:
getConstructionUnitId
,
companyId
);
return
ResponseHelper
.
buildResponse
(
projectServiceImpl
.
list
(
wrapper
));
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/OrgServiceImpl.java
View file @
c3b55f7b
...
...
@@ -239,6 +239,10 @@ public class OrgServiceImpl {
public
Long
getCompanyId
(){
LambdaQueryWrapper
<
OrgUsr
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
OrgUsr
::
getAmosOrgId
,
String
.
valueOf
(
getReginParams
().
getCompany
().
getSequenceNbr
()));
return
orgUsrServiceImpl
.
getOne
(
wrapper
).
getSequenceNbr
();
OrgUsr
orgUsr
=
orgUsrServiceImpl
.
getOne
(
wrapper
);
if
(
ValidationUtil
.
isEmpty
(
orgUsr
)){
return
null
;
}
return
orgUsr
.
getSequenceNbr
();
}
}
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