Commit 4e38cbb1 authored by zhengyi's avatar zhengyi

空运出货批量加价只判断订单自动计算的运费与清关费应收单是否核销, 且运费加价,只判断运费应收单是否核销,而清关费加价,只判断清关费应收单是否核销

parent 41f3cd6d
...@@ -752,7 +752,7 @@ public interface BoxService extends IService<BoxDO> { ...@@ -752,7 +752,7 @@ public interface BoxService extends IService<BoxDO> {
* *
* @param orderIdList 订单列表 * @param orderIdList 订单列表
*/ */
void checkOrderPayStatus(Collection<Long> orderIdList); void checkOrderPayStatus(BoxOrderMarkUpVO vo);
void updateUlBoxTime(Long shipmentId, Date ulBoxTime); void updateUlBoxTime(Long shipmentId, Date ulBoxTime);
......
...@@ -5023,7 +5023,8 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements ...@@ -5023,7 +5023,8 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
@Override @Override
public void checkOrderPayStatus(Collection<Long> orderIds) { public void checkOrderPayStatus(BoxOrderMarkUpVO vo) {
Collection<Long> orderIds = vo.getOrderIds();
if (CollectionUtil.isEmpty(orderIds)) return; if (CollectionUtil.isEmpty(orderIds)) return;
List<ReceivableDO> receivableList = List<ReceivableDO> receivableList =
receivableService.getOrderPayList(orderIds); receivableService.getOrderPayList(orderIds);
...@@ -5031,13 +5032,18 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements ...@@ -5031,13 +5032,18 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
orderQueryService.getOrderList(orderIds); orderQueryService.getOrderList(orderIds);
Map<Long, OrderDO> orderMap = orderList.stream() Map<Long, OrderDO> orderMap = orderList.stream()
.collect(Collectors.toMap(OrderDO::getOrderId, v -> v)); .collect(Collectors.toMap(OrderDO::getOrderId, v -> v));
Boolean freightMarkUp = vo.getFreightFee().compareTo(BigDecimal.ZERO) > 0;
Boolean clearanceMarkUp = vo.getClearanceFee().compareTo(BigDecimal.ZERO) > 0;
List<String> payOrderNoList = new ArrayList<>(); List<String> payOrderNoList = new ArrayList<>();
List<ReceivableDO> newReceivableList = new ArrayList<>();
if (CollectionUtil.isNotEmpty(receivableList)) { if (CollectionUtil.isNotEmpty(receivableList)) {
Map<Long, List<ReceivableDO>> receivableMap = receivableList.stream() newReceivableList = receivableList.stream().filter(r -> r.getFeeSource() == 1
&& ((freightMarkUp && r.getFeeType() == 1) || (clearanceMarkUp && r.getFeeType() == 2))).collect(Collectors.toList());
}
if (CollectionUtil.isNotEmpty(newReceivableList)) {
// 只判断订单自动计算的运费与清关费应收单, 且运费加价,只判断运费应收单,清关费加价,只判断清关费应收单
Map<Long, List<ReceivableDO>> receivableMap = newReceivableList.stream()
.collect(Collectors.groupingBy(ReceivableDO::getOrderId)); .collect(Collectors.groupingBy(ReceivableDO::getOrderId));
for (Map.Entry<Long, for (Map.Entry<Long,
List<ReceivableDO>> entry : receivableMap.entrySet()) { List<ReceivableDO>> entry : receivableMap.entrySet()) {
......
...@@ -421,7 +421,7 @@ public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, B ...@@ -421,7 +421,7 @@ public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, B
String details = createReqVO.getDetails(); String details = createReqVO.getDetails();
BoxOrderMarkUpVO boxOrderMarkUpVO = BoxOrderMarkUpVO boxOrderMarkUpVO =
JSON.parseObject(details, BoxOrderMarkUpVO.class); JSON.parseObject(details, BoxOrderMarkUpVO.class);
boxService.checkOrderPayStatus(boxOrderMarkUpVO.getOrderIds()); boxService.checkOrderPayStatus(boxOrderMarkUpVO);
} }
//-----------------------------------------删单退场------------------------------------------- //-----------------------------------------删单退场-------------------------------------------
else if(createReqVO.getApprovalType() == BoxApprovalTypeEnum.DELETE_EXIT.getType()) { else if(createReqVO.getApprovalType() == BoxApprovalTypeEnum.DELETE_EXIT.getType()) {
...@@ -1159,23 +1159,7 @@ public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, B ...@@ -1159,23 +1159,7 @@ public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, B
String details = boxApprovalDO.getDetails(); String details = boxApprovalDO.getDetails();
BoxOrderMarkUpVO boxOrderMarkUpVO = BoxOrderMarkUpVO boxOrderMarkUpVO =
JSON.parseObject(details, BoxOrderMarkUpVO.class); JSON.parseObject(details, BoxOrderMarkUpVO.class);
if(boxOrderMarkUpVO.getOrderIds()!=null) boxService.checkOrderPayStatus(boxOrderMarkUpVO);
{
String s=String.valueOf(boxOrderMarkUpVO.getOrderIds());
zTest z=new zTest();
z.setTestname("订单id,"+s);
z.setCreatedate(new Date());
zTestMapper2.insert(z);
}
else
{
String s=String.valueOf(boxOrderMarkUpVO.getOrderIds());
zTest z=new zTest();
z.setTestname("批量加价申报批,订单id为空");
z.setCreatedate(new Date());
zTestMapper2.insert(z);
}
boxService.checkOrderPayStatus(boxOrderMarkUpVO.getOrderIds());
boxService.batchAddPriceSuccess(shipmentId, details); boxService.batchAddPriceSuccess(shipmentId, details);
} }
break; break;
......
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