Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
platform
/
finance_serv
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 730a443f
authored
Jan 16, 2019
by
王军业
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
【统计值小数位】
1 parent
6b8d9ca7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
13 deletions
code/finance_serv/src/main/java/com/vion/financial/service/imp/ContractServiceImpl.java
code/finance_serv/src/main/java/com/vion/financial/service/imp/ContractServiceImpl.java
View file @
730a443
package
com
.
vion
.
financial
.
service
.
imp
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
...
...
@@ -384,7 +385,7 @@ public class ContractServiceImpl implements ContractService {
String
result
=
HttpNetClient
.
doGet
(
url
,
null
);
Map
map
=
JavaBean2Json
.
Json2JavaBean
(
result
,
Map
.
class
);
list_data
=
(
List
<
Map
>)
map
.
get
(
"list_data"
);
if
(
StringUtils
.
isNotBlank
(
selectVo
.
getSalesperson_name__like
()))
{
List
<
String
>
salesperson_unids
=
new
ArrayList
<
String
>();
if
(
list_data
!=
null
&&
list_data
.
size
()
>
0
)
{
...
...
@@ -461,20 +462,27 @@ public class ContractServiceImpl implements ContractService {
}
}
List
<
ContractVo
>
listAll
=
contractMapper
.
selectByConditionAll
(
selectVo
);
Double
contract_amount
=
0.0
;
//合同金额
Double
total_reback_amount
=
0.0
;
//
Double
contract_remain
=
0.0
;
Double
total_amount_remain
=
0.0
;
BigDecimal
contract_amount
=
new
BigDecimal
(
0.00
);
contract_amount
.
setScale
(
4
);
//合同金额
BigDecimal
total_reback_amount
=
new
BigDecimal
(
0.00
);
//
total_reback_amount
.
setScale
(
4
);
BigDecimal
contract_remain
=
new
BigDecimal
(
0.00
);;
contract_remain
.
setScale
(
4
);
BigDecimal
total_amount_remain
=
new
BigDecimal
(
0.00
);;
total_amount_remain
.
setScale
(
4
);
for
(
ContractVo
contractVo
:
listAll
){
contract_amount
+=
contractVo
.
getContract_amount
();
total_reback_amount
+=
contractVo
.
getTotal_reback_amount
();
contract_remain
+=
contractVo
.
getContract_remain
();
total_amount_remain
+=
contractVo
.
getTotal_amount_remain
();
contract_amount
=
contract_amount
.
add
(
new
BigDecimal
(
contractVo
.
getContract_amount
()).
setScale
(
4
));
//+= contractVo.getContract_amount();
total_reback_amount
=
total_reback_amount
.
add
(
new
BigDecimal
(
contractVo
.
getTotal_reback_amount
()).
setScale
(
4
));
contract_remain
=
contract_remain
.
add
(
new
BigDecimal
(
contractVo
.
getContract_remain
()).
setScale
(
4
));
total_amount_remain
=
total_amount_remain
.
add
(
new
BigDecimal
(
contractVo
.
getTotal_amount_remain
()).
setScale
(
4
));
//total_reback_amount += contractVo.getTotal_reback_amount();
//contract_remain += contractVo.getContract_remain();
//total_amount_remain += contractVo.getTotal_amount_remain();
}
resultVo
.
setAllContractAmount
(
contract_amount
);
resultVo
.
setAlltotalReBack
(
total_reback_amount
);
resultVo
.
setAllRemainAmount
(
contract_remain
);
resultVo
.
setAllReceiveAmount
(
total_amount_remain
);
resultVo
.
setAllContractAmount
(
contract_amount
.
doubleValue
()
);
resultVo
.
setAlltotalReBack
(
total_reback_amount
.
doubleValue
()
);
resultVo
.
setAllRemainAmount
(
contract_remain
.
doubleValue
()
);
resultVo
.
setAllReceiveAmount
(
total_amount_remain
.
doubleValue
()
);
resultVo
.
setList_data
(
list
);
resultVo
.
setList_size
(
list
.
size
());
resultVo
.
setOffset
(
selectVo
.
getOffset
());
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment