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
07091dfc
Commit
07091dfc
authored
Jun 14, 2023
by
wangzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature-wzb :bug修复
parent
02d4e005
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
389 additions
and
271 deletions
+389
-271
OrderAttVo.java
...java/com/yifu/cloud/plus/v1/yifu/order/vo/OrderAttVo.java
+35
-0
EkpOrderController.java
...oud/plus/v1/yifu/order/controller/EkpOrderController.java
+16
-0
TOrderService.java
.../yifu/cloud/plus/v1/yifu/order/service/TOrderService.java
+12
-0
TOrderServiceImpl.java
...ud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
+326
-271
No files found.
yifu-order/yifu-order-api/src/main/java/com/yifu/cloud/plus/v1/yifu/order/vo/OrderAttVo.java
0 → 100644
View file @
07091dfc
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
order
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.Serializable
;
@Data
public
class
OrderAttVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
6620652346415180825L
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 订标识
*/
@Schema
(
description
=
"唯一标识"
)
private
String
file1
;
/**
* 附件
*/
@Schema
(
description
=
"附件"
)
private
MultipartFile
[]
file
;
}
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/controller/EkpOrderController.java
View file @
07091dfc
...
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.order.controller;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.order.service.TOrderService
;
import
com.yifu.cloud.plus.v1.yifu.order.vo.OrderAddVO
;
import
com.yifu.cloud.plus.v1.yifu.order.vo.OrderAttVo
;
import
com.yifu.cloud.plus.v1.yifu.order.vo.OrderReplyAddVO
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
...
...
@@ -47,6 +48,21 @@ public class EkpOrderController {
return
tOrderService
.
receiveOrder
(
vo
);
}
/**
* 接收处理ekp
*
* @author licancan
* @param vo
* @return {@link R}
* @throws IOException
*/
@Schema
(
description
=
"接收处理ekp附件"
)
@PostMapping
(
value
=
"/receiveOrderNew"
)
public
R
receiveOrder
(
OrderAttVo
vo
)
throws
IOException
{
return
tOrderService
.
receiveOrderNew
(
vo
);
}
/**
* 接收处理ekp订单回复
*
...
...
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/TOrderService.java
View file @
07091dfc
...
...
@@ -99,6 +99,18 @@ public interface TOrderService extends IService<TOrder> {
*/
R
receiveOrder
(
OrderAddVO
vo
)
throws
IOException
;
/**
* 接收处理ekp附件
*
* @author licancan
* @param vo
* @return {@link R}
* @throws IOException
*/
R
receiveOrderNew
(
OrderAttVo
vo
)
throws
IOException
;
/**
* 接收处理ekp订单回复
*
...
...
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
View file @
07091dfc
...
...
@@ -573,8 +573,72 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
}
}
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getWageFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getWageFile
())
{
return
R
.
ok
(
OrderConstants
.
OPERATE_SUCCESS
);
}
/**
* 接收处理ekp订单回复
*
* @author licancan
* @param vo
* @return {@link R}
* @throws IOException
*/
@Override
public
R
receiveOrderReply
(
OrderReplyAddVO
vo
)
throws
IOException
{
if
(
Common
.
isEmpty
(
vo
.
getOrderNo
())){
return
R
.
failed
(
OrderConstants
.
ORDER_NO_IS_EMPTY
);
}
TOrder
one
=
this
.
getOne
(
Wrappers
.<
TOrder
>
query
().
lambda
()
.
eq
(
TOrder:
:
getOrderNo
,
vo
.
getOrderNo
())
.
eq
(
TOrder:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
one
).
isPresent
()){
return
R
.
failed
(
OrderConstants
.
ORDER_NO_NOT_EXIST
);
}
else
{
if
(
CommonConstants
.
TWO_INT
==
one
.
getOrderStatus
()){
return
R
.
failed
(
OrderConstants
.
ORDER_STATUS_IS_TWO
);
}
}
if
(
Common
.
isEmpty
(
vo
.
getCreateName
())){
return
R
.
failed
(
OrderConstants
.
REPLY_NAME_IS_EMPTY
);
}
if
(
Common
.
isEmpty
(
vo
.
getCreateTime
())){
return
R
.
failed
(
OrderConstants
.
REPLY_TIME_IS_EMPTY
);
}
if
(
Common
.
isEmpty
(
vo
.
getReplyContent
())
&&
ArrayUtils
.
isEmpty
(
vo
.
getFile
())){
return
R
.
failed
(
OrderConstants
.
REPLY_CONTENT_AND_ENCLOSURE_IS_EMPTY
);
}
// 校验回复内容2048字以内
if
(!
Common
.
isEmpty
(
vo
.
getReplyContent
())
&&
!
ValidityUtil
.
validate2048
(
vo
.
getReplyContent
())){
return
R
.
failed
(
OrderConstants
.
REPLY_CONTENT_MORE_THAN_2048
);
}
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
())){
if
(
vo
.
getFile
().
length
>
CommonConstants
.
TWENTY_INT
){
return
R
.
failed
(
OrderConstants
.
ENCLOSURE_SIZE_ERROR
);
}
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
if
(!
Common
.
checkInsuranceFile
(
multipartFile
.
getOriginalFilename
())){
return
R
.
failed
(
OrderConstants
.
ENCLOSURE_TYPE_IS_ERROR
);
}
if
(
multipartFile
.
getSize
()
>
(
CommonConstants
.
FIFTY_INT
*
CommonConstants
.
BYTE
*
CommonConstants
.
BYTE
)){
return
R
.
failed
(
OrderConstants
.
ENCLOSURE_SIZE_ERROR
);
}
}
}
TOrderReply
reply
=
new
TOrderReply
();
BeanUtils
.
copyProperties
(
vo
,
reply
);
reply
.
setReplyContent
(
Common
.
isEmpty
(
vo
.
getReplyContent
())?
null
:
vo
.
getReplyContent
());
reply
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
boolean
save
=
tOrderReplyService
.
save
(
reply
);
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
...
...
@@ -583,15 +647,15 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
order
.
getOrderNo
());
orderEnclosure
.
setOrderNo
(
reply
.
getId
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
TWO_INTEGER
);
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
ONE_INT
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
log
.
error
(
"订单
回复
接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
...
...
@@ -600,9 +664,45 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
}
}
}
return
R
.
ok
(
OrderConstants
.
OPERATE_SUCCESS
);
}
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getSalaryFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getWageFile
())
{
/**
* 接收处理ekp订单回复
*
* @author licancan
* @param vo
* @return {@link R}
* @throws IOException
*/
@Override
public
R
receiveOrderNew
(
OrderAttVo
vo
)
throws
IOException
{
if
(
Common
.
isEmpty
(
vo
.
getOrderNo
())){
return
R
.
failed
(
OrderConstants
.
ORDER_NO_IS_EMPTY
);
}
TOrder
one
=
this
.
getOne
(
Wrappers
.<
TOrder
>
query
().
lambda
()
.
eq
(
TOrder:
:
getOrderNo
,
vo
.
getOrderNo
())
.
eq
(
TOrder:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
())){
if
(
vo
.
getFile
().
length
>
CommonConstants
.
TWENTY_INT
){
return
R
.
failed
(
OrderConstants
.
ENCLOSURE_SIZE_ERROR
);
}
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
if
(!
Common
.
checkInsuranceFile
(
multipartFile
.
getOriginalFilename
())){
return
R
.
failed
(
OrderConstants
.
ENCLOSURE_TYPE_IS_ERROR
);
}
if
(
multipartFile
.
getSize
()
>
(
CommonConstants
.
FIFTY_INT
*
CommonConstants
.
BYTE
*
CommonConstants
.
BYTE
)){
return
R
.
failed
(
OrderConstants
.
ENCLOSURE_SIZE_ERROR
);
}
}
}
if
(
vo
.
getFile1
().
equals
(
"fileOne"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
...
...
@@ -611,9 +711,9 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
order
.
getOrderNo
());
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
THREE
_INTEGER
);
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
TWO
_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
...
...
@@ -628,9 +728,10 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
}
}
}
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getSocialFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getSocialFile
())
{
}
if
(
vo
.
getFile1
().
equals
(
"fileTwo"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
...
...
@@ -639,9 +740,9 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
order
.
getOrderNo
());
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
FOUR
_INTEGER
);
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
THREE
_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
...
...
@@ -656,8 +757,10 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
}
}
}
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getFundFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getFundFile
())
{
}
if
(
vo
.
getFile1
().
equals
(
"fileThree"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
...
...
@@ -666,9 +769,9 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
order
.
getOrderNo
());
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
FIVE
_INTEGER
);
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
FOUR
_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
...
...
@@ -683,8 +786,10 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
}
}
}
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getInsuranceFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getInsuranceFile
())
{
}
if
(
vo
.
getFile1
().
equals
(
"fileFour"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
...
...
@@ -693,9 +798,9 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
order
.
getOrderNo
());
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
SIX
_INTEGER
);
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
FIVE
_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
...
...
@@ -710,8 +815,10 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
}
}
}
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getWithHoldingFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getWithHoldingFile
())
{
}
if
(
vo
.
getFile1
().
equals
(
"fileFive"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
...
...
@@ -720,9 +827,9 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
order
.
getOrderNo
());
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
SEVEN
_INTEGER
);
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
SIX
_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
...
...
@@ -737,8 +844,9 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
}
}
}
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getCollectionFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getCollectionFile
())
{
}
if
(
vo
.
getFile1
().
equals
(
"fileSix"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
...
...
@@ -747,9 +855,9 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
order
.
getOrderNo
());
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
EIGHT
_INTEGER
);
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
SEVEN
_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
...
...
@@ -764,8 +872,10 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
}
}
}
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getNoTaxFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getNoTaxFile
())
{
}
if
(
vo
.
getFile1
().
equals
(
"fileSeven"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
...
...
@@ -774,9 +884,9 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
order
.
getOrderNo
());
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
NINE
_INTEGER
);
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
EIGHT
_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
...
...
@@ -791,8 +901,10 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
}
}
}
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getOtherFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getOtherFile
())
{
}
if
(
vo
.
getFile1
().
equals
(
"fileEigth"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
...
...
@@ -801,9 +913,9 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
order
.
getOrderNo
());
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
TEN
_INTEGER
);
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
NINE
_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
...
...
@@ -818,8 +930,10 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
}
}
}
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getSalaryHandoverFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getOtherFile
())
{
}
if
(
vo
.
getFile1
().
equals
(
"fileNine"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
...
...
@@ -828,9 +942,9 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
order
.
getOrderNo
());
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
ELEV
EN_INTEGER
);
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
T
EN_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
...
...
@@ -845,70 +959,9 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
}
}
}
return
R
.
ok
(
OrderConstants
.
OPERATE_SUCCESS
);
}
/**
* 接收处理ekp订单回复
*
* @author licancan
* @param vo
* @return {@link R}
* @throws IOException
*/
@Override
public
R
receiveOrderReply
(
OrderReplyAddVO
vo
)
throws
IOException
{
if
(
Common
.
isEmpty
(
vo
.
getOrderNo
())){
return
R
.
failed
(
OrderConstants
.
ORDER_NO_IS_EMPTY
);
}
TOrder
one
=
this
.
getOne
(
Wrappers
.<
TOrder
>
query
().
lambda
()
.
eq
(
TOrder:
:
getOrderNo
,
vo
.
getOrderNo
())
.
eq
(
TOrder:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
one
).
isPresent
()){
return
R
.
failed
(
OrderConstants
.
ORDER_NO_NOT_EXIST
);
}
else
{
if
(
CommonConstants
.
TWO_INT
==
one
.
getOrderStatus
()){
return
R
.
failed
(
OrderConstants
.
ORDER_STATUS_IS_TWO
);
}
}
if
(
Common
.
isEmpty
(
vo
.
getCreateName
())){
return
R
.
failed
(
OrderConstants
.
REPLY_NAME_IS_EMPTY
);
}
if
(
Common
.
isEmpty
(
vo
.
getCreateTime
())){
return
R
.
failed
(
OrderConstants
.
REPLY_TIME_IS_EMPTY
);
}
if
(
Common
.
isEmpty
(
vo
.
getReplyContent
())
&&
ArrayUtils
.
isEmpty
(
vo
.
getFile
())){
return
R
.
failed
(
OrderConstants
.
REPLY_CONTENT_AND_ENCLOSURE_IS_EMPTY
);
}
// 校验回复内容2048字以内
if
(!
Common
.
isEmpty
(
vo
.
getReplyContent
())
&&
!
ValidityUtil
.
validate2048
(
vo
.
getReplyContent
())){
return
R
.
failed
(
OrderConstants
.
REPLY_CONTENT_MORE_THAN_2048
);
}
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
())){
if
(
vo
.
getFile
().
length
>
CommonConstants
.
TWENTY_INT
){
return
R
.
failed
(
OrderConstants
.
ENCLOSURE_SIZE_ERROR
);
}
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
if
(!
Common
.
checkInsuranceFile
(
multipartFile
.
getOriginalFilename
())){
return
R
.
failed
(
OrderConstants
.
ENCLOSURE_TYPE_IS_ERROR
);
}
if
(
multipartFile
.
getSize
()
>
(
CommonConstants
.
FIFTY_INT
*
CommonConstants
.
BYTE
*
CommonConstants
.
BYTE
)){
return
R
.
failed
(
OrderConstants
.
ENCLOSURE_SIZE_ERROR
);
}
}
}
TOrderReply
reply
=
new
TOrderReply
();
BeanUtils
.
copyProperties
(
vo
,
reply
);
reply
.
setReplyContent
(
Common
.
isEmpty
(
vo
.
getReplyContent
())?
null
:
vo
.
getReplyContent
());
reply
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
boolean
save
=
tOrderReplyService
.
save
(
reply
);
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
())){
if
(
vo
.
getFile1
().
equals
(
"fileTen"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
...
...
@@ -918,15 +971,15 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
reply
.
getId
());
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
ON
E_INT
);
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
THRE
E_INT
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单回复
接收OSS文件上传接口异常:"
+
e
.
getMessage
());
log
.
error
(
"订单
接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
...
...
@@ -935,9 +988,11 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
}
}
}
return
R
.
ok
(
OrderConstants
.
OPERATE_SUCCESS
);
}
return
R
.
ok
(
OrderConstants
.
OPERATE_SUCCESS
);
}
public
R
invalidOrder
(
String
id
)
{
TOrder
one
=
baseMapper
.
selectById
(
id
);
if
(
Common
.
isNotNull
(
one
)
&&
CommonConstants
.
ZERO_INT
!=
one
.
getOrderStatus
())
{
...
...
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