Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-api-boot-master
Commits
a301bb57
Commit
a301bb57
authored
Aug 29, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'inquiry-zhengyi'
parents
e18e4476
0f61b1e6
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
96 additions
and
6 deletions
+96
-6
ErrorCodeConstants.java
.../iocoder/yudao/module/order/enums/ErrorCodeConstants.java
+6
-0
OrderBusinessServiceImpl.java
...le/order/service/order/impl/OrderBusinessServiceImpl.java
+10
-1
OrderExceptionServiceImpl.java
...der/service/orderException/OrderExceptionServiceImpl.java
+61
-5
messages.properties
yudao-server/src/main/resources/i18n/messages.properties
+6
-0
messages_en.properties
yudao-server/src/main/resources/i18n/messages_en.properties
+7
-0
messages_zh.properties
yudao-server/src/main/resources/i18n/messages_zh.properties
+6
-0
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/enums/ErrorCodeConstants.java
View file @
a301bb57
...
...
@@ -394,4 +394,10 @@ public interface ErrorCodeConstants {
ErrorCode
ORDER_IS_PRE_INSTALLED
=
new
ErrorCode
(
1004001153
,
"order.is.pre.installed"
);
ErrorCode
ORDER_IS_NOT_PRE_INSTALLED
=
new
ErrorCode
(
1004001154
,
"order.is.not.pre.installed"
);
ErrorCode
ORDER_ITEM_CHARGING_NOT_NULL
=
new
ErrorCode
(
1004001155
,
"order.item.charging.not.null"
);
ErrorCode
ORDER_ITEM_IS_PAY_ADVANCE_NOT_NULL
=
new
ErrorCode
(
1004001156
,
"order.item.is.pay.advance.not.null"
);
ErrorCode
FREIGHT_CURRENCY_NOT_NULL
=
new
ErrorCode
(
1004001157
,
"order.item.freight.currency.not.null"
);
ErrorCode
FREIGHT_UNIT_NOT_NULL
=
new
ErrorCode
(
1004001158
,
"order.item.freight.unit.not.null"
);
ErrorCode
CLEARANCE_CURRENCY_NOT_NULL
=
new
ErrorCode
(
1004001159
,
"order.item.clearance.currency.not.null"
);
ErrorCode
CLEARANCE_UNIT_NOT_NULL
=
new
ErrorCode
(
1004001160
,
"order.item.clearance.unit.not.null"
);
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderBusinessServiceImpl.java
View file @
a301bb57
...
...
@@ -542,6 +542,15 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
continue
;
}
}
if
(
type
==
12
)
{
// 单询异常的参数单独处理, 以传参为准
it
.
setCharging
(
channelPriceParam
.
getCharging
());
it
.
setIsPayAdvance
(
channelPriceParam
.
getIsPayAdvance
());
it
.
setSeaFreightCurrency
(
channelPriceParam
.
getFreightCurrencyId
());
it
.
setSeaFreightVolume
(
channelPriceParam
.
getFreightUnitId
());
it
.
setClearanceFreightCurrency
(
channelPriceParam
.
getClearanceCurrencyId
());
it
.
setClearanceFreightVolume
(
channelPriceParam
.
getClearanceUnitId
());
}
if
(
it
.
getSeaFreightCurrency
()
==
0
||
it
.
getSeaFreightVolume
()
==
0L
)
{
throw
exception
(
ORDER_NO_QUOTE_NOT_CUSTOM_PRICE
);
}
...
...
@@ -2694,7 +2703,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
}
}
}
if
((
type
==
6
||
type
==
10
)
&&
isPayAdvanceException
)
{
if
((
type
==
6
||
type
==
10
||
(
orderDO
.
getStatus
()
==
5
&&
type
==
12
)
)
&&
isPayAdvanceException
)
{
// TODO 待确定,订单之前处理过预付异常,这时入仓修改产生的新预付异常是否重复生成
List
<
OrderExceptionDO
>
orderExceptionDOList
=
orderExceptionService
.
getOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey
(
orderDO
.
getOrderId
(),
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderException/OrderExceptionServiceImpl.java
View file @
a301bb57
...
...
@@ -1005,11 +1005,53 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
if
(
Objects
.
isNull
(
channelPrice
.
getOrderItemId
()))
{
throw
exception
(
ORDER_ITEM_NOT_EXISTS
);
}
//得到以前的费用
OrderItemDO
orderItemDO
=
orderItemService
.
getOrderItem
(
channelPrice
.
getOrderItemId
());
if
(
Objects
.
isNull
(
orderItemDO
))
{
throw
exception
(
ORDER_ITEM_NOT_EXISTS
);
}
if
(
Objects
.
isNull
(
orderItemDO
.
getOneSeaFreight
())
||
orderItemDO
.
getOneSeaFreight
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
// TODO 当原商品未报价(运费值为0时)即可以自定义收费模式、货币单位、计量单位
if
(
Objects
.
isNull
(
channelPrice
.
getCharging
()))
{
throw
exception
(
ORDER_ITEM_CHARGING_NOT_NULL
);
}
orderItemDO
.
setCharging
(
channelPrice
.
getCharging
());
if
(
Objects
.
isNull
(
channelPrice
.
getIsPayAdvance
()))
{
throw
exception
(
ORDER_ITEM_IS_PAY_ADVANCE_NOT_NULL
);
}
orderItemDO
.
setIsPayAdvance
(
channelPrice
.
getIsPayAdvance
()
?
1
:
0
);
if
(
Objects
.
isNull
(
channelPrice
.
getIsPayAdvance
()))
{
throw
exception
(
ORDER_ITEM_IS_PAY_ADVANCE_NOT_NULL
);
}
if
(
Objects
.
isNull
(
channelPrice
.
getFreightCurrencyId
()))
{
throw
exception
(
FREIGHT_CURRENCY_NOT_NULL
);
}
orderItemDO
.
setSeaFreightCurrency
(
Math
.
toIntExact
(
channelPrice
.
getFreightCurrencyId
()));
if
(
Objects
.
isNull
(
channelPrice
.
getFreightUnitId
()))
{
throw
exception
(
FREIGHT_UNIT_NOT_NULL
);
}
orderItemDO
.
setSeaFreightVolume
(
channelPrice
.
getFreightUnitId
());
if
(
channelPrice
.
getCharging
()
==
0
)
{
if
(
Objects
.
isNull
(
channelPrice
.
getClearanceCurrencyId
()))
{
throw
exception
(
CLEARANCE_CURRENCY_NOT_NULL
);
}
orderItemDO
.
setClearanceFreightCurrency
(
Math
.
toIntExact
(
channelPrice
.
getClearanceCurrencyId
()));
if
(
Objects
.
isNull
(
channelPrice
.
getClearanceUnitId
()))
{
throw
exception
(
CLEARANCE_UNIT_NOT_NULL
);
}
orderItemDO
.
setClearanceFreightVolume
(
channelPrice
.
getClearanceUnitId
());
}
}
else
{
// TODO 如果原订单商品价格非未报价,则不采用前端传值的货币单位、计量单位、收费方式、是否预付等参数,以原有参数为准
channelPrice
.
setCharging
(
orderItemDO
.
getCharging
());
channelPrice
.
setIsPayAdvance
(
Objects
.
nonNull
(
orderItemDO
.
getIsPayAdvance
())
&&
orderItemDO
.
getIsPayAdvance
()
==
1
);
channelPrice
.
setFreightCurrencyId
(
Long
.
valueOf
(
orderItemDO
.
getSeaFreightCurrency
()));
channelPrice
.
setFreightUnitId
(
orderItemDO
.
getSeaFreightVolume
());
channelPrice
.
setClearanceCurrencyId
(
Long
.
valueOf
(
orderItemDO
.
getClearanceFreightCurrency
()));
channelPrice
.
setClearanceUnitId
(
orderItemDO
.
getClearanceFreightVolume
());
}
if
(
orderItemDO
.
getCharging
()
==
0
)
{
// 运费+清关费,两者都为0则不是自定义价格
if
(
channelPrice
.
getFreightFee
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
&&
channelPrice
.
getClearanceFee
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
...
...
@@ -1021,21 +1063,33 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
continue
;
}
}
channelPrice
.
setExceptionId
(
vo
.
getOrderExceptionId
());
channelPrice
.
setExceptionResultId
(
orderExceptionResult
.
getId
());
orderExceptionChannelPriceService
.
createExceptionChannelPrice
(
channelPrice
);
OrderChangePriceParam
priceParam
=
new
OrderChangePriceParam
();
BeanUtil
.
copyProperties
(
channelPrice
,
priceParam
);
priceParam
.
setFreightCurrencyId
(
orderItemDO
.
getSeaFreightCurrency
());
priceParam
.
setClearanceCurrencyId
(
orderItemDO
.
getClearanceFreightCurrency
());
inquiryPriceParams
.
add
(
priceParam
);
if
(
orderItemDO
.
getOneSeaFreight
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
ApplyInfoVO
applyInfo
=
new
ApplyInfoVO
();
applyInfo
.
setName
(
orderItemDO
.
getProdTitleZh
()
+
"计费方式"
);
applyInfo
.
setNewValue
(
channelPrice
.
getCharging
()
==
1
?
"全包价"
:
"运费+清关费"
);
applyInfoVOList
.
add
(
applyInfo
);
applyInfo
=
new
ApplyInfoVO
();
applyInfo
.
setName
(
orderItemDO
.
getProdTitleZh
()
+
"是否预付"
);
applyInfo
.
setNewValue
(
channelPrice
.
getIsPayAdvance
()
?
"是"
:
"否"
);
applyInfoVOList
.
add
(
applyInfo
);
}
ApplyInfoVO
applyInfoVO
=
new
ApplyInfoVO
();
applyInfoVO
.
setName
(
orderItemDO
.
getProdTitleZh
()
+
(
channelPrice
.
getCharging
()
==
1
?
"全包价"
:
"运费"
));
String
freightCurrency
=
(
null
==
allCurrency
.
get
(
orderItemDO
.
getSeaFreightCurrency
())
?
""
:
allCurrency
.
get
(
orderItemDO
.
getSeaFreightCurrency
()).
getFuhao
());
String
freightUnit
=
(
null
==
allUnit
.
get
(
orderItemDO
.
getSeaFreightVolume
().
intValue
())
?
""
:
allUnit
.
get
(
orderItemDO
.
getSeaFreightVolume
().
intValue
()).
getFuhao
());
if
(
orderItemDO
.
getOneSeaFreight
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
applyInfoVO
.
setOrgValue
(
orderItemDO
.
getOneSeaFreight
()
+
freightCurrency
+
"/"
+
freightUnit
);
}
applyInfoVO
.
setNewValue
(
channelPrice
.
getFreightFee
()
+
freightCurrency
+
"/"
+
freightUnit
);
applyInfoVOList
.
add
(
applyInfoVO
);
...
...
@@ -1044,7 +1098,9 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
applyInfoVO
.
setName
(
orderItemDO
.
getProdTitleZh
()
+
"清关费"
);
String
clearanceCurrency
=
(
null
==
allCurrency
.
get
(
orderItemDO
.
getClearanceFreightCurrency
())
?
""
:
allCurrency
.
get
(
orderItemDO
.
getClearanceFreightCurrency
()).
getFuhao
());
String
clearanceUnit
=
(
null
==
allUnit
.
get
(
orderItemDO
.
getClearanceFreightVolume
().
intValue
())
?
""
:
allUnit
.
get
(
orderItemDO
.
getClearanceFreightVolume
().
intValue
()).
getFuhao
());
if
(
orderItemDO
.
getOneClearanceFreight
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
applyInfoVO
.
setOrgValue
(
orderItemDO
.
getOneClearanceFreight
()
+
clearanceCurrency
+
"/"
+
clearanceUnit
);
}
applyInfoVO
.
setNewValue
((
null
==
channelPrice
.
getClearanceFee
()
?
""
:
channelPrice
.
getClearanceFee
())
+
clearanceCurrency
+
"/"
+
clearanceUnit
);
applyInfoVOList
.
add
(
applyInfoVO
);
}
...
...
yudao-server/src/main/resources/i18n/messages.properties
View file @
a301bb57
...
...
@@ -262,3 +262,9 @@ order.already.in.merge.pkg=
customer.is.new.or.old.no.change
=
order.is.pre.installed
=
order.is.not.pre.installed
=
order.item.charging.not.null
=
order.item.is.pay.advance.not.null
=
order.item.freight.currency.not.null
=
order.item.freight.unit.not.null
=
order.item.clearance.currency.not.null
=
order.item.clearance.unit.not.null
=
\ No newline at end of file
yudao-server/src/main/resources/i18n/messages_en.properties
View file @
a301bb57
...
...
@@ -999,3 +999,10 @@ customer.is.new.or.old.no.change=customer current business type is {}, it's no c
order.is.pre.installed
=
Order pre installed
customer.delay.approval.times.more.then.one
=
delay approval times more then one
order.is.not.pre.installed
=
Order not pre installed, unable to package together
order.item.charging.not.null
=
The billing method for order products cannot be empty
order.item.is.pay.advance.not.null
=
Whether the ordered goods have been prepaid cannot be left blank
order.item.freight.currency.not.null
=
The currency unit for the shipping cost of the order item cannot be empty
order.item.freight.unit.not.null
=
The unit of measurement for shipping fees for order items cannot be empty
order.item.clearance.currency.not.null
=
Customs clearance fee for order goods, currency unit cannot be empty
order.item.clearance.unit.not.null
=
The unit of measurement for customs clearance fees for order goods cannot be empty
yudao-server/src/main/resources/i18n/messages_zh.properties
View file @
a301bb57
...
...
@@ -1002,3 +1002,9 @@ order.already.in.merge.pkg=\u8BA2\u5355\u5DF2\u5728\u5408\u5305\u7BB1\u4E0B
customer.is.new.or.old.no.change
=
\u
5BA2
\u6237\u
5F53
\u
524D
\u
4E1A
\u
7EE9
\u
7C7B
\u
578B
\u
662F{}
\u
5BA2
\u6237\u
FF0C
\u
4E0D
\u9700\u8981\u
66F4
\u
65B0
order.is.pre.installed
=
\u
8BA2
\u5355\u
5DF2
\u9884\u
88C5
order.is.not.pre.installed
=
\u
8ba2
\u5355\u
672a
\u9884\u
88c5
\u
ff0c
\u
4e0d
\u
80fd
\u5408\u5305
order.item.charging.not.null
=
\u
8ba2
\u5355\u5546\u
54c1
\u
8ba1
\u
8d39
\u
65b9
\u
5f0f
\u
4e0d
\u
80fd
\u
4e3a
\u
7a7a
order.item.is.pay.advance.not.null
=
\u
8ba2
\u5355\u5546\u
54c1
\u
662f
\u5426\u9884\u
4ed8
\u
4e0d
\u
80fd
\u
4e3a
\u
7a7a
order.item.freight.currency.not.null
=
\u
8ba2
\u5355\u5546\u
54c1
\u
8fd0
\u
8d39
\u
8d27
\u
5e01
\u5355\u
4f4d
\u
4e0d
\u
80fd
\u
4e3a
\u
7a7a
order.item.freight.unit.not.null
=
\u
8ba2
\u5355\u5546\u
54c1
\u
8fd0
\u
8d39
\u
8ba1
\u
91cf
\u5355\u
4f4d
\u
4e0d
\u
80fd
\u
4e3a
\u
7a7a
order.item.clearance.currency.not.null
=
\u
8ba2
\u5355\u5546\u
54c1
\u
6e05
\u5173\u
8d39
\u
8d27
\u
5e01
\u5355\u
4f4d
\u
4e0d
\u
80fd
\u
4e3a
\u
7a7a
order.item.clearance.unit.not.null
=
\u
8ba2
\u5355\u5546\u
54c1
\u
6e05
\u5173\u
8d39
\u
8ba1
\u
91cf
\u5355\u
4f4d
\u
4e0d
\u
80fd
\u
4e3a
\u
7a7a
\ No newline at end of file
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