Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jiwei-api
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
马天浩
jiwei-api
Commits
1a73d83d
Commit
1a73d83d
authored
Aug 08, 2020
by
matianhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[纪委接口] <add> 新增"纪委智慧监督平台接口_20200805"中接口;将资产云接口新建单独controller
parent
6e901406
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
258 additions
and
80 deletions
+258
-80
AssetCloudController.java
...om/mth/requestsecret/controller/AssetCloudController.java
+123
-0
RequestController.java
...a/com/mth/requestsecret/controller/RequestController.java
+135
-80
No files found.
src/main/java/com/mth/requestsecret/controller/AssetCloudController.java
0 → 100644
View file @
1a73d83d
package
com
.
mth
.
requestsecret
.
controller
;
import
com.mth.requestsecret.controller.vo.CxdwzcVO
;
import
com.mth.requestsecret.controller.vo.HtbacxVO
;
import
com.mth.requestsecret.controller.vo.JzmxsjVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.client.RestTemplate
;
import
java.util.HashMap
;
/**
* 资产云接口
*
* @author MaTianHao
* @date 2020/8/7
*/
public
class
AssetCloudController
{
@Autowired
private
RestTemplate
restTemplate
;
/**
* 三十五查询单位资产列表
* @param cxdwzcVO
* @return
*/
@PostMapping
(
"/cxdwzc"
)
public
ResponseEntity
<
String
>
cxdwzc
(
@RequestBody
CxdwzcVO
cxdwzcVO
)
{
String
url
=
"http://59.202.50.194:8090/fcfa_restapi/api/asset/getOrgAssetList"
;
// api参数
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
long
timeStamp
=
System
.
currentTimeMillis
();
map
.
put
(
"assetCode"
,
cxdwzcVO
.
getAssetCode
());
map
.
put
(
"assetTypeCode"
,
cxdwzcVO
.
getAssetTypeCode
());
map
.
put
(
"gbTypeCode"
,
cxdwzcVO
.
getGbTypeCode
());
map
.
put
(
"rgCode"
,
cxdwzcVO
.
getRgCode
());
map
.
put
(
"status"
,
cxdwzcVO
.
getStatus
());
map
.
put
(
"timeStamp"
,
timeStamp
);
map
.
put
(
"pageNumber"
,
cxdwzcVO
.
getPageNumber
());
map
.
put
(
"pageSize"
,
cxdwzcVO
.
getPageSize
());
map
.
put
(
"orgCode"
,
cxdwzcVO
.
getOrgCode
());
map
.
put
(
"sysCode"
,
cxdwzcVO
.
getSysCode
());
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
set
(
"Authority"
,
"d2ViLDM2MDAsNitVTWhRYmtZV21kV090OUlPZ0tkcz"
);
// 发送请求
HttpEntity
<
HashMap
<
String
,
Object
>>
request
=
new
HttpEntity
<>(
map
,
headers
);
return
restTemplate
.
exchange
(
url
,
HttpMethod
.
POST
,
request
,
String
.
class
);
}
/**
* 三十六 获取记账明细数据接口(通用接口)
* @param jzmxsjVO
* @return
*/
@PostMapping
(
"/jzmxsj"
)
public
ResponseEntity
<
String
>
jzmxsj
(
@RequestBody
JzmxsjVO
jzmxsjVO
)
{
String
url
=
"http://59.202.50.194:8090/fcfa_restapi/api/asset/getAccountingData"
;
// api参数
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
long
timeStamp
=
System
.
currentTimeMillis
();
map
.
put
(
"accperiodmth"
,
jzmxsjVO
.
getAccperiodmth
());
map
.
put
(
"businessType"
,
jzmxsjVO
.
getBusinessType
());
map
.
put
(
"rgCode"
,
jzmxsjVO
.
getRgCode
());
map
.
put
(
"periodyear"
,
jzmxsjVO
.
getPeriodyear
());
map
.
put
(
"pageNumber"
,
jzmxsjVO
.
getPageNumber
());
map
.
put
(
"pageSize"
,
jzmxsjVO
.
getPageSize
());
map
.
put
(
"orgCode"
,
jzmxsjVO
.
getOrgCode
());
map
.
put
(
"sysCode"
,
jzmxsjVO
.
getSysCode
());
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
set
(
"Authority"
,
"d2ViLDM2MDAsNitVTWhRYmtZV21kV090OUlPZ0tkcz"
);
// 发送请求
HttpEntity
<
HashMap
<
String
,
Object
>>
request
=
new
HttpEntity
<>(
map
,
headers
);
return
restTemplate
.
exchange
(
url
,
HttpMethod
.
POST
,
request
,
String
.
class
);
}
/**
* 三十七 根据资产ID 获取资产详情
* @param
* @return
*/
@GetMapping
(
"/hqzcxq"
)
public
ResponseEntity
<
String
>
hqzcxq
(
String
sysCode
,
String
rgCode
,
String
orgCode
,
String
assetId
)
{
String
u
=
"http://59.202.50.194:8090/fcfa_restapi/api/asset/assetInfo/"
;
// api参数
String
url
=
u
+
sysCode
+
"@"
+
rgCode
+
"@"
+
orgCode
+
"@"
+
assetId
;
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
set
(
"Authority"
,
"d2ViLDM2MDAsNitVTWhRYmtZV21kV090OUlPZ0tkcz"
);
// 发送请求
HttpEntity
<
HashMap
<
String
,
Object
>>
request
=
new
HttpEntity
<>(
map
,
headers
);
return
restTemplate
.
exchange
(
url
,
HttpMethod
.
GET
,
request
,
String
.
class
);
}
/**
* 三十八 合同备案查询
* @param htbacxVO
* @return
*/
@PostMapping
(
"/htbacx"
)
public
ResponseEntity
<
String
>
htbacx
(
@RequestBody
HtbacxVO
htbacxVO
)
{
String
url
=
"http://59.202.50.194:8090/fcfa_restapi/api/contract/getContractList"
;
// api参数
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"rgCode"
,
htbacxVO
.
getRgCode
());
map
.
put
(
"pageNumber"
,
htbacxVO
.
getPageNumber
());
map
.
put
(
"pageSize"
,
htbacxVO
.
getPageSize
());
map
.
put
(
"orgCode"
,
htbacxVO
.
getOrgCode
());
map
.
put
(
"sysCode"
,
htbacxVO
.
getSysCode
());
map
.
put
(
"contractTypeCode"
,
htbacxVO
.
getContractTypeCode
());
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
set
(
"Authority"
,
"d2ViLDM2MDAsNitVTWhRYmtZV21kV090OUlPZ0tkcz"
);
// 发送请求
HttpEntity
<
HashMap
<
String
,
Object
>>
request
=
new
HttpEntity
<>(
map
,
headers
);
return
restTemplate
.
exchange
(
url
,
HttpMethod
.
POST
,
request
,
String
.
class
);
}
}
src/main/java/com/mth/requestsecret/controller/RequestController.java
View file @
1a73d83d
This diff is collapsed.
Click to expand it.
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