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
a0f5cf38
Commit
a0f5cf38
authored
Jul 08, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
区域调整
parent
ac5ee37d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
70 additions
and
44 deletions
+70
-44
TEmpDisabilityInfoServiceImpl.java
.../archives/service/impl/TEmpDisabilityInfoServiceImpl.java
+13
-8
TEmpEducationServiceImpl.java
.../yifu/archives/service/impl/TEmpEducationServiceImpl.java
+13
-8
TEmpFamilyServiceImpl.java
.../v1/yifu/archives/service/impl/TEmpFamilyServiceImpl.java
+13
-8
TEmpProfessionalQualificationServiceImpl.java
...ervice/impl/TEmpProfessionalQualificationServiceImpl.java
+16
-10
TEmpWorkRecordingServiceImpl.java
...u/archives/service/impl/TEmpWorkRecordingServiceImpl.java
+14
-9
GlobalExceptionHandler.java
...ifu/common/security/exception/GlobalExceptionHandler.java
+1
-1
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpDisabilityInfoServiceImpl.java
View file @
a0f5cf38
...
...
@@ -73,9 +73,12 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf
@Override
public
void
importTmpDisability
(
List
<
EmpDisabilityExcelVO
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
// 个性化校验逻辑
List
<
TEmpDisabilityInfo
>
list
=
this
.
list
(
Wrappers
.<
TEmpDisabilityInfo
>
query
().
lambda
()
.
in
(
TEmpDisabilityInfo:
:
getEmpIdcard
,
excelVOList
.
stream
().
map
(
EmpDisabilityExcelVO:
:
getEmpIdcard
).
collect
(
Collectors
.
toList
()))
.
eq
(
TEmpDisabilityInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
List
<
TEmpDisabilityInfo
>
list
=
null
;
if
(
Common
.
isNotNull
(
excelVOList
)){
this
.
list
(
Wrappers
.<
TEmpDisabilityInfo
>
query
().
lambda
()
.
in
(
TEmpDisabilityInfo:
:
getEmpIdcard
,
excelVOList
.
stream
().
map
(
EmpDisabilityExcelVO:
:
getEmpIdcard
).
collect
(
Collectors
.
toList
()))
.
eq
(
TEmpDisabilityInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
}
TEmployeeInfo
emp
;
TEmpDisabilityInfo
exist
;
ErrorMessage
errorMsg
;
...
...
@@ -114,12 +117,14 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf
if
(
CommonConstants
.
ONE_STRING
.
equals
(
Integer
.
toString
(
emp
.
getFileStatus
()))){
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_REDUCED
));
}
// 检查添加是否已经存在
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getDisabilityName
().
equals
(
info
.
getDisabilityName
())
&&
excel
.
getEmpIdcard
().
equals
(
info
.
getEmpIdcard
()));
if
(
Common
.
isNotNull
(
list
)){
// 检查添加是否已经存在
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getDisabilityName
().
equals
(
info
.
getDisabilityName
())
&&
excel
.
getEmpIdcard
().
equals
(
info
.
getEmpIdcard
()));
if
(
match
)
{
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_DISABILITY_NAME_EXISTING
));
if
(
match
)
{
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_DISABILITY_NAME_EXISTING
));
}
}
return
null
;
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpEducationServiceImpl.java
View file @
a0f5cf38
...
...
@@ -76,9 +76,12 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
@Override
public
void
importEmpEducation
(
List
<
EmpEducationExcelVO
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
/// 个性化校验逻辑
List
<
TEmpEducation
>
list
=
this
.
list
(
Wrappers
.<
TEmpEducation
>
query
().
lambda
()
.
in
(
TEmpEducation:
:
getEmpIdcard
,
excelVOList
.
stream
().
map
(
EmpEducationExcelVO:
:
getEmpIdcard
).
collect
(
Collectors
.
toList
()))
.
eq
(
TEmpEducation:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
List
<
TEmpEducation
>
list
=
null
;
if
(
Common
.
isNotNull
(
excelVOList
)){
this
.
list
(
Wrappers
.<
TEmpEducation
>
query
().
lambda
()
.
in
(
TEmpEducation:
:
getEmpIdcard
,
excelVOList
.
stream
().
map
(
EmpEducationExcelVO:
:
getEmpIdcard
).
collect
(
Collectors
.
toList
()))
.
eq
(
TEmpEducation:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
}
TEmployeeInfo
emp
;
TEmpEducation
exist
;
ErrorMessage
errorMsg
;
...
...
@@ -218,12 +221,14 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
&&
CommonConstants
.
ONE_STRING
.
equals
(
Integer
.
toString
(
emp
.
getFileStatus
()))){
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_REDUCED
));
}
// 检查添加是否已经存在
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getEducationName
().
equals
(
info
.
getEducationName
())
&&
excel
.
getEmpIdcard
().
equals
(
info
.
getEmpIdcard
()));
if
(
Common
.
isNotNull
(
list
)){
// 检查添加是否已经存在
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getEducationName
().
equals
(
info
.
getEducationName
())
&&
excel
.
getEmpIdcard
().
equals
(
info
.
getEmpIdcard
()));
if
(
match
)
{
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_EDUCATION_EXISTING
));
if
(
match
)
{
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_EDUCATION_EXISTING
));
}
}
return
null
;
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpFamilyServiceImpl.java
View file @
a0f5cf38
...
...
@@ -75,9 +75,12 @@ public class TEmpFamilyServiceImpl extends ServiceImpl<TEmpFamilyMapper, TEmpFam
@Override
public
void
importEmpFamily
(
List
<
EmpFamilyExcelVO
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
// 个性化校验逻辑
List
<
TEmpFamily
>
list
=
this
.
list
(
Wrappers
.<
TEmpFamily
>
query
().
lambda
()
.
in
(
TEmpFamily:
:
getEmpIdcard
,
excelVOList
.
stream
().
map
(
EmpFamilyExcelVO:
:
getEmpIdcard
).
collect
(
Collectors
.
toList
()))
.
eq
(
TEmpFamily:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
List
<
TEmpFamily
>
list
=
null
;
if
(
Common
.
isNotNull
(
excelVOList
)){
this
.
list
(
Wrappers
.<
TEmpFamily
>
query
().
lambda
()
.
in
(
TEmpFamily:
:
getEmpIdcard
,
excelVOList
.
stream
().
map
(
EmpFamilyExcelVO:
:
getEmpIdcard
).
collect
(
Collectors
.
toList
()))
.
eq
(
TEmpFamily:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
}
TEmployeeInfo
emp
;
TEmpFamily
exist
;
ErrorMessage
errorMsg
;
...
...
@@ -118,12 +121,14 @@ public class TEmpFamilyServiceImpl extends ServiceImpl<TEmpFamilyMapper, TEmpFam
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_REDUCED
));
}
// 检查添加是否已经存在
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getFamilyName
().
equals
(
info
.
getFamilyName
())
&&
excel
.
getEmpIdcard
().
equals
(
info
.
getEmpIdcard
()));
if
(
Common
.
isNotNull
(
list
)){
// 检查添加是否已经存在
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getFamilyName
().
equals
(
info
.
getFamilyName
())
&&
excel
.
getEmpIdcard
().
equals
(
info
.
getEmpIdcard
()));
if
(
match
)
{
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_FAMILY_NAME_EXISTING
));
if
(
match
)
{
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_FAMILY_NAME_EXISTING
));
}
}
return
null
;
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpProfessionalQualificationServiceImpl.java
View file @
a0f5cf38
...
...
@@ -94,9 +94,12 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
@Override
public
void
importEmpCertificate
(
List
<
EmpCertificateExcelVO
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
List
<
TEmpProfessionalQualification
>
list
=
this
.
list
(
Wrappers
.<
TEmpProfessionalQualification
>
query
().
lambda
()
.
in
(
TEmpProfessionalQualification:
:
getEmpIdcard
,
excelVOList
.
stream
().
map
(
EmpCertificateExcelVO:
:
getEmpIdcard
).
collect
(
Collectors
.
toList
()))
.
eq
(
TEmpProfessionalQualification:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
List
<
TEmpProfessionalQualification
>
list
=
null
;
if
(
Common
.
isNotNull
(
excelVOList
)){
list
=
this
.
list
(
Wrappers
.<
TEmpProfessionalQualification
>
query
().
lambda
()
.
in
(
TEmpProfessionalQualification:
:
getEmpIdcard
,
excelVOList
.
stream
().
map
(
EmpCertificateExcelVO:
:
getEmpIdcard
).
collect
(
Collectors
.
toList
()))
.
eq
(
TEmpProfessionalQualification:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
}
TEmployeeInfo
emp
;
TEmpProfessionalQualification
exist
;
ErrorMessage
errorMsg
;
...
...
@@ -119,6 +122,7 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
continue
;
}
excel
.
setEmpName
(
emp
.
getEmpName
());
excel
.
setEmpIdcard
(
emp
.
getEmpIdcard
());
exist
=
baseMapper
.
selectOne
(
Wrappers
.<
TEmpProfessionalQualification
>
query
().
lambda
()
.
eq
(
TEmpProfessionalQualification:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
eq
(
TEmpProfessionalQualification:
:
getQualificationLevel
,
excel
.
getQualificationLevel
())
...
...
@@ -152,14 +156,16 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
if
(
CommonConstants
.
ONE_STRING
.
equals
(
Integer
.
toString
(
emp
.
getFileStatus
()))){
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_REDUCED
));
}
// 检查添加是否已经存在
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getQualificationLevel
()
.
equals
(
info
.
getQualificationLevel
())
&&
excel
.
getEmpIdcard
().
equals
(
info
.
getEmpIdcard
())
&&
excel
.
getQualificationType
().
equals
(
info
.
getQualificationType
()));
if
(
Common
.
isNotNull
(
list
)){
// 检查添加是否已经存在
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getQualificationLevel
()
.
equals
(
info
.
getQualificationLevel
())
&&
excel
.
getEmpIdcard
().
equals
(
info
.
getEmpIdcard
())
&&
excel
.
getQualificationType
().
equals
(
info
.
getQualificationType
()));
if
(
match
)
{
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_CERTIFICATE_NAME_EXISTING
));
if
(
match
)
{
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_CERTIFICATE_NAME_EXISTING
));
}
}
return
null
;
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpWorkRecordingServiceImpl.java
View file @
a0f5cf38
...
...
@@ -68,9 +68,12 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
@Override
public
void
importEmpWorkRecord
(
List
<
EmpWorkRecordExcelVO
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
// 个性化校验逻辑
List
<
TEmpWorkRecording
>
list
=
this
.
list
(
Wrappers
.<
TEmpWorkRecording
>
query
().
lambda
()
.
in
(
TEmpWorkRecording:
:
getEmpIdcard
,
excelVOList
.
stream
().
map
(
EmpWorkRecordExcelVO:
:
getEmpIdcard
).
collect
(
Collectors
.
toList
()))
.
eq
(
TEmpWorkRecording:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
List
<
TEmpWorkRecording
>
list
=
null
;
if
(
Common
.
isNotNull
(
excelVOList
)){
this
.
list
(
Wrappers
.<
TEmpWorkRecording
>
query
().
lambda
()
.
in
(
TEmpWorkRecording:
:
getEmpIdcard
,
excelVOList
.
stream
().
map
(
EmpWorkRecordExcelVO:
:
getEmpIdcard
).
collect
(
Collectors
.
toList
()))
.
eq
(
TEmpWorkRecording:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
}
TEmployeeInfo
emp
;
TEmpWorkRecording
exist
;
ErrorMessage
errorMsg
;
...
...
@@ -155,13 +158,15 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
if
(
CommonConstants
.
ONE_STRING
.
equals
(
Integer
.
toString
(
emp
.
getFileStatus
()))){
return
new
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
core
.
util
.
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_REDUCED
));
}
// 检查添加是否已经存在
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getWorkDepart
().
equals
(
info
.
getWorkDepart
())
&&
excel
.
getWorkUnit
().
equals
(
info
.
getWorkUnit
())
&&
excel
.
getEmpIdcard
().
equals
(
info
.
getEmpIdcard
()));
if
(
Common
.
isNotNull
(
list
)){
// 检查添加是否已经存在
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getWorkDepart
().
equals
(
info
.
getWorkDepart
())
&&
excel
.
getWorkUnit
().
equals
(
info
.
getWorkUnit
())
&&
excel
.
getEmpIdcard
().
equals
(
info
.
getEmpIdcard
()));
if
(
match
)
{
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_WORK_RECORD_EXISTING
));
if
(
match
)
{
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_WORK_RECORD_EXISTING
));
}
}
return
null
;
}
...
...
yifu-common/yifu-common-security/src/main/java/com/yifu.cloud.plus.v1/yifu/common/security/exception/GlobalExceptionHandler.java
View file @
a0f5cf38
...
...
@@ -53,7 +53,7 @@ public class GlobalExceptionHandler {
* @ExceptionHandler:当这个Controller中任何一个方法发生异常,一定会被这个方法拦截到
*/
@ExceptionHandler
(
Exception
.
class
)
//
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
@ResponseStatus
(
HttpStatus
.
INTERNAL_SERVER_ERROR
)
@ResponseBody
public
R
exception
(
Exception
e
)
{
errorLog
(
e
);
...
...
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