Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
image-backend
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈皓
image-backend
Commits
5ecec3eb
Commit
5ecec3eb
authored
Dec 06, 2023
by
陈皓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
627e5035
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
imgproc-server/src/main/java/com/zq/imgproc/controller/ImageBatchController.java
+7
-3
No files found.
imgproc-server/src/main/java/com/zq/imgproc/controller/ImageBatchController.java
View file @
5ecec3eb
...
...
@@ -20,6 +20,8 @@ import io.swagger.annotations.ApiOperation;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.*
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -58,10 +60,12 @@ public class ImageBatchController {
return
ResultVo
.
success
(
0
);
}
long
complete
=
imageDetectionDao
.
selectCount
(
Wrappers
.
lambdaQuery
(
ImageDetection
.
builder
().
batchId
(
id
).
build
()).
i
sNotNull
(
ImageDetection:
:
getQualified
)
Wrappers
.
lambdaQuery
(
ImageDetection
.
builder
().
batchId
(
id
).
build
()).
i
n
(
ImageDetection:
:
getQualified
,
0
,
1
)
);
return
ResultVo
.
success
(
Convert
.
toInt
(
complete
/
count
)
*
100
);
BigDecimal
countDecimal
=
new
BigDecimal
(
count
);
BigDecimal
completeDecimal
=
new
BigDecimal
(
complete
);
BigDecimal
res
=
completeDecimal
.
divide
(
countDecimal
,
2
,
RoundingMode
.
HALF_UP
);
return
ResultVo
.
success
(
Convert
.
toInt
(
res
.
doubleValue
()
*
100
));
}
@ApiOperation
(
"根据ID查询"
)
...
...
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