Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
ea3e37ec
Commit
ea3e37ec
authored
Dec 29, 2022
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ocr图片识别接口
parent
6dfac250
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
0 deletions
+51
-0
AttachmentController.java
.../boot/module/ugp/biz/controller/AttachmentController.java
+21
-0
MaasServiceFeignClient.java
...mos/boot/module/ugp/biz/fegin/MaasServiceFeignClient.java
+30
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/AttachmentController.java
View file @
ea3e37ec
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.ugp.biz.fegin.MaasServiceFeignClient
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -128,4 +131,22 @@ public class AttachmentController extends BaseController {
...
@@ -128,4 +131,22 @@ public class AttachmentController extends BaseController {
public
ResponseModel
<
Map
>
selectUnit
(){
public
ResponseModel
<
Map
>
selectUnit
(){
return
ResponseHelper
.
buildResponse
(
attachmentServiceImpl
.
selectUnit
());
return
ResponseHelper
.
buildResponse
(
attachmentServiceImpl
.
selectUnit
());
}
}
@Autowired
MaasServiceFeignClient
maasServiceFeignClient
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/test"
)
@ApiOperation
(
httpMethod
=
"Get"
,
value
=
"测试"
,
notes
=
"测试"
)
public
ResponseModel
test
(
@RequestParam
String
urlPath
)
{
JSONObject
param
=
new
JSONObject
();
JSONArray
urls
=
new
JSONArray
();
JSONObject
url
=
new
JSONObject
();
url
.
put
(
"url"
,
urlPath
);
urls
.
add
(
url
);
param
.
put
(
"data"
,
urls
);
ResponseModel
<
Object
>
result
=
maasServiceFeignClient
.
getPatrolDangerInfo
(
param
);
String
resultStr
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
result
.
getResult
())).
getJSONObject
(
"result1"
).
getJSONArray
(
"rows"
).
getJSONObject
(
0
).
getString
(
"ocrResult"
);
return
ResponseHelper
.
buildResponse
(
resultStr
);
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/fegin/MaasServiceFeignClient.java
0 → 100644
View file @
ea3e37ec
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
fegin
;
import
com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
/**
* 数据集成服务接口feign
*
* @author Dell
*/
@FeignClient
(
name
=
"${maas.feign.name:maas-mdm}"
,
path
=
"maas"
,
configuration
=
{
MultipartSupportConfig
.
class
})
public
interface
MaasServiceFeignClient
{
String
ocrServiceId
=
"0a456d67-5e12-48af-8923-ccc447d4cb2b"
;
/**
* 获取图片识别数据
*
* @param param
* @return
*/
@RequestMapping
(
value
=
"/maas/processes/api/"
+
ocrServiceId
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Object
>
getPatrolDangerInfo
(
@RequestBody
Object
param
);
}
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