Commit 84e75508 authored by lanbaoming's avatar lanbaoming

2024-06-17提交

parent e1b13f77
...@@ -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();
......
...@@ -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()) {
......
...@@ -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
...@@ -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);
} }
......
...@@ -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));
}
} }
} }
} }
......
...@@ -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<>();
......
...@@ -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());
......
...@@ -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);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment