zhangnaisong
2024-07-26 1636f02b9cf3f408ebf8b3c4e377237e5b74bf4a
ard-work/src/main/java/com/ruoyi/sy/controller/ArdTankLockController.java
@@ -9,6 +9,7 @@
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import com.ruoyi.sy.domain.ArdTankWall;
import com.ruoyi.sy.service.IArdTankLockProcessLogService;
import com.ruoyi.sy.service.IArdTankWallLockService;
import com.ruoyi.sy.service.IArdTankWallService;
import com.ruoyi.utils.result.Results;
@@ -51,6 +52,9 @@
    @Autowired
    private IArdTankWallLockService ardTankWallLockService;
    @Autowired
    private IArdTankLockProcessLogService ardTankLockProcessLogService;
    /**
     * 查询电磁锁列表
@@ -278,13 +282,13 @@
        String userId = SecurityUtils.getUserId();
        List<Map<String,String>> result = ardTankLockService.getLockByCarPlate(userId,para.get("carPlate"));
        return getDataTable(result);*/
        PageHelper.startPage((Integer) para.get("pageNum"), (Integer) para.get("pageSize"));
        //PageHelper.startPage((Integer) para.get("pageNum"), (Integer) para.get("pageSize"));
        String userId = SecurityUtils.getUserId();
        List<Map<String,Object>> result = ardTankLockService.getLockByCarPlate(userId, (String) para.get("carPlate"));
        Map<String,Object> result = ardTankLockService.getLockByCarPlate(userId, (String) para.get("carPlate"),(Integer) para.get("pageNum"), (Integer) para.get("pageSize"));
        TableDataInfo dataTable = new TableDataInfo();
        dataTable.setRows(result);
        dataTable.setTotal(result.size());
        dataTable.setRows((List<Map<String,Object>>) result.get("list"));
        dataTable.setTotal((Long) result.get("total"));
        dataTable.setCode(200);
        dataTable.setMsg("查询成功");
        return dataTable;
@@ -318,4 +322,17 @@
    public AjaxResult deleteArdTankWallLockByLockId(@PathVariable String id) {
        return toAjax(ardTankWallLockService.deleteArdTankWallLockByLockId(id));
    }
    /**
     * 操控电磁锁
     */
    @ApiOperation("操控电磁锁")
    @PreAuthorize("@ss.hasPermi('sy:lock:processArdTankLockByLockId')")
    @Log(title = "电磁锁" , businessType = BusinessType.INSERT)
    @PostMapping("/processArdTankLockByLockId")
    public AjaxResult processArdTankLockByLockId(@RequestBody Map<String,String> para) {
        String userId = SecurityUtils.getUserId();
        String username = SecurityUtils.getUsername();
        return ardTankLockProcessLogService.processArdTankLockByLockId(userId,username,para);
    }
}