Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
Overview
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
platform
hg-smart
Commits
268e666b
Commit
268e666b
authored
Sep 25, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-09-25
1.修改金额小数2位数
parent
1a6727a2
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
19 additions
and
19 deletions
+19
-19
ServiceHGCW002.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW002.java
+1
-1
ServiceHGCW003.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW003.java
+1
-1
ServiceHGCW010.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW010.java
+1
-1
ServiceHGCW010D.java
...java/com/baosight/hggp/hg/cw/service/ServiceHGCW010D.java
+1
-1
ServiceHGCW010E.java
...java/com/baosight/hggp/hg/cw/service/ServiceHGCW010E.java
+1
-1
ServiceHGCW012.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW012.java
+2
-2
ServiceHGCW014.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW014.java
+1
-1
ServiceHGCW016.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW016.java
+1
-1
HGCWTools.java
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
+10
-10
No files found.
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW002.java
View file @
268e666b
...
@@ -147,7 +147,7 @@ public class ServiceHGCW002 extends ServiceBase {
...
@@ -147,7 +147,7 @@ public class ServiceHGCW002 extends ServiceBase {
totalContractPriceIncluding
=
totalContractPriceIncluding
.
add
(
hgcw003
.
getTotalPriceIncluding
());
totalContractPriceIncluding
=
totalContractPriceIncluding
.
add
(
hgcw003
.
getTotalPriceIncluding
());
}
}
valueAddedTax
=
totalContractPriceIncluding
.
subtract
(
totalContractPriceExcluding
);
valueAddedTax
=
totalContractPriceIncluding
.
subtract
(
totalContractPriceExcluding
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00
0
"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00"
);
HGCW002
.
setTotalContractPriceExcluding
(
new
BigDecimal
(
decimalFormat
.
format
(
totalContractPriceExcluding
)));
HGCW002
.
setTotalContractPriceExcluding
(
new
BigDecimal
(
decimalFormat
.
format
(
totalContractPriceExcluding
)));
HGCW002
.
setTotalContractPriceIncluding
(
new
BigDecimal
(
decimalFormat
.
format
(
totalContractPriceIncluding
)));
HGCW002
.
setTotalContractPriceIncluding
(
new
BigDecimal
(
decimalFormat
.
format
(
totalContractPriceIncluding
)));
HGCW002
.
setValueAddedTax
(
new
BigDecimal
(
decimalFormat
.
format
(
valueAddedTax
)));
HGCW002
.
setValueAddedTax
(
new
BigDecimal
(
decimalFormat
.
format
(
valueAddedTax
)));
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW003.java
View file @
268e666b
...
@@ -178,7 +178,7 @@ public class ServiceHGCW003 extends ServiceBase {
...
@@ -178,7 +178,7 @@ public class ServiceHGCW003 extends ServiceBase {
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
"result1"
).
getRows
();
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
"result1"
).
getRows
();
List
<
HGCW003
>
hgcw003List
=
new
ArrayList
<>();
List
<
HGCW003
>
hgcw003List
=
new
ArrayList
<>();
BigDecimal
taxPoints
=
NumberUtils
.
toBigDecimal
(
inInfo
.
getString
(
"taxPoints"
));
BigDecimal
taxPoints
=
NumberUtils
.
toBigDecimal
(
inInfo
.
getString
(
"taxPoints"
));
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00
0
"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00"
);
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HGCW003
HGCW003
=
new
HGCW003
();
HGCW003
HGCW003
=
new
HGCW003
();
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW010.java
View file @
268e666b
...
@@ -197,7 +197,7 @@ public class ServiceHGCW010 extends ServiceBase {
...
@@ -197,7 +197,7 @@ public class ServiceHGCW010 extends ServiceBase {
}
}
//获取相应的数据
//获取相应的数据
List
<
HGCW011
>
hgcw011List
=
HGCWTools
.
HgCw011
.
mapToList
(
resultRows
,
NumberUtils
.
toLong
(
mainId
));
List
<
HGCW011
>
hgcw011List
=
HGCWTools
.
HgCw011
.
mapToList
(
resultRows
,
NumberUtils
.
toLong
(
mainId
));
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00
0
"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00"
);
if
(
CollectionUtils
.
isNotEmpty
(
hgcw011List
))
{
if
(
CollectionUtils
.
isNotEmpty
(
hgcw011List
))
{
if
(
StringUtils
.
isEmpty
(
mainId
))
{
if
(
StringUtils
.
isEmpty
(
mainId
))
{
//先生成主表
//先生成主表
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW010D.java
View file @
268e666b
...
@@ -84,7 +84,7 @@ public class ServiceHGCW010D extends ServiceEPBase {
...
@@ -84,7 +84,7 @@ public class ServiceHGCW010D extends ServiceEPBase {
}
}
//获取相应的数据
//获取相应的数据
List
<
HGCW011
>
hgcw011List
=
mapToList
(
resultRows
,
NumberUtils
.
toLong
(
mainId
));
List
<
HGCW011
>
hgcw011List
=
mapToList
(
resultRows
,
NumberUtils
.
toLong
(
mainId
));
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00
0
"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00"
);
if
(
CollectionUtils
.
isNotEmpty
(
hgcw011List
))
{
if
(
CollectionUtils
.
isNotEmpty
(
hgcw011List
))
{
if
(
StringUtils
.
isEmpty
(
mainId
))
{
if
(
StringUtils
.
isEmpty
(
mainId
))
{
//先生成主表
//先生成主表
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW010E.java
View file @
268e666b
...
@@ -83,7 +83,7 @@ public class ServiceHGCW010E extends ServiceEPBase {
...
@@ -83,7 +83,7 @@ public class ServiceHGCW010E extends ServiceEPBase {
}
}
//获取相应的数据
//获取相应的数据
List
<
HGCW011
>
hgcw011List
=
mapToList
(
resultRows
,
NumberUtils
.
toLong
(
mainId
));
List
<
HGCW011
>
hgcw011List
=
mapToList
(
resultRows
,
NumberUtils
.
toLong
(
mainId
));
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00
0
"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00"
);
if
(
CollectionUtils
.
isNotEmpty
(
hgcw011List
))
{
if
(
CollectionUtils
.
isNotEmpty
(
hgcw011List
))
{
if
(
StringUtils
.
isEmpty
(
mainId
))
{
if
(
StringUtils
.
isEmpty
(
mainId
))
{
//先生成主表
//先生成主表
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW012.java
View file @
268e666b
...
@@ -270,7 +270,7 @@ public class ServiceHGCW012 extends ServiceBase {
...
@@ -270,7 +270,7 @@ public class ServiceHGCW012 extends ServiceBase {
}
}
//获取相应的数据
//获取相应的数据
List
<
HGCW013
>
hgcw013List
=
HGCWTools
.
HgCw013
.
mapToList
(
resultRows
,
NumberUtils
.
toLong
(
mainId
));
List
<
HGCW013
>
hgcw013List
=
HGCWTools
.
HgCw013
.
mapToList
(
resultRows
,
NumberUtils
.
toLong
(
mainId
));
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00
0
"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00"
);
if
(
CollectionUtils
.
isNotEmpty
(
hgcw013List
))
{
if
(
CollectionUtils
.
isNotEmpty
(
hgcw013List
))
{
if
(
StringUtils
.
isEmpty
(
mainId
))
{
if
(
StringUtils
.
isEmpty
(
mainId
))
{
//先生成主表
//先生成主表
...
@@ -474,7 +474,7 @@ public class ServiceHGCW012 extends ServiceBase {
...
@@ -474,7 +474,7 @@ public class ServiceHGCW012 extends ServiceBase {
}
}
//获取相应的数据
//获取相应的数据
List
<
HGCW013
>
hgcw013List
=
HGCWTools
.
HgCw013
.
mapTofList
(
resultRows
,
NumberUtils
.
toLong
(
mainId
));
List
<
HGCW013
>
hgcw013List
=
HGCWTools
.
HgCw013
.
mapTofList
(
resultRows
,
NumberUtils
.
toLong
(
mainId
));
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00
0
"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00"
);
if
(
CollectionUtils
.
isNotEmpty
(
hgcw013List
))
{
if
(
CollectionUtils
.
isNotEmpty
(
hgcw013List
))
{
if
(
StringUtils
.
isEmpty
(
mainId
))
{
if
(
StringUtils
.
isEmpty
(
mainId
))
{
//先生成主表
//先生成主表
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW014.java
View file @
268e666b
...
@@ -179,7 +179,7 @@ public class ServiceHGCW014 extends ServiceBase {
...
@@ -179,7 +179,7 @@ public class ServiceHGCW014 extends ServiceBase {
}
}
//获取相应的数据
//获取相应的数据
List
<
HGCW015
>
hgcw015List
=
HGCWTools
.
HgCw015
.
mapToList
(
resultRows
,
NumberUtils
.
toLong
(
mainId
));
List
<
HGCW015
>
hgcw015List
=
HGCWTools
.
HgCw015
.
mapToList
(
resultRows
,
NumberUtils
.
toLong
(
mainId
));
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00
0
"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00"
);
if
(
CollectionUtils
.
isNotEmpty
(
hgcw015List
))
{
if
(
CollectionUtils
.
isNotEmpty
(
hgcw015List
))
{
if
(
StringUtils
.
isEmpty
(
mainId
))
{
if
(
StringUtils
.
isEmpty
(
mainId
))
{
//先生成主表
//先生成主表
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW016.java
View file @
268e666b
...
@@ -174,7 +174,7 @@ public class ServiceHGCW016 extends ServiceBase {
...
@@ -174,7 +174,7 @@ public class ServiceHGCW016 extends ServiceBase {
}
}
//获取相应的数据
//获取相应的数据
List
<
HGCW017
>
hgcw017List
=
HGCWTools
.
HgCw017
.
mapToList
(
resultRows
,
NumberUtils
.
toLong
(
mainId
));
List
<
HGCW017
>
hgcw017List
=
HGCWTools
.
HgCw017
.
mapToList
(
resultRows
,
NumberUtils
.
toLong
(
mainId
));
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00
0
"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00"
);
if
(
CollectionUtils
.
isNotEmpty
(
hgcw017List
))
{
if
(
CollectionUtils
.
isNotEmpty
(
hgcw017List
))
{
if
(
StringUtils
.
isEmpty
(
mainId
))
{
if
(
StringUtils
.
isEmpty
(
mainId
))
{
//先生成主表
//先生成主表
...
...
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
View file @
268e666b
...
@@ -354,7 +354,7 @@ public class HGCWTools {
...
@@ -354,7 +354,7 @@ public class HGCWTools {
}
}
BigDecimal
totalAmount
=
HgCw011
.
sumSettlementNumber
(
Collections
.
singletonList
(
contractNumber
));
//获取累计开票金额
BigDecimal
totalAmount
=
HgCw011
.
sumSettlementNumber
(
Collections
.
singletonList
(
contractNumber
));
//获取累计开票金额
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00
0
"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00"
);
HGCW002
hgcw002
=
results
.
get
(
0
);
HGCW002
hgcw002
=
results
.
get
(
0
);
BigDecimal
remaining
=
hgcw002
.
getTotalContractPriceIncluding
();
BigDecimal
remaining
=
hgcw002
.
getTotalContractPriceIncluding
();
//获取销售合同金额和补充协议金额
//获取销售合同金额和补充协议金额
...
@@ -432,7 +432,7 @@ public class HGCWTools {
...
@@ -432,7 +432,7 @@ public class HGCWTools {
if
(
CollectionUtils
.
isEmpty
(
results
))
{
if
(
CollectionUtils
.
isEmpty
(
results
))
{
throw
new
PlatException
(
"找不到对应的结算单!"
);
throw
new
PlatException
(
"找不到对应的结算单!"
);
}
}
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00
0
"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00"
);
HGCW006
hgcw006
=
results
.
get
(
0
);
HGCW006
hgcw006
=
results
.
get
(
0
);
BigDecimal
remainingAmount
=
new
BigDecimal
(
decimalFormat
.
format
(
hgcw006
.
getRemainingAmount
().
subtract
(
deductionAmount
)));
BigDecimal
remainingAmount
=
new
BigDecimal
(
decimalFormat
.
format
(
hgcw006
.
getRemainingAmount
().
subtract
(
deductionAmount
)));
if
(
remainingAmount
.
compareTo
(
new
BigDecimal
(
BigInteger
.
ZERO
))
<
0
)
{
if
(
remainingAmount
.
compareTo
(
new
BigDecimal
(
BigInteger
.
ZERO
))
<
0
)
{
...
@@ -513,7 +513,7 @@ public class HGCWTools {
...
@@ -513,7 +513,7 @@ public class HGCWTools {
if
(
CollectionUtils
.
isEmpty
(
results
))
{
if
(
CollectionUtils
.
isEmpty
(
results
))
{
throw
new
PlatException
(
"找不到对应的结算单!"
);
throw
new
PlatException
(
"找不到对应的结算单!"
);
}
}
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00
0
"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00"
);
HGCW008
hgcw008
=
results
.
get
(
0
);
HGCW008
hgcw008
=
results
.
get
(
0
);
BigDecimal
remainingAmount
=
new
BigDecimal
(
decimalFormat
.
format
(
hgcw008
.
getRemainingAmount
().
subtract
(
deductionAmount
)));
BigDecimal
remainingAmount
=
new
BigDecimal
(
decimalFormat
.
format
(
hgcw008
.
getRemainingAmount
().
subtract
(
deductionAmount
)));
if
(
remainingAmount
.
compareTo
(
new
BigDecimal
(
BigInteger
.
ZERO
))
<
0
)
{
if
(
remainingAmount
.
compareTo
(
new
BigDecimal
(
BigInteger
.
ZERO
))
<
0
)
{
...
@@ -549,7 +549,7 @@ public class HGCWTools {
...
@@ -549,7 +549,7 @@ public class HGCWTools {
List
<
String
>
stringList
=
cw008List
.
stream
().
map
(
HGCW008:
:
getSettlementNumber
).
collect
(
Collectors
.
toList
());
List
<
String
>
stringList
=
cw008List
.
stream
().
map
(
HGCW008:
:
getSettlementNumber
).
collect
(
Collectors
.
toList
());
BigDecimal
totalAmount
=
HgCw011
.
sumSettlementNumber
(
stringList
);
//获取累计开票金额
BigDecimal
totalAmount
=
HgCw011
.
sumSettlementNumber
(
stringList
);
//获取累计开票金额
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00
0
"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00"
);
HGCW002
hgcw002
=
hgcw002s
.
get
(
0
);
HGCW002
hgcw002
=
hgcw002s
.
get
(
0
);
BigDecimal
remaining
=
hgcw002
.
getTotalContractPriceIncluding
();
BigDecimal
remaining
=
hgcw002
.
getTotalContractPriceIncluding
();
//获取销售合同金额和补充协议金额
//获取销售合同金额和补充协议金额
...
@@ -605,7 +605,7 @@ public class HGCWTools {
...
@@ -605,7 +605,7 @@ public class HGCWTools {
BigDecimal
totalAmount08
=
cw008List
.
stream
().
map
(
HGCW008:
:
getThisPriceTax
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
BigDecimal
totalAmount08
=
cw008List
.
stream
().
map
(
HGCW008:
:
getThisPriceTax
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
//获取销售开票累计开票金额
//获取销售开票累计开票金额
BigDecimal
totalAmount11
=
hgcw011List
.
size
()
==
0
?
BigDecimal
.
ZERO
:
hgcw011List
.
stream
().
map
(
HGCW011:
:
getTotalContractPriceIncluding
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
BigDecimal
totalAmount11
=
hgcw011List
.
size
()
==
0
?
BigDecimal
.
ZERO
:
hgcw011List
.
stream
().
map
(
HGCW011:
:
getTotalContractPriceIncluding
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00
0
"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00"
);
//合同总金额-(累计开票金额+本次来票金额)
//合同总金额-(累计开票金额+本次来票金额)
BigDecimal
remainingAmount
=
new
BigDecimal
(
decimalFormat
.
format
(
remaining
.
subtract
(
deductionAmount
.
add
(
totalAmount08
.
add
(
totalAmount11
)))));
BigDecimal
remainingAmount
=
new
BigDecimal
(
decimalFormat
.
format
(
remaining
.
subtract
(
deductionAmount
.
add
(
totalAmount08
.
add
(
totalAmount11
)))));
...
@@ -692,7 +692,7 @@ public class HGCWTools {
...
@@ -692,7 +692,7 @@ public class HGCWTools {
*/
*/
public
static
void
calculateAmount
(
String
settlementNumber
){
public
static
void
calculateAmount
(
String
settlementNumber
){
AssertUtils
.
isNull
(
settlementNumber
,
"结算单号不能为空!"
);
AssertUtils
.
isNull
(
settlementNumber
,
"结算单号不能为空!"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00
0
"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00"
);
List
<
HGCW008
>
HGCW008List
=
DaoBase
.
getInstance
().
query
(
HGCW008
.
QUERY
,
new
HashMap
<
String
,
Object
>(){
List
<
HGCW008
>
HGCW008List
=
DaoBase
.
getInstance
().
query
(
HGCW008
.
QUERY
,
new
HashMap
<
String
,
Object
>(){
{
put
(
"settlementNumber"
,
settlementNumber
);}
{
put
(
"settlementNumber"
,
settlementNumber
);}
});
});
...
@@ -824,7 +824,7 @@ public class HGCWTools {
...
@@ -824,7 +824,7 @@ public class HGCWTools {
if
(
CollectionUtils
.
isEmpty
(
results
))
{
if
(
CollectionUtils
.
isEmpty
(
results
))
{
throw
new
PlatException
(
"找不到对应的销售开票记录!"
);
throw
new
PlatException
(
"找不到对应的销售开票记录!"
);
}
}
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00
0
"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00"
);
HGCW010
HGCW010
=
results
.
get
(
0
);
HGCW010
HGCW010
=
results
.
get
(
0
);
BigDecimal
remainingAmount
=
new
BigDecimal
(
decimalFormat
.
format
(
HGCW010
.
getRemainingAmount
().
subtract
(
cutAmount
)));
BigDecimal
remainingAmount
=
new
BigDecimal
(
decimalFormat
.
format
(
HGCW010
.
getRemainingAmount
().
subtract
(
cutAmount
)));
if
(
remainingAmount
.
compareTo
(
new
BigDecimal
(
BigInteger
.
ZERO
))
<
0
)
{
if
(
remainingAmount
.
compareTo
(
new
BigDecimal
(
BigInteger
.
ZERO
))
<
0
)
{
...
@@ -849,7 +849,7 @@ public class HGCWTools {
...
@@ -849,7 +849,7 @@ public class HGCWTools {
if
(
CollectionUtils
.
isEmpty
(
results
))
{
if
(
CollectionUtils
.
isEmpty
(
results
))
{
throw
new
PlatException
(
"找不到对应的销售开票记录!"
);
throw
new
PlatException
(
"找不到对应的销售开票记录!"
);
}
}
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00
0
"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00"
);
HGCW010
HGCW010
=
results
.
get
(
0
);
HGCW010
HGCW010
=
results
.
get
(
0
);
BigDecimal
remainingAmount
=
new
BigDecimal
(
decimalFormat
.
format
(
HGCW010
.
getRemainingAmount
().
subtract
(
cutAmount
)));
BigDecimal
remainingAmount
=
new
BigDecimal
(
decimalFormat
.
format
(
HGCW010
.
getRemainingAmount
().
subtract
(
cutAmount
)));
if
(
remainingAmount
.
compareTo
(
new
BigDecimal
(
BigInteger
.
ZERO
))
<
0
)
{
if
(
remainingAmount
.
compareTo
(
new
BigDecimal
(
BigInteger
.
ZERO
))
<
0
)
{
...
@@ -963,7 +963,7 @@ public class HGCWTools {
...
@@ -963,7 +963,7 @@ public class HGCWTools {
if
(
CollectionUtils
.
isEmpty
(
results
))
{
if
(
CollectionUtils
.
isEmpty
(
results
))
{
throw
new
PlatException
(
"找不到对应的采购收票记录!"
);
throw
new
PlatException
(
"找不到对应的采购收票记录!"
);
}
}
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00
0
"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00"
);
HGCW012
HGCW012
=
results
.
get
(
0
);
HGCW012
HGCW012
=
results
.
get
(
0
);
BigDecimal
remainingAmount
=
new
BigDecimal
(
decimalFormat
.
format
(
HGCW012
.
getRemainingAmount
().
subtract
(
cutAmount
)));
BigDecimal
remainingAmount
=
new
BigDecimal
(
decimalFormat
.
format
(
HGCW012
.
getRemainingAmount
().
subtract
(
cutAmount
)));
if
(
remainingAmount
.
compareTo
(
new
BigDecimal
(
BigInteger
.
ZERO
))
<
0
)
{
if
(
remainingAmount
.
compareTo
(
new
BigDecimal
(
BigInteger
.
ZERO
))
<
0
)
{
...
@@ -1093,7 +1093,7 @@ public class HGCWTools {
...
@@ -1093,7 +1093,7 @@ public class HGCWTools {
}
}
public
static
void
countTaxAmount
(
List
<
Map
>
rows
,
HGCW012
hgcw012
,
Map
<
String
,
BigDecimal
>
rowMap
)
{
public
static
void
countTaxAmount
(
List
<
Map
>
rows
,
HGCW012
hgcw012
,
Map
<
String
,
BigDecimal
>
rowMap
)
{
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00
0
"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.00"
);
StringBuffer
settlementNumber
=
new
StringBuffer
();
StringBuffer
settlementNumber
=
new
StringBuffer
();
BigDecimal
thisAmount
=
BigDecimal
.
ZERO
;
BigDecimal
thisAmount
=
BigDecimal
.
ZERO
;
BigDecimal
taxPoints
=
new
BigDecimal
(
"13"
);
// 假设这是以整数形式给出的税率,比如17表示17%
BigDecimal
taxPoints
=
new
BigDecimal
(
"13"
);
// 假设这是以整数形式给出的税率,比如17表示17%
...
...
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