Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
Project
Project
Details
Activity
Releases
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
bp
ShenghuoquanBusiness
Commits
d25bab36
Commit
d25bab36
authored
May 25, 2021
by
yinjiacheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add 封装营业执照OCR接口
parent
ef650234
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
0 deletions
+61
-0
URLs.kt
...onLib/Common/src/main/java/com/yidian/common/http/URLs.kt
+1
-0
ApiService.kt
...va/com/yidian/shenghuoquan/newscontent/http/ApiService.kt
+17
-0
CommonService.kt
...com/yidian/shenghuoquan/newscontent/http/CommonService.kt
+4
-0
BusinessLicenseOCRBean.kt
...oquan/newscontent/http/httpbean/BusinessLicenseOCRBean.kt
+28
-0
IBusinessLicenseOCRCallback.kt
.../newscontent/http/httpbean/IBusinessLicenseOCRCallback.kt
+11
-0
No files found.
CommonLib/Common/src/main/java/com/yidian/common/http/URLs.kt
View file @
d25bab36
...
...
@@ -50,5 +50,6 @@ class URLs {
const
val
identifyIdOcrVerify
=
"/Identify/IdOcr/verify"
const
val
getKSYunObjectId
=
"Ksy/ksyun/buildObectid"
const
val
getKSYunBucket
=
"Ksy/ksyun/getBucket"
const
val
businessLicenseOCR
=
"/Identify/BusLicense/businessLicenseOcr"
}
}
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/ApiService.kt
View file @
d25bab36
...
...
@@ -113,6 +113,23 @@ class ApiService {
})
}
//获取金山云Bucket
fun
businessLicenseOCR
(
apiCallback
:
IBusinessLicenseOCRCallback
,
requestParams
:
BusinessLicenseOCRBean
.
Request
)
{
val
paramsMap
=
HttpParamsUtils
.
getParamsMap
()
ServiceFactory
.
getInstance
().
createService
(
CommonService
::
class
.
java
)
.
businessLicenseOCR
(
paramsMap
,
requestParams
)
.
compose
(
TransformUtil
.
defaultSchedulers
())
.
subscribe
(
object
:
HttpResultSubscriber
<
BusinessLicenseOCRBean
.
Response
>()
{
override
fun
onSuccess
(
result
:
HttpResult
<
BusinessLicenseOCRBean
.
Response
>?)
{
apiCallback
.
businessLicenseOCRSuccess
(
result
?.
result
)
}
override
fun
onFailer
(
result
:
HttpResult
<
BusinessLicenseOCRBean
.
Response
>?)
{
apiCallback
.
businessLicenseOCRFailure
(
result
?.
status
)
}
})
}
//游客登录接口
fun
guestLogin
(
apiCallback
:
IGuestLoginCallback
,
requestParams
:
GuestLoginBean
.
Request
)
{
val
paramsMap
=
HttpParamsUtils
.
getParamsMap
()
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/CommonService.kt
View file @
d25bab36
...
...
@@ -126,4 +126,8 @@ interface CommonService {
@GET
(
URLs
.
getKSYunBucket
)
fun
getKSYunBucket
(
@QueryMap
commonParams
:
Map
<
String
,
String
>)
:
Observable
<
HttpResult
<
GetKSYunBucketBean
.
Response
>>
@Headers
(
"Content-Type: application/json"
)
@POST
(
URLs
.
businessLicenseOCR
)
fun
businessLicenseOCR
(
@QueryMap
commonParams
:
Map
<
String
,
String
>,
@Body
requestParams
:
BusinessLicenseOCRBean
.
Request
)
:
Observable
<
HttpResult
<
BusinessLicenseOCRBean
.
Response
>>
}
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/httpbean/BusinessLicenseOCRBean.kt
0 → 100644
View file @
d25bab36
package
com.yidian.shenghuoquan.newscontent.http.httpbean
/**
* author: yinjiacheng
* date: 5/24/21 8:59 PM
* description: 营业执照OCR
*/
class
BusinessLicenseOCRBean
{
data class
Request
(
val
business_image_objectid
:
String
?)
data class
Response
(
val
addr
:
String
,
val
code
:
String
,
val
comp
:
String
,
val
date
:
String
,
val
date_issue
:
String
,
val
form
:
String
,
val
funding
:
String
,
val
name
:
String
,
val
num
:
String
,
val
organizer
:
String
,
val
pers
:
String
,
val
regi
:
String
,
val
scope
:
String
,
val
time
:
String
,
val
type
:
String
)
}
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/httpbean/IBusinessLicenseOCRCallback.kt
0 → 100644
View file @
d25bab36
package
com.yidian.shenghuoquan.newscontent.http.httpbean
/**
* author: yinjiacheng
* date: 5/24/21 9:04 PM
* description: 营业执照OCR
*/
interface
IBusinessLicenseOCRCallback
{
fun
businessLicenseOCRSuccess
(
result
:
BusinessLicenseOCRBean
.
Response
?)
fun
businessLicenseOCRFailure
(
message
:
String
?)
}
\ No newline at end of file
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