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
47ea81d7
Commit
47ea81d7
authored
Jul 12, 2021
by
gaodongdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加新接口
parent
93a57fb4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
0 deletions
+47
-0
CompanyPerson.java
...eejoin/amos/boot/module/common/api/dto/CompanyPerson.java
+16
-0
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+15
-0
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+16
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/CompanyPerson.java
0 → 100644
View file @
47ea81d7
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
java.util.List
;
import
lombok.Data
;
@Data
public
class
CompanyPerson
extends
OrgUsrDto
{
/**
*
*/
private
static
final
long
serialVersionUID
=
-
988100154344061090L
;
List
<
OrgUsrDto
>
persons
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgUsrController.java
View file @
47ea81d7
...
...
@@ -26,6 +26,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.biz.common.constants.CommonConstant
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.CompanyPerson
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgDepartmentDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto
;
...
...
@@ -238,4 +239,17 @@ public class OrgUsrController extends BaseController {
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>
>
selectUsersByOrgCode
(
HttpServletRequest
request
,
@PathVariable
List
<
Long
>
ids
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
returnCompanyPersonMsg
(
ids
))
;
}
/**
* 根据id获取单位人员列表
*
* @param ids
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/company/{ids}/person"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id获取单位人员列表"
,
notes
=
"根据id获取单位人员列表"
)
public
ResponseModel
<
List
<
CompanyPerson
>>
selectCompanyPerson
(
@PathVariable
List
<
Long
>
ids
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
returnCompanyPerson
(
ids
))
;
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
47ea81d7
...
...
@@ -26,6 +26,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.constants.CommonConstant
;
import
com.yeejoin.amos.boot.module.common.api.dto.CompanyPerson
;
import
com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInstanceDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgPersonExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FormValue
;
...
...
@@ -855,4 +856,19 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
public
List
<
OrgUsr
>
listOrgUserById
(
Long
orgUserId
)
{
return
this
.
baseMapper
.
listOrgUserById
(
orgUserId
);
}
public
List
<
CompanyPerson
>
returnCompanyPerson
(
List
<
Long
>
ids
)
{
if
(
ids
==
null
)
return
null
;
return
ids
.
stream
().
map
(
m
->
{
OrgUsr
org
=
getById
(
m
);
CompanyPerson
company
=
new
CompanyPerson
();
BeanUtils
.
copyProperties
(
org
,
company
);
company
.
setPersons
(
this
.
queryForListByParentIdAndOrgType
(
org
.
getSequenceNbr
(),
OrgPersonEnum
.
人员
.
getKey
()));
return
company
;
}).
collect
(
Collectors
.
toList
());
}
private
List
<
OrgUsrDto
>
queryForListByParentIdAndOrgType
(
Long
parentId
,
String
bizOrgType
)
{
return
this
.
queryForList
(
null
,
false
,
parentId
,
bizOrgType
);
}
}
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