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
97de4088
Commit
97de4088
authored
Mar 04, 2025
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huych-入离职登记提交
parent
05e180ef
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
9 deletions
+81
-9
EmployeeRegistrationSearchVo.java
...fu/cloud/plus/v1/csp/vo/EmployeeRegistrationSearchVo.java
+5
-0
EmployeeRegistrationController.java
...lus/v1/csp/controller/EmployeeRegistrationController.java
+13
-1
EmployeeRegistrationService.java
...loud/plus/v1/csp/service/EmployeeRegistrationService.java
+7
-0
EmployeeRegistrationServiceImpl.java
.../v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
+40
-7
EmployeeRegistrationMapper.xml
.../src/main/resources/mapper/EmployeeRegistrationMapper.xml
+16
-1
No files found.
yifu-csp/yifu-csp-api/src/main/java/com/yifu/cloud/plus/v1/csp/vo/EmployeeRegistrationSearchVo.java
View file @
97de4088
...
...
@@ -8,6 +8,7 @@ import lombok.Data;
import
java.time.LocalDateTime
;
import
java.util.List
;
import
java.util.Set
;
/**
* 入离职登记表
...
...
@@ -74,4 +75,8 @@ public class EmployeeRegistrationSearchVo extends EmployeeRegistration {
@TableField
(
exist
=
false
)
private
List
<
String
>
typeList
;
@Schema
(
description
=
"部门权限数组"
)
@TableField
(
exist
=
false
)
private
Set
<
String
>
departIdSet
;
}
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/controller/EmployeeRegistrationController.java
View file @
97de4088
...
...
@@ -7,7 +7,6 @@ import com.yifu.cloud.plus.v1.csp.service.EmployeeRegistrationService;
import
com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProjectBelongDept
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeProjectBelongDeptSearchCspVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
...
...
@@ -52,6 +51,19 @@ public class EmployeeRegistrationController {
return
new
R
<>(
employeeRegistrationService
.
getEmployeeRegistrationPage
(
page
,
employeeRegistration
));
}
/**
* 入离职登记表代办列表简单分页查询
*
* @param page 分页对象
* @param employeeRegistration 入离职登记表
* @return
*/
@Operation
(
description
=
"入离职登记表代办列表简单分页查询"
)
@GetMapping
(
"/hrPage"
)
public
R
<
IPage
<
EmployeeRegistration
>>
getHrEmployeeRegistrationPage
(
Page
<
EmployeeRegistration
>
page
,
EmployeeRegistrationSearchVo
employeeRegistration
)
{
return
new
R
<>(
employeeRegistrationService
.
getHrEmployeeRegistrationPage
(
page
,
employeeRegistration
));
}
/**
* 通过id查询入离职登记表
*
...
...
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/EmployeeRegistrationService.java
View file @
97de4088
...
...
@@ -28,6 +28,13 @@ public interface EmployeeRegistrationService extends IService<EmployeeRegistrati
*/
IPage
<
EmployeeRegistration
>
getEmployeeRegistrationPage
(
Page
<
EmployeeRegistration
>
page
,
EmployeeRegistrationSearchVo
employeeRegistration
);
/**
* 入离职登记表简单分页查询
* @param employeeRegistration 入离职登记表
* @return
*/
IPage
<
EmployeeRegistration
>
getHrEmployeeRegistrationPage
(
Page
<
EmployeeRegistration
>
page
,
EmployeeRegistrationSearchVo
employeeRegistration
);
/**
* 入离职登记表导入
* @param inputStream 文件流
...
...
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
View file @
97de4088
...
...
@@ -31,6 +31,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.UserPermissionVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil
;
...
...
@@ -50,10 +51,7 @@ import javax.servlet.http.HttpServletResponse;
import
java.io.InputStream
;
import
java.net.URLEncoder
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
...
...
@@ -92,6 +90,18 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
*/
@Override
public
IPage
<
EmployeeRegistration
>
getEmployeeRegistrationPage
(
Page
<
EmployeeRegistration
>
page
,
EmployeeRegistrationSearchVo
employeeRegistration
)
{
getDtpeAuth
(
employeeRegistration
);
return
baseMapper
.
getEmployeeRegistrationPage
(
page
,
employeeRegistration
);
}
/**
* hr入离职登记表代办列表简单分页查询
*
* @param employeeRegistration 入离职登记表
* @return
*/
@Override
public
IPage
<
EmployeeRegistration
>
getHrEmployeeRegistrationPage
(
Page
<
EmployeeRegistration
>
page
,
EmployeeRegistrationSearchVo
employeeRegistration
)
{
return
baseMapper
.
getEmployeeRegistrationPage
(
page
,
employeeRegistration
);
}
...
...
@@ -161,6 +171,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
EmployeeRegistrationHrExportVo
.
class
).
build
();
getDtpeAuth
(
searchVo
);
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
...
...
@@ -447,10 +458,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
if
(
sendUser
!=
null
)
{
RestTemplate
restTemplate
=
new
RestTemplate
();
Map
<
String
,
Object
>
requestMap
=
new
HashMap
<>();
String
authUrl
=
null
;
Map
<
String
,
Object
>
textcard
=
new
HashMap
<>();
authUrl
=
String
.
format
(
SecurityConstants
.
WX_GET_MESSAGE_AUTH_URL
,
wxConfig
.
getCorpid
(),
wxConfig
.
getDomainName
()+
"/auth/oauth/wxLogin"
,
"01"
+
registration
.
getId
());
String
authUrl
=
String
.
format
(
SecurityConstants
.
WX_GET_MESSAGE_AUTH_URL
,
wxConfig
.
getCorpid
(),
"javascript:void(0)"
,
"01"
+
registration
.
getId
());
StringBuilder
description
=
new
StringBuilder
();
String
title
=
""
;
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
)
||
CommonConstants
.
TWO_STRING
.
equals
(
type
))
{
...
...
@@ -545,4 +554,28 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
return
false
;
}
/**
* @Description: 获取部门权限
* @Author: huych
* @Date: 2025/3/4 10:41
* @return:
**/
private
void
getDtpeAuth
(
EmployeeRegistrationSearchVo
searchVo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
!=
user
&&
Common
.
isNotNull
(
user
.
getId
()))
{
List
<
UserPermissionVo
>
cspPermList
=
user
.
getCspPermMap
();
if
(
Common
.
isNotNull
(
cspPermList
))
{
// 获取用户在当前项目下的权限
UserPermissionVo
authority
=
null
;
for
(
UserPermissionVo
userPermissionVo
:
cspPermList
)
{
if
(
searchVo
.
getDeptNo
().
equals
(
userPermissionVo
.
getProjectNo
()))
{
authority
=
userPermissionVo
;
}
}
if
(
Common
.
isNotNull
(
authority
)
&&
!
authority
.
isHaveAll
())
{
searchVo
.
setDepartIdSet
(
authority
.
getDepartIdSet
());
}
}
}
}
}
yifu-csp/yifu-csp-biz/src/main/resources/mapper/EmployeeRegistrationMapper.xml
View file @
97de4088
...
...
@@ -29,6 +29,7 @@
<result
property=
"deptId"
column=
"dept_id"
/>
<result
property=
"customerPhone"
column=
"customer_phone"
/>
<result
property=
"customerUsername"
column=
"customer_username"
/>
<result
property=
"customerUserLoginname"
column=
"customer_user_loginname"
/>
</resultMap>
<resultMap
id=
"employeeRegistrationExportMap"
type=
"com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationExportVo"
>
...
...
@@ -84,7 +85,8 @@
a.dept_id,
a.dept_no,
a.customer_username,
a.customer_phone
a.customer_phone,
a.customer_user_loginname
</sql>
<sql
id=
"employeeRegistration_where"
>
<if
test=
"employeeRegistration != null"
>
...
...
@@ -157,6 +159,19 @@
<if
test=
"employeeRegistration.createName != null and employeeRegistration.createName.trim() != ''"
>
AND a.create_name = #{employeeRegistration.createName}
</if>
<if
test=
"employeeRegistration.customerUserLoginname != null and employeeRegistration.customerUserLoginname.trim() != ''"
>
AND a.customer_user_loginname = #{employeeRegistration.customerUserLoginname}
</if>
<if
test=
"employeeRegistration.deptNo != null and employeeRegistration.deptNo.trim() != ''"
>
AND a.dept_no = #{employeeRegistration.deptNo}
</if>
<if
test=
"employeeRegistration.departIdSet != null and employeeRegistration.departIdSet.size > 0"
>
AND a.emp_deptid in
<foreach
item=
"idStr"
index=
"index"
collection=
"employeeRegistration.departIdSet"
open=
"("
separator=
","
close=
")"
>
#{idStr}
</foreach>
</if>
</if>
</sql>
<!--employeeRegistration简单分页查询-->
...
...
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