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
bdf116c8
Commit
bdf116c8
authored
Jul 01, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
dc76bdc3
514b0ad2
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
71 additions
and
55 deletions
+71
-55
EmployeeProjectVO.java
...ifu/cloud/plus/v1/yifu/archives/vo/EmployeeProjectVO.java
+7
-0
TEmployeeInfoMapper.java
...oud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
+0
-2
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+13
-32
TEmployeeInfoMapper.xml
...ves-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
+5
-21
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+15
-0
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
+2
-0
DictController.java
...u.cloud.plus.v1/yifu/admin/controller/DictController.java
+13
-0
SysDictItemService.java
....cloud.plus.v1/yifu/admin/service/SysDictItemService.java
+2
-0
SysDictItemServiceImpl.java
...us.v1/yifu/admin/service/impl/SysDictItemServiceImpl.java
+10
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeProjectVO.java
View file @
bdf116c8
...
...
@@ -91,18 +91,23 @@ public class EmployeeProjectVO implements Serializable {
/**
* 合同类型(字典值)
*/
@NotNull
(
message
=
"合同类型不能为空"
)
@ExcelProperty
(
value
=
"合同类型"
)
@ExcelAttribute
(
name
=
"合同类型"
,
isNotEmpty
=
true
,
errorInfo
=
"项目编码不能为空"
,
maxLength
=
2
)
private
String
contractType
;
/**
* 工时制
*/
@NotNull
(
message
=
"工时制不能为空"
)
@ExcelProperty
(
value
=
"工时制"
)
@ExcelAttribute
(
name
=
"工时制"
,
isNotEmpty
=
true
,
errorInfo
=
"工时制不能为空"
,
maxLength
=
1
)
private
String
workingHours
;
/**
* 就职岗位
*/
@NotNull
(
message
=
"就职岗位不能为空"
)
@ExcelProperty
(
value
=
"就职岗位"
)
@ExcelAttribute
(
name
=
"就职岗位"
,
isNotEmpty
=
true
,
errorInfo
=
"就职岗位不能为空"
,
maxLength
=
20
)
private
String
post
;
...
...
@@ -111,6 +116,7 @@ public class EmployeeProjectVO implements Serializable {
* 入职日期
*/
@ExcelProperty
(
value
=
"入职日期"
)
@NotNull
(
message
=
"入职日期不能为空"
)
@Past
private
LocalDate
enjoinDate
;
...
...
@@ -118,6 +124,7 @@ public class EmployeeProjectVO implements Serializable {
* 试用期(单位月)
*/
@ExcelProperty
(
value
=
"试用期"
)
@NotNull
(
message
=
"试用期不能为空"
)
private
String
tryPeriod
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
View file @
bdf116c8
...
...
@@ -51,8 +51,6 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
void
updateExcelEmployeeInfo
(
@Param
(
"list"
)
List
<
TEmployeeInfo
>
list
);
int
insertExcelEmployeeInfo
(
@Param
(
"list"
)
List
<
TEmployeeInfo
>
list
);
/**
* 获得导出的人员档案列表
* hgw 2022-6-24 10:09:44
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
bdf116c8
...
...
@@ -152,6 +152,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
tEmployeeProject
.
setEmpId
(
tEmployeeInfo
.
getId
());
tEmployeeProject
.
setProjectSource
(
CommonConstants
.
dingleDigitStrArray
[
5
]);
this
.
save
(
tEmployeeProject
);
tEmployeeInfo
.
setProjectNum
(
tEmployeeInfo
.
getProjectNum
().
intValue
()
+
CommonConstants
.
ONE_INT
);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
return
R
.
ok
();
}
return
R
.
failed
(
"未在人员档案中查到身份信息"
);
...
...
@@ -289,7 +291,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
errorMessageList
.
stream
().
forEach
(
errorMessage
->
errorMsgMap
.
put
(
errorMessage
.
getLineNum
(),
errorMessage
));
}
List
<
TEmployeeInfo
>
insertList
=
new
ArrayList
();
List
<
TEmployeeInfo
>
updateList
=
new
ArrayList
();
List
<
TEmployeeProject
>
proInsList
=
new
ArrayList
();
List
<
TEmployeeProject
>
proupdateList
=
new
ArrayList
();
...
...
@@ -330,37 +331,17 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//不存在复档或复项的情况
//档案无(在档人员、离职库皆无),项目无
if
(
Common
.
isEmpty
(
tEmployeeInfo
)
&&
Common
.
isEmpty
(
tEmployeeProject
))
{
// 校验身份证实名
TCheckIdCard
checkIdCard
=
new
TCheckIdCard
();
checkIdCard
.
setName
(
excel
.
getEmpName
());
checkIdCard
.
setIdCard
(
excel
.
getEmpIdcard
());
List
<
TCheckIdCard
>
checkList
=
new
ArrayList
<>();
checkList
.
add
(
checkIdCard
);
R
<
List
<
TCheckIdCard
>>
checkListR
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckidcard/inner/checkIdCard"
,
checkList
,
TCheckIdCard
.
class
,
SecurityConstants
.
FROM_IN
);
Boolean
isSave
=
false
;
if
(
checkListR
!=
null
&&
checkListR
.
getData
()
!=
null
)
{
for
(
TCheckIdCard
check
:
checkListR
.
getData
())
{
if
(
check
.
getIsTrue
()
==
CommonConstants
.
ZERO_INT
)
{
errorMsg
.
add
(
check
.
getReason
());
isSave
=
true
;
break
;
}
}
}
if
(!
isSave
)
{
insertExcelPost
(
excel
,
insertList
);
insertExcelPro
(
excel
,
proInsList
);
}
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_REDUCE_EMP_ERROR
));
//档案有(在档人员),项目无
}
else
if
(
Common
.
isNotNull
(
tEmployeeInfo
)
&&
Common
.
isEmpty
(
tEmployeeProject
)
&&
CommonConstants
.
dingleDigitIntArray
[
0
]
==
tEmployeeInfo
.
getFileStatus
())
{
updateExcelPost
(
excel
,
updateList
,
tEmployeeInfo
);
updateExcelPost
(
excel
,
updateList
,
tEmployeeInfo
,
CommonConstants
.
ONE_INT
);
insertExcelPro
(
excel
,
proInsList
);
//档案有(在档人员),项目有(草稿/已审核);
}
else
if
(
Common
.
isNotNull
(
tEmployeeInfo
)
&&
CommonConstants
.
dingleDigitIntArray
[
0
]
==
tEmployeeInfo
.
getFileStatus
()
&&
Common
.
isNotNull
(
tEmployeeProject
)
&&
CommonConstants
.
dingleDigitIntArray
[
0
]
==
tEmployeeProject
.
getProjectStatus
())
{
updateExcelPost
(
excel
,
updateList
,
tEmployeeInfo
);
updateExcelPost
(
excel
,
updateList
,
tEmployeeInfo
,
CommonConstants
.
ZERO_INT
);
updateExcelPro
(
excel
,
proupdateList
,
tEmployeeProject
);
}
...
...
@@ -369,17 +350,17 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//档案有(离职库),项目(已减档)
if
(
Common
.
isNotNull
(
tEmployeeInfo
)
&&
CommonConstants
.
dingleDigitIntArray
[
1
]
==
tEmployeeInfo
.
getFileStatus
()
&&
Common
.
isNotNull
(
tEmployeeProject
)
&&
CommonConstants
.
dingleDigitIntArray
[
1
]
==
tEmployeeProject
.
getProjectStatus
())
{
updateExcelPost
(
excel
,
updateList
,
tEmployeeInfo
);
updateExcelPost
(
excel
,
updateList
,
tEmployeeInfo
,
CommonConstants
.
ZERO_INT
);
updateExcelPro
(
excel
,
proupdateList
,
tEmployeeProject
);
//档案有(离职库),项目无;
}
else
if
(
Common
.
isNotNull
(
tEmployeeInfo
)
&&
CommonConstants
.
dingleDigitIntArray
[
1
]
==
tEmployeeInfo
.
getFileStatus
()
&&
Common
.
isEmpty
(
tEmployeeProject
)
)
{
updateExcelPost
(
excel
,
updateList
,
tEmployeeInfo
);
updateExcelPost
(
excel
,
updateList
,
tEmployeeInfo
,
CommonConstants
.
ONE_INT
);
insertExcelPro
(
excel
,
proInsList
);
//档案有(在档人员),项目(已减档)
}
else
if
(
Common
.
isNotNull
(
tEmployeeInfo
)
&&
CommonConstants
.
dingleDigitIntArray
[
0
]
==
tEmployeeInfo
.
getFileStatus
()
&&
Common
.
isNotNull
(
tEmployeeProject
)
&&
CommonConstants
.
dingleDigitIntArray
[
1
]
==
tEmployeeProject
.
getProjectStatus
())
{
updateExcelPost
(
excel
,
updateList
,
tEmployeeInfo
);
updateExcelPost
(
excel
,
updateList
,
tEmployeeInfo
,
CommonConstants
.
ZERO_INT
);
updateExcelPro
(
excel
,
proupdateList
,
tEmployeeProject
);
}
//不允许复档复项
...
...
@@ -404,9 +385,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
try
{
if
(
insertList
.
size
()
>
CommonConstants
.
dingleDigitIntArray
[
0
])
{
tEmployeeInfoMapper
.
insertExcelEmployeeInfo
(
insertList
);
}
if
(
updateList
.
size
()
>
CommonConstants
.
dingleDigitIntArray
[
0
])
{
tEmployeeInfoMapper
.
updateExcelEmployeeInfo
(
updateList
);
}
...
...
@@ -721,10 +699,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
/**
* 更新人员档案
*/
private
void
updateExcelPost
(
EmployeeProjectVO
excel
,
List
<
TEmployeeInfo
>
updateList
,
TEmployeeInfo
tEmployeeInfo
)
{
private
void
updateExcelPost
(
EmployeeProjectVO
excel
,
List
<
TEmployeeInfo
>
updateList
,
TEmployeeInfo
tEmployeeInfo
,
int
num
)
{
BeanUtil
.
copyProperties
(
excel
,
tEmployeeInfo
);
YifuUser
user
=
SecurityUtils
.
getUser
();
tEmployeeInfo
.
setUpdateBy
(
user
.
getId
());
if
(
num
==
CommonConstants
.
ONE_INT
)
{
tEmployeeInfo
.
setProjectNum
(
tEmployeeInfo
.
getProjectNum
().
intValue
()
+
CommonConstants
.
ONE_INT
);
}
updateList
.
add
(
tEmployeeInfo
);
// 记录变更日志
TEmployeeInfo
tEmployeeInfoOld
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeInfo
.
getId
());
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
View file @
bdf116c8
...
...
@@ -485,6 +485,11 @@
when ID=#{i.id} then 0
</foreach>
</trim>
<trim
prefix=
"PROJECT_NUM =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
when ID=#{i.id} then #{i.projectNum}
</foreach>
</trim>
<trim
prefix=
"UPDATE_TIME =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
when ID=#{i.id} then now()
...
...
@@ -504,27 +509,6 @@
</foreach>
</update>
<insert
id=
"insertExcelEmployeeInfo"
parameterType=
"java.util.List"
>
insert into t_employee_info
(ID,EMP_NATRUE,EMP_NAME,EMP_IDCARD,STATUS,FILE_STATUS,EMP_CODE,DELETE_FLAG,CREATE_BY,CREATE_NAME,CREATE_TIME)
VALUES
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
REPLACE(UUID(),"-",""),
#{item.empNatrue,jdbcType=VARCHAR},
#{item.empName,jdbcType=VARCHAR},
#{item.empIdcard,jdbcType=VARCHAR},
#{item.status,jdbcType=VARCHAR},
0,
#{item.empCode,jdbcType=VARCHAR},
#{item.deleteFlag,jdbcType=VARCHAR},
#{item.createBy,jdbcType=VARCHAR},
#{item.createName,jdbcType=VARCHAR},
now()
)
</foreach>
</insert>
<!--tEmployeeInfo人员档案导出查询-->
<select
id=
"getTEmployeeExportList"
resultMap=
"tEmployeeExportMap"
>
select
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
bdf116c8
...
...
@@ -50,6 +50,11 @@ public interface CommonConstants {
*/
Long
DEPT_TREE_ROOT_ID
=
0L
;
/**
* 1L
*/
Long
LONG_1
=
1L
;
/**
* 菜单
*/
...
...
@@ -257,4 +262,14 @@ public interface CommonConstants {
String
ID
=
"ID"
;
String
PARAM_IS_NOT_ERROR
=
"传参异常,请检查参数"
;
int
EXCEL_EXPORT_LIMIT
=
60000
;
/**
* 成功颜色
*/
String
GREEN
=
"green"
;
/**
* 失败颜色
*/
String
RED
=
"red"
;
}
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
bdf116c8
...
...
@@ -213,6 +213,10 @@ public interface ErrorCodes {
* 存在已减档的档案,禁止导入
*/
String
CHECKS_REDUCE_EMP_ERROR
=
"checks.reduce.emp.error"
;
/**
* 该人员暂无档案信息,请先至“在档人员”处建档
*/
String
CHECKS_EXIT_EMPPROJECT_ERROR
=
"checks.exit.empproject.error"
;
/**
* 存在已减项的项目,禁止导入
*/
...
...
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
bdf116c8
...
...
@@ -58,6 +58,8 @@ checks.emp.project.error=\u5B58\u5728\u5DF2\u51CF\u6863\u7684\u6863\u6848\u548C\
checks.reduce.emp.error
=
\u
5B58
\u5728\u
5DF2
\u
51CF
\u6863\u7684\u6863\u6848\u
FF0C
\u7981\u
6B62
\u
5BFC
\u5165
checks.reduce.project.error
=
\u
5B58
\u5728\u
5DF2
\u
51CF
\u9879\u7684\u9879\u
76EE
\u
FF0C
\u7981\u
6B62
\u
5BFC
\u5165
checks.exit.empproject.error
=
\u
8BE5
\u
4EBA
\u5458\u6682\u
65E0
\u6863\u6848\u
4FE1
\u
606F
\u
FF0C
\u
8BF7
\u5148\u
81F3
\u
201C
\u5728\u6863\u
4EBA
\u5458\u
201D
\u5904\u
5EFA
\u6863
checks.emp.exit.error
=
\u
4EBA
\u5458\u
4E0D
\u5728\u
8BE5
\u9879\u
76EE
\u
FF0C
\u
65E0
\u
6CD5
\u
66F4
\u
65B0
checks.project.delete.error
=
\u9879\u
76EE
\u6863\u6848\u
72B6
\u6001\u
4E3A
\u
5DF2
\u
5BA1
\u6838\u
FF0C
\u7981\u
6B62
\u5220\u9664
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/controller/DictController.java
View file @
bdf116c8
...
...
@@ -323,4 +323,17 @@ public class DictController {
return
sysDictItemService
.
getDictToValue
();
}
/**
* @Description: 根据type和value获取字典值
* @Author: huyc
* @Date: 2022/7/1
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Inner
@PostMapping
(
"/inner/getLableFronValue"
)
public
R
<
String
>
getLableFronValue
(
@RequestParam
String
value
,
@RequestParam
String
type
)
{
return
sysDictItemService
.
getLableFronValue
(
value
,
type
);
}
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/SysDictItemService.java
View file @
bdf116c8
...
...
@@ -84,4 +84,6 @@ public interface SysDictItemService extends IService<SysDictItem> {
void
clearDictItemCache
();
R
<
Boolean
>
saveDiy
(
SysDictItem
sysDictItem
);
R
<
String
>
getLableFronValue
(
String
value
,
String
type
);
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysDictItemServiceImpl.java
View file @
bdf116c8
...
...
@@ -123,6 +123,16 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
return
R
.
ok
();
}
@Override
public
R
<
String
>
getLableFronValue
(
String
value
,
String
type
)
{
SysDictItem
sysDictItem
=
baseMapper
.
selectOne
(
Wrappers
.<
SysDictItem
>
query
().
lambda
()
.
eq
(
SysDictItem:
:
getType
,
type
).
eq
(
SysDictItem:
:
getValue
,
value
)
.
eq
(
SysDictItem:
:
getDelFlag
,
CommonConstants
.
ZERO_STRING
));
if
(
Common
.
isNotNull
(
sysDictItem
))
{
return
R
.
ok
(
sysDictItem
.
getLabel
());
}
return
R
.
ok
(
CommonConstants
.
EMPTY_STRING
);
}
private
void
updateDictItem
(
String
type
,
Map
<
String
,
Object
>
resultMap
){
List
<
SysDictItem
>
allList
=
baseMapper
.
selectList
(
Wrappers
.<
SysDictItem
>
query
().
lambda
()
...
...
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