Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
1e4809d7
Commit
1e4809d7
authored
Jul 04, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
离职库
parent
0aefb5a8
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
113 additions
and
0 deletions
+113
-0
EmployeeExportVO.java
...yifu/cloud/plus/v1/yifu/archives/vo/EmployeeExportVO.java
+3
-0
TEmployeeInfoController.java
.../v1/yifu/archives/controller/TEmployeeInfoController.java
+77
-0
TEmployeeInfoMapper.java
...oud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
+2
-0
TEmployeeInfoService.java
...d/plus/v1/yifu/archives/service/TEmployeeInfoService.java
+8
-0
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+5
-0
TEmployeeInfoMapper.xml
...ves-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
+18
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeExportVO.java
View file @
1e4809d7
...
...
@@ -37,6 +37,9 @@ public class EmployeeExportVO extends BaseEntity {
private
static
final
long
serialVersionUID
=
1L
;
@ExcelProperty
(
value
=
"id"
)
private
String
id
;
@ExcelProperty
(
value
=
"员工主码"
)
private
String
empCode
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeInfoController.java
View file @
1e4809d7
...
...
@@ -150,6 +150,83 @@ public class TEmployeeInfoController {
return
R
.
ok
(
tEmployeeInfoService
.
getPage
(
page
,
tEmployeeInfo
,
null
));
}
/**
* 分页查询
*
* @param page 分页对象
* @param tEmployeeInfo 人员档案表
* @return
*/
@Operation
(
summary
=
"离职库分页查询"
,
description
=
"离职库分页查询"
)
@GetMapping
(
"/getLeavePage"
)
public
R
<
IPage
<
TEmployeeInfo
>>
getLeavePage
(
Page
<
TEmployeeInfo
>
page
,
TEmployeeInfo
tEmployeeInfo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
// 普通用户:
if
(
CommonConstants
.
ONE_STRING
.
equals
(
user
.
getSystemFlag
()))
{
// 菜单id
String
menuId
=
"1536922631616278529"
;
String
linkId
=
user
.
getId
();
int
linkType
=
1
;
// 用户
SysDataAuth
sysDataAuth
=
new
SysDataAuth
();
sysDataAuth
.
setLinkId
(
linkId
);
sysDataAuth
.
setLinkType
(
linkType
);
// 获取缓存菜单权限的步骤:
Cache
cache
=
cacheManager
.
getCache
(
CacheConstants
.
DATA_AUTH_DETAILS
+
linkType
);
Object
obj
=
null
;
if
(
cache
!=
null
)
{
obj
=
cache
.
get
(
linkId
+
CommonConstants
.
DOWN_LINE_STRING
+
menuId
);
if
(
Common
.
isEmpty
(
obj
))
{
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
()
,
"/dataAuth/refreshAuth"
,
sysDataAuth
,
TEmployeeInfo
.
class
,
SecurityConstants
.
FROM_IN
);
obj
=
cache
.
get
(
linkId
+
CommonConstants
.
DOWN_LINE_STRING
+
menuId
);
if
(
Common
.
isEmpty
(
obj
))
{
linkId
=
user
.
getUserGroup
();
linkType
=
0
;
// 用户组
cache
=
cacheManager
.
getCache
(
CacheConstants
.
DATA_AUTH_DETAILS
+
linkType
);
if
(
cache
!=
null
)
{
obj
=
cache
.
get
(
linkId
+
CommonConstants
.
DOWN_LINE_STRING
+
menuId
);
if
(
Common
.
isEmpty
(
obj
))
{
sysDataAuth
.
setLinkId
(
linkId
);
sysDataAuth
.
setLinkType
(
linkType
);
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
()
,
"/dataAuth/refreshAuth"
,
sysDataAuth
,
TEmployeeInfo
.
class
,
SecurityConstants
.
FROM_IN
);
obj
=
cache
.
get
(
linkId
+
CommonConstants
.
DOWN_LINE_STRING
+
menuId
);
}
}
}
}
}
if
(
Common
.
isNotNull
(
obj
))
{
SimpleValueWrapper
objs
=
(
SimpleValueWrapper
)
obj
;
if
(
objs
!=
null
)
{
String
sql
=
String
.
valueOf
(
objs
.
get
());
if
(
sql
.
contains
(
"#deptId"
))
{
// TODO - 需要关联部门表
}
if
(
sql
.
contains
(
"#create_by"
))
{
sql
=
sql
.
replace
(
"#create_by"
,
user
.
getId
());
}
if
(
sql
.
contains
(
"#settleDomainId"
))
{
// TODO - 获取人员结算主体权限
// sql = sql.replace("#settleDomainId", ",'1','2' ")
sql
=
sql
.
replace
(
"or a.settle_domain_id in ('0'#settleDomainId) "
,
""
);
}
if
(
sql
.
contains
(
"#deptId"
))
{
// TODO - 获取人员部门权限
// sql = sql.replace("#settleDomainId", ",'1','2' ")
sql
=
sql
.
replace
(
" or dept.dept_id = #deptId "
,
""
);
}
return
R
.
ok
(
tEmployeeInfoService
.
getLeavePage
(
page
,
tEmployeeInfo
,
sql
));
}
}
}
return
R
.
ok
(
tEmployeeInfoService
.
getLeavePage
(
page
,
tEmployeeInfo
,
null
));
}
/**
* 通过id查询人员档案表
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
View file @
1e4809d7
...
...
@@ -39,6 +39,8 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
IPage
<
TEmployeeInfo
>
getPage
(
Page
<
TEmployeeInfo
>
page
,
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
,
@Param
(
"sql"
)
String
sql
);
IPage
<
TEmployeeInfo
>
getLeavePage
(
Page
<
TEmployeeInfo
>
page
,
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
,
@Param
(
"sql"
)
String
sql
);
List
<
TEmployeeInfo
>
getList
(
@Param
(
"tEmployeeInfo"
)
TEmployeeInfo
tEmployeeInfo
);
// hgw 2022-6-22 15:32:39 根据身份证查询一批档案
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeInfoService.java
View file @
1e4809d7
...
...
@@ -50,6 +50,14 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
**/
IPage
<
TEmployeeInfo
>
getPage
(
Page
<
TEmployeeInfo
>
page
,
TEmployeeInfo
employeeInfo
,
String
sql
);
/**
* @Description: 离职库分页
* @Author: hgw
* @Date: 2022/7/4 17:38
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo>
**/
IPage
<
TEmployeeInfo
>
getLeavePage
(
Page
<
TEmployeeInfo
>
page
,
TEmployeeInfo
employeeInfo
,
String
sql
);
/**
* @param employeeInfo
* @Description: 获取list
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
1e4809d7
...
...
@@ -86,6 +86,11 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
return
baseMapper
.
getPage
(
page
,
employeeInfo
,
sql
);
}
@Override
public
IPage
<
TEmployeeInfo
>
getLeavePage
(
Page
<
TEmployeeInfo
>
page
,
TEmployeeInfo
employeeInfo
,
String
sql
)
{
return
baseMapper
.
getLeavePage
(
page
,
employeeInfo
,
sql
);
}
@Override
public
List
<
TEmployeeInfo
>
getList
(
TEmployeeInfo
employeeInfo
)
{
return
baseMapper
.
getList
(
employeeInfo
);
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
View file @
1e4809d7
...
...
@@ -77,6 +77,7 @@
</resultMap>
<resultMap
id=
"tEmployeeExportMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeExportVO"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"empCode"
column=
"EMP_CODE"
/>
<result
property=
"empNatrue"
column=
"EMP_NATRUE"
/>
<result
property=
"empName"
column=
"EMP_NAME"
/>
...
...
@@ -418,7 +419,24 @@
<include
refid=
"employeeInfo_where"
/>
${sql}
group by a.id order by a.CREATE_TIME desc
</select>
<!-- hgw 分页查询 -->
<select
id=
"getLeavePage"
resultMap=
"tEmployeeExportMap"
>
SELECT
a.ID,
<include
refid=
"Base_Export_List"
/>
,GROUP_CONCAT(b.unit_name) UNIT_NAME
,GROUP_CONCAT(b.unit_no) UNIT_NO
,a.LEAVE_TIME
,a.LEAVE_USER
,a.LEAVE_REASON
from t_employee_info a
left join t_employee_project b on a.id = b.EMP_ID
where a.DELETE_FLAG = '0'
<include
refid=
"employeeInfo_where"
/>
${sql}
GROUP BY a.idgroup by a.id order by a.CREATE_TIME desc
</select>
<!-- hgw list查询 -->
...
...
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