|
|
@@ -64,10 +64,12 @@ public class InvoiceServiceImpl extends ServiceImpl<InvoiceMapper, Invoice> impl
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public TitleUrl applyInvoice(ApplyInvoiceParams params) {
|
|
|
+ if(CommUtil.isEmptyOrNull(params.getStartChargeSeqs())){
|
|
|
+ throw new BusinessException("请选择需要开票的订单");
|
|
|
+ }
|
|
|
// orderDetails 获取申请开票的订单
|
|
|
var userId = StpUtil.getLoginIdAsLong();
|
|
|
var orders = chargeOrderService.getChargeOrdersBySeqs(params.getStartChargeSeqs());
|
|
|
-
|
|
|
// 校验订单是已开票或者开票中
|
|
|
var invoiced = orders.stream().filter(o -> o.getInvoiceStatus().equals(ChargeOrder.INVOICE_STATUS_开票中) || o.getInvoiceStatus().equals(ChargeOrder.INVOICE_STATUS_已开票)).toList();
|
|
|
if (!invoiced.isEmpty()) {
|