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
5 years ago
by
kangxiaoshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整金
parent
75ac6503
master
…
0727_bugfix
1315_bugfix
1439_bugfix
1608_bugfix
1608_from_1619
1619_bugfix
1990_bugfix
2578_bugfix
2580_fix
bigfix_20201028
bugfix_1608_new
bugfix_1760
bugfix_master_1760
change_double
liushaowei
master_mv
mobvista_master
month_flow
No related merge requests found
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;
...
@@ -11,6 +11,7 @@ import dic.RoleEnum;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONArray
;
import
org.joda.time.DateTime
;
import
org.joda.time.DateTime
;
import
org.joda.time.Days
;
import
org.joda.time.Days
;
import
org.joda.time.Months
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -82,8 +83,8 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
...
@@ -82,8 +83,8 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
}
}
}
}
/*
contracts = new ArrayList<>();
/*
contracts = new ArrayList<>();
contracts.add(contractRepository.findOne(
1360
L));*/
contracts.add(contractRepository.findOne(
4603
L));*/
List
<
ContractBody
>
bodies
=
contractBodyRepository
.
findAll
();
List
<
ContractBody
>
bodies
=
contractBodyRepository
.
findAll
();
Map
<
String
,
String
>
bodiesNameMap
=
bodies
.
stream
().
collect
(
Map
<
String
,
String
>
bodiesNameMap
=
bodies
.
stream
().
collect
(
...
@@ -113,6 +114,8 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
...
@@ -113,6 +114,8 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
selected
[
1
].
compareTo
(
contractPart
[
1
])
>=
0
?
contractPart
[
1
]
:
selected
[
1
]
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};*/
/*DateTime[][] mainTimes = new DateTime[][]{selected, contractPart, usePart};*/
contract
.
setIntervalUseDays
(
getDayRange
(
contractPart
[
0
],
usePart
[
1
])
+
1
);
contract
.
setIntervalUseDays
(
getDayRange
(
contractPart
[
0
],
usePart
[
1
])
+
1
);
...
@@ -152,7 +155,7 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
...
@@ -152,7 +155,7 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
private
void
afterContract
(
Contract
contract
,
int
contractAllDay
,
Long
dayShareIncome
,
private
void
afterContract
(
Contract
contract
,
int
contractAllDay
,
Long
dayShareIncome
,
DateTime
[]
contractPart
,
DateTime
[]
usePart
,
DateTime
[]
selected
,
DateTime
[]
creatPoints
)
{
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
;
int
daysIncom
=
getDayRange
(
usePart
[
0
],
usePart
[
1
])
+
1
;
//区间分摊总收入
//区间分摊总收入
...
...
This diff is collapsed.
Click to expand it.
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