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
db1ab3dd
Commit
db1ab3dd
authored
Nov 27, 2024
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
员工报账查询&批量导出&审核人导出最终版-fxj
parent
fad52f5c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
17 deletions
+12
-17
EkpOrderUtil.java
...va/com/yifu/cloud/plus/v1/yifu/ekp/util/EkpOrderUtil.java
+1
-2
TOrderService.java
.../yifu/cloud/plus/v1/yifu/order/service/TOrderService.java
+1
-1
TOrderServiceImpl.java
...ud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
+10
-14
No files found.
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/util/EkpOrderUtil.java
View file @
db1ab3dd
...
...
@@ -153,7 +153,6 @@ public class EkpOrderUtil {
* @Param
* @return
**/
@Async
public
String
syncFileFromEkp
(
String
orderNo
,
String
attIds
){
log
.
info
(
"同步项目订单附件信息"
);
RestTemplate
yourRestTemplate
=
new
RestTemplate
();
...
...
@@ -169,7 +168,7 @@ public class EkpOrderUtil {
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
)){
if
(
!
"推送成功"
.
equals
(
body
)){
log
.
error
(
EkpConstants
.
SEND_FAILED
);
return
EkpConstants
.
SEND_FAILED
;
}
else
{
...
...
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/TOrderService.java
View file @
db1ab3dd
...
...
@@ -122,7 +122,7 @@ public interface TOrderService extends IService<TOrder> {
void
receiveOrderFileAsc
(
InputStream
inputStream
,
String
orderNo
,
String
fileName
,
String
originalFileName
);
R
<
String
>
syncFileFromEkp
(
String
orderNo
,
String
attIds
);
R
<
String
>
syncFileFromEkp
(
String
orderNo
,
String
attIds
,
String
id
);
/**
* 订单作废
...
...
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
View file @
db1ab3dd
...
...
@@ -759,9 +759,9 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
* @Param
* @return
**/
@Async
@Override
public
R
<
String
>
syncFileFromEkp
(
String
orderNo
,
String
attIds
)
{
log
.
error
(
"I AM HERE 2"
);
public
R
<
String
>
syncFileFromEkp
(
String
orderNo
,
String
attIds
,
String
id
)
{
if
(
StringUtils
.
isEmpty
(
orderNo
)){
return
R
.
failed
(
OrderConstants
.
ORDER_NO_IS_EMPTY
);
}
...
...
@@ -769,9 +769,12 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
return
R
.
failed
(
OrderConstants
.
ENCLOSURE_ID_IS_EMPTY
);
}
String
res
=
ekpOrderUtil
.
syncFileFromEkp
(
orderNo
,
attIds
);
if
(
Common
.
isNotNull
(
res
)){
log
.
error
(
"I AM HERE 1"
+
res
);
return
R
.
failed
(
res
);
if
(!
Common
.
isNotNull
(
res
)){
// 记录到数据库 失败的部分可在前端列表重试
this
.
saveFileSyncLog
(
orderNo
,
attIds
,
null
,
id
);
}
else
{
// 记录到数据库 失败的部分可在前端列表重试
this
.
saveFileSyncLog
(
orderNo
,
attIds
,
res
,
id
);
}
return
R
.
ok
(
OrderConstants
.
OPERATE_SUCCESS
);
}
...
...
@@ -815,14 +818,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(
Common
.
isEmpty
(
log
)){
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
R
<
String
>
res
=
syncFileFromEkp
(
log
.
getOrderNo
(),
log
.
getAttIds
());
if
(
Common
.
isNotNull
(
res
)
&&
CommonConstants
.
SUCCESS
.
intValue
()
==
res
.
getCode
()){
// 记录到数据库 失败的部分可在前端列表重试
this
.
saveFileSyncLog
(
log
.
getOrderNo
(),
log
.
getAttIds
(),
null
,
id
);
}
else
{
// 记录到数据库 失败的部分可在前端列表重试
this
.
saveFileSyncLog
(
log
.
getOrderNo
(),
log
.
getAttIds
(),
res
.
getMsg
(),
id
);
}
return
res
;
syncFileFromEkp
(
log
.
getOrderNo
(),
log
.
getAttIds
(),
id
);
return
R
.
ok
();
}
}
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