Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bailuntec-cost
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
huluobin
bailuntec-cost
Commits
c6e6e66e
Commit
c6e6e66e
authored
Sep 02, 2021
by
liyanlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加4k费用系统跳板
parent
b9eface2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
0 deletions
+64
-0
CostApi4k.java
.../java/com/blt/other/module/cost/controller/CostApi4k.java
+64
-0
No files found.
cost-service/src/main/java/com/blt/other/module/cost/controller/CostApi4k.java
0 → 100644
View file @
c6e6e66e
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
import
com.blt.other.module.cost.vo.ApplyCallbackUrlVo
;
import
com.blt.other.module.cost.vo.CashierCallbackUrlVo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.client.RestTemplate
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Map
;
/**
* @Author: li.yanlin
* @Description:
* @Date: Created in
* @Modified by:
*/
@Api
(
tags
=
"4k api"
)
@RestController
@RequestMapping
(
"/cost/api/4k"
)
public
class
CostApi4k
{
@Resource
private
RestTemplate
restTemplate
;
private
final
static
String
BASE_URL
=
"https://oa.4kmiles.com/costApi/purchase/other"
;
@ApiOperation
(
"审核回调地址"
)
@PostMapping
(
value
=
"/purchasing/ApplyCallbackUrl"
,
consumes
=
"application/json"
)
public
String
applyCallbackUrl
(
HttpServletRequest
request
){
ResponseEntity
<
String
>
responseEntity
=
restTemplate
.
postForEntity
(
BASE_URL
+
"/purchasing/list/detail/ApplyCallbackUrl"
,
request
,
String
.
class
);
return
responseEntity
.
getBody
();
}
@ApiOperation
(
"出纳回调地址"
)
@PostMapping
(
value
=
"/purchasing/CashierCallbackUrl"
,
consumes
=
"application/json"
)
public
String
cashierCallbackUrl
(
HttpServletRequest
request
){
ResponseEntity
<
String
>
responseEntity
=
restTemplate
.
postForEntity
(
BASE_URL
+
"/purchasing/list/detail/ApplyCallbackUrl"
,
request
,
String
.
class
);
return
responseEntity
.
getBody
();
}
@ApiOperation
(
"财务审核回调"
)
@PostMapping
(
"/check/ApplyCallbackUrl"
)
public
Map
<
String
,
Object
>
applyCallbackUrl
(
@RequestBody
ApplyCallbackUrlVo
applyCallbackUrlVo
){
ResponseEntity
<
Map
>
responseEntity
=
restTemplate
.
postForEntity
(
BASE_URL
+
"/cost/check/ApplyCallbackUrl"
,
applyCallbackUrlVo
,
Map
.
class
);
return
responseEntity
.
getBody
();
}
@ApiOperation
(
"财务付款回调接口"
)
@PostMapping
(
"/check/CashierCallbackUrl"
)
public
Map
<
String
,
Object
>
cashierCallbackUrl
(
@RequestBody
CashierCallbackUrlVo
cashierCallbackUrlVo
){
ResponseEntity
<
Map
>
responseEntity
=
restTemplate
.
postForEntity
(
BASE_URL
+
"/cost/check/CashierCallbackUrl"
,
cashierCallbackUrlVo
,
Map
.
class
);
return
responseEntity
.
getBody
();
}
}
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