Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zh-mes-device-data-process
Project
Project
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
耿迪迪
zh-mes-device-data-process
Commits
2642accc
Commit
2642accc
authored
Jan 30, 2026
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 接收 aoi 检测结果数据调整。
parent
ee45fbd1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
5 deletions
+22
-5
AoiTestResultController.java
...n/java/com/zehong/controller/AoiTestResultController.java
+4
-2
AoiTestResultService.java
src/main/java/com/zehong/service/AoiTestResultService.java
+3
-1
AoiTestResultServiceImpl.java
...ava/com/zehong/service/impl/AoiTestResultServiceImpl.java
+15
-2
No files found.
src/main/java/com/zehong/controller/AoiTestResultController.java
View file @
2642accc
...
...
@@ -8,6 +8,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Map
;
/**
* AOI检查结果
* @author geng
...
...
@@ -20,7 +22,7 @@ public class AoiTestResultController extends BaseController{
private
AoiTestResultService
aoiTestResultService
;
@PostMapping
(
"/syncAoiResult"
)
public
AjaxResult
syncAoiResult
(
@RequestBody
String
result
){
return
toAjax
(
aoiTestResultService
.
syncAoiResult
(
result
)
);
public
Map
<
String
,
Object
>
syncAoiResult
(
@RequestBody
String
result
){
return
aoiTestResultService
.
syncAoiResult
(
result
);
}
}
src/main/java/com/zehong/service/AoiTestResultService.java
View file @
2642accc
package
com
.
zehong
.
service
;
import
java.util.Map
;
/**
* AOI检查结果
* @author geng
...
...
@@ -10,5 +12,5 @@ public interface AoiTestResultService {
* AOI检查结果同步
* @param result
*/
int
syncAoiResult
(
String
result
);
Map
<
String
,
Object
>
syncAoiResult
(
String
result
);
}
src/main/java/com/zehong/service/impl/AoiTestResultServiceImpl.java
View file @
2642accc
...
...
@@ -11,8 +11,11 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
javax.annotation.Resource
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -32,8 +35,9 @@ public class AoiTestResultServiceImpl implements AoiTestResultService{
* AOI检查结果同步
* @param result
*/
public
int
syncAoiResult
(
String
result
){
public
Map
<
String
,
Object
>
syncAoiResult
(
String
result
){
int
insertResult
=
0
;
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
JSONObject
resultJson
=
JSON
.
parseObject
(
result
);
log
.
info
(
"aoi检测结果====="
+
resultJson
);
JSONArray
boardData
=
resultJson
.
getJSONArray
(
"board_data"
);
...
...
@@ -51,6 +55,15 @@ public class AoiTestResultServiceImpl implements AoiTestResultService{
}
}
}
return
insertResult
;
if
(
insertResult
!=
0
)
{
map
.
put
(
"code"
,
200
);
map
.
put
(
"message"
,
"上传成功"
);
return
map
;
}
map
.
put
(
"code"
,
400
);
map
.
put
(
"message"
,
"上传失败"
);
return
map
;
}
}
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