添加异常,测试回滚

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

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

Loading…
Cancel
Save