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
f340d06b
Commit
f340d06b
authored
Jun 26, 2023
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加通用表单提交远程接口
parent
68fe9817
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
1 deletion
+47
-1
FeignConfiguration.java
...eejoin/amos/boot/biz/common/feign/FeignConfiguration.java
+16
-0
IdxFeignService.java
...n/amos/boot/module/tzs/flc/api/feign/IdxFeignService.java
+31
-1
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/feign/FeignConfiguration.java
View file @
f340d06b
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
feign
;
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
feign
;
import
org.springframework.boot.autoconfigure.http.HttpMessageConverters
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
feign.codec.Encoder
;
import
feign.form.spring.SpringFormEncoder
;
import
org.springframework.beans.factory.ObjectFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cloud.openfeign.support.SpringEncoder
;
/**
/**
* @author DELL
* @author DELL
*/
*/
...
@@ -18,4 +25,13 @@ public class FeignConfiguration {
...
@@ -18,4 +25,13 @@ public class FeignConfiguration {
return
new
FeignAuthRequestInterceptor
();
return
new
FeignAuthRequestInterceptor
();
}
}
@Autowired
private
ObjectFactory
<
HttpMessageConverters
>
messageConverters
;
@Bean
public
Encoder
feignFormEncoder
()
{
return
new
SpringFormEncoder
(
new
SpringEncoder
(
messageConverters
));
}
}
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/feign/IdxFeignService.java
View file @
f340d06b
...
@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.feign;
...
@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.feign;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.feign.FeignConfiguration
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -10,7 +12,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
...
@@ -10,7 +12,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
@FeignClient
(
value
=
"AMOS-IDX"
,
path
=
"idx"
)
@FeignClient
(
value
=
"AMOS-IDX"
,
path
=
"idx"
,
configuration
=
{
FeignConfiguration
.
class
}
)
public
interface
IdxFeignService
{
public
interface
IdxFeignService
{
@RequestMapping
(
"/dimensionTable/getTreeChildIds"
)
@RequestMapping
(
"/dimensionTable/getTreeChildIds"
)
...
@@ -35,4 +37,32 @@ public interface IdxFeignService {
...
@@ -35,4 +37,32 @@ public interface IdxFeignService {
*/
*/
@RequestMapping
(
value
=
"/report/form/getFormRecordById"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/report/form/getFormRecordById"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Map
<
String
,
Map
<
String
,
Object
>>>
getFormRecordById
(
@RequestParam
Map
map
);
ResponseModel
<
Map
<
String
,
Map
<
String
,
Object
>>>
getFormRecordById
(
@RequestParam
Map
map
);
/**
*更新任务
*/
@RequestMapping
(
value
=
"/report/form/updateAmosTask/{taskId}"
,
method
=
RequestMethod
.
POST
)
FeignClientResult
<
JSONObject
>
updateAmosTask
(
@PathVariable
(
"taskId"
)
String
taskId
,
@RequestBody
JSONObject
object
);
/**
*查询任务第一个填报单
*/
@RequestMapping
(
value
=
"/report/form/getFirstFormByTaskId/{taskId}"
,
method
=
RequestMethod
.
GET
)
FeignClientResult
<
JSONObject
>
getFirstTask
(
@PathVariable
(
"taskId"
)
String
taskId
);
/**
*通用表单提交 数据填报
*/
@RequestMapping
(
value
=
"/table/submit"
,
method
=
RequestMethod
.
POST
)
FeignClientResult
<
String
>
submit
(
@RequestParam
(
value
=
"pageId"
)
long
pageId
,
@RequestParam
(
value
=
"taskId"
,
required
=
false
)
String
taskId
,
@RequestParam
(
value
=
"planInstanceId"
,
required
=
false
)
String
planInstanceId
,
@RequestParam
(
value
=
"topic"
,
required
=
false
)
String
topic
,
@RequestParam
(
value
=
"tableName"
,
required
=
false
)
String
tableName
,
@RequestBody
Map
<
String
,
Object
>
kv
)
throws
Exception
;
}
}
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