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
bbacb6f6
Commit
bbacb6f6
authored
Mar 05, 2025
by
huyuchen
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.7.7' into MVP1.7.7
parents
ce3fa591
93d7e957
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
120 additions
and
15 deletions
+120
-15
TEmployeeProject.java
.../cloud/plus/v1/yifu/archives/entity/TEmployeeProject.java
+8
-0
TEmployeeProjectBelongDeptSearchCspVo.java
...fu/archives/vo/TEmployeeProjectBelongDeptSearchCspVo.java
+6
-0
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+2
-0
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+11
-0
TOperationLogController.java
...cloud/plus/v1/csp/controller/TOperationLogController.java
+0
-5
EmployeeRegistrationServiceImpl.java
.../v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
+2
-6
TOperationLogServiceImpl.java
...ud/plus/v1/csp/service/impl/TOperationLogServiceImpl.java
+1
-1
application-dev.yml
yifu-csp/yifu-csp-biz/src/main/resources/application-dev.yml
+6
-0
EmployeeRegistrationMapper.xml
.../src/main/resources/mapper/EmployeeRegistrationMapper.xml
+5
-2
DeptController.java
...u/cloud/plus/v1/yifu/admin/controller/DeptController.java
+14
-0
SysDeptMapper.java
...m/yifu/cloud/plus/v1/yifu/admin/mapper/SysDeptMapper.java
+4
-0
SysUserMapper.java
...m/yifu/cloud/plus/v1/yifu/admin/mapper/SysUserMapper.java
+2
-0
SysDeptService.java
...yifu/cloud/plus/v1/yifu/admin/service/SysDeptService.java
+8
-0
SysDeptServiceImpl.java
...d/plus/v1/yifu/admin/service/impl/SysDeptServiceImpl.java
+38
-0
SysDeptMapper.xml
...yifu-upms-biz/src/main/resources/mapper/SysDeptMapper.xml
+4
-0
SysUserMapper.xml
...yifu-upms-biz/src/main/resources/mapper/SysUserMapper.xml
+9
-1
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeProject.java
View file @
bbacb6f6
...
...
@@ -435,4 +435,12 @@ public class TEmployeeProject extends BaseEntity {
@TableField
(
exist
=
false
)
private
String
empDeptid
;
@Schema
(
description
=
"操作的用户id"
)
@TableField
(
exist
=
false
)
private
String
operationUserId
;
@Schema
(
description
=
"操作的用户Name"
)
@TableField
(
exist
=
false
)
private
String
operationUserName
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TEmployeeProjectBelongDeptSearchCspVo.java
View file @
bbacb6f6
...
...
@@ -49,4 +49,10 @@ public class TEmployeeProjectBelongDeptSearchCspVo {
@Schema
(
description
=
"项目档案创建与离职人"
)
private
String
empCreateAndLeaveUser
;
@Schema
(
description
=
"登录人Id"
)
private
String
userId
;
// 项目档案入离职日期,与日志确认接收时间比较
@Schema
(
description
=
"登录人姓名"
)
private
String
userName
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
bbacb6f6
...
...
@@ -2580,6 +2580,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
p
))
{
p
.
setStatus
(
CommonConstants
.
ONE_INT
);
p
.
setOperationUserId
(
vo
.
getCreateBy
());
p
.
setOperationUserName
(
vo
.
getCreateName
());
// hgw加所属部门逻辑:
tEmployeeProjectService
.
doSaveBelongDept
(
p
,
CommonConstants
.
ONE_STRING
);
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
bbacb6f6
...
...
@@ -2084,6 +2084,17 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
searchCspVo
.
setDeptId
(
p
.
getDeptId
());
searchCspVo
.
setEmpIdCard
(
p
.
getEmpIdcard
());
searchCspVo
.
setFeedbackType
(
feedbackType
);
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
!=
null
&&
Common
.
isNotNull
(
user
.
getNickname
()))
{
searchCspVo
.
setUserId
(
p
.
getOperationUserId
());
searchCspVo
.
setUserName
(
p
.
getOperationUserName
());
}
else
if
(
Common
.
isNotNull
(
p
.
getOperationUserId
()))
{
searchCspVo
.
setUserId
(
p
.
getOperationUserId
());
searchCspVo
.
setUserName
(
p
.
getOperationUserName
());
}
else
{
searchCspVo
.
setUserId
(
p
.
getCreateBy
());
searchCspVo
.
setUserName
(
p
.
getCreateName
());
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
feedbackType
))
{
searchCspVo
.
setEmpCreateAndLeaveTime
(
p
.
getCreateTime
());
searchCspVo
.
setEmpCreateAndLeaveUser
(
p
.
getCreateName
());
...
...
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/controller/TOperationLogController.java
View file @
bbacb6f6
...
...
@@ -22,12 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yifu.cloud.plus.v1.csp.entity.TOperationLog
;
import
com.yifu.cloud.plus.v1.csp.service.TOperationLogService
;
import
com.yifu.cloud.plus.v1.csp.vo.TOperationLogSearchVo
;
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.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
...
...
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
View file @
bbacb6f6
...
...
@@ -521,10 +521,6 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
* @return: boolean
**/
private
boolean
doSaveLogBatch
(
TEmployeeProjectBelongDeptSearchCspVo
searchCspVo
,
List
<
TEmployeeProjectBelongDept
>
belongDeptList
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
true
;
}
TOperationLog
log
;
List
<
TOperationLog
>
logList
=
new
ArrayList
<>();
String
title
=
"已处理"
;
...
...
@@ -543,8 +539,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
log
.
setRemark
(
"离职登记前已减员"
);
}
}
log
.
setCreateBy
(
user
.
get
Id
());
log
.
setCreateName
(
user
.
getNickn
ame
());
log
.
setCreateBy
(
searchCspVo
.
getUser
Id
());
log
.
setCreateName
(
searchCspVo
.
getUserN
ame
());
log
.
setCreateTime
(
LocalDateTime
.
now
());
logList
.
add
(
log
);
}
...
...
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/impl/TOperationLogServiceImpl.java
View file @
bbacb6f6
...
...
@@ -67,7 +67,7 @@ public class TOperationLogServiceImpl extends ServiceImpl<TOperationLogMapper, T
if
(
searchVo
.
getLimitStart
()
>=
0
&&
searchVo
.
getLimitEnd
()
>
0
)
{
wrapper
.
last
(
" limit "
+
searchVo
.
getLimitStart
()
+
","
+
searchVo
.
getLimitEnd
());
}
wrapper
.
orderBy
De
sc
(
TOperationLog:
:
getCreateTime
);
wrapper
.
orderBy
A
sc
(
TOperationLog:
:
getCreateTime
);
return
baseMapper
.
selectList
(
wrapper
);
}
...
...
yifu-csp/yifu-csp-biz/src/main/resources/application-dev.yml
View file @
bbacb6f6
...
...
@@ -38,3 +38,9 @@ security:
-
/v3/api-docs
-
/actuator/**
-
/swagger-ui/**
wx
:
corpid
:
wwbcb090af0dfe50e5
corpsecret
:
16kqEL_eU-ARwYyqLgEBWHgxm8gXVnkzv_eJMLy9NpU
agentid
:
1000010
authUrl
:
https://test-wx.worfu.com/yifu-auth/method/oauth/wxLogin
domainName
:
https://test-wx.worfu.com
\ No newline at end of file
yifu-csp/yifu-csp-biz/src/main/resources/mapper/EmployeeRegistrationMapper.xml
View file @
bbacb6f6
...
...
@@ -265,13 +265,16 @@
</select>
<!-- 将数据处理为已处理 -->
<
select
id=
"updateTwoRegistrationByIdCard"
resultType=
"java.lang.Integer
"
>
<
update
id=
"updateTwoRegistrationByIdCard
"
>
update employee_registration a
set a.process_status= '2'
where a.emp_idcard = #{searchCspVo.empIdCard} and a.process_status= '0'
<if
test=
"searchCspVo.deptId != null and searchCspVo.deptId.trim() != ''"
>
AND a.dept_id = #{searchCspVo.deptId}
</if>
<if
test=
"searchCspVo.feedbackType != null and searchCspVo.feedbackType.trim() != ''"
>
AND a.feedback_type = #{searchCspVo.feedbackType}
</if>
</
select
>
</
update
>
</mapper>
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/controller/DeptController.java
View file @
bbacb6f6
...
...
@@ -311,4 +311,18 @@ public class DeptController {
return
sysDeptService
.
cspUpdateDept
(
dept
);
}
/**
* 客户服务平台——获取项目下已删除的部门
* @return R<String> 删除部门的ID集合
* @author chenyuxi
* @since 1.9.7
*/
@GetMapping
(
value
=
"/csp/getDelDeptIds"
)
public
R
<
String
>
cspDelDeptIds
(
SysDeptVo
dept
)
{
if
(
Common
.
isEmpty
(
dept
.
getProjectNo
())){
return
R
.
failed
(
"项目编码不能为空"
);
}
return
R
.
ok
(
sysDeptService
.
cspDelDeptIds
(
dept
.
getProjectNo
()));
}
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/mapper/SysDeptMapper.java
View file @
bbacb6f6
...
...
@@ -97,4 +97,8 @@ public interface SysDeptMapper extends BaseMapper<SysDept> {
void
batchUpdateSort
(
@Param
(
"moveVos"
)
List
<
DeptSortVo
>
moveVos
);
List
<
SysDept
>
cspDelDeptIds
(
@Param
(
"projectNo"
)
String
projectNo
);
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/mapper/SysUserMapper.java
View file @
bbacb6f6
...
...
@@ -105,4 +105,6 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
@Param
(
"projectNo"
)
String
projectNo
);
List
<
String
>
getCspUserByDeptId
(
@Param
(
"deptId"
)
String
deptId
);
List
<
String
>
getCspUserByProjectNo
(
@Param
(
"projectNo"
)
String
projectNo
);
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/service/SysDeptService.java
View file @
bbacb6f6
...
...
@@ -144,4 +144,12 @@ public interface SysDeptService extends IService<SysDept> {
R
<
Boolean
>
cspUpdateDept
(
SysDeptMoveVo
dept
);
/**
* 客户服务平台——获取项目下已删除的部门
* @return R<String> 删除部门的ID集合
* @author chenyuxi
* @since 1.9.7
*/
String
cspDelDeptIds
(
String
projectNo
);
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/service/impl/SysDeptServiceImpl.java
View file @
bbacb6f6
...
...
@@ -511,6 +511,14 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
}
dept
.
setClient
(
ClientNameConstants
.
CLIENT_CSP
);
this
.
save
(
dept
);
// 清理用户权限,重新获取项目下的用户的部门权限
List
<
String
>
userNames
=
sysUserMapper
.
getCspUserByProjectNo
(
dept
.
getProjectNo
());
if
(
Common
.
isNotNull
(
userNames
)){
for
(
String
us:
userNames
){
redisUtil
.
remove
(
CacheConstants
.
USER_DETAILS
+
"::"
+
us
);
}
}
return
R
.
ok
(
"创建成功"
);
}
...
...
@@ -557,6 +565,13 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
return
R
.
failed
(
"部门下仍然有员工,请调出所有员工后,删除部门"
);
}
this
.
removeById
(
deptId
);
// 清理用户权限,重新获取用户的部门权限
List
<
String
>
userNames
=
sysUserMapper
.
getCspUserByDeptId
(
deptId
.
toString
());
if
(
Common
.
isNotNull
(
userNames
)){
for
(
String
us:
userNames
){
redisUtil
.
remove
(
CacheConstants
.
USER_DETAILS
+
"::"
+
us
);
}
}
return
R
.
ok
(
"删除成功"
);
}
...
...
@@ -616,4 +631,27 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
}
return
R
.
ok
();
}
/**
* 客户服务平台——获取项目下已删除的部门
*
* @param projectNo
* @return R<String> 删除部门的ID集合
* @author chenyuxi
* @since 1.9.7
*/
@Override
public
String
cspDelDeptIds
(
String
projectNo
)
{
String
delDeptIds
=
""
;
List
<
SysDept
>
deptList
=
baseMapper
.
cspDelDeptIds
(
projectNo
);
if
(
Common
.
isNotNull
(
deptList
)){
for
(
SysDept
dept
:
deptList
){
delDeptIds
=
delDeptIds
.
concat
(
","
).
concat
(
dept
.
getDeptId
().
toString
());
}
}
if
(
delDeptIds
.
length
()>
0
){
delDeptIds
=
delDeptIds
.
substring
(
1
);
}
return
delDeptIds
;
}
}
yifu-upms/yifu-upms-biz/src/main/resources/mapper/SysDeptMapper.xml
View file @
bbacb6f6
...
...
@@ -155,4 +155,8 @@
</foreach>
</update>
<select
id=
"cspDelDeptIds"
resultType=
"com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDept"
>
select dept_id from sys_dept where del_flag = '1' AND project_no = #{projectNo}
</select>
</mapper>
yifu-upms/yifu-upms-biz/src/main/resources/mapper/SysUserMapper.xml
View file @
bbacb6f6
...
...
@@ -446,6 +446,14 @@
where a.user_id in (
select c.user_id from sys_user_dept_permission c
where c.project_no in (SELECT project_no from sys_user_dept_permission where dept_id=#{deptId})
)
) and a.del_flag='0'
</select>
<select
id=
"getCspUserByProjectNo"
resultType=
"java.lang.String"
>
SELECT a.username from sys_user a
where a.user_id in (
select c.user_id from sys_user_dept_permission c
where c.project_no in (#{projectNo})
) and a.del_flag='0'
</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