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
6db3387d
Commit
6db3387d
authored
Jul 08, 2020
by
kangxiaoshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整金
parent
75ac6503
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
ShareIncomeServiceImpl.java
...main/java/common/service/impl/ShareIncomeServiceImpl.java
+6
-3
No files found.
src/main/java/common/service/impl/ShareIncomeServiceImpl.java
View file @
6db3387d
...
...
@@ -11,6 +11,7 @@ import dic.RoleEnum;
import
net.sf.json.JSONArray
;
import
org.joda.time.DateTime
;
import
org.joda.time.Days
;
import
org.joda.time.Months
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -82,8 +83,8 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
}
}
/*
contracts = new ArrayList<>();
contracts.add(contractRepository.findOne(
1360
L));*/
/*
contracts = new ArrayList<>();
contracts.add(contractRepository.findOne(
4603
L));*/
List
<
ContractBody
>
bodies
=
contractBodyRepository
.
findAll
();
Map
<
String
,
String
>
bodiesNameMap
=
bodies
.
stream
().
collect
(
...
...
@@ -113,6 +114,8 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
selected
[
1
].
compareTo
(
contractPart
[
1
])
>=
0
?
contractPart
[
1
]
:
selected
[
1
]
};
usePart
[
0
]
=
usePart
[
0
].
compareTo
(
usePart
[
1
])
>=
0
?
usePart
[
1
]
:
usePart
[
0
];
/*DateTime[][] mainTimes = new DateTime[][]{selected, contractPart, usePart};*/
contract
.
setIntervalUseDays
(
getDayRange
(
contractPart
[
0
],
usePart
[
1
])
+
1
);
...
...
@@ -152,7 +155,7 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
private
void
afterContract
(
Contract
contract
,
int
contractAllDay
,
Long
dayShareIncome
,
DateTime
[]
contractPart
,
DateTime
[]
usePart
,
DateTime
[]
selected
,
DateTime
[]
creatPoints
)
{
int
betweenMonth
=
creatPoints
[
0
].
getMonthOfYear
()
-
contractPart
[
0
].
getMonthOfYear
();
int
betweenMonth
=
Months
.
monthsBetween
(
contractPart
[
0
],
creatPoints
[
0
]).
getMonths
();
//时间范围内用于计算分摊金额的天数
int
daysIncom
=
getDayRange
(
usePart
[
0
],
usePart
[
1
])
+
1
;
//区间分摊总收入
...
...
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