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
84e75508
Commit
84e75508
authored
Jun 17, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-17提交
parent
e1b13f77
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
270 additions
and
200 deletions
+270
-200
RegionController.java
.../module/ecw/controller/admin/region/RegionController.java
+5
-3
OrderBusinessServiceImpl.java
...le/order/service/order/impl/OrderBusinessServiceImpl.java
+85
-69
OrderWarehouseInServiceImpl.java
...service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
+6
-2
ProductPriceMapper.xml
.../src/main/resources/mapper/product/ProductPriceMapper.xml
+4
-1
ProductPriceController.java
...duct/controller/admin/product/ProductPriceController.java
+10
-4
BoxServiceImpl.java
...der/yudao/module/shipment/service/box/BoxServiceImpl.java
+30
-27
BoxMergePkgServiceImpl.java
.../shipment/service/boxMergePkg/BoxMergePkgServiceImpl.java
+106
-78
BoxOrderCheckInfoServiceImpl.java
...rvice/boxOrderCheckInfo/BoxOrderCheckInfoServiceImpl.java
+2
-1
BoxPreloadGoodsServiceImpl.java
...t/service/boxPreloadGoods/BoxPreloadGoodsServiceImpl.java
+16
-12
BoxMergePkgController.java
...dule/shipment/controller/admin/BoxMergePkgController.java
+6
-3
No files found.
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/controller/admin/region/RegionController.java
View file @
84e75508
...
@@ -140,7 +140,7 @@ public class RegionController {
...
@@ -140,7 +140,7 @@ public class RegionController {
@GetMapping
(
"/getListTree"
)
@GetMapping
(
"/getListTree"
)
@ApiOperation
(
"获得区域设置列表"
)
@ApiOperation
(
"获得区域设置列表"
)
//
@PreAuthorize("@ss.hasPermission('ecw:region:query')")
//
@PreAuthorize("@ss.hasPermission('ecw:region:query')")
public
CommonResult
<
List
<
RegionRespVO
>>
listTree
(
RegionListReqVO
reqVO
)
{
public
CommonResult
<
List
<
RegionRespVO
>>
listTree
(
RegionListReqVO
reqVO
)
{
List
<
RegionDO
>
list
=
regionService
.
getSimpleDepts
(
reqVO
);
List
<
RegionDO
>
list
=
regionService
.
getSimpleDepts
(
reqVO
);
list
.
sort
(
Comparator
.
comparing
(
RegionDO:
:
getSort
));
list
.
sort
(
Comparator
.
comparing
(
RegionDO:
:
getSort
));
...
@@ -173,8 +173,10 @@ public class RegionController {
...
@@ -173,8 +173,10 @@ public class RegionController {
@GetMapping
(
"/getTradeCityList"
)
@GetMapping
(
"/getTradeCityList"
)
@ApiOperation
(
"获得始发、目的城市列表"
)
@ApiOperation
(
"获得始发、目的城市列表"
)
// @PreAuthorize("@ss.hasPermission('ecw:region:query')")
//@PreAuthorize("@ss.hasPermission('ecw:region:query')")
public
CommonResult
<
List
<
RegionRespVO
>>
getTradeCityList
(
TradeRegionListReqVO
reqVO
)
{
public
CommonResult
<
List
<
RegionRespVO
>>
getTradeCityList
(
TradeRegionListReqVO
reqVO
)
{
if
(
Objects
.
nonNull
(
reqVO
.
getChannelId
())){
if
(
Objects
.
nonNull
(
reqVO
.
getChannelId
())){
// 如果有渠道信息,则查询可出目的地国家下的目的地城市
// 如果有渠道信息,则查询可出目的地国家下的目的地城市
QueryChannelInfoEvent
channelInfoEvent
=
new
QueryChannelInfoEvent
();
QueryChannelInfoEvent
channelInfoEvent
=
new
QueryChannelInfoEvent
();
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderBusinessServiceImpl.java
View file @
84e75508
...
@@ -2401,6 +2401,13 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2401,6 +2401,13 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
int
noQuoteOrAutomaticNoQuote
,
int
noQuoteOrAutomaticNoQuote
,
OrderItemDO
orderItemDO
,
OrderItemDO
orderItemDO
,
Integer
type
)
{
Integer
type
)
{
if
(
orderDO
==
null
)
{
return
noQuoteOrAutomaticNoQuote
;
}
if
(
orderItemDO
==
null
)
{
return
noQuoteOrAutomaticNoQuote
;
}
//查询有无未报价异常 lanbm 2024-06-06 添加注释
//查询有无未报价异常 lanbm 2024-06-06 添加注释
List
<
OrderExceptionDO
>
orderNoQuoteExceptionDOList
=
List
<
OrderExceptionDO
>
orderNoQuoteExceptionDOList
=
orderExceptionService
.
getPendingOrderExceptionByOrderIdAndOrderItemIdAndProdIdAndExceptionKey
(
orderExceptionService
.
getPendingOrderExceptionByOrderIdAndOrderItemIdAndProdIdAndExceptionKey
(
...
@@ -2409,39 +2416,44 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2409,39 +2416,44 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderItemDO
.
getProdId
(),
orderItemDO
.
getProdId
(),
OrderExceptionEnum
.
ORDER_NO_QUOTE_EXCEPTION
.
getKey
());
OrderExceptionEnum
.
ORDER_NO_QUOTE_EXCEPTION
.
getKey
());
/*
if
(
orderItemDO
.
getNeedOrderInquiry
()
!=
null
)
{
String s = "type=" + type.toString() +
"getTransportId=" + orderDO.getTransportId().toString() +
String
s
=
"type="
+
type
.
toString
()
+
"getNeedOrderInquiry=" + orderItemDO.getNeedOrderInquiry();
"getTransportId="
+
orderDO
.
getTransportId
().
toString
()
+
"getNeedOrderInquiry="
+
orderItemDO
.
getNeedOrderInquiry
();
//lanbm 2024-06-06 添加的逻辑点 海运和空运只要是单询价都按同一套逻辑来处理
if
(
orderItemDO
.
getNeedOrderInquiry
()
==
1
)
{
//处理未报价异常,且是空运,且是单询价
if
(
CollectionUtil
.
isNotEmpty
(
orderNoQuoteExceptionDOList
))
{
orderExceptionService
.
autoProcessException
(
orderDO
.
getOrderId
(),
orderItemDO
.
getOrderItemId
(),
OrderExceptionEnum
.
ORDER_NO_QUOTE_EXCEPTION
,
"单询价,自动处理未报价异常"
,
OrderExceptionResult
.
ORDER_NO_QUOTE_EXCEPTION_RESULT
.
PROCESSED
);
noQuoteOrAutomaticNoQuote
=
2
;
return
noQuoteOrAutomaticNoQuote
;
}
zTest
z
=
new
zTest
();
z
.
setTestname
(
s
);
z
.
setCreatedate
(
new
Date
());
zTestMapper
.
insert
(
z
);
//lanbm 2024-06-06 添加的逻辑点
if (orderDO.getTransportId() == 3
&& orderItemDO.getNeedOrderInquiry() == 1) {
//处理未报价异常,且是空运,且是单询价
if (CollectionUtil.isNotEmpty(orderNoQuoteExceptionDOList)) {
orderExceptionService.autoProcessException(orderDO.getOrderId(),
orderItemDO.getOrderItemId(),
OrderExceptionEnum.ORDER_NO_QUOTE_EXCEPTION,
"单询价,自动处理未报价异常",
OrderExceptionResult.ORDER_NO_QUOTE_EXCEPTION_RESULT.PROCESSED);
noQuoteOrAutomaticNoQuote
=
2
;
noQuoteOrAutomaticNoQuote
=
2
;
return
noQuoteOrAutomaticNoQuote
;
return
noQuoteOrAutomaticNoQuote
;
}
else
{
zTest
z
=
new
zTest
();
z
.
setTestname
(
s
);
z
.
setCreatedate
(
new
Date
());
zTestMapper
.
insert
(
z
);
}
}
zTest z = new zTest();
z.setTestname(s);
z.setCreatedate(new Date());
zTestMapper.insert(z);
noQuoteOrAutomaticNoQuote = 2;
return noQuoteOrAutomaticNoQuote;
}
else
{
}
else
{
zTest
z
=
new
zTest
();
zTest
z
=
new
zTest
();
z.setTestname(
s
);
z
.
setTestname
(
"单询价为空"
);
z
.
setCreatedate
(
new
Date
());
z
.
setCreatedate
(
new
Date
());
zTestMapper
.
insert
(
z
);
zTestMapper
.
insert
(
z
);
}
}
//lanbm 2024-06-06 添加的逻辑点
//lanbm 2024-06-06 添加的逻辑点
*/
if
(
orderItemDO
.
getItemStatus
()
==
-
1
&&
!
orderItemDO
.
getIsProd
())
{
if
(
orderItemDO
.
getItemStatus
()
==
-
1
&&
!
orderItemDO
.
getIsProd
())
{
if
(
CollectionUtil
.
isEmpty
(
orderNoQuoteExceptionDOList
))
{
if
(
CollectionUtil
.
isEmpty
(
orderNoQuoteExceptionDOList
))
{
...
@@ -2463,11 +2475,6 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2463,11 +2475,6 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
}
}
noQuoteOrAutomaticNoQuote
=
1
;
noQuoteOrAutomaticNoQuote
=
1
;
}
else
{
}
else
{
zTest
z
=
new
zTest
();
z
.
setTestname
(
"测试点1"
);
z
.
setCreatedate
(
new
Date
());
zTestMapper
.
insert
(
z
);
if
(
CollectionUtil
.
isNotEmpty
(
orderNoQuoteExceptionDOList
))
{
if
(
CollectionUtil
.
isNotEmpty
(
orderNoQuoteExceptionDOList
))
{
// TODO 当其他业务补充了品名价格后,如果还有待处理的未报价异常,需要同步处理掉
// TODO 当其他业务补充了品名价格后,如果还有待处理的未报价异常,需要同步处理掉
orderExceptionService
.
autoProcessException
(
orderDO
.
getOrderId
(),
orderExceptionService
.
autoProcessException
(
orderDO
.
getOrderId
(),
...
@@ -2481,31 +2488,28 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2481,31 +2488,28 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
return
noQuoteOrAutomaticNoQuote
;
return
noQuoteOrAutomaticNoQuote
;
}
}
private
void
saveLog
(
OrderDO
orderDO
,
private
void
saveLog
(
OrderDO
orderDO
,
OrderItemDO
orderItemDO
,
OrderItemDO
orderItemDO
,
WarehouseInInfoVO
warehouseInInfoVO
,
WarehouseInInfoVO
warehouseInInfoVO
,
Integer
type
)
Integer
type
)
{
{
zTest
z
=
new
zTest
();
zTest
z
=
new
zTest
();
z
.
setCreatedate
(
new
Date
());
z
.
setCreatedate
(
new
Date
());
if
(
orderDO
==
null
)
if
(
orderDO
==
null
)
{
{
//订单信息为空
//订单信息为空
z
.
setTestname
(
"orderDO为空"
);
z
.
setTestname
(
"orderDO为空"
);
zTestMapper
.
insert
(
z
);
zTestMapper
.
insert
(
z
);
return
;
return
;
}
}
if
(
orderItemDO
==
null
)
if
(
orderItemDO
==
null
)
{
{
//订单明细为空
//订单明细为空
z
.
setTestname
(
"orderItemDO为空"
);
z
.
setTestname
(
"orderItemDO为空"
);
zTestMapper
.
insert
(
z
);
zTestMapper
.
insert
(
z
);
return
;
return
;
}
}
if
(
warehouseInInfoVO
==
null
)
if
(
warehouseInInfoVO
==
null
)
{
{
//入仓信息为空
//入仓信息为空
z
.
setTestname
(
"warehouseInInfoVO为空"
);
z
.
setTestname
(
"warehouseInInfoVO为空"
);
zTestMapper
.
insert
(
z
);
zTestMapper
.
insert
(
z
);
...
@@ -2524,11 +2528,9 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2524,11 +2528,9 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
if
(
Objects
.
nonNull
(
warehouseInInfoVO
))
{
if
(
Objects
.
nonNull
(
warehouseInInfoVO
))
{
s
+=
"warehouseInInfo为空"
;
s
+=
"warehouseInInfo为空"
;
}
}
else
{
else
{
s
+=
"CartonsNum="
s
+=
"CartonsNum="
+
warehouseInInfoVO
.
getCartonsNum
().
toString
();
+
warehouseInInfoVO
.
getCartonsNum
().
toString
();
}
}
if
(
Objects
.
nonNull
(
orderItemDO
.
getIsHandlerOrderInquiryException
()))
{
if
(
Objects
.
nonNull
(
orderItemDO
.
getIsHandlerOrderInquiryException
()))
{
...
@@ -2553,7 +2555,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2553,7 +2555,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderItemDO
.
getOrderItemId
(),
orderItemDO
.
getOrderItemId
(),
OrderExceptionEnum
.
LINE_LOOP_EXCEPTION
.
getKey
());
OrderExceptionEnum
.
LINE_LOOP_EXCEPTION
.
getKey
());
//
saveLog(orderDO, orderItemDO, warehouseInInfoVO, type);
saveLog
(
orderDO
,
orderItemDO
,
warehouseInInfoVO
,
type
);
// 避免在前面自动处理未报价异常和清关费未报价异常时的回调,优先创建了单询异常,造成并发的重复创建
// 避免在前面自动处理未报价异常和清关费未报价异常时的回调,优先创建了单询异常,造成并发的重复创建
if
(
CollectionUtil
.
isEmpty
(
orderInquiryExceptionDOList
))
{
if
(
CollectionUtil
.
isEmpty
(
orderInquiryExceptionDOList
))
{
...
@@ -2604,6 +2606,14 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2604,6 +2606,14 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
int
noQuoteOrAutomaticNoQuote
,
int
noQuoteOrAutomaticNoQuote
,
OrderItemDO
orderItemDO
,
OrderItemDO
orderItemDO
,
Integer
type
)
{
Integer
type
)
{
//lanbm 2024-06-17 添加的是否为空判断逻辑
if
(
orderDO
==
null
)
{
return
noQuoteOrAutomaticNoQuote
;
}
if
(
orderItemDO
==
null
)
{
return
noQuoteOrAutomaticNoQuote
;
}
// 查询是否有重量超限异常,如果有则不生成清关费异常
// 查询是否有重量超限异常,如果有则不生成清关费异常
// TODO 查询是否有重量超限异常和渠道包装重量超限异常,如果有则不生成清关费异常
// TODO 查询是否有重量超限异常和渠道包装重量超限异常,如果有则不生成清关费异常
List
<
OrderExceptionDO
>
goodsOverweightExceptionDOList
=
List
<
OrderExceptionDO
>
goodsOverweightExceptionDOList
=
...
@@ -2611,43 +2621,49 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
...
@@ -2611,43 +2621,49 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
null
,
null
,
orderItemDO
.
getProdId
(),
orderItemDO
.
getProdId
(),
CollectionUtil
.
newArrayList
(
OrderExceptionEnum
.
GOODS_OVERWEIGHT_EXCEPTION
.
getKey
(),
OrderExceptionEnum
.
LINE_WEIGHT_EXCEPTION
.
getKey
()));
CollectionUtil
.
newArrayList
(
OrderExceptionEnum
.
GOODS_OVERWEIGHT_EXCEPTION
.
getKey
(),
OrderExceptionEnum
.
LINE_WEIGHT_EXCEPTION
.
getKey
()));
/*
String s = "type=" + type.toString() + " TransportId=" +
orderDO.getTransportId().toString() +
" NeedOrderInquiry=" + orderItemDO.getNeedOrderInquiry().toString();
//lanbm 2024-06-06 添加的逻辑点
if
(
orderItemDO
.
getNeedOrderInquiry
()
!=
null
)
{
if (orderDO.getTransportId() == 3
String
s
=
"type="
+
type
.
toString
()
+
" TransportId="
+
&& orderItemDO.getNeedOrderInquiry() == 1) {
orderDO
.
getTransportId
().
toString
()
+
" NeedOrderInquiry="
+
orderItemDO
.
getNeedOrderInquiry
().
toString
();
//根据订单号查询是否有清关费异常
//lanbm 2024-06-06 添加的逻辑点 海运和空运设置了单询价都用同一套逻辑
List<OrderExceptionDO> orderClearanceFeeNoQuoteExceptionDOList =
if
(
orderItemDO
.
getNeedOrderInquiry
()
==
1
)
{
orderExceptionService.getPendingOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey(
orderDO.getOrderId(),
orderItemDO.getOrderItemId(),
OrderExceptionEnum.CUSTOMS_FEE_NOT_QUOTE_EXCEPTION.getKey());
if (CollectionUtil.isNotEmpty(orderClearanceFeeNoQuoteExceptionDOList)) {
//根据订单号查询是否有清关费异常
// 当其他业务补充了品名空运清关费价格后,如果还有待处理的清关费未报价异常,需要同步处理掉
List
<
OrderExceptionDO
>
orderClearanceFeeNoQuoteExceptionDOList
=
orderExceptionService.autoProcessException(orderDO.getOrderId(),
orderExceptionService
.
getPendingOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey
(
orderItemDO.getOrderItemId(),
orderDO
.
getOrderId
(),
OrderExceptionEnum.CUSTOMS_FEE_NOT_QUOTE_EXCEPTION,
orderItemDO
.
getOrderItemId
(),
"单询价,自动处理清关价异常",
OrderExceptionEnum
.
CUSTOMS_FEE_NOT_QUOTE_EXCEPTION
.
getKey
());
OrderExceptionResult.CUSTOMS_FEE_NOT_QUOTE_EXCEPTION_RESULT.PROCESSED);
if
(
CollectionUtil
.
isNotEmpty
(
orderClearanceFeeNoQuoteExceptionDOList
))
{
// 当其他业务补充了品名空运清关费价格后,如果还有待处理的清关费未报价异常,需要同步处理掉
orderExceptionService
.
autoProcessException
(
orderDO
.
getOrderId
(),
orderItemDO
.
getOrderItemId
(),
OrderExceptionEnum
.
CUSTOMS_FEE_NOT_QUOTE_EXCEPTION
,
"单询价,自动处理清关价异常"
,
OrderExceptionResult
.
CUSTOMS_FEE_NOT_QUOTE_EXCEPTION_RESULT
.
PROCESSED
);
noQuoteOrAutomaticNoQuote
=
2
;
return
noQuoteOrAutomaticNoQuote
;
}
zTest
z
=
new
zTest
();
z
.
setTestname
(
s
);
z
.
setCreatedate
(
new
Date
());
zTestMapper
.
insert
(
z
);
noQuoteOrAutomaticNoQuote
=
2
;
noQuoteOrAutomaticNoQuote
=
2
;
return
noQuoteOrAutomaticNoQuote
;
return
noQuoteOrAutomaticNoQuote
;
}
else
{
zTest
z
=
new
zTest
();
z
.
setTestname
(
s
);
z
.
setCreatedate
(
new
Date
());
}
}
zTest z = new zTest();
z.setTestname(s);
z.setCreatedate(new Date());
zTestMapper.insert(z);
noQuoteOrAutomaticNoQuote = 2;
return noQuoteOrAutomaticNoQuote;
}
else
{
}
else
{
zTest
z
=
new
zTest
();
zTest
z
=
new
zTest
();
z.setTestname(
s
);
z
.
setTestname
(
"单询价为空"
);
z
.
setCreatedate
(
new
Date
());
z
.
setCreatedate
(
new
Date
());
}
*/
}
//end lanbm 2024-06-06 添加的逻辑点
//end lanbm 2024-06-06 添加的逻辑点
// 渠道重量超限异常 channel_packaging_overweight_exception
// 渠道重量超限异常 channel_packaging_overweight_exception
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
View file @
84e75508
...
@@ -342,7 +342,8 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
...
@@ -342,7 +342,8 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
// 判断是否有未处理的审核单
// 判断是否有未处理的审核单
throwProcessingApproval
(
orderDO
);
throwProcessingApproval
(
orderDO
);
this
.
validateProdAttrAccess
(
createReqVO
.
getProdId
(),
orderDO
.
getOrderNo
());
this
.
validateProdAttrAccess
(
createReqVO
.
getProdId
(),
orderDO
.
getOrderNo
());
validateWarehouseInItem
(
orderDO
,
validateWarehouseInItem
(
orderDO
,
...
@@ -381,7 +382,10 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
...
@@ -381,7 +382,10 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
orderService
.
orderInWarehouse
(
orderWarehouseInVO
);
orderService
.
orderInWarehouse
(
orderWarehouseInVO
);
// 更新订单状态 - 入库中
// 更新订单状态 - 入库中
orderService
.
updateStatus
(
orderId
,
orderDO
.
getOrderNo
(),
OrderStatusEnum
.
WAREHOUSING
.
getValue
(),
null
,
OrderWarehouseInStatusEnum
.
warehousing
.
getValue
(),
null
,
null
,
null
,
false
);
orderService
.
updateStatus
(
orderId
,
orderDO
.
getOrderNo
(),
OrderStatusEnum
.
WAREHOUSING
.
getValue
(),
null
,
OrderWarehouseInStatusEnum
.
warehousing
.
getValue
(),
null
,
null
,
null
,
false
);
// 纪录操作日志
// 纪录操作日志
if
(
createReqVO
.
getIsAddOrderOperateLog
())
{
if
(
createReqVO
.
getIsAddOrderOperateLog
())
{
...
...
yudao-module-product/yudao-module-product-core/src/main/resources/mapper/product/ProductPriceMapper.xml
View file @
84e75508
...
@@ -73,10 +73,12 @@
...
@@ -73,10 +73,12 @@
AND FIND_IN_SET(#{params.attrId}, ep.attr_id)
AND FIND_IN_SET(#{params.attrId}, ep.attr_id)
</if>
</if>
<!--运输方式-->
<if
test=
"params.transportType != null and params.transportType != ''"
>
<if
test=
"params.transportType != null and params.transportType != ''"
>
and ewl.transport_type = #{params.transportType}
and ewl.transport_type = #{params.transportType}
</if>
</if>
<!--出货渠道-->
<if
test=
"params.shippingChannelId != null"
>
<if
test=
"params.shippingChannelId != null"
>
and epp.shipping_channel_id = #{params.shippingChannelId}
and epp.shipping_channel_id = #{params.shippingChannelId}
</if>
</if>
...
@@ -93,6 +95,7 @@
...
@@ -93,6 +95,7 @@
and epp.need_pay = #{params.needPay}
and epp.need_pay = #{params.needPay}
</if>
</if>
<!--价格类型 0是运费加清关费,1是全包价-->
<if
test=
"params.priceType != null"
>
<if
test=
"params.priceType != null"
>
and epp.price_type = #{params.priceType}
and epp.price_type = #{params.priceType}
</if>
</if>
...
@@ -414,4 +417,4 @@
...
@@ -414,4 +417,4 @@
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
yudao-module-product/yudao-module-product-rest/src/main/java/cn/iocoder/yudao/module/product/controller/admin/product/ProductPriceController.java
View file @
84e75508
...
@@ -97,7 +97,8 @@ public class ProductPriceController {
...
@@ -97,7 +97,8 @@ public class ProductPriceController {
@PutMapping
(
"/updateAir"
)
@PutMapping
(
"/updateAir"
)
@ApiOperation
(
"更新空运路线产品"
)
@ApiOperation
(
"更新空运路线产品"
)
@Idempotent
(
timeout
=
5
)
@Idempotent
(
timeout
=
5
)
public
CommonResult
<
Boolean
>
updateProductPriceAir
(
@Valid
@RequestBody
ProductPriceAirUpdateReqVO
productPriceAirUpdateReqVO
)
{
public
CommonResult
<
Boolean
>
updateProductPriceAir
(
@Valid
@RequestBody
ProductPriceAirUpdateReqVO
productPriceAirUpdateReqVO
)
{
productPriceService
.
updateProductPriceAir
(
productPriceAirUpdateReqVO
);
productPriceService
.
updateProductPriceAir
(
productPriceAirUpdateReqVO
);
return
success
(
true
);
return
success
(
true
);
}
}
...
@@ -218,9 +219,14 @@ public class ProductPriceController {
...
@@ -218,9 +219,14 @@ public class ProductPriceController {
@GetMapping
(
"/page"
)
@GetMapping
(
"/page"
)
@ApiOperation
(
"获得路线产品分页"
)
@ApiOperation
(
"获得路线产品分页"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:product-price:query')"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:product-price:query')"
)
public
CommonResult
<
PageResult
<
ProductPriceRespVO
>>
getProductPricePage
(
@Valid
ProductPricePageReqVO
pageVO
)
{
public
CommonResult
<
PageResult
<
ProductPriceRespVO
>>
getProductPricePage
(
PageResult
<
ProductPriceDO
>
pageResult
=
productPriceService
.
getProductPricePage
(
pageVO
);
@Valid
ProductPricePageReqVO
pageVO
)
{
PageResult
<
ProductPriceRespVO
>
respPageResult
=
ProductPriceConvert
.
INSTANCE
.
convertPage
(
pageResult
);
PageResult
<
ProductPriceDO
>
pageResult
=
productPriceService
.
getProductPricePage
(
pageVO
);
PageResult
<
ProductPriceRespVO
>
respPageResult
=
ProductPriceConvert
.
INSTANCE
.
convertPage
(
pageResult
);
productPriceService
.
matchLineAndProduct
(
respPageResult
.
getList
());
productPriceService
.
matchLineAndProduct
(
respPageResult
.
getList
());
return
success
(
respPageResult
);
return
success
(
respPageResult
);
}
}
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/box/BoxServiceImpl.java
View file @
84e75508
...
@@ -2550,7 +2550,7 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
...
@@ -2550,7 +2550,7 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
long
orderExitNum
=
boxOrderExitService
.
count
(
long
orderExitNum
=
boxOrderExitService
.
count
(
new
LambdaQueryWrapper
<
BoxOrderExitDO
>()
new
LambdaQueryWrapper
<
BoxOrderExitDO
>()
.
eq
(
BoxOrderExitDO:
:
getShipmentId
,
shipmentId
)
.
eq
(
BoxOrderExitDO:
:
getShipmentId
,
shipmentId
)
);
);
boxBackVO
.
setOrderExitNum
(
orderExitNum
);
boxBackVO
.
setOrderExitNum
(
orderExitNum
);
}
}
...
@@ -3453,33 +3453,36 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
...
@@ -3453,33 +3453,36 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
.
map
(
BoxAbnormalDO:
:
getShipmentId
)
.
map
(
BoxAbnormalDO:
:
getShipmentId
)
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
List
<
BoxDO
>
boxList
=
getBoxList
(
shipmentIdList
);
List
<
BoxDO
>
boxList
=
getBoxList
(
shipmentIdList
);
Map
<
Long
,
BoxDO
>
boxMap
=
boxList
.
stream
()
if
(
CollectionUtil
.
isNotEmpty
(
boxList
))
{
.
collect
(
Collectors
.
toMap
(
BoxDO:
:
getId
,
v
->
v
));
Map
<
Long
,
BoxDO
>
boxMap
=
boxList
.
stream
()
for
(
BoxAbnormalDO
abnormalDO
:
abnormalList
)
{
.
collect
(
Collectors
.
toMap
(
BoxDO:
:
getId
,
v
->
v
));
String
notifyUsers
=
abnormalDO
.
getNotifyUsers
();
if
(
notifyUsers
==
null
)
continue
;
for
(
BoxAbnormalDO
abnormalDO
:
abnormalList
)
{
Long
shipmentId
=
abnormalDO
.
getShipmentId
();
String
notifyUsers
=
abnormalDO
.
getNotifyUsers
();
Integer
opStep
=
abnormalDO
.
getOpStep
();
if
(
notifyUsers
==
null
)
continue
;
BoxDO
boxDO
=
boxMap
.
get
(
shipmentId
);
Long
shipmentId
=
abnormalDO
.
getShipmentId
();
String
transportType
=
boxDO
.
getTransportType
();
Integer
opStep
=
abnormalDO
.
getOpStep
();
if
(
CollectionUtil
.
isNotEmpty
(
transportTypeList
))
{
BoxDO
boxDO
=
boxMap
.
get
(
shipmentId
);
if
(!
transportTypeList
.
contains
(
transportType
))
continue
;
String
transportType
=
boxDO
.
getTransportType
();
}
if
(
CollectionUtil
.
isNotEmpty
(
transportTypeList
))
{
if
(!
transportTypeList
.
contains
(
transportType
))
continue
;
}
String
[]
userArray
=
notifyUsers
.
split
(
","
);
String
[]
userArray
=
notifyUsers
.
split
(
","
);
NoticeTypeEnum
typeEnum
=
null
;
NoticeTypeEnum
typeEnum
=
null
;
if
(
opStep
.
equals
(
AbnormalStepEnum
.
CUSTOMS
.
getStep
()))
{
if
(
opStep
.
equals
(
AbnormalStepEnum
.
CUSTOMS
.
getStep
()))
{
typeEnum
=
NoticeTypeEnum
.
ABNORMAL_CUSTOMS
;
typeEnum
=
NoticeTypeEnum
.
ABNORMAL_CUSTOMS
;
}
else
if
(
opStep
.
equals
(
AbnormalStepEnum
.
SHIPPING
.
getStep
()))
{
}
else
if
(
opStep
.
equals
(
AbnormalStepEnum
.
SHIPPING
.
getStep
()))
{
typeEnum
=
NoticeTypeEnum
.
ABNORMAL_SHIPPING
;
typeEnum
=
NoticeTypeEnum
.
ABNORMAL_SHIPPING
;
}
else
if
(
opStep
.
equals
(
AbnormalStepEnum
.
ARRIVAL
.
getStep
()))
{
}
else
if
(
opStep
.
equals
(
AbnormalStepEnum
.
ARRIVAL
.
getStep
()))
{
typeEnum
=
NoticeTypeEnum
.
ABNORMAL_ARRIVAL
;
typeEnum
=
NoticeTypeEnum
.
ABNORMAL_ARRIVAL
;
}
}
Date
noticeTime
=
abnormalDO
.
getAbnEndTime
();
Date
noticeTime
=
abnormalDO
.
getAbnEndTime
();
for
(
String
userId
:
userArray
)
{
for
(
String
userId
:
userArray
)
{
if
(!
userId
.
equals
(
loginUserId
.
toString
()))
continue
;
if
(!
userId
.
equals
(
loginUserId
.
toString
()))
continue
;
noticeList
.
add
(
addNotice
(
typeEnum
,
boxDO
,
noticeTime
));
noticeList
.
add
(
addNotice
(
typeEnum
,
boxDO
,
noticeTime
));
}
}
}
}
}
}
}
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/boxMergePkg/BoxMergePkgServiceImpl.java
View file @
84e75508
...
@@ -136,16 +136,20 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
...
@@ -136,16 +136,20 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
String
createBoxMergePkg
(
BoxMergePkgCreateReqVO
createReqVO
)
{
public
String
createBoxMergePkg
(
BoxMergePkgCreateReqVO
createReqVO
)
{
BoxDO
boxDO
=
boxService
.
getById
(
createReqVO
.
getShipmentId
());
BoxDO
boxDO
=
boxService
.
getById
(
createReqVO
.
getShipmentId
());
//校验业务逻辑
checkBoxApproval
(
createReqVO
.
getShipmentId
());
checkBoxApproval
(
createReqVO
.
getShipmentId
());
RegionDO
region
=
regionService
.
getRegion
(
warehouseService
.
getWarehouse
(
boxDO
.
getDestWarehouseId
()).
getShi
());
RegionDO
region
=
regionService
.
getRegion
(
warehouseService
.
getWarehouse
(
boxDO
.
getDestWarehouseId
()).
getShi
());
String
year
=
DateUtil
.
format
(
new
Date
(),
"yy"
);
String
year
=
DateUtil
.
format
(
new
Date
(),
"yy"
);
DecimalFormat
df
=
new
DecimalFormat
(
"0000"
);
DecimalFormat
df
=
new
DecimalFormat
(
"0000"
);
Integer
num
=
createReqVO
.
getNum
();
Integer
num
=
createReqVO
.
getNum
();
if
(
region
==
null
||
StringUtils
.
isBlank
(
region
.
getLabelCode
()))
{
if
(
region
==
null
||
StringUtils
.
isBlank
(
region
.
getLabelCode
()))
{
throw
exception
(
COUNTRY_LABEL_CODE_NOT_EXISTS
);
throw
exception
(
COUNTRY_LABEL_CODE_NOT_EXISTS
);
}
}
String
code
=
region
.
getLabelCode
().
substring
(
0
,
1
);
String
code
=
region
.
getLabelCode
().
substring
(
0
,
1
);
BoxMergePkgNumRecordDO
boxMergePkgNumRecordDO
=
boxMergePkgNumRecordMapper
.
selectOne
(
BoxMergePkgNumRecordDO:
:
getDestCountryId
,
boxDO
.
getDestCountryId
());
BoxMergePkgNumRecordDO
boxMergePkgNumRecordDO
=
boxMergePkgNumRecordMapper
.
selectOne
(
BoxMergePkgNumRecordDO:
:
getDestCountryId
,
boxDO
.
getDestCountryId
());
if
(
boxMergePkgNumRecordDO
==
null
)
{
if
(
boxMergePkgNumRecordDO
==
null
)
{
boxMergePkgNumRecordDO
=
new
BoxMergePkgNumRecordDO
();
boxMergePkgNumRecordDO
=
new
BoxMergePkgNumRecordDO
();
boxMergePkgNumRecordDO
.
setDestCountryId
(
boxDO
.
getDestCountryId
());
boxMergePkgNumRecordDO
.
setDestCountryId
(
boxDO
.
getDestCountryId
());
...
@@ -155,22 +159,41 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
...
@@ -155,22 +159,41 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
boxMergePkgNumRecordMapper
.
insert
(
boxMergePkgNumRecordDO
);
boxMergePkgNumRecordMapper
.
insert
(
boxMergePkgNumRecordDO
);
}
}
// 插入
// 插入
for
(
int
i
=
0
;
i
<
num
;
i
++)
{
for
(
int
i
=
0
;
i
<
num
;
i
++)
{
if
(
boxMergePkgNumRecordDO
.
getNum
().
intValue
()
<=
9999
)
{
if
(
boxMergePkgNumRecordDO
.
getNum
().
intValue
()
<=
9999
)
{
createReqVO
.
setPkgNum
(
code
+
year
+
df
.
format
(
boxMergePkgNumRecordDO
.
getNum
()));
createReqVO
.
setPkgNum
(
code
+
year
+
df
.
format
(
boxMergePkgNumRecordDO
.
getNum
()));
}
else
{
createReqVO
.
setPkgNum
(
code
+
year
+
String
.
valueOf
(
boxMergePkgNumRecordDO
.
getNum
()));
}
//lanbm 2024-06-15 添加箱码是否重复的校验功能
BoxMergePkgDO
boxMergePkg
=
BoxMergePkgConvert
.
INSTANCE
.
convert
(
createReqVO
);
if
(
isHavingBoxCod
(
boxMergePkg
.
getPkgNum
())
==
0
)
{
boxMergePkgMapper
.
insert
(
boxMergePkg
);
}
else
{
}
else
{
createReqVO
.
setPkgNum
(
code
+
year
+
String
.
valueOf
(
boxMergePkgNumRecordDO
.
getNum
()));
String
sBox
=
boxMergePkg
.
getPkgNum
();
boxMergePkg
.
setPkgNum
(
sBox
+
"F"
);
boxMergePkgMapper
.
insert
(
boxMergePkg
);
}
}
BoxMergePkgDO
boxMergePkg
=
BoxMergePkgConvert
.
INSTANCE
.
convert
(
createReqVO
);
boxMergePkgMapper
.
insert
(
boxMergePkg
);
boxMergePkgNumRecordDO
.
setNum
(
boxMergePkgNumRecordDO
.
getNum
()
+
1
);
boxMergePkgNumRecordDO
.
setNum
(
boxMergePkgNumRecordDO
.
getNum
()
+
1
);
}
}
boxMergePkgNumRecordDO
.
setUpdateTime
(
new
Date
());
boxMergePkgNumRecordMapper
.
updateById
(
boxMergePkgNumRecordDO
);
boxMergePkgNumRecordMapper
.
updateById
(
boxMergePkgNumRecordDO
);
// 返回
// 返回
return
"success"
;
return
"success"
;
}
}
//lanbm 2024-06-15 add
private
long
isHavingBoxCod
(
String
sBoxCode
)
{
LambdaQueryWrapperX
q1
=
new
LambdaQueryWrapperX
<
BoxMergePkgDO
>().
eq
(
BoxMergePkgDO:
:
getPkgNum
,
sBoxCode
);
Long
lH
=
boxMergePkgMapper
.
selectCount
(
q1
);
return
lH
;
}
@Override
@Override
public
void
updateBoxMergePkg
(
BoxMergePkgUpdateReqVO
updateReqVO
)
{
public
void
updateBoxMergePkg
(
BoxMergePkgUpdateReqVO
updateReqVO
)
{
// 校验存在
// 校验存在
...
@@ -189,7 +212,7 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
...
@@ -189,7 +212,7 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
// 删除
// 删除
boxMergePkgMapper
.
deleteById
(
id
);
boxMergePkgMapper
.
deleteById
(
id
);
boxOrderCheckInfoService
.
remove
(
new
LambdaQueryWrapperX
<
BoxOrderCheckInfoDO
>()
boxOrderCheckInfoService
.
remove
(
new
LambdaQueryWrapperX
<
BoxOrderCheckInfoDO
>()
.
eq
(
BoxOrderCheckInfoDO:
:
getPkgId
,
id
)
.
eq
(
BoxOrderCheckInfoDO:
:
getPkgId
,
id
)
);
);
}
}
...
@@ -213,7 +236,7 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
...
@@ -213,7 +236,7 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
public
PageResult
<
BoxMergePkgPageDto
>
getBoxMergePkgPage
(
BoxMergePkgQueryVO
query
,
PageVO
page
)
{
public
PageResult
<
BoxMergePkgPageDto
>
getBoxMergePkgPage
(
BoxMergePkgQueryVO
query
,
PageVO
page
)
{
page
.
setField
(
"t.id"
);
page
.
setField
(
"t.id"
);
IPage
<
BoxMergePkgPageDto
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
IPage
<
BoxMergePkgPageDto
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
boxMergePkgMapper
.
getBoxMergePkgPage
(
mpPage
,
query
);
boxMergePkgMapper
.
getBoxMergePkgPage
(
mpPage
,
query
);
return
PageResult
.
of
(
mpPage
);
return
PageResult
.
of
(
mpPage
);
}
}
...
@@ -278,81 +301,85 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
...
@@ -278,81 +301,85 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
@Override
@Override
public
PageResult
<
BoxMergePkgWebVO
>
getUnPkgPage
(
PageVO
page
,
Long
shipmentId
)
{
public
PageResult
<
BoxMergePkgWebVO
>
getUnPkgPage
(
PageVO
page
,
Long
shipmentId
)
{
PageResult
<
BoxMergePkgWebVO
>
pageResult
=
new
PageResult
<>();
PageResult
<
BoxMergePkgWebVO
>
pageResult
=
new
PageResult
<>();
//全部要装的箱子
//全部要装的箱子
List
<
BoxOrderCheckInfoDO
>
tagList
=
new
ArrayList
<>();
List
<
BoxOrderCheckInfoDO
>
tagList
=
new
ArrayList
<>();
//全部要装箱的订单
//全部要装箱的订单
List
<
BoxOrderInstallVO
>
orderInstallVOList
=
boxMergePkgMapper
.
getBoxOrderInstallVo
(
shipmentId
);
List
<
BoxOrderInstallVO
>
orderInstallVOList
=
List
<
Long
>
allOrderIds
=
new
ArrayList
<>()
;
boxMergePkgMapper
.
getBoxOrderInstallVo
(
shipmentId
);
if
(
CollectionUtil
.
isNotEmpty
(
orderInstallVOList
)){
List
<
Long
>
allOrderIds
=
new
ArrayList
<>();
orderInstallVOList
.
forEach
(
o
->{
if
(
CollectionUtil
.
isNotEmpty
(
orderInstallVOList
))
{
OrderDO
order
=
new
OrderDO
()
;
orderInstallVOList
.
forEach
(
o
->
{
BeanUtils
.
copyProperties
(
o
,
order
);
OrderDO
order
=
new
OrderDO
();
List
<
BoxOrderCheckInfoDO
>
tags
=
boxOrderCheckInfoService
.
getOrderTagNumList
(
order
);
BeanUtils
.
copyProperties
(
o
,
order
);
tagList
.
addAll
(
tags
)
;
List
<
BoxOrderCheckInfoDO
>
tags
=
allOrderIds
.
add
(
o
.
getOrderId
())
;
boxOrderCheckInfoService
.
getOrderTagNumList
(
order
);
tagList
.
addAll
(
tags
);
allOrderIds
.
add
(
o
.
getOrderId
());
});
});
}
}
//一个箱子的只要判断在 ecw_box_pkg_order 表有数据就可以,多个实装箱子的,要在合包标签表ecw_box_order_check_info 判断还有哪个箱子没装
//一个箱子的只要判断在 ecw_box_pkg_order 表有数据就可以,多个实装箱子的,要在合包标签表ecw_box_order_check_info 判断还有哪个箱子没装
//已加入装箱列表的有哪些
//已加入装箱列表的有哪些
List
<
BoxMergePkgWebVO
>
allBoxPgkOrder
=
boxMergePkgMapper
.
getAllBoxPgkOrder
(
shipmentId
,
allOrderIds
)
;
List
<
BoxMergePkgWebVO
>
allBoxPgkOrder
=
boxMergePkgMapper
.
getAllBoxPgkOrder
(
shipmentId
,
allOrderIds
);
//已加入合包标签表的有哪些
//已加入合包标签表的有哪些
List
<
BoxOrderCheckInfoDO
>
allBoxOrderCheck
=
boxMergePkgMapper
.
getAlllBoxOrderCheck
(
shipmentId
,
allOrderIds
)
;
List
<
BoxOrderCheckInfoDO
>
allBoxOrderCheck
=
boxMergePkgMapper
.
getAlllBoxOrderCheck
(
shipmentId
,
allOrderIds
);
//剔除数据,留下 带”-“ 还未装的
//剔除数据,留下 带”-“ 还未装的
//加入已装箱列表但未加入合包标签表的
//加入已装箱列表但未加入合包标签表的
List
<
BoxMergePkgWebVO
>
noInBoxOrderCheck
=
new
ArrayList
<>()
;
List
<
BoxMergePkgWebVO
>
noInBoxOrderCheck
=
new
ArrayList
<>();
List
<
Long
>
unInstallOrderList
=
new
ArrayList
<>()
;
List
<
Long
>
unInstallOrderList
=
new
ArrayList
<>();
//已加入装箱列表不为空,提取不在已装箱列表的数据
//已加入装箱列表不为空,提取不在已装箱列表的数据
if
(
CollectionUtil
.
isNotEmpty
(
allBoxPgkOrder
)
&&
CollectionUtil
.
isNotEmpty
(
allBoxOrderCheck
))
{
if
(
CollectionUtil
.
isNotEmpty
(
allBoxPgkOrder
)
&&
CollectionUtil
.
isNotEmpty
(
allBoxOrderCheck
))
{
List
<
BoxMergePkgWebVO
>
pkgWebVOS
=
allBoxPgkOrder
.
stream
().
filter
(
item
->
!
allBoxOrderCheck
.
stream
().
anyMatch
(
ins
->
item
.
getOrderId
().
equals
(
ins
.
getOrderId
())
||
item
.
getOrderId
()==
ins
.
getOrderId
()))
.
collect
(
Collectors
.
toList
());
List
<
BoxMergePkgWebVO
>
pkgWebVOS
=
allBoxPgkOrder
.
stream
().
filter
(
item
->
!
allBoxOrderCheck
.
stream
().
anyMatch
(
ins
->
item
.
getOrderId
().
equals
(
ins
.
getOrderId
())
||
item
.
getOrderId
()
==
ins
.
getOrderId
()))
.
collect
(
Collectors
.
toList
());
noInBoxOrderCheck
.
addAll
(
pkgWebVOS
)
;
noInBoxOrderCheck
.
addAll
(
pkgWebVOS
)
;
List
<
BoxOrderCheckInfoDO
>
collect
=
tagList
.
stream
().
filter
(
item
->
!
allBoxOrderCheck
.
stream
().
anyMatch
(
ins
->
item
.
getOrderNumCode
().
equals
(
ins
.
getOrderNumCode
())))
.
collect
(
Collectors
.
toList
());
List
<
BoxOrderCheckInfoDO
>
collect
=
tagList
.
stream
().
filter
(
item
->
!
allBoxOrderCheck
.
stream
().
anyMatch
(
ins
->
item
.
getOrderNumCode
().
equals
(
ins
.
getOrderNumCode
())))
.
collect
(
Collectors
.
toList
());
if
(
CollectionUtil
.
isNotEmpty
(
collect
))
{
if
(
CollectionUtil
.
isNotEmpty
(
collect
))
{
List
<
BoxOrderCheckInfoDO
>
checkInfoDOS
=
collect
.
stream
().
filter
(
item
->
!
pkgWebVOS
.
stream
().
anyMatch
(
ins
->
item
.
getOrderId
().
equals
(
ins
.
getOrderId
())
||
item
.
getOrderId
()==
ins
.
getOrderId
()))
.
collect
(
Collectors
.
toList
());
List
<
BoxOrderCheckInfoDO
>
checkInfoDOS
=
collect
.
stream
().
filter
(
item
->
!
pkgWebVOS
.
stream
().
anyMatch
(
ins
->
item
.
getOrderId
().
equals
(
ins
.
getOrderId
())
||
item
.
getOrderId
()
==
ins
.
getOrderId
()))
.
collect
(
Collectors
.
toList
());
List
<
Long
>
orderIdList
=
checkInfoDOS
.
stream
().
map
(
s
->
s
.
getOrderId
()).
collect
(
Collectors
.
toList
());
List
<
Long
>
orderIdList
=
checkInfoDOS
.
stream
().
map
(
s
->
s
.
getOrderId
()).
collect
(
Collectors
.
toList
());
unInstallOrderList
.
addAll
(
orderIdList
);
unInstallOrderList
.
addAll
(
orderIdList
);
}
}
}
else
if
(
CollectionUtil
.
isNotEmpty
(
allBoxPgkOrder
)
&&
CollectionUtil
.
isEmpty
(
allBoxOrderCheck
))
{
}
else
if
(
CollectionUtil
.
isNotEmpty
(
allBoxPgkOrder
)
&&
CollectionUtil
.
isEmpty
(
allBoxOrderCheck
))
{
if
(
orderInstallVOList
.
size
()==
allBoxPgkOrder
.
size
())
{
if
(
orderInstallVOList
.
size
()
==
allBoxPgkOrder
.
size
())
{
// List<Long> orderIdList = allBoxPgkOrder.stream().map(s->s.getOrderId()).collect(Collectors.toList());
// List<Long> orderIdList = allBoxPgkOrder.stream().map(s->s.getOrderId()).collect(Collectors.toList());
// unInstallOrderList.addAll(orderIdList);
// unInstallOrderList.addAll(orderIdList);
}
else
{
}
else
{
List
<
BoxOrderInstallVO
>
info
=
orderInstallVOList
.
stream
().
filter
(
item
->
!
allBoxPgkOrder
.
stream
().
anyMatch
(
ins
->
item
.
getOrderId
().
equals
(
ins
.
getOrderId
())
||
item
.
getOrderId
()==
ins
.
getOrderId
()))
.
collect
(
Collectors
.
toList
());
List
<
BoxOrderInstallVO
>
info
=
orderInstallVOList
.
stream
().
filter
(
item
->
!
allBoxPgkOrder
.
stream
().
anyMatch
(
ins
->
item
.
getOrderId
().
equals
(
ins
.
getOrderId
())
||
item
.
getOrderId
()
==
ins
.
getOrderId
())).
collect
(
Collectors
.
toList
());
List
<
Long
>
orderIdList
=
info
.
stream
().
map
(
s
->
s
.
getOrderId
()).
collect
(
Collectors
.
toList
());
List
<
Long
>
orderIdList
=
info
.
stream
().
map
(
s
->
s
.
getOrderId
()).
collect
(
Collectors
.
toList
());
unInstallOrderList
.
addAll
(
orderIdList
);
}
}
else
if
(
CollectionUtil
.
isEmpty
(
allBoxPgkOrder
)
&&
CollectionUtil
.
isEmpty
(
allBoxOrderCheck
))
{
List
<
BoxOrderInstallVO
>
info
=
orderInstallVOList
.
stream
().
filter
(
item
->
!
allBoxPgkOrder
.
stream
().
anyMatch
(
ins
->
item
.
getOrderId
().
equals
(
ins
.
getOrderId
())
||
item
.
getOrderId
()==
ins
.
getOrderId
()))
.
collect
(
Collectors
.
toList
());
List
<
Long
>
orderIdList
=
info
.
stream
().
map
(
s
->
s
.
getOrderId
()).
collect
(
Collectors
.
toList
());
unInstallOrderList
.
addAll
(
orderIdList
);
unInstallOrderList
.
addAll
(
orderIdList
);
}
else
if
(
CollectionUtil
.
isEmpty
(
allBoxPgkOrder
)
&&
CollectionUtil
.
isNotEmpty
(
allBoxOrderCheck
)){
throw
exception
(
ORDER_NOT_IN_BOX
);
}
}
IPage
page1
=
new
PageDTO
(
page
.
getPage
(),
page
.
getRows
());
}
else
if
(
CollectionUtil
.
isEmpty
(
allBoxPgkOrder
)
&&
CollectionUtil
.
isEmpty
(
allBoxOrderCheck
))
{
if
(
CollectionUtil
.
isNotEmpty
(
unInstallOrderList
)){
//剩余未装箱订单
List
<
BoxOrderInstallVO
>
info
=
orderInstallVOList
.
stream
().
filter
(
item
->
!
allBoxPgkOrder
.
stream
().
anyMatch
(
ins
->
item
.
getOrderId
().
equals
(
ins
.
getOrderId
())
||
item
.
getOrderId
()
==
ins
.
getOrderId
())).
collect
(
Collectors
.
toList
());
IPage
<
BoxMergePkgWebVO
>
boxMergePkgWebVOS
=
boxMergePkgMapper
.
getUnPkgPage
(
page1
,
shipmentId
,
unInstallOrderList
);
List
<
Long
>
orderIdList
=
info
.
stream
().
map
(
s
->
s
.
getOrderId
()).
collect
(
Collectors
.
toList
());
unInstallOrderList
.
addAll
(
orderIdList
);
}
else
if
(
CollectionUtil
.
isEmpty
(
allBoxPgkOrder
)
&&
CollectionUtil
.
isNotEmpty
(
allBoxOrderCheck
))
{
throw
exception
(
ORDER_NOT_IN_BOX
);
}
IPage
page1
=
new
PageDTO
(
page
.
getPage
(),
page
.
getRows
());
if
(
CollectionUtil
.
isNotEmpty
(
unInstallOrderList
))
{
//剩余未装箱订单
IPage
<
BoxMergePkgWebVO
>
boxMergePkgWebVOS
=
boxMergePkgMapper
.
getUnPkgPage
(
page1
,
shipmentId
,
unInstallOrderList
);
getUnOrderInfoPageResult
(
pageResult
,
boxMergePkgWebVOS
,
shipmentId
);
getUnOrderInfoPageResult
(
pageResult
,
boxMergePkgWebVOS
,
shipmentId
);
}
else
{
//没有剩余未装箱数据
}
else
{
//没有剩余未装箱数据
List
<
Long
>
orderIdList
=
orderInstallVOList
.
stream
().
map
(
s
->
s
.
getOrderId
()).
collect
(
Collectors
.
toList
());
List
<
Long
>
orderIdList
=
orderInstallVOList
.
stream
().
map
(
s
->
s
.
getOrderId
()).
collect
(
Collectors
.
toList
());
List
<
Long
>
installOrderList
=
new
ArrayList
<>();
List
<
Long
>
installOrderList
=
new
ArrayList
<>();
installOrderList
.
addAll
(
orderIdList
)
;
installOrderList
.
addAll
(
orderIdList
);
IPage
<
BoxMergePkgWebVO
>
boxMergePkgWebVOS
=
boxMergePkgMapper
.
getUnPkgPage2
(
page1
,
shipmentId
,
installOrderList
);
IPage
<
BoxMergePkgWebVO
>
boxMergePkgWebVOS
=
boxMergePkgMapper
.
getUnPkgPage2
(
page1
,
shipmentId
,
installOrderList
);
getUnOrderInfoPageResult
(
pageResult
,
boxMergePkgWebVOS
,
shipmentId
);
getUnOrderInfoPageResult
(
pageResult
,
boxMergePkgWebVOS
,
shipmentId
);
}
}
return
pageResult
;
return
pageResult
;
...
@@ -361,10 +388,10 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
...
@@ -361,10 +388,10 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
@Override
@Override
public
PageResult
<
BoxMergePkgWebVO
>
getPkgPageByPkgId
(
BoxMergePkgUpdateReqVO
boxMergePkgUpdateReqVO
,
PageVO
page
)
{
public
PageResult
<
BoxMergePkgWebVO
>
getPkgPageByPkgId
(
BoxMergePkgUpdateReqVO
boxMergePkgUpdateReqVO
,
PageVO
page
)
{
PageResult
<
BoxMergePkgWebVO
>
pageResult
=
new
PageResult
<>();
PageResult
<
BoxMergePkgWebVO
>
pageResult
=
new
PageResult
<>();
IPage
page1
=
new
PageDTO
(
page
.
getPage
(),
page
.
getRows
());
IPage
page1
=
new
PageDTO
(
page
.
getPage
(),
page
.
getRows
());
Long
pkgId
=
boxMergePkgUpdateReqVO
.
getId
();
Long
pkgId
=
boxMergePkgUpdateReqVO
.
getId
();
BoxMergePkgDO
boxMergePkgDO
=
boxMergePkgMapper
.
selectOne
(
BoxMergePkgDO:
:
getId
,
pkgId
);
BoxMergePkgDO
boxMergePkgDO
=
boxMergePkgMapper
.
selectOne
(
BoxMergePkgDO:
:
getId
,
pkgId
);
IPage
<
BoxMergePkgWebVO
>
boxMergePkgWebVOS
=
boxMergePkgMapper
.
getPkgPageByPkgId
(
page1
,
boxMergePkgDO
);
IPage
<
BoxMergePkgWebVO
>
boxMergePkgWebVOS
=
boxMergePkgMapper
.
getPkgPageByPkgId
(
page1
,
boxMergePkgDO
);
boxMergePkgWebVOS
.
getRecords
().
stream
().
forEach
(
item
->
item
.
setPkgNum
(
boxMergePkgDO
.
getPkgNum
()));
boxMergePkgWebVOS
.
getRecords
().
stream
().
forEach
(
item
->
item
.
setPkgNum
(
boxMergePkgDO
.
getPkgNum
()));
getOrderInfoPageResult
(
pageResult
,
boxMergePkgWebVOS
);
getOrderInfoPageResult
(
pageResult
,
boxMergePkgWebVOS
);
return
pageResult
;
return
pageResult
;
...
@@ -382,7 +409,7 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
...
@@ -382,7 +409,7 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
@Override
@Override
public
void
finishMergePkg
(
Long
shipmentId
)
{
public
void
finishMergePkg
(
Long
shipmentId
)
{
BoxDO
boxDO
=
boxService
.
getBox
(
shipmentId
);
BoxDO
boxDO
=
boxService
.
getBox
(
shipmentId
);
if
(
boxDO
==
null
)
{
if
(
boxDO
==
null
)
{
throw
exception
(
BOX_NOT_EXISTS
);
throw
exception
(
BOX_NOT_EXISTS
);
}
}
checkBoxApproval
(
shipmentId
);
checkBoxApproval
(
shipmentId
);
...
@@ -393,7 +420,7 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
...
@@ -393,7 +420,7 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
}
}
int
mergePkgStatus
=
boxDO
.
getMergePkgStatus
();
int
mergePkgStatus
=
boxDO
.
getMergePkgStatus
();
MergePkgStatusEnum
merge
=
MergePkgStatusEnum
.
MERGED
;
MergePkgStatusEnum
merge
=
MergePkgStatusEnum
.
MERGED
;
if
(
mergePkgStatus
!=
merge
.
getStatus
())
{
if
(
mergePkgStatus
!=
merge
.
getStatus
())
{
boxDO
.
setMergePkgStatus
(
merge
.
getStatus
());
boxDO
.
setMergePkgStatus
(
merge
.
getStatus
());
//修改订单状态
//修改订单状态
...
@@ -412,7 +439,7 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
...
@@ -412,7 +439,7 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
@Override
@Override
public
BoxMergePkgTagVO
getMergeTagById
(
Long
id
)
{
public
BoxMergePkgTagVO
getMergeTagById
(
Long
id
)
{
BoxMergePkgTagVO
boxMergePkgTagVO
=
new
BoxMergePkgTagVO
();
BoxMergePkgTagVO
boxMergePkgTagVO
=
new
BoxMergePkgTagVO
();
String
partPath
=
"airTag/"
+
DateUtils
.
formatDate
(
new
Date
());
String
partPath
=
"airTag/"
+
DateUtils
.
formatDate
(
new
Date
());
BoxMergePkgDO
boxMergePkgDO
=
boxMergePkgMapper
.
selectById
(
id
);
BoxMergePkgDO
boxMergePkgDO
=
boxMergePkgMapper
.
selectById
(
id
);
BoxDO
box
=
boxService
.
getBox
(
boxMergePkgDO
.
getShipmentId
());
BoxDO
box
=
boxService
.
getBox
(
boxMergePkgDO
.
getShipmentId
());
WarehouseDO
startWarehouse
=
warehouseService
.
getWarehouse
(
box
.
getStartWarehouseId
());
WarehouseDO
startWarehouse
=
warehouseService
.
getWarehouse
(
box
.
getStartWarehouseId
());
...
@@ -430,7 +457,7 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
...
@@ -430,7 +457,7 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
ByteArrayOutputStream
outputStream
=
new
ByteArrayOutputStream
();
ByteArrayOutputStream
outputStream
=
new
ByteArrayOutputStream
();
try
{
try
{
QRCode
.
generateQRCodeImage
(
boxMergePkgDO
.
getPkgNum
(),
350
,
350
,
outputStream
);
QRCode
.
generateQRCodeImage
(
boxMergePkgDO
.
getPkgNum
(),
350
,
350
,
outputStream
);
String
url
=
fileApi
.
createFile
(
partPath
+
"/"
+
UUID
.
fastUUID
().
toString
(),
outputStream
.
toByteArray
());
String
url
=
fileApi
.
createFile
(
partPath
+
"/"
+
UUID
.
fastUUID
().
toString
(),
outputStream
.
toByteArray
());
boxMergePkgTagVO
.
setQrCodeUrl
(
url
);
boxMergePkgTagVO
.
setQrCodeUrl
(
url
);
//需求修改,不需要条码
//需求修改,不需要条码
// String barcodeUrl = fileApi.createFile(BarcodeUtil.generateBarCode39("https://groupage.cn/", null, null, null, false, null));
// String barcodeUrl = fileApi.createFile(BarcodeUtil.generateBarCode39("https://groupage.cn/", null, null, null, false, null));
...
@@ -498,17 +525,17 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
...
@@ -498,17 +525,17 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
.
map
(
DeptWarehouseDO:
:
getWarehouseId
)
.
map
(
DeptWarehouseDO:
:
getWarehouseId
)
.
collect
(
Collectors
.
toSet
());
.
collect
(
Collectors
.
toSet
());
IPage
<
BoxMergePkgPDAListVO
>
result
=
boxMergePkgMapper
.
getBoxMergePkgList4PDAPage
(
mpPage
,
warehouseIds
,
selfNo
);
IPage
<
BoxMergePkgPDAListVO
>
result
=
boxMergePkgMapper
.
getBoxMergePkgList4PDAPage
(
mpPage
,
warehouseIds
,
selfNo
);
result
.
getRecords
().
stream
().
forEach
(
item
->{
result
.
getRecords
().
stream
().
forEach
(
item
->
{
BoxGoodsStatistics
boxStatistics
=
boxPreloadGoodsService
.
getBoxStatistics
(
item
.
getId
());
BoxGoodsStatistics
boxStatistics
=
boxPreloadGoodsService
.
getBoxStatistics
(
item
.
getId
());
BeanUtils
.
copyProperties
(
boxStatistics
,
item
);
BeanUtils
.
copyProperties
(
boxStatistics
,
item
);
});
});
return
PageResult
.
of
(
result
);
return
PageResult
.
of
(
result
);
}
}
@Override
@Override
public
void
closeMergePkg
(
BoxMergePkgUpdateReqVO
updateReqVO
)
{
public
void
closeMergePkg
(
BoxMergePkgUpdateReqVO
updateReqVO
)
{
boxService
.
checkOrderTagNum
(
updateReqVO
.
getId
(),
1
);
boxService
.
checkOrderTagNum
(
updateReqVO
.
getId
(),
1
);
this
.
updateBoxMergePkg
(
updateReqVO
);
this
.
updateBoxMergePkg
(
updateReqVO
);
}
}
...
@@ -529,24 +556,24 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
...
@@ -529,24 +556,24 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
pageResult
.
setTotal
(
boxMergePkgWebVOIPage
.
getTotal
());
pageResult
.
setTotal
(
boxMergePkgWebVOIPage
.
getTotal
());
}
}
private
void
getUnOrderInfoPageResult
(
PageResult
<
BoxMergePkgWebVO
>
pageResult
,
IPage
<
BoxMergePkgWebVO
>
boxMergePkgWebVOIPage
,
Long
shipmentId
)
{
private
void
getUnOrderInfoPageResult
(
PageResult
<
BoxMergePkgWebVO
>
pageResult
,
IPage
<
BoxMergePkgWebVO
>
boxMergePkgWebVOIPage
,
Long
shipmentId
)
{
if
(
CollectionUtil
.
isNotEmpty
(
boxMergePkgWebVOIPage
.
getRecords
()))
{
if
(
CollectionUtil
.
isNotEmpty
(
boxMergePkgWebVOIPage
.
getRecords
()))
{
List
<
Long
>
orderIdList
=
boxMergePkgWebVOIPage
.
getRecords
().
stream
().
map
(
o
->
o
.
getOrderId
()).
collect
(
Collectors
.
toList
());
List
<
Long
>
orderIdList
=
boxMergePkgWebVOIPage
.
getRecords
().
stream
().
map
(
o
->
o
.
getOrderId
()).
collect
(
Collectors
.
toList
());
List
<
OrderItemDO
>
AllOrderItemDOS
=
orderItemService
.
selectList
(
new
LambdaQueryWrapperX
<
OrderItemDO
>()
List
<
OrderItemDO
>
AllOrderItemDOS
=
orderItemService
.
selectList
(
new
LambdaQueryWrapperX
<
OrderItemDO
>()
.
in
(
OrderItemDO:
:
getOrderId
,
orderIdList
)
.
in
(
OrderItemDO:
:
getOrderId
,
orderIdList
)
.
isNotNull
(
OrderItemDO:
:
getWarehouseInInfo
)
.
isNotNull
(
OrderItemDO:
:
getWarehouseInInfo
)
);
);
boxMergePkgWebVOIPage
.
getRecords
().
stream
().
forEach
(
item
->
{
boxMergePkgWebVOIPage
.
getRecords
().
stream
().
forEach
(
item
->
{
// List<OrderItemDO> orderItemDOS = orderItemService.selectList(new LambdaQueryWrapperX<OrderItemDO>()
// List<OrderItemDO> orderItemDOS = orderItemService.selectList(new LambdaQueryWrapperX<OrderItemDO>()
// .eq(OrderItemDO::getOrderId, item.getOrderId())
// .eq(OrderItemDO::getOrderId, item.getOrderId())
// .isNotNull(OrderItemDO::getWarehouseInInfo)
// .isNotNull(OrderItemDO::getWarehouseInInfo)
// );
// );
List
<
OrderItemDO
>
orderItemDOS
=
AllOrderItemDOS
.
stream
().
filter
(
all
->
all
.
getOrderId
()
==
item
.
getOrderId
()
||
all
.
getOrderId
().
equals
(
item
.
getOrderId
()))
.
collect
(
Collectors
.
toList
());
List
<
OrderItemDO
>
orderItemDOS
=
AllOrderItemDOS
.
stream
().
filter
(
all
->
all
.
getOrderId
()
==
item
.
getOrderId
()
||
all
.
getOrderId
().
equals
(
item
.
getOrderId
()))
.
collect
(
Collectors
.
toList
());
List
<
BoxOrderCheckInfoDO
>
installBox
=
boxMergePkgMapper
.
getInstallBoxByShipmentId
(
shipmentId
,
item
.
getOrderId
())
;
List
<
BoxOrderCheckInfoDO
>
installBox
=
boxMergePkgMapper
.
getInstallBoxByShipmentId
(
shipmentId
,
item
.
getOrderId
())
;
item
.
setInstallNum
(
CollectionUtil
.
isNotEmpty
(
installBox
)
?
installBox
.
size
()
:
0
);
item
.
setInstallNum
(
CollectionUtil
.
isNotEmpty
(
installBox
)
?
installBox
.
size
()
:
0
);
item
.
setOrderItemDOS
(
orderItemDOS
);
item
.
setOrderItemDOS
(
orderItemDOS
);
});
});
pageResult
.
setList
(
boxMergePkgWebVOIPage
.
getRecords
());
pageResult
.
setList
(
boxMergePkgWebVOIPage
.
getRecords
());
...
@@ -556,7 +583,8 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
...
@@ -556,7 +583,8 @@ public class BoxMergePkgServiceImpl extends AbstractService<BoxMergePkgMapper, B
pageResult
.
setRows
(
boxMergePkgWebVOIPage
.
getSize
());
pageResult
.
setRows
(
boxMergePkgWebVOIPage
.
getSize
());
pageResult
.
setTotal
(
boxMergePkgWebVOIPage
.
getTotal
());
pageResult
.
setTotal
(
boxMergePkgWebVOIPage
.
getTotal
());
}
}
private
void
checkBoxApproval
(
Long
shipmentId
){
private
void
checkBoxApproval
(
Long
shipmentId
)
{
BoxDO
box
=
boxService
.
getBox
(
shipmentId
);
BoxDO
box
=
boxService
.
getBox
(
shipmentId
);
if
(
box
.
getAirShipmentStatus
()
!=
AirShipmentStatusEnum
.
UNSHIPMENT
.
getStatus
())
{
if
(
box
.
getAirShipmentStatus
()
!=
AirShipmentStatusEnum
.
UNSHIPMENT
.
getStatus
())
{
throw
exception
(
MERGE_PKG_IS_FINISH
);
throw
exception
(
MERGE_PKG_IS_FINISH
);
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/boxOrderCheckInfo/BoxOrderCheckInfoServiceImpl.java
View file @
84e75508
...
@@ -675,7 +675,8 @@ public class BoxOrderCheckInfoServiceImpl extends AbstractService<BoxOrderCheckI
...
@@ -675,7 +675,8 @@ public class BoxOrderCheckInfoServiceImpl extends AbstractService<BoxOrderCheckI
return
tagList
;
return
tagList
;
}
}
private
List
<
BoxOrderCheckInfoDO
>
getOrderTagNumCaseList
(
OrderDO
orderDO
,
List
<
OrderLabelDO
>
orderLabelList
)
{
private
List
<
BoxOrderCheckInfoDO
>
getOrderTagNumCaseList
(
OrderDO
orderDO
,
List
<
OrderLabelDO
>
orderLabelList
)
{
//从OrderLabel里面查找订单的箱号
//从OrderLabel里面查找订单的箱号
String
orderNo
=
orderDO
.
getOrderNo
();
String
orderNo
=
orderDO
.
getOrderNo
();
List
<
BoxOrderCheckInfoDO
>
tagList
=
new
ArrayList
<>();
List
<
BoxOrderCheckInfoDO
>
tagList
=
new
ArrayList
<>();
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/boxPreloadGoods/BoxPreloadGoodsServiceImpl.java
View file @
84e75508
...
@@ -855,7 +855,8 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
...
@@ -855,7 +855,8 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
}
}
@Override
@Override
public
BoxGoodsStatistics
calculationStatisticsByOrderList
(
Collection
<
OrderDO
>
orderDOList
)
{
public
BoxGoodsStatistics
calculationStatisticsByOrderList
(
Collection
<
OrderDO
>
orderDOList
)
{
BoxGoodsStatistics
boxGoodsStatistics
=
new
BoxGoodsStatistics
();
BoxGoodsStatistics
boxGoodsStatistics
=
new
BoxGoodsStatistics
();
if
(
CollectionUtil
.
isEmpty
(
orderDOList
))
{
if
(
CollectionUtil
.
isEmpty
(
orderDOList
))
{
return
boxGoodsStatistics
;
return
boxGoodsStatistics
;
...
@@ -865,17 +866,19 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
...
@@ -865,17 +866,19 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
BigDecimal
volumeSum
=
boxGoodsStatistics
.
getVolume
();
BigDecimal
volumeSum
=
boxGoodsStatistics
.
getVolume
();
BigDecimal
weightSum
=
boxGoodsStatistics
.
getWeight
();
BigDecimal
weightSum
=
boxGoodsStatistics
.
getWeight
();
if
(
orderDO
.
getSumNum
()
!=
null
)
{
if
(
orderDO
!=
null
)
{
numSum
+=
orderDO
.
getSumNum
();
if
(
orderDO
.
getSumNum
()
!=
null
)
{
boxGoodsStatistics
.
setNum
(
numSum
);
numSum
+=
orderDO
.
getSumNum
();
}
boxGoodsStatistics
.
setNum
(
numSum
);
if
(
orderDO
.
getSumVolume
()
!=
null
)
{
}
volumeSum
=
volumeSum
.
add
(
orderDO
.
getSumVolume
()).
setScale
(
2
,
BigDecimal
.
ROUND_DOWN
);
if
(
orderDO
.
getSumVolume
()
!=
null
)
{
boxGoodsStatistics
.
setVolume
(
volumeSum
);
volumeSum
=
volumeSum
.
add
(
orderDO
.
getSumVolume
()).
setScale
(
2
,
BigDecimal
.
ROUND_DOWN
);
}
boxGoodsStatistics
.
setVolume
(
volumeSum
);
if
(
orderDO
.
getSumWeight
()
!=
null
)
{
}
weightSum
=
weightSum
.
add
(
orderDO
.
getSumWeight
()).
setScale
(
2
,
BigDecimal
.
ROUND_DOWN
);
if
(
orderDO
.
getSumWeight
()
!=
null
)
{
boxGoodsStatistics
.
setWeight
(
weightSum
);
weightSum
=
weightSum
.
add
(
orderDO
.
getSumWeight
()).
setScale
(
2
,
BigDecimal
.
ROUND_DOWN
);
boxGoodsStatistics
.
setWeight
(
weightSum
);
}
}
}
}
}
return
boxGoodsStatistics
;
return
boxGoodsStatistics
;
...
@@ -3160,6 +3163,7 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
...
@@ -3160,6 +3163,7 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
List
<
Long
>
preloadOrderIds
=
boxPreloadGoodsDOS
.
stream
().
map
(
BoxPreloadGoodsDO:
:
getOrderId
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
Long
>
preloadOrderIds
=
boxPreloadGoodsDOS
.
stream
().
map
(
BoxPreloadGoodsDO:
:
getOrderId
).
distinct
().
collect
(
Collectors
.
toList
());
if
(
CollectionUtil
.
isNotEmpty
(
boxMergePkgDOS
))
{
if
(
CollectionUtil
.
isNotEmpty
(
boxMergePkgDOS
))
{
for
(
BoxMergePkgDO
boxMergePkgDO
:
boxMergePkgDOS
)
{
for
(
BoxMergePkgDO
boxMergePkgDO
:
boxMergePkgDOS
)
{
List
<
BoxPkgOrderDO
>
boxPkgOrderDOS
=
boxPkgOrderService
.
selectList
(
BoxPkgOrderDO:
:
getPkgId
,
boxMergePkgDO
.
getId
());
List
<
BoxPkgOrderDO
>
boxPkgOrderDOS
=
boxPkgOrderService
.
selectList
(
BoxPkgOrderDO:
:
getPkgId
,
boxMergePkgDO
.
getId
());
if
(
CollectionUtil
.
isNotEmpty
(
boxPkgOrderDOS
))
{
if
(
CollectionUtil
.
isNotEmpty
(
boxPkgOrderDOS
))
{
List
<
Long
>
orderIds
=
boxPkgOrderDOS
.
stream
().
map
(
BoxPkgOrderDO:
:
getOrderId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
orderIds
=
boxPkgOrderDOS
.
stream
().
map
(
BoxPkgOrderDO:
:
getOrderId
).
collect
(
Collectors
.
toList
());
...
...
yudao-module-shipment/yudao-module-shipment-rest/src/main/java/cn/iocoder/yudao/module/shipment/controller/admin/BoxMergePkgController.java
View file @
84e75508
...
@@ -49,7 +49,8 @@ public class BoxMergePkgController {
...
@@ -49,7 +49,8 @@ public class BoxMergePkgController {
@PostMapping
(
"/create"
)
@PostMapping
(
"/create"
)
@ApiOperation
(
"创建合包箱"
)
@ApiOperation
(
"创建合包箱"
)
//@PreAuthorize("@ss.hasPermission('ecw:box-merge-pkg:create')")
//@PreAuthorize("@ss.hasPermission('ecw:box-merge-pkg:create')")
public
CommonResult
<
String
>
createBoxMergePkg
(
@Valid
@RequestBody
BoxMergePkgCreateReqVO
createReqVO
)
{
public
CommonResult
<
String
>
createBoxMergePkg
(
@Valid
@RequestBody
BoxMergePkgCreateReqVO
createReqVO
)
{
return
success
(
boxMergePkgService
.
createBoxMergePkg
(
createReqVO
));
return
success
(
boxMergePkgService
.
createBoxMergePkg
(
createReqVO
));
}
}
...
@@ -101,7 +102,8 @@ public class BoxMergePkgController {
...
@@ -101,7 +102,8 @@ public class BoxMergePkgController {
@ApiOperation
(
"获得合包箱分页"
)
@ApiOperation
(
"获得合包箱分页"
)
//@PreAuthorize("@ss.hasPermission('ecw:box-merge-pkg:query')")
//@PreAuthorize("@ss.hasPermission('ecw:box-merge-pkg:query')")
public
CommonResult
<
PageResult
<
BoxMergePkgPageDto
>>
getBoxMergePkgPage
(
@Valid
BoxMergePkgQueryVO
query
,
PageVO
page
)
{
public
CommonResult
<
PageResult
<
BoxMergePkgPageDto
>>
getBoxMergePkgPage
(
@Valid
BoxMergePkgQueryVO
query
,
PageVO
page
)
{
PageResult
<
BoxMergePkgPageDto
>
pageResult
=
boxMergePkgService
.
getBoxMergePkgPage
(
query
,
page
);
PageResult
<
BoxMergePkgPageDto
>
pageResult
=
boxMergePkgService
.
getBoxMergePkgPage
(
query
,
page
);
return
success
(
pageResult
);
return
success
(
pageResult
);
}
}
...
@@ -109,7 +111,8 @@ public class BoxMergePkgController {
...
@@ -109,7 +111,8 @@ public class BoxMergePkgController {
@ApiOperation
(
"获得未装箱列表分页"
)
@ApiOperation
(
"获得未装箱列表分页"
)
// //@PreAuthorize("@ss.hasPermission('ecw:box-merge-pkg:query')")
// //@PreAuthorize("@ss.hasPermission('ecw:box-merge-pkg:query')")
public
CommonResult
<
PageResult
<
BoxMergePkgWebVO
>>
getUnPkgPage
(
PageVO
page
,
@RequestParam
(
"shipmentId"
)
Long
shipmentId
)
{
public
CommonResult
<
PageResult
<
BoxMergePkgWebVO
>>
getUnPkgPage
(
PageVO
page
,
@RequestParam
(
"shipmentId"
)
Long
shipmentId
)
{
PageResult
<
BoxMergePkgWebVO
>
pageResult
=
boxMergePkgService
.
getUnPkgPage
(
page
,
shipmentId
);
PageResult
<
BoxMergePkgWebVO
>
pageResult
=
boxMergePkgService
.
getUnPkgPage
(
page
,
shipmentId
);
return
success
(
pageResult
);
return
success
(
pageResult
);
}
}
...
...
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