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
ddf90261
Commit
ddf90261
authored
Nov 20, 2024
by
Smile
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:空运渠道设置免收泡重需求
parent
bd2f6a3d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
16 deletions
+46
-16
QueryChannelInfoEvent.java
...ao/framework/apollo/core/event/QueryChannelInfoEvent.java
+5
-0
OrderWarehouseInServiceImpl.java
...service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
+33
-16
ChannelDO.java
...r/yudao/module/sale/dal/dataobject/channel/ChannelDO.java
+5
-0
ChannelBaseVO.java
...n/iocoder/yudao/module/sale/vo/channel/ChannelBaseVO.java
+3
-0
No files found.
yudao-framework/yudao-spring-boot-starter-config/src/main/java/cn/iocoder/yudao/framework/apollo/core/event/QueryChannelInfoEvent.java
View file @
ddf90261
...
...
@@ -101,4 +101,9 @@ public class QueryChannelInfoEvent {
* 泡重比例
*/
private
BigDecimal
bubbleWeightRatio
;
/**
* 免泡重量
*/
private
BigDecimal
bubbleExemptWeight
;
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
View file @
ddf90261
...
...
@@ -1778,6 +1778,23 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
}
if
(
paoKg
.
compareTo
(
weightSum
)
>
0
)
{
//查找渠道免泡重量,当产生泡重<=渠道-免抛重量 , 订单不收泡重
QueryChannelInfoEvent
event
=
new
QueryChannelInfoEvent
();
if
(
Objects
.
nonNull
(
orderDO
.
getChannelId
())
&&
orderDO
.
getChannelId
()
>
0
)
{
event
.
setChannelId
(
orderDO
.
getChannelId
());
applicationContext
.
publishEvent
(
event
);
}
BigDecimal
bubbleExemptWeight
=
event
.
getBubbleExemptWeight
();
if
(
bubbleExemptWeight
!=
null
&&
paoKg
.
compareTo
(
bubbleExemptWeight
)<
0
){
List
<
ApplyInfoVO
>
infoVOList
=
new
ArrayList
<>();
ApplyInfoVO
infoVO
=
new
ApplyInfoVO
();
infoVO
.
setName
(
"空运渠道设置免收泡重"
);
infoVO
.
setNewValue
(
String
.
format
(
"订单实测重量%s KG,泡重%s KG,符合%s渠道%sKG免泡设置,免收泡重。"
,
weightSum
,
paoKg
,
event
.
getNameZh
(),
bubbleExemptWeight
));
infoVOList
.
add
(
infoVO
);
// 更新订单为普货
orderService
.
updateOrderType
(
orderId
,
1
);
orderBusinessService
.
addOrderOperateLog
(
orderId
,
"渠道设置免收泡重"
,
JSONObject
.
toJSONString
(
Collections
.
singletonList
(
infoVO
)));
}
else
{
// 泡货异常
String
descZh
=
String
.
format
(
"该订单是泡货订单, 泡货重量(总):%sKg"
,
paoKg
);
String
descEn
=
String
.
format
(
"It's heavy order, weight(sum):%s"
,
paoKg
);
...
...
@@ -1794,7 +1811,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
orderExceptionService
.
autoProcessException
(
orderId
,
null
,
OrderExceptionEnum
.
ORDER_BULKY_CARGO_EXCEPTION
,
String
.
format
(
"泡货收费重量%s与实测重量%s相差在%sKG内,系统自动设置为普货"
,
paoKg
,
weightSum
,
bubbleWeightFloatingThreshold
),
OrderExceptionResult
.
ORDER_BULKY_CARGO_EXCEPTION_RESULT
.
GENERAL_CARGO
);
}
}
}
else
{
// v2.0空运 当入仓备货/理货记录修改审批后,订单非泡货且当前存在泡货异常未处理,系统自动处理异常,处理结果为设置为普货,备注:订单入仓记录修改,订单非泡货,系统自动处理为已处理,操作人=admin
orderExceptionService
.
autoProcessException
(
orderId
,
null
,
OrderExceptionEnum
.
ORDER_BULKY_CARGO_EXCEPTION
,
"订单入仓记录修改,订单非泡货,系统自动处理为已处理"
,
OrderExceptionResult
.
ORDER_BULKY_CARGO_EXCEPTION_RESULT
.
GENERAL_CARGO
);
...
...
yudao-module-sale/yudao-module-sale-core/src/main/java/cn/iocoder/yudao/module/sale/dal/dataobject/channel/ChannelDO.java
View file @
ddf90261
...
...
@@ -110,4 +110,9 @@ public class ChannelDO extends BaseDO {
*/
private
BigDecimal
bubbleWeightRatio
;
/**
* 免泡重量
*/
private
BigDecimal
bubbleExemptWeight
;
}
yudao-module-sale/yudao-module-sale-core/src/main/java/cn/iocoder/yudao/module/sale/vo/channel/ChannelBaseVO.java
View file @
ddf90261
...
...
@@ -77,6 +77,9 @@ public class ChannelBaseVO {
@ApiModelProperty
(
value
=
"泡重比例"
)
private
BigDecimal
bubbleWeightRatio
;
@ApiModelProperty
(
value
=
"免泡重量"
)
private
BigDecimal
bubbleExemptWeight
;
@ApiModelProperty
(
value
=
"快递公司名称"
)
private
String
companyName
;
...
...
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