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
71cc4d88
Commit
71cc4d88
authored
Jan 27, 2021
by
lzxry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tkio的作废合同调整金修复
parent
7b54c073
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
6 deletions
+24
-6
ShareIncomeServiceImpl.java
...main/java/common/service/impl/ShareIncomeServiceImpl.java
+24
-6
No files found.
src/main/java/common/service/impl/ShareIncomeServiceImpl.java
View file @
71cc4d88
...
...
@@ -1018,7 +1018,7 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
//晚录合同 累计收入= 同下
//正常合同 累计收入= 如果合同结束日期在选择日期之内,则直接取 [合同金额/1.06]得到总金额 ,否则 【合同开始日期-选择结束日期】
//作废合同处理
Contract
cancleContract
=
this
.
cancledShareFlow
(
contract
,
unitPriceAccurate
,
usePart
);
Contract
cancleContract
=
this
.
cancledShareFlow
(
contract
,
unitPriceAccurate
,
usePart
,
selected
);
if
(
cancleContract
!=
null
)
{
return
;
}
...
...
@@ -1239,7 +1239,7 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
return
contract
;
}
private
Contract
cancledShareFlow
(
Contract
contract
,
BigDecimal
unitPriceAccurate
,
DateTime
[]
usePart
)
{
private
Contract
cancledShareFlow
(
Contract
contract
,
BigDecimal
unitPriceAccurate
,
DateTime
[]
usePart
,
DateTime
[]
selected
)
{
if
(!
ContractStatusEnum
.
CANCEL
.
getKey
().
equals
(
contract
.
getStatus
()))
{
return
null
;
}
...
...
@@ -1270,7 +1270,21 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
long
share
=
unitPriceAccurate
.
multiply
(
clickTenThousand
).
setScale
(
0
,
BigDecimal
.
ROUND_HALF_UP
).
longValue
();
contract
.
setIntervaIncomeShare
(
share
);
//调整金
contract
.
setAdjustmentFund
(
share
*-
1L
);
if
(
checkTwoTime
(
selected
[
0
],
cancelDate
)
&&
checkTwoTime
(
cancelDate
,
selected
[
1
]))
{
clickNum
=
tkioFlowRepository
.
sumFlowByContractCodeAndDs
(
contract
.
getContractCode
(),
contract
.
getStartDate
(),
usedEnd
.
toString
(
"yyyy-MM-dd"
));
clickFlow
=
clickNum
==
null
?
0L
:
clickNum
.
longValue
();
//区间点击数
clickTenThousand
=
new
BigDecimal
(
0
);
if
(
clickFlow
!=
0
){
clickTenThousand
=
new
BigDecimal
(
clickFlow
/
10000.0
*
100
);
//区间点击数
contract
.
setAdjustmentFund
(
unitPriceAccurate
.
multiply
(
clickTenThousand
).
setScale
(
0
,
BigDecimal
.
ROUND_HALF_UP
).
longValue
()
*
-
1L
);
}
else
{
contract
.
setAdjustmentFund
(
0L
);
}
}
else
{
contract
.
setAdjustmentFund
(
0L
);
}
//分摊总收入
contract
.
setIncomeShareAll
(
0L
);
contract
.
setIncomeGross
(
0L
);
...
...
@@ -1319,7 +1333,7 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
//正常合同 累计收入= 如果合同结束日期在选择日期之内,则直接取 [合同金额/1.06]得到总金额 ,否则 【合同开始日期-选择结束日期】
//作废合同处理
Contract
cancleContract
=
this
.
cancledShareTKIO
(
contract
,
appkeyStr
,
unitPriceAccurate
,
usePart
);
Contract
cancleContract
=
this
.
cancledShareTKIO
(
contract
,
appkeyStr
,
unitPriceAccurate
,
usePart
,
selected
);
if
(
cancleContract
!=
null
)
{
return
;
}
...
...
@@ -1534,7 +1548,7 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
return
contract
;
}
private
Contract
cancledShareTKIO
(
Contract
contract
,
String
appkeys
,
BigDecimal
unitPriceAccurate
,
DateTime
[]
usePart
)
{
private
Contract
cancledShareTKIO
(
Contract
contract
,
String
appkeys
,
BigDecimal
unitPriceAccurate
,
DateTime
[]
usePart
,
DateTime
[]
selected
)
{
if
(!
ContractStatusEnum
.
CANCEL
.
getKey
().
equals
(
contract
.
getStatus
()))
{
return
null
;
}
...
...
@@ -1564,7 +1578,11 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
long
share
=
unitPriceAccurate
.
multiply
(
clickTenThousand
).
setScale
(
0
,
BigDecimal
.
ROUND_HALF_UP
).
longValue
();
contract
.
setIntervaIncomeShare
(
share
);
//调整金
contract
.
setAdjustmentFund
(
share
*-
1L
);
if
(
checkTwoTime
(
selected
[
0
],
cancelDate
)
&&
checkTwoTime
(
cancelDate
,
selected
[
1
]))
{
contract
.
setAdjustmentFund
(
share
*-
1L
);
}
else
{
contract
.
setAdjustmentFund
(
0L
);
}
//分摊总收入
contract
.
setIncomeShareAll
(
0L
);
contract
.
setIncomeGross
(
0L
);
...
...
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