Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
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
hlcm
leaf-hlcm
Commits
8e3bc869
Commit
8e3bc869
authored
Apr 10, 2023
by
TIANZHI.HU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对账单打印最新更到pre add by 39135 HuTianzhi
parent
6797ed5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
5 deletions
+21
-5
ConExportServiceImpl.java
...hand/hls/hlcm/cont/service/impl/ConExportServiceImpl.java
+21
-5
No files found.
src/main/java/com/hand/hls/hlcm/cont/service/impl/ConExportServiceImpl.java
View file @
8e3bc869
...
@@ -14,8 +14,10 @@ import java.io.*;
...
@@ -14,8 +14,10 @@ import java.io.*;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.net.URL
;
import
java.net.URL
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.text.DateFormat
;
import
java.text.DecimalFormat
;
import
java.text.DecimalFormat
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
import
javax.imageio.ImageIO
;
import
javax.imageio.ImageIO
;
...
@@ -332,13 +334,27 @@ public class ConExportServiceImpl implements ConExportService {
...
@@ -332,13 +334,27 @@ public class ConExportServiceImpl implements ConExportService {
if
(
x
.
compareTo
((
BigDecimal
)
map1
.
get
(
"CF_ITEM"
))
==
0
){
if
(
x
.
compareTo
((
BigDecimal
)
map1
.
get
(
"CF_ITEM"
))
==
0
){
cell
.
setCellValue
(
""
);
cell
.
setCellValue
(
""
);
}
else
{
}
else
{
DataFormat
df
=
wb
.
createDataFormat
();
// 此处设置数据格式
// 系统时间大于应收日的才set值
contentTable
.
setDataFormat
(
df
.
getFormat
(
"#,##0.00"
));
//保留两位小数点
DateFormat
dft
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
cell
.
setCellStyle
(
contentTable
);
Date
dueDate
=
dft
.
parse
((
String
)
map1
.
get
(
"DUE_DATE"
));
cell
.
setCellValue
(
new
DecimalFormat
().
parse
(
map1
.
get
(
"UNRECEIVED_AMOUNT"
).
toString
()).
doubleValue
());
// 未收金额
// 去除时分秒
Date
now
=
dft
.
parse
(
dft
.
format
(
new
Date
()));
if
(
Objects
.
nonNull
(
dueDate
)
&&
now
.
compareTo
(
dueDate
)
==
1
){
DataFormat
df
=
wb
.
createDataFormat
();
// 此处设置数据格式
contentTable
.
setDataFormat
(
df
.
getFormat
(
"#,##0.00"
));
//保留两位小数点
cell
.
setCellStyle
(
contentTable
);
cell
.
setCellValue
(
new
DecimalFormat
().
parse
(
map1
.
get
(
"UNRECEIVED_AMOUNT"
).
toString
()).
doubleValue
());
// 未收金额
}
else
{
cell
.
setCellValue
(
"0"
);
}
}
}
}
else
{
}
else
{
cell
.
setCellValue
(
""
);
// 未收金额
BigDecimal
x
=
new
BigDecimal
(
100
);
if
(
x
.
compareTo
((
BigDecimal
)
map1
.
get
(
"CF_ITEM"
))
==
0
){
cell
.
setCellValue
(
""
);
}
else
{
cell
.
setCellValue
(
"0"
);
// 未收金额
}
}
}
cell
.
setCellStyle
(
contentTable
);
cell
.
setCellStyle
(
contentTable
);
}
}
...
...
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