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
e23ba12e
Commit
e23ba12e
authored
Jun 18, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-18-2提交
parent
b525c1de
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
279 additions
and
39 deletions
+279
-39
BmpShipmentBatchAddPriceListener.java
...e/shipment/listener/BmpShipmentBatchAddPriceListener.java
+6
-2
OrderBusinessServiceImpl.java
...le/order/service/order/impl/OrderBusinessServiceImpl.java
+209
-25
BoxServiceImpl.java
...der/yudao/module/shipment/service/box/BoxServiceImpl.java
+34
-9
BoxApprovalServiceImpl.java
.../shipment/service/boxApproval/BoxApprovalServiceImpl.java
+30
-3
No files found.
yudao-module-bpm/yudao-module-bpm-base/src/main/java/cn/iocoder/yudao/module/bpm/service/shipment/listener/BmpShipmentBatchAddPriceListener.java
View file @
e23ba12e
...
@@ -24,7 +24,11 @@ public class BmpShipmentBatchAddPriceListener extends BpmProcessInstanceResultEv
...
@@ -24,7 +24,11 @@ public class BmpShipmentBatchAddPriceListener extends BpmProcessInstanceResultEv
@Override
@Override
protected
void
onEvent
(
BpmProcessInstanceResultEvent
event
)
{
protected
void
onEvent
(
BpmProcessInstanceResultEvent
event
)
{
log
.
info
(
"---------------------批量加价审核回调-----------------------{},{}"
,
event
.
getBusinessKey
(),
event
.
getResult
());
log
.
info
(
"---------------------批量加价审核回调-----------------------{},{}"
,
boxApprovalService
.
updateBoxApproveResult
(
WorkFlowEmus
.
SHIPMENT_BATCH_ADD_PRICE
.
getKey
(),
event
.
getBusinessKey
(),
event
.
getResult
());
event
.
getBusinessKey
(),
event
.
getResult
());
//lanbm 2024-06-18 改为空运和海运都有此逻辑点
boxApprovalService
.
updateBoxApproveResult
(
WorkFlowEmus
.
SHIPMENT_BATCH_ADD_PRICE
.
getKey
(),
event
.
getBusinessKey
(),
event
.
getResult
());
}
}
}
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderBusinessServiceImpl.java
View file @
e23ba12e
This diff is collapsed.
Click to expand it.
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/box/BoxServiceImpl.java
View file @
e23ba12e
...
@@ -49,6 +49,7 @@ import cn.iocoder.yudao.module.member.api.user.dto.UserRespDTO;
...
@@ -49,6 +49,7 @@ import cn.iocoder.yudao.module.member.api.user.dto.UserRespDTO;
import
cn.iocoder.yudao.module.order.convert.orderLocation.OrderLocationConvert
;
import
cn.iocoder.yudao.module.order.convert.orderLocation.OrderLocationConvert
;
import
cn.iocoder.yudao.module.order.dal.dataobject.approval.OrderApprovalDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.approval.OrderApprovalDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.order.zTest
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderCargoControl.OrderCargoControlDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderCargoControl.OrderCargoControlDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderConsignee.OrderConsigneeDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderConsignee.OrderConsigneeDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderConsignor.OrderConsignorDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderConsignor.OrderConsignorDO
;
...
@@ -56,6 +57,7 @@ import cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO;
...
@@ -56,6 +57,7 @@ import cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderLocation.OrderLocationDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderLocation.OrderLocationDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderSplit.OrderSplitDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderSplit.OrderSplitDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderSplitItem.OrderSplitItemDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderSplitItem.OrderSplitItemDO
;
import
cn.iocoder.yudao.module.order.dal.mysql.order.ZTestMapper2
;
import
cn.iocoder.yudao.module.order.dal.mysql.orderSplitItem.OrderSplitItemMapper
;
import
cn.iocoder.yudao.module.order.dal.mysql.orderSplitItem.OrderSplitItemMapper
;
import
cn.iocoder.yudao.module.order.dto.ContainerNumberSummaryDto
;
import
cn.iocoder.yudao.module.order.dto.ContainerNumberSummaryDto
;
import
cn.iocoder.yudao.module.order.dto.OrderRemindExceptionDto
;
import
cn.iocoder.yudao.module.order.dto.OrderRemindExceptionDto
;
...
@@ -234,6 +236,9 @@ import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.DEPT_NOT_F
...
@@ -234,6 +236,9 @@ import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.DEPT_NOT_F
@Slf4j
@Slf4j
public
class
BoxServiceImpl
extends
AbstractService
<
BoxMapper
,
BoxDO
>
implements
BoxService
{
public
class
BoxServiceImpl
extends
AbstractService
<
BoxMapper
,
BoxDO
>
implements
BoxService
{
@Resource
private
ZTestMapper2
zTestMapper2
;
@Resource
@Resource
private
BoxMapper
boxMapper
;
private
BoxMapper
boxMapper
;
...
@@ -4951,10 +4956,21 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
...
@@ -4951,10 +4956,21 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
if
(
StringUtils
.
isEmpty
(
details
))
{
if
(
StringUtils
.
isEmpty
(
details
))
{
throw
new
ServiceException
(
500
,
"加价详情不能为空"
);
throw
new
ServiceException
(
500
,
"加价详情不能为空"
);
}
}
BoxOrderMarkUpVO
boxOrderMarkUpVO
=
JSON
.
parseObject
(
details
,
BoxOrderMarkUpVO
.
class
);
BoxOrderMarkUpVO
boxOrderMarkUpVO
=
orderBusinessService
.
handleAirOrderBatchMarkup
(
boxOrderMarkUpVO
.
getOrderIds
(),
boxOrderMarkUpVO
.
getFreightFee
(),
JSON
.
parseObject
(
details
,
BoxOrderMarkUpVO
.
class
);
boxOrderMarkUpVO
.
getFreightCurrencyId
(),
boxOrderMarkUpVO
.
getFreightUnitId
(),
boxOrderMarkUpVO
.
getClearanceFee
(),
boxOrderMarkUpVO
.
getClearanceCurrencyId
(),
zTest
z
=
new
zTest
();
z
.
setTestname
(
"开始调用 handleAirOrderBatchMarkup"
);
z
.
setCreatedate
(
new
Date
());
zTestMapper2
.
insert
(
z
);
orderBusinessService
.
handleAirOrderBatchMarkup
(
boxOrderMarkUpVO
.
getOrderIds
(),
boxOrderMarkUpVO
.
getFreightFee
(),
boxOrderMarkUpVO
.
getFreightCurrencyId
(),
boxOrderMarkUpVO
.
getFreightUnitId
(),
boxOrderMarkUpVO
.
getClearanceFee
(),
boxOrderMarkUpVO
.
getClearanceCurrencyId
(),
boxOrderMarkUpVO
.
getClearanceUnitId
());
boxOrderMarkUpVO
.
getClearanceUnitId
());
}
}
...
@@ -4973,7 +4989,8 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
...
@@ -4973,7 +4989,8 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
@Override
@Override
public
void
checkIsInClearance
(
Long
shipmentId
,
Long
orderId
)
{
public
void
checkIsInClearance
(
Long
shipmentId
,
Long
orderId
)
{
BoxClearanceOrderDO
clearanceOrderDO
=
boxClearanceOrderService
.
getOne
(
new
LambdaQueryWrapper
<
BoxClearanceOrderDO
>()
BoxClearanceOrderDO
clearanceOrderDO
=
boxClearanceOrderService
.
getOne
(
new
LambdaQueryWrapper
<
BoxClearanceOrderDO
>()
.
eq
(
BoxClearanceOrderDO:
:
getShipmentId
,
shipmentId
)
.
eq
(
BoxClearanceOrderDO:
:
getShipmentId
,
shipmentId
)
.
eq
(
BoxClearanceOrderDO:
:
getOrderId
,
orderId
)
.
eq
(
BoxClearanceOrderDO:
:
getOrderId
,
orderId
)
);
);
...
@@ -5001,20 +5018,28 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
...
@@ -5001,20 +5018,28 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
@Override
@Override
public
void
checkOrderPayStatus
(
Collection
<
Long
>
orderIds
)
{
public
void
checkOrderPayStatus
(
Collection
<
Long
>
orderIds
)
{
if
(
CollectionUtil
.
isEmpty
(
orderIds
))
return
;
if
(
CollectionUtil
.
isEmpty
(
orderIds
))
return
;
List
<
ReceivableDO
>
receivableList
=
receivableService
.
getOrderPayList
(
orderIds
);
List
<
ReceivableDO
>
receivableList
=
List
<
OrderDO
>
orderList
=
orderQueryService
.
getOrderList
(
orderIds
);
receivableService
.
getOrderPayList
(
orderIds
);
List
<
OrderDO
>
orderList
=
orderQueryService
.
getOrderList
(
orderIds
);
Map
<
Long
,
OrderDO
>
orderMap
=
orderList
.
stream
()
Map
<
Long
,
OrderDO
>
orderMap
=
orderList
.
stream
()
.
collect
(
Collectors
.
toMap
(
OrderDO:
:
getOrderId
,
v
->
v
));
.
collect
(
Collectors
.
toMap
(
OrderDO:
:
getOrderId
,
v
->
v
));
List
<
String
>
payOrderNoList
=
new
ArrayList
<>();
List
<
String
>
payOrderNoList
=
new
ArrayList
<>();
if
(
CollectionUtil
.
isNotEmpty
(
receivableList
))
{
if
(
CollectionUtil
.
isNotEmpty
(
receivableList
))
{
Map
<
Long
,
List
<
ReceivableDO
>>
receivableMap
=
receivableList
.
stream
()
Map
<
Long
,
List
<
ReceivableDO
>>
receivableMap
=
receivableList
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
ReceivableDO:
:
getOrderId
));
.
collect
(
Collectors
.
groupingBy
(
ReceivableDO:
:
getOrderId
));
for
(
Map
.
Entry
<
Long
,
List
<
ReceivableDO
>>
entry
:
receivableMap
.
entrySet
())
{
for
(
Map
.
Entry
<
Long
,
List
<
ReceivableDO
>>
entry
:
receivableMap
.
entrySet
())
{
Long
orderId
=
entry
.
getKey
();
Long
orderId
=
entry
.
getKey
();
OrderDO
orderDO
=
orderMap
.
get
(
orderId
);
OrderDO
orderDO
=
orderMap
.
get
(
orderId
);
payOrderNoList
.
add
(
orderDO
.
getOrderNo
());
payOrderNoList
.
add
(
orderDO
.
getOrderNo
());
}
}
throw
new
ServiceException
(
500
,
Joiner
.
on
(
","
).
join
(
payOrderNoList
)
+
"已预付核销,不允许修改价格"
);
throw
new
ServiceException
(
500
,
Joiner
.
on
(
","
).
join
(
payOrderNoList
)
+
"已预付核销,不允许修改价格"
);
}
}
}
}
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/boxApproval/BoxApprovalServiceImpl.java
View file @
e23ba12e
...
@@ -15,8 +15,10 @@ import cn.iocoder.yudao.module.bpm.resp.TaskResp;
...
@@ -15,8 +15,10 @@ import cn.iocoder.yudao.module.bpm.resp.TaskResp;
import
cn.iocoder.yudao.module.ecw.service.internalMessage.InternalMessageService
;
import
cn.iocoder.yudao.module.ecw.service.internalMessage.InternalMessageService
;
import
cn.iocoder.yudao.module.ecw.vo.internalMessage.InternalMessageCreateReqVO
;
import
cn.iocoder.yudao.module.ecw.vo.internalMessage.InternalMessageCreateReqVO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.order.zTest
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderSplitItem.OrderSplitItemDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderSplitItem.OrderSplitItemDO
;
import
cn.iocoder.yudao.module.order.dal.mysql.order.ZTestMapper2
;
import
cn.iocoder.yudao.module.order.enums.*
;
import
cn.iocoder.yudao.module.order.enums.*
;
import
cn.iocoder.yudao.module.order.service.targetLog.TargetLogService
;
import
cn.iocoder.yudao.module.order.service.targetLog.TargetLogService
;
import
cn.iocoder.yudao.module.order.vo.order.CostVO
;
import
cn.iocoder.yudao.module.order.vo.order.CostVO
;
...
@@ -74,6 +76,9 @@ import static cn.iocoder.yudao.module.shipment.enums.ErrorCodeConstants.*;
...
@@ -74,6 +76,9 @@ import static cn.iocoder.yudao.module.shipment.enums.ErrorCodeConstants.*;
@Validated
@Validated
public
class
BoxApprovalServiceImpl
extends
AbstractService
<
BoxApprovalMapper
,
BoxApprovalDO
>
implements
BoxApprovalService
{
public
class
BoxApprovalServiceImpl
extends
AbstractService
<
BoxApprovalMapper
,
BoxApprovalDO
>
implements
BoxApprovalService
{
@Resource
private
ZTestMapper2
zTestMapper2
;
@Resource
@Resource
private
BoxApprovalMapper
boxApprovalMapper
;
private
BoxApprovalMapper
boxApprovalMapper
;
@Resource
@Resource
...
@@ -604,10 +609,14 @@ public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, B
...
@@ -604,10 +609,14 @@ public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, B
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updateBoxApproveResult
(
String
flowKey
,
String
id
,
int
result
)
{
public
void
updateBoxApproveResult
(
String
flowKey
,
String
id
,
int
result
)
{
BoxApprovalDO
boxApprovalDO
=
boxApprovalMapper
.
selectById
(
id
);
BoxApprovalDO
boxApprovalDO
=
boxApprovalMapper
.
selectById
(
id
);
TaskResp
taskResp
=
bpmCreateServiceFactory
.
getLastTaskByProcessInstanceId
(
boxApprovalDO
.
getBpmProcessId
());
TaskResp
taskResp
=
bpmCreateServiceFactory
.
getLastTaskByProcessInstanceId
(
boxApprovalDO
.
getBpmProcessId
());
Long
shipmentId
=
boxApprovalDO
.
getShipmentId
();
Long
shipmentId
=
boxApprovalDO
.
getShipmentId
();
BoxDO
boxDO
=
boxService
.
getBox
(
shipmentId
);
BoxDO
boxDO
=
boxService
.
getBox
(
shipmentId
);
...
@@ -1145,9 +1154,27 @@ public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, B
...
@@ -1145,9 +1154,27 @@ public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, B
//======================批量加价格=======================
//======================批量加价格=======================
case
SHIPMENT_BATCH_ADD_PRICE:
case
SHIPMENT_BATCH_ADD_PRICE:
//批量加价格
//批量加价格
//lanbm 2024-06-18 添加注释 是给自编号下的订单加价
if
(
result
==
BpmProcessInstanceResultEnum
.
APPROVE
.
getResult
())
{
if
(
result
==
BpmProcessInstanceResultEnum
.
APPROVE
.
getResult
())
{
String
details
=
boxApprovalDO
.
getDetails
();
String
details
=
boxApprovalDO
.
getDetails
();
BoxOrderMarkUpVO
boxOrderMarkUpVO
=
JSON
.
parseObject
(
details
,
BoxOrderMarkUpVO
.
class
);
BoxOrderMarkUpVO
boxOrderMarkUpVO
=
JSON
.
parseObject
(
details
,
BoxOrderMarkUpVO
.
class
);
if
(
boxOrderMarkUpVO
.
getOrderIds
()!=
null
)
{
String
s
=
String
.
valueOf
(
boxOrderMarkUpVO
.
getOrderIds
());
zTest
z
=
new
zTest
();
z
.
setTestname
(
"订单id,"
+
s
);
z
.
setCreatedate
(
new
Date
());
zTestMapper2
.
insert
(
z
);
}
else
{
String
s
=
String
.
valueOf
(
boxOrderMarkUpVO
.
getOrderIds
());
zTest
z
=
new
zTest
();
z
.
setTestname
(
"批量加价申报批,订单id为空"
);
z
.
setCreatedate
(
new
Date
());
zTestMapper2
.
insert
(
z
);
}
boxService
.
checkOrderPayStatus
(
boxOrderMarkUpVO
.
getOrderIds
());
boxService
.
checkOrderPayStatus
(
boxOrderMarkUpVO
.
getOrderIds
());
boxService
.
batchAddPriceSuccess
(
shipmentId
,
details
);
boxService
.
batchAddPriceSuccess
(
shipmentId
,
details
);
}
}
...
...
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