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
7948bc3a
Commit
7948bc3a
authored
Jul 08, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
027caaea
b2638c2d
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
230 additions
and
76 deletions
+230
-76
TEmployeeProject.java
.../cloud/plus/v1/yifu/archives/entity/TEmployeeProject.java
+18
-0
TEmpChangeInfoServiceImpl.java
...yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
+6
-6
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
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+28
-20
TEmployeeProjectMapper.xml
...-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
+27
-0
AsyncConfig.java
...fu.cloud.plus.v1/yifu/common/core/config/AsyncConfig.java
+70
-0
ErrorCodes.java
....cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
+4
-1
ExcelUtil.java
...m/yifu.cloud.plus.v1/yifu/common/core/util/ExcelUtil.java
+5
-5
spring.factories
...-common-core/src/main/resources/META-INF/spring.factories
+1
-0
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+1
-0
GlobalExceptionHandler.java
...ifu/common/security/exception/GlobalExceptionHandler.java
+1
-1
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeProject.java
View file @
7948bc3a
...
@@ -319,6 +319,24 @@ public class TEmployeeProject extends BaseEntity {
...
@@ -319,6 +319,24 @@ public class TEmployeeProject extends BaseEntity {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
Integer
fileTown
;
private
Integer
fileTown
;
/**
* 社保-省
*/
@Schema
(
description
=
"社保-省"
)
private
Integer
socialProvince
;
/**
* 社保-市
*/
@Schema
(
description
=
"社保-市"
)
private
Integer
socialCity
;
/**
* 社保-县
*/
@Schema
(
description
=
"社保-县"
)
private
Integer
socialTown
;
/**
/**
* 员工合同状态(字典)
* 员工合同状态(字典)
*/
*/
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
View file @
7948bc3a
...
@@ -96,13 +96,12 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
...
@@ -96,13 +96,12 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
updateTEmployeeProject
.
setUnitName
(
tEmpChangeInfo
.
getNewDept
());
updateTEmployeeProject
.
setUnitName
(
tEmpChangeInfo
.
getNewDept
());
tEmployeeProjectService
.
updateById
(
updateTEmployeeProject
);
tEmployeeProjectService
.
updateById
(
updateTEmployeeProject
);
tEmpChangeInfo
.
setProId
(
updateTEmployeeProject
.
getId
());
tEmpChangeInfo
.
setProId
(
updateTEmployeeProject
.
getId
());
// 记录变更日志
TEmployeeProject
tEmployeeProjectOld
=
tEmployeeProjectService
.
getById
(
updateTEmployeeProject
.
getId
());
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
updateTEmployeeProject
.
getId
(),
tEmployeeProjectOld
,
updateTEmployeeProject
);
}
}
//保存档案划转记录
//保存档案划转记录
this
.
save
(
tEmpChangeInfo
);
this
.
save
(
tEmpChangeInfo
);
// 记录变更日志
TEmployeeProject
tEmployeeProjectOld
=
tEmployeeProjectService
.
getById
(
tEmpChangeInfo
.
getProId
());
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
updateTEmployeeProject
.
getId
(),
tEmployeeProjectOld
,
updateTEmployeeProject
);
return
R
.
ok
();
return
R
.
ok
();
}
}
...
@@ -154,7 +153,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
...
@@ -154,7 +153,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
//待划转员工已在目标结算主体下不可划转
//待划转员工已在目标结算主体下不可划转
TEmployeeProject
tEmployeeProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
TEmployeeProject
tEmployeeProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getNewSettleCode
())
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getNewSettleCode
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
if
(
Common
.
isNotNull
(
tEmployeeProject
))
{
if
(
Common
.
isNotNull
(
tEmployeeProject
))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_CHANGE_EMP_PROJECT
,
excel
.
getNewSettleCode
()));
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_CHANGE_EMP_PROJECT
,
excel
.
getNewSettleCode
()));
}
}
...
@@ -165,7 +165,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
...
@@ -165,7 +165,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getOldSettleCode
())
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getOldSettleCode
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
if
(
Common
.
isNotNull
(
updateTEmployeePro
))
{
if
(
Common
.
isNotNull
(
updateTEmployeePro
))
{
if
(
CommonConstants
.
ONE_
STRING
.
equals
(
updateTEmployeePro
.
getProjectStatus
()
))
{
if
(
CommonConstants
.
ONE_
INT
==
updateTEmployeePro
.
getProjectStatus
(
))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
PROJECT_PERSON_DELETE_EXIT
,
excel
.
getOldSettleCode
()));
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
PROJECT_PERSON_DELETE_EXIT
,
excel
.
getOldSettleCode
()));
}
else
if
(
Common
.
isNotNull
(
tSettleDomain
))
{
}
else
if
(
Common
.
isNotNull
(
tSettleDomain
))
{
updateTEmployeePro
.
setDeptNo
(
tSettleDomain
.
getDepartNo
());
updateTEmployeePro
.
setDeptNo
(
tSettleDomain
.
getDepartNo
());
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpDisabilityInfoServiceImpl.java
View file @
7948bc3a
...
@@ -73,9 +73,12 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf
...
@@ -73,9 +73,12 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf
@Override
@Override
public
void
importTmpDisability
(
List
<
EmpDisabilityExcelVO
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
public
void
importTmpDisability
(
List
<
EmpDisabilityExcelVO
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
// 个性化校验逻辑
// 个性化校验逻辑
List
<
TEmpDisabilityInfo
>
list
=
this
.
list
(
Wrappers
.<
TEmpDisabilityInfo
>
query
().
lambda
()
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
()))
.
in
(
TEmpDisabilityInfo:
:
getEmpIdcard
,
excelVOList
.
stream
().
map
(
EmpDisabilityExcelVO:
:
getEmpIdcard
).
collect
(
Collectors
.
toList
()))
.
eq
(
TEmpDisabilityInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
.
eq
(
TEmpDisabilityInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
}
TEmployeeInfo
emp
;
TEmployeeInfo
emp
;
TEmpDisabilityInfo
exist
;
TEmpDisabilityInfo
exist
;
ErrorMessage
errorMsg
;
ErrorMessage
errorMsg
;
...
@@ -114,6 +117,7 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf
...
@@ -114,6 +117,7 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf
if
(
CommonConstants
.
ONE_STRING
.
equals
(
Integer
.
toString
(
emp
.
getFileStatus
()))){
if
(
CommonConstants
.
ONE_STRING
.
equals
(
Integer
.
toString
(
emp
.
getFileStatus
()))){
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_REDUCED
));
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_REDUCED
));
}
}
if
(
Common
.
isNotNull
(
list
)){
// 检查添加是否已经存在
// 检查添加是否已经存在
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getDisabilityName
().
equals
(
info
.
getDisabilityName
())
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getDisabilityName
().
equals
(
info
.
getDisabilityName
())
&&
excel
.
getEmpIdcard
().
equals
(
info
.
getEmpIdcard
()));
&&
excel
.
getEmpIdcard
().
equals
(
info
.
getEmpIdcard
()));
...
@@ -121,6 +125,7 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf
...
@@ -121,6 +125,7 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf
if
(
match
)
{
if
(
match
)
{
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_DISABILITY_NAME_EXISTING
));
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_DISABILITY_NAME_EXISTING
));
}
}
}
return
null
;
return
null
;
}
}
@Override
@Override
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpEducationServiceImpl.java
View file @
7948bc3a
...
@@ -76,9 +76,12 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
...
@@ -76,9 +76,12 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
@Override
@Override
public
void
importEmpEducation
(
List
<
EmpEducationExcelVO
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
public
void
importEmpEducation
(
List
<
EmpEducationExcelVO
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
/// 个性化校验逻辑
/// 个性化校验逻辑
List
<
TEmpEducation
>
list
=
this
.
list
(
Wrappers
.<
TEmpEducation
>
query
().
lambda
()
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
()))
.
in
(
TEmpEducation:
:
getEmpIdcard
,
excelVOList
.
stream
().
map
(
EmpEducationExcelVO:
:
getEmpIdcard
).
collect
(
Collectors
.
toList
()))
.
eq
(
TEmpEducation:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
.
eq
(
TEmpEducation:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
}
TEmployeeInfo
emp
;
TEmployeeInfo
emp
;
TEmpEducation
exist
;
TEmpEducation
exist
;
ErrorMessage
errorMsg
;
ErrorMessage
errorMsg
;
...
@@ -218,6 +221,7 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
...
@@ -218,6 +221,7 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
&&
CommonConstants
.
ONE_STRING
.
equals
(
Integer
.
toString
(
emp
.
getFileStatus
()))){
&&
CommonConstants
.
ONE_STRING
.
equals
(
Integer
.
toString
(
emp
.
getFileStatus
()))){
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_REDUCED
));
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_REDUCED
));
}
}
if
(
Common
.
isNotNull
(
list
)){
// 检查添加是否已经存在
// 检查添加是否已经存在
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getEducationName
().
equals
(
info
.
getEducationName
())
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getEducationName
().
equals
(
info
.
getEducationName
())
&&
excel
.
getEmpIdcard
().
equals
(
info
.
getEmpIdcard
()));
&&
excel
.
getEmpIdcard
().
equals
(
info
.
getEmpIdcard
()));
...
@@ -225,6 +229,7 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
...
@@ -225,6 +229,7 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
if
(
match
)
{
if
(
match
)
{
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_EDUCATION_EXISTING
));
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_EDUCATION_EXISTING
));
}
}
}
return
null
;
return
null
;
}
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpFamilyServiceImpl.java
View file @
7948bc3a
...
@@ -75,9 +75,12 @@ public class TEmpFamilyServiceImpl extends ServiceImpl<TEmpFamilyMapper, TEmpFam
...
@@ -75,9 +75,12 @@ public class TEmpFamilyServiceImpl extends ServiceImpl<TEmpFamilyMapper, TEmpFam
@Override
@Override
public
void
importEmpFamily
(
List
<
EmpFamilyExcelVO
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
public
void
importEmpFamily
(
List
<
EmpFamilyExcelVO
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
// 个性化校验逻辑
// 个性化校验逻辑
List
<
TEmpFamily
>
list
=
this
.
list
(
Wrappers
.<
TEmpFamily
>
query
().
lambda
()
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
()))
.
in
(
TEmpFamily:
:
getEmpIdcard
,
excelVOList
.
stream
().
map
(
EmpFamilyExcelVO:
:
getEmpIdcard
).
collect
(
Collectors
.
toList
()))
.
eq
(
TEmpFamily:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
.
eq
(
TEmpFamily:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
}
TEmployeeInfo
emp
;
TEmployeeInfo
emp
;
TEmpFamily
exist
;
TEmpFamily
exist
;
ErrorMessage
errorMsg
;
ErrorMessage
errorMsg
;
...
@@ -118,6 +121,7 @@ public class TEmpFamilyServiceImpl extends ServiceImpl<TEmpFamilyMapper, TEmpFam
...
@@ -118,6 +121,7 @@ public class TEmpFamilyServiceImpl extends ServiceImpl<TEmpFamilyMapper, TEmpFam
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_REDUCED
));
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_REDUCED
));
}
}
if
(
Common
.
isNotNull
(
list
)){
// 检查添加是否已经存在
// 检查添加是否已经存在
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getFamilyName
().
equals
(
info
.
getFamilyName
())
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getFamilyName
().
equals
(
info
.
getFamilyName
())
&&
excel
.
getEmpIdcard
().
equals
(
info
.
getEmpIdcard
()));
&&
excel
.
getEmpIdcard
().
equals
(
info
.
getEmpIdcard
()));
...
@@ -125,6 +129,7 @@ public class TEmpFamilyServiceImpl extends ServiceImpl<TEmpFamilyMapper, TEmpFam
...
@@ -125,6 +129,7 @@ public class TEmpFamilyServiceImpl extends ServiceImpl<TEmpFamilyMapper, TEmpFam
if
(
match
)
{
if
(
match
)
{
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_FAMILY_NAME_EXISTING
));
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_FAMILY_NAME_EXISTING
));
}
}
}
return
null
;
return
null
;
}
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpProfessionalQualificationServiceImpl.java
View file @
7948bc3a
...
@@ -94,9 +94,12 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
...
@@ -94,9 +94,12 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
@Override
@Override
public
void
importEmpCertificate
(
List
<
EmpCertificateExcelVO
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
public
void
importEmpCertificate
(
List
<
EmpCertificateExcelVO
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
List
<
TEmpProfessionalQualification
>
list
=
this
.
list
(
Wrappers
.<
TEmpProfessionalQualification
>
query
().
lambda
()
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
()))
.
in
(
TEmpProfessionalQualification:
:
getEmpIdcard
,
excelVOList
.
stream
().
map
(
EmpCertificateExcelVO:
:
getEmpIdcard
).
collect
(
Collectors
.
toList
()))
.
eq
(
TEmpProfessionalQualification:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
.
eq
(
TEmpProfessionalQualification:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
}
TEmployeeInfo
emp
;
TEmployeeInfo
emp
;
TEmpProfessionalQualification
exist
;
TEmpProfessionalQualification
exist
;
ErrorMessage
errorMsg
;
ErrorMessage
errorMsg
;
...
@@ -119,6 +122,7 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
...
@@ -119,6 +122,7 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
continue
;
continue
;
}
}
excel
.
setEmpName
(
emp
.
getEmpName
());
excel
.
setEmpName
(
emp
.
getEmpName
());
excel
.
setEmpIdcard
(
emp
.
getEmpIdcard
());
exist
=
baseMapper
.
selectOne
(
Wrappers
.<
TEmpProfessionalQualification
>
query
().
lambda
()
exist
=
baseMapper
.
selectOne
(
Wrappers
.<
TEmpProfessionalQualification
>
query
().
lambda
()
.
eq
(
TEmpProfessionalQualification:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
eq
(
TEmpProfessionalQualification:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
eq
(
TEmpProfessionalQualification:
:
getQualificationLevel
,
excel
.
getQualificationLevel
())
.
eq
(
TEmpProfessionalQualification:
:
getQualificationLevel
,
excel
.
getQualificationLevel
())
...
@@ -152,6 +156,7 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
...
@@ -152,6 +156,7 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
if
(
CommonConstants
.
ONE_STRING
.
equals
(
Integer
.
toString
(
emp
.
getFileStatus
()))){
if
(
CommonConstants
.
ONE_STRING
.
equals
(
Integer
.
toString
(
emp
.
getFileStatus
()))){
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_REDUCED
));
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_REDUCED
));
}
}
if
(
Common
.
isNotNull
(
list
)){
// 检查添加是否已经存在
// 检查添加是否已经存在
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getQualificationLevel
()
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getQualificationLevel
()
.
equals
(
info
.
getQualificationLevel
())
.
equals
(
info
.
getQualificationLevel
())
...
@@ -161,6 +166,7 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
...
@@ -161,6 +166,7 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
if
(
match
)
{
if
(
match
)
{
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_CERTIFICATE_NAME_EXISTING
));
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_CERTIFICATE_NAME_EXISTING
));
}
}
}
return
null
;
return
null
;
}
}
@Override
@Override
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpWorkRecordingServiceImpl.java
View file @
7948bc3a
...
@@ -68,9 +68,12 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
...
@@ -68,9 +68,12 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
@Override
@Override
public
void
importEmpWorkRecord
(
List
<
EmpWorkRecordExcelVO
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
public
void
importEmpWorkRecord
(
List
<
EmpWorkRecordExcelVO
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
// 个性化校验逻辑
// 个性化校验逻辑
List
<
TEmpWorkRecording
>
list
=
this
.
list
(
Wrappers
.<
TEmpWorkRecording
>
query
().
lambda
()
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
()))
.
in
(
TEmpWorkRecording:
:
getEmpIdcard
,
excelVOList
.
stream
().
map
(
EmpWorkRecordExcelVO:
:
getEmpIdcard
).
collect
(
Collectors
.
toList
()))
.
eq
(
TEmpWorkRecording:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
.
eq
(
TEmpWorkRecording:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
}
TEmployeeInfo
emp
;
TEmployeeInfo
emp
;
TEmpWorkRecording
exist
;
TEmpWorkRecording
exist
;
ErrorMessage
errorMsg
;
ErrorMessage
errorMsg
;
...
@@ -155,6 +158,7 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
...
@@ -155,6 +158,7 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
if
(
CommonConstants
.
ONE_STRING
.
equals
(
Integer
.
toString
(
emp
.
getFileStatus
()))){
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
));
return
new
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
core
.
util
.
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_REDUCED
));
}
}
if
(
Common
.
isNotNull
(
list
)){
// 检查添加是否已经存在
// 检查添加是否已经存在
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getWorkDepart
().
equals
(
info
.
getWorkDepart
())
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getWorkDepart
().
equals
(
info
.
getWorkDepart
())
&&
excel
.
getWorkUnit
().
equals
(
info
.
getWorkUnit
())
&&
excel
.
getWorkUnit
().
equals
(
info
.
getWorkUnit
())
...
@@ -163,6 +167,7 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
...
@@ -163,6 +167,7 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
if
(
match
)
{
if
(
match
)
{
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_WORK_RECORD_EXISTING
));
return
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_WORK_RECORD_EXISTING
));
}
}
}
return
null
;
return
null
;
}
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
7948bc3a
...
@@ -408,7 +408,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -408,7 +408,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if
(
updateProjectList
.
size
()
>
CommonConstants
.
dingleDigitIntArray
[
0
])
{
if
(
updateProjectList
.
size
()
>
CommonConstants
.
dingleDigitIntArray
[
0
])
{
for
(
EmployeeProjectNewOldVO
newOldVO
:
updateProjectList
)
{
for
(
EmployeeProjectNewOldVO
newOldVO
:
updateProjectList
)
{
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
]
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
]
,
""
,
newOldVO
.
getNewProjectEmployee
().
getId
()
,
""
,
newOldVO
.
getNewProjectEmployee
().
getId
()
,
newOldVO
.
getOldProjectEmployee
(),
newOldVO
.
getNewProjectEmployee
());
,
newOldVO
.
getOldProjectEmployee
(),
newOldVO
.
getNewProjectEmployee
());
}
}
}
}
...
@@ -681,6 +681,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -681,6 +681,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
List
<
TEmployeeProject
>
updateList
=
new
ArrayList
<>();
List
<
TEmployeeProject
>
updateList
=
new
ArrayList
<>();
List
<
TEmployeeInfo
>
updTEmployeeList
=
new
ArrayList
();
Map
<
String
,
Integer
>
checkCountMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
checkCountMap
=
new
HashMap
<>();
// 执行数据插入操作 组装
// 执行数据插入操作 组装
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
...
@@ -702,12 +704,12 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -702,12 +704,12 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getDeptNo
())
.
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getDeptNo
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
if
(
Common
.
isEmpty
(
tEmployeeProject
))
{
if
(
Common
.
isEmpty
(
tEmployeeProject
))
{
if
(
tEmployeeProject
.
getProjectStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
])
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_EMP_DELETE_ERROR
)));
}
else
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_EMP_EXIT_ERROR
)));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_EMP_EXIT_ERROR
)));
}
}
}
else
{
// 数据合法情况
if
(
CollUtil
.
isEmpty
(
errorMessageList
))
{
updateExcelProj
(
excel
,
updateList
,
tEmployeeProject
);
updateExcelProj
(
excel
,
updateList
,
tEmployeeProject
);
if
(
Common
.
isNotNull
(
excel
.
getEmpNatrue
()))
{
if
(
Common
.
isNotNull
(
excel
.
getEmpNatrue
()))
{
if
(!
excel
.
getEmpNatrue
().
equals
(
tEmployeeProject
.
getEmpNatrue
()))
{
if
(!
excel
.
getEmpNatrue
().
equals
(
tEmployeeProject
.
getEmpNatrue
()))
{
...
@@ -723,21 +725,30 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -723,21 +725,30 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getEmpNatrue
())
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
empNature
))
{
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getEmpNatrue
())
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
empNature
))
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
ONE_STRING
);
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
ONE_STRING
);
}
}
tEmployeeInfoMapper
.
updateByI
d
(
tEmployeeInfo
);
updTEmployeeList
.
ad
d
(
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfo
.
getId
(),
""
,
tEmployeeInfoCof
,
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfo
.
getId
(),
""
,
tEmployeeInfoCof
,
tEmployeeInfo
);
}
}
}
}
}
}
}
}
}
}
// 数据合法情况
if
(
CollUtil
.
isEmpty
(
errorMessageList
))
{
try
{
try
{
if
(
updateList
.
size
()
>
CommonConstants
.
dingleDigitIntArray
[
0
])
{
if
(
updateList
.
size
()
>
CommonConstants
.
dingleDigitIntArray
[
0
])
{
baseMapper
.
updateExcelEmpProject
(
updateList
);
baseMapper
.
updateExcelEmpProject
(
updateList
);
}
}
if
(
updTEmployeeList
.
size
()>
CommonConstants
.
dingleDigitIntArray
[
0
])
{
for
(
TEmployeeInfo
tEmployeeInfo
:
updTEmployeeList
)
{
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"数据更新异常"
,
e
);
log
.
error
(
"数据更新异常"
,
e
);
}
}
}
}
}
/**
/**
* 插入excel Pro
* 插入excel Pro
...
@@ -845,17 +856,14 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -845,17 +856,14 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//获取记录
//获取记录
list
=
gettEmpProInfoExportVos
(
idstr
,
projectDTO
);
list
=
gettEmpProInfoExportVos
(
idstr
,
projectDTO
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
EmployeeProjectExportVO
>
util
=
new
ExcelUtil
<>(
EmployeeProjectExportVO
.
class
);
for
(
EmployeeProjectExportVO
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
ServletOutputStream
out
=
null
;
ServletOutputStream
out
=
null
;
try
{
try
{
if
(
list
.
size
()
>
0
)
{
if
(
list
.
size
()
>
0
)
{
out
=
response
.
getOutputStream
();
out
=
response
.
getOutputStream
();
ExcelUtil
<
EmployeeProjectExportVO
>
util
=
new
ExcelUtil
<>(
EmployeeProjectExportVO
.
class
);
for
(
EmployeeProjectExportVO
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
response
.
setContentType
(
"multipart/form-data"
);
response
.
setContentType
(
"multipart/form-data"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
View file @
7948bc3a
...
@@ -47,6 +47,9 @@
...
@@ -47,6 +47,9 @@
<result
property=
"fileProvince"
column=
"FILE_PROVINCE"
/>
<result
property=
"fileProvince"
column=
"FILE_PROVINCE"
/>
<result
property=
"fileCity"
column=
"FILE_CITY"
/>
<result
property=
"fileCity"
column=
"FILE_CITY"
/>
<result
property=
"fileTown"
column=
"FILE_TOWN"
/>
<result
property=
"fileTown"
column=
"FILE_TOWN"
/>
<result
property=
"socialProvince"
column=
"SOCIAL_PROVINCE"
/>
<result
property=
"socialCity"
column=
"SOCIAL_CITY"
/>
<result
property=
"socialTown"
column=
"SOCIAL_TOWN"
/>
<result
property=
"empPhone"
column=
"EMP_PHONE"
/>
<result
property=
"empPhone"
column=
"EMP_PHONE"
/>
<result
property=
"salaryStatus"
column=
"SALARY_STATUS"
/>
<result
property=
"salaryStatus"
column=
"SALARY_STATUS"
/>
<result
property=
"insuranceStatus"
column=
"INSURANCE_STATUS"
/>
<result
property=
"insuranceStatus"
column=
"INSURANCE_STATUS"
/>
...
@@ -162,6 +165,9 @@
...
@@ -162,6 +165,9 @@
b.FILE_PROVINCE,
b.FILE_PROVINCE,
b.FILE_CITY,
b.FILE_CITY,
b.FILE_TOWN,
b.FILE_TOWN,
a.SOCIAL_PROVINCE,
a.SOCIAL_CITY,
a.SOCIAL_TOWN,
a.SALARY_STATUS
a.SALARY_STATUS
</sql>
</sql>
...
@@ -198,6 +204,9 @@
...
@@ -198,6 +204,9 @@
b.FILE_PROVINCE,
b.FILE_PROVINCE,
b.FILE_CITY,
b.FILE_CITY,
b.FILE_TOWN,
b.FILE_TOWN,
a.SOCIAL_PROVINCE,
a.SOCIAL_CITY,
a.SOCIAL_TOWN,
a.SALARY_STATUS,
a.SALARY_STATUS,
b.VALIDITY_START,
b.VALIDITY_START,
b.VALIDITY_END,
b.VALIDITY_END,
...
@@ -365,6 +374,15 @@
...
@@ -365,6 +374,15 @@
<if
test=
"tEmployeeProject.fileTown != null"
>
<if
test=
"tEmployeeProject.fileTown != null"
>
AND b.FILE_TOWN = #{tEmployeeProject.fileTown}
AND b.FILE_TOWN = #{tEmployeeProject.fileTown}
</if>
</if>
<if
test=
"tEmployeeProject.socialProvince != null"
>
AND a.SOCIAL_PROVINCE = #{tEmployeeProject.socialProvince}
</if>
<if
test=
"tEmployeeProject.fileCity != null"
>
AND a.SOCIAL_CITY = #{tEmployeeProject.socialCity}
</if>
<if
test=
"tEmployeeProject.fileTown != null"
>
AND a.SOCIAL_TOWN = #{tEmployeeProject.socialTown}
</if>
</if>
</if>
</sql>
</sql>
...
@@ -472,6 +490,15 @@
...
@@ -472,6 +490,15 @@
<if
test=
"tEmployeeProject.fileTown != null"
>
<if
test=
"tEmployeeProject.fileTown != null"
>
AND b.FILE_TOWN = #{tEmployeeProject.fileTown}
AND b.FILE_TOWN = #{tEmployeeProject.fileTown}
</if>
</if>
<if
test=
"tEmployeeProject.socialProvince != null"
>
AND a.SOCIAL_PROVINCE = #{tEmployeeProject.socialProvince}
</if>
<if
test=
"tEmployeeProject.fileCity != null"
>
AND a.SOCIAL_CITY = #{tEmployeeProject.socialCity}
</if>
<if
test=
"tEmployeeProject.fileTown != null"
>
AND a.SOCIAL_TOWN = #{tEmployeeProject.socialTown}
</if>
<if
test=
"tEmployeeProject.idList != null"
>
<if
test=
"tEmployeeProject.idList != null"
>
AND a.id in
AND a.id in
<foreach
item=
"idStr"
index=
"index"
collection=
"tEmployeeProject.idList"
open=
"("
separator=
","
close=
")"
>
<foreach
item=
"idStr"
index=
"index"
collection=
"tEmployeeProject.idList"
open=
"("
separator=
","
close=
")"
>
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/config/AsyncConfig.java
0 → 100644
View file @
7948bc3a
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
core
.
config
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.scheduling.annotation.AsyncConfigurer
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
;
import
java.util.concurrent.Executor
;
import
java.util.concurrent.ThreadPoolExecutor
;
/**
* 异步线程池
* @Author fxj
* @Date 2021-05-20
* @return
**/
@Configuration
@EnableAsync
@Slf4j
public
class
AsyncConfig
implements
AsyncConfigurer
{
// todo 幂等性如何保证
@Override
public
Executor
getAsyncExecutor
()
{
//定义线程池
ThreadPoolTaskExecutor
taskExecutor
=
new
ThreadPoolTaskExecutor
();
/**
* <!-- 设置allowCoreThreadTimeout=true(默认false)时,核心线程会超时关闭 -->
*/
taskExecutor
.
setAllowCoreThreadTimeOut
(
true
);
/**
* 核心线程数
* 1)<!-- 线程池维护线程的最少数量,即使没有任务需要执行,也会一直存活 -->
* 2)<!-- 设置allowCoreThreadTimeout=true(默认false)时,核心线程会超时关闭 -->
*/
taskExecutor
.
setCorePoolSize
(
2
);
/**
* <!-- 允许的空闲时间,当线程空闲时间达到keepAliveTime时,线程会退出,直到线程数量=corePoolSize -->
* <!-- 如果allowCoreThreadTimeout=true,则会直到线程数量=0 -->
*/
taskExecutor
.
setKeepAliveSeconds
(
200
);
/**
* <!-- 线程池维护线程的最大数量 -->
* <!-- 当线程数>=corePoolSize,且任务队列已满时。线程池会创建新线程来处理任务 -->
* <!-- 当线程数=maxPoolSize,且任务队列已满时,线程池会拒绝处理任务而抛出异常,异常见下
*/
taskExecutor
.
setMaxPoolSize
(
8
);
/**
* <!-- 缓存队列(阻塞队列)当核心线程数达到最大时,新任务会放在队列中排队等待执行 -->
*/
taskExecutor
.
setQueueCapacity
(
100
);
/**
* 建议配置threadNamePrefix属性,出问题时可以更方便的进行排查。
**/
taskExecutor
.
setThreadNamePrefix
(
"CRM_TO_HRO_EXECUTOR"
);
// 捕捉线程队列满的 拒绝处理
taskExecutor
.
setRejectedExecutionHandler
((
Runnable
r
,
ThreadPoolExecutor
exe
)
->
{
log
.
info
(
"当前任务线程池队列已满."
);
});
//初始化
taskExecutor
.
initialize
();
return
taskExecutor
;
}
@Override
public
AsyncUncaughtExceptionHandler
getAsyncUncaughtExceptionHandler
()
{
return
null
;
}
}
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
7948bc3a
...
@@ -225,7 +225,10 @@ public interface ErrorCodes {
...
@@ -225,7 +225,10 @@ public interface ErrorCodes {
* 人员不在该项目,无法更新
* 人员不在该项目,无法更新
*/
*/
String
CHECKS_EMP_EXIT_ERROR
=
"checks.emp.exit.error"
;
String
CHECKS_EMP_EXIT_ERROR
=
"checks.emp.exit.error"
;
/**
* 人员已减项,无法更新
*/
String
CHECKS_EMP_DELETE_ERROR
=
"checks.emp.delete.error"
;
// 该人员已存在,禁止重复添加
// 该人员已存在,禁止重复添加
String
ARCHIVES_IMPORT_EMP_IDCARD_EXISTING
=
"archives.import.emp.idCard.existing"
;
String
ARCHIVES_IMPORT_EMP_IDCARD_EXISTING
=
"archives.import.emp.idCard.existing"
;
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/util/ExcelUtil.java
View file @
7948bc3a
...
@@ -137,7 +137,7 @@ public class ExcelUtil <T> implements Serializable {
...
@@ -137,7 +137,7 @@ public class ExcelUtil <T> implements Serializable {
}
}
}
else
if
(
attr
.
isArea
()){
}
else
if
(
attr
.
isArea
()){
//区域字段处理 TODO
//区域字段处理 TODO
value
=
getAreaLabel
(
"area_"
+
field
.
get
(
vo
));
value
=
getAreaLabel
(
(
String
)
field
.
get
(
vo
));
}
}
field
.
set
(
vo
,
Common
.
isNotNull
(
value
)?
value:
field
.
get
(
vo
));
field
.
set
(
vo
,
Common
.
isNotNull
(
value
)?
value:
field
.
get
(
vo
));
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
...
@@ -287,10 +287,10 @@ public class ExcelUtil <T> implements Serializable {
...
@@ -287,10 +287,10 @@ public class ExcelUtil <T> implements Serializable {
if
(
attr
.
isArea
())
{
if
(
attr
.
isArea
())
{
//区域字段处理 TODO
//区域字段处理 TODO
if
(!
Common
.
isNotNull
(
attr
.
parentField
()))
{
if
(!
Common
.
isNotNull
(
attr
.
parentField
()))
{
tempStr
=
getAreaValue
(
"area_"
+
c
.
trim
(),
tempStr
,
attr
,
rowNum
,
errorTemp
);
tempStr
=
getAreaValue
(
c
.
trim
(),
tempStr
,
attr
,
rowNum
,
errorTemp
);
}
else
{
}
else
{
// TODO
// TODO
tempStr
=
getAreaValue
(
"area_"
+
c
.
trim
()+
"_"
+
getFieldValueByName
(
attr
.
parentField
(),
data
,
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
),
tempStr
,
attr
,
rowNum
,
errorTemp
);
tempStr
=
getAreaValue
(
c
.
trim
()+
"_"
+
getFieldValueByName
(
attr
.
parentField
(),
data
,
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
),
tempStr
,
attr
,
rowNum
,
errorTemp
);
}
}
}
}
}
}
...
@@ -449,11 +449,11 @@ public class ExcelUtil <T> implements Serializable {
...
@@ -449,11 +449,11 @@ public class ExcelUtil <T> implements Serializable {
return
propertyValue
;
return
propertyValue
;
}
}
private
String
getAreaLabel
(
String
c
)
{
private
String
getAreaLabel
(
String
c
)
{
return
(
String
)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
AREA_
VALUE
+
c
);
return
(
String
)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
AREA_
LABEL
+
c
);
}
}
private
String
getAreaValue
(
String
c
,
String
tempStr
,
ExcelAttribute
attr
,
Integer
rowNum
,
ErrorMessage
errorTemp
)
{
private
String
getAreaValue
(
String
c
,
String
tempStr
,
ExcelAttribute
attr
,
Integer
rowNum
,
ErrorMessage
errorTemp
)
{
tempStr
=
String
.
valueOf
(
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
AREA_
LABEL
+
c
));
tempStr
=
String
.
valueOf
(
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
AREA_
VALUE
+
c
));
if
(
Common
.
isEmpty
(
tempStr
)){
if
(
Common
.
isEmpty
(
tempStr
)){
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
attr
.
name
()
+
":"
+
c
.
trim
()
+
"校验异常,请联系管理人员"
),
errorTemp
);
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
attr
.
name
()
+
":"
+
c
.
trim
()
+
"校验异常,请联系管理人员"
),
errorTemp
);
return
CommonConstants
.
EMPTY_STRING
;
return
CommonConstants
.
EMPTY_STRING
;
...
...
yifu-common/yifu-common-core/src/main/resources/META-INF/spring.factories
View file @
7948bc3a
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.common.core.config.JacksonConfiguration,\
com.yifu.cloud.plus.v1.yifu.common.core.config.JacksonConfiguration,\
com.yifu.cloud.plus.v1.yifu.common.core.config.AsyncConfig,\
com.yifu.cloud.plus.v1.yifu.common.core.config.RedisTemplateConfiguration,\
com.yifu.cloud.plus.v1.yifu.common.core.config.RedisTemplateConfiguration,\
com.yifu.cloud.plus.v1.yifu.common.core.config.RestTemplateConfiguration,\
com.yifu.cloud.plus.v1.yifu.common.core.config.RestTemplateConfiguration,\
com.yifu.cloud.plus.v1.yifu.common.core.util.SpringContextHolder,\
com.yifu.cloud.plus.v1.yifu.common.core.util.SpringContextHolder,\
...
...
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
7948bc3a
...
@@ -61,6 +61,7 @@ checks.reduce.project.error=\u5B58\u5728\u5DF2\u51CF\u9879\u7684\u9879\u76EE\uFF
...
@@ -61,6 +61,7 @@ checks.reduce.project.error=\u5B58\u5728\u5DF2\u51CF\u9879\u7684\u9879\u76EE\uFF
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.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.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.emp.delete.error
=
\u
4EBA
\u5458\u
5DF2
\u
51CF
\u9879\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
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
archives.emp.certificate.name.existing
=
\u
8BE5
\u5458\u
5DE5
\u
5DF2
\u
5B58
\u5728\u
5BF9
\u
5E94
\u
8D44
\u
683C
\u
7C7B
\u
578B
\u
548C
\u
8D44
\u
683C
\u
7B49
\u
7EA7
\u7684\u
8BC1
\u
4E66
archives.emp.certificate.name.existing
=
\u
8BE5
\u5458\u
5DE5
\u
5DF2
\u
5B58
\u5728\u
5BF9
\u
5E94
\u
8D44
\u
683C
\u
7C7B
\u
578B
\u
548C
\u
8D44
\u
683C
\u
7B49
\u
7EA7
\u7684\u
8BC1
\u
4E66
...
...
yifu-common/yifu-common-security/src/main/java/com/yifu.cloud.plus.v1/yifu/common/security/exception/GlobalExceptionHandler.java
View file @
7948bc3a
...
@@ -53,7 +53,7 @@ public class GlobalExceptionHandler {
...
@@ -53,7 +53,7 @@ public class GlobalExceptionHandler {
* @ExceptionHandler:当这个Controller中任何一个方法发生异常,一定会被这个方法拦截到
* @ExceptionHandler:当这个Controller中任何一个方法发生异常,一定会被这个方法拦截到
*/
*/
@ExceptionHandler
(
Exception
.
class
)
@ExceptionHandler
(
Exception
.
class
)
//
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
@ResponseStatus
(
HttpStatus
.
INTERNAL_SERVER_ERROR
)
@ResponseBody
@ResponseBody
public
R
exception
(
Exception
e
)
{
public
R
exception
(
Exception
e
)
{
errorLog
(
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