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
d8b76c16
Commit
d8b76c16
authored
Jul 23, 2020
by
kangxiaoshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
作废合同调整金
parent
2a73b1e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
13 deletions
+8
-13
ShareIncomeServiceImpl.java
...main/java/common/service/impl/ShareIncomeServiceImpl.java
+8
-13
No files found.
src/main/java/common/service/impl/ShareIncomeServiceImpl.java
View file @
d8b76c16
...
@@ -100,7 +100,7 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
...
@@ -100,7 +100,7 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
this
.
shareIncome4Contract
(
contract
,
start
,
end
);
this
.
shareIncome4Contract
(
contract
,
start
,
end
);
contract
.
setMyBodyName
(
bodiesNameMap
.
get
(
contract
.
getMyBodyCode
()));
contract
.
setMyBodyName
(
bodiesNameMap
.
get
(
contract
.
getMyBodyCode
()));
}
}
logger
.
info
(
"计算分摊收入耗时
"
,
(
System
.
currentTimeMillis
()
-
start_
)
/
1000
);
logger
.
info
(
"计算分摊收入耗时
:{}"
,
(
System
.
currentTimeMillis
()
-
start_
)
);
return
contracts
;
return
contracts
;
}
}
...
@@ -263,10 +263,7 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
...
@@ -263,10 +263,7 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
if
(
checkTwoTime
(
suspendDate
,
cancelDate
))
{
if
(
checkTwoTime
(
suspendDate
,
cancelDate
))
{
adjustmentFund
=
0L
;
adjustmentFund
=
0L
;
}
else
{
}
else
{
/* adjustmentFund = new BigDecimal((getDayRange(cancelDate, suspendDate) + 1)
* contract.getIncomeExcludingTax() * 1.0 / contractAllDay)
.setScale(0, BigDecimal.ROUND_HALF_UP).longValue() * -1;*/
/*adjustmentFund = (getDayRange(cancelDate, suspendDate) + 1) * dayShareIncome * (-1);*/
adjustmentFund
=
shareMultiply
(
new
BigDecimal
((
getDayRange
(
cancelDate
,
suspendDate
)
+
1
)
*
-
1
),
dayShareIncome
,
0
);
adjustmentFund
=
shareMultiply
(
new
BigDecimal
((
getDayRange
(
cancelDate
,
suspendDate
)
+
1
)
*
-
1
),
dayShareIncome
,
0
);
}
}
...
@@ -275,7 +272,6 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
...
@@ -275,7 +272,6 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
daysIncom
=
daysIncom
<
0
?
0
:
daysIncom
;
daysIncom
=
daysIncom
<
0
?
0
:
daysIncom
;
//区间分摊总收入
//区间分摊总收入
/*contract.setIntervaIncomeShare(dayShareIncome * daysIncom);*/
contract
.
setIntervaIncomeShare
(
shareMultiply
(
dayShareIncome
,
new
BigDecimal
(
daysIncom
),
0
));
contract
.
setIntervaIncomeShare
(
shareMultiply
(
dayShareIncome
,
new
BigDecimal
(
daysIncom
),
0
));
if
(
checkTwoTime
(
selected
[
0
],
cancelDate
)
&&
checkTwoTime
(
cancelDate
,
selected
[
1
]))
{
if
(
checkTwoTime
(
selected
[
0
],
cancelDate
)
&&
checkTwoTime
(
cancelDate
,
selected
[
1
]))
{
...
@@ -309,22 +305,24 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
...
@@ -309,22 +305,24 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
DateTime
cancelDate
=
new
DateTime
(
contractChange
.
getDs
());
DateTime
cancelDate
=
new
DateTime
(
contractChange
.
getDs
());
/*Long adjustmentFund = (getDayRange(contractPart[0], cancelDate) + 1) * dayShareIncome * (-1);*/
/*Long adjustmentFund = (getDayRange(contractPart[0], cancelDate) + 1) * dayShareIncome * (-1);*/
Long
adjustmentFund
=
shareMultiply
(
new
BigDecimal
((
getDayRange
(
contractPart
[
0
],
cancelDate
)
+
1
)),
dayShareIncome
,
0
);
Long
adjustmentFund
=
shareMultiply
(
new
BigDecimal
((
getDayRange
(
contractPart
[
0
],
cancelDate
)
+
1
)
*
-
1
),
dayShareIncome
,
0
);
DateTime
usedEnd
=
usePart
[
1
].
compareTo
(
cancelDate
)
<=
0
?
usePart
[
1
]
:
cancelDate
;
DateTime
usedEnd
=
usePart
[
1
].
compareTo
(
cancelDate
)
<=
0
?
usePart
[
1
]
:
cancelDate
;
int
daysIncom
=
Days
.
daysBetween
(
usePart
[
0
],
usedEnd
).
getDays
()
+
1
;
int
daysIncom
=
Days
.
daysBetween
(
usePart
[
0
],
usedEnd
).
getDays
()
+
1
;
daysIncom
=
daysIncom
<
0
?
0
:
daysIncom
;
daysIncom
=
daysIncom
<
0
?
0
:
daysIncom
;
contract
.
setIntervalUseDays
(
getDayRange
(
contractPart
[
0
],
usedEnd
)
+
1
);
//区间分摊总收入
//区间分摊总收入
/*contract.setIntervaIncomeShare(dayShareIncome * daysIncom);*/
/*contract.setIntervaIncomeShare(dayShareIncome * daysIncom);*/
contract
.
setIntervaIncomeShare
(
shareMultiply
(
dayShareIncome
,
new
BigDecimal
(
daysIncom
),
0
));
contract
.
setIntervaIncomeShare
(
shareMultiply
(
dayShareIncome
,
new
BigDecimal
(
daysIncom
),
0
));
boolean
fullRange
=
getDayRange
(
selected
[
0
],
selected
[
1
])
/*
boolean fullRange = getDayRange(selected[0], selected[1])
>= Days.daysBetween(contractPart[0], cancelDate).getDays() ? true : false;
>= Days.daysBetween(contractPart[0], cancelDate).getDays() ? true : false;
if (fullRange) {
if (fullRange) {
contract.setAdjustmentFund(-1 * contract.getIntervaIncomeShare());
contract.setAdjustmentFund(-1 * contract.getIntervaIncomeShare());
}
else
if
(
checkTwoTime
(
selected
[
0
],
cancelDate
)
&&
checkTwoTime
(
cancelDate
,
selected
[
1
]))
{
} else */
if
(
checkTwoTime
(
selected
[
0
],
cancelDate
)
&&
checkTwoTime
(
cancelDate
,
selected
[
1
]))
{
contract
.
setAdjustmentFund
(
adjustmentFund
);
contract
.
setAdjustmentFund
(
adjustmentFund
);
}
else
{
}
else
{
contract
.
setAdjustmentFund
(
0L
);
contract
.
setAdjustmentFund
(
0L
);
...
@@ -338,7 +336,6 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
...
@@ -338,7 +336,6 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
return
one
.
multiply
(
two
).
setScale
(
scale
,
BigDecimal
.
ROUND_HALF_UP
).
longValue
();
return
one
.
multiply
(
two
).
setScale
(
scale
,
BigDecimal
.
ROUND_HALF_UP
).
longValue
();
}
}
@Override
@Override
public
boolean
checkLateContract
(
DateTime
dateTime
,
DateTime
creatTime
)
{
public
boolean
checkLateContract
(
DateTime
dateTime
,
DateTime
creatTime
)
{
int
aferDays
=
dateTime
.
monthOfYear
().
get
()
==
12
?
29
:
9
;
int
aferDays
=
dateTime
.
monthOfYear
().
get
()
==
12
?
29
:
9
;
...
@@ -354,8 +351,6 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
...
@@ -354,8 +351,6 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
return
dateTime1
.
isBefore
(
dateTime2
)
||
dateTime1
.
isEqual
(
dateTime2
);
return
dateTime1
.
isBefore
(
dateTime2
)
||
dateTime1
.
isEqual
(
dateTime2
);
}
}
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
/* Long aa = new BigDecimal(1000 * 100 / 1.06).setScale(2, BigDecimal.ROUND_HALF_UP).longValue();
/* Long aa = new BigDecimal(1000 * 100 / 1.06).setScale(2, BigDecimal.ROUND_HALF_UP).longValue();
...
...
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