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
89715d2e
Commit
89715d2e
authored
Jun 27, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.5.5' into MVP1.5.5
parents
9de6c97b
cf0aae1b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
13 deletions
+34
-13
EkpOrderController.java
...oud/plus/v1/yifu/order/controller/EkpOrderController.java
+1
-1
TOrderService.java
.../yifu/cloud/plus/v1/yifu/order/service/TOrderService.java
+5
-1
TOrderServiceImpl.java
...ud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
+23
-10
EkpOrderFileTask.java
.../yifu/cloud/plus/v1/yifu/order/util/EkpOrderFileTask.java
+5
-1
No files found.
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/controller/EkpOrderController.java
View file @
89715d2e
...
...
@@ -52,7 +52,7 @@ public class EkpOrderController {
@Schema
(
description
=
"接收处理ekp订单"
)
@PostMapping
(
value
=
"/receiveOrder"
)
public
R
receiveOrder
(
OrderAddVO
vo
)
throws
IOException
{
return
tOrderService
.
receiveOrder
(
vo
);
return
tOrderService
.
receiveOrder
(
vo
,
ekpOrderFileTask
);
}
...
...
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/TOrderService.java
View file @
89715d2e
...
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.order.entity.TOrder
;
import
com.yifu.cloud.plus.v1.yifu.order.util.EkpOrderFileTask
;
import
com.yifu.cloud.plus.v1.yifu.order.vo.*
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
@@ -95,10 +96,11 @@ public interface TOrderService extends IService<TOrder> {
*
* @author licancan
* @param vo
* @param ekpOrderFileTask
* @return {@link R}
* @throws IOException
*/
R
receiveOrder
(
OrderAddVO
vo
)
throws
IOException
;
R
receiveOrder
(
OrderAddVO
vo
,
EkpOrderFileTask
ekpOrderFileTask
)
throws
IOException
;
/**
* 接收处理ekp订单回复
...
...
@@ -118,6 +120,8 @@ public interface TOrderService extends IService<TOrder> {
*/
void
receiveOrderNew
(
InputStream
inputStream
,
String
file1
,
String
orderNo
,
String
fileName
,
String
originalFileName
)
throws
IOException
;
void
receiveOrderFileAsc
(
InputStream
inputStream
,
String
orderNo
,
String
fileName
,
String
originalFileName
);
/**
* 订单作废
*
...
...
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
View file @
89715d2e
...
...
@@ -31,6 +31,7 @@ import com.yifu.cloud.plus.v1.yifu.order.service.TOrderEnclosureService;
import
com.yifu.cloud.plus.v1.yifu.order.service.TOrderHandlerService
;
import
com.yifu.cloud.plus.v1.yifu.order.service.TOrderReplyService
;
import
com.yifu.cloud.plus.v1.yifu.order.service.TOrderService
;
import
com.yifu.cloud.plus.v1.yifu.order.util.EkpOrderFileTask
;
import
com.yifu.cloud.plus.v1.yifu.order.util.ValidityUtil
;
import
com.yifu.cloud.plus.v1.yifu.order.vo.*
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -466,12 +467,13 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
*
* @author licancan
* @param vo
* @param ekpOrderFileTask
* @return {@link R}
* @throws IOException
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
R
receiveOrder
(
OrderAddVO
vo
)
throws
IOException
{
public
R
receiveOrder
(
OrderAddVO
vo
,
EkpOrderFileTask
ekpOrderFileTask
)
throws
IOException
{
if
(
Common
.
isEmpty
(
vo
.
getOrderNo
())){
return
R
.
failed
(
OrderConstants
.
ORDER_NO_IS_EMPTY
);
...
...
@@ -558,12 +560,10 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
getObjectR
(
multipartFile
.
getInputStream
(),
vo
.
getOrderNo
(),
fileName
,
multipartFile
.
getOriginalFilename
(),
CommonConstants
.
ZERO_INT
);
ekpOrderFileTask
.
receiveOrderFileAsc
(
multipartFile
.
getInputStream
(),
vo
.
getOrderNo
(),
fileName
,
multipartFile
.
getOriginalFilename
()
);
}
}
return
R
.
ok
(
OrderConstants
.
OPERATE_SUCCESS
);
}
...
...
@@ -657,14 +657,15 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
}
/**
*
@Author fxj
*
@Description 附件上传
* @
Date 9:38 2023/6/26
* @
Param
* @
retur
n
*
*/
*
接收处理ekp订单回复
*
* @
author licancan
* @
return {@link R}
* @
throws IOExceptio
n
*/
@Override
public
void
receiveOrderNew
(
InputStream
inputStream
,
String
file1
,
String
orderNo
,
String
fileName
,
String
originalFileName
){
R
<
Object
>
e
;
if
(
file1
.
equals
(
"fileOne"
))
{
getObjectR
(
inputStream
,
orderNo
,
fileName
,
originalFileName
,
CommonConstants
.
TWO_INTEGER
);
}
...
...
@@ -695,6 +696,18 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
getObjectR
(
inputStream
,
orderNo
,
fileName
,
originalFileName
,
CommonConstants
.
ELEVEN_INTEGER
);
}
}
/**
* 接收处理ekp订单回复
*
* @author licancan
* @return {@link R}
* @throws IOException
*/
@Override
public
void
receiveOrderFileAsc
(
InputStream
inputStream
,
String
orderNo
,
String
fileName
,
String
originalFileName
){
getObjectR
(
inputStream
,
orderNo
,
fileName
,
originalFileName
,
CommonConstants
.
ZERO_INT
);
}
private
R
<
Object
>
getObjectR
(
InputStream
inputStream
,
String
orderNo
,
String
fileName
,
String
originalFileName
,
Integer
enclosureflag
)
{
//filePath不传默认存储空间的根目录
...
...
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/util/EkpOrderFileTask.java
View file @
89715d2e
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
order
.
util
;
import
com.yifu.cloud.plus.v1.yifu.order.service.TOrderService
;
import
com.yifu.cloud.plus.v1.yifu.order.vo.OrderAttVo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
...
...
@@ -38,4 +37,9 @@ public class EkpOrderFileTask {
}
}
}
@Async
public
void
receiveOrderFileAsc
(
InputStream
inputStream
,
String
orderNo
,
String
fileName
,
String
originalFileName
){
orderService
.
receiveOrderFileAsc
(
inputStream
,
orderNo
,
fileName
,
originalFileName
);
}
}
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