Commit 84e75508 authored by lanbaoming's avatar lanbaoming

2024-06-17提交

parent e1b13f77
......@@ -140,7 +140,7 @@ public class RegionController {
@GetMapping("/getListTree")
@ApiOperation("获得区域设置列表")
// @PreAuthorize("@ss.hasPermission('ecw:region:query')")
//@PreAuthorize("@ss.hasPermission('ecw:region:query')")
public CommonResult<List<RegionRespVO>> listTree(RegionListReqVO reqVO) {
List<RegionDO> list = regionService.getSimpleDepts(reqVO);
list.sort(Comparator.comparing(RegionDO::getSort));
......@@ -173,8 +173,10 @@ public class RegionController {
@GetMapping("/getTradeCityList")
@ApiOperation("获得始发、目的城市列表")
// @PreAuthorize("@ss.hasPermission('ecw:region:query')")
public CommonResult<List<RegionRespVO>> getTradeCityList(TradeRegionListReqVO reqVO) {
//@PreAuthorize("@ss.hasPermission('ecw:region:query')")
public CommonResult<List<RegionRespVO>> getTradeCityList(
TradeRegionListReqVO reqVO) {
if (Objects.nonNull(reqVO.getChannelId())){
// 如果有渠道信息,则查询可出目的地国家下的目的地城市
QueryChannelInfoEvent channelInfoEvent = new QueryChannelInfoEvent();
......
......@@ -2401,6 +2401,13 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
int noQuoteOrAutomaticNoQuote,
OrderItemDO orderItemDO,
Integer type) {
if (orderDO == null) {
return noQuoteOrAutomaticNoQuote;
}
if (orderItemDO == null) {
return noQuoteOrAutomaticNoQuote;
}
//查询有无未报价异常 lanbm 2024-06-06 添加注释
List<OrderExceptionDO> orderNoQuoteExceptionDOList =
orderExceptionService.getPendingOrderExceptionByOrderIdAndOrderItemIdAndProdIdAndExceptionKey(
......@@ -2409,14 +2416,14 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderItemDO.getProdId(),
OrderExceptionEnum.ORDER_NO_QUOTE_EXCEPTION.getKey());
/*
if (orderItemDO.getNeedOrderInquiry() != null) {
String s = "type=" + type.toString() +
"getTransportId=" + orderDO.getTransportId().toString() +
"getNeedOrderInquiry=" + orderItemDO.getNeedOrderInquiry();
//lanbm 2024-06-06 添加的逻辑点
if (orderDO.getTransportId() == 3
&& orderItemDO.getNeedOrderInquiry() == 1) {
//lanbm 2024-06-06 添加的逻辑点 海运和空运只要是单询价都按同一套逻辑来处理
if (orderItemDO.getNeedOrderInquiry() == 1) {
//处理未报价异常,且是空运,且是单询价
if (CollectionUtil.isNotEmpty(orderNoQuoteExceptionDOList)) {
orderExceptionService.autoProcessException(orderDO.getOrderId(),
......@@ -2440,8 +2447,13 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
z.setCreatedate(new Date());
zTestMapper.insert(z);
}
} else {
zTest z = new zTest();
z.setTestname("单询价为空");
z.setCreatedate(new Date());
zTestMapper.insert(z);
}
//lanbm 2024-06-06 添加的逻辑点
*/
if (orderItemDO.getItemStatus() == -1 && !orderItemDO.getIsProd()) {
if (CollectionUtil.isEmpty(orderNoQuoteExceptionDOList)) {
......@@ -2463,11 +2475,6 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
}
noQuoteOrAutomaticNoQuote = 1;
} else {
zTest z = new zTest();
z.setTestname("测试点1");
z.setCreatedate(new Date());
zTestMapper.insert(z);
if (CollectionUtil.isNotEmpty(orderNoQuoteExceptionDOList)) {
// TODO 当其他业务补充了品名价格后,如果还有待处理的未报价异常,需要同步处理掉
orderExceptionService.autoProcessException(orderDO.getOrderId(),
......@@ -2481,31 +2488,28 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
return noQuoteOrAutomaticNoQuote;
}
private void saveLog(OrderDO orderDO,
OrderItemDO orderItemDO,
WarehouseInInfoVO warehouseInInfoVO,
Integer type)
{
Integer type) {
zTest z = new zTest();
z.setCreatedate(new Date());
if(orderDO==null)
{
if (orderDO == null) {
//订单信息为空
z.setTestname("orderDO为空");
zTestMapper.insert(z);
return;
}
if(orderItemDO==null)
{
if (orderItemDO == null) {
//订单明细为空
z.setTestname("orderItemDO为空");
zTestMapper.insert(z);
return;
}
if(warehouseInInfoVO==null)
{
if (warehouseInInfoVO == null) {
//入仓信息为空
z.setTestname("warehouseInInfoVO为空");
zTestMapper.insert(z);
......@@ -2524,11 +2528,9 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
if (Objects.nonNull(warehouseInInfoVO)) {
s += "warehouseInInfo为空";
}
else
{
} else {
s += "CartonsNum="
+warehouseInInfoVO.getCartonsNum().toString();
+ warehouseInInfoVO.getCartonsNum().toString();
}
if (Objects.nonNull(orderItemDO.getIsHandlerOrderInquiryException())) {
......@@ -2553,7 +2555,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderItemDO.getOrderItemId(),
OrderExceptionEnum.LINE_LOOP_EXCEPTION.getKey());
//saveLog(orderDO, orderItemDO, warehouseInInfoVO, type);
saveLog(orderDO, orderItemDO, warehouseInInfoVO, type);
// 避免在前面自动处理未报价异常和清关费未报价异常时的回调,优先创建了单询异常,造成并发的重复创建
if (CollectionUtil.isEmpty(orderInquiryExceptionDOList)) {
......@@ -2604,6 +2606,14 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
int noQuoteOrAutomaticNoQuote,
OrderItemDO orderItemDO,
Integer type) {
//lanbm 2024-06-17 添加的是否为空判断逻辑
if (orderDO == null) {
return noQuoteOrAutomaticNoQuote;
}
if (orderItemDO == null) {
return noQuoteOrAutomaticNoQuote;
}
// 查询是否有重量超限异常,如果有则不生成清关费异常
// TODO 查询是否有重量超限异常和渠道包装重量超限异常,如果有则不生成清关费异常
List<OrderExceptionDO> goodsOverweightExceptionDOList =
......@@ -2611,14 +2621,14 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
null,
orderItemDO.getProdId(),
CollectionUtil.newArrayList(OrderExceptionEnum.GOODS_OVERWEIGHT_EXCEPTION.getKey(), OrderExceptionEnum.LINE_WEIGHT_EXCEPTION.getKey()));
/*
if (orderItemDO.getNeedOrderInquiry() != null) {
String s = "type=" + type.toString() + " TransportId=" +
orderDO.getTransportId().toString() +
" NeedOrderInquiry=" + orderItemDO.getNeedOrderInquiry().toString();
//lanbm 2024-06-06 添加的逻辑点
if (orderDO.getTransportId() == 3
&& orderItemDO.getNeedOrderInquiry() == 1) {
//lanbm 2024-06-06 添加的逻辑点 海运和空运设置了单询价都用同一套逻辑
if (orderItemDO.getNeedOrderInquiry() == 1) {
//根据订单号查询是否有清关费异常
List<OrderExceptionDO> orderClearanceFeeNoQuoteExceptionDOList =
......@@ -2647,7 +2657,13 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
zTest z = new zTest();
z.setTestname(s);
z.setCreatedate(new Date());
}*/
}
} else {
zTest z = new zTest();
z.setTestname("单询价为空");
z.setCreatedate(new Date());
}
//end lanbm 2024-06-06 添加的逻辑点
// 渠道重量超限异常 channel_packaging_overweight_exception
......
......@@ -342,7 +342,8 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
// 判断是否有未处理的审核单
throwProcessingApproval(orderDO);
this.validateProdAttrAccess(createReqVO.getProdId(), orderDO.getOrderNo());
this.validateProdAttrAccess(createReqVO.getProdId(),
orderDO.getOrderNo());
validateWarehouseInItem(orderDO,
......@@ -381,7 +382,10 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
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()) {
......
......@@ -73,10 +73,12 @@
AND FIND_IN_SET(#{params.attrId}, ep.attr_id)
</if>
<!--运输方式-->
<if test="params.transportType != null and params.transportType != ''">
and ewl.transport_type = #{params.transportType}
</if>
<!--出货渠道-->
<if test="params.shippingChannelId != null">
and epp.shipping_channel_id = #{params.shippingChannelId}
</if>
......@@ -93,6 +95,7 @@
and epp.need_pay = #{params.needPay}
</if>
<!--价格类型 0是运费加清关费,1是全包价-->
<if test="params.priceType != null">
and epp.price_type = #{params.priceType}
</if>
......
......@@ -97,7 +97,8 @@ public class ProductPriceController {
@PutMapping("/updateAir")
@ApiOperation("更新空运路线产品")
@Idempotent(timeout = 5)
public CommonResult<Boolean> updateProductPriceAir(@Valid @RequestBody ProductPriceAirUpdateReqVO productPriceAirUpdateReqVO) {
public CommonResult<Boolean> updateProductPriceAir(
@Valid @RequestBody ProductPriceAirUpdateReqVO productPriceAirUpdateReqVO) {
productPriceService.updateProductPriceAir(productPriceAirUpdateReqVO);
return success(true);
}
......@@ -218,9 +219,14 @@ public class ProductPriceController {
@GetMapping("/page")
@ApiOperation("获得路线产品分页")
@PreAuthorize("@ss.hasPermission('ecw:product-price:query')")
public CommonResult<PageResult<ProductPriceRespVO>> getProductPricePage(@Valid ProductPricePageReqVO pageVO) {
PageResult<ProductPriceDO> pageResult = productPriceService.getProductPricePage(pageVO);
PageResult<ProductPriceRespVO> respPageResult = ProductPriceConvert.INSTANCE.convertPage(pageResult);
public CommonResult<PageResult<ProductPriceRespVO>> getProductPricePage(
@Valid ProductPricePageReqVO pageVO) {
PageResult<ProductPriceDO> pageResult =
productPriceService.getProductPricePage(pageVO);
PageResult<ProductPriceRespVO> respPageResult =
ProductPriceConvert.INSTANCE.convertPage(pageResult);
productPriceService.matchLineAndProduct(respPageResult.getList());
return success(respPageResult);
}
......
......@@ -3453,6 +3453,8 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
.map(BoxAbnormalDO::getShipmentId)
.collect(Collectors.toList());
List<BoxDO> boxList = getBoxList(shipmentIdList);
if (CollectionUtil.isNotEmpty(boxList)) {
Map<Long, BoxDO> boxMap = boxList.stream()
.collect(Collectors.toMap(BoxDO::getId, v -> v));
......@@ -3483,6 +3485,7 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
}
}
}
}
//3.agent提醒
//查找已预装未设置agent的出货
......
......@@ -675,7 +675,8 @@ public class BoxOrderCheckInfoServiceImpl extends AbstractService<BoxOrderCheckI
return tagList;
}
private List<BoxOrderCheckInfoDO> getOrderTagNumCaseList(OrderDO orderDO, List<OrderLabelDO> orderLabelList) {
private List<BoxOrderCheckInfoDO> getOrderTagNumCaseList(
OrderDO orderDO, List<OrderLabelDO> orderLabelList) {
//从OrderLabel里面查找订单的箱号
String orderNo = orderDO.getOrderNo();
List<BoxOrderCheckInfoDO> tagList = new ArrayList<>();
......
......@@ -855,7 +855,8 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
}
@Override
public BoxGoodsStatistics calculationStatisticsByOrderList(Collection<OrderDO> orderDOList) {
public BoxGoodsStatistics calculationStatisticsByOrderList(
Collection<OrderDO> orderDOList) {
BoxGoodsStatistics boxGoodsStatistics = new BoxGoodsStatistics();
if (CollectionUtil.isEmpty(orderDOList)) {
return boxGoodsStatistics;
......@@ -865,6 +866,7 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
BigDecimal volumeSum = boxGoodsStatistics.getVolume();
BigDecimal weightSum = boxGoodsStatistics.getWeight();
if(orderDO!=null) {
if (orderDO.getSumNum() != null) {
numSum += orderDO.getSumNum();
boxGoodsStatistics.setNum(numSum);
......@@ -878,6 +880,7 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
boxGoodsStatistics.setWeight(weightSum);
}
}
}
return boxGoodsStatistics;
}
......@@ -3160,6 +3163,7 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
List<Long> preloadOrderIds = boxPreloadGoodsDOS.stream().map(BoxPreloadGoodsDO::getOrderId).distinct().collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(boxMergePkgDOS)) {
for (BoxMergePkgDO boxMergePkgDO : boxMergePkgDOS) {
List<BoxPkgOrderDO> boxPkgOrderDOS = boxPkgOrderService.selectList(BoxPkgOrderDO::getPkgId, boxMergePkgDO.getId());
if (CollectionUtil.isNotEmpty(boxPkgOrderDOS)) {
List<Long> orderIds = boxPkgOrderDOS.stream().map(BoxPkgOrderDO::getOrderId).collect(Collectors.toList());
......
......@@ -49,7 +49,8 @@ public class BoxMergePkgController {
@PostMapping("/create")
@ApiOperation("创建合包箱")
//@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));
}
......@@ -101,7 +102,8 @@ public class BoxMergePkgController {
@ApiOperation("获得合包箱分页")
//@PreAuthorize("@ss.hasPermission('ecw:box-merge-pkg:query')")
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);
}
......@@ -109,7 +111,8 @@ public class BoxMergePkgController {
@ApiOperation("获得未装箱列表分页")
// //@PreAuthorize("@ss.hasPermission('ecw:box-merge-pkg:query')")
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);
}
......
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