Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
emport-api
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
刘泽志
emport-api
Commits
6241d020
Commit
6241d020
authored
Feb 17, 2023
by
刘泽志
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0202
parent
619cf8e1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
ExcelDataServiceImpl.java
...his/web/dataImport/service/impl/ExcelDataServiceImpl.java
+8
-1
DataTemplateMapper.xml
admin-api/src/main/resources/mapper/DataTemplateMapper.xml
+1
-1
No files found.
admin-api/src/main/java/com/tbyf/his/web/dataImport/service/impl/ExcelDataServiceImpl.java
View file @
6241d020
...
...
@@ -174,6 +174,12 @@ public class ExcelDataServiceImpl extends ServiceImpl<ExcelDataMapper, ExcelData
}
catch
(
Exception
ignore
)
{
}
}
// 这里需要进行四舍五入的精确位数处理
if
(
StringUtils
.
isNotBlank
(
rule
.
getRemarks
())){
int
scale
=
Integer
.
parseInt
(
rule
.
getRemarks
());
left
.
setScale
(
scale
,
BigDecimal
.
ROUND_UP
);
right
.
setScale
(
scale
,
BigDecimal
.
ROUND_UP
);
}
if
(
left
.
compareTo
(
right
)
!=
0
)
{
ExcelVO
excelVO
=
new
ExcelVO
();
BeanUtils
.
copyProperties
(
excels
[
r
],
excelVO
);
...
...
@@ -278,6 +284,7 @@ public class ExcelDataServiceImpl extends ServiceImpl<ExcelDataMapper, ExcelData
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
new
BigDecimal
(
"0"
).
add
(
new
BigDecimal
(
""
)));
BigDecimal
bigDecimal
=
new
BigDecimal
(
"1234567.123"
);
System
.
out
.
println
(
bigDecimal
.
setScale
(
5
,
BigDecimal
.
ROUND_DOWN
).
intValue
());
}
}
admin-api/src/main/resources/mapper/DataTemplateMapper.xml
View file @
6241d020
...
...
@@ -75,7 +75,7 @@
</select>
<select
id=
"getAllRule"
resultType=
"com.tbyf.his.web.dataImport.entity.DataRule"
>
select dr.id as id, dr.name as name, dr.mode as mode, dr.content as content
select dr.id as id, dr.name as name, dr.mode as mode, dr.content as content
, dr.remarks as remarks
from bind_rule br
left join data_rule dr on br.rule_id = dr.id
where br.data_id = #{templateId}
...
...
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