Commit cdedca66 authored by lanbaoming's avatar lanbaoming

2024-06-25-1提交

parent 2e6cb8fd
......@@ -118,7 +118,7 @@ public class ProductPriceExceptionHandleListener {
Constant.SYSTEM_USER_ADMIN_ID);
orderExceptionResultHandlerVo.setOrderExceptionHandlerRemark("系统自动处理");
orderExceptionService.handlerExceptionByExceptionId(orderExceptionResultHandlerVo);
//end lanbm 2024-06-06 把以前的注释开启
}*/
}
......@@ -152,7 +152,7 @@ public class ProductPriceExceptionHandleListener {
//修改这些订单的未报价异常为已处理
/*
if (productPriceDO.getNeedOrderInquiry() == 1) {
//lanbm 2024-06-06 把以前的注释开启
OrderExceptionResultHandlerVo orderExceptionResultHandlerVo =
new OrderExceptionResultHandlerVo();
orderExceptionResultHandlerVo.setOrderExceptionId(orderExceptionDO.getId());
......@@ -160,7 +160,7 @@ public class ProductPriceExceptionHandleListener {
orderExceptionResultHandlerVo.setHandlerId(Constant.SYSTEM_USER_ADMIN_ID); //admin
orderExceptionResultHandlerVo.setOrderExceptionHandlerRemark("系统自动处理");
orderExceptionService.handlerExceptionByExceptionId(orderExceptionResultHandlerVo);
//end lanbm 2024-06-06 把以前的注释开启
}*/
}
......
......@@ -312,7 +312,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
}
/*
lanbm 2024-06-06 重载的函数
重载的函数
*/
@Override
@Transactional(rollbackFor = Exception.class)
......@@ -477,7 +477,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderItemMapper.selectList(new LambdaQueryWrapper<OrderItemDO>().
eq(OrderItemDO::getOrderId, orderId));
//lanbm 2024-06-06 添加的逻辑点
for (OrderItemDO oItem : orderItemDOList
) {
if (productPriceDO.getNeedOrderInquiry() == null) {
......@@ -487,7 +487,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
oItem.setNeedOrderInquiry(productPriceDO.getNeedOrderInquiry());
}
}
//end lanbm 2024-06-06 添加的逻辑点
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
......@@ -2173,6 +2173,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
//14 是批量加价
//15 是费用计算
//10 入仓更新
public void costCalculation(String userId,
OrderDO orderDO,
Long consignorCustomerId,
......@@ -2182,7 +2183,6 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
List<OrderItemDO> orderItemDOList,
Integer type) {
//2023-7月之前应收金额没有按四舍五入取整,之后都是按四舍五入取整处理的
//lanbm 2024-06-20 添加注释说明逻辑
LogisticsInfoDto logisticsInfoDto =
warehouseLineMapper.getStartInfoAndDestInfoByLineId(
......@@ -2252,7 +2252,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderDO.getOrgVolumeUnit().compareTo(BigDecimal.ZERO) == 0) {
orderDO.setOrgVolumeUnit(orgZhongPaoBestVO.getPaoEdge());
}
// 保存当前计价使用的
//保存当前计价使用的
orderDO.setUseWeightUnit(zhongPaoBestVO.getZhongEdge());
orderDO.setUseVolumeUnit(zhongPaoBestVO.getPaoEdge());
this.calculationOrderItem(orderDO, orderItemDOList, zhongPaoBestVO, event.getBubbleWeightRatio());
......@@ -2266,6 +2266,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
consignorCustomerContactsId,
consigneeCustomerContactsId,
type);
//订单中的商品列表
List<OrderItemDO> newOrderItemDOList = dto.getOrderItemDOList();
// 统计订单项品牌属性
Set<Integer> typeSet = new HashSet<>();
......@@ -2455,13 +2456,13 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
WarehouseInInfoVO warehouseInInfoVO =
orderItemDO.getWarehouseInInfoVO();
//生成未报价异常 (草稿订单除外)
//创建未报价异常 lanbm 2024-06-06 添加参数type=6,是处理价格异常
//创建未报价异常 type=6,是处理价格异常
noQuoteOrAutomaticNoQuote =
this.createOrderNoQuoteException(orderDO,
noQuoteOrAutomaticNoQuote,
orderItemDO, type);
//专线空运,海空联运 2024-06-06 添加注释
//专线空运,海空联运
if (Objects.equals(TransportTypeShortEnum.AIR_FREIGHT_LINE.getValue(),
orderDO.getTransportId())
|| Objects.equals(TransportTypeShortEnum.AIR_SEA_COMBINED_TRANSPORT.getValue(),
......@@ -2489,7 +2490,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
Objects.nonNull(warehouseInInfoVO) &&
warehouseInInfoVO.getCartonsNum() > 0) {
// 不可出渠道异常
//不可出渠道异常
this.createNoCanShipmentChannelException(orderDO,
event, item, warehouseInInfoVO,
type, orderNoCanShipmentChannelExceptionDOList);
......@@ -2684,7 +2685,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
String sNo = "";
if (orderDO.getOrderNo() != null) sNo = orderDO.getOrderNo();
String s = sNo + "未报价日志,type=" + type.toString() +
String s = sNo + "未报价日志24,type=" + type.toString() +
"getTransportId=" + orderDO.getTransportId().toString() +
"getNeedOrderInquiry=" + orderItemDO.getNeedOrderInquiry();
......@@ -2708,6 +2709,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
noQuoteOrAutomaticNoQuote = 2;
return noQuoteOrAutomaticNoQuote;
} else {
zTest z = new zTest();
z.setTestname(s);
z.setCreatedate(new Date());
......@@ -2720,7 +2722,12 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
zTestMapper.insert(z);
}
//lanbm 2024-06-06 添加的逻辑点
zTest z2 = new zTest();
z2.setTestname("处理24");
z2.setCreatedate(new Date());
zTestMapper.insert(z2);
//
if (orderItemDO.getItemStatus() == -1 && !orderItemDO.getIsProd()) {
if (CollectionUtil.isEmpty(orderNoQuoteExceptionDOList)) {
OrderExceptionCreateReqVO orderExceptionCreateReqVO =
......@@ -3216,9 +3223,15 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
* @param consigneeCustomerId 收货客户ID
* @param consignorCustomerContactsId 发货客户联系人ID
* @param consigneeCustomerContactsId 收货客户联系人ID
* @param type 类型 : 1 新增 2 修改 3 实测入仓信息 4 合单 5 拆单 6 处理未报价异常 7 特价申请 8 订单货值修改
* 9 处理重泡货异常 10 已入仓订单修改重订价 11 处理渠道异常 12 处理单询异常 13 处理超重异常 14 批量加价 15 完成入仓
* 16 分拣完成锁定价格 17 分拣反审解除锁定价格 20 强制重订价格 30 空运订单每日定时更新价格 40 订单异常处理完成更新计价 50 更新订单优惠信息
* @param type 类型 : 1 新增 2 修改 3 实测入仓信息 4 合单
* 5 拆单 6 处理未报价异常 7 特价申请 8 订单货值修改
* 9 处理重泡货异常 10 已入仓订单修改重订价 11
* 处理渠道异常 12 处理单询异常 13 处理超重异常
* 14 批量加价 15 完成入仓
* 16 分拣完成锁定价格 17 分拣反审解除锁定价格
* 20 强制重订价格 30 空运订单每日定时更新价格
* 40 订单异常处理完成更新计价
* 50 更新订单优惠信息
* @return 该运输方式下的报价商品列表信息
*/
private CalculationItemFeeDto insertOrderItemDOList(String userId, List<OrderItemDO> orderItemDOList, OrderDO orderDO,
......@@ -3263,7 +3276,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
// 如果订单项id不存在,则先保存获得订单项id
orderItemMapper.insert(orderItemDO);
}
WarehouseInInfoVO warehouseInInfoVO = orderItemDO.getWarehouseInInfoVO();
WarehouseInInfoVO warehouseInInfoVO =
orderItemDO.getWarehouseInInfoVO();
// if (type == 30 || type == 10) {
// // 空运自动刷新价格和订单修改价格变动,需要将之前的特价、渠道/单询/超限自定义价格、拆单自定义价格等全部重置
// orderItemDO.setSpecialPriceType(false);
......@@ -3303,7 +3317,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
param.setSplitCustomPriceType(Objects.nonNull(orderItemDO.getSplitCustomPriceType()) && orderItemDO.getSplitCustomPriceType());
param.setChannelManualPricing(Objects.nonNull(orderItemDO.getChannelManualPricing()) && orderItemDO.getChannelManualPricing());
// 空运订单自动刷新价格时,需要忽略这里,一律重新定价,当type等于30时是空运每日定时刷新价格,只针对待入仓、入仓中、已入仓-待出空运订单
if ((Objects.nonNull(orderItemDO.getSpecialPriceType()) && orderItemDO.getSpecialPriceType() && !orderItemDO.getIsPriced())
if ((Objects.nonNull(orderItemDO.getSpecialPriceType()) &&
orderItemDO.getSpecialPriceType() && !orderItemDO.getIsPriced())
|| (Objects.nonNull(orderItemDO.getSplitCustomPriceType()) && orderItemDO.getSplitCustomPriceType())
|| (Objects.nonNull(orderItemDO.getChannelManualPricing()) && orderItemDO.getChannelManualPricing())) {
orderItemDO.setIsPriced(Boolean.TRUE);
......@@ -3314,8 +3329,11 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
//类型 :1 新增 2 修改 3 实测入仓信息 4 合单 5 拆单 6 处理未报价异常 7 特价申请 8 订单货值修改
// 9 处理重泡货异常 10 已入仓订单修改重订价 11 处理渠道异常 12 处理单询异常 13 处理超重异常 14 批量加价 15 完成入仓
// 20 强制重订价格 30 空运订单每日定时更新价格 40 订单异常处理完成更新计价 50 更新订单优惠信息
if (type == 2 || (type == 4 && orderDO.getTransportId() == 3) || type == 6 || type == 10 || type == 20 || type == 30
|| (type == 15 && (Objects.isNull(orderDO.getParentOrderId()) || orderDO.getParentOrderId() == 0L || orderDO.getSplitSeparateOrder()))) {
if (type == 2 || (type == 4 && orderDO.getTransportId() == 3) ||
type == 6 || type == 10 || type == 20 || type == 30
|| (type == 15 && (Objects.isNull(orderDO.getParentOrderId())
|| orderDO.getParentOrderId() == 0L ||
orderDO.getSplitSeparateOrder()))) {
// 拆单后的子订单入仓不需要重新定价,但涉及了空运拆单的会标记为独立订单,走一样的逻辑
// 第一次入仓或后面的重新入仓都需要更新基础单价,特价需要在计价时单独判断,不去更新成交单价
// 未报价异常处理需要重新定价
......
......@@ -1078,10 +1078,12 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
Long orderId = finishReqVO.getOrderId();
OrderDO orderDO = orderService.getById(orderId);
if (orderDO == null) {
throw ServiceExceptionUtil.exception(ErrorCodeConstants.ORDER_NOT_EXISTS);
throw ServiceExceptionUtil.exception(
ErrorCodeConstants.ORDER_NOT_EXISTS);
}
if (OrderStatusEnum.WAREHOUSE_ADJUSTMENT.getValue().equals(orderDO.getStatus())) {
throw ServiceExceptionUtil.exception(ErrorCodeConstants.ORDER_WAREHOUSE_ADJUSTMENT_STATUS_NOT_ALLOWED_WAREHOUSE_IN);
throw ServiceExceptionUtil.exception(
ErrorCodeConstants.ORDER_WAREHOUSE_ADJUSTMENT_STATUS_NOT_ALLOWED_WAREHOUSE_IN);
}
// 判断是否有未处理的审核单
throwProcessingApproval(orderDO);
......@@ -1187,7 +1189,8 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
orderWarehouseInMapper.selectList(OrderWarehouseInDO::getOrderId,
orderDO.getOrderId());
//入仓修改或完成备货,入仓重量、备货重量变化后,按最新入仓或备货重量,重新计算泡重,按最新入仓重量与订单泡货标准重新计算泡重。
//入仓修改或完成备货,入仓重量、备货重量变化后,按最新入仓或备货重量,
// 重新计算泡重,按最新入仓重量与订单泡货标准重新计算泡重。
// 清空之前申请的固定泡重优惠,之前申请泡货标准还原到初始泡货标准。
resetSpecialVWeightAndWeightUnit(orderId, orderDO,
finishReqVO.getIsSumWeightNoChange(),
......@@ -1281,7 +1284,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
boolean firstRucang = orderDO.getRucangTime() == null;
if (firstRucang) {
//在下面的函数中完成费用计算 lanbm 2024-06-20 添加注释
//在下面的函数中完成费用计算
orderService.finishOrderWarehouseIn(orderDO.getOrderId());
} else {
orderService.finishOrderWarehouseInUpdate(orderDO.getOrderId());
......@@ -1331,7 +1334,9 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
}
}
// 针对未处理的异常,判断异常的orderItemId不在订单的orderItemList中的,需要删除异常。(说明此订单项已被删除,场景:pda的新品入仓后会生成未报价异常,又删除入仓时未删除异常)
// 针对未处理的异常,判断异常的orderItemId不在订单的orderItemList中的,
// 需要删除异常。(说明此订单项已被删除,场景:
// pda的新品入仓后会生成未报价异常,又删除入仓时未删除异常)
List<OrderExceptionDO> orderUnProcessExceptionList =
orderExceptionService.getPendingOrderExceptionByOrderIdAndOrderItemIdAndExceptionKey(orderId, null, null);
if (CollectionUtil.isNotEmpty(orderUnProcessExceptionList)) {
......@@ -1443,7 +1448,7 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
"仓库操作", msg, "");
}
//入仓完成,计算V值 lanbm 2024-05-13 add
//入仓完成,计算V值
/*27号注释掉
CalculateOrderVValueEvent event=new CalculateOrderVValueEvent();
event.setOrderId(orderId);
......
......@@ -136,7 +136,7 @@ public class OrderWarehouseInController {
public CommonResult<Boolean> finishWarehouseIn(
@Valid @RequestBody OrderWarehouseInFinishReqVO finishReqVO) {
//lanbm 2024-05-26 在此处添加注释
//完成入仓
String redisKey = MessageFormat.format(ORDER_FINISH_WAREHOUSE_IN_KEY,
finishReqVO.getOrderId().toString());
Long count = redisHelper.incrBy(redisKey, 1);
......
......@@ -3092,7 +3092,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
List<ProductPriceStepDO> allStepList = buildAllStepList(updateReqVO);
clearAndSavePriceStepList(Collections.singletonList(updateReqVO.getId()), allStepList, priceTransportTypeMap, false);
//根据价格id获取和此价格关联的订单 lanbm 2024-05-31 添加注释
//根据价格id获取和此价格关联的订单
handleOrderException(Collections.singletonList(priceId), true);
}
......
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