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
2389a0b4
Commit
2389a0b4
authored
Nov 26, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.7.2' into MVP1.7.2
parents
17e10b01
fad52f5c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
26 deletions
+13
-26
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
-10
EkpOrderParam.java
...ava/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpOrderParam.java
+0
-9
ekpOrderConfig-test.properties
...mon-ekp/src/main/resources/ekpOrderConfig-test.properties
+1
-1
EkpOrderController.java
...oud/plus/v1/yifu/order/controller/EkpOrderController.java
+1
-1
TOrderServiceImpl.java
...ud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
+2
-4
logback-spring.xml
...rder/yifu-order-biz/src/main/resources/logback-spring.xml
+1
-1
No files found.
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/config/EkpOrderProperties.java
View file @
2389a0b4
...
...
@@ -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 @
2389a0b4
...
...
@@ -26,6 +26,7 @@ import org.springframework.web.multipart.MultipartFile;
import
java.io.File
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author licancan
...
...
@@ -156,23 +157,16 @@ public class EkpOrderUtil {
public
String
syncFileFromEkp
(
String
orderNo
,
String
attIds
){
log
.
info
(
"同步项目订单附件信息"
);
RestTemplate
yourRestTemplate
=
new
RestTemplate
();
String
formValues
=
"{}"
;
try
{
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
MultiValueMap
<
String
,
Object
>
wholeForm
=
new
LinkedMultiValueMap
<>();
wholeForm
.
add
(
"orderNo"
,
orderNo
);
wholeForm
.
add
(
"attIds"
,
attIds
);
wholeForm
.
add
(
"fileFlag"
,
CommonConstants
.
ZERO_STRING
);
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
<
M
ultiValueMap
<
String
,
Object
>>
entity
=
new
HttpEntity
<
MultiValueMap
<
String
,
Object
>>(
wholeForm
,
headers
);
HttpEntity
<
M
ap
<
String
,
Object
>>
entity
=
new
HttpEntity
<
Map
<
String
,
Object
>>(
null
,
headers
);
//有返回值的情况 VO可以替换成具体的JavaBean
ResponseEntity
<
String
>
obj
=
yourRestTemplate
.
exchange
(
ekpProperties
.
getUrl
(),
HttpMethod
.
POST
,
entity
,
String
.
class
);
log
.
error
(
"附件同步结果"
+
ekpProperties
.
getUrl
());
ResponseEntity
<
String
>
obj
=
yourRestTemplate
.
exchange
(
ekpProperties
.
getUrl2
()+
"?addIds="
+
attIds
+
"&orderNo="
+
orderNo
,
HttpMethod
.
POST
,
null
,
String
.
class
);
log
.
error
(
"附件同步结果:"
+
JSONObject
.
toJSONString
(
obj
));
String
body
=
obj
.
getBody
();
if
(
StringUtils
.
isBlank
(
body
)){
...
...
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpOrderParam.java
View file @
2389a0b4
...
...
@@ -21,14 +21,5 @@ public class EkpOrderParam implements Serializable {
**/
private
String
fd_3b0b02a34a0134
;
/**
* 附件IDS 目前用于项目订单附件同步
**/
private
String
attIds
;
/**
* 项目订单ID 与 附件attIds 配合使用
**/
private
String
orderNo
;
}
yifu-common/yifu-common-ekp/src/main/resources/ekpOrderConfig-test.properties
View file @
2389a0b4
#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/controller/EkpOrderController.java
View file @
2389a0b4
...
...
@@ -25,6 +25,7 @@ import org.springframework.web.multipart.MultipartFile;
import
org.springframework.web.multipart.commons.CommonsMultipartFile
;
import
javax.annotation.Resource
;
import
javax.json.Json
;
import
java.io.File
;
import
java.io.IOException
;
...
...
@@ -54,7 +55,6 @@ public class EkpOrderController {
@Schema
(
description
=
"接收处理ekp订单"
)
@PostMapping
(
value
=
"/receiveOrder"
)
public
R
receiveOrder
(
OrderAddVO
vo
)
throws
IOException
{
log
.
error
(
"#################################"
+
JSONObject
.
toJSONString
(
vo
));
return
tOrderService
.
receiveOrder
(
vo
,
ekpOrderFileTask
);
}
...
...
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
View file @
2389a0b4
...
...
@@ -548,10 +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
if
(
Common
.
isNotNull
(
vo
.
getAttIds
())){
this
.
syncFileFromEkp
(
order
.
getOrderNo
(),
vo
.
getAttIds
());
}
//处理指派人
if
(
save
&&
CollectionUtils
.
isNotEmpty
(
vo
.
getHandleUserList
())){
List
<
TOrderHandler
>
list
=
new
ArrayList
<>();
...
...
@@ -765,6 +761,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
**/
@Override
public
R
<
String
>
syncFileFromEkp
(
String
orderNo
,
String
attIds
)
{
log
.
error
(
"I AM HERE 2"
);
if
(
StringUtils
.
isEmpty
(
orderNo
)){
return
R
.
failed
(
OrderConstants
.
ORDER_NO_IS_EMPTY
);
}
...
...
@@ -773,6 +770,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
}
String
res
=
ekpOrderUtil
.
syncFileFromEkp
(
orderNo
,
attIds
);
if
(
Common
.
isNotNull
(
res
)){
log
.
error
(
"I AM HERE 1"
+
res
);
return
R
.
failed
(
res
);
}
return
R
.
ok
(
OrderConstants
.
OPERATE_SUCCESS
);
...
...
yifu-order/yifu-order-biz/src/main/resources/logback-spring.xml
View file @
2389a0b4
...
...
@@ -50,7 +50,7 @@
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root
level=
"
debug
"
>
<root
level=
"
error
"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
...
...
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