Merge branch 'ljl-dsPurchaseOrder'

20230922-ljl-fixBug
ljl 1 year ago
commit 4c9b25d42c

@ -863,7 +863,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
String filterPurchaseStatus = null;
if (purchaseSkuIds.isEmpty()) {
filterPurchaseStatus = PurchaseOrderConst.FILTER_PURCHASE_STATUS_WAIT_PURCHASE;
} else if (!noPurchaseSkuIds.isEmpty() && opOrderExt.getFilterPurchaseStatus() != 3) {
} else if (!noPurchaseSkuIds.isEmpty() && (opOrderExt.getFilterPurchaseStatus() == null || opOrderExt.getFilterPurchaseStatus() != 3)) {
filterPurchaseStatus = PurchaseOrderConst.FILTER_PURCHASE_STATUS_PART_PURCHASE;
} else if (noPurchaseSkuIds.isEmpty()) {
filterPurchaseStatus = PurchaseOrderConst.FILTER_PURCHASE_STATUS_HAS_PURCHASE;
@ -1051,12 +1051,11 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
purchaseOrder.setPurchaseOrderRefundMoney(new BigDecimal(0));
purchaseOrder.setPurchaseOrderBuyer(purchaseOrderDto.getPurchaseOrderBuyer());
purchaseOrder.setPurchaseOrderSeller(purchaseOrderDto.getPurchaseOrderSeller());
purchaseOrder.setPurchaseOrderStatus(purchaseOrderDto.getPurchaseOrderStatus());
purchaseOrder.setPurchaseOrderStatus(purchaseStatus);
purchaseOrder.setPurchaseOrderLogisticsName(purchaseOrderDto.getPurchaseOrderLogisticsName());
purchaseOrder.setPurchaseOrderWaybillCode(purchaseOrderDto.getPurchaseOrderWaybillCode());
purchaseOrder.setPurchaseOrderStartTime(purchaseOrderStartTime);
purchaseOrder.setPurchaseOrderSendTime(purchaseOrderSendTime);
purchaseOrder.setPurchaseOrderStatus(purchaseStatus);
purchaseOrder.setPurchaseOrderFullname(purchaseOrderDto.getPurchaseOrderFullname());
purchaseOrder.setPurchaseOrderMobile(purchaseOrderDto.getPurchaseOrderMobile());
purchaseOrder.setPurchaseOrderFullAddress(purchaseOrderDto.getPurchaseOrderFullAddress());

@ -1399,16 +1399,20 @@ public class OpOrderServiceImpl implements OpOrderService {
DateTime gmtCreateTime = DateUtil.date(apiOrder.getCreateTime() * 1000);
Integer dsRelationSourceStatus = getDsRelationSourceStatus(shopId, orderId, productToDsItems);
log.info("dsRelationSourceStatus: " + dsRelationSourceStatus);
log.info("orderStatus: " + apiOrder.getOrderStatus().intValue());
return insertUpdateOpOrderDs(shopId, orderId, apiOrder.getOrderStatus().intValue(), gmtCreateTime, dsRelationSourceStatus);
}
private Boolean insertUpdateOpOrderDs(Long shopId, String orderId, Integer orderStatus, Date gmtCreateTime, Integer dsRelationSourceStatus) {
if (ObjectUtil.isEmpty(shopId) || ObjectUtil.isEmpty(orderId) || ObjectUtil.isEmpty(orderStatus) || ObjectUtil.isEmpty(gmtCreateTime)) {
log.info("insertUpdateOpOrderDs false");
return false;
}
Integer dsPurchaseStatus = OrderConst.ORDER_STATUS_WAIT_BUYER_CONFIRM_GOODS.equals(orderStatus) ? DsOrderConst.DS_PURCHASE_STATUS_HAS_SEND : DsOrderConst.DS_PURCHASE_STATUS_WAIT_PURCHASE;
OpOrderDs existsOrderDs = opOrderDsService.getByOrderId(orderId);
if (ObjectUtil.isNotEmpty(existsOrderDs) && (existsOrderDs.getOrderStatus().equals(orderStatus) && (!ObjectUtil.isNotEmpty(dsPurchaseStatus) || dsPurchaseStatus.equals(existsOrderDs.getDsPurchaseStatus())))) {
log.info("existsOrderDs: " + existsOrderDs);
if (ObjectUtil.isNotEmpty(existsOrderDs) && existsOrderDs.getOrderStatus().equals(orderStatus) && (dsPurchaseStatus > 0 || dsPurchaseStatus.equals(existsOrderDs.getDsPurchaseStatus()))) {
log.info("insertUpdateOpOrderDs true");
return true;
}
OpOrderDs record = new OpOrderDs();

Loading…
Cancel
Save