From 795b57b50023f50264da2460fbad629839b40107 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Tue, 9 May 2023 09:48:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E7=A5=A8=E6=96=B0=E5=A2=9E=EF=BC=8C?= =?UTF-8?q?=E6=88=96=E6=9B=B4=E6=96=B0=E5=90=8C=E6=AD=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../glxp/api/controller/inout/IoOrderController.java | 10 ++++++---- .../controller/inout/IoOrderDetailBizController.java | 11 ++++++++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/inout/IoOrderController.java b/src/main/java/com/glxp/api/controller/inout/IoOrderController.java index 500d45cd..8559a64e 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderController.java @@ -40,6 +40,7 @@ import javax.annotation.Resource; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Arrays; +import java.util.Date; import java.util.List; @@ -137,15 +138,15 @@ public class IoOrderController extends BaseController { List list = orderService.getfilterList(filterOrderRequest); for (IoOrderResponse ioOrderResponse : list) { - if(ioOrderResponse.getCheckStatus() == null){ - ioOrderResponse.setCheckStatus(0+""); + if (ioOrderResponse.getCheckStatus() == null) { + ioOrderResponse.setCheckStatus(0 + ""); } FilterOrderDetailCodeRequest filterOrderDetailCodeRequest = new FilterOrderDetailCodeRequest(); filterOrderDetailCodeRequest.setOrderIdFk(ioOrderResponse.getBillNo()); List ioOrderDetailCodeResponses = orderDetailBizService.getfilterList(filterOrderDetailCodeRequest); - BigDecimal amount=new BigDecimal(0.00); + BigDecimal amount = new BigDecimal(0.00); for (IoOrderDetailCodeResponse ioOrderDetailCodeRespons : ioOrderDetailCodeResponses) { - if(ioOrderDetailCodeRespons.getCount() != 0 && ioOrderDetailCodeRespons.getPrice()!=null) { + if (ioOrderDetailCodeRespons.getCount() != 0 && ioOrderDetailCodeRespons.getPrice() != null) { amount = amount.add(new BigDecimal(ioOrderDetailCodeRespons.getCount()).multiply(ioOrderDetailCodeRespons.getPrice())); } } @@ -632,6 +633,7 @@ public class IoOrderController extends BaseController { @PostMapping("/udiwms/inout/order/updateOrder") @Log(title = "单据管理", businessType = BusinessType.UPDATE) public BaseResponse updateOrder(@RequestBody IoOrderEntity ioOrderEntity) { + ioOrderEntity.setUpdateTime(new Date()); orderService.updateByBillNo(ioOrderEntity); return ResultVOUtils.success(); } diff --git a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java index 9eca7837..e253e8c2 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java @@ -603,7 +603,7 @@ public class IoOrderDetailBizController extends BaseController { @PostMapping("/udiwms/inout/biz/insertInvoice") @Log(title = "发票管理", businessType = BusinessType.INSERT) public BaseResponse insertInvoice(@RequestBody IoOrderInvoiceEntity ioOrderInvoice) { - + String billNo = null; for (IoOrderDetailBizEntity ioOrderDetailBizEntity : ioOrderInvoice.getList()) { IoOrderInvoiceEntity ioOrderInvoiceEntity = new IoOrderInvoiceEntity(); ioOrderInvoiceEntity.setOrderIdFk(ioOrderDetailBizEntity.getOrderIdFk()); @@ -623,17 +623,26 @@ public class IoOrderDetailBizController extends BaseController { ioOrderInvoiceEntity.setRemark(ioOrderInvoice.getRemark()); ioOrderInvoiceEntity.setLicenseUrl(ioOrderInvoice.getLicenseUrl()); boolean b = ioOrderInvoiceService.insertInvoice(ioOrderInvoiceEntity); + billNo = ioOrderDetailBizEntity.getOrderIdFk(); } + IoOrderEntity orderEntity = orderService.findByBillNo(billNo); + orderEntity.setUpdateTime(new Date()); + orderService.update(orderEntity); return ResultVOUtils.success("成功"); } @PostMapping("/udiwms/inout/biz/updateorderBiz") public BaseResponse updateorderBiz(@RequestBody List list) { + String billNo = null; for (IoOrderDetailCodeEntity ioOrderDetailBizEntity : list) { ioOrderDetailBizEntity.setRegStatus(true); orderDetailCodeService.updateOrderDetailBiz(ioOrderDetailBizEntity); + billNo = ioOrderDetailBizEntity.getOrderIdFk(); } + IoOrderEntity orderEntity = orderService.findByBillNo(billNo); + orderEntity.setUpdateTime(new Date()); + orderService.update(orderEntity); return ResultVOUtils.success("成功"); }