Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
7ed1995d
Commit
7ed1995d
authored
Aug 05, 2022
by
查济
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-zhaji' into 'develop'
Feature zhaji See merge request fangxinjiang/yifu!134
parents
f157cd4d
77d21f57
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
2 deletions
+61
-2
EKPUtil.java
.../com/yifu/cloud/plus/v1/yifu/insurances/util/EKPUtil.java
+59
-0
TInsuranceDetailMapper.xml
...-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
+2
-2
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/EKPUtil.java
0 → 100644
View file @
7ed1995d
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
util
;
import
org.springframework.core.io.FileSystemResource
;
import
org.springframework.http.*
;
import
org.springframework.util.LinkedMultiValueMap
;
import
org.springframework.util.MultiValueMap
;
import
org.springframework.web.client.RestTemplate
;
import
java.io.File
;
/**
* @author zhaji
* @description EKP交互工具类
*
* @date 2022-08-05 09:42:33
*/
public
class
EKPUtil
{
/**
* 多层级的VO对象,且包含上传功能的样例
* 注意key的书写格式,类似EL表达式的方式,属性关系用'.', 列表和数组关系用[],Map关系用["xxx"]
*/
public
static
void
testAddNewsInRestTemplate
()
throws
Exception
{
RestTemplate
yourRestTemplate
=
new
RestTemplate
();
//指向EKP的接口url
String
url
=
"http://119.96.227.251:8080/api/sys-modeling/appModelRestService/addModel"
;
//把ModelingAppModelParameterAddForm转换成MultiValueMap
MultiValueMap
<
String
,
Object
>
wholeForm
=
new
LinkedMultiValueMap
<>();
wholeForm
.
add
(
"docSubject"
,
new
String
(
"接口发起流程"
.
getBytes
(
"UTF-8"
),
"ISO-8859-1"
)
);
wholeForm
.
add
(
"docCreator"
,
"{\"PersonNo\":\"00013\"}"
);
wholeForm
.
add
(
"docStatus"
,
20
);
wholeForm
.
add
(
"fdModelId"
,
"169b437e7e1cd1bd7b6367c4563b24ef"
);
wholeForm
.
add
(
"fdFlowId"
,
"178255fbdeda940cbd17bdd476398084"
);
wholeForm
.
add
(
"formValues"
,
new
String
(
"{\"fd_37310fdc84a55e\":\"王五\", \"fd_37310fe0aa2334\":\"2019-03-26\", \"fd_37310fde1759a4\":\"这里内容\"}"
.
getBytes
(
"UTF-8"
),
"ISO-8859-1"
)
);
LinkedMultiValueMap
<
String
,
Object
>
innerMap
=
new
LinkedMultiValueMap
<>();
//注意附件列表的key是一样的
//第一个附件
wholeForm
.
add
(
"attachmentForms[0].fdKey"
,
"fd_3731bf4852e8fe"
);
wholeForm
.
add
(
"attachmentForms[0].fdFileName"
,
new
String
(
"测试文档.txt"
.
getBytes
(
"UTF-8"
),
"ISO-8859-1"
));
wholeForm
.
add
(
"attachmentForms[0].fdAttachment"
,
new
FileSystemResource
(
new
File
(
"E:/测试文档.txt"
)));
HttpHeaders
headers
=
new
HttpHeaders
();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
headers
.
setContentType
(
MediaType
.
MULTIPART_FORM_DATA
);
//必须设置上传类型,如果入参是字符串,使用MediaType.TEXT_PLAIN;如果
HttpEntity
<
MultiValueMap
<
String
,
Object
>>
entity
=
new
HttpEntity
<
MultiValueMap
<
String
,
Object
>>(
wholeForm
,
headers
);
//有返回值的情况 VO可以替换成具体的JavaBean
ResponseEntity
<
String
>
obj
=
yourRestTemplate
.
exchange
(
url
,
HttpMethod
.
POST
,
entity
,
String
.
class
);
String
body
=
obj
.
getBody
();
System
.
out
.
println
(
body
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
View file @
7ed1995d
...
@@ -340,7 +340,7 @@
...
@@ -340,7 +340,7 @@
<if
test=
"param.createEndTime != null and param.createEndTime.trim() != ''"
>
<if
test=
"param.createEndTime != null and param.createEndTime.trim() != ''"
>
AND detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.createEndTime}, ' 23:59:59')
AND detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.createEndTime}, ' 23:59:59')
</if>
</if>
ORDER BY detail.CREATE_TIME
,detail.ID DE
SC
ORDER BY detail.CREATE_TIME
DESC ,detail.ID A
SC
</select>
</select>
<!-- 已投保列表不分页查询-->
<!-- 已投保列表不分页查询-->
<select
id=
"getInsuredList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo"
>
<select
id=
"getInsuredList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo"
>
...
@@ -473,7 +473,7 @@
...
@@ -473,7 +473,7 @@
(detail.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59'))
(detail.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59'))
)
)
</if>
</if>
ORDER BY refund.CREATE_TIME
,detail.ID DE
SC
ORDER BY refund.CREATE_TIME
DESC,detail.ID A
SC
</select>
</select>
<!-- 已减员列表不分页查询-->
<!-- 已减员列表不分页查询-->
<select
id=
"getInsuranceRefundList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundListVo"
>
<select
id=
"getInsuranceRefundList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundListVo"
>
...
...
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