liusuyi
2024-08-01 60211f59d2c85053533ed151adb2bdc5348dd342
ard-work/src/main/java/com/ruoyi/sy/controller/ArdTankLockController.java
@@ -56,6 +56,9 @@
    @Autowired
    private IArdTankLockAlarmService ardTankLockAlarmService;
    @Autowired
    private IArdTankLockPasswordService ardTankLockPasswordService;
    /**
     * 查询电磁锁列表
     */
@@ -350,4 +353,33 @@
        dataTable.setMsg("查询成功");
        return dataTable;
    }
    @ApiOperation("根据锁主键查询电磁锁密码")
    @PreAuthorize("@ss.hasPermi('sy:lock:getLockPasswordByLockId')")
    @PostMapping("/getLockPasswordByLockId")
    public TableDataInfo getLockPasswordByLockId(@RequestBody Map<String,Object> para) {
        Map<String,Object> result = ardTankLockPasswordService.getLockPasswordByLockId(para);
        TableDataInfo dataTable = new TableDataInfo();
        dataTable.setRows((List<Map<String,Object>>) result.get("list"));
        dataTable.setTotal((Long) result.get("total"));
        dataTable.setCode(200);
        dataTable.setMsg("查询成功");
        return dataTable;
    }
    @ApiOperation("根据三一主键查询电磁锁密码")
    @PreAuthorize("@ss.hasPermi('sy:lock:getLockPasswordByCarId')")
    @PostMapping("/getLockPasswordByCarId")
    public TableDataInfo getLockPasswordByCarId(@RequestBody Map<String,Object> para) {
        String userId = SecurityUtils.getUserId();
        Map<String,Object> result = ardTankLockPasswordService.getLockPasswordByCarId(userId,para);
        TableDataInfo dataTable = new TableDataInfo();
        dataTable.setRows((List<Map<String,Object>>) result.get("list"));
        dataTable.setTotal((Long) result.get("total"));
        dataTable.setCode(200);
        dataTable.setMsg("查询成功");
        return dataTable;
    }
}