Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bailuntec-cost
Overview
Overview
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
huluobin
bailuntec-cost
Commits
75e912d3
Commit
75e912d3
authored
Dec 30, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
1b514636
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
3 deletions
+31
-3
OaDepartmentController.java
.../other/module/auth/controller/OaDepartmentController.java
+8
-1
OaDepartmentMapper.java
...ava/com/blt/other/module/auth/dao/OaDepartmentMapper.java
+3
-0
IOaDepartmentService.java
...m/blt/other/module/auth/service/IOaDepartmentService.java
+8
-0
OaDepartmentServiceImpl.java
...her/module/auth/service/impl/OaDepartmentServiceImpl.java
+5
-0
CostDetailController.java
...lt/other/module/cost/controller/CostDetailController.java
+2
-2
OaDepartmentMapper.xml
...ore/src/main/resources/mapper/auth/OaDepartmentMapper.xml
+5
-0
No files found.
bailuntec-cost-core/src/main/java/com/blt/other/module/auth/controller/OaDepartmentController.java
View file @
75e912d3
...
...
@@ -4,7 +4,6 @@ package com.blt.other.module.auth.controller;
import
com.bailuntec.cost.api.response.CostResult
;
import
com.blt.other.module.auth.model.OaCompany
;
import
com.blt.other.module.auth.model.OaDepartment
;
import
com.blt.other.module.auth.model.OaUser
;
import
com.blt.other.module.auth.service.IOaDepartmentService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -40,6 +39,14 @@ public class OaDepartmentController {
return
CostResult
.
success
(
oaDepartmentList
);
}
@ApiOperation
(
"获取一级部门下面的二级部门列表"
)
@GetMapping
(
"/secondDepartment"
)
public
CostResult
<
List
<
OaDepartment
>>
secondDepartment
(
@RequestParam
Integer
primaryDepartmentId
)
{
List
<
OaDepartment
>
oaDepartmentList
=
oaDepartmentService
.
secondDepartment
(
primaryDepartmentId
);
return
CostResult
.
success
(
oaDepartmentList
);
}
@ApiOperation
(
"获取公所有部门列表"
)
@GetMapping
(
"/allOaDepartment"
)
public
CostResult
<
List
<
OaDepartment
>>
allOaDepartment
()
{
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/auth/dao/OaDepartmentMapper.java
View file @
75e912d3
...
...
@@ -37,4 +37,7 @@ public interface OaDepartmentMapper extends BaseMapper<OaDepartment> {
List
<
OaDepartment
>
allOaDepartment
();
List
<
OaDepartment
>
selectByIds
(
@Param
(
"collect"
)
List
<
Integer
>
collect
);
//根据parentId获取
List
<
OaDepartment
>
selectByParentId
(
Integer
primaryDepartmentId
);
}
bailuntec-cost-core/src/main/java/com/blt/other/module/auth/service/IOaDepartmentService.java
View file @
75e912d3
...
...
@@ -62,4 +62,12 @@ public interface IOaDepartmentService extends IService<OaDepartment> {
* @return 部门树
*/
List
<
OaCompany
>
queryTree
();
/**
* 获取二级部门
*
* @param primaryDepartmentId 一级部门id
* @return 二级部门列表
*/
List
<
OaDepartment
>
secondDepartment
(
Integer
primaryDepartmentId
);
}
bailuntec-cost-core/src/main/java/com/blt/other/module/auth/service/impl/OaDepartmentServiceImpl.java
View file @
75e912d3
...
...
@@ -106,6 +106,11 @@ public class OaDepartmentServiceImpl extends ServiceImpl<OaDepartmentMapper, OaD
return
oaCompanyList
;
}
@Override
public
List
<
OaDepartment
>
secondDepartment
(
Integer
primaryDepartmentId
)
{
return
baseMapper
.
selectByParentId
(
primaryDepartmentId
);
}
/**
* 商品分类列表转成树形
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostDetailController.java
View file @
75e912d3
...
...
@@ -96,13 +96,13 @@ public class CostDetailController {
public
ResponseEntity
<
InputStreamResource
>
download
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
IOException
{
String
detailNo
=
request
.
getParameter
(
"detailNo"
);
CostDetailDomain
detail
=
costDetailService
.
getCostDetailByDetailNo
(
detailNo
);
String
filePath
=
null
;
String
filePath
;
String
fileName
=
null
;
if
(
null
!=
detail
)
{
filePath
=
detail
.
getFilePath
();
if
(
null
!=
filePath
)
{
String
[]
split
=
filePath
.
split
(
"&"
);
if
(
null
!=
split
&&
split
.
length
>=
1
)
{
if
(
split
.
length
>=
1
)
{
fileName
=
split
[
split
.
length
-
1
];
}
}
...
...
bailuntec-cost-core/src/main/resources/mapper/auth/OaDepartmentMapper.xml
View file @
75e912d3
...
...
@@ -59,6 +59,11 @@
<if
test=
"departmentId != null and departmentId != 0"
>
#{departmentId}
</if>
</foreach>
</select>
<select
id=
"selectByParentId"
resultType=
"com.blt.other.module.auth.model.OaDepartment"
>
select *
from oa_department
where parent_id = #{primaryDepartmentId}
</select>
</mapper>
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