添加异常,测试回滚

release
wangrangrang 2 years ago
parent 4e127b6ca4
commit ef36ca712a
  1. 8
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java

@ -236,6 +236,11 @@ public class InvoiceServiceImpl implements InvoiceService {
throw new RuntimeException(e.getMessage());
}
}
List<String> collected = commonOrderInfos.stream().map(v -> v.getOrderInfo().getDdh()).collect(Collectors.toList());
if(collected.contains("700000")){
throw new RuntimeException("校验单价容差范围发生错误:在原结算单中未匹配到唯一明细____");
}
//如果不是混开的 走原来的逻辑
if(CollectionUtils.isEmpty(commonOrderInfoList)){
return R.ok("生成预制发票成功,请到【发票处理中心】页面查看");
@ -365,6 +370,9 @@ public class InvoiceServiceImpl implements InvoiceService {
});
}
}
if(collected.contains("800000")){
throw new RuntimeException("以下订单自动拆分时单价超过设定范围,请手动拆分_____");
}
return R.ok("生成预制发票成功,请到【发票处理中心】页面查看");
}
}

Loading…
Cancel
Save