Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zhj-report
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
data-spider
zhj-report
Commits
71b13819
Commit
71b13819
authored
Nov 08, 2019
by
董建华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改一些格式问题
parent
d804242d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
13 deletions
+16
-13
IReportServiceImpl.java
...main/java/com/service/report/impl/IReportServiceImpl.java
+1
-1
DateUtil.java
src/main/java/com/util/DateUtil.java
+0
-4
Utils.java
src/main/java/com/util/Utils.java
+15
-8
No files found.
src/main/java/com/service/report/impl/IReportServiceImpl.java
View file @
71b13819
...
...
@@ -609,7 +609,7 @@ public class IReportServiceImpl implements ReportService {
// }
for
(
Integer
moneyindex
:
MONEYINDEX
)
{
if
(
i
==
moneyindex
)
{
value
=
DateUtil
.
getInt
(
value
);
value
=
utils
.
getInt
(
value
);
}
}
...
...
src/main/java/com/util/DateUtil.java
View file @
71b13819
...
...
@@ -109,8 +109,4 @@ public class DateUtil {
return
null
;
}
public
static
String
getInt
(
Object
val
){
return
new
BigDecimal
(
String
.
valueOf
(
val
)).
setScale
(
0
,
BigDecimal
.
ROUND_HALF_UP
).
toString
();
}
}
src/main/java/com/util/Utils.java
View file @
71b13819
...
...
@@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Component
;
import
java.io.*
;
import
java.math.BigDecimal
;
import
java.nio.MappedByteBuffer
;
import
java.nio.channels.FileChannel
;
import
java.security.MessageDigest
;
...
...
@@ -155,8 +156,8 @@ public class Utils {
CryptoUtil
.
writeFile
(
b2
,
file2
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
QgException
(
"zip转enc失败"
,
e
);
}
finally
{
throw
new
QgException
(
"zip转enc失败"
,
e
);
}
finally
{
System
.
gc
();
}
return
file2
;
...
...
@@ -168,12 +169,13 @@ public class Utils {
byte
[]
var4
;
try
{
MappedByteBuffer
bytebuffer
=
fc
.
map
(
FileChannel
.
MapMode
.
READ_ONLY
,
0L
,
fc
.
size
()).
load
();
byte
[]
result
=
new
byte
[(
int
)
fc
.
size
()];
byte
[]
result
=
new
byte
[(
int
)
fc
.
size
()];
if
(
bytebuffer
.
remaining
()
>
0
)
{
bytebuffer
.
get
(
result
,
0
,
bytebuffer
.
remaining
());
}
var4
=
result
;
System
.
gc
();
var4
=
result
;
System
.
gc
();
}
catch
(
IOException
var8
)
{
throw
var8
;
}
finally
{
...
...
@@ -183,6 +185,7 @@ public class Utils {
}
return
var4
;
}
/**
* 国密解密 env转zip
*
...
...
@@ -214,8 +217,8 @@ public class Utils {
CryptoUtil
.
writeFile
(
prb2
,
file3
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
QgException
(
"国密解密 env转zip异常"
,
e
);
}
finally
{
throw
new
QgException
(
"国密解密 env转zip异常"
,
e
);
}
finally
{
//释放占用的文件
System
.
gc
();
}
...
...
@@ -238,13 +241,14 @@ public class Utils {
encodeBase64String
=
Base64
.
encodeBase64String
(
buffer
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
throw
new
QgException
(
"读取file 转为base64字符串异常"
,
e
);
throw
new
QgException
(
"读取file 转为base64字符串异常"
,
e
);
}
return
encodeBase64String
;
}
/**
* 将身份证的小写转为大写
*
* @param idCardNo
* @return
*/
...
...
@@ -255,10 +259,13 @@ public class Utils {
return
idCardNo
;
}
public
int
random
(
int
max
)
{
public
int
random
(
int
max
)
{
Random
random
=
new
Random
();
return
random
.
nextInt
(
max
);
}
public
String
getInt
(
Object
val
)
{
return
new
BigDecimal
(
String
.
valueOf
(
val
)).
setScale
(
0
,
BigDecimal
.
ROUND_HALF_UP
).
toString
();
}
}
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