This commit is contained in:
lu7213 committed 2026-03-03 09:39:33 +08:00
1 parent 68a2b4f68c
commit 7cd697187c
308 files changed
+30454 -75

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi</artifactId>
<version>3.4.0</version>
</parent>
<artifactId>luqj-ec</artifactId>
<packaging>jar</packaging>
<name>luqj-ec</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-extension</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>luqj-common</artifactId>
<version>3.4.0</version>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,118 @@
package com.luqj.ec.controller;
import com.ruoyi.common.select.Ids;
import com.ruoyi.common.select.SelectItem;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.luqj.ec.domain.EcCommandResult;
import com.luqj.ec.domain.EcCommandResultPlus;
import com.luqj.ec.service.IEcCommandResultService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 指令执行结果(客户端回传)Controller
*
* @author luqj
* @date 2026-02-27
*/
@RestController
@RequestMapping("/ec/ec-command-result")
public class EcCommandResultController extends BaseController
{
@Autowired
private IEcCommandResultService ecCommandResultService;
@PreAuthorize("@ss.hasPermi('ec:ec-command-result:getByIds')")
@PostMapping("/getByIds")
public AjaxResult getByIds(@RequestBody Ids ids)
{
List<EcCommandResultPlus> list = ecCommandResultService.getByIds(ids.getLongIds(),EcCommandResultPlus::getErrorMsg,EcCommandResultPlus::getId);
return AjaxResult.success(list);
}
@PreAuthorize("@ss.hasPermi('ec:ec-command-result:select')")
@GetMapping("/select")
public AjaxResult select(String keyword)
{
List<SelectItem> list = ecCommandResultService.select(keyword);
return AjaxResult.success(list);
}
/**
* 查询指令执行结果(客户端回传)列表
*/
@PreAuthorize("@ss.hasPermi('ec:ec-command-result:list')")
@GetMapping("/list")
public TableDataInfo list(EcCommandResult ecCommandResult)
{
startPage();
List<EcCommandResult> list = ecCommandResultService.selectEcCommandResultList(ecCommandResult);
return getDataTable(list);
}
/**
* 导出指令执行结果(客户端回传)列表
*/
@PreAuthorize("@ss.hasPermi('ec:ec-command-result:export')")
@Log(title = "指令执行结果(客户端回传)", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(EcCommandResult ecCommandResult)
{
List<EcCommandResult> list = ecCommandResultService.selectEcCommandResultList(ecCommandResult);
ExcelUtil<EcCommandResult> util = new ExcelUtil<EcCommandResult>(EcCommandResult.class);
return util.exportExcel(list, "ec-command-result");
}
/**
* 获取指令执行结果(客户端回传)详细信息
*/
@PreAuthorize("@ss.hasPermi('ec:ec-command-result:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(ecCommandResultService.selectEcCommandResultById(id));
}
/**
* 新增指令执行结果(客户端回传)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-command-result:add')")
@Log(title = "指令执行结果(客户端回传)", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EcCommandResult ecCommandResult)
{
return toAjax(ecCommandResultService.insertEcCommandResult(ecCommandResult));
}
/**
* 修改指令执行结果(客户端回传)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-command-result:edit')")
@Log(title = "指令执行结果(客户端回传)", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EcCommandResult ecCommandResult)
{
return toAjax(ecCommandResultService.updateEcCommandResult(ecCommandResult));
}
/**
* 删除指令执行结果(客户端回传)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-command-result:remove')")
@Log(title = "指令执行结果(客户端回传)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(ecCommandResultService.deleteEcCommandResultByIds(ids));
}
}
@@ -0,0 +1,118 @@
package com.luqj.ec.controller;
import com.ruoyi.common.select.Ids;
import com.ruoyi.common.select.SelectItem;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.luqj.ec.domain.EcControlTask;
import com.luqj.ec.domain.EcControlTaskPlus;
import com.luqj.ec.service.IEcControlTaskService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 任务(群控核心)Controller
*
* @author luqj
* @date 2026-02-27
*/
@RestController
@RequestMapping("/ec/ec-task")
public class EcControlTaskController extends BaseController
{
@Autowired
private IEcControlTaskService ecControlTaskService;
@PreAuthorize("@ss.hasPermi('ec:ec-task:getByIds')")
@PostMapping("/getByIds")
public AjaxResult getByIds(@RequestBody Ids ids)
{
List<EcControlTaskPlus> list = ecControlTaskService.getByIds(ids.getLongIds(),EcControlTaskPlus::getTaskName,EcControlTaskPlus::getId);
return AjaxResult.success(list);
}
@PreAuthorize("@ss.hasPermi('ec:ec-task:select')")
@GetMapping("/select")
public AjaxResult select(String keyword)
{
List<SelectItem> list = ecControlTaskService.select(keyword);
return AjaxResult.success(list);
}
/**
* 查询任务(群控核心)列表
*/
@PreAuthorize("@ss.hasPermi('ec:ec-task:list')")
@GetMapping("/list")
public TableDataInfo list(EcControlTask ecControlTask)
{
startPage();
List<EcControlTask> list = ecControlTaskService.selectEcControlTaskList(ecControlTask);
return getDataTable(list);
}
/**
* 导出任务(群控核心)列表
*/
@PreAuthorize("@ss.hasPermi('ec:ec-task:export')")
@Log(title = "任务(群控核心)", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(EcControlTask ecControlTask)
{
List<EcControlTask> list = ecControlTaskService.selectEcControlTaskList(ecControlTask);
ExcelUtil<EcControlTask> util = new ExcelUtil<EcControlTask>(EcControlTask.class);
return util.exportExcel(list, "ec-task");
}
/**
* 获取任务(群控核心)详细信息
*/
@PreAuthorize("@ss.hasPermi('ec:ec-task:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(ecControlTaskService.selectEcControlTaskById(id));
}
/**
* 新增任务(群控核心)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-task:add')")
@Log(title = "任务(群控核心)", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EcControlTask ecControlTask)
{
return toAjax(ecControlTaskService.insertEcControlTask(ecControlTask));
}
/**
* 修改任务(群控核心)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-task:edit')")
@Log(title = "任务(群控核心)", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EcControlTask ecControlTask)
{
return toAjax(ecControlTaskService.updateEcControlTask(ecControlTask));
}
/**
* 删除任务(群控核心)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-task:remove')")
@Log(title = "任务(群控核心)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(ecControlTaskService.deleteEcControlTaskByIds(ids));
}
}
@@ -0,0 +1,118 @@
package com.luqj.ec.controller;
import com.ruoyi.common.select.Ids;
import com.ruoyi.common.select.SelectItem;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.luqj.ec.domain.EcDeviceCommand;
import com.luqj.ec.domain.EcDeviceCommandPlus;
import com.luqj.ec.service.IEcDeviceCommandService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 控制指令(单条指令)Controller
*
* @author luqj
* @date 2026-02-27
*/
@RestController
@RequestMapping("/ec/ec-command")
public class EcDeviceCommandController extends BaseController
{
@Autowired
private IEcDeviceCommandService ecDeviceCommandService;
@PreAuthorize("@ss.hasPermi('ec:ec-command:getByIds')")
@PostMapping("/getByIds")
public AjaxResult getByIds(@RequestBody Ids ids)
{
List<EcDeviceCommandPlus> list = ecDeviceCommandService.getByIds(ids.getLongIds(),EcDeviceCommandPlus::getCommandType,EcDeviceCommandPlus::getId);
return AjaxResult.success(list);
}
@PreAuthorize("@ss.hasPermi('ec:ec-command:select')")
@GetMapping("/select")
public AjaxResult select(String keyword)
{
List<SelectItem> list = ecDeviceCommandService.select(keyword);
return AjaxResult.success(list);
}
/**
* 查询控制指令(单条指令)列表
*/
@PreAuthorize("@ss.hasPermi('ec:ec-command:list')")
@GetMapping("/list")
public TableDataInfo list(EcDeviceCommand ecDeviceCommand)
{
startPage();
List<EcDeviceCommand> list = ecDeviceCommandService.selectEcDeviceCommandList(ecDeviceCommand);
return getDataTable(list);
}
/**
* 导出控制指令(单条指令)列表
*/
@PreAuthorize("@ss.hasPermi('ec:ec-command:export')")
@Log(title = "控制指令(单条指令)", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(EcDeviceCommand ecDeviceCommand)
{
List<EcDeviceCommand> list = ecDeviceCommandService.selectEcDeviceCommandList(ecDeviceCommand);
ExcelUtil<EcDeviceCommand> util = new ExcelUtil<EcDeviceCommand>(EcDeviceCommand.class);
return util.exportExcel(list, "ec-command");
}
/**
* 获取控制指令(单条指令)详细信息
*/
@PreAuthorize("@ss.hasPermi('ec:ec-command:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(ecDeviceCommandService.selectEcDeviceCommandById(id));
}
/**
* 新增控制指令(单条指令)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-command:add')")
@Log(title = "控制指令(单条指令)", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EcDeviceCommand ecDeviceCommand)
{
return toAjax(ecDeviceCommandService.insertEcDeviceCommand(ecDeviceCommand));
}
/**
* 修改控制指令(单条指令)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-command:edit')")
@Log(title = "控制指令(单条指令)", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EcDeviceCommand ecDeviceCommand)
{
return toAjax(ecDeviceCommandService.updateEcDeviceCommand(ecDeviceCommand));
}
/**
* 删除控制指令(单条指令)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-command:remove')")
@Log(title = "控制指令(单条指令)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(ecDeviceCommandService.deleteEcDeviceCommandByIds(ids));
}
}
@@ -0,0 +1,118 @@
package com.luqj.ec.controller;
import com.ruoyi.common.select.Ids;
import com.ruoyi.common.select.SelectItem;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.luqj.ec.domain.EcDevice;
import com.luqj.ec.domain.EcDevicePlus;
import com.luqj.ec.service.IEcDeviceService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 设备(手机设备)Controller
*
* @author luqj
* @date 2026-02-27
*/
@RestController
@RequestMapping("/ec/ec-device")
public class EcDeviceController extends BaseController
{
@Autowired
private IEcDeviceService ecDeviceService;
@PreAuthorize("@ss.hasPermi('ec:ec-device:getByIds')")
@PostMapping("/getByIds")
public AjaxResult getByIds(@RequestBody Ids ids)
{
List<EcDevicePlus> list = ecDeviceService.getByIds(ids.getLongIds(),EcDevicePlus::getDeviceCode,EcDevicePlus::getId);
return AjaxResult.success(list);
}
@PreAuthorize("@ss.hasPermi('ec:ec-device:select')")
@GetMapping("/select")
public AjaxResult select(String keyword)
{
List<SelectItem> list = ecDeviceService.select(keyword);
return AjaxResult.success(list);
}
/**
* 查询设备(手机设备)列表
*/
@PreAuthorize("@ss.hasPermi('ec:ec-device:list')")
@GetMapping("/list")
public TableDataInfo list(EcDevice ecDevice)
{
startPage();
List<EcDevice> list = ecDeviceService.selectEcDeviceList(ecDevice);
return getDataTable(list);
}
/**
* 导出设备(手机设备)列表
*/
@PreAuthorize("@ss.hasPermi('ec:ec-device:export')")
@Log(title = "设备(手机设备)", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(EcDevice ecDevice)
{
List<EcDevice> list = ecDeviceService.selectEcDeviceList(ecDevice);
ExcelUtil<EcDevice> util = new ExcelUtil<EcDevice>(EcDevice.class);
return util.exportExcel(list, "ec-device");
}
/**
* 获取设备(手机设备)详细信息
*/
@PreAuthorize("@ss.hasPermi('ec:ec-device:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(ecDeviceService.selectEcDeviceById(id));
}
/**
* 新增设备(手机设备)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-device:add')")
@Log(title = "设备(手机设备)", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EcDevice ecDevice)
{
return toAjax(ecDeviceService.insertEcDevice(ecDevice));
}
/**
* 修改设备(手机设备)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-device:edit')")
@Log(title = "设备(手机设备)", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EcDevice ecDevice)
{
return toAjax(ecDeviceService.updateEcDevice(ecDevice));
}
/**
* 删除设备(手机设备)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-device:remove')")
@Log(title = "设备(手机设备)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(ecDeviceService.deleteEcDeviceByIds(ids));
}
}
@@ -0,0 +1,118 @@
package com.luqj.ec.controller;
import com.ruoyi.common.select.Ids;
import com.ruoyi.common.select.SelectItem;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.luqj.ec.domain.EcDeviceStatus;
import com.luqj.ec.domain.EcDeviceStatusPlus;
import com.luqj.ec.service.IEcDeviceStatusService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 设备心跳 & 状态(高频)Controller
*
* @author luqj
* @date 2026-02-27
*/
@RestController
@RequestMapping("/ec/ec-device-status")
public class EcDeviceStatusController extends BaseController
{
@Autowired
private IEcDeviceStatusService ecDeviceStatusService;
@PreAuthorize("@ss.hasPermi('ec:ec-device-status:getByIds')")
@PostMapping("/getByIds")
public AjaxResult getByIds(@RequestBody Ids ids)
{
List<EcDeviceStatusPlus> list = ecDeviceStatusService.getByIds(ids.getLongIds(),EcDeviceStatusPlus::getDeviceId,EcDeviceStatusPlus::getId);
return AjaxResult.success(list);
}
@PreAuthorize("@ss.hasPermi('ec:ec-device-status:select')")
@GetMapping("/select")
public AjaxResult select(String keyword)
{
List<SelectItem> list = ecDeviceStatusService.select(keyword);
return AjaxResult.success(list);
}
/**
* 查询设备心跳 & 状态(高频)列表
*/
@PreAuthorize("@ss.hasPermi('ec:ec-device-status:list')")
@GetMapping("/list")
public TableDataInfo list(EcDeviceStatus ecDeviceStatus)
{
startPage();
List<EcDeviceStatus> list = ecDeviceStatusService.selectEcDeviceStatusList(ecDeviceStatus);
return getDataTable(list);
}
/**
* 导出设备心跳 & 状态(高频)列表
*/
@PreAuthorize("@ss.hasPermi('ec:ec-device-status:export')")
@Log(title = "设备心跳 & 状态(高频)", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(EcDeviceStatus ecDeviceStatus)
{
List<EcDeviceStatus> list = ecDeviceStatusService.selectEcDeviceStatusList(ecDeviceStatus);
ExcelUtil<EcDeviceStatus> util = new ExcelUtil<EcDeviceStatus>(EcDeviceStatus.class);
return util.exportExcel(list, "ec-device-status");
}
/**
* 获取设备心跳 & 状态(高频)详细信息
*/
@PreAuthorize("@ss.hasPermi('ec:ec-device-status:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(ecDeviceStatusService.selectEcDeviceStatusById(id));
}
/**
* 新增设备心跳 & 状态(高频)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-device-status:add')")
@Log(title = "设备心跳 & 状态(高频)", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EcDeviceStatus ecDeviceStatus)
{
return toAjax(ecDeviceStatusService.insertEcDeviceStatus(ecDeviceStatus));
}
/**
* 修改设备心跳 & 状态(高频)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-device-status:edit')")
@Log(title = "设备心跳 & 状态(高频)", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EcDeviceStatus ecDeviceStatus)
{
return toAjax(ecDeviceStatusService.updateEcDeviceStatus(ecDeviceStatus));
}
/**
* 删除设备心跳 & 状态(高频)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-device-status:remove')")
@Log(title = "设备心跳 & 状态(高频)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(ecDeviceStatusService.deleteEcDeviceStatusByIds(ids));
}
}
@@ -0,0 +1,118 @@
package com.luqj.ec.controller;
import com.ruoyi.common.select.Ids;
import com.ruoyi.common.select.SelectItem;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.luqj.ec.domain.EcTaskCommand;
import com.luqj.ec.domain.EcTaskCommandPlus;
import com.luqj.ec.service.IEcTaskCommandService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 任务指令明细(一个任务多条指令)Controller
*
* @author luqj
* @date 2026-02-27
*/
@RestController
@RequestMapping("/ec/ec-task-command")
public class EcTaskCommandController extends BaseController
{
@Autowired
private IEcTaskCommandService ecTaskCommandService;
@PreAuthorize("@ss.hasPermi('ec:ec-task-command:getByIds')")
@PostMapping("/getByIds")
public AjaxResult getByIds(@RequestBody Ids ids)
{
List<EcTaskCommandPlus> list = ecTaskCommandService.getByIds(ids.getLongIds(),EcTaskCommandPlus::getCommandType,EcTaskCommandPlus::getId);
return AjaxResult.success(list);
}
@PreAuthorize("@ss.hasPermi('ec:ec-task-command:select')")
@GetMapping("/select")
public AjaxResult select(String keyword)
{
List<SelectItem> list = ecTaskCommandService.select(keyword);
return AjaxResult.success(list);
}
/**
* 查询任务指令明细(一个任务多条指令)列表
*/
@PreAuthorize("@ss.hasPermi('ec:ec-task-command:list')")
@GetMapping("/list")
public TableDataInfo list(EcTaskCommand ecTaskCommand)
{
startPage();
List<EcTaskCommand> list = ecTaskCommandService.selectEcTaskCommandList(ecTaskCommand);
return getDataTable(list);
}
/**
* 导出任务指令明细(一个任务多条指令)列表
*/
@PreAuthorize("@ss.hasPermi('ec:ec-task-command:export')")
@Log(title = "任务指令明细(一个任务多条指令)", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(EcTaskCommand ecTaskCommand)
{
List<EcTaskCommand> list = ecTaskCommandService.selectEcTaskCommandList(ecTaskCommand);
ExcelUtil<EcTaskCommand> util = new ExcelUtil<EcTaskCommand>(EcTaskCommand.class);
return util.exportExcel(list, "ec-task-command");
}
/**
* 获取任务指令明细(一个任务多条指令)详细信息
*/
@PreAuthorize("@ss.hasPermi('ec:ec-task-command:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(ecTaskCommandService.selectEcTaskCommandById(id));
}
/**
* 新增任务指令明细(一个任务多条指令)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-task-command:add')")
@Log(title = "任务指令明细(一个任务多条指令)", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EcTaskCommand ecTaskCommand)
{
return toAjax(ecTaskCommandService.insertEcTaskCommand(ecTaskCommand));
}
/**
* 修改任务指令明细(一个任务多条指令)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-task-command:edit')")
@Log(title = "任务指令明细(一个任务多条指令)", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EcTaskCommand ecTaskCommand)
{
return toAjax(ecTaskCommandService.updateEcTaskCommand(ecTaskCommand));
}
/**
* 删除任务指令明细(一个任务多条指令)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-task-command:remove')")
@Log(title = "任务指令明细(一个任务多条指令)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(ecTaskCommandService.deleteEcTaskCommandByIds(ids));
}
}
@@ -0,0 +1,118 @@
package com.luqj.ec.controller;
import com.ruoyi.common.select.Ids;
import com.ruoyi.common.select.SelectItem;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.luqj.ec.domain.EcTaskDevice;
import com.luqj.ec.domain.EcTaskDevicePlus;
import com.luqj.ec.service.IEcTaskDeviceService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 任务-设备关联(一任务多设备)Controller
*
* @author luqj
* @date 2026-02-27
*/
@RestController
@RequestMapping("/ec/ec-task-device")
public class EcTaskDeviceController extends BaseController
{
@Autowired
private IEcTaskDeviceService ecTaskDeviceService;
@PreAuthorize("@ss.hasPermi('ec:ec-task-device:getByIds')")
@PostMapping("/getByIds")
public AjaxResult getByIds(@RequestBody Ids ids)
{
List<EcTaskDevicePlus> list = ecTaskDeviceService.getByIds(ids.getLongIds(),EcTaskDevicePlus::getStatus,EcTaskDevicePlus::getId);
return AjaxResult.success(list);
}
@PreAuthorize("@ss.hasPermi('ec:ec-task-device:select')")
@GetMapping("/select")
public AjaxResult select(String keyword)
{
List<SelectItem> list = ecTaskDeviceService.select(keyword);
return AjaxResult.success(list);
}
/**
* 查询任务-设备关联(一任务多设备)列表
*/
@PreAuthorize("@ss.hasPermi('ec:ec-task-device:list')")
@GetMapping("/list")
public TableDataInfo list(EcTaskDevice ecTaskDevice)
{
startPage();
List<EcTaskDevice> list = ecTaskDeviceService.selectEcTaskDeviceList(ecTaskDevice);
return getDataTable(list);
}
/**
* 导出任务-设备关联(一任务多设备)列表
*/
@PreAuthorize("@ss.hasPermi('ec:ec-task-device:export')")
@Log(title = "任务-设备关联(一任务多设备)", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(EcTaskDevice ecTaskDevice)
{
List<EcTaskDevice> list = ecTaskDeviceService.selectEcTaskDeviceList(ecTaskDevice);
ExcelUtil<EcTaskDevice> util = new ExcelUtil<EcTaskDevice>(EcTaskDevice.class);
return util.exportExcel(list, "ec-task-device");
}
/**
* 获取任务-设备关联(一任务多设备)详细信息
*/
@PreAuthorize("@ss.hasPermi('ec:ec-task-device:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(ecTaskDeviceService.selectEcTaskDeviceById(id));
}
/**
* 新增任务-设备关联(一任务多设备)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-task-device:add')")
@Log(title = "任务-设备关联(一任务多设备)", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EcTaskDevice ecTaskDevice)
{
return toAjax(ecTaskDeviceService.insertEcTaskDevice(ecTaskDevice));
}
/**
* 修改任务-设备关联(一任务多设备)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-task-device:edit')")
@Log(title = "任务-设备关联(一任务多设备)", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EcTaskDevice ecTaskDevice)
{
return toAjax(ecTaskDeviceService.updateEcTaskDevice(ecTaskDevice));
}
/**
* 删除任务-设备关联(一任务多设备)
*/
@PreAuthorize("@ss.hasPermi('ec:ec-task-device:remove')")
@Log(title = "任务-设备关联(一任务多设备)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(ecTaskDeviceService.deleteEcTaskDeviceByIds(ids));
}
}
@@ -0,0 +1,124 @@
package com.luqj.ec.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.io.Serializable;
/**
* 指令执行结果(客户端回传)对象 ec_command_result
*
* @author luqj
* @date 2026-02-27
*/
public class EcCommandResult extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 命令ID */
@Excel(name = "命令ID")
private Long commandId;
/** 设备ID */
@Excel(name = "设备ID")
private Long deviceId;
/** 返回结果 */
@Excel(name = "返回结果")
private Integer result;
/** 错误信息 */
@Excel(name = "错误信息")
private String errorMsg;
/** 返回信息 */
@Excel(name = "返回信息")
private String responseData;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdAt;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setCommandId(Long commandId)
{
this.commandId = commandId;
}
public Long getCommandId()
{
return commandId;
}
public void setDeviceId(Long deviceId)
{
this.deviceId = deviceId;
}
public Long getDeviceId()
{
return deviceId;
}
public void setResult(Integer result)
{
this.result = result;
}
public Integer getResult()
{
return result;
}
public void setErrorMsg(String errorMsg)
{
this.errorMsg = errorMsg;
}
public String getErrorMsg()
{
return errorMsg;
}
public void setResponseData(String responseData)
{
this.responseData = responseData;
}
public String getResponseData()
{
return responseData;
}
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
public Date getCreatedAt()
{
return createdAt;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("commandId", getCommandId())
.append("deviceId", getDeviceId())
.append("result", getResult())
.append("errorMsg", getErrorMsg())
.append("responseData", getResponseData())
.append("createdAt", getCreatedAt())
.toString();
}
}
@@ -0,0 +1,120 @@
package com.luqj.ec.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
/**
* 指令执行结果(客户端回传)对象 ec_command_result
*
* @author luqj
* @date 2026-02-27
*/
@TableName(value = "ec_command_result")
public class EcCommandResultPlus implements Serializable
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 命令ID */
@Excel(name = "命令ID")
private Long commandId;
/** 设备ID */
@Excel(name = "设备ID")
private Long deviceId;
/** 返回结果 */
@Excel(name = "返回结果")
private Integer result;
/** 错误信息 */
@Excel(name = "错误信息")
private String errorMsg;
/** 返回信息 */
@Excel(name = "返回信息")
private String responseData;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdAt;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setCommandId(Long commandId)
{
this.commandId = commandId;
}
public Long getCommandId()
{
return commandId;
}
public void setDeviceId(Long deviceId)
{
this.deviceId = deviceId;
}
public Long getDeviceId()
{
return deviceId;
}
public void setResult(Integer result)
{
this.result = result;
}
public Integer getResult()
{
return result;
}
public void setErrorMsg(String errorMsg)
{
this.errorMsg = errorMsg;
}
public String getErrorMsg()
{
return errorMsg;
}
public void setResponseData(String responseData)
{
this.responseData = responseData;
}
public String getResponseData()
{
return responseData;
}
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
public Date getCreatedAt()
{
return createdAt;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("commandId", getCommandId())
.append("deviceId", getDeviceId())
.append("result", getResult())
.append("errorMsg", getErrorMsg())
.append("responseData", getResponseData())
.append("createdAt", getCreatedAt())
.toString();
}
}
@@ -0,0 +1,139 @@
package com.luqj.ec.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.io.Serializable;
/**
* 任务(群控核心)对象 ec_control_task
*
* @author luqj
* @date 2026-02-27
*/
public class EcControlTask extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 任务名称 */
@Excel(name = "任务名称")
private String taskName;
/** 任务类型 */
@Excel(name = "任务类型")
private Integer taskType;
/** 用户ID */
@Excel(name = "用户ID")
private Long userId;
/** 状态 */
@Excel(name = "状态")
private Integer status;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdAt;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updatedAt;
/** 应用ID */
@Excel(name = "应用ID")
private Long appId;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setTaskName(String taskName)
{
this.taskName = taskName;
}
public String getTaskName()
{
return taskName;
}
public void setTaskType(Integer taskType)
{
this.taskType = taskType;
}
public Integer getTaskType()
{
return taskType;
}
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getUserId()
{
return userId;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
public Date getCreatedAt()
{
return createdAt;
}
public void setUpdatedAt(Date updatedAt)
{
this.updatedAt = updatedAt;
}
public Date getUpdatedAt()
{
return updatedAt;
}
public void setAppId(Long appId)
{
this.appId = appId;
}
public Long getAppId()
{
return appId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("taskName", getTaskName())
.append("taskType", getTaskType())
.append("userId", getUserId())
.append("status", getStatus())
.append("createdAt", getCreatedAt())
.append("updatedAt", getUpdatedAt())
.append("appId", getAppId())
.toString();
}
}
@@ -0,0 +1,134 @@
package com.luqj.ec.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
/**
* 任务(群控核心)对象 ec_control_task
*
* @author luqj
* @date 2026-02-27
*/
@TableName(value = "ec_control_task")
public class EcControlTaskPlus implements Serializable
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 任务名称 */
@Excel(name = "任务名称")
private String taskName;
/** 任务类型 */
@Excel(name = "任务类型")
private Integer taskType;
/** 用户ID */
@Excel(name = "用户ID")
private Long userId;
/** 状态 */
@Excel(name = "状态")
private Integer status;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdAt;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updatedAt;
/** 应用ID */
@Excel(name = "应用ID")
private Long appId;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setTaskName(String taskName)
{
this.taskName = taskName;
}
public String getTaskName()
{
return taskName;
}
public void setTaskType(Integer taskType)
{
this.taskType = taskType;
}
public Integer getTaskType()
{
return taskType;
}
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getUserId()
{
return userId;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
public Date getCreatedAt()
{
return createdAt;
}
public void setUpdatedAt(Date updatedAt)
{
this.updatedAt = updatedAt;
}
public Date getUpdatedAt()
{
return updatedAt;
}
public void setAppId(Long appId)
{
this.appId = appId;
}
public Long getAppId()
{
return appId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("taskName", getTaskName())
.append("taskType", getTaskType())
.append("userId", getUserId())
.append("status", getStatus())
.append("createdAt", getCreatedAt())
.append("updatedAt", getUpdatedAt())
.append("appId", getAppId())
.toString();
}
}
@@ -0,0 +1,292 @@
package com.luqj.ec.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.io.Serializable;
/**
* 设备(手机设备)对象 ec_device
*
* @author luqj
* @date 2026-02-27
*/
public class EcDevice extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 设备唯一标识 */
@Excel(name = "设备唯一标识")
private String deviceCode;
/** 品牌 */
@Excel(name = "品牌")
private String brand;
/** 模型 */
@Excel(name = "模型")
private String model;
/** 系统类型 */
@Excel(name = "系统类型")
private String osType;
/** 系统版本 */
@Excel(name = "系统版本")
private String osVersion;
/** 版本 */
@Excel(name = "版本")
private String appVersion;
/** 状态 */
@Excel(name = "状态")
private Integer status;
/** 最后在线时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "最后在线时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date lastOnlineTime;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdAt;
/** 更新时间 */
private Date updatedAt;
/** ip地址 */
@Excel(name = "ip地址")
private String ipAddress;
/** 最后截图 */
@Excel(name = "最后截图")
private String lastScreenPic;
/** 宽度 */
@Excel(name = "宽度")
private Integer widthNum;
/** 高度 */
@Excel(name = "高度")
private Integer heightNum;
/** 控制类型 */
@Excel(name = "控制类型")
private Integer controlType;
/** 应用ID */
@Excel(name = "应用ID")
private Long appId;
/** 用户ID */
@Excel(name = "用户ID")
private Long userId;
/** 密钥 */
@Excel(name = "密钥")
private String secretKey;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setDeviceCode(String deviceCode)
{
this.deviceCode = deviceCode;
}
public String getDeviceCode()
{
return deviceCode;
}
public void setBrand(String brand)
{
this.brand = brand;
}
public String getBrand()
{
return brand;
}
public void setModel(String model)
{
this.model = model;
}
public String getModel()
{
return model;
}
public void setOsType(String osType)
{
this.osType = osType;
}
public String getOsType()
{
return osType;
}
public void setOsVersion(String osVersion)
{
this.osVersion = osVersion;
}
public String getOsVersion()
{
return osVersion;
}
public void setAppVersion(String appVersion)
{
this.appVersion = appVersion;
}
public String getAppVersion()
{
return appVersion;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setLastOnlineTime(Date lastOnlineTime)
{
this.lastOnlineTime = lastOnlineTime;
}
public Date getLastOnlineTime()
{
return lastOnlineTime;
}
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
public Date getCreatedAt()
{
return createdAt;
}
public void setUpdatedAt(Date updatedAt)
{
this.updatedAt = updatedAt;
}
public Date getUpdatedAt()
{
return updatedAt;
}
public void setIpAddress(String ipAddress)
{
this.ipAddress = ipAddress;
}
public String getIpAddress()
{
return ipAddress;
}
public void setLastScreenPic(String lastScreenPic)
{
this.lastScreenPic = lastScreenPic;
}
public String getLastScreenPic()
{
return lastScreenPic;
}
public void setWidthNum(Integer widthNum)
{
this.widthNum = widthNum;
}
public Integer getWidthNum()
{
return widthNum;
}
public void setHeightNum(Integer heightNum)
{
this.heightNum = heightNum;
}
public Integer getHeightNum()
{
return heightNum;
}
public void setControlType(Integer controlType)
{
this.controlType = controlType;
}
public Integer getControlType()
{
return controlType;
}
public void setAppId(Long appId)
{
this.appId = appId;
}
public Long getAppId()
{
return appId;
}
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getUserId()
{
return userId;
}
public void setSecretKey(String secretKey)
{
this.secretKey = secretKey;
}
public String getSecretKey()
{
return secretKey;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("deviceCode", getDeviceCode())
.append("brand", getBrand())
.append("model", getModel())
.append("osType", getOsType())
.append("osVersion", getOsVersion())
.append("appVersion", getAppVersion())
.append("status", getStatus())
.append("lastOnlineTime", getLastOnlineTime())
.append("createdAt", getCreatedAt())
.append("updatedAt", getUpdatedAt())
.append("ipAddress", getIpAddress())
.append("lastScreenPic", getLastScreenPic())
.append("widthNum", getWidthNum())
.append("heightNum", getHeightNum())
.append("controlType", getControlType())
.append("appId", getAppId())
.append("userId", getUserId())
.append("secretKey", getSecretKey())
.toString();
}
}
@@ -0,0 +1,140 @@
package com.luqj.ec.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.io.Serializable;
/**
* 控制指令(单条指令)对象 ec_device_command
*
* @author luqj
* @date 2026-02-27
*/
public class EcDeviceCommand extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 设备ID */
@Excel(name = "设备ID")
private Long deviceId;
/** 命令类型 */
@Excel(name = "命令类型")
private String commandType;
/** 指令参数 */
@Excel(name = "指令参数")
private String commandContent;
/** 状态 */
@Excel(name = "状态")
private Integer status;
/** 发送时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "发送时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date sendTime;
/** 执行时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "执行时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date executeTime;
/** 完成时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date finishTime;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setDeviceId(Long deviceId)
{
this.deviceId = deviceId;
}
public Long getDeviceId()
{
return deviceId;
}
public void setCommandType(String commandType)
{
this.commandType = commandType;
}
public String getCommandType()
{
return commandType;
}
public void setCommandContent(String commandContent)
{
this.commandContent = commandContent;
}
public String getCommandContent()
{
return commandContent;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setSendTime(Date sendTime)
{
this.sendTime = sendTime;
}
public Date getSendTime()
{
return sendTime;
}
public void setExecuteTime(Date executeTime)
{
this.executeTime = executeTime;
}
public Date getExecuteTime()
{
return executeTime;
}
public void setFinishTime(Date finishTime)
{
this.finishTime = finishTime;
}
public Date getFinishTime()
{
return finishTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("deviceId", getDeviceId())
.append("commandType", getCommandType())
.append("commandContent", getCommandContent())
.append("status", getStatus())
.append("sendTime", getSendTime())
.append("executeTime", getExecuteTime())
.append("finishTime", getFinishTime())
.toString();
}
}
@@ -0,0 +1,135 @@
package com.luqj.ec.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
/**
* 控制指令(单条指令)对象 ec_device_command
*
* @author luqj
* @date 2026-02-27
*/
@TableName(value = "ec_device_command")
public class EcDeviceCommandPlus implements Serializable
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 设备ID */
@Excel(name = "设备ID")
private Long deviceId;
/** 命令类型 */
@Excel(name = "命令类型")
private String commandType;
/** 指令参数 */
@Excel(name = "指令参数")
private String commandContent;
/** 状态 */
@Excel(name = "状态")
private Integer status;
/** 发送时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "发送时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date sendTime;
/** 执行时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "执行时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date executeTime;
/** 完成时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date finishTime;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setDeviceId(Long deviceId)
{
this.deviceId = deviceId;
}
public Long getDeviceId()
{
return deviceId;
}
public void setCommandType(String commandType)
{
this.commandType = commandType;
}
public String getCommandType()
{
return commandType;
}
public void setCommandContent(String commandContent)
{
this.commandContent = commandContent;
}
public String getCommandContent()
{
return commandContent;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setSendTime(Date sendTime)
{
this.sendTime = sendTime;
}
public Date getSendTime()
{
return sendTime;
}
public void setExecuteTime(Date executeTime)
{
this.executeTime = executeTime;
}
public Date getExecuteTime()
{
return executeTime;
}
public void setFinishTime(Date finishTime)
{
this.finishTime = finishTime;
}
public Date getFinishTime()
{
return finishTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("deviceId", getDeviceId())
.append("commandType", getCommandType())
.append("commandContent", getCommandContent())
.append("status", getStatus())
.append("sendTime", getSendTime())
.append("executeTime", getExecuteTime())
.append("finishTime", getFinishTime())
.toString();
}
}
@@ -0,0 +1,276 @@
package com.luqj.ec.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
/**
* 设备(手机设备)对象 ec_device
*
* @author luqj
* @date 2026-02-27
*/
@TableName(value = "ec_device")
public class EcDevicePlus implements Serializable
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 设备唯一标识 */
@Excel(name = "设备唯一标识")
private String deviceCode;
/** 品牌 */
@Excel(name = "品牌")
private String brand;
/** 模型 */
@Excel(name = "模型")
private String model;
/** 系统类型 */
@Excel(name = "系统类型")
private String osType;
/** 系统版本 */
@Excel(name = "系统版本")
private String osVersion;
/** 版本 */
@Excel(name = "版本")
private String appVersion;
/** 状态 */
@Excel(name = "状态")
private Integer status;
/** 最后在线时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "最后在线时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date lastOnlineTime;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdAt;
/** 更新时间 */
private Date updatedAt;
/** ip地址 */
@Excel(name = "ip地址")
private String ipAddress;
/** 最后截图 */
@Excel(name = "最后截图")
private String lastScreenPic;
/** 宽度 */
@Excel(name = "宽度")
private Integer widthNum;
/** 高度 */
@Excel(name = "高度")
private Integer heightNum;
/** 控制类型 */
@Excel(name = "控制类型")
private Integer controlType;
/** 应用ID */
@Excel(name = "应用ID")
private Long appId;
/** 用户ID */
@Excel(name = "用户ID")
private Long userId;
/** 密钥 */
@Excel(name = "密钥")
private String secretKey;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setDeviceCode(String deviceCode)
{
this.deviceCode = deviceCode;
}
public String getDeviceCode()
{
return deviceCode;
}
public void setBrand(String brand)
{
this.brand = brand;
}
public String getBrand()
{
return brand;
}
public void setModel(String model)
{
this.model = model;
}
public String getModel()
{
return model;
}
public void setOsType(String osType)
{
this.osType = osType;
}
public String getOsType()
{
return osType;
}
public void setOsVersion(String osVersion)
{
this.osVersion = osVersion;
}
public String getOsVersion()
{
return osVersion;
}
public void setAppVersion(String appVersion)
{
this.appVersion = appVersion;
}
public String getAppVersion()
{
return appVersion;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setLastOnlineTime(Date lastOnlineTime)
{
this.lastOnlineTime = lastOnlineTime;
}
public Date getLastOnlineTime()
{
return lastOnlineTime;
}
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
public Date getCreatedAt()
{
return createdAt;
}
public void setUpdatedAt(Date updatedAt)
{
this.updatedAt = updatedAt;
}
public Date getUpdatedAt()
{
return updatedAt;
}
public void setIpAddress(String ipAddress)
{
this.ipAddress = ipAddress;
}
public String getIpAddress()
{
return ipAddress;
}
public void setLastScreenPic(String lastScreenPic)
{
this.lastScreenPic = lastScreenPic;
}
public String getLastScreenPic()
{
return lastScreenPic;
}
public void setWidthNum(Integer widthNum)
{
this.widthNum = widthNum;
}
public Integer getWidthNum()
{
return widthNum;
}
public void setHeightNum(Integer heightNum)
{
this.heightNum = heightNum;
}
public Integer getHeightNum()
{
return heightNum;
}
public void setControlType(Integer controlType)
{
this.controlType = controlType;
}
public Integer getControlType()
{
return controlType;
}
public void setAppId(Long appId)
{
this.appId = appId;
}
public Long getAppId()
{
return appId;
}
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getUserId()
{
return userId;
}
public void setSecretKey(String secretKey)
{
this.secretKey = secretKey;
}
public String getSecretKey()
{
return secretKey;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("deviceCode", getDeviceCode())
.append("brand", getBrand())
.append("model", getModel())
.append("osType", getOsType())
.append("osVersion", getOsVersion())
.append("appVersion", getAppVersion())
.append("status", getStatus())
.append("lastOnlineTime", getLastOnlineTime())
.append("createdAt", getCreatedAt())
.append("updatedAt", getUpdatedAt())
.append("ipAddress", getIpAddress())
.append("lastScreenPic", getLastScreenPic())
.append("widthNum", getWidthNum())
.append("heightNum", getHeightNum())
.append("controlType", getControlType())
.append("appId", getAppId())
.append("userId", getUserId())
.append("secretKey", getSecretKey())
.toString();
}
}
@@ -0,0 +1,154 @@
package com.luqj.ec.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.io.Serializable;
/**
* 设备心跳 & 状态(高频)对象 ec_device_status
*
* @author luqj
* @date 2026-02-27
*/
public class EcDeviceStatus extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 设备ID */
@Excel(name = "设备ID")
private Long deviceId;
/** 电量百分比 */
@Excel(name = "电量百分比")
private Long battery;
/** 网络类型 */
@Excel(name = "网络类型")
private String networkType;
/** cpu状态 */
@Excel(name = "cpu状态")
private BigDecimal cpuUsage;
/** 内存状态 */
@Excel(name = "内存状态")
private BigDecimal memoryUsage;
/** 屏幕状态 */
@Excel(name = "屏幕状态")
private Integer screenOn;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdAt;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updatedAt;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setDeviceId(Long deviceId)
{
this.deviceId = deviceId;
}
public Long getDeviceId()
{
return deviceId;
}
public void setBattery(Long battery)
{
this.battery = battery;
}
public Long getBattery()
{
return battery;
}
public void setNetworkType(String networkType)
{
this.networkType = networkType;
}
public String getNetworkType()
{
return networkType;
}
public void setCpuUsage(BigDecimal cpuUsage)
{
this.cpuUsage = cpuUsage;
}
public BigDecimal getCpuUsage()
{
return cpuUsage;
}
public void setMemoryUsage(BigDecimal memoryUsage)
{
this.memoryUsage = memoryUsage;
}
public BigDecimal getMemoryUsage()
{
return memoryUsage;
}
public void setScreenOn(Integer screenOn)
{
this.screenOn = screenOn;
}
public Integer getScreenOn()
{
return screenOn;
}
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
public Date getCreatedAt()
{
return createdAt;
}
public void setUpdatedAt(Date updatedAt)
{
this.updatedAt = updatedAt;
}
public Date getUpdatedAt()
{
return updatedAt;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("deviceId", getDeviceId())
.append("battery", getBattery())
.append("networkType", getNetworkType())
.append("cpuUsage", getCpuUsage())
.append("memoryUsage", getMemoryUsage())
.append("screenOn", getScreenOn())
.append("createdAt", getCreatedAt())
.append("updatedAt", getUpdatedAt())
.toString();
}
}
@@ -0,0 +1,148 @@
package com.luqj.ec.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
/**
* 设备心跳 & 状态(高频)对象 ec_device_status
*
* @author luqj
* @date 2026-02-27
*/
@TableName(value = "ec_device_status")
public class EcDeviceStatusPlus implements Serializable
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 设备ID */
@Excel(name = "设备ID")
private Long deviceId;
/** 电量百分比 */
@Excel(name = "电量百分比")
private Long battery;
/** 网络类型 */
@Excel(name = "网络类型")
private String networkType;
/** cpu状态 */
@Excel(name = "cpu状态")
private BigDecimal cpuUsage;
/** 内存状态 */
@Excel(name = "内存状态")
private BigDecimal memoryUsage;
/** 屏幕状态 */
@Excel(name = "屏幕状态")
private Integer screenOn;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdAt;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updatedAt;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setDeviceId(Long deviceId)
{
this.deviceId = deviceId;
}
public Long getDeviceId()
{
return deviceId;
}
public void setBattery(Long battery)
{
this.battery = battery;
}
public Long getBattery()
{
return battery;
}
public void setNetworkType(String networkType)
{
this.networkType = networkType;
}
public String getNetworkType()
{
return networkType;
}
public void setCpuUsage(BigDecimal cpuUsage)
{
this.cpuUsage = cpuUsage;
}
public BigDecimal getCpuUsage()
{
return cpuUsage;
}
public void setMemoryUsage(BigDecimal memoryUsage)
{
this.memoryUsage = memoryUsage;
}
public BigDecimal getMemoryUsage()
{
return memoryUsage;
}
public void setScreenOn(Integer screenOn)
{
this.screenOn = screenOn;
}
public Integer getScreenOn()
{
return screenOn;
}
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
public Date getCreatedAt()
{
return createdAt;
}
public void setUpdatedAt(Date updatedAt)
{
this.updatedAt = updatedAt;
}
public Date getUpdatedAt()
{
return updatedAt;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("deviceId", getDeviceId())
.append("battery", getBattery())
.append("networkType", getNetworkType())
.append("cpuUsage", getCpuUsage())
.append("memoryUsage", getMemoryUsage())
.append("screenOn", getScreenOn())
.append("createdAt", getCreatedAt())
.append("updatedAt", getUpdatedAt())
.toString();
}
}
@@ -0,0 +1,93 @@
package com.luqj.ec.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.io.Serializable;
/**
* 任务指令明细(一个任务多条指令)对象 ec_task_command
*
* @author luqj
* @date 2026-02-27
*/
public class EcTaskCommand extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 任务ID */
@Excel(name = "任务ID")
private Long taskId;
/** 执行顺序 */
@Excel(name = "执行顺序")
private Long stepOrder;
/** 指令类型 */
@Excel(name = "指令类型")
private String commandType;
/** 指令参数 */
@Excel(name = "指令参数")
private String commandContent;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setTaskId(Long taskId)
{
this.taskId = taskId;
}
public Long getTaskId()
{
return taskId;
}
public void setStepOrder(Long stepOrder)
{
this.stepOrder = stepOrder;
}
public Long getStepOrder()
{
return stepOrder;
}
public void setCommandType(String commandType)
{
this.commandType = commandType;
}
public String getCommandType()
{
return commandType;
}
public void setCommandContent(String commandContent)
{
this.commandContent = commandContent;
}
public String getCommandContent()
{
return commandContent;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("taskId", getTaskId())
.append("stepOrder", getStepOrder())
.append("commandType", getCommandType())
.append("commandContent", getCommandContent())
.toString();
}
}
@@ -0,0 +1,91 @@
package com.luqj.ec.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
/**
* 任务指令明细(一个任务多条指令)对象 ec_task_command
*
* @author luqj
* @date 2026-02-27
*/
@TableName(value = "ec_task_command")
public class EcTaskCommandPlus implements Serializable
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 任务ID */
@Excel(name = "任务ID")
private Long taskId;
/** 执行顺序 */
@Excel(name = "执行顺序")
private Long stepOrder;
/** 指令类型 */
@Excel(name = "指令类型")
private String commandType;
/** 指令参数 */
@Excel(name = "指令参数")
private String commandContent;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setTaskId(Long taskId)
{
this.taskId = taskId;
}
public Long getTaskId()
{
return taskId;
}
public void setStepOrder(Long stepOrder)
{
this.stepOrder = stepOrder;
}
public Long getStepOrder()
{
return stepOrder;
}
public void setCommandType(String commandType)
{
this.commandType = commandType;
}
public String getCommandType()
{
return commandType;
}
public void setCommandContent(String commandContent)
{
this.commandContent = commandContent;
}
public String getCommandContent()
{
return commandContent;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("taskId", getTaskId())
.append("stepOrder", getStepOrder())
.append("commandType", getCommandType())
.append("commandContent", getCommandContent())
.toString();
}
}
@@ -0,0 +1,96 @@
package com.luqj.ec.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.io.Serializable;
/**
* 任务-设备关联(一任务多设备)对象 ec_task_device
*
* @author luqj
* @date 2026-02-27
*/
public class EcTaskDevice extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 任务ID */
@Excel(name = "任务ID")
private Long taskId;
/** 设备ID */
@Excel(name = "设备ID")
private Long deviceId;
/** 状态 */
@Excel(name = "状态")
private Integer status;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updatedAt;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setTaskId(Long taskId)
{
this.taskId = taskId;
}
public Long getTaskId()
{
return taskId;
}
public void setDeviceId(Long deviceId)
{
this.deviceId = deviceId;
}
public Long getDeviceId()
{
return deviceId;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setUpdatedAt(Date updatedAt)
{
this.updatedAt = updatedAt;
}
public Date getUpdatedAt()
{
return updatedAt;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("taskId", getTaskId())
.append("deviceId", getDeviceId())
.append("status", getStatus())
.append("updatedAt", getUpdatedAt())
.toString();
}
}
@@ -0,0 +1,94 @@
package com.luqj.ec.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
/**
* 任务-设备关联(一任务多设备)对象 ec_task_device
*
* @author luqj
* @date 2026-02-27
*/
@TableName(value = "ec_task_device")
public class EcTaskDevicePlus implements Serializable
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 任务ID */
@Excel(name = "任务ID")
private Long taskId;
/** 设备ID */
@Excel(name = "设备ID")
private Long deviceId;
/** 状态 */
@Excel(name = "状态")
private Integer status;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updatedAt;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setTaskId(Long taskId)
{
this.taskId = taskId;
}
public Long getTaskId()
{
return taskId;
}
public void setDeviceId(Long deviceId)
{
this.deviceId = deviceId;
}
public Long getDeviceId()
{
return deviceId;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setUpdatedAt(Date updatedAt)
{
this.updatedAt = updatedAt;
}
public Date getUpdatedAt()
{
return updatedAt;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("taskId", getTaskId())
.append("deviceId", getDeviceId())
.append("status", getStatus())
.append("updatedAt", getUpdatedAt())
.toString();
}
}
@@ -0,0 +1,65 @@
package com.luqj.ec.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import com.luqj.ec.domain.EcCommandResult;
import com.luqj.ec.domain.EcCommandResultPlus;
/**
* 指令执行结果(客户端回传)Mapper接口
*
* @author luqj
* @date 2026-02-27
*/
public interface EcCommandResultMapper extends BaseMapper<EcCommandResultPlus>
{
/**
* 查询指令执行结果(客户端回传)
*
* @param id 指令执行结果(客户端回传)ID
* @return 指令执行结果(客户端回传)
*/
public EcCommandResult selectEcCommandResultById(Long id);
/**
* 查询指令执行结果(客户端回传)列表
*
* @param ecCommandResult 指令执行结果(客户端回传)
* @return 指令执行结果(客户端回传)集合
*/
public List<EcCommandResult> selectEcCommandResultList(EcCommandResult ecCommandResult);
/**
* 新增指令执行结果(客户端回传)
*
* @param ecCommandResult 指令执行结果(客户端回传)
* @return 结果
*/
public int insertEcCommandResult(EcCommandResult ecCommandResult);
/**
* 修改指令执行结果(客户端回传)
*
* @param ecCommandResult 指令执行结果(客户端回传)
* @return 结果
*/
public int updateEcCommandResult(EcCommandResult ecCommandResult);
/**
* 删除指令执行结果(客户端回传)
*
* @param id 指令执行结果(客户端回传)ID
* @return 结果
*/
public int deleteEcCommandResultById(Long id);
/**
* 批量删除指令执行结果(客户端回传)
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteEcCommandResultByIds(Long[] ids);
}
@@ -0,0 +1,65 @@
package com.luqj.ec.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import com.luqj.ec.domain.EcControlTask;
import com.luqj.ec.domain.EcControlTaskPlus;
/**
* 任务(群控核心)Mapper接口
*
* @author luqj
* @date 2026-02-27
*/
public interface EcControlTaskMapper extends BaseMapper<EcControlTaskPlus>
{
/**
* 查询任务(群控核心)
*
* @param id 任务(群控核心)ID
* @return 任务(群控核心)
*/
public EcControlTask selectEcControlTaskById(Long id);
/**
* 查询任务(群控核心)列表
*
* @param ecControlTask 任务(群控核心)
* @return 任务(群控核心)集合
*/
public List<EcControlTask> selectEcControlTaskList(EcControlTask ecControlTask);
/**
* 新增任务(群控核心)
*
* @param ecControlTask 任务(群控核心)
* @return 结果
*/
public int insertEcControlTask(EcControlTask ecControlTask);
/**
* 修改任务(群控核心)
*
* @param ecControlTask 任务(群控核心)
* @return 结果
*/
public int updateEcControlTask(EcControlTask ecControlTask);
/**
* 删除任务(群控核心)
*
* @param id 任务(群控核心)ID
* @return 结果
*/
public int deleteEcControlTaskById(Long id);
/**
* 批量删除任务(群控核心)
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteEcControlTaskByIds(Long[] ids);
}
@@ -0,0 +1,65 @@
package com.luqj.ec.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import com.luqj.ec.domain.EcDeviceCommand;
import com.luqj.ec.domain.EcDeviceCommandPlus;
/**
* 控制指令(单条指令)Mapper接口
*
* @author luqj
* @date 2026-02-27
*/
public interface EcDeviceCommandMapper extends BaseMapper<EcDeviceCommandPlus>
{
/**
* 查询控制指令(单条指令)
*
* @param id 控制指令(单条指令)ID
* @return 控制指令(单条指令)
*/
public EcDeviceCommand selectEcDeviceCommandById(Long id);
/**
* 查询控制指令(单条指令)列表
*
* @param ecDeviceCommand 控制指令(单条指令)
* @return 控制指令(单条指令)集合
*/
public List<EcDeviceCommand> selectEcDeviceCommandList(EcDeviceCommand ecDeviceCommand);
/**
* 新增控制指令(单条指令)
*
* @param ecDeviceCommand 控制指令(单条指令)
* @return 结果
*/
public int insertEcDeviceCommand(EcDeviceCommand ecDeviceCommand);
/**
* 修改控制指令(单条指令)
*
* @param ecDeviceCommand 控制指令(单条指令)
* @return 结果
*/
public int updateEcDeviceCommand(EcDeviceCommand ecDeviceCommand);
/**
* 删除控制指令(单条指令)
*
* @param id 控制指令(单条指令)ID
* @return 结果
*/
public int deleteEcDeviceCommandById(Long id);
/**
* 批量删除控制指令(单条指令)
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteEcDeviceCommandByIds(Long[] ids);
}
@@ -0,0 +1,65 @@
package com.luqj.ec.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import com.luqj.ec.domain.EcDevice;
import com.luqj.ec.domain.EcDevicePlus;
/**
* 设备(手机设备)Mapper接口
*
* @author luqj
* @date 2026-02-27
*/
public interface EcDeviceMapper extends BaseMapper<EcDevicePlus>
{
/**
* 查询设备(手机设备)
*
* @param id 设备(手机设备)ID
* @return 设备(手机设备)
*/
public EcDevice selectEcDeviceById(Long id);
/**
* 查询设备(手机设备)列表
*
* @param ecDevice 设备(手机设备)
* @return 设备(手机设备)集合
*/
public List<EcDevice> selectEcDeviceList(EcDevice ecDevice);
/**
* 新增设备(手机设备)
*
* @param ecDevice 设备(手机设备)
* @return 结果
*/
public int insertEcDevice(EcDevice ecDevice);
/**
* 修改设备(手机设备)
*
* @param ecDevice 设备(手机设备)
* @return 结果
*/
public int updateEcDevice(EcDevice ecDevice);
/**
* 删除设备(手机设备)
*
* @param id 设备(手机设备)ID
* @return 结果
*/
public int deleteEcDeviceById(Long id);
/**
* 批量删除设备(手机设备)
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteEcDeviceByIds(Long[] ids);
}
@@ -0,0 +1,65 @@
package com.luqj.ec.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import com.luqj.ec.domain.EcDeviceStatus;
import com.luqj.ec.domain.EcDeviceStatusPlus;
/**
* 设备心跳 & 状态(高频)Mapper接口
*
* @author luqj
* @date 2026-02-27
*/
public interface EcDeviceStatusMapper extends BaseMapper<EcDeviceStatusPlus>
{
/**
* 查询设备心跳 & 状态(高频)
*
* @param id 设备心跳 & 状态(高频)ID
* @return 设备心跳 & 状态(高频)
*/
public EcDeviceStatus selectEcDeviceStatusById(Long id);
/**
* 查询设备心跳 & 状态(高频)列表
*
* @param ecDeviceStatus 设备心跳 & 状态(高频)
* @return 设备心跳 & 状态(高频)集合
*/
public List<EcDeviceStatus> selectEcDeviceStatusList(EcDeviceStatus ecDeviceStatus);
/**
* 新增设备心跳 & 状态(高频)
*
* @param ecDeviceStatus 设备心跳 & 状态(高频)
* @return 结果
*/
public int insertEcDeviceStatus(EcDeviceStatus ecDeviceStatus);
/**
* 修改设备心跳 & 状态(高频)
*
* @param ecDeviceStatus 设备心跳 & 状态(高频)
* @return 结果
*/
public int updateEcDeviceStatus(EcDeviceStatus ecDeviceStatus);
/**
* 删除设备心跳 & 状态(高频)
*
* @param id 设备心跳 & 状态(高频)ID
* @return 结果
*/
public int deleteEcDeviceStatusById(Long id);
/**
* 批量删除设备心跳 & 状态(高频)
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteEcDeviceStatusByIds(Long[] ids);
}
@@ -0,0 +1,65 @@
package com.luqj.ec.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import com.luqj.ec.domain.EcTaskCommand;
import com.luqj.ec.domain.EcTaskCommandPlus;
/**
* 任务指令明细(一个任务多条指令)Mapper接口
*
* @author luqj
* @date 2026-02-27
*/
public interface EcTaskCommandMapper extends BaseMapper<EcTaskCommandPlus>
{
/**
* 查询任务指令明细(一个任务多条指令)
*
* @param id 任务指令明细(一个任务多条指令)ID
* @return 任务指令明细(一个任务多条指令)
*/
public EcTaskCommand selectEcTaskCommandById(Long id);
/**
* 查询任务指令明细(一个任务多条指令)列表
*
* @param ecTaskCommand 任务指令明细(一个任务多条指令)
* @return 任务指令明细(一个任务多条指令)集合
*/
public List<EcTaskCommand> selectEcTaskCommandList(EcTaskCommand ecTaskCommand);
/**
* 新增任务指令明细(一个任务多条指令)
*
* @param ecTaskCommand 任务指令明细(一个任务多条指令)
* @return 结果
*/
public int insertEcTaskCommand(EcTaskCommand ecTaskCommand);
/**
* 修改任务指令明细(一个任务多条指令)
*
* @param ecTaskCommand 任务指令明细(一个任务多条指令)
* @return 结果
*/
public int updateEcTaskCommand(EcTaskCommand ecTaskCommand);
/**
* 删除任务指令明细(一个任务多条指令)
*
* @param id 任务指令明细(一个任务多条指令)ID
* @return 结果
*/
public int deleteEcTaskCommandById(Long id);
/**
* 批量删除任务指令明细(一个任务多条指令)
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteEcTaskCommandByIds(Long[] ids);
}
@@ -0,0 +1,65 @@
package com.luqj.ec.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import com.luqj.ec.domain.EcTaskDevice;
import com.luqj.ec.domain.EcTaskDevicePlus;
/**
* 任务-设备关联(一任务多设备)Mapper接口
*
* @author luqj
* @date 2026-02-27
*/
public interface EcTaskDeviceMapper extends BaseMapper<EcTaskDevicePlus>
{
/**
* 查询任务-设备关联(一任务多设备)
*
* @param id 任务-设备关联(一任务多设备)ID
* @return 任务-设备关联(一任务多设备)
*/
public EcTaskDevice selectEcTaskDeviceById(Long id);
/**
* 查询任务-设备关联(一任务多设备)列表
*
* @param ecTaskDevice 任务-设备关联(一任务多设备)
* @return 任务-设备关联(一任务多设备)集合
*/
public List<EcTaskDevice> selectEcTaskDeviceList(EcTaskDevice ecTaskDevice);
/**
* 新增任务-设备关联(一任务多设备)
*
* @param ecTaskDevice 任务-设备关联(一任务多设备)
* @return 结果
*/
public int insertEcTaskDevice(EcTaskDevice ecTaskDevice);
/**
* 修改任务-设备关联(一任务多设备)
*
* @param ecTaskDevice 任务-设备关联(一任务多设备)
* @return 结果
*/
public int updateEcTaskDevice(EcTaskDevice ecTaskDevice);
/**
* 删除任务-设备关联(一任务多设备)
*
* @param id 任务-设备关联(一任务多设备)ID
* @return 结果
*/
public int deleteEcTaskDeviceById(Long id);
/**
* 批量删除任务-设备关联(一任务多设备)
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteEcTaskDeviceByIds(Long[] ids);
}
@@ -0,0 +1,89 @@
package com.luqj.ec.service;
import java.util.Map;
import java.util.List;
import com.luqj.ec.domain.EcCommandResult;
import com.luqj.ec.domain.EcCommandResultPlus;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.ruoyi.common.select.SelectItem;
/**
* 指令执行结果(客户端回传)Service接口
*
* @author luqj
* @date 2026-02-27
*/
public interface IEcCommandResultService extends IService<EcCommandResultPlus>
{
List<SelectItem> select(String keyword);
/**
* 查询指令执行结果(客户端回传)
*
* @param id 指令执行结果(客户端回传)ID
* @return 指令执行结果(客户端回传)
*/
public EcCommandResult selectEcCommandResultById(Long id);
/**
* 查询指令执行结果(客户端回传)列表
*
* @param ecCommandResult 指令执行结果(客户端回传)
* @return 指令执行结果(客户端回传)集合
*/
public List<EcCommandResult> selectEcCommandResultList(EcCommandResult ecCommandResult);
/**
* 新增指令执行结果(客户端回传)
*
* @param ecCommandResult 指令执行结果(客户端回传)
* @return 结果
*/
public int insertEcCommandResult(EcCommandResult ecCommandResult);
/**
* 修改指令执行结果(客户端回传)
*
* @param ecCommandResult 指令执行结果(客户端回传)
* @return 结果
*/
public int updateEcCommandResult(EcCommandResult ecCommandResult);
/**
* 批量删除指令执行结果(客户端回传)
*
* @param ids 需要删除的指令执行结果(客户端回传)ID
* @return 结果
*/
public int deleteEcCommandResultByIds(Long[] ids);
/**
* 删除指令执行结果(客户端回传)信息
*
* @param id 指令执行结果(客户端回传)ID
* @return 结果
*/
public int deleteEcCommandResultById(Long id);
List<EcCommandResultPlus> getByIds(List<Long> ids, SFunction<EcCommandResultPlus, ?>... columns);
EcCommandResultPlus getById(Long id, SFunction<EcCommandResultPlus, ?>... columns);
Map<Long, EcCommandResultPlus> getMapByIds(List<Long> ids, SFunction<EcCommandResultPlus, ?>... columns);
List<EcCommandResultPlus> getByIds(List<Long> ids);
Map<Long, EcCommandResultPlus> getMapByIds(List<Long> ids);
/**
* @param field sum 字段
* @param where 条件
* @param tClass 返回类型
* @param <T>
* @return
*/
<T> T sum(String field, String where, Class<T> tClass);
Long count(String where);
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
}
@@ -0,0 +1,89 @@
package com.luqj.ec.service;
import java.util.Map;
import java.util.List;
import com.luqj.ec.domain.EcControlTask;
import com.luqj.ec.domain.EcControlTaskPlus;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.ruoyi.common.select.SelectItem;
/**
* 任务(群控核心)Service接口
*
* @author luqj
* @date 2026-02-27
*/
public interface IEcControlTaskService extends IService<EcControlTaskPlus>
{
List<SelectItem> select(String keyword);
/**
* 查询任务(群控核心)
*
* @param id 任务(群控核心)ID
* @return 任务(群控核心)
*/
public EcControlTask selectEcControlTaskById(Long id);
/**
* 查询任务(群控核心)列表
*
* @param ecControlTask 任务(群控核心)
* @return 任务(群控核心)集合
*/
public List<EcControlTask> selectEcControlTaskList(EcControlTask ecControlTask);
/**
* 新增任务(群控核心)
*
* @param ecControlTask 任务(群控核心)
* @return 结果
*/
public int insertEcControlTask(EcControlTask ecControlTask);
/**
* 修改任务(群控核心)
*
* @param ecControlTask 任务(群控核心)
* @return 结果
*/
public int updateEcControlTask(EcControlTask ecControlTask);
/**
* 批量删除任务(群控核心)
*
* @param ids 需要删除的任务(群控核心)ID
* @return 结果
*/
public int deleteEcControlTaskByIds(Long[] ids);
/**
* 删除任务(群控核心)信息
*
* @param id 任务(群控核心)ID
* @return 结果
*/
public int deleteEcControlTaskById(Long id);
List<EcControlTaskPlus> getByIds(List<Long> ids, SFunction<EcControlTaskPlus, ?>... columns);
EcControlTaskPlus getById(Long id, SFunction<EcControlTaskPlus, ?>... columns);
Map<Long, EcControlTaskPlus> getMapByIds(List<Long> ids, SFunction<EcControlTaskPlus, ?>... columns);
List<EcControlTaskPlus> getByIds(List<Long> ids);
Map<Long, EcControlTaskPlus> getMapByIds(List<Long> ids);
/**
* @param field sum 字段
* @param where 条件
* @param tClass 返回类型
* @param <T>
* @return
*/
<T> T sum(String field, String where, Class<T> tClass);
Long count(String where);
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
}
@@ -0,0 +1,89 @@
package com.luqj.ec.service;
import java.util.Map;
import java.util.List;
import com.luqj.ec.domain.EcDeviceCommand;
import com.luqj.ec.domain.EcDeviceCommandPlus;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.ruoyi.common.select.SelectItem;
/**
* 控制指令(单条指令)Service接口
*
* @author luqj
* @date 2026-02-27
*/
public interface IEcDeviceCommandService extends IService<EcDeviceCommandPlus>
{
List<SelectItem> select(String keyword);
/**
* 查询控制指令(单条指令)
*
* @param id 控制指令(单条指令)ID
* @return 控制指令(单条指令)
*/
public EcDeviceCommand selectEcDeviceCommandById(Long id);
/**
* 查询控制指令(单条指令)列表
*
* @param ecDeviceCommand 控制指令(单条指令)
* @return 控制指令(单条指令)集合
*/
public List<EcDeviceCommand> selectEcDeviceCommandList(EcDeviceCommand ecDeviceCommand);
/**
* 新增控制指令(单条指令)
*
* @param ecDeviceCommand 控制指令(单条指令)
* @return 结果
*/
public int insertEcDeviceCommand(EcDeviceCommand ecDeviceCommand);
/**
* 修改控制指令(单条指令)
*
* @param ecDeviceCommand 控制指令(单条指令)
* @return 结果
*/
public int updateEcDeviceCommand(EcDeviceCommand ecDeviceCommand);
/**
* 批量删除控制指令(单条指令)
*
* @param ids 需要删除的控制指令(单条指令)ID
* @return 结果
*/
public int deleteEcDeviceCommandByIds(Long[] ids);
/**
* 删除控制指令(单条指令)信息
*
* @param id 控制指令(单条指令)ID
* @return 结果
*/
public int deleteEcDeviceCommandById(Long id);
List<EcDeviceCommandPlus> getByIds(List<Long> ids, SFunction<EcDeviceCommandPlus, ?>... columns);
EcDeviceCommandPlus getById(Long id, SFunction<EcDeviceCommandPlus, ?>... columns);
Map<Long, EcDeviceCommandPlus> getMapByIds(List<Long> ids, SFunction<EcDeviceCommandPlus, ?>... columns);
List<EcDeviceCommandPlus> getByIds(List<Long> ids);
Map<Long, EcDeviceCommandPlus> getMapByIds(List<Long> ids);
/**
* @param field sum 字段
* @param where 条件
* @param tClass 返回类型
* @param <T>
* @return
*/
<T> T sum(String field, String where, Class<T> tClass);
Long count(String where);
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
}
@@ -0,0 +1,89 @@
package com.luqj.ec.service;
import java.util.Map;
import java.util.List;
import com.luqj.ec.domain.EcDevice;
import com.luqj.ec.domain.EcDevicePlus;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.ruoyi.common.select.SelectItem;
/**
* 设备(手机设备)Service接口
*
* @author luqj
* @date 2026-02-27
*/
public interface IEcDeviceService extends IService<EcDevicePlus>
{
List<SelectItem> select(String keyword);
/**
* 查询设备(手机设备)
*
* @param id 设备(手机设备)ID
* @return 设备(手机设备)
*/
public EcDevice selectEcDeviceById(Long id);
/**
* 查询设备(手机设备)列表
*
* @param ecDevice 设备(手机设备)
* @return 设备(手机设备)集合
*/
public List<EcDevice> selectEcDeviceList(EcDevice ecDevice);
/**
* 新增设备(手机设备)
*
* @param ecDevice 设备(手机设备)
* @return 结果
*/
public int insertEcDevice(EcDevice ecDevice);
/**
* 修改设备(手机设备)
*
* @param ecDevice 设备(手机设备)
* @return 结果
*/
public int updateEcDevice(EcDevice ecDevice);
/**
* 批量删除设备(手机设备)
*
* @param ids 需要删除的设备(手机设备)ID
* @return 结果
*/
public int deleteEcDeviceByIds(Long[] ids);
/**
* 删除设备(手机设备)信息
*
* @param id 设备(手机设备)ID
* @return 结果
*/
public int deleteEcDeviceById(Long id);
List<EcDevicePlus> getByIds(List<Long> ids, SFunction<EcDevicePlus, ?>... columns);
EcDevicePlus getById(Long id, SFunction<EcDevicePlus, ?>... columns);
Map<Long, EcDevicePlus> getMapByIds(List<Long> ids, SFunction<EcDevicePlus, ?>... columns);
List<EcDevicePlus> getByIds(List<Long> ids);
Map<Long, EcDevicePlus> getMapByIds(List<Long> ids);
/**
* @param field sum 字段
* @param where 条件
* @param tClass 返回类型
* @param <T>
* @return
*/
<T> T sum(String field, String where, Class<T> tClass);
Long count(String where);
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
}
@@ -0,0 +1,89 @@
package com.luqj.ec.service;
import java.util.Map;
import java.util.List;
import com.luqj.ec.domain.EcDeviceStatus;
import com.luqj.ec.domain.EcDeviceStatusPlus;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.ruoyi.common.select.SelectItem;
/**
* 设备心跳 & 状态(高频)Service接口
*
* @author luqj
* @date 2026-02-27
*/
public interface IEcDeviceStatusService extends IService<EcDeviceStatusPlus>
{
List<SelectItem> select(String keyword);
/**
* 查询设备心跳 & 状态(高频)
*
* @param id 设备心跳 & 状态(高频)ID
* @return 设备心跳 & 状态(高频)
*/
public EcDeviceStatus selectEcDeviceStatusById(Long id);
/**
* 查询设备心跳 & 状态(高频)列表
*
* @param ecDeviceStatus 设备心跳 & 状态(高频)
* @return 设备心跳 & 状态(高频)集合
*/
public List<EcDeviceStatus> selectEcDeviceStatusList(EcDeviceStatus ecDeviceStatus);
/**
* 新增设备心跳 & 状态(高频)
*
* @param ecDeviceStatus 设备心跳 & 状态(高频)
* @return 结果
*/
public int insertEcDeviceStatus(EcDeviceStatus ecDeviceStatus);
/**
* 修改设备心跳 & 状态(高频)
*
* @param ecDeviceStatus 设备心跳 & 状态(高频)
* @return 结果
*/
public int updateEcDeviceStatus(EcDeviceStatus ecDeviceStatus);
/**
* 批量删除设备心跳 & 状态(高频)
*
* @param ids 需要删除的设备心跳 & 状态(高频)ID
* @return 结果
*/
public int deleteEcDeviceStatusByIds(Long[] ids);
/**
* 删除设备心跳 & 状态(高频)信息
*
* @param id 设备心跳 & 状态(高频)ID
* @return 结果
*/
public int deleteEcDeviceStatusById(Long id);
List<EcDeviceStatusPlus> getByIds(List<Long> ids, SFunction<EcDeviceStatusPlus, ?>... columns);
EcDeviceStatusPlus getById(Long id, SFunction<EcDeviceStatusPlus, ?>... columns);
Map<Long, EcDeviceStatusPlus> getMapByIds(List<Long> ids, SFunction<EcDeviceStatusPlus, ?>... columns);
List<EcDeviceStatusPlus> getByIds(List<Long> ids);
Map<Long, EcDeviceStatusPlus> getMapByIds(List<Long> ids);
/**
* @param field sum 字段
* @param where 条件
* @param tClass 返回类型
* @param <T>
* @return
*/
<T> T sum(String field, String where, Class<T> tClass);
Long count(String where);
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
}
@@ -0,0 +1,89 @@
package com.luqj.ec.service;
import java.util.Map;
import java.util.List;
import com.luqj.ec.domain.EcTaskCommand;
import com.luqj.ec.domain.EcTaskCommandPlus;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.ruoyi.common.select.SelectItem;
/**
* 任务指令明细(一个任务多条指令)Service接口
*
* @author luqj
* @date 2026-02-27
*/
public interface IEcTaskCommandService extends IService<EcTaskCommandPlus>
{
List<SelectItem> select(String keyword);
/**
* 查询任务指令明细(一个任务多条指令)
*
* @param id 任务指令明细(一个任务多条指令)ID
* @return 任务指令明细(一个任务多条指令)
*/
public EcTaskCommand selectEcTaskCommandById(Long id);
/**
* 查询任务指令明细(一个任务多条指令)列表
*
* @param ecTaskCommand 任务指令明细(一个任务多条指令)
* @return 任务指令明细(一个任务多条指令)集合
*/
public List<EcTaskCommand> selectEcTaskCommandList(EcTaskCommand ecTaskCommand);
/**
* 新增任务指令明细(一个任务多条指令)
*
* @param ecTaskCommand 任务指令明细(一个任务多条指令)
* @return 结果
*/
public int insertEcTaskCommand(EcTaskCommand ecTaskCommand);
/**
* 修改任务指令明细(一个任务多条指令)
*
* @param ecTaskCommand 任务指令明细(一个任务多条指令)
* @return 结果
*/
public int updateEcTaskCommand(EcTaskCommand ecTaskCommand);
/**
* 批量删除任务指令明细(一个任务多条指令)
*
* @param ids 需要删除的任务指令明细(一个任务多条指令)ID
* @return 结果
*/
public int deleteEcTaskCommandByIds(Long[] ids);
/**
* 删除任务指令明细(一个任务多条指令)信息
*
* @param id 任务指令明细(一个任务多条指令)ID
* @return 结果
*/
public int deleteEcTaskCommandById(Long id);
List<EcTaskCommandPlus> getByIds(List<Long> ids, SFunction<EcTaskCommandPlus, ?>... columns);
EcTaskCommandPlus getById(Long id, SFunction<EcTaskCommandPlus, ?>... columns);
Map<Long, EcTaskCommandPlus> getMapByIds(List<Long> ids, SFunction<EcTaskCommandPlus, ?>... columns);
List<EcTaskCommandPlus> getByIds(List<Long> ids);
Map<Long, EcTaskCommandPlus> getMapByIds(List<Long> ids);
/**
* @param field sum 字段
* @param where 条件
* @param tClass 返回类型
* @param <T>
* @return
*/
<T> T sum(String field, String where, Class<T> tClass);
Long count(String where);
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
}
@@ -0,0 +1,89 @@
package com.luqj.ec.service;
import java.util.Map;
import java.util.List;
import com.luqj.ec.domain.EcTaskDevice;
import com.luqj.ec.domain.EcTaskDevicePlus;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.ruoyi.common.select.SelectItem;
/**
* 任务-设备关联(一任务多设备)Service接口
*
* @author luqj
* @date 2026-02-27
*/
public interface IEcTaskDeviceService extends IService<EcTaskDevicePlus>
{
List<SelectItem> select(String keyword);
/**
* 查询任务-设备关联(一任务多设备)
*
* @param id 任务-设备关联(一任务多设备)ID
* @return 任务-设备关联(一任务多设备)
*/
public EcTaskDevice selectEcTaskDeviceById(Long id);
/**
* 查询任务-设备关联(一任务多设备)列表
*
* @param ecTaskDevice 任务-设备关联(一任务多设备)
* @return 任务-设备关联(一任务多设备)集合
*/
public List<EcTaskDevice> selectEcTaskDeviceList(EcTaskDevice ecTaskDevice);
/**
* 新增任务-设备关联(一任务多设备)
*
* @param ecTaskDevice 任务-设备关联(一任务多设备)
* @return 结果
*/
public int insertEcTaskDevice(EcTaskDevice ecTaskDevice);
/**
* 修改任务-设备关联(一任务多设备)
*
* @param ecTaskDevice 任务-设备关联(一任务多设备)
* @return 结果
*/
public int updateEcTaskDevice(EcTaskDevice ecTaskDevice);
/**
* 批量删除任务-设备关联(一任务多设备)
*
* @param ids 需要删除的任务-设备关联(一任务多设备)ID
* @return 结果
*/
public int deleteEcTaskDeviceByIds(Long[] ids);
/**
* 删除任务-设备关联(一任务多设备)信息
*
* @param id 任务-设备关联(一任务多设备)ID
* @return 结果
*/
public int deleteEcTaskDeviceById(Long id);
List<EcTaskDevicePlus> getByIds(List<Long> ids, SFunction<EcTaskDevicePlus, ?>... columns);
EcTaskDevicePlus getById(Long id, SFunction<EcTaskDevicePlus, ?>... columns);
Map<Long, EcTaskDevicePlus> getMapByIds(List<Long> ids, SFunction<EcTaskDevicePlus, ?>... columns);
List<EcTaskDevicePlus> getByIds(List<Long> ids);
Map<Long, EcTaskDevicePlus> getMapByIds(List<Long> ids);
/**
* @param field sum 字段
* @param where 条件
* @param tClass 返回类型
* @param <T>
* @return
*/
<T> T sum(String field, String where, Class<T> tClass);
Long count(String where);
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
}
@@ -0,0 +1,200 @@
package com.luqj.ec.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.luqj.ec.domain.EcCommandResult;
import com.luqj.ec.domain.EcCommandResultPlus;
import com.luqj.ec.mapper.EcCommandResultMapper;
import com.luqj.ec.service.IEcCommandResultService;
import com.ruoyi.common.select.SelectItem;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 指令执行结果(客户端回传)Service业务层处理
*
* @author luqj
* @date 2026-02-27
*/
@Service
public class EcCommandResultServiceImpl extends ServiceImpl<EcCommandResultMapper, EcCommandResultPlus> implements IEcCommandResultService {
@Autowired
private EcCommandResultMapper ecCommandResultMapper;
@Autowired
private JdbcTemplate jdbcTemplate;
@Override
public List<EcCommandResultPlus> getByIds(List<Long> ids, SFunction<EcCommandResultPlus, ?>... columns) {
LambdaQueryWrapper<EcCommandResultPlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcCommandResultPlus>()
.select(columns).in(EcCommandResultPlus::getId, ids);
return this.list(lambdaQueryWrapper);
}
@Override
public List<SelectItem> select(String keyword) {
LambdaQueryWrapper<EcCommandResultPlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcCommandResultPlus>()
.select(EcCommandResultPlus::getId, EcCommandResultPlus::getResult)
.like(EcCommandResultPlus::getResult, keyword);
List<EcCommandResultPlus> list = this.list(lambdaQueryWrapper);
List<SelectItem> result = new ArrayList<>();
for (EcCommandResultPlus item : list) {
SelectItem selectItem = new SelectItem();
selectItem.setName(item.getResult()+"");
selectItem.setId(item.getId());
result.add(selectItem);
}
return result;
}
@Override
public EcCommandResultPlus getById(Long id, SFunction<EcCommandResultPlus, ?>... columns) {
LambdaQueryWrapper<EcCommandResultPlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcCommandResultPlus>()
.select(columns).eq(EcCommandResultPlus::getId, id);
return baseMapper.selectOne(lambdaQueryWrapper);
}
@Override
public Map<Long, EcCommandResultPlus> getMapByIds(List<Long> ids, SFunction<EcCommandResultPlus, ?>... columns) {
List<EcCommandResultPlus> list = this.getByIds(ids, columns);
Map<Long, EcCommandResultPlus> map = new HashMap<>();
for (EcCommandResultPlus item : list) {
map.put(item.getId(), item);
}
return map;
}
@Override
public Map<Long, EcCommandResultPlus> getMapByIds(List<Long> ids) {
List<EcCommandResultPlus> list = this.getByIds(ids);
Map<Long, EcCommandResultPlus> map = new HashMap<>();
for (EcCommandResultPlus item : list) {
map.put(item.getId(), item);
}
return map;
}
@Override
public List<EcCommandResultPlus> getByIds(List<Long> ids) {
LambdaQueryWrapper<EcCommandResultPlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcCommandResultPlus>().in(EcCommandResultPlus::getId, ids);
return this.list(lambdaQueryWrapper);
}
public <T> T sum(String field, String where, Class<T> tClass) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(" sum(" + field + ") as total ");
stringBuffer.append(" from ec_command_result ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
return result;
}
public Long count(String where) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(" count(1)");
stringBuffer.append(" from ");
stringBuffer.append(" ec_command_result ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
return result;
}
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(select);
stringBuffer.append(" from ");
stringBuffer.append(" ec_command_result ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
stringBuffer.append(" group by ");
stringBuffer.append(groupby);
List result = jdbcTemplate.queryForList(stringBuffer.toString());
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
return tList;
}
/**
* 查询指令执行结果(客户端回传)
*
* @param id 指令执行结果(客户端回传)ID
* @return 指令执行结果(客户端回传)
*/
@Override
public EcCommandResult selectEcCommandResultById(Long id) {
return ecCommandResultMapper.selectEcCommandResultById(id);
}
/**
* 查询指令执行结果(客户端回传)列表
*
* @param ecCommandResult 指令执行结果(客户端回传)
* @return 指令执行结果(客户端回传)
*/
@Override
public List<EcCommandResult> selectEcCommandResultList(EcCommandResult ecCommandResult) {
return ecCommandResultMapper.selectEcCommandResultList(ecCommandResult);
}
/**
* 新增指令执行结果(客户端回传)
*
* @param ecCommandResult 指令执行结果(客户端回传)
* @return 结果
*/
@Override
public int insertEcCommandResult(EcCommandResult ecCommandResult) {
return ecCommandResultMapper.insertEcCommandResult(ecCommandResult);
}
/**
* 修改指令执行结果(客户端回传)
*
* @param ecCommandResult 指令执行结果(客户端回传)
* @return 结果
*/
@Override
public int updateEcCommandResult(EcCommandResult ecCommandResult) {
return ecCommandResultMapper.updateEcCommandResult(ecCommandResult);
}
/**
* 批量删除指令执行结果(客户端回传)
*
* @param ids 需要删除的指令执行结果(客户端回传)ID
* @return 结果
*/
@Override
public int deleteEcCommandResultByIds(Long[] ids) {
return ecCommandResultMapper.deleteEcCommandResultByIds(ids);
}
/**
* 删除指令执行结果(客户端回传)信息
*
* @param id 指令执行结果(客户端回传)ID
* @return 结果
*/
@Override
public int deleteEcCommandResultById(Long id) {
return ecCommandResultMapper.deleteEcCommandResultById(id);
}
}
@@ -0,0 +1,205 @@
package com.luqj.ec.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import java.util.ArrayList;
import java.util.HashMap;
import com.ruoyi.common.utils.StringUtils;
import com.alibaba.fastjson.JSONArray;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.luqj.ec.mapper.EcControlTaskMapper;
import com.luqj.ec.domain.EcControlTask;
import com.luqj.ec.domain.EcControlTaskPlus;
import com.luqj.ec.service.IEcControlTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import com.ruoyi.common.select.SelectItem;
/**
* 任务(群控核心)Service业务层处理
*
* @author luqj
* @date 2026-02-27
*/
@Service
public class EcControlTaskServiceImpl extends ServiceImpl<EcControlTaskMapper, EcControlTaskPlus> implements IEcControlTaskService
{
@Autowired
private EcControlTaskMapper ecControlTaskMapper;
@Autowired
private JdbcTemplate jdbcTemplate;
@Override
public List<EcControlTaskPlus> getByIds(List<Long> ids, SFunction<EcControlTaskPlus, ?>... columns) {
LambdaQueryWrapper<EcControlTaskPlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcControlTaskPlus>()
.select(columns).in(EcControlTaskPlus::getId, ids);
return this.list(lambdaQueryWrapper);
}
@Override
public List<SelectItem> select(String keyword) {
LambdaQueryWrapper<EcControlTaskPlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcControlTaskPlus>()
.select(EcControlTaskPlus::getId, EcControlTaskPlus::getTaskName)
.like(EcControlTaskPlus::getTaskName, keyword);
List<EcControlTaskPlus> list = this.list(lambdaQueryWrapper);
List<SelectItem> result =new ArrayList<>();
for (EcControlTaskPlus item : list){
SelectItem selectItem = new SelectItem();
selectItem.setName(item.getTaskName());
selectItem.setId(item.getId());
result.add(selectItem);
}
return result;
}
@Override
public EcControlTaskPlus getById(Long id, SFunction<EcControlTaskPlus, ?>... columns) {
LambdaQueryWrapper<EcControlTaskPlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcControlTaskPlus>()
.select(columns).eq(EcControlTaskPlus::getId, id);
return baseMapper.selectOne(lambdaQueryWrapper);
}
@Override
public Map<Long, EcControlTaskPlus> getMapByIds(List<Long> ids, SFunction<EcControlTaskPlus, ?>... columns) {
List<EcControlTaskPlus> list = this.getByIds(ids, columns);
Map<Long, EcControlTaskPlus> map = new HashMap<>();
for (EcControlTaskPlus item : list) {
map.put(item.getId(), item);
}
return map;
}
@Override
public Map<Long, EcControlTaskPlus> getMapByIds(List<Long> ids) {
List<EcControlTaskPlus> list = this.getByIds(ids);
Map<Long, EcControlTaskPlus> map = new HashMap<>();
for (EcControlTaskPlus item : list) {
map.put(item.getId(), item);
}
return map;
}
@Override
public List<EcControlTaskPlus> getByIds(List<Long> ids) {
LambdaQueryWrapper<EcControlTaskPlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcControlTaskPlus>().in(EcControlTaskPlus::getId, ids);
return this.list(lambdaQueryWrapper);
}
public <T> T sum(String field, String where, Class<T> tClass) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(" sum(" + field + ") as total ");
stringBuffer.append(" from ec_control_task ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
return result;
}
public Long count(String where) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(" count(1)");
stringBuffer.append(" from ");
stringBuffer.append(" ec_control_task ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
return result;
}
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(select);
stringBuffer.append(" from ");
stringBuffer.append(" ec_control_task ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
stringBuffer.append(" group by ");
stringBuffer.append(groupby);
List result = jdbcTemplate.queryForList(stringBuffer.toString());
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
return tList;
}
/**
* 查询任务(群控核心)
*
* @param id 任务(群控核心)ID
* @return 任务(群控核心)
*/
@Override
public EcControlTask selectEcControlTaskById(Long id)
{
return ecControlTaskMapper.selectEcControlTaskById(id);
}
/**
* 查询任务(群控核心)列表
*
* @param ecControlTask 任务(群控核心)
* @return 任务(群控核心)
*/
@Override
public List<EcControlTask> selectEcControlTaskList(EcControlTask ecControlTask)
{
return ecControlTaskMapper.selectEcControlTaskList(ecControlTask);
}
/**
* 新增任务(群控核心)
*
* @param ecControlTask 任务(群控核心)
* @return 结果
*/
@Override
public int insertEcControlTask(EcControlTask ecControlTask)
{
return ecControlTaskMapper.insertEcControlTask(ecControlTask);
}
/**
* 修改任务(群控核心)
*
* @param ecControlTask 任务(群控核心)
* @return 结果
*/
@Override
public int updateEcControlTask(EcControlTask ecControlTask)
{
return ecControlTaskMapper.updateEcControlTask(ecControlTask);
}
/**
* 批量删除任务(群控核心)
*
* @param ids 需要删除的任务(群控核心)ID
* @return 结果
*/
@Override
public int deleteEcControlTaskByIds(Long[] ids)
{
return ecControlTaskMapper.deleteEcControlTaskByIds(ids);
}
/**
* 删除任务(群控核心)信息
*
* @param id 任务(群控核心)ID
* @return 结果
*/
@Override
public int deleteEcControlTaskById(Long id)
{
return ecControlTaskMapper.deleteEcControlTaskById(id);
}
}
@@ -0,0 +1,205 @@
package com.luqj.ec.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import java.util.ArrayList;
import java.util.HashMap;
import com.ruoyi.common.utils.StringUtils;
import com.alibaba.fastjson.JSONArray;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.luqj.ec.mapper.EcDeviceCommandMapper;
import com.luqj.ec.domain.EcDeviceCommand;
import com.luqj.ec.domain.EcDeviceCommandPlus;
import com.luqj.ec.service.IEcDeviceCommandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import com.ruoyi.common.select.SelectItem;
/**
* 控制指令(单条指令)Service业务层处理
*
* @author luqj
* @date 2026-02-27
*/
@Service
public class EcDeviceCommandServiceImpl extends ServiceImpl<EcDeviceCommandMapper, EcDeviceCommandPlus> implements IEcDeviceCommandService
{
@Autowired
private EcDeviceCommandMapper ecDeviceCommandMapper;
@Autowired
private JdbcTemplate jdbcTemplate;
@Override
public List<EcDeviceCommandPlus> getByIds(List<Long> ids, SFunction<EcDeviceCommandPlus, ?>... columns) {
LambdaQueryWrapper<EcDeviceCommandPlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcDeviceCommandPlus>()
.select(columns).in(EcDeviceCommandPlus::getId, ids);
return this.list(lambdaQueryWrapper);
}
@Override
public List<SelectItem> select(String keyword) {
LambdaQueryWrapper<EcDeviceCommandPlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcDeviceCommandPlus>()
.select(EcDeviceCommandPlus::getId, EcDeviceCommandPlus::getCommandType)
.like(EcDeviceCommandPlus::getCommandType, keyword);
List<EcDeviceCommandPlus> list = this.list(lambdaQueryWrapper);
List<SelectItem> result =new ArrayList<>();
for (EcDeviceCommandPlus item : list){
SelectItem selectItem = new SelectItem();
selectItem.setName(item.getCommandType());
selectItem.setId(item.getId());
result.add(selectItem);
}
return result;
}
@Override
public EcDeviceCommandPlus getById(Long id, SFunction<EcDeviceCommandPlus, ?>... columns) {
LambdaQueryWrapper<EcDeviceCommandPlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcDeviceCommandPlus>()
.select(columns).eq(EcDeviceCommandPlus::getId, id);
return baseMapper.selectOne(lambdaQueryWrapper);
}
@Override
public Map<Long, EcDeviceCommandPlus> getMapByIds(List<Long> ids, SFunction<EcDeviceCommandPlus, ?>... columns) {
List<EcDeviceCommandPlus> list = this.getByIds(ids, columns);
Map<Long, EcDeviceCommandPlus> map = new HashMap<>();
for (EcDeviceCommandPlus item : list) {
map.put(item.getId(), item);
}
return map;
}
@Override
public Map<Long, EcDeviceCommandPlus> getMapByIds(List<Long> ids) {
List<EcDeviceCommandPlus> list = this.getByIds(ids);
Map<Long, EcDeviceCommandPlus> map = new HashMap<>();
for (EcDeviceCommandPlus item : list) {
map.put(item.getId(), item);
}
return map;
}
@Override
public List<EcDeviceCommandPlus> getByIds(List<Long> ids) {
LambdaQueryWrapper<EcDeviceCommandPlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcDeviceCommandPlus>().in(EcDeviceCommandPlus::getId, ids);
return this.list(lambdaQueryWrapper);
}
public <T> T sum(String field, String where, Class<T> tClass) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(" sum(" + field + ") as total ");
stringBuffer.append(" from ec_device_command ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
return result;
}
public Long count(String where) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(" count(1)");
stringBuffer.append(" from ");
stringBuffer.append(" ec_device_command ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
return result;
}
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(select);
stringBuffer.append(" from ");
stringBuffer.append(" ec_device_command ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
stringBuffer.append(" group by ");
stringBuffer.append(groupby);
List result = jdbcTemplate.queryForList(stringBuffer.toString());
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
return tList;
}
/**
* 查询控制指令(单条指令)
*
* @param id 控制指令(单条指令)ID
* @return 控制指令(单条指令)
*/
@Override
public EcDeviceCommand selectEcDeviceCommandById(Long id)
{
return ecDeviceCommandMapper.selectEcDeviceCommandById(id);
}
/**
* 查询控制指令(单条指令)列表
*
* @param ecDeviceCommand 控制指令(单条指令)
* @return 控制指令(单条指令)
*/
@Override
public List<EcDeviceCommand> selectEcDeviceCommandList(EcDeviceCommand ecDeviceCommand)
{
return ecDeviceCommandMapper.selectEcDeviceCommandList(ecDeviceCommand);
}
/**
* 新增控制指令(单条指令)
*
* @param ecDeviceCommand 控制指令(单条指令)
* @return 结果
*/
@Override
public int insertEcDeviceCommand(EcDeviceCommand ecDeviceCommand)
{
return ecDeviceCommandMapper.insertEcDeviceCommand(ecDeviceCommand);
}
/**
* 修改控制指令(单条指令)
*
* @param ecDeviceCommand 控制指令(单条指令)
* @return 结果
*/
@Override
public int updateEcDeviceCommand(EcDeviceCommand ecDeviceCommand)
{
return ecDeviceCommandMapper.updateEcDeviceCommand(ecDeviceCommand);
}
/**
* 批量删除控制指令(单条指令)
*
* @param ids 需要删除的控制指令(单条指令)ID
* @return 结果
*/
@Override
public int deleteEcDeviceCommandByIds(Long[] ids)
{
return ecDeviceCommandMapper.deleteEcDeviceCommandByIds(ids);
}
/**
* 删除控制指令(单条指令)信息
*
* @param id 控制指令(单条指令)ID
* @return 结果
*/
@Override
public int deleteEcDeviceCommandById(Long id)
{
return ecDeviceCommandMapper.deleteEcDeviceCommandById(id);
}
}
@@ -0,0 +1,205 @@
package com.luqj.ec.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import java.util.ArrayList;
import java.util.HashMap;
import com.ruoyi.common.utils.StringUtils;
import com.alibaba.fastjson.JSONArray;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.luqj.ec.mapper.EcDeviceMapper;
import com.luqj.ec.domain.EcDevice;
import com.luqj.ec.domain.EcDevicePlus;
import com.luqj.ec.service.IEcDeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import com.ruoyi.common.select.SelectItem;
/**
* 设备(手机设备)Service业务层处理
*
* @author luqj
* @date 2026-02-27
*/
@Service
public class EcDeviceServiceImpl extends ServiceImpl<EcDeviceMapper, EcDevicePlus> implements IEcDeviceService
{
@Autowired
private EcDeviceMapper ecDeviceMapper;
@Autowired
private JdbcTemplate jdbcTemplate;
@Override
public List<EcDevicePlus> getByIds(List<Long> ids, SFunction<EcDevicePlus, ?>... columns) {
LambdaQueryWrapper<EcDevicePlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcDevicePlus>()
.select(columns).in(EcDevicePlus::getId, ids);
return this.list(lambdaQueryWrapper);
}
@Override
public List<SelectItem> select(String keyword) {
LambdaQueryWrapper<EcDevicePlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcDevicePlus>()
.select(EcDevicePlus::getId, EcDevicePlus::getDeviceCode)
.like(EcDevicePlus::getDeviceCode, keyword);
List<EcDevicePlus> list = this.list(lambdaQueryWrapper);
List<SelectItem> result =new ArrayList<>();
for (EcDevicePlus item : list){
SelectItem selectItem = new SelectItem();
selectItem.setName(item.getDeviceCode());
selectItem.setId(item.getId());
result.add(selectItem);
}
return result;
}
@Override
public EcDevicePlus getById(Long id, SFunction<EcDevicePlus, ?>... columns) {
LambdaQueryWrapper<EcDevicePlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcDevicePlus>()
.select(columns).eq(EcDevicePlus::getId, id);
return baseMapper.selectOne(lambdaQueryWrapper);
}
@Override
public Map<Long, EcDevicePlus> getMapByIds(List<Long> ids, SFunction<EcDevicePlus, ?>... columns) {
List<EcDevicePlus> list = this.getByIds(ids, columns);
Map<Long, EcDevicePlus> map = new HashMap<>();
for (EcDevicePlus item : list) {
map.put(item.getId(), item);
}
return map;
}
@Override
public Map<Long, EcDevicePlus> getMapByIds(List<Long> ids) {
List<EcDevicePlus> list = this.getByIds(ids);
Map<Long, EcDevicePlus> map = new HashMap<>();
for (EcDevicePlus item : list) {
map.put(item.getId(), item);
}
return map;
}
@Override
public List<EcDevicePlus> getByIds(List<Long> ids) {
LambdaQueryWrapper<EcDevicePlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcDevicePlus>().in(EcDevicePlus::getId, ids);
return this.list(lambdaQueryWrapper);
}
public <T> T sum(String field, String where, Class<T> tClass) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(" sum(" + field + ") as total ");
stringBuffer.append(" from ec_device ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
return result;
}
public Long count(String where) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(" count(1)");
stringBuffer.append(" from ");
stringBuffer.append(" ec_device ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
return result;
}
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(select);
stringBuffer.append(" from ");
stringBuffer.append(" ec_device ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
stringBuffer.append(" group by ");
stringBuffer.append(groupby);
List result = jdbcTemplate.queryForList(stringBuffer.toString());
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
return tList;
}
/**
* 查询设备(手机设备)
*
* @param id 设备(手机设备)ID
* @return 设备(手机设备)
*/
@Override
public EcDevice selectEcDeviceById(Long id)
{
return ecDeviceMapper.selectEcDeviceById(id);
}
/**
* 查询设备(手机设备)列表
*
* @param ecDevice 设备(手机设备)
* @return 设备(手机设备)
*/
@Override
public List<EcDevice> selectEcDeviceList(EcDevice ecDevice)
{
return ecDeviceMapper.selectEcDeviceList(ecDevice);
}
/**
* 新增设备(手机设备)
*
* @param ecDevice 设备(手机设备)
* @return 结果
*/
@Override
public int insertEcDevice(EcDevice ecDevice)
{
return ecDeviceMapper.insertEcDevice(ecDevice);
}
/**
* 修改设备(手机设备)
*
* @param ecDevice 设备(手机设备)
* @return 结果
*/
@Override
public int updateEcDevice(EcDevice ecDevice)
{
return ecDeviceMapper.updateEcDevice(ecDevice);
}
/**
* 批量删除设备(手机设备)
*
* @param ids 需要删除的设备(手机设备)ID
* @return 结果
*/
@Override
public int deleteEcDeviceByIds(Long[] ids)
{
return ecDeviceMapper.deleteEcDeviceByIds(ids);
}
/**
* 删除设备(手机设备)信息
*
* @param id 设备(手机设备)ID
* @return 结果
*/
@Override
public int deleteEcDeviceById(Long id)
{
return ecDeviceMapper.deleteEcDeviceById(id);
}
}
@@ -0,0 +1,205 @@
package com.luqj.ec.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import java.util.ArrayList;
import java.util.HashMap;
import com.ruoyi.common.utils.StringUtils;
import com.alibaba.fastjson.JSONArray;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.luqj.ec.mapper.EcDeviceStatusMapper;
import com.luqj.ec.domain.EcDeviceStatus;
import com.luqj.ec.domain.EcDeviceStatusPlus;
import com.luqj.ec.service.IEcDeviceStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import com.ruoyi.common.select.SelectItem;
/**
* 设备心跳 & 状态(高频)Service业务层处理
*
* @author luqj
* @date 2026-02-27
*/
@Service
public class EcDeviceStatusServiceImpl extends ServiceImpl<EcDeviceStatusMapper, EcDeviceStatusPlus> implements IEcDeviceStatusService
{
@Autowired
private EcDeviceStatusMapper ecDeviceStatusMapper;
@Autowired
private JdbcTemplate jdbcTemplate;
@Override
public List<EcDeviceStatusPlus> getByIds(List<Long> ids, SFunction<EcDeviceStatusPlus, ?>... columns) {
LambdaQueryWrapper<EcDeviceStatusPlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcDeviceStatusPlus>()
.select(columns).in(EcDeviceStatusPlus::getId, ids);
return this.list(lambdaQueryWrapper);
}
@Override
public List<SelectItem> select(String keyword) {
LambdaQueryWrapper<EcDeviceStatusPlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcDeviceStatusPlus>()
.select(EcDeviceStatusPlus::getId, EcDeviceStatusPlus::getDeviceId)
.like(EcDeviceStatusPlus::getDeviceId, keyword);
List<EcDeviceStatusPlus> list = this.list(lambdaQueryWrapper);
List<SelectItem> result =new ArrayList<>();
for (EcDeviceStatusPlus item : list){
SelectItem selectItem = new SelectItem();
selectItem.setName(item.getDeviceId()+"");
selectItem.setId(item.getId());
result.add(selectItem);
}
return result;
}
@Override
public EcDeviceStatusPlus getById(Long id, SFunction<EcDeviceStatusPlus, ?>... columns) {
LambdaQueryWrapper<EcDeviceStatusPlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcDeviceStatusPlus>()
.select(columns).eq(EcDeviceStatusPlus::getId, id);
return baseMapper.selectOne(lambdaQueryWrapper);
}
@Override
public Map<Long, EcDeviceStatusPlus> getMapByIds(List<Long> ids, SFunction<EcDeviceStatusPlus, ?>... columns) {
List<EcDeviceStatusPlus> list = this.getByIds(ids, columns);
Map<Long, EcDeviceStatusPlus> map = new HashMap<>();
for (EcDeviceStatusPlus item : list) {
map.put(item.getId(), item);
}
return map;
}
@Override
public Map<Long, EcDeviceStatusPlus> getMapByIds(List<Long> ids) {
List<EcDeviceStatusPlus> list = this.getByIds(ids);
Map<Long, EcDeviceStatusPlus> map = new HashMap<>();
for (EcDeviceStatusPlus item : list) {
map.put(item.getId(), item);
}
return map;
}
@Override
public List<EcDeviceStatusPlus> getByIds(List<Long> ids) {
LambdaQueryWrapper<EcDeviceStatusPlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcDeviceStatusPlus>().in(EcDeviceStatusPlus::getId, ids);
return this.list(lambdaQueryWrapper);
}
public <T> T sum(String field, String where, Class<T> tClass) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(" sum(" + field + ") as total ");
stringBuffer.append(" from ec_device_status ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
return result;
}
public Long count(String where) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(" count(1)");
stringBuffer.append(" from ");
stringBuffer.append(" ec_device_status ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
return result;
}
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(select);
stringBuffer.append(" from ");
stringBuffer.append(" ec_device_status ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
stringBuffer.append(" group by ");
stringBuffer.append(groupby);
List result = jdbcTemplate.queryForList(stringBuffer.toString());
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
return tList;
}
/**
* 查询设备心跳 & 状态(高频)
*
* @param id 设备心跳 & 状态(高频)ID
* @return 设备心跳 & 状态(高频)
*/
@Override
public EcDeviceStatus selectEcDeviceStatusById(Long id)
{
return ecDeviceStatusMapper.selectEcDeviceStatusById(id);
}
/**
* 查询设备心跳 & 状态(高频)列表
*
* @param ecDeviceStatus 设备心跳 & 状态(高频)
* @return 设备心跳 & 状态(高频)
*/
@Override
public List<EcDeviceStatus> selectEcDeviceStatusList(EcDeviceStatus ecDeviceStatus)
{
return ecDeviceStatusMapper.selectEcDeviceStatusList(ecDeviceStatus);
}
/**
* 新增设备心跳 & 状态(高频)
*
* @param ecDeviceStatus 设备心跳 & 状态(高频)
* @return 结果
*/
@Override
public int insertEcDeviceStatus(EcDeviceStatus ecDeviceStatus)
{
return ecDeviceStatusMapper.insertEcDeviceStatus(ecDeviceStatus);
}
/**
* 修改设备心跳 & 状态(高频)
*
* @param ecDeviceStatus 设备心跳 & 状态(高频)
* @return 结果
*/
@Override
public int updateEcDeviceStatus(EcDeviceStatus ecDeviceStatus)
{
return ecDeviceStatusMapper.updateEcDeviceStatus(ecDeviceStatus);
}
/**
* 批量删除设备心跳 & 状态(高频)
*
* @param ids 需要删除的设备心跳 & 状态(高频)ID
* @return 结果
*/
@Override
public int deleteEcDeviceStatusByIds(Long[] ids)
{
return ecDeviceStatusMapper.deleteEcDeviceStatusByIds(ids);
}
/**
* 删除设备心跳 & 状态(高频)信息
*
* @param id 设备心跳 & 状态(高频)ID
* @return 结果
*/
@Override
public int deleteEcDeviceStatusById(Long id)
{
return ecDeviceStatusMapper.deleteEcDeviceStatusById(id);
}
}
@@ -0,0 +1,205 @@
package com.luqj.ec.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import java.util.ArrayList;
import java.util.HashMap;
import com.ruoyi.common.utils.StringUtils;
import com.alibaba.fastjson.JSONArray;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.luqj.ec.mapper.EcTaskCommandMapper;
import com.luqj.ec.domain.EcTaskCommand;
import com.luqj.ec.domain.EcTaskCommandPlus;
import com.luqj.ec.service.IEcTaskCommandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import com.ruoyi.common.select.SelectItem;
/**
* 任务指令明细(一个任务多条指令)Service业务层处理
*
* @author luqj
* @date 2026-02-27
*/
@Service
public class EcTaskCommandServiceImpl extends ServiceImpl<EcTaskCommandMapper, EcTaskCommandPlus> implements IEcTaskCommandService
{
@Autowired
private EcTaskCommandMapper ecTaskCommandMapper;
@Autowired
private JdbcTemplate jdbcTemplate;
@Override
public List<EcTaskCommandPlus> getByIds(List<Long> ids, SFunction<EcTaskCommandPlus, ?>... columns) {
LambdaQueryWrapper<EcTaskCommandPlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcTaskCommandPlus>()
.select(columns).in(EcTaskCommandPlus::getId, ids);
return this.list(lambdaQueryWrapper);
}
@Override
public List<SelectItem> select(String keyword) {
LambdaQueryWrapper<EcTaskCommandPlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcTaskCommandPlus>()
.select(EcTaskCommandPlus::getId, EcTaskCommandPlus::getCommandType)
.like(EcTaskCommandPlus::getCommandType, keyword);
List<EcTaskCommandPlus> list = this.list(lambdaQueryWrapper);
List<SelectItem> result =new ArrayList<>();
for (EcTaskCommandPlus item : list){
SelectItem selectItem = new SelectItem();
selectItem.setName(item.getCommandType());
selectItem.setId(item.getId());
result.add(selectItem);
}
return result;
}
@Override
public EcTaskCommandPlus getById(Long id, SFunction<EcTaskCommandPlus, ?>... columns) {
LambdaQueryWrapper<EcTaskCommandPlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcTaskCommandPlus>()
.select(columns).eq(EcTaskCommandPlus::getId, id);
return baseMapper.selectOne(lambdaQueryWrapper);
}
@Override
public Map<Long, EcTaskCommandPlus> getMapByIds(List<Long> ids, SFunction<EcTaskCommandPlus, ?>... columns) {
List<EcTaskCommandPlus> list = this.getByIds(ids, columns);
Map<Long, EcTaskCommandPlus> map = new HashMap<>();
for (EcTaskCommandPlus item : list) {
map.put(item.getId(), item);
}
return map;
}
@Override
public Map<Long, EcTaskCommandPlus> getMapByIds(List<Long> ids) {
List<EcTaskCommandPlus> list = this.getByIds(ids);
Map<Long, EcTaskCommandPlus> map = new HashMap<>();
for (EcTaskCommandPlus item : list) {
map.put(item.getId(), item);
}
return map;
}
@Override
public List<EcTaskCommandPlus> getByIds(List<Long> ids) {
LambdaQueryWrapper<EcTaskCommandPlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcTaskCommandPlus>().in(EcTaskCommandPlus::getId, ids);
return this.list(lambdaQueryWrapper);
}
public <T> T sum(String field, String where, Class<T> tClass) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(" sum(" + field + ") as total ");
stringBuffer.append(" from ec_task_command ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
return result;
}
public Long count(String where) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(" count(1)");
stringBuffer.append(" from ");
stringBuffer.append(" ec_task_command ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
return result;
}
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(select);
stringBuffer.append(" from ");
stringBuffer.append(" ec_task_command ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
stringBuffer.append(" group by ");
stringBuffer.append(groupby);
List result = jdbcTemplate.queryForList(stringBuffer.toString());
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
return tList;
}
/**
* 查询任务指令明细(一个任务多条指令)
*
* @param id 任务指令明细(一个任务多条指令)ID
* @return 任务指令明细(一个任务多条指令)
*/
@Override
public EcTaskCommand selectEcTaskCommandById(Long id)
{
return ecTaskCommandMapper.selectEcTaskCommandById(id);
}
/**
* 查询任务指令明细(一个任务多条指令)列表
*
* @param ecTaskCommand 任务指令明细(一个任务多条指令)
* @return 任务指令明细(一个任务多条指令)
*/
@Override
public List<EcTaskCommand> selectEcTaskCommandList(EcTaskCommand ecTaskCommand)
{
return ecTaskCommandMapper.selectEcTaskCommandList(ecTaskCommand);
}
/**
* 新增任务指令明细(一个任务多条指令)
*
* @param ecTaskCommand 任务指令明细(一个任务多条指令)
* @return 结果
*/
@Override
public int insertEcTaskCommand(EcTaskCommand ecTaskCommand)
{
return ecTaskCommandMapper.insertEcTaskCommand(ecTaskCommand);
}
/**
* 修改任务指令明细(一个任务多条指令)
*
* @param ecTaskCommand 任务指令明细(一个任务多条指令)
* @return 结果
*/
@Override
public int updateEcTaskCommand(EcTaskCommand ecTaskCommand)
{
return ecTaskCommandMapper.updateEcTaskCommand(ecTaskCommand);
}
/**
* 批量删除任务指令明细(一个任务多条指令)
*
* @param ids 需要删除的任务指令明细(一个任务多条指令)ID
* @return 结果
*/
@Override
public int deleteEcTaskCommandByIds(Long[] ids)
{
return ecTaskCommandMapper.deleteEcTaskCommandByIds(ids);
}
/**
* 删除任务指令明细(一个任务多条指令)信息
*
* @param id 任务指令明细(一个任务多条指令)ID
* @return 结果
*/
@Override
public int deleteEcTaskCommandById(Long id)
{
return ecTaskCommandMapper.deleteEcTaskCommandById(id);
}
}
@@ -0,0 +1,205 @@
package com.luqj.ec.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import java.util.ArrayList;
import java.util.HashMap;
import com.ruoyi.common.utils.StringUtils;
import com.alibaba.fastjson.JSONArray;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.luqj.ec.mapper.EcTaskDeviceMapper;
import com.luqj.ec.domain.EcTaskDevice;
import com.luqj.ec.domain.EcTaskDevicePlus;
import com.luqj.ec.service.IEcTaskDeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import com.ruoyi.common.select.SelectItem;
/**
* 任务-设备关联(一任务多设备)Service业务层处理
*
* @author luqj
* @date 2026-02-27
*/
@Service
public class EcTaskDeviceServiceImpl extends ServiceImpl<EcTaskDeviceMapper, EcTaskDevicePlus> implements IEcTaskDeviceService
{
@Autowired
private EcTaskDeviceMapper ecTaskDeviceMapper;
@Autowired
private JdbcTemplate jdbcTemplate;
@Override
public List<EcTaskDevicePlus> getByIds(List<Long> ids, SFunction<EcTaskDevicePlus, ?>... columns) {
LambdaQueryWrapper<EcTaskDevicePlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcTaskDevicePlus>()
.select(columns).in(EcTaskDevicePlus::getId, ids);
return this.list(lambdaQueryWrapper);
}
@Override
public List<SelectItem> select(String keyword) {
LambdaQueryWrapper<EcTaskDevicePlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcTaskDevicePlus>()
.select(EcTaskDevicePlus::getId, EcTaskDevicePlus::getStatus)
.like(EcTaskDevicePlus::getStatus, keyword);
List<EcTaskDevicePlus> list = this.list(lambdaQueryWrapper);
List<SelectItem> result =new ArrayList<>();
for (EcTaskDevicePlus item : list){
SelectItem selectItem = new SelectItem();
selectItem.setName(item.getStatus()+"");
selectItem.setId(item.getId());
result.add(selectItem);
}
return result;
}
@Override
public EcTaskDevicePlus getById(Long id, SFunction<EcTaskDevicePlus, ?>... columns) {
LambdaQueryWrapper<EcTaskDevicePlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcTaskDevicePlus>()
.select(columns).eq(EcTaskDevicePlus::getId, id);
return baseMapper.selectOne(lambdaQueryWrapper);
}
@Override
public Map<Long, EcTaskDevicePlus> getMapByIds(List<Long> ids, SFunction<EcTaskDevicePlus, ?>... columns) {
List<EcTaskDevicePlus> list = this.getByIds(ids, columns);
Map<Long, EcTaskDevicePlus> map = new HashMap<>();
for (EcTaskDevicePlus item : list) {
map.put(item.getId(), item);
}
return map;
}
@Override
public Map<Long, EcTaskDevicePlus> getMapByIds(List<Long> ids) {
List<EcTaskDevicePlus> list = this.getByIds(ids);
Map<Long, EcTaskDevicePlus> map = new HashMap<>();
for (EcTaskDevicePlus item : list) {
map.put(item.getId(), item);
}
return map;
}
@Override
public List<EcTaskDevicePlus> getByIds(List<Long> ids) {
LambdaQueryWrapper<EcTaskDevicePlus> lambdaQueryWrapper = new LambdaQueryWrapper<EcTaskDevicePlus>().in(EcTaskDevicePlus::getId, ids);
return this.list(lambdaQueryWrapper);
}
public <T> T sum(String field, String where, Class<T> tClass) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(" sum(" + field + ") as total ");
stringBuffer.append(" from ec_task_device ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
return result;
}
public Long count(String where) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(" count(1)");
stringBuffer.append(" from ");
stringBuffer.append(" ec_task_device ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
return result;
}
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(select);
stringBuffer.append(" from ");
stringBuffer.append(" ec_task_device ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
stringBuffer.append(" group by ");
stringBuffer.append(groupby);
List result = jdbcTemplate.queryForList(stringBuffer.toString());
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
return tList;
}
/**
* 查询任务-设备关联(一任务多设备)
*
* @param id 任务-设备关联(一任务多设备)ID
* @return 任务-设备关联(一任务多设备)
*/
@Override
public EcTaskDevice selectEcTaskDeviceById(Long id)
{
return ecTaskDeviceMapper.selectEcTaskDeviceById(id);
}
/**
* 查询任务-设备关联(一任务多设备)列表
*
* @param ecTaskDevice 任务-设备关联(一任务多设备)
* @return 任务-设备关联(一任务多设备)
*/
@Override
public List<EcTaskDevice> selectEcTaskDeviceList(EcTaskDevice ecTaskDevice)
{
return ecTaskDeviceMapper.selectEcTaskDeviceList(ecTaskDevice);
}
/**
* 新增任务-设备关联(一任务多设备)
*
* @param ecTaskDevice 任务-设备关联(一任务多设备)
* @return 结果
*/
@Override
public int insertEcTaskDevice(EcTaskDevice ecTaskDevice)
{
return ecTaskDeviceMapper.insertEcTaskDevice(ecTaskDevice);
}
/**
* 修改任务-设备关联(一任务多设备)
*
* @param ecTaskDevice 任务-设备关联(一任务多设备)
* @return 结果
*/
@Override
public int updateEcTaskDevice(EcTaskDevice ecTaskDevice)
{
return ecTaskDeviceMapper.updateEcTaskDevice(ecTaskDevice);
}
/**
* 批量删除任务-设备关联(一任务多设备)
*
* @param ids 需要删除的任务-设备关联(一任务多设备)ID
* @return 结果
*/
@Override
public int deleteEcTaskDeviceByIds(Long[] ids)
{
return ecTaskDeviceMapper.deleteEcTaskDeviceByIds(ids);
}
/**
* 删除任务-设备关联(一任务多设备)信息
*
* @param id 任务-设备关联(一任务多设备)ID
* @return 结果
*/
@Override
public int deleteEcTaskDeviceById(Long id)
{
return ecTaskDeviceMapper.deleteEcTaskDeviceById(id);
}
}
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.luqj.ec.mapper.EcCommandResultMapper">
<resultMap type="EcCommandResult" id="EcCommandResultResult">
<result property="id" column="id" />
<result property="commandId" column="command_id" />
<result property="deviceId" column="device_id" />
<result property="result" column="result" />
<result property="errorMsg" column="error_msg" />
<result property="responseData" column="response_data" />
<result property="createdAt" column="created_at" />
</resultMap>
<sql id="selectEcCommandResultVo">
select id, command_id, device_id, result, error_msg, response_data, created_at from ec_command_result
</sql>
<select id="selectEcCommandResultList" parameterType="EcCommandResult" resultMap="EcCommandResultResult">
<include refid="selectEcCommandResultVo"/>
<where>
<if test="commandId != null "> and command_id = #{commandId}</if>
<if test="deviceId != null "> and device_id = #{deviceId}</if>
<if test="result != null "> and result = #{result}</if>
<if test="errorMsg != null and errorMsg != ''"> and error_msg like concat('%', #{errorMsg}, '%')</if>
</where>
</select>
<select id="selectEcCommandResultById" parameterType="Long" resultMap="EcCommandResultResult">
<include refid="selectEcCommandResultVo"/>
where id = #{id}
</select>
<insert id="insertEcCommandResult" parameterType="EcCommandResult" useGeneratedKeys="true" keyProperty="id">
insert into ec_command_result
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="commandId != null">command_id,</if>
<if test="deviceId != null">device_id,</if>
<if test="result != null">result,</if>
<if test="errorMsg != null">error_msg,</if>
<if test="responseData != null">response_data,</if>
<if test="createdAt != null">created_at,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="commandId != null">#{commandId},</if>
<if test="deviceId != null">#{deviceId},</if>
<if test="result != null">#{result},</if>
<if test="errorMsg != null">#{errorMsg},</if>
<if test="responseData != null">#{responseData},</if>
<if test="createdAt != null">#{createdAt},</if>
</trim>
</insert>
<update id="updateEcCommandResult" parameterType="EcCommandResult">
update ec_command_result
<trim prefix="SET" suffixOverrides=",">
<if test="commandId != null">command_id = #{commandId},</if>
<if test="deviceId != null">device_id = #{deviceId},</if>
<if test="result != null">result = #{result},</if>
<if test="errorMsg != null">error_msg = #{errorMsg},</if>
<if test="responseData != null">response_data = #{responseData},</if>
<if test="createdAt != null">created_at = #{createdAt},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEcCommandResultById" parameterType="Long">
delete from ec_command_result where id = #{id}
</delete>
<delete id="deleteEcCommandResultByIds" parameterType="String">
delete from ec_command_result where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.luqj.ec.mapper.EcControlTaskMapper">
<resultMap type="EcControlTask" id="EcControlTaskResult">
<result property="id" column="id" />
<result property="taskName" column="task_name" />
<result property="taskType" column="task_type" />
<result property="userId" column="user_id" />
<result property="status" column="status" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
<result property="appId" column="app_id" />
</resultMap>
<sql id="selectEcControlTaskVo">
select id, task_name, task_type, user_id, status, created_at, updated_at, app_id from ec_control_task
</sql>
<select id="selectEcControlTaskList" parameterType="EcControlTask" resultMap="EcControlTaskResult">
<include refid="selectEcControlTaskVo"/>
<where>
<if test="taskName != null and taskName != ''"> and task_name like concat('%', #{taskName}, '%')</if>
<if test="taskType != null "> and task_type = #{taskType}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="status != null "> and status = #{status}</if>
<if test="appId != null "> and app_id = #{appId}</if>
</where>
</select>
<select id="selectEcControlTaskById" parameterType="Long" resultMap="EcControlTaskResult">
<include refid="selectEcControlTaskVo"/>
where id = #{id}
</select>
<insert id="insertEcControlTask" parameterType="EcControlTask" useGeneratedKeys="true" keyProperty="id">
insert into ec_control_task
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="taskName != null">task_name,</if>
<if test="taskType != null">task_type,</if>
<if test="userId != null">user_id,</if>
<if test="status != null">status,</if>
<if test="createdAt != null">created_at,</if>
<if test="updatedAt != null">updated_at,</if>
<if test="appId != null">app_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskName != null">#{taskName},</if>
<if test="taskType != null">#{taskType},</if>
<if test="userId != null">#{userId},</if>
<if test="status != null">#{status},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
<if test="appId != null">#{appId},</if>
</trim>
</insert>
<update id="updateEcControlTask" parameterType="EcControlTask">
update ec_control_task
<trim prefix="SET" suffixOverrides=",">
<if test="taskName != null">task_name = #{taskName},</if>
<if test="taskType != null">task_type = #{taskType},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="status != null">status = #{status},</if>
<if test="createdAt != null">created_at = #{createdAt},</if>
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
<if test="appId != null">app_id = #{appId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEcControlTaskById" parameterType="Long">
delete from ec_control_task where id = #{id}
</delete>
<delete id="deleteEcControlTaskByIds" parameterType="String">
delete from ec_control_task where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.luqj.ec.mapper.EcDeviceCommandMapper">
<resultMap type="EcDeviceCommand" id="EcDeviceCommandResult">
<result property="id" column="id" />
<result property="deviceId" column="device_id" />
<result property="commandType" column="command_type" />
<result property="commandContent" column="command_content" />
<result property="status" column="status" />
<result property="sendTime" column="send_time" />
<result property="executeTime" column="execute_time" />
<result property="finishTime" column="finish_time" />
</resultMap>
<sql id="selectEcDeviceCommandVo">
select id, device_id, command_type, command_content, status, send_time, execute_time, finish_time from ec_device_command
</sql>
<select id="selectEcDeviceCommandList" parameterType="EcDeviceCommand" resultMap="EcDeviceCommandResult">
<include refid="selectEcDeviceCommandVo"/>
<where>
<if test="deviceId != null "> and device_id = #{deviceId}</if>
<if test="commandType != null and commandType != ''"> and command_type = #{commandType}</if>
<if test="status != null "> and status = #{status}</if>
</where>
</select>
<select id="selectEcDeviceCommandById" parameterType="Long" resultMap="EcDeviceCommandResult">
<include refid="selectEcDeviceCommandVo"/>
where id = #{id}
</select>
<insert id="insertEcDeviceCommand" parameterType="EcDeviceCommand" useGeneratedKeys="true" keyProperty="id">
insert into ec_device_command
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deviceId != null">device_id,</if>
<if test="commandType != null">command_type,</if>
<if test="commandContent != null">command_content,</if>
<if test="status != null">status,</if>
<if test="sendTime != null">send_time,</if>
<if test="executeTime != null">execute_time,</if>
<if test="finishTime != null">finish_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deviceId != null">#{deviceId},</if>
<if test="commandType != null">#{commandType},</if>
<if test="commandContent != null">#{commandContent},</if>
<if test="status != null">#{status},</if>
<if test="sendTime != null">#{sendTime},</if>
<if test="executeTime != null">#{executeTime},</if>
<if test="finishTime != null">#{finishTime},</if>
</trim>
</insert>
<update id="updateEcDeviceCommand" parameterType="EcDeviceCommand">
update ec_device_command
<trim prefix="SET" suffixOverrides=",">
<if test="deviceId != null">device_id = #{deviceId},</if>
<if test="commandType != null">command_type = #{commandType},</if>
<if test="commandContent != null">command_content = #{commandContent},</if>
<if test="status != null">status = #{status},</if>
<if test="sendTime != null">send_time = #{sendTime},</if>
<if test="executeTime != null">execute_time = #{executeTime},</if>
<if test="finishTime != null">finish_time = #{finishTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEcDeviceCommandById" parameterType="Long">
delete from ec_device_command where id = #{id}
</delete>
<delete id="deleteEcDeviceCommandByIds" parameterType="String">
delete from ec_device_command where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.luqj.ec.mapper.EcDeviceMapper">
<resultMap type="EcDevice" id="EcDeviceResult">
<result property="id" column="id" />
<result property="deviceCode" column="device_code" />
<result property="brand" column="brand" />
<result property="model" column="model" />
<result property="osType" column="os_type" />
<result property="osVersion" column="os_version" />
<result property="appVersion" column="app_version" />
<result property="status" column="status" />
<result property="lastOnlineTime" column="last_online_time" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
<result property="ipAddress" column="ip_address" />
<result property="lastScreenPic" column="last_screen_pic" />
<result property="widthNum" column="width_num" />
<result property="heightNum" column="height_num" />
<result property="controlType" column="control_type" />
<result property="appId" column="app_id" />
<result property="userId" column="user_id" />
<result property="secretKey" column="secret_key" />
</resultMap>
<sql id="selectEcDeviceVo">
select id, device_code, brand, model, os_type, os_version, app_version, status, last_online_time, created_at, updated_at, ip_address, last_screen_pic, width_num, height_num, control_type, app_id, user_id, secret_key from ec_device
</sql>
<select id="selectEcDeviceList" parameterType="EcDevice" resultMap="EcDeviceResult">
<include refid="selectEcDeviceVo"/>
<where>
<if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</if>
<if test="osType != null and osType != ''"> and os_type = #{osType}</if>
<if test="status != null "> and status = #{status}</if>
<if test="controlType != null "> and control_type = #{controlType}</if>
<if test="appId != null "> and app_id = #{appId}</if>
<if test="userId != null "> and user_id = #{userId}</if>
</where>
</select>
<select id="selectEcDeviceById" parameterType="Long" resultMap="EcDeviceResult">
<include refid="selectEcDeviceVo"/>
where id = #{id}
</select>
<insert id="insertEcDevice" parameterType="EcDevice" useGeneratedKeys="true" keyProperty="id">
insert into ec_device
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deviceCode != null">device_code,</if>
<if test="brand != null">brand,</if>
<if test="model != null">model,</if>
<if test="osType != null">os_type,</if>
<if test="osVersion != null">os_version,</if>
<if test="appVersion != null">app_version,</if>
<if test="status != null">status,</if>
<if test="lastOnlineTime != null">last_online_time,</if>
<if test="createdAt != null">created_at,</if>
<if test="updatedAt != null">updated_at,</if>
<if test="ipAddress != null">ip_address,</if>
<if test="lastScreenPic != null">last_screen_pic,</if>
<if test="widthNum != null">width_num,</if>
<if test="heightNum != null">height_num,</if>
<if test="controlType != null">control_type,</if>
<if test="appId != null">app_id,</if>
<if test="userId != null">user_id,</if>
<if test="secretKey != null">secret_key,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deviceCode != null">#{deviceCode},</if>
<if test="brand != null">#{brand},</if>
<if test="model != null">#{model},</if>
<if test="osType != null">#{osType},</if>
<if test="osVersion != null">#{osVersion},</if>
<if test="appVersion != null">#{appVersion},</if>
<if test="status != null">#{status},</if>
<if test="lastOnlineTime != null">#{lastOnlineTime},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
<if test="ipAddress != null">#{ipAddress},</if>
<if test="lastScreenPic != null">#{lastScreenPic},</if>
<if test="widthNum != null">#{widthNum},</if>
<if test="heightNum != null">#{heightNum},</if>
<if test="controlType != null">#{controlType},</if>
<if test="appId != null">#{appId},</if>
<if test="userId != null">#{userId},</if>
<if test="secretKey != null">#{secretKey},</if>
</trim>
</insert>
<update id="updateEcDevice" parameterType="EcDevice">
update ec_device
<trim prefix="SET" suffixOverrides=",">
<if test="deviceCode != null">device_code = #{deviceCode},</if>
<if test="brand != null">brand = #{brand},</if>
<if test="model != null">model = #{model},</if>
<if test="osType != null">os_type = #{osType},</if>
<if test="osVersion != null">os_version = #{osVersion},</if>
<if test="appVersion != null">app_version = #{appVersion},</if>
<if test="status != null">status = #{status},</if>
<if test="lastOnlineTime != null">last_online_time = #{lastOnlineTime},</if>
<if test="createdAt != null">created_at = #{createdAt},</if>
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
<if test="ipAddress != null">ip_address = #{ipAddress},</if>
<if test="lastScreenPic != null">last_screen_pic = #{lastScreenPic},</if>
<if test="widthNum != null">width_num = #{widthNum},</if>
<if test="heightNum != null">height_num = #{heightNum},</if>
<if test="controlType != null">control_type = #{controlType},</if>
<if test="appId != null">app_id = #{appId},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="secretKey != null">secret_key = #{secretKey},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEcDeviceById" parameterType="Long">
delete from ec_device where id = #{id}
</delete>
<delete id="deleteEcDeviceByIds" parameterType="String">
delete from ec_device where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.luqj.ec.mapper.EcDeviceStatusMapper">
<resultMap type="EcDeviceStatus" id="EcDeviceStatusResult">
<result property="id" column="id" />
<result property="deviceId" column="device_id" />
<result property="battery" column="battery" />
<result property="networkType" column="network_type" />
<result property="cpuUsage" column="cpu_usage" />
<result property="memoryUsage" column="memory_usage" />
<result property="screenOn" column="screen_on" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectEcDeviceStatusVo">
select id, device_id, battery, network_type, cpu_usage, memory_usage, screen_on, created_at, updated_at from ec_device_status
</sql>
<select id="selectEcDeviceStatusList" parameterType="EcDeviceStatus" resultMap="EcDeviceStatusResult">
<include refid="selectEcDeviceStatusVo"/>
<where>
<if test="deviceId != null "> and device_id = #{deviceId}</if>
<if test="networkType != null and networkType != ''"> and network_type = #{networkType}</if>
<if test="screenOn != null "> and screen_on = #{screenOn}</if>
</where>
</select>
<select id="selectEcDeviceStatusById" parameterType="Long" resultMap="EcDeviceStatusResult">
<include refid="selectEcDeviceStatusVo"/>
where id = #{id}
</select>
<insert id="insertEcDeviceStatus" parameterType="EcDeviceStatus" useGeneratedKeys="true" keyProperty="id">
insert into ec_device_status
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deviceId != null">device_id,</if>
<if test="battery != null">battery,</if>
<if test="networkType != null">network_type,</if>
<if test="cpuUsage != null">cpu_usage,</if>
<if test="memoryUsage != null">memory_usage,</if>
<if test="screenOn != null">screen_on,</if>
<if test="createdAt != null">created_at,</if>
<if test="updatedAt != null">updated_at,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deviceId != null">#{deviceId},</if>
<if test="battery != null">#{battery},</if>
<if test="networkType != null">#{networkType},</if>
<if test="cpuUsage != null">#{cpuUsage},</if>
<if test="memoryUsage != null">#{memoryUsage},</if>
<if test="screenOn != null">#{screenOn},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateEcDeviceStatus" parameterType="EcDeviceStatus">
update ec_device_status
<trim prefix="SET" suffixOverrides=",">
<if test="deviceId != null">device_id = #{deviceId},</if>
<if test="battery != null">battery = #{battery},</if>
<if test="networkType != null">network_type = #{networkType},</if>
<if test="cpuUsage != null">cpu_usage = #{cpuUsage},</if>
<if test="memoryUsage != null">memory_usage = #{memoryUsage},</if>
<if test="screenOn != null">screen_on = #{screenOn},</if>
<if test="createdAt != null">created_at = #{createdAt},</if>
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEcDeviceStatusById" parameterType="Long">
delete from ec_device_status where id = #{id}
</delete>
<delete id="deleteEcDeviceStatusByIds" parameterType="String">
delete from ec_device_status where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.luqj.ec.mapper.EcTaskCommandMapper">
<resultMap type="EcTaskCommand" id="EcTaskCommandResult">
<result property="id" column="id" />
<result property="taskId" column="task_id" />
<result property="stepOrder" column="step_order" />
<result property="commandType" column="command_type" />
<result property="commandContent" column="command_content" />
</resultMap>
<sql id="selectEcTaskCommandVo">
select id, task_id, step_order, command_type, command_content from ec_task_command
</sql>
<select id="selectEcTaskCommandList" parameterType="EcTaskCommand" resultMap="EcTaskCommandResult">
<include refid="selectEcTaskCommandVo"/>
<where>
<if test="taskId != null "> and task_id = #{taskId}</if>
<if test="commandType != null and commandType != ''"> and command_type = #{commandType}</if>
</where>
</select>
<select id="selectEcTaskCommandById" parameterType="Long" resultMap="EcTaskCommandResult">
<include refid="selectEcTaskCommandVo"/>
where id = #{id}
</select>
<insert id="insertEcTaskCommand" parameterType="EcTaskCommand" useGeneratedKeys="true" keyProperty="id">
insert into ec_task_command
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="taskId != null">task_id,</if>
<if test="stepOrder != null">step_order,</if>
<if test="commandType != null">command_type,</if>
<if test="commandContent != null">command_content,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskId != null">#{taskId},</if>
<if test="stepOrder != null">#{stepOrder},</if>
<if test="commandType != null">#{commandType},</if>
<if test="commandContent != null">#{commandContent},</if>
</trim>
</insert>
<update id="updateEcTaskCommand" parameterType="EcTaskCommand">
update ec_task_command
<trim prefix="SET" suffixOverrides=",">
<if test="taskId != null">task_id = #{taskId},</if>
<if test="stepOrder != null">step_order = #{stepOrder},</if>
<if test="commandType != null">command_type = #{commandType},</if>
<if test="commandContent != null">command_content = #{commandContent},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEcTaskCommandById" parameterType="Long">
delete from ec_task_command where id = #{id}
</delete>
<delete id="deleteEcTaskCommandByIds" parameterType="String">
delete from ec_task_command where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.luqj.ec.mapper.EcTaskDeviceMapper">
<resultMap type="EcTaskDevice" id="EcTaskDeviceResult">
<result property="id" column="id" />
<result property="taskId" column="task_id" />
<result property="deviceId" column="device_id" />
<result property="status" column="status" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectEcTaskDeviceVo">
select id, task_id, device_id, status, updated_at from ec_task_device
</sql>
<select id="selectEcTaskDeviceList" parameterType="EcTaskDevice" resultMap="EcTaskDeviceResult">
<include refid="selectEcTaskDeviceVo"/>
<where>
<if test="taskId != null "> and task_id = #{taskId}</if>
<if test="deviceId != null "> and device_id = #{deviceId}</if>
<if test="status != null "> and status = #{status}</if>
</where>
</select>
<select id="selectEcTaskDeviceById" parameterType="Long" resultMap="EcTaskDeviceResult">
<include refid="selectEcTaskDeviceVo"/>
where id = #{id}
</select>
<insert id="insertEcTaskDevice" parameterType="EcTaskDevice" useGeneratedKeys="true" keyProperty="id">
insert into ec_task_device
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="taskId != null">task_id,</if>
<if test="deviceId != null">device_id,</if>
<if test="status != null">status,</if>
<if test="updatedAt != null">updated_at,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskId != null">#{taskId},</if>
<if test="deviceId != null">#{deviceId},</if>
<if test="status != null">#{status},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateEcTaskDevice" parameterType="EcTaskDevice">
update ec_task_device
<trim prefix="SET" suffixOverrides=",">
<if test="taskId != null">task_id = #{taskId},</if>
<if test="deviceId != null">device_id = #{deviceId},</if>
<if test="status != null">status = #{status},</if>
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEcTaskDeviceById" parameterType="Long">
delete from ec_task_device where id = #{id}
</delete>
<delete id="deleteEcTaskDeviceByIds" parameterType="String">
delete from ec_task_device where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>