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
cd42008d
Commit
cd42008d
authored
Nov 26, 2024
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目订单附件上传优化-fxj
parent
2f9b1c11
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
10 deletions
+9
-10
EkpOrderProperties.java
...ifu/cloud/plus/v1/yifu/ekp/config/EkpOrderProperties.java
+4
-0
EkpOrderUtil.java
...va/com/yifu/cloud/plus/v1/yifu/ekp/util/EkpOrderUtil.java
+4
-4
ekpOrderConfig-test.properties
...mon-ekp/src/main/resources/ekpOrderConfig-test.properties
+1
-1
TOrderServiceImpl.java
...ud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
+0
-5
No files found.
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/config/EkpOrderProperties.java
View file @
cd42008d
...
...
@@ -20,6 +20,10 @@ public class EkpOrderProperties {
* 接口url
*/
String
url
;
/**
* 接口url
*/
String
url2
;
/**
* 订单modelId
...
...
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/util/EkpOrderUtil.java
View file @
cd42008d
...
...
@@ -160,7 +160,7 @@ public class EkpOrderUtil {
try
{
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
MultiValueMap
<
String
,
Object
>
wholeForm
=
new
LinkedMultiValueMap
<>();
/*
MultiValueMap<String,Object> wholeForm = new LinkedMultiValueMap<>();
wholeForm.add("orderNo", orderNo);
wholeForm.add("attIds", attIds);
wholeForm.add("fileFlag", CommonConstants.ZERO_STRING);
...
...
@@ -170,16 +170,16 @@ public class EkpOrderUtil {
wholeForm.add("docStatus", ekpProperties.getDocStatus());
wholeForm.add("fdModelId", ekpProperties.getReplyFdModelId());
wholeForm.add("fdFlowId", ekpProperties.getReplyFdFlowId());
wholeForm
.
add
(
"formValues"
,
formValues
);
wholeForm.add("formValues", formValues);
*/
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
);
HttpEntity
<
MultiValueMap
<
String
,
Object
>>
entity
=
new
HttpEntity
<
MultiValueMap
<
String
,
Object
>>(
null
,
headers
);
//有返回值的情况 VO可以替换成具体的JavaBean
log
.
error
(
"附件同步结果"
+
ekpProperties
.
getUrl
());
ResponseEntity
<
String
>
obj
=
yourRestTemplate
.
exchange
(
ekpProperties
.
getUrl
()
,
HttpMethod
.
POST
,
entity
,
String
.
class
);
ResponseEntity
<
String
>
obj
=
yourRestTemplate
.
exchange
(
ekpProperties
.
getUrl
2
()+
"?addIds="
+
attIds
+
"&orderNo="
+
orderNo
,
HttpMethod
.
POST
,
entity
,
String
.
class
);
log
.
error
(
"附件同步结果:"
+
JSONObject
.
toJSONString
(
obj
));
String
body
=
obj
.
getBody
();
if
(
StringUtils
.
isBlank
(
body
)){
...
...
yifu-common/yifu-common-ekp/src/main/resources/ekpOrderConfig-test.properties
View file @
cd42008d
#ekporder.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
ekporder.url
=
http://36.7.147.29:27007/api/sys-modeling/appModelRestService/addModel
ekporder.url2
=
http://36.7.147.29:27007/api/hro/modelingWebservice/updateOrderFileInfo
ekporder.orderFdModelId
=
182f1b7ffe2e96f975564e44e559847d
ekporder.orderFdFlowId
=
182f1c098ce991ca96bc927408792beb
ekporder.replyFdModelId
=
182f1bb35bb2156fb9a02904bc88dd8a
...
...
@@ -9,6 +10,5 @@ ekporder.docStatus=20
ekporder.LoginName
=
admin
ekporder.orderDocSubject
=
\u7528\u
4E8E
\u9879\u
76EE
\u
8BA2
\u5355\u
66F4
\u
65B0
\u
63A5
\u
53E3
ekporder.replyDocSubject
=
\u7528\u
4E8E
\u
8BA2
\u5355\u
56DE
\u
590D
\u
63A5
\u
53E3
ekporder.updateOrderFile
=
\u
540C
\u
6B65
\u9644\u
4EF6
\u
4FE1
\u
606F
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
View file @
cd42008d
...
...
@@ -548,11 +548,6 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
order
.
setDeptId
(
settleDomain
.
getId
());
}
boolean
save
=
this
.
save
(
order
);
//异步处理附件信息同步 fxj 2024-11-22 17:46
log
.
error
(
"I AM HERE 1"
);
if
(
Common
.
isNotNull
(
vo
.
getAttIds
())){
this
.
syncFileFromEkp
(
order
.
getOrderNo
(),
vo
.
getAttIds
());
}
//处理指派人
if
(
save
&&
CollectionUtils
.
isNotEmpty
(
vo
.
getHandleUserList
())){
List
<
TOrderHandler
>
list
=
new
ArrayList
<>();
...
...
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