kongdeqiang
2025-04-02 adf58ddc0337678c2a6770fe8687e54a44998c0d
platformx-device-biz/src/main/java/com/by4cloud/platformx/device/controller/DeviceLeasingLedgerController.java
@@ -52,9 +52,11 @@
    @PreAuthorize("@pms.hasPermission('device_deviceLeasingLedger_view')" )
    public R getDeviceLeasingLedgerPage(@ParameterObject Page page, @ParameterObject DeviceLeasingLedger deviceLeasingLedger) {
        LambdaQueryWrapper<DeviceLeasingLedger> wrapper = Wrappers.lambdaQuery();
      wrapper.eq(StrUtil.isNotBlank(deviceLeasingLedger.getContractCode()),DeviceLeasingLedger::getContractCode,deviceLeasingLedger.getContractCode());
      wrapper.eq(StrUtil.isNotBlank(deviceLeasingLedger.getLedgerCode()),DeviceLeasingLedger::getLedgerCode,deviceLeasingLedger.getLedgerCode());
        return R.ok(deviceLeasingLedgerService.page(page, wrapper));
      wrapper.like(StrUtil.isNotBlank(deviceLeasingLedger.getLedgerName()),DeviceLeasingLedger::getLedgerName,deviceLeasingLedger.getLedgerName());
      wrapper.like(StrUtil.isNotBlank(deviceLeasingLedger.getContractCode()),DeviceLeasingLedger::getContractCode,deviceLeasingLedger.getContractCode());
      wrapper.like(StrUtil.isNotBlank(deviceLeasingLedger.getLedgerCode()),DeviceLeasingLedger::getLedgerCode,deviceLeasingLedger.getLedgerCode());
        wrapper.orderByDesc(DeviceLeasingLedger::getCreateTime);
      return R.ok(deviceLeasingLedgerService.page(page, wrapper));
    }
@@ -67,7 +69,7 @@
    @GetMapping("/{id}" )
    @PreAuthorize("@pms.hasPermission('device_deviceLeasingLedger_view')" )
    public R getById(@PathVariable("id" ) Long id) {
        return R.ok(deviceLeasingLedgerService.getById(id));
        return R.ok(deviceLeasingLedgerService.getByIdDeep(id));
    }
    /**
@@ -81,7 +83,7 @@
    @PreAuthorize("@pms.hasPermission('device_deviceLeasingLedger_add')" )
    public R save(@RequestBody DeviceLeasingLedger deviceLeasingLedger) {
      deviceLeasingLedger.setLedgerCode(maxSizeService.nextNo(MaxSizeContant.LEDGER_CODE));
        return R.ok(deviceLeasingLedgerService.save(deviceLeasingLedger));
        return deviceLeasingLedgerService.saveDeep(deviceLeasingLedger);
    }
    /**
@@ -139,4 +141,13 @@
   public R getDeviceSelectList(@PathVariable("ledgerId")Long ledgerId) {
      return R.ok(deviceLeasingLedgerService.getDeviceSelectList(ledgerId));
   }
   /**
    * 台账中设备序列号下拉下拉
    */
   @Operation(summary = "台账明细中设备序列号下拉",description = "台账明细中设备序列号下拉下拉")
   @GetMapping("/getLedgerDeviceList/{deviceId}")
   public R getLedgerDeviceList(@PathVariable("deviceId")Long deviceId) {
      return R.ok(deviceLeasingLedgerService.getLedgerDeviceList(deviceId));
   }
}