From 783150feedca1a9668be8e94b79a00022f073005 Mon Sep 17 00:00:00 2001 From: wws <18630710203@163.com> Date: Fri, 5 Jan 2024 15:40:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=85=BB=E6=89=8B=E6=8C=81=E6=8F=90?= =?UTF-8?q?=E4=BA=A4BUG=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DevicePDAController.java | 2 + .../service/impl/DevicePDAServiceImpl.java | 8 ++- .../mapper/device/EquOrderMapper.xml | 50 +++++++++++++++++-- 3 files changed, 55 insertions(+), 5 deletions(-) diff --git a/op-modules/op-device/src/main/java/com/op/device/controller/DevicePDAController.java b/op-modules/op-device/src/main/java/com/op/device/controller/DevicePDAController.java index c6bbdb7f..8d4602a5 100644 --- a/op-modules/op-device/src/main/java/com/op/device/controller/DevicePDAController.java +++ b/op-modules/op-device/src/main/java/com/op/device/controller/DevicePDAController.java @@ -198,4 +198,6 @@ public class DevicePDAController extends BaseController { public AjaxResult getFaultReasonList(EquFaultReason equFaultReason) { return devicePDAService.selectEquFaultReasonList(equFaultReason); } + + } diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/DevicePDAServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/DevicePDAServiceImpl.java index 8d4d6e3e..79cc9f17 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/impl/DevicePDAServiceImpl.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/DevicePDAServiceImpl.java @@ -366,7 +366,13 @@ public class DevicePDAServiceImpl implements IDevicePDAService { // 费用 BigDecimal sparePartsCost = equSpareApplyMapper.getSparePartsCost(equOrder.getOrderCode()); BigDecimal orderCost = equOrder.getOrderCost(); - equOrder.setOrderCost(sparePartsCost.add(orderCost)); + if (orderCost!=null) { + if (sparePartsCost==null) { + equOrder.setOrderCost(orderCost); + }else { + equOrder.setOrderCost(sparePartsCost.add(orderCost)); + } + } // 更新设备状态为正常运行 equ.setStatus("1"); diff --git a/op-modules/op-device/src/main/resources/mapper/device/EquOrderMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/EquOrderMapper.xml index cefc4601..6f3e7531 100644 --- a/op-modules/op-device/src/main/resources/mapper/device/EquOrderMapper.xml +++ b/op-modules/op-device/src/main/resources/mapper/device/EquOrderMapper.xml @@ -48,6 +48,7 @@ + @@ -138,10 +139,51 @@