From 2669b9a2f29e2e01cc44a9b0f097c5c4f098204d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A3=B7=E5=8F=B6?= <14103883+leaf-phos@user.noreply.gitee.com> Date: Fri, 31 Jan 2025 18:40:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E5=BD=92=E9=9B=B6=E4=B8=8D=E9=9C=80=E8=A6=81requireIot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/task/bill/BillMonitorTask.java | 2 +- .../com/ruoyi/web/controller/app/AppDeviceController.java | 2 +- .../java/com/ruoyi/web/controller/ss/SmDeviceController.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/smart-switch-service/src/main/java/com/ruoyi/task/bill/BillMonitorTask.java b/smart-switch-service/src/main/java/com/ruoyi/task/bill/BillMonitorTask.java index 7a468a5d..69989647 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/task/bill/BillMonitorTask.java +++ b/smart-switch-service/src/main/java/com/ruoyi/task/bill/BillMonitorTask.java @@ -83,7 +83,7 @@ public class BillMonitorTask { // 判断是否低功率,若低于指定功率,则关闭订单(清零设备) if (deviceInfo != null && deviceInfo.getP() != null && deviceInfo.getP().compareTo(bill.getSuitLowPower()) < 0) { String reason = String.format("低功率订单%s自动关闭", bill.getBillNo()); - deviceService.resetWithBill(bill.getDeviceId(), true, deviceInfo.getW(), reason, false, true); + deviceService.resetWithBill(bill.getDeviceId(), false, deviceInfo.getW(), reason, false, true); } } catch (Exception e) { log.warn("关闭低功率订单{}出错:{}", bill.getBillNo(), e.getMessage()); diff --git a/smart-switch-web/src/main/java/com/ruoyi/web/controller/app/AppDeviceController.java b/smart-switch-web/src/main/java/com/ruoyi/web/controller/app/AppDeviceController.java index 4d2263de..e0fdb413 100644 --- a/smart-switch-web/src/main/java/com/ruoyi/web/controller/app/AppDeviceController.java +++ b/smart-switch-web/src/main/java/com/ruoyi/web/controller/app/AppDeviceController.java @@ -182,7 +182,7 @@ public class AppDeviceController extends BaseController { return error("您无权操作此设备"); } String reason = String.format("商户设备归零:id=%s", deviceId); - return toAjax(smDeviceService.resetWithBill(deviceId, true, null, reason, true, true)); + return toAjax(smDeviceService.resetWithBill(deviceId, false, null, reason, true, true)); } @ApiOperation("获取设备用电量分析") diff --git a/smart-switch-web/src/main/java/com/ruoyi/web/controller/ss/SmDeviceController.java b/smart-switch-web/src/main/java/com/ruoyi/web/controller/ss/SmDeviceController.java index 105ce13d..a250f4d8 100644 --- a/smart-switch-web/src/main/java/com/ruoyi/web/controller/ss/SmDeviceController.java +++ b/smart-switch-web/src/main/java/com/ruoyi/web/controller/ss/SmDeviceController.java @@ -180,14 +180,14 @@ public class SmDeviceController extends BaseController @Log(title = "设备时长归零", businessType = BusinessType.OTHER) @PutMapping("/{deviceId}/reset") public AjaxResult reset(@PathVariable @ApiParam("设备id") Long deviceId) { - return toAjax(deviceService.resetWithBill(deviceId, true, null, "后台设备时长归零", true, false)); + return toAjax(deviceService.resetWithBill(deviceId, false, null, "后台设备时长归零", true, false)); } @PreAuthorize("@ss.hasPermi('system:device:resetEle')") @Log(title = "设备清空电量", businessType = BusinessType.OTHER) @PutMapping("/{deviceId}/resetEle") public AjaxResult resetEle(@PathVariable @ApiParam("设备id") Long deviceId) { - return toAjax(deviceService.resetWithBill(deviceId, true, null, "后台设备电量归零", false, true)); + return toAjax(deviceService.resetWithBill(deviceId, false, null, "后台设备电量归零", false, true)); } @ApiOperation("设备开关")