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
5159ed88
Commit
5159ed88
authored
Jul 05, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huyc 项目档案代码提交
parent
0cf3d9e2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
2 deletions
+39
-2
TEmployeeProjectController.java
.../yifu/archives/controller/TEmployeeProjectController.java
+1
-1
TEmployeeProjectService.java
...lus/v1/yifu/archives/service/TEmployeeProjectService.java
+2
-0
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+36
-1
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeProjectController.java
View file @
5159ed88
...
@@ -133,7 +133,7 @@ public class TEmployeeProjectController {
...
@@ -133,7 +133,7 @@ public class TEmployeeProjectController {
@DeleteMapping
(
"/{id}"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('archives_temployeeproject_del')"
)
@PreAuthorize
(
"@pms.hasPermission('archives_temployeeproject_del')"
)
public
R
removeById
(
@PathVariable
String
id
)
{
public
R
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
tEmployeeProjectService
.
remove
ById
(
id
));
return
R
.
ok
(
tEmployeeProjectService
.
remove
ProjectInfo
(
id
));
}
}
/**
/**
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeProjectService.java
View file @
5159ed88
...
@@ -50,6 +50,8 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
...
@@ -50,6 +50,8 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
R
updateProject
(
TEmployeeProject
tEmployeeProject
);
R
updateProject
(
TEmployeeProject
tEmployeeProject
);
R
removeProjectInfo
(
String
id
);
/**
/**
* @param tEmployeeProject
* @param tEmployeeProject
* @Description: 减项
* @Description: 减项
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
5159ed88
...
@@ -190,6 +190,35 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -190,6 +190,35 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return
R
.
ok
(
flag
);
return
R
.
ok
(
flag
);
}
}
@Override
public
R
removeProjectInfo
(
String
id
)
{
TEmployeeProject
tEmployeeProject
=
this
.
getById
(
id
);
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
tEmployeeProject
.
getEmpIdcard
())
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
//删除项目档案
this
.
removeById
(
id
);
//从剩下的项目档案中查找员工类型
List
<
TEmployeeProject
>
list
=
this
.
list
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
tEmployeeProject
.
getEmpIdcard
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
if
(
Common
.
isNotNull
(
list
))
{
for
(
TEmployeeProject
t
:
list
)
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
t
.
getEmpNatrue
()))
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
ZERO_STRING
);
break
;
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
t
.
getEmpNatrue
())
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
tEmployeeInfo
.
getEmpNatrue
()))
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
ONE_STRING
);
break
;
}
}
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
}
return
R
.
ok
();
}
@Override
@Override
public
R
reEmpInfo
(
JSONObject
jsonObject
)
{
public
R
reEmpInfo
(
JSONObject
jsonObject
)
{
if
(
Common
.
isNotNull
(
jsonObject
))
{
if
(
Common
.
isNotNull
(
jsonObject
))
{
...
@@ -236,17 +265,23 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -236,17 +265,23 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if
(
count
==
CommonConstants
.
ONE_INT
)
{
if
(
count
==
CommonConstants
.
ONE_INT
)
{
TEmployeeInfo
tEmployeeInfoOld
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
TEmployeeInfo
tEmployeeInfoOld
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
TEmployeeProject
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
TEmployeeProject
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
String
code
=
""
;
if
(
Common
.
isNotNull
(
tEmployeeProject
))
{
if
(
Common
.
isNotNull
(
tEmployeeProject
))
{
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
if
(
tEmployeeProject
.
getIsLeaveEmployee
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
if
(
tEmployeeProject
.
getIsLeaveEmployee
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
code
=
CommonConstants
.
ONE_STRING
;
}
}
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
this
.
updateById
(
tEmployeeProject
);
this
.
updateById
(
tEmployeeProject
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfo
.
getId
(),
""
,
tEmployeeProjectOld
,
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfo
.
getId
(),
""
,
tEmployeeProjectOld
,
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
tEmployeeInfoOld
,
tEmployeeProject
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
tEmployeeInfoOld
,
tEmployeeProject
);
return
R
.
ok
();
if
(
CommonConstants
.
ONE_STRING
.
equals
(
code
))
{
return
R
.
ok
(
null
,
"减项减档成功"
);
}
else
{
return
R
.
ok
(
null
,
"减项成功,项目状态已更新为“已减项”"
);
}
}
}
}
}
return
R
.
failed
(
"人员在该项目下存在进行中/未完结的服务"
);
return
R
.
failed
(
"人员在该项目下存在进行中/未完结的服务"
);
...
...
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