From 864f589072236f7138dbfdaeda3b537354002565 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期五, 18 十月 2024 13:42:39 +0800 Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderInvoiceServiceImpl.java | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderInvoiceServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderInvoiceServiceImpl.java index 9f5dd1d..c814747 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderInvoiceServiceImpl.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderInvoiceServiceImpl.java @@ -119,13 +119,17 @@ } SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); String code = Double.valueOf(Math.random() * 1000).intValue() + sdf.format(new Date()); + //获取开票类型 + TInvoiceType invoiceType = invoiceTypeClient.getInvoiceType(addOrderInvoice.getInvoiceTypeId()).getData(); + addOrderInvoice.setInvoicingCompany(invoiceType.getInvoicingCompany()); + addOrderInvoice.setInvoiceType(invoiceType.getName()); + addOrderInvoice.setInvoiceMaterial(2); + addOrderInvoice.setInvoicingMethod(invoiceType.getInvoicingMethod()); addOrderInvoice.setAppUserId(userId); addOrderInvoice.setCode(code); addOrderInvoice.setStatus(1); addOrderInvoice.setCreateTime(LocalDateTime.now()); this.save(addOrderInvoice); - //获取开票类型 - TInvoiceType invoiceType = invoiceTypeClient.getInvoiceType(addOrderInvoice.getInvoiceTypeId()).getData(); for (Long orderId : orderIds) { List<TChargingOrderAccountingStrategy> list = chargingOrderAccountingStrategyService.list(new LambdaQueryWrapper<TChargingOrderAccountingStrategy>() .eq(TChargingOrderAccountingStrategy::getChargingOrderId, orderId)); @@ -241,6 +245,7 @@ myShoppingOrderList.setUnitPrice(unitPrice); myShoppingOrderList.setNumber(tShoppingOrder.getPurchaseQuantity()); myShoppingOrderList.setPaymentAmount(tShoppingOrder.getPaymentAmount()); + myShoppingOrderList.setCreateTime(tShoppingOrder.getCreateTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); shoppingOrder.add(myShoppingOrderList); } myOrderInvoiceInfo.setShoppingOrder(shoppingOrder); -- Gitblit v1.7.1