Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
manager
Project
Overview
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
reyun
manager
Commits
065258b1
Commit
065258b1
authored
Sep 22, 2021
by
kangxiaoshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改晚录判断逻辑
parent
fcccdc70
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
ShareIncomeServiceImpl.java
...main/java/common/service/impl/ShareIncomeServiceImpl.java
+14
-10
No files found.
src/main/java/common/service/impl/ShareIncomeServiceImpl.java
View file @
065258b1
...
...
@@ -535,16 +535,16 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
//if(contract==null){
List
<
Contract
>
contractList
=
contractRepository
.
findByCreateTimeAndCodeNotOwn
(
groupContract
.
getRelationCode
(),
DateUtil
.
format
(
groupContract
.
getCreateTime
(),
DateUtil
.
C_TIME_PATTON_DEFAULT
),
groupContract
.
getId
());
for
(
Contract
contract1
:
contractList
)
{
if
(
StringUtils
.
isEmpty
(
map
.
get
(
contract1
.
getContractCode
())))
{
if
(
StringUtils
.
isEmpty
(
map
.
get
(
contract1
.
getContractCode
())))
{
map
.
put
(
contract1
.
getContractCode
(),
contract1
);
}
}
groupContracts
=
map
.
values
();
//只要不加入传进来的那个list里面就不会影响查询的列表
break
;
}
else
if
((
groupContracts
.
size
()==
1
&&!
StringUtils
.
isEmpty
(
groupContract
.
getNextSignedDate
()))||(!
"2"
.
equals
(
groupContract
.
getContractType
())
&&
map
.
get
(
groupContract
.
getNextSignedContractCode
())==
null
))
{
}
else
if
((
groupContracts
.
size
()
==
1
&&
!
StringUtils
.
isEmpty
(
groupContract
.
getNextSignedDate
()))
||
(!
"2"
.
equals
(
groupContract
.
getContractType
())
&&
map
.
get
(
groupContract
.
getNextSignedContractCode
())
==
null
))
{
List
<
Contract
>
contractList
=
contractRepository
.
findByRelationCode
(
groupContract
.
getContractCode
());
for
(
Contract
contract1
:
contractList
)
{
if
(
StringUtils
.
isEmpty
(
map
.
get
(
contract1
.
getContractCode
())))
{
if
(
StringUtils
.
isEmpty
(
map
.
get
(
contract1
.
getContractCode
())))
{
map
.
put
(
contract1
.
getContractCode
(),
contract1
);
}
}
...
...
@@ -1895,7 +1895,9 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
@Override
public
boolean
checkLateContract
(
DateTime
dateTime
,
DateTime
creatTime
)
{
int
aferDays
=
dateTime
.
monthOfYear
().
get
()
==
12
?
29
:
9
;
//int aferDays = dateTime.monthOfYear().get() == 12 ? 29 : 9;
//修改晚录判断逻辑
int
aferDays
=
dateTime
.
monthOfYear
().
get
()
==
12
?
29
:
1
;
return
dateTime
.
dayOfMonth
().
withMaximumValue
().
plusDays
(
aferDays
).
isBefore
(
creatTime
);
}
...
...
@@ -1962,12 +1964,14 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
public
static
void
main
(
String
[]
args
)
{
DateTime
dateTime
=
new
DateTime
(
"2020-10-30"
);
DateTime
creatTime
=
new
DateTime
(
"2020-11-9"
);
int
aferDays
=
dateTime
.
monthOfYear
().
get
()
==
12
?
29
:
9
;
System
.
out
.
println
(
dateTime
.
monthOfYear
().
get
());
System
.
out
.
println
(
dateTime
.
dayOfMonth
().
withMaximumValue
());
System
.
out
.
println
(
dateTime
.
dayOfMonth
().
withMaximumValue
().
plusDays
(
aferDays
));
System
.
out
.
println
(
dateTime
.
dayOfMonth
().
withMaximumValue
().
plusDays
(
aferDays
).
isBefore
(
creatTime
));
DateTime
creatTime
=
new
DateTime
(
"2020-11-02"
);
int
aferDays
=
dateTime
.
monthOfYear
().
get
()
==
12
?
29
:
1
;
System
.
out
.
println
(
"合同开始时间"
+
dateTime
);
System
.
out
.
println
(
"合同录入时间"
+
creatTime
);
System
.
out
.
println
(
"合同开始时间在第"
+
dateTime
.
monthOfYear
().
get
()
+
"月"
);
System
.
out
.
println
(
"合同录入当月的最后一天日期:"
+
dateTime
.
dayOfMonth
().
withMaximumValue
());
System
.
out
.
println
(
"合同录入当月的最后一天日期后第"
+
aferDays
+
"天"
+
dateTime
.
dayOfMonth
().
withMaximumValue
().
plusDays
(
aferDays
));
System
.
out
.
println
(
"是否是晚录:"
+
dateTime
.
dayOfMonth
().
withMaximumValue
().
plusDays
(
aferDays
).
isBefore
(
creatTime
));
dateTime
.
dayOfMonth
().
withMaximumValue
().
plusDays
(
aferDays
).
isBefore
(
creatTime
);
}
...
...
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