Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
d51699e4
Commit
d51699e4
authored
Jul 14, 2020
by
leialin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lal' into 'develop'
Lal See merge request 8timerv2/8timerapiv200!324
parents
ba92ed62
c5b8c3cd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
2 deletions
+93
-2
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
+24
-2
src/main/java/cn/timer/api/dao/yggl/YgglMainEmpMapper.java
+3
-0
src/main/java/cn/timer/api/dto/zzgl/DepartmentStaffDto.java
+18
-0
src/main/java/cn/timer/api/dto/zzgl/ObtainDepartmentDto.java
+29
-0
src/main/resources/mapping/yggl/YgglMainEmpMapper.xml
+19
-0
No files found.
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
View file @
d51699e4
package
cn
.
timer
.
api
.
controller
.
zzgl
;
package
cn
.
timer
.
api
.
controller
.
zzgl
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -26,10 +25,10 @@ import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapp
...
@@ -26,10 +25,10 @@ import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapp
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.lang.tree.Tree
;
import
cn.hutool.core.lang.tree.Tree
;
import
cn.hutool.core.lang.tree.TreeNode
;
import
cn.hutool.core.lang.tree.TreeNodeConfig
;
import
cn.hutool.core.lang.tree.TreeNodeConfig
;
import
cn.hutool.core.lang.tree.TreeUtil
;
import
cn.hutool.core.lang.tree.TreeUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
...
@@ -49,8 +48,10 @@ import cn.timer.api.dao.zzgl.ZzglBmgwMMapper;
...
@@ -49,8 +48,10 @@ import cn.timer.api.dao.zzgl.ZzglBmgwMMapper;
import
cn.timer.api.dao.zzgl.ZzglLogDgjlMapper
;
import
cn.timer.api.dao.zzgl.ZzglLogDgjlMapper
;
import
cn.timer.api.dao.zzgl.ZzglMenuMapper
;
import
cn.timer.api.dao.zzgl.ZzglMenuMapper
;
import
cn.timer.api.dao.zzgl.ZzglPostMenuMapper
;
import
cn.timer.api.dao.zzgl.ZzglPostMenuMapper
;
import
cn.timer.api.dto.zzgl.DepartmentStaffDto
;
import
cn.timer.api.dto.zzgl.LogDgjlsDto
;
import
cn.timer.api.dto.zzgl.LogDgjlsDto
;
import
cn.timer.api.dto.zzgl.LogDgjlsQueryDto
;
import
cn.timer.api.dto.zzgl.LogDgjlsQueryDto
;
import
cn.timer.api.dto.zzgl.ObtainDepartmentDto
;
import
cn.timer.api.dto.zzgl.UpEmpDeptDto
;
import
cn.timer.api.dto.zzgl.UpEmpDeptDto
;
import
cn.timer.api.dto.zzgl.ZzglPostMenuDto
;
import
cn.timer.api.dto.zzgl.ZzglPostMenuDto
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.Result
;
...
@@ -572,4 +573,25 @@ public class ZzglController {
...
@@ -572,4 +573,25 @@ public class ZzglController {
return
ResultUtil
.
success
();
return
ResultUtil
.
success
();
}
}
@GetMapping
(
value
=
"/appdeptlist"
)
@ApiOperation
(
value
=
"APP获取部门岗位"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
selectapplistdept
(
@CurrentUser
UserBean
userBean
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
List
<
ObtainDepartmentDto
>
tmen
=
new
ArrayList
<
ObtainDepartmentDto
>();
List
<
ZzglBmgwM
>
zzglbmgwms
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
)
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
ZzglBmgwM:
:
getType
,
0
).
list
();
for
(
ZzglBmgwM
gw
:
zzglbmgwms
)
{
ObtainDepartmentDto
tm
=
ObtainDepartmentDto
.
builder
().
build
();
BeanUtil
.
copyProperties
(
gw
,
tm
);
List
<
DepartmentStaffDto
>
destff
=
ygglMainEmpMapper
.
DepartmentStaff
(
orgCode
,
gw
.
getId
());
tm
.
setUser
(
destff
);
tmen
.
add
(
tm
);
}
return
ResultUtil
.
data
(
tmen
);
}
}
}
src/main/java/cn/timer/api/dao/yggl/YgglMainEmpMapper.java
View file @
d51699e4
...
@@ -15,6 +15,7 @@ import cn.timer.api.dto.yggl.EmpQuery;
...
@@ -15,6 +15,7 @@ import cn.timer.api.dto.yggl.EmpQuery;
import
cn.timer.api.dto.yggl.YgQueryDto
;
import
cn.timer.api.dto.yggl.YgQueryDto
;
import
cn.timer.api.dto.yggl.YgbintuDto
;
import
cn.timer.api.dto.yggl.YgbintuDto
;
import
cn.timer.api.dto.yggl.YgglCartogramDto
;
import
cn.timer.api.dto.yggl.YgglCartogramDto
;
import
cn.timer.api.dto.zzgl.DepartmentStaffDto
;
/**
/**
* 员工档案+统计图查询
* 员工档案+统计图查询
...
@@ -128,4 +129,6 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> {
...
@@ -128,4 +129,6 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> {
* @return
* @return
*/
*/
IPage
<
YgglMainEmp
>
selectME
(
Page
<
YgglMainEmp
>
page
,
@Param
(
"param"
)
EmpQuery
empQuery
);
IPage
<
YgglMainEmp
>
selectME
(
Page
<
YgglMainEmp
>
page
,
@Param
(
"param"
)
EmpQuery
empQuery
);
List
<
DepartmentStaffDto
>
DepartmentStaff
(
Integer
orgcode
,
Integer
upid
);
}
}
src/main/java/cn/timer/api/dto/zzgl/DepartmentStaffDto.java
0 → 100644
View file @
d51699e4
package
cn
.
timer
.
api
.
dto
.
zzgl
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
DepartmentStaffDto
{
private
Integer
empNum
;
private
String
empname
;
private
String
phone
;
private
String
bmgwname
;
}
src/main/java/cn/timer/api/dto/zzgl/ObtainDepartmentDto.java
0 → 100644
View file @
d51699e4
package
cn
.
timer
.
api
.
dto
.
zzgl
;
import
java.io.Serializable
;
import
java.util.List
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
ObtainDepartmentDto
implements
Serializable
{
private
static
final
long
serialVersionUID
=
8644456442638650462L
;
@ApiModelProperty
(
value
=
"编号"
,
example
=
"101"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"名称 "
,
example
=
"名称"
)
private
String
name
;
private
List
<
DepartmentStaffDto
>
user
;
}
src/main/resources/mapping/yggl/YgglMainEmpMapper.xml
View file @
d51699e4
...
@@ -67,6 +67,14 @@
...
@@ -67,6 +67,14 @@
<result
column=
"jobStatus"
property=
"jobStatus"
/>
<result
column=
"jobStatus"
property=
"jobStatus"
/>
<result
column=
"workage"
property=
"workage"
/>
<result
column=
"workage"
property=
"workage"
/>
</resultMap>
</resultMap>
<resultMap
id=
"DepartmentStaffMap"
type=
"cn.timer.api.dto.zzgl.DepartmentStaffDto"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"empNum"
property=
"empNum"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"phone"
property=
"phone"
/>
<result
column=
"bmgwname"
property=
"bmgwname"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id,
id,
...
@@ -204,6 +212,17 @@
...
@@ -204,6 +212,17 @@
WHERE e.org_code = #{orgCode}
WHERE e.org_code = #{orgCode}
</select>
</select>
<select
id=
"DepartmentStaff"
resultMap=
"DepartmentStaffMap"
>
select em.emp_num as empNum,
em.`name` as empname,
bm.`name` as bmgwname,
em.phone
from yggl_main_emp em
LEFT JOIN zzgl_bmgw_m as bm on bm.id = em.bmgw_id
where em.org_code = #{orgcode}
and em.bmgw_id in (select bm.id from zzgl_bmgw_m bm
WHERE bm.up_id = #{upid})
</select>
<select
id=
"selectME"
resultMap=
"BaseResultMap"
>
<select
id=
"selectME"
resultMap=
"BaseResultMap"
>
SELECT
SELECT
...
...
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