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
25e49846
Commit
25e49846
authored
Jul 11, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.6.6-预入职相关_项目列表加权限
parent
749be96b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
7 deletions
+45
-7
TAttaInfoMapper.java
...u/cloud/plus/v1/yifu/archives/mapper/TAttaInfoMapper.java
+6
-0
TAttaInfoService.java
...cloud/plus/v1/yifu/archives/service/TAttaInfoService.java
+4
-0
TAttaInfoServiceImpl.java
...s/v1/yifu/archives/service/impl/TAttaInfoServiceImpl.java
+18
-0
TPreEmpMainServiceImpl.java
...v1/yifu/archives/service/impl/TPreEmpMainServiceImpl.java
+9
-7
TAttaInfoMapper.xml
...rchives-biz/src/main/resources/mapper/TAttaInfoMapper.xml
+8
-0
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TAttaInfoMapper.java
View file @
25e49846
...
...
@@ -45,4 +45,10 @@ public interface TAttaInfoMapper extends BaseMapper<TAttaInfo> {
List
<
TAttaInfo
>
getAttaByApplyId
(
@Param
(
"applyId"
)
String
applyId
);
void
deleteByDomainId
(
@Param
(
"domainId"
)
String
domainId
);
void
deleteByDomainIdAndType
(
@Param
(
"domainId"
)
String
domainId
,
@Param
(
"relationType"
)
String
relationType
);
// 删除学历与职业资格之外的附件
void
deleteByDomainIdAndOther
(
@Param
(
"domainId"
)
String
domainId
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TAttaInfoService.java
View file @
25e49846
...
...
@@ -79,4 +79,8 @@ public interface TAttaInfoService extends IService<TAttaInfo> {
**/
void
deleteByDomainId
(
String
domainId
);
void
deleteByDomainIdAndOther
(
String
domainId
);
void
deleteByDomainIdAndType
(
String
domainId
,
int
relationType
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TAttaInfoServiceImpl.java
View file @
25e49846
...
...
@@ -133,4 +133,22 @@ public class TAttaInfoServiceImpl extends ServiceImpl<TAttaInfoMapper, TAttaInfo
public
void
deleteByDomainId
(
String
domainId
)
{
baseMapper
.
deleteByDomainId
(
domainId
);
}
@Override
public
void
deleteByDomainIdAndOther
(
String
domainId
)
{
baseMapper
.
deleteByDomainIdAndOther
(
domainId
);
}
@Override
public
void
deleteByDomainIdAndType
(
String
domainId
,
int
relationType
)
{
// 学历
if
(
relationType
==
0
)
{
baseMapper
.
deleteByDomainIdAndType
(
domainId
,
"0"
);
baseMapper
.
deleteByDomainIdAndType
(
domainId
,
"26"
);
}
else
if
(
relationType
==
1
)
{
// 执业资格证书
baseMapper
.
deleteByDomainIdAndType
(
domainId
,
"2"
);
}
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TPreEmpMainServiceImpl.java
View file @
25e49846
...
...
@@ -785,6 +785,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
@Override
@Transactional
public
R
<
String
>
saveDraftPreEmpMain
(
PreEmpMainDetailVo
vo
)
{
return
saveBase
(
vo
,
CommonConstants
.
ZERO_STRING
);
}
...
...
@@ -797,6 +798,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
@Override
@Transactional
public
R
<
String
>
savePreEmpMain
(
PreEmpMainDetailVo
vo
)
{
return
saveBase
(
vo
,
CommonConstants
.
ONE_STRING
);
}
...
...
@@ -808,12 +810,11 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
* @Date: 2024/6/17 17:44
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Transactional
private
R
<
String
>
saveBase
(
PreEmpMainDetailVo
vo
,
String
status
)
{
YifuUser
user
=
getNewYifuUser
();
TPreEmpMain
main
=
vo
.
getMain
();
String
idCard
=
main
.
getEmpIdcard
();
if
(
main
!=
null
&&
Common
.
isNotNull
(
idCard
))
{
if
(
Common
.
isNotNull
(
idCard
))
{
TPreEmployeeProject
tPreEmployeeProject
=
vo
.
getTpreEmployeeProject
();
if
(
tPreEmployeeProject
!=
null
&&
Common
.
isNotNull
(
tPreEmployeeProject
.
getOldId
()))
{
// 预入职-人员档案表
...
...
@@ -871,7 +872,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if
(
tPreEmpEducation
.
getAttaList
()
!=
null
&&
!
tPreEmpEducation
.
getAttaList
().
isEmpty
())
{
List
<
TAttaInfo
>
attaList
=
tPreEmpEducation
.
getAttaList
();
if
(
attaList
!=
null
)
{
tAttaInfoService
.
deleteByDomainId
(
tPreEmpEducation
.
getId
()
);
tAttaInfoService
.
deleteByDomainId
AndType
(
tPreEmpEducation
.
getId
(),
0
);
for
(
TAttaInfo
atta
:
attaList
)
{
atta
.
setId
(
null
);
atta
.
setDomainId
(
tPreEmpEducation
.
getId
());
...
...
@@ -949,7 +950,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if
(
info
.
getAttaList
()
!=
null
&&
!
info
.
getAttaList
().
isEmpty
())
{
List
<
TAttaInfo
>
attaList
=
info
.
getAttaList
();
if
(
attaList
!=
null
)
{
tAttaInfoService
.
deleteByDomainId
(
info
.
getId
()
);
tAttaInfoService
.
deleteByDomainId
AndType
(
info
.
getId
(),
1
);
for
(
TAttaInfo
atta
:
attaList
)
{
atta
.
setId
(
null
);
atta
.
setDomainId
(
info
.
getId
());
...
...
@@ -1167,7 +1168,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
List
<
TAttaInfo
>
attaList
=
tPreEmpEducation
.
getAttaList
();
if
(
attaList
!=
null
)
{
String
attaId
=
tPreEmpEducation
.
getOldId
();
tAttaInfoService
.
deleteByDomainId
(
attaId
);
tAttaInfoService
.
deleteByDomainIdAndType
(
attaId
,
0
);
TAttaInfo
newEmpAtta
;
for
(
TAttaInfo
atta
:
attaList
)
{
newEmpAtta
=
new
TAttaInfo
();
...
...
@@ -1307,7 +1309,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
List
<
TAttaInfo
>
attaList
=
preInfo
.
getAttaList
();
if
(
attaList
!=
null
)
{
String
attaId
=
preInfo
.
getOldId
();
tAttaInfoService
.
deleteByDomainId
(
attaId
);
tAttaInfoService
.
deleteByDomainId
AndType
(
attaId
,
1
);
TAttaInfo
newEmpAtta
;
for
(
TAttaInfo
atta
:
attaList
)
{
newEmpAtta
=
new
TAttaInfo
();
...
...
@@ -1355,7 +1357,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
List
<
TAttaInfo
>
attaList
=
vo
.
getAttaInfoList
();
if
(
attaList
!=
null
)
{
// 先删除其他信息
tAttaInfoService
.
deleteByDomainId
(
empId
);
tAttaInfoService
.
deleteByDomainId
AndOther
(
empId
);
TAttaInfo
attaEmp
;
List
<
TAttaInfo
>
attaEmpList
=
new
ArrayList
<>();
for
(
TAttaInfo
atta
:
attaList
)
{
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TAttaInfoMapper.xml
View file @
25e49846
...
...
@@ -127,4 +127,12 @@
delete from t_atta_info where domain_id=#{domainId}
</delete>
<delete
id=
"deleteByDomainIdAndType"
>
delete from t_atta_info where domain_id=#{domainId} and relation_type = #{relationType}
</delete>
<delete
id=
"deleteByDomainIdAndOther"
>
delete from t_atta_info where domain_id=#{domainId} and relation_type not in ('0','2','26')
</delete>
</mapper>
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