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
fda84c42
Commit
fda84c42
authored
Jan 15, 2021
by
lzxry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
3fcab69d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
ContractServiceImpl.java
src/main/java/common/service/impl/ContractServiceImpl.java
+12
-12
ShareIncomeServiceImpl.java
...main/java/common/service/impl/ShareIncomeServiceImpl.java
+1
-1
No files found.
src/main/java/common/service/impl/ContractServiceImpl.java
View file @
fda84c42
...
...
@@ -2706,8 +2706,8 @@ public class ContractServiceImpl implements ContractService {
s_data
[
w
]
=
false
;
}
else
{
s_data
[
w
]
=
true
;
}
filter
.
put
(
"validStartDate"
,
formatter
.
formatCellValue
(
row_data
.
getCell
(
14
)).
trim
());
}
filter
.
put
(
"one_time"
,
dataSTR
);
}
else
{
//主账号不为空,按照之前逻辑不变
...
...
@@ -2766,13 +2766,18 @@ public class ContractServiceImpl implements ContractService {
String
start_date
=
filter
.
get
(
"start_date"
);
String
end_date
=
filter
.
get
(
"end_date"
);
String
rowIndex
=
filter
.
get
(
"rowIndex"
);
String
validStartDateStr
=
""
;
if
(
filter
.
get
(
"one_time"
).
equals
(
"否"
)){
validStartDateStr
=
start_date
;
}
else
{
validStartDateStr
=
filter
.
get
(
"validStartDate"
);
}
//if(filter.get("one_time").equals("否")){
String
validStartDateStr
=
filter
.
get
(
"validStartDate"
);
if
(!
StringUtils
.
isEmpty
(
validStartDateStr
)){
DateTime
dateTime
=
new
DateTime
(
validStartDateStr
);
DateTime
startDate
=
new
DateTime
(
start_date
);
DateTime
endDate
=
new
DateTime
(
end_date
);
int
contractAllDay
=
Days
.
daysBetween
(
startDate
,
endDate
).
getDays
();
//合同总天数
int
contractAllDay
=
Days
.
daysBetween
(
startDate
,
endDate
).
getDays
();
//合同总天数
-1 ,用于计算结束日期
filter
.
put
(
"valid_start_date"
,
dateTime
.
toString
(
"yyyy-MM-dd"
));
filter
.
put
(
"valid_end_date"
,
dateTime
.
plusDays
(
contractAllDay
).
toString
(
"yyyy-MM-dd"
));
}
else
{
...
...
@@ -2939,15 +2944,10 @@ public class ContractServiceImpl implements ContractService {
public
static
void
main
(
String
[]
args
)
{
// String dateStr1 = "2019-04-30";
// String dateStr2 = "2019-04-01";
//
// System.out.println(new DateTime(dateStr2).compareTo(new DateTime(dateStr1)));
// System.out.println(Days.daysBetween(new DateTime(dateStr2), new DateTime(dateStr1)).getDays());
System
.
out
.
println
(
10023L
*
1.0
/
100
);
System
.
out
.
println
((
129
*
100
/
111
)
*
1.0
/
100
);
System
.
out
.
println
();
DateTime
startDate
=
new
DateTime
(
"2020-01-01"
);
DateTime
endDate
=
new
DateTime
(
"2020-01-20"
);
int
contractAllDay
=
Days
.
daysBetween
(
startDate
,
endDate
).
getDays
();
//合同总天数
System
.
out
.
println
(
contractAllDay
+
" | "
+
startDate
.
plusDays
(
contractAllDay
).
toString
(
"yyyy-MM-dd"
));
}
}
src/main/java/common/service/impl/ShareIncomeServiceImpl.java
View file @
fda84c42
...
...
@@ -226,7 +226,7 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
}
else
{
oneTimeRecognizedRevenue
=
bigDecimal
.
multiply
(
new
BigDecimal
(
"0.9"
));
}
BigDecimal
dailyRevenueRecognition
=
bigDecimal
.
multiply
(
new
BigDecimal
(
"
0.1"
));
BigDecimal
dailyRevenueRecognition
=
bigDecimal
.
multiply
(
new
BigDecimal
(
"
10"
));
//0.1*100=10,前端拿到区间分摊收入/100得到最终的值
contract
.
setOneTimeRecognizedRevenue
(
oneTimeRecognizedRevenue
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
());
int
contractAllDay
=
getDayRange
(
contractPart
[
0
],
contractPart
[
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