修改逻辑,归零不需要requireIot
This commit is contained in:
parent
0b0018914a
commit
2669b9a2f2
|
@ -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());
|
||||
|
|
|
@ -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("获取设备用电量分析")
|
||||
|
|
|
@ -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("设备开关")
|
||||
|
|
Loading…
Reference in New Issue
Block a user