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
3900117d
Commit
3900117d
authored
Oct 16, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.0 更新附件
parent
1605e233
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
53 deletions
+86
-53
PreUploadEmpImportVo.java
.../cloud/plus/v1/yifu/archives/vo/PreUploadEmpImportVo.java
+3
-1
TPreEmpMainServiceImpl.java
...v1/yifu/archives/service/impl/TPreEmpMainServiceImpl.java
+82
-51
TPreEmpMainMapper.xml
...hives-biz/src/main/resources/mapper/TPreEmpMainMapper.xml
+1
-1
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/PreUploadEmpImportVo.java
View file @
3900117d
...
...
@@ -146,7 +146,7 @@ public class PreUploadEmpImportVo implements Serializable {
// private List<TPreEmpFamily> tpreEmpFamilyList
@ExcelAttribute
(
name
=
"成员姓名"
,
maxLength
=
32
)
private
String
familyName
;
@ExcelAttribute
(
name
=
"与本人关系"
,
isMark
=
true
,
maxLength
=
32
)
@ExcelAttribute
(
name
=
"与本人关系"
,
isMark
=
true
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
FAMILY_RELATION
,
maxLength
=
32
)
private
String
relationshipSelf
;
@ExcelAttribute
(
name
=
"手机号码(家庭成员)"
,
isMark
=
true
,
isPhone
=
true
,
maxLength
=
32
)
private
String
contractTel
;
...
...
@@ -258,6 +258,8 @@ public class PreUploadEmpImportVo implements Serializable {
// 预入职-员工工作履历信息表
@ExcelAttribute
(
name
=
"是否为首份工作"
)
private
String
firstWorkFlagValue
;
@ExcelAttribute
(
name
=
"与本人关系"
)
private
String
relationshipSelfValue
;
// 预入职-员工职业资格信息表
@ExcelAttribute
(
name
=
"是否有职业资格证书"
)
private
String
haveQualificationValue
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TPreEmpMainServiceImpl.java
View file @
3900117d
...
...
@@ -34,7 +34,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.monitorjbl.xlsx.StreamingReader
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckBankNo
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckIdCard
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckMobile
;
import
com.yifu.cloud.plus.v1.check.vo.CheckBatchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TPreEmpMainMapper
;
...
...
@@ -2666,9 +2665,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 校验是否通过
StringBuilder
errorCheck
;
// 已存在的主档案Map
Map
<
String
,
PreUploadEmpImportVo
>
empMap
=
new
HashMap
<>();
Map
<
String
,
String
>
empMap
=
new
HashMap
<>();
// 已存在的主档案
PreUploadEmpImportVo
curVo
;
String
curVo
;
// 人员map
Map
<
String
,
TEmployeeProject
>
proMap
=
tEmployeeProjectService
.
getMapByDeptIdAndDelete
(
paramVo
.
getDeptId
());
TEmployeeProject
project
;
...
...
@@ -2679,7 +2678,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
Map
<
String
,
String
>
dictMap
=
new
HashMap
<>();
// 存放父级area的值
Map
<
String
,
String
>
parentAreaMap
=
new
HashMap
<>();
Map
<
String
,
Date
>
startDateMap
=
new
HashMap
<>()
;
Map
<
String
,
Date
>
startDateMap
;
for
(
Map
<
String
,
String
>
rowMap
:
vo
.
getContentList
())
{
curVo
=
null
;
errorMust
=
new
StringBuilder
();
...
...
@@ -2839,13 +2838,10 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
detail
.
setErrorInfo
(
errorInfo
.
toString
());
if
(
curVo
!=
null
)
{
//List<PreUploadEmpImportVo> otherList = curVo.getOtherList();
//otherList.add(detail);
//empMap.put(detail.getEmpIdcard(), curVo);
detail
.
setIsMain
(
false
);
}
else
{
detail
.
setIsMain
(
true
);
empMap
.
put
(
detail
.
getEmpIdcard
(),
detail
);
empMap
.
put
(
detail
.
getEmpIdcard
(),
CommonConstants
.
ZERO_STRING
);
}
}
}
...
...
@@ -3042,6 +3038,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
List
<
TPreEmpEducation
>
preEmpEducationList
=
new
ArrayList
<>();
List
<
TPreEmpFamily
>
preEmpFamilyList
=
new
ArrayList
<>();
List
<
TPreEmpWorkRecording
>
preEmpWorkRecordingList
=
new
ArrayList
<>();
List
<
TPreEmpProfessionalQualification
>
preEmpProfessionalQualificationList
=
new
ArrayList
<>();
TPreEmpBadRecord
tPreEmpBadRecord
;
TPreEmpContactInfo
tPreEmpContactInfo
;
...
...
@@ -3049,6 +3046,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TPreEmpEducation
tPreEmpEducation
;
TPreEmpFamily
tPreEmpFamily
;
TPreEmpWorkRecording
tPreEmpWorkRecording
;
TPreEmpProfessionalQualification
tPreEmpProfessionalQualification
;
String
mainId
;
String
empIdCard
;
// 组装附属信息
...
...
@@ -3056,16 +3054,15 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
main
=
saveMainMap
.
get
(
info
.
getEmpIdcard
());
empId
=
null
;
if
(
main
!=
null
)
{
employee
=
null
;
employee
=
oldEmpMap
.
get
(
info
.
getEmpIdcard
())
;
mainId
=
main
.
getId
();
empIdCard
=
main
.
getEmpIdcard
();
// 1、2、预入职档案表、项目档案表
if
(
Common
.
isNotNull
(
info
.
getIsMain
())
&&
Boolean
.
TRUE
.
equals
(
info
.
getIsMain
()))
{
tPreEmployeeInfo
=
new
TPreEmployeeInfo
();
tPreEmployeeProject
=
new
TPreEmployeeProject
();
employee
=
oldEmpMap
.
get
(
info
.
getEmpIdcard
());
project
=
proMap
.
get
(
info
.
getEmpIdcard
());
project
=
proMap
.
get
(
info
.
getEmpIdcard
());
tPreEmployeeInfo
.
setEmpName
(
main
.
getEmpName
());
tPreEmployeeInfo
.
setEmpIdcard
(
main
.
getEmpIdcard
());
if
(
employee
!=
null
)
{
...
...
@@ -3076,18 +3073,6 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
BeanUtil
.
copyProperties
(
project
,
tPreEmployeeProject
,
ID
);
tPreEmployeeProject
.
setOldId
(
project
.
getId
());
}
}
else
{
tPreEmployeeProject
.
setEmpName
(
main
.
getEmpName
());
tPreEmployeeProject
.
setEmpIdcard
(
main
.
getEmpIdcard
());
tPreEmployeeProject
.
setUnitId
(
dept
.
getCustomerId
());
tPreEmployeeProject
.
setUnitName
(
dept
.
getCustomerName
());
tPreEmployeeProject
.
setUnitNo
(
dept
.
getCustomerNo
());
tPreEmployeeProject
.
setBusinessPrimaryType
(
dept
.
getBusinessPrimaryType
());
tPreEmployeeProject
.
setBusinessSecondType
(
dept
.
getBusinessSecondType
());
tPreEmployeeProject
.
setBusinessThirdType
(
dept
.
getBusinessThirdType
());
tPreEmployeeProject
.
setDeptId
(
main
.
getDeptId
());
tPreEmployeeProject
.
setDeptName
(
main
.
getDeptName
());
tPreEmployeeProject
.
setDeptNo
(
main
.
getDeptNo
());
}
tPreEmployeeInfo
.
setPreMainId
(
mainId
);
...
...
@@ -3158,6 +3143,17 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmployeeProject
.
setCreateName
(
user
.
getNickname
());
tPreEmployeeProject
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmployeeProject
.
setProjectSource
(
CommonConstants
.
EIGHT_STRING
);
tPreEmployeeProject
.
setEmpName
(
main
.
getEmpName
());
tPreEmployeeProject
.
setEmpIdcard
(
main
.
getEmpIdcard
());
tPreEmployeeProject
.
setUnitId
(
dept
.
getCustomerId
());
tPreEmployeeProject
.
setUnitName
(
dept
.
getCustomerName
());
tPreEmployeeProject
.
setUnitNo
(
dept
.
getCustomerNo
());
tPreEmployeeProject
.
setBusinessPrimaryType
(
dept
.
getBusinessPrimaryType
());
tPreEmployeeProject
.
setBusinessSecondType
(
dept
.
getBusinessSecondType
());
tPreEmployeeProject
.
setBusinessThirdType
(
dept
.
getBusinessThirdType
());
tPreEmployeeProject
.
setDeptId
(
main
.
getDeptId
());
tPreEmployeeProject
.
setDeptName
(
main
.
getDeptName
());
tPreEmployeeProject
.
setDeptNo
(
main
.
getDeptNo
());
preEmployeeProjectList
.
add
(
tPreEmployeeProject
);
// 其他附属信息
...
...
@@ -3186,6 +3182,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmpContactInfo
.
setCreateTime
(
LocalDateTime
.
now
());
// 紧急联系人姓名 与本人关系 联系地址-省 联系地址-市 联系地址-区/县 联系地址-详细地址 手机号码(紧急联系人)
tPreEmpContactInfo
.
setEmpName
(
info
.
getContactEmpName
());
tPreEmpContactInfo
.
setEmpIdcard
(
empIdCard
);
tPreEmpContactInfo
.
setRelationType
(
info
.
getRelationType
());
tPreEmpContactInfo
.
setRelationProvince
(
info
.
getRelationProvinceValue
());
tPreEmpContactInfo
.
setRelationCity
(
info
.
getRelationCityValue
());
...
...
@@ -3257,15 +3254,15 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmpFamily
.
setCreateName
(
user
.
getNickname
());
tPreEmpFamily
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmpFamily
.
setFamilyName
(
info
.
getFamilyName
());
tPreEmpFamily
.
setRelationshipSelf
(
info
.
getRelationshipSelf
());
tPreEmpFamily
.
setRelationshipSelf
(
info
.
getRelationshipSelf
Value
());
tPreEmpFamily
.
setContractTel
(
info
.
getContractTel
());
preEmpFamilyList
.
add
(
tPreEmpFamily
);
}
// 主要工作经历
if
(
Common
.
isNotNull
(
info
.
getFirstWorkFlag
())
&&
CommonConstants
.
IS_FALSE
.
equals
(
main
.
getFirstWorkFlag
())
&&
CommonConstants
.
IS_FALSE
.
equals
(
info
.
getFirstWorkFlag
()))
{
&&
CommonConstants
.
ONE_STRING
.
equals
(
main
.
getFirstWorkFlag
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
info
.
getFirstWorkFlag
()))
{
tPreEmpWorkRecording
=
new
TPreEmpWorkRecording
();
tPreEmpWorkRecording
.
setSettleDomain
(
deptId
);
tPreEmpWorkRecording
.
setEmpId
(
empId
);
...
...
@@ -3287,25 +3284,24 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 职业资格信息——职业资格证书
if
(
Common
.
isNotNull
(
info
.
getHaveQualification
())
&&
CommonConstants
.
IS_TRUE
.
equals
(
main
.
getHaveQualification
())
&&
CommonConstants
.
IS_TRUE
.
equals
(
info
.
getHaveQualification
()))
{
tPreEmpWorkRecording
=
new
TPreEmpWorkRecording
();
tPreEmpWorkRecording
.
setSettleDomain
(
deptId
);
tPreEmpWorkRecording
.
setEmpId
(
empId
);
&&
CommonConstants
.
ZERO_STRING
.
equals
(
main
.
getHaveQualification
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
info
.
getHaveQualification
()))
{
tPreEmpProfessionalQualification
=
new
TPreEmpProfessionalQualification
();
tPreEmpProfessionalQualification
.
setPreMainId
(
mainId
);
tPreEmpProfessionalQualification
.
setSettleDomain
(
deptId
);
tPreEmpProfessionalQualification
.
setEmpId
(
empId
);
if
(
employee
!=
null
)
{
tPreEmp
WorkRecording
.
setEmpName
(
employee
.
getEmpName
());
tPreEmp
WorkRecording
.
setEmpCode
(
employee
.
getEmpCode
());
tPreEmp
ProfessionalQualification
.
setEmpName
(
employee
.
getEmpName
());
tPreEmp
ProfessionalQualification
.
setEmpCode
(
employee
.
getEmpCode
());
}
tPreEmpWorkRecording
.
setEmpIdcard
(
empIdCard
);
tPreEmpWorkRecording
.
setPreMainId
(
mainId
);
tPreEmpWorkRecording
.
setCreateBy
(
user
.
getId
());
tPreEmpWorkRecording
.
setCreateName
(
user
.
getNickname
());
tPreEmpWorkRecording
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmpWorkRecording
.
setWorkUnit
(
info
.
getWorkUnit
());
tPreEmpWorkRecording
.
setWorkJob
(
info
.
getWorkJob
());
tPreEmpWorkRecording
.
setStartDate
(
info
.
getStartDateValue
());
tPreEmpWorkRecording
.
setEndDate
(
info
.
getEndDateValue
());
preEmpWorkRecordingList
.
add
(
tPreEmpWorkRecording
);
tPreEmpProfessionalQualification
.
setEmpIdcard
(
empIdCard
);
tPreEmpProfessionalQualification
.
setCreateBy
(
user
.
getId
());
tPreEmpProfessionalQualification
.
setCreateName
(
user
.
getNickname
());
tPreEmpProfessionalQualification
.
setCreateTime
(
LocalDateTime
.
now
());
// 是否有职业资格证书 申报年度 职业资格名称
tPreEmpProfessionalQualification
.
setDeclareYear
(
info
.
getDeclareYearValue
());
tPreEmpProfessionalQualification
.
setQualificationType
(
info
.
getQualificationTypeValue
());
preEmpProfessionalQualificationList
.
add
(
tPreEmpProfessionalQualification
);
}
}
}
...
...
@@ -3334,6 +3330,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if
(!
preEmpWorkRecordingList
.
isEmpty
())
{
tPreEmpWorkRecordingService
.
saveBatch
(
preEmpWorkRecordingList
);
}
if
(!
preEmpProfessionalQualificationList
.
isEmpty
())
{
tPreEmpProfessionalService
.
saveBatch
(
preEmpProfessionalQualificationList
);
}
}
if
(!
errorList
.
isEmpty
())
{
return
new
R
<>(
CommonConstants
.
TWO_INT
,
"失败数据:"
,
excelList
);
...
...
@@ -3397,6 +3396,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
errorFormat
.
append
(
attr
.
name
()).
append
(
";"
);
}
else
{
startDateMap
.
put
(
shuName
,
dateValue
);
tempStr
=
c
.
trim
();
}
}
//手机号码校验
...
...
@@ -3407,6 +3407,35 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if
(
attr
.
maxLength
()
>
0
&&
c
.
length
()
>
attr
.
maxLength
())
{
errorFormat
.
append
(
attr
.
name
()).
append
(
"_超出最大长度;"
);
}
// 字典
if
(
attr
.
isDataId
()
&&
null
!=
dictMap
)
{
tempStr
=
null
;
if
(
Common
.
isNotNull
(
attr
.
readConverterExp
()))
{
String
[]
convertSource
=
attr
.
readConverterExp
().
split
(
","
);
String
[]
itemArray
;
for
(
String
item
:
convertSource
)
{
itemArray
=
item
.
split
(
"="
);
if
(
itemArray
.
length
>
1
&&
itemArray
[
1
].
equals
(
c
))
{
tempStr
=
itemArray
[
0
];
break
;
}
}
}
else
{
tempStr
=
getLableIdByValue
(
attr
,
dictMap
,
c
);
}
if
(
Common
.
isEmpty
(
tempStr
))
{
errorFormat
.
append
(
attr
.
name
()).
append
(
"_未找到字典值;"
);
}
}
// 时间大小比较
if
(
Common
.
isNotNull
(
attr
.
pattern
()))
{
if
(!(
"validityEnd"
.
equals
(
shuName
)
&&
"长期"
.
equals
(
c
))
&&
dateValue
!=
null
)
{
Date
startDate
=
startDateMap
.
get
(
attr
.
pattern
());
if
(
startDate
!=
null
&&
!
dateValue
.
after
(
startDate
))
{
errorFormat
.
append
(
attr
.
name
()).
append
(
"_小于起始日期;"
);
}
}
}
}
}
else
{
//日期格式校验
...
...
@@ -3421,6 +3450,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
errorFormat
.
append
(
attr
.
name
()).
append
(
";"
);
}
else
{
startDateMap
.
put
(
shuName
,
dateValue
);
tempStr
=
c
.
trim
();
}
}
}
...
...
@@ -3469,8 +3499,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
// 字典
tempStr
=
null
;
if
(
attr
.
isDataId
()
&&
null
!=
dictMap
)
{
tempStr
=
null
;
if
(
Common
.
isNotNull
(
attr
.
readConverterExp
()))
{
String
[]
convertSource
=
attr
.
readConverterExp
().
split
(
","
);
String
[]
itemArray
;
...
...
@@ -3488,7 +3518,6 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
errorFormat
.
append
(
attr
.
name
()).
append
(
"_未找到字典值;"
);
}
}
}
// 时间大小比较
if
(
Common
.
isNotNull
(
attr
.
pattern
()))
{
if
(!(
"validityEnd"
.
equals
(
shuName
)
&&
"长期"
.
equals
(
c
))
&&
dateValue
!=
null
)
{
...
...
@@ -3499,6 +3528,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
}
}
}
return
tempStr
;
}
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TPreEmpMainMapper.xml
View file @
3900117d
...
...
@@ -566,7 +566,7 @@
</foreach>
</delete>
<delete
id=
"deleteContactByMainIdList"
>
delete from t_pre_emp_contact_info where PRE_MAIN_ID
=
in
delete from t_pre_emp_contact_info where PRE_MAIN_ID in
<foreach
collection=
"preMainIdList"
item=
"ids"
open=
"("
separator=
","
close=
")"
>
#{ids}
</foreach>
...
...
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