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
57fdd48a
Commit
57fdd48a
authored
Jun 30, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huyc 项目档案代码提交
parent
48801cac
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
97 additions
and
6 deletions
+97
-6
TEmployeeProjectController.java
.../yifu/archives/controller/TEmployeeProjectController.java
+15
-1
TEmployeeProjectService.java
...lus/v1/yifu/archives/service/TEmployeeProjectService.java
+17
-1
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+60
-4
ErrorCodes.java
....cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
+4
-0
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+1
-0
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeProjectController.java
View file @
57fdd48a
...
@@ -81,7 +81,6 @@ public class TEmployeeProjectController {
...
@@ -81,7 +81,6 @@ public class TEmployeeProjectController {
return
R
.
ok
(
tEmployeeProjectService
.
getTEmployeeProjectInfoPage
(
page
,
tEmployeeProject
));
return
R
.
ok
(
tEmployeeProjectService
.
getTEmployeeProjectInfoPage
(
page
,
tEmployeeProject
));
}
}
/**
/**
* 通过id查询项目档案表
* 通过id查询项目档案表
* @param id id
* @param id id
...
@@ -176,6 +175,21 @@ public class TEmployeeProjectController {
...
@@ -176,6 +175,21 @@ public class TEmployeeProjectController {
return
R
.
ok
(
tEmployeeProjectService
.
deleteEmpPro
(
tEmployeeProject
));
return
R
.
ok
(
tEmployeeProjectService
.
deleteEmpPro
(
tEmployeeProject
));
}
}
/**
* 减项
* @param excelVOList
* @param bindingResult
* @Author huyc
* @Date 2022-06-20
*/
@Operation
(
summary
=
"批量减项"
,
description
=
"批量减项"
)
@SysLog
(
"批量减项"
)
@PostMapping
(
"/batchDeleteEmpPro"
)
@PreAuthorize
(
"@pms.hasPermission('archives_temployeeproject_batchdelempproinfo')"
)
public
R
<
List
<
ErrorMessage
>>
batchDeleteEmpPro
(
@RequestExcel
List
<
EmployeeProjectVO
>
excelVOList
,
BindingResult
bindingResult
)
{
return
tEmployeeProjectService
.
batchDeleteEmpPro
(
excelVOList
,
bindingResult
);
}
/**
/**
* 批量新增项目档案信息
* 批量新增项目档案信息
*
*
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeProjectService.java
View file @
57fdd48a
...
@@ -45,8 +45,24 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
...
@@ -45,8 +45,24 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
R
reEmpInfo
(
JSONObject
jsonObject
);
R
reEmpInfo
(
JSONObject
jsonObject
);
/**
* @param tEmployeeProject
* @Description: 减项
* @Author: huyc
* @Date: 2022/6/21 10:30
* @return: R
**/
R
deleteEmpPro
(
TEmployeeProject
tEmployeeProject
);
R
deleteEmpPro
(
TEmployeeProject
tEmployeeProject
);
/**
* @param list
* @Description: 批量减项
* @Author: huyc
* @Date: 2022/6/21 10:30
* @return: R
**/
R
<
List
<
ErrorMessage
>>
batchDeleteEmpPro
(
List
<
EmployeeProjectVO
>
list
,
BindingResult
bindingResult
);
/**
/**
* @param excelVOList
* @param excelVOList
* @param bindingResult
* @param bindingResult
...
@@ -91,7 +107,7 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
...
@@ -91,7 +107,7 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
/**
/**
* @param ids
* @param ids
* @Description: 批量删除项目档案
* @Description: 批量删除项目档案
* @Author: h
gw
* @Author: h
uyc
* @Date: 2022/6/22 12:30
* @Date: 2022/6/22 12:30
* @return: R
* @return: R
**/
**/
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
57fdd48a
...
@@ -189,7 +189,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -189,7 +189,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.
eq
(
TEmployeeProject:
:
getEmpId
,
tEmployeeProject
.
getEmpId
())
.
eq
(
TEmployeeProject:
:
getEmpId
,
tEmployeeProject
.
getEmpId
())
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
dingleDigitIntArray
[
0
]));
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
dingleDigitIntArray
[
0
]));
if
(
count
.
compareTo
(
CommonConstants
.
DEPT_TREE_ROOT_ID
)
>
0
)
{
if
(
count
.
compareTo
(
CommonConstants
.
DEPT_TREE_ROOT_ID
)
>
0
)
{
return
R
.
failed
(
"
该人员存在其他进行中的项目,禁止同步减档!
"
);
return
R
.
failed
(
"
人员在该项目下存在进行中/未完结的服务
"
);
}
}
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
...
@@ -203,6 +203,60 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -203,6 +203,60 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return
R
.
failed
(
"传参为空!"
);
return
R
.
failed
(
"传参为空!"
);
}
}
@Override
public
R
<
List
<
ErrorMessage
>>
batchDeleteEmpPro
(
List
<
EmployeeProjectVO
>
excelVOList
,
BindingResult
bindingResult
)
{
// 通用校验获取失败的数据
List
<
ErrorMessage
>
errorMessageList
=
(
List
<
ErrorMessage
>)
bindingResult
.
getTarget
();
Map
<
Long
,
ErrorMessage
>
errorMsgMap
=
new
HashMap
<>();
if
(
Common
.
isNotNull
(
errorMessageList
)){
errorMessageList
.
stream
().
forEach
(
errorMessage
->
errorMsgMap
.
put
(
errorMessage
.
getLineNum
(),
errorMessage
));
}
// 执行数据插入操作 组装 PostDto
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
EmployeeProjectVO
excel
=
excelVOList
.
get
(
i
);
Set
<
String
>
errorMsg
=
new
HashSet
<>();
// 已有验证报错直接下一个
if
(
Common
.
isNotNull
(
errorMsgMap
.
get
(
i
+
2
)))
{
continue
;
}
//根据身份证和项目编码获取项目档案
TEmployeeProject
tEmployeeProject
=
this
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getDeptNo
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
TEmployeeInfo
tEmployeeInfoOld
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
TEmployeeProject
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
if
(
Common
.
isNotNull
(
tEmployeeProject
))
{
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
if
(
tEmployeeProject
.
getIsLeaveEmployee
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
Long
count
=
this
.
count
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpId
,
tEmployeeProject
.
getEmpId
())
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
dingleDigitIntArray
[
0
]));
if
(
count
.
compareTo
(
CommonConstants
.
DEPT_TREE_ROOT_ID
)
>
0
)
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_PROJECT_CHANGE_NOT_EXIST
));
}
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
}
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
this
.
updateById
(
tEmployeeProject
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfo
.
getId
(),
""
,
tEmployeeProjectOld
,
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
tEmployeeInfoOld
,
tEmployeeProject
);
}
if
(!
CollUtil
.
isEmpty
(
errorMsg
))
{
errorMessageList
.
add
(
new
ErrorMessage
((
long
)
(
i
+
2
),
errorMsg
));
}
}
if
(
CollUtil
.
isNotEmpty
(
errorMessageList
))
{
return
R
.
failed
(
errorMessageList
);
}
return
R
.
ok
();
}
/**
/**
* 新增档案操作记录
* 新增档案操作记录
* @param excelVOList
* @param excelVOList
...
@@ -228,6 +282,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -228,6 +282,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
// 获取身份证、手机号列表,批量查询档案
// 获取身份证、手机号列表,批量查询档案
Map
<
String
,
Integer
>
idCardMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
idCardMap
=
new
HashMap
<>();
String
idCard
;
String
idCard
;
String
deptNo
;
// 执行数据插入操作 组装 PostDto
// 执行数据插入操作 组装 PostDto
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
...
@@ -240,10 +295,11 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -240,10 +295,11 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
}
idCard
=
excel
.
getEmpIdcard
();
idCard
=
excel
.
getEmpIdcard
();
if
(
idCardMap
.
get
(
idCard
)
!=
null
)
{
deptNo
=
excel
.
getDeptNo
();
errorMsgMap
.
put
((
i
+
2L
),
new
ErrorMessage
(
"第"
+
(
i
+
2
)
+
"行身份证号与第"
+
idCardMap
.
get
(
idCard
)
+
"行重复!"
));
if
(
idCardMap
.
get
(
idCard
.
concat
(
deptNo
))
!=
null
)
{
errorMsgMap
.
put
((
i
+
2L
),
new
ErrorMessage
(
"第"
+
(
i
+
2
)
+
"行身份证号+项目编码与第"
+
idCardMap
.
get
(
idCard
)
+
"行重复!"
));
}
else
{
}
else
{
idCardMap
.
put
(
idCard
,
i
+
2
);
idCardMap
.
put
(
idCard
.
concat
(
deptNo
)
,
i
+
2
);
}
}
//根据身份证获取人员档案
//根据身份证获取人员档案
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
57fdd48a
...
@@ -283,4 +283,8 @@ public interface ErrorCodes {
...
@@ -283,4 +283,8 @@ public interface ErrorCodes {
* 对应项目编码无项目档案信息,请核实后导入
* 对应项目编码无项目档案信息,请核实后导入
*/
*/
String
ARCHIVES_PROJECT_EMP_NOT_EXIST
=
"archives.project.emp.not.exist"
;
String
ARCHIVES_PROJECT_EMP_NOT_EXIST
=
"archives.project.emp.not.exist"
;
/**
* 人员在该项目下存在进行中/未完结的服务
*/
String
ARCHIVES_PROJECT_CHANGE_NOT_EXIST
=
"archives.project.change.not.exist"
;
}
}
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
57fdd48a
...
@@ -87,6 +87,7 @@ import.file.type.error=\u5BFC\u5165\u7684\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u7
...
@@ -87,6 +87,7 @@ import.file.type.error=\u5BFC\u5165\u7684\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u7
archives.project.emp.not.exist
=
\u
5BF9
\u
5E94
\u9879\u
76EE
\u
7F16
\u7801\u
65E0
\u9879\u
76EE
\u6863\u6848\u
4FE1
\u
606F
\u
FF0C
\u
8BF7
\u6838\u
5B9E
\u
540E
\u
5BFC
\u5165
archives.project.emp.not.exist
=
\u
5BF9
\u
5E94
\u9879\u
76EE
\u
7F16
\u7801\u
65E0
\u9879\u
76EE
\u6863\u6848\u
4FE1
\u
606F
\u
FF0C
\u
8BF7
\u6838\u
5B9E
\u
540E
\u
5BFC
\u5165
archives.project.change.not.exist
=
\u
4EBA
\u5458\u5728\u
8BE5
\u9879\u
76EE
\u
4E0B
\u
5B58
\u5728\u
8FDB
\u
884C
\u
4E2D/
\u
672A
\u
5B8C
\u
7ED3
\u7684\u
670D
\u
52A1
...
...
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