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
4bc7d3d1
Commit
4bc7d3d1
authored
Jul 23, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合同待办处理
parent
9e9c8458
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
5 deletions
+29
-5
TEmpContractAlertServiceImpl.java
...u/archives/service/impl/TEmpContractAlertServiceImpl.java
+29
-5
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpContractAlertServiceImpl.java
View file @
4bc7d3d1
...
...
@@ -228,10 +228,12 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
.
eq
(
TEmployeeContractInfo:
:
getWorkFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TEmployeeContractInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
Map
<
String
,
TEmpContractAlert
>
alertMap
=
new
HashMap
<>();
Map
<
String
,
TEmpContractAlert
>
existMap
=
new
HashMap
<>();
initExistMap
(
existMap
);
if
(
Common
.
isNotNull
(
alertList
)){
Date
nowDate
=
DateUtil
.
dateIncreaseByDay
(
new
Date
(),
CommonConstants
.
ONE_INT
);
for
(
TEmployeeContractInfo
contract:
alertList
){
extracted
(
nowDate
,
contract
,
alertMap
);
extracted
(
nowDate
,
contract
,
alertMap
,
existMap
);
}
}
if
(
Common
.
isNotNull
(
notAccessList
)
&&
Common
.
isNotNull
(
alertMap
)){
...
...
@@ -251,16 +253,29 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
return
R
.
ok
();
}
private
void
initExistMap
(
Map
<
String
,
TEmpContractAlert
>
existMap
)
{
List
<
TEmpContractAlert
>
exists
=
baseMapper
.
selectList
(
Wrappers
.<
TEmpContractAlert
>
query
());
if
(
Common
.
isNotNull
(
exists
)){
for
(
TEmpContractAlert
alert:
exists
){
existMap
.
put
(
alert
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
alert
.
getProjectNo
()
+
CommonConstants
.
DOWN_LINE_STRING
+
alert
.
getContractId
(),
alert
);
}
}
}
private
void
extracted
(
Date
nowDate
,
TEmployeeContractInfo
contract
,
Map
<
String
,
TEmpContractAlert
>
aler
tMap
)
{
Map
<
String
,
TEmpContractAlert
>
alertMap
,
Map
<
String
,
TEmpContractAlert
>
exis
tMap
)
{
TEmployeeInfo
employeeInfo
=
employeeInfoMapper
.
selectById
(
contract
.
getEmpId
());
if
(
Common
.
isNotNull
(
employeeInfo
)
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
employeeInfo
.
getEmpNatrue
())
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
employeeInfo
.
getEmpNatrue
())){
return
;
}
TEmpContractAlert
alert
=
alertMap
.
get
(
contract
.
getEmpIdcard
());
TEmpContractAlert
alert
=
alertMap
.
get
(
contract
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
contract
.
getDeptNo
()
);
// 存在多个审核通过的数据 用最新的审核通过的合同覆盖已有的
if
(
Common
.
isNotNull
(
alert
)
&&
Common
.
isNotNull
(
alert
.
getContractEnd
())
...
...
@@ -268,7 +283,17 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
&&
alert
.
getAuditTime
().
after
(
contract
.
getContractEnd
())){
return
;
}
TEmpContractAlert
exist
=
existMap
.
get
(
alert
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
alert
.
getProjectNo
()
+
CommonConstants
.
DOWN_LINE_STRING
+
alert
.
getContractId
());
alert
=
new
TEmpContractAlert
();
if
(
Common
.
isNotNull
(
exist
)
&&
Common
.
isNotNull
(
exist
.
getFirstAlertTime
())){
alert
.
setFirstAlertTime
(
exist
.
getFirstAlertTime
());
}
else
{
alert
.
setFirstAlertTime
(
new
Date
());
}
alert
.
setContractId
(
contract
.
getId
());
alert
.
setAlertPerson
(
contract
.
getCreateName
());
alert
.
setEmpName
(
contract
.
getEmpName
());
...
...
@@ -300,9 +325,8 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
alert
.
setDaysDue
(
DateUtil
.
daysBetween
(
nowDate
,
alert
.
getContractEnd
()));
alert
.
setDueFlag
(
CommonConstants
.
ZERO_STRING
);
}
alert
.
setFirstAlertTime
(
DateUtil
.
dateIncreaseByMonth
(
alert
.
getContractEnd
(),
CommonConstants
.
THREE_INT_NEGATE
));
}
alert
.
setHandleStatus
(
CommonConstants
.
ZERO_STRING
);
alertMap
.
put
(
alert
.
getEmpIdcard
(),
alert
);
alertMap
.
put
(
alert
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
alert
.
getProjectNo
()
,
alert
);
}
}
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