add - 租户管理、场景管理、场景类型、监控单元、监控类型、电子围栏、围栏目标代码生成
parent
e98a95c7e5
commit
f205a21fc9
@ -0,0 +1,105 @@
|
||||
package com.ruoyi.business.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.business.domain.HwElectronicFence;
|
||||
import com.ruoyi.business.service.IHwElectronicFenceService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 电子围栏Controller
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/effectiveFence")
|
||||
public class HwElectronicFenceController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IHwElectronicFenceService hwElectronicFenceService;
|
||||
|
||||
/**
|
||||
* 查询电子围栏列表
|
||||
*/
|
||||
@RequiresPermissions("business:effectiveFence:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HwElectronicFence hwElectronicFence)
|
||||
{
|
||||
startPage();
|
||||
List<HwElectronicFence> list = hwElectronicFenceService.selectHwElectronicFenceList(hwElectronicFence);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出电子围栏列表
|
||||
*/
|
||||
@RequiresPermissions("business:effectiveFence:export")
|
||||
@Log(title = "电子围栏", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HwElectronicFence hwElectronicFence)
|
||||
{
|
||||
List<HwElectronicFence> list = hwElectronicFenceService.selectHwElectronicFenceList(hwElectronicFence);
|
||||
ExcelUtil<HwElectronicFence> util = new ExcelUtil<HwElectronicFence>(HwElectronicFence.class);
|
||||
util.exportExcel(response, list, "电子围栏数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取电子围栏详细信息
|
||||
*/
|
||||
@RequiresPermissions("business:effectiveFence:query")
|
||||
@GetMapping(value = "/{electronicFenceId}")
|
||||
public AjaxResult getInfo(@PathVariable("electronicFenceId") Long electronicFenceId)
|
||||
{
|
||||
return success(hwElectronicFenceService.selectHwElectronicFenceByElectronicFenceId(electronicFenceId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增电子围栏
|
||||
*/
|
||||
@RequiresPermissions("business:effectiveFence:add")
|
||||
@Log(title = "电子围栏", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HwElectronicFence hwElectronicFence)
|
||||
{
|
||||
return toAjax(hwElectronicFenceService.insertHwElectronicFence(hwElectronicFence));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改电子围栏
|
||||
*/
|
||||
@RequiresPermissions("business:effectiveFence:edit")
|
||||
@Log(title = "电子围栏", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HwElectronicFence hwElectronicFence)
|
||||
{
|
||||
return toAjax(hwElectronicFenceService.updateHwElectronicFence(hwElectronicFence));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除电子围栏
|
||||
*/
|
||||
@RequiresPermissions("business:effectiveFence:remove")
|
||||
@Log(title = "电子围栏", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{electronicFenceIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] electronicFenceIds)
|
||||
{
|
||||
return toAjax(hwElectronicFenceService.deleteHwElectronicFenceByElectronicFenceIds(electronicFenceIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package com.ruoyi.business.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.business.domain.HwFenceTarget;
|
||||
import com.ruoyi.business.service.IHwFenceTargetService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 电子围栏目标Controller
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/fenceTarget")
|
||||
public class HwFenceTargetController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IHwFenceTargetService hwFenceTargetService;
|
||||
|
||||
/**
|
||||
* 查询电子围栏目标列表
|
||||
*/
|
||||
@RequiresPermissions("business:fenceTarget:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HwFenceTarget hwFenceTarget)
|
||||
{
|
||||
startPage();
|
||||
List<HwFenceTarget> list = hwFenceTargetService.selectHwFenceTargetList(hwFenceTarget);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出电子围栏目标列表
|
||||
*/
|
||||
@RequiresPermissions("business:fenceTarget:export")
|
||||
@Log(title = "电子围栏目标", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HwFenceTarget hwFenceTarget)
|
||||
{
|
||||
List<HwFenceTarget> list = hwFenceTargetService.selectHwFenceTargetList(hwFenceTarget);
|
||||
ExcelUtil<HwFenceTarget> util = new ExcelUtil<HwFenceTarget>(HwFenceTarget.class);
|
||||
util.exportExcel(response, list, "电子围栏目标数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取电子围栏目标详细信息
|
||||
*/
|
||||
@RequiresPermissions("business:fenceTarget:query")
|
||||
@GetMapping(value = "/{fenceTargetId}")
|
||||
public AjaxResult getInfo(@PathVariable("fenceTargetId") Long fenceTargetId)
|
||||
{
|
||||
return success(hwFenceTargetService.selectHwFenceTargetByFenceTargetId(fenceTargetId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增电子围栏目标
|
||||
*/
|
||||
@RequiresPermissions("business:fenceTarget:add")
|
||||
@Log(title = "电子围栏目标", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HwFenceTarget hwFenceTarget)
|
||||
{
|
||||
return toAjax(hwFenceTargetService.insertHwFenceTarget(hwFenceTarget));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改电子围栏目标
|
||||
*/
|
||||
@RequiresPermissions("business:fenceTarget:edit")
|
||||
@Log(title = "电子围栏目标", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HwFenceTarget hwFenceTarget)
|
||||
{
|
||||
return toAjax(hwFenceTargetService.updateHwFenceTarget(hwFenceTarget));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除电子围栏目标
|
||||
*/
|
||||
@RequiresPermissions("business:fenceTarget:remove")
|
||||
@Log(title = "电子围栏目标", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{fenceTargetIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] fenceTargetIds)
|
||||
{
|
||||
return toAjax(hwFenceTargetService.deleteHwFenceTargetByFenceTargetIds(fenceTargetIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package com.ruoyi.business.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.business.domain.HwMonitorUnit;
|
||||
import com.ruoyi.business.service.IHwMonitorUnitService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 监控单元Controller
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/monitorUnit")
|
||||
public class HwMonitorUnitController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IHwMonitorUnitService hwMonitorUnitService;
|
||||
|
||||
/**
|
||||
* 查询监控单元列表
|
||||
*/
|
||||
@RequiresPermissions("business:monitorUnit:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HwMonitorUnit hwMonitorUnit)
|
||||
{
|
||||
startPage();
|
||||
List<HwMonitorUnit> list = hwMonitorUnitService.selectHwMonitorUnitList(hwMonitorUnit);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出监控单元列表
|
||||
*/
|
||||
@RequiresPermissions("business:monitorUnit:export")
|
||||
@Log(title = "监控单元", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HwMonitorUnit hwMonitorUnit)
|
||||
{
|
||||
List<HwMonitorUnit> list = hwMonitorUnitService.selectHwMonitorUnitList(hwMonitorUnit);
|
||||
ExcelUtil<HwMonitorUnit> util = new ExcelUtil<HwMonitorUnit>(HwMonitorUnit.class);
|
||||
util.exportExcel(response, list, "监控单元数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取监控单元详细信息
|
||||
*/
|
||||
@RequiresPermissions("business:monitorUnit:query")
|
||||
@GetMapping(value = "/{monitorUnitId}")
|
||||
public AjaxResult getInfo(@PathVariable("monitorUnitId") Long monitorUnitId)
|
||||
{
|
||||
return success(hwMonitorUnitService.selectHwMonitorUnitByMonitorUnitId(monitorUnitId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增监控单元
|
||||
*/
|
||||
@RequiresPermissions("business:monitorUnit:add")
|
||||
@Log(title = "监控单元", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HwMonitorUnit hwMonitorUnit)
|
||||
{
|
||||
return toAjax(hwMonitorUnitService.insertHwMonitorUnit(hwMonitorUnit));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改监控单元
|
||||
*/
|
||||
@RequiresPermissions("business:monitorUnit:edit")
|
||||
@Log(title = "监控单元", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HwMonitorUnit hwMonitorUnit)
|
||||
{
|
||||
return toAjax(hwMonitorUnitService.updateHwMonitorUnit(hwMonitorUnit));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除监控单元
|
||||
*/
|
||||
@RequiresPermissions("business:monitorUnit:remove")
|
||||
@Log(title = "监控单元", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{monitorUnitIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] monitorUnitIds)
|
||||
{
|
||||
return toAjax(hwMonitorUnitService.deleteHwMonitorUnitByMonitorUnitIds(monitorUnitIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package com.ruoyi.business.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.business.domain.HwMonitorUnitType;
|
||||
import com.ruoyi.business.service.IHwMonitorUnitTypeService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 监控单元类型Controller
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/monitorUnitType")
|
||||
public class HwMonitorUnitTypeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IHwMonitorUnitTypeService hwMonitorUnitTypeService;
|
||||
|
||||
/**
|
||||
* 查询监控单元类型列表
|
||||
*/
|
||||
@RequiresPermissions("business:monitorUnitType:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HwMonitorUnitType hwMonitorUnitType)
|
||||
{
|
||||
startPage();
|
||||
List<HwMonitorUnitType> list = hwMonitorUnitTypeService.selectHwMonitorUnitTypeList(hwMonitorUnitType);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出监控单元类型列表
|
||||
*/
|
||||
@RequiresPermissions("business:monitorUnitType:export")
|
||||
@Log(title = "监控单元类型", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HwMonitorUnitType hwMonitorUnitType)
|
||||
{
|
||||
List<HwMonitorUnitType> list = hwMonitorUnitTypeService.selectHwMonitorUnitTypeList(hwMonitorUnitType);
|
||||
ExcelUtil<HwMonitorUnitType> util = new ExcelUtil<HwMonitorUnitType>(HwMonitorUnitType.class);
|
||||
util.exportExcel(response, list, "监控单元类型数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取监控单元类型详细信息
|
||||
*/
|
||||
@RequiresPermissions("business:monitorUnitType:query")
|
||||
@GetMapping(value = "/{monitorUnitTypeId}")
|
||||
public AjaxResult getInfo(@PathVariable("monitorUnitTypeId") Long monitorUnitTypeId)
|
||||
{
|
||||
return success(hwMonitorUnitTypeService.selectHwMonitorUnitTypeByMonitorUnitTypeId(monitorUnitTypeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增监控单元类型
|
||||
*/
|
||||
@RequiresPermissions("business:monitorUnitType:add")
|
||||
@Log(title = "监控单元类型", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HwMonitorUnitType hwMonitorUnitType)
|
||||
{
|
||||
return toAjax(hwMonitorUnitTypeService.insertHwMonitorUnitType(hwMonitorUnitType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改监控单元类型
|
||||
*/
|
||||
@RequiresPermissions("business:monitorUnitType:edit")
|
||||
@Log(title = "监控单元类型", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HwMonitorUnitType hwMonitorUnitType)
|
||||
{
|
||||
return toAjax(hwMonitorUnitTypeService.updateHwMonitorUnitType(hwMonitorUnitType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除监控单元类型
|
||||
*/
|
||||
@RequiresPermissions("business:monitorUnitType:remove")
|
||||
@Log(title = "监控单元类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{monitorUnitTypeIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] monitorUnitTypeIds)
|
||||
{
|
||||
return toAjax(hwMonitorUnitTypeService.deleteHwMonitorUnitTypeByMonitorUnitTypeIds(monitorUnitTypeIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package com.ruoyi.business.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.business.domain.HwSceneMode;
|
||||
import com.ruoyi.business.service.IHwSceneModeService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 场景类型Controller
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sceneMode")
|
||||
public class HwSceneModeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IHwSceneModeService hwSceneModeService;
|
||||
|
||||
/**
|
||||
* 查询场景类型列表
|
||||
*/
|
||||
@RequiresPermissions("business:sceneMode:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HwSceneMode hwSceneMode)
|
||||
{
|
||||
startPage();
|
||||
List<HwSceneMode> list = hwSceneModeService.selectHwSceneModeList(hwSceneMode);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出场景类型列表
|
||||
*/
|
||||
@RequiresPermissions("business:sceneMode:export")
|
||||
@Log(title = "场景类型", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HwSceneMode hwSceneMode)
|
||||
{
|
||||
List<HwSceneMode> list = hwSceneModeService.selectHwSceneModeList(hwSceneMode);
|
||||
ExcelUtil<HwSceneMode> util = new ExcelUtil<HwSceneMode>(HwSceneMode.class);
|
||||
util.exportExcel(response, list, "场景类型数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取场景类型详细信息
|
||||
*/
|
||||
@RequiresPermissions("business:sceneMode:query")
|
||||
@GetMapping(value = "/{sceneModeId}")
|
||||
public AjaxResult getInfo(@PathVariable("sceneModeId") Long sceneModeId)
|
||||
{
|
||||
return success(hwSceneModeService.selectHwSceneModeBySceneModeId(sceneModeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增场景类型
|
||||
*/
|
||||
@RequiresPermissions("business:sceneMode:add")
|
||||
@Log(title = "场景类型", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HwSceneMode hwSceneMode)
|
||||
{
|
||||
return toAjax(hwSceneModeService.insertHwSceneMode(hwSceneMode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改场景类型
|
||||
*/
|
||||
@RequiresPermissions("business:sceneMode:edit")
|
||||
@Log(title = "场景类型", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HwSceneMode hwSceneMode)
|
||||
{
|
||||
return toAjax(hwSceneModeService.updateHwSceneMode(hwSceneMode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除场景类型
|
||||
*/
|
||||
@RequiresPermissions("business:sceneMode:remove")
|
||||
@Log(title = "场景类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{sceneModeIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] sceneModeIds)
|
||||
{
|
||||
return toAjax(hwSceneModeService.deleteHwSceneModeBySceneModeIds(sceneModeIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package com.ruoyi.business.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.business.domain.HwTenant;
|
||||
import com.ruoyi.business.service.IHwTenantService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 租户信息Controller
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/tenant")
|
||||
public class HwTenantController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IHwTenantService hwTenantService;
|
||||
|
||||
/**
|
||||
* 查询租户信息列表
|
||||
*/
|
||||
@RequiresPermissions("business:tenant:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HwTenant hwTenant)
|
||||
{
|
||||
startPage();
|
||||
List<HwTenant> list = hwTenantService.selectHwTenantList(hwTenant);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出租户信息列表
|
||||
*/
|
||||
@RequiresPermissions("business:tenant:export")
|
||||
@Log(title = "租户信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HwTenant hwTenant)
|
||||
{
|
||||
List<HwTenant> list = hwTenantService.selectHwTenantList(hwTenant);
|
||||
ExcelUtil<HwTenant> util = new ExcelUtil<HwTenant>(HwTenant.class);
|
||||
util.exportExcel(response, list, "租户信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取租户信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("business:tenant:query")
|
||||
@GetMapping(value = "/{tenantId}")
|
||||
public AjaxResult getInfo(@PathVariable("tenantId") Long tenantId)
|
||||
{
|
||||
return success(hwTenantService.selectHwTenantByTenantId(tenantId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增租户信息
|
||||
*/
|
||||
@RequiresPermissions("business:tenant:add")
|
||||
@Log(title = "租户信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HwTenant hwTenant)
|
||||
{
|
||||
return toAjax(hwTenantService.insertHwTenant(hwTenant));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改租户信息
|
||||
*/
|
||||
@RequiresPermissions("business:tenant:edit")
|
||||
@Log(title = "租户信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HwTenant hwTenant)
|
||||
{
|
||||
return toAjax(hwTenantService.updateHwTenant(hwTenant));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除租户信息
|
||||
*/
|
||||
@RequiresPermissions("business:tenant:remove")
|
||||
@Log(title = "租户信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{tenantIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] tenantIds)
|
||||
{
|
||||
return toAjax(hwTenantService.deleteHwTenantByTenantIds(tenantIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,183 @@
|
||||
package com.ruoyi.business.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 监控单元对象 hw_monitor_unit
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
public class HwMonitorUnit extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 监控单元ID */
|
||||
private Long monitorUnitId;
|
||||
|
||||
/** 监控单元名称 */
|
||||
@Excel(name = "监控单元名称")
|
||||
private String monitorUnitName;
|
||||
|
||||
/** 所属场景 */
|
||||
@Excel(name = "所属场景")
|
||||
private Long sceneId;
|
||||
|
||||
/** 父级监控单元ID */
|
||||
@Excel(name = "父级监控单元ID")
|
||||
private Long parentId;
|
||||
|
||||
/** 监控单元类型ID */
|
||||
@Excel(name = "监控单元类型ID")
|
||||
private Long monitorUnitTypeId;
|
||||
|
||||
/** 区域ID */
|
||||
@Excel(name = "区域ID")
|
||||
private Long areaId;
|
||||
|
||||
/** 详细地址 */
|
||||
@Excel(name = "详细地址")
|
||||
private String monitorAddress;
|
||||
|
||||
/** 监控单元图片地址 */
|
||||
@Excel(name = "监控单元图片地址")
|
||||
private String monitorPic;
|
||||
|
||||
/** 保存周期 */
|
||||
@Excel(name = "保存周期")
|
||||
private BigDecimal preserveTime;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Long monitorUnitStatus;
|
||||
|
||||
/** 预留字段 */
|
||||
@Excel(name = "预留字段")
|
||||
private String monitorUnitField;
|
||||
|
||||
public void setMonitorUnitId(Long monitorUnitId)
|
||||
{
|
||||
this.monitorUnitId = monitorUnitId;
|
||||
}
|
||||
|
||||
public Long getMonitorUnitId()
|
||||
{
|
||||
return monitorUnitId;
|
||||
}
|
||||
public void setMonitorUnitName(String monitorUnitName)
|
||||
{
|
||||
this.monitorUnitName = monitorUnitName;
|
||||
}
|
||||
|
||||
public String getMonitorUnitName()
|
||||
{
|
||||
return monitorUnitName;
|
||||
}
|
||||
public void setSceneId(Long sceneId)
|
||||
{
|
||||
this.sceneId = sceneId;
|
||||
}
|
||||
|
||||
public Long getSceneId()
|
||||
{
|
||||
return sceneId;
|
||||
}
|
||||
public void setParentId(Long parentId)
|
||||
{
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public Long getParentId()
|
||||
{
|
||||
return parentId;
|
||||
}
|
||||
public void setMonitorUnitTypeId(Long monitorUnitTypeId)
|
||||
{
|
||||
this.monitorUnitTypeId = monitorUnitTypeId;
|
||||
}
|
||||
|
||||
public Long getMonitorUnitTypeId()
|
||||
{
|
||||
return monitorUnitTypeId;
|
||||
}
|
||||
public void setAreaId(Long areaId)
|
||||
{
|
||||
this.areaId = areaId;
|
||||
}
|
||||
|
||||
public Long getAreaId()
|
||||
{
|
||||
return areaId;
|
||||
}
|
||||
public void setMonitorAddress(String monitorAddress)
|
||||
{
|
||||
this.monitorAddress = monitorAddress;
|
||||
}
|
||||
|
||||
public String getMonitorAddress()
|
||||
{
|
||||
return monitorAddress;
|
||||
}
|
||||
public void setMonitorPic(String monitorPic)
|
||||
{
|
||||
this.monitorPic = monitorPic;
|
||||
}
|
||||
|
||||
public String getMonitorPic()
|
||||
{
|
||||
return monitorPic;
|
||||
}
|
||||
public void setPreserveTime(BigDecimal preserveTime)
|
||||
{
|
||||
this.preserveTime = preserveTime;
|
||||
}
|
||||
|
||||
public BigDecimal getPreserveTime()
|
||||
{
|
||||
return preserveTime;
|
||||
}
|
||||
public void setMonitorUnitStatus(Long monitorUnitStatus)
|
||||
{
|
||||
this.monitorUnitStatus = monitorUnitStatus;
|
||||
}
|
||||
|
||||
public Long getMonitorUnitStatus()
|
||||
{
|
||||
return monitorUnitStatus;
|
||||
}
|
||||
public void setMonitorUnitField(String monitorUnitField)
|
||||
{
|
||||
this.monitorUnitField = monitorUnitField;
|
||||
}
|
||||
|
||||
public String getMonitorUnitField()
|
||||
{
|
||||
return monitorUnitField;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("monitorUnitId", getMonitorUnitId())
|
||||
.append("monitorUnitName", getMonitorUnitName())
|
||||
.append("sceneId", getSceneId())
|
||||
.append("parentId", getParentId())
|
||||
.append("monitorUnitTypeId", getMonitorUnitTypeId())
|
||||
.append("areaId", getAreaId())
|
||||
.append("monitorAddress", getMonitorAddress())
|
||||
.append("monitorPic", getMonitorPic())
|
||||
.append("preserveTime", getPreserveTime())
|
||||
.append("remark", getRemark())
|
||||
.append("monitorUnitStatus", getMonitorUnitStatus())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("monitorUnitField", getMonitorUnitField())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,126 @@
|
||||
package com.ruoyi.business.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 场景类型对象 hw_scene_mode
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
public class HwSceneMode extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 类型ID */
|
||||
private Long sceneModeId;
|
||||
|
||||
/** 类型名称 */
|
||||
@Excel(name = "类型名称")
|
||||
private String sceneModeName;
|
||||
|
||||
/** 自定义标识 */
|
||||
@Excel(name = "自定义标识")
|
||||
private Long customFlag;
|
||||
|
||||
/** 租户ID */
|
||||
@Excel(name = "租户ID")
|
||||
private Long tenantId;
|
||||
|
||||
/** 语言code */
|
||||
@Excel(name = "语言code")
|
||||
private String languageCode;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Long sceneModeStatus;
|
||||
|
||||
/** 预留字段 */
|
||||
@Excel(name = "预留字段")
|
||||
private String sceneModeField;
|
||||
|
||||
public void setSceneModeId(Long sceneModeId)
|
||||
{
|
||||
this.sceneModeId = sceneModeId;
|
||||
}
|
||||
|
||||
public Long getSceneModeId()
|
||||
{
|
||||
return sceneModeId;
|
||||
}
|
||||
public void setSceneModeName(String sceneModeName)
|
||||
{
|
||||
this.sceneModeName = sceneModeName;
|
||||
}
|
||||
|
||||
public String getSceneModeName()
|
||||
{
|
||||
return sceneModeName;
|
||||
}
|
||||
public void setCustomFlag(Long customFlag)
|
||||
{
|
||||
this.customFlag = customFlag;
|
||||
}
|
||||
|
||||
public Long getCustomFlag()
|
||||
{
|
||||
return customFlag;
|
||||
}
|
||||
public void setTenantId(Long tenantId)
|
||||
{
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public Long getTenantId()
|
||||
{
|
||||
return tenantId;
|
||||
}
|
||||
public void setLanguageCode(String languageCode)
|
||||
{
|
||||
this.languageCode = languageCode;
|
||||
}
|
||||
|
||||
public String getLanguageCode()
|
||||
{
|
||||
return languageCode;
|
||||
}
|
||||
public void setSceneModeStatus(Long sceneModeStatus)
|
||||
{
|
||||
this.sceneModeStatus = sceneModeStatus;
|
||||
}
|
||||
|
||||
public Long getSceneModeStatus()
|
||||
{
|
||||
return sceneModeStatus;
|
||||
}
|
||||
public void setSceneModeField(String sceneModeField)
|
||||
{
|
||||
this.sceneModeField = sceneModeField;
|
||||
}
|
||||
|
||||
public String getSceneModeField()
|
||||
{
|
||||
return sceneModeField;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("sceneModeId", getSceneModeId())
|
||||
.append("sceneModeName", getSceneModeName())
|
||||
.append("customFlag", getCustomFlag())
|
||||
.append("tenantId", getTenantId())
|
||||
.append("languageCode", getLanguageCode())
|
||||
.append("remark", getRemark())
|
||||
.append("sceneModeStatus", getSceneModeStatus())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("sceneModeField", getSceneModeField())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,210 @@
|
||||
package com.ruoyi.business.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 租户信息对象 hw_tenant
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
public class HwTenant extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 租户ID */
|
||||
private Long tenantId;
|
||||
|
||||
/** 租户类型 */
|
||||
@Excel(name = "租户类型")
|
||||
private Long tenantType;
|
||||
|
||||
/** 租户名称 */
|
||||
@Excel(name = "租户名称")
|
||||
private String tenantName;
|
||||
|
||||
/** 行业类型 */
|
||||
@Excel(name = "行业类型")
|
||||
private Long tenantIndustry;
|
||||
|
||||
/** 联系人姓名 */
|
||||
@Excel(name = "联系人姓名")
|
||||
private String contactName;
|
||||
|
||||
/** 联系人电话 */
|
||||
@Excel(name = "联系人电话")
|
||||
private String contactPhone;
|
||||
|
||||
/** 邮箱地址 */
|
||||
@Excel(name = "邮箱地址")
|
||||
private String email;
|
||||
|
||||
/** 区域ID */
|
||||
@Excel(name = "区域ID")
|
||||
private Long areaId;
|
||||
|
||||
/** 联系人地址 */
|
||||
@Excel(name = "联系人地址")
|
||||
private String contactAddress;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String tenantStatus;
|
||||
|
||||
/** 是否外部注册 */
|
||||
@Excel(name = "是否外部注册")
|
||||
private String isRegister;
|
||||
|
||||
/** 租户等级 */
|
||||
@Excel(name = "租户等级")
|
||||
private Long tenantGrade;
|
||||
|
||||
/** 预留字段 */
|
||||
@Excel(name = "预留字段")
|
||||
private String tenantField;
|
||||
|
||||
public void setTenantId(Long tenantId)
|
||||
{
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public Long getTenantId()
|
||||
{
|
||||
return tenantId;
|
||||
}
|
||||
public void setTenantType(Long tenantType)
|
||||
{
|
||||
this.tenantType = tenantType;
|
||||
}
|
||||
|
||||
public Long getTenantType()
|
||||
{
|
||||
return tenantType;
|
||||
}
|
||||
public void setTenantName(String tenantName)
|
||||
{
|
||||
this.tenantName = tenantName;
|
||||
}
|
||||
|
||||
public String getTenantName()
|
||||
{
|
||||
return tenantName;
|
||||
}
|
||||
public void setTenantIndustry(Long tenantIndustry)
|
||||
{
|
||||
this.tenantIndustry = tenantIndustry;
|
||||
}
|
||||
|
||||
public Long getTenantIndustry()
|
||||
{
|
||||
return tenantIndustry;
|
||||
}
|
||||
public void setContactName(String contactName)
|
||||
{
|
||||
this.contactName = contactName;
|
||||
}
|
||||
|
||||
public String getContactName()
|
||||
{
|
||||
return contactName;
|
||||
}
|
||||
public void setContactPhone(String contactPhone)
|
||||
{
|
||||
this.contactPhone = contactPhone;
|
||||
}
|
||||
|
||||
public String getContactPhone()
|
||||
{
|
||||
return contactPhone;
|
||||
}
|
||||
public void setEmail(String email)
|
||||
{
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getEmail()
|
||||
{
|
||||
return email;
|
||||
}
|
||||
public void setAreaId(Long areaId)
|
||||
{
|
||||
this.areaId = areaId;
|
||||
}
|
||||
|
||||
public Long getAreaId()
|
||||
{
|
||||
return areaId;
|
||||
}
|
||||
public void setContactAddress(String contactAddress)
|
||||
{
|
||||
this.contactAddress = contactAddress;
|
||||
}
|
||||
|
||||
public String getContactAddress()
|
||||
{
|
||||
return contactAddress;
|
||||
}
|
||||
public void setTenantStatus(String tenantStatus)
|
||||
{
|
||||
this.tenantStatus = tenantStatus;
|
||||
}
|
||||
|
||||
public String getTenantStatus()
|
||||
{
|
||||
return tenantStatus;
|
||||
}
|
||||
public void setIsRegister(String isRegister)
|
||||
{
|
||||
this.isRegister = isRegister;
|
||||
}
|
||||
|
||||
public String getIsRegister()
|
||||
{
|
||||
return isRegister;
|
||||
}
|
||||
public void setTenantGrade(Long tenantGrade)
|
||||
{
|
||||
this.tenantGrade = tenantGrade;
|
||||
}
|
||||
|
||||
public Long getTenantGrade()
|
||||
{
|
||||
return tenantGrade;
|
||||
}
|
||||
public void setTenantField(String tenantField)
|
||||
{
|
||||
this.tenantField = tenantField;
|
||||
}
|
||||
|
||||
public String getTenantField()
|
||||
{
|
||||
return tenantField;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("tenantId", getTenantId())
|
||||
.append("tenantType", getTenantType())
|
||||
.append("tenantName", getTenantName())
|
||||
.append("tenantIndustry", getTenantIndustry())
|
||||
.append("contactName", getContactName())
|
||||
.append("contactPhone", getContactPhone())
|
||||
.append("email", getEmail())
|
||||
.append("areaId", getAreaId())
|
||||
.append("contactAddress", getContactAddress())
|
||||
.append("remark", getRemark())
|
||||
.append("tenantStatus", getTenantStatus())
|
||||
.append("isRegister", getIsRegister())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("tenantGrade", getTenantGrade())
|
||||
.append("tenantField", getTenantField())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.business.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.business.domain.HwElectronicFence;
|
||||
|
||||
/**
|
||||
* 电子围栏Mapper接口
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
public interface HwElectronicFenceMapper
|
||||
{
|
||||
/**
|
||||
* 查询电子围栏
|
||||
*
|
||||
* @param electronicFenceId 电子围栏主键
|
||||
* @return 电子围栏
|
||||
*/
|
||||
public HwElectronicFence selectHwElectronicFenceByElectronicFenceId(Long electronicFenceId);
|
||||
|
||||
/**
|
||||
* 查询电子围栏列表
|
||||
*
|
||||
* @param hwElectronicFence 电子围栏
|
||||
* @return 电子围栏集合
|
||||
*/
|
||||
public List<HwElectronicFence> selectHwElectronicFenceList(HwElectronicFence hwElectronicFence);
|
||||
|
||||
/**
|
||||
* 新增电子围栏
|
||||
*
|
||||
* @param hwElectronicFence 电子围栏
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHwElectronicFence(HwElectronicFence hwElectronicFence);
|
||||
|
||||
/**
|
||||
* 修改电子围栏
|
||||
*
|
||||
* @param hwElectronicFence 电子围栏
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHwElectronicFence(HwElectronicFence hwElectronicFence);
|
||||
|
||||
/**
|
||||
* 删除电子围栏
|
||||
*
|
||||
* @param electronicFenceId 电子围栏主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwElectronicFenceByElectronicFenceId(Long electronicFenceId);
|
||||
|
||||
/**
|
||||
* 批量删除电子围栏
|
||||
*
|
||||
* @param electronicFenceIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwElectronicFenceByElectronicFenceIds(Long[] electronicFenceIds);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.business.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.business.domain.HwFenceTarget;
|
||||
|
||||
/**
|
||||
* 电子围栏目标Mapper接口
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
public interface HwFenceTargetMapper
|
||||
{
|
||||
/**
|
||||
* 查询电子围栏目标
|
||||
*
|
||||
* @param fenceTargetId 电子围栏目标主键
|
||||
* @return 电子围栏目标
|
||||
*/
|
||||
public HwFenceTarget selectHwFenceTargetByFenceTargetId(Long fenceTargetId);
|
||||
|
||||
/**
|
||||
* 查询电子围栏目标列表
|
||||
*
|
||||
* @param hwFenceTarget 电子围栏目标
|
||||
* @return 电子围栏目标集合
|
||||
*/
|
||||
public List<HwFenceTarget> selectHwFenceTargetList(HwFenceTarget hwFenceTarget);
|
||||
|
||||
/**
|
||||
* 新增电子围栏目标
|
||||
*
|
||||
* @param hwFenceTarget 电子围栏目标
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHwFenceTarget(HwFenceTarget hwFenceTarget);
|
||||
|
||||
/**
|
||||
* 修改电子围栏目标
|
||||
*
|
||||
* @param hwFenceTarget 电子围栏目标
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHwFenceTarget(HwFenceTarget hwFenceTarget);
|
||||
|
||||
/**
|
||||
* 删除电子围栏目标
|
||||
*
|
||||
* @param fenceTargetId 电子围栏目标主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwFenceTargetByFenceTargetId(Long fenceTargetId);
|
||||
|
||||
/**
|
||||
* 批量删除电子围栏目标
|
||||
*
|
||||
* @param fenceTargetIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwFenceTargetByFenceTargetIds(Long[] fenceTargetIds);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.business.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.business.domain.HwMonitorUnit;
|
||||
|
||||
/**
|
||||
* 监控单元Mapper接口
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
public interface HwMonitorUnitMapper
|
||||
{
|
||||
/**
|
||||
* 查询监控单元
|
||||
*
|
||||
* @param monitorUnitId 监控单元主键
|
||||
* @return 监控单元
|
||||
*/
|
||||
public HwMonitorUnit selectHwMonitorUnitByMonitorUnitId(Long monitorUnitId);
|
||||
|
||||
/**
|
||||
* 查询监控单元列表
|
||||
*
|
||||
* @param hwMonitorUnit 监控单元
|
||||
* @return 监控单元集合
|
||||
*/
|
||||
public List<HwMonitorUnit> selectHwMonitorUnitList(HwMonitorUnit hwMonitorUnit);
|
||||
|
||||
/**
|
||||
* 新增监控单元
|
||||
*
|
||||
* @param hwMonitorUnit 监控单元
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHwMonitorUnit(HwMonitorUnit hwMonitorUnit);
|
||||
|
||||
/**
|
||||
* 修改监控单元
|
||||
*
|
||||
* @param hwMonitorUnit 监控单元
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHwMonitorUnit(HwMonitorUnit hwMonitorUnit);
|
||||
|
||||
/**
|
||||
* 删除监控单元
|
||||
*
|
||||
* @param monitorUnitId 监控单元主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwMonitorUnitByMonitorUnitId(Long monitorUnitId);
|
||||
|
||||
/**
|
||||
* 批量删除监控单元
|
||||
*
|
||||
* @param monitorUnitIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwMonitorUnitByMonitorUnitIds(Long[] monitorUnitIds);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.business.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.business.domain.HwMonitorUnitType;
|
||||
|
||||
/**
|
||||
* 监控单元类型Mapper接口
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
public interface HwMonitorUnitTypeMapper
|
||||
{
|
||||
/**
|
||||
* 查询监控单元类型
|
||||
*
|
||||
* @param monitorUnitTypeId 监控单元类型主键
|
||||
* @return 监控单元类型
|
||||
*/
|
||||
public HwMonitorUnitType selectHwMonitorUnitTypeByMonitorUnitTypeId(Long monitorUnitTypeId);
|
||||
|
||||
/**
|
||||
* 查询监控单元类型列表
|
||||
*
|
||||
* @param hwMonitorUnitType 监控单元类型
|
||||
* @return 监控单元类型集合
|
||||
*/
|
||||
public List<HwMonitorUnitType> selectHwMonitorUnitTypeList(HwMonitorUnitType hwMonitorUnitType);
|
||||
|
||||
/**
|
||||
* 新增监控单元类型
|
||||
*
|
||||
* @param hwMonitorUnitType 监控单元类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHwMonitorUnitType(HwMonitorUnitType hwMonitorUnitType);
|
||||
|
||||
/**
|
||||
* 修改监控单元类型
|
||||
*
|
||||
* @param hwMonitorUnitType 监控单元类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHwMonitorUnitType(HwMonitorUnitType hwMonitorUnitType);
|
||||
|
||||
/**
|
||||
* 删除监控单元类型
|
||||
*
|
||||
* @param monitorUnitTypeId 监控单元类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwMonitorUnitTypeByMonitorUnitTypeId(Long monitorUnitTypeId);
|
||||
|
||||
/**
|
||||
* 批量删除监控单元类型
|
||||
*
|
||||
* @param monitorUnitTypeIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwMonitorUnitTypeByMonitorUnitTypeIds(Long[] monitorUnitTypeIds);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.business.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.business.domain.HwSceneMode;
|
||||
|
||||
/**
|
||||
* 场景类型Mapper接口
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
public interface HwSceneModeMapper
|
||||
{
|
||||
/**
|
||||
* 查询场景类型
|
||||
*
|
||||
* @param sceneModeId 场景类型主键
|
||||
* @return 场景类型
|
||||
*/
|
||||
public HwSceneMode selectHwSceneModeBySceneModeId(Long sceneModeId);
|
||||
|
||||
/**
|
||||
* 查询场景类型列表
|
||||
*
|
||||
* @param hwSceneMode 场景类型
|
||||
* @return 场景类型集合
|
||||
*/
|
||||
public List<HwSceneMode> selectHwSceneModeList(HwSceneMode hwSceneMode);
|
||||
|
||||
/**
|
||||
* 新增场景类型
|
||||
*
|
||||
* @param hwSceneMode 场景类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHwSceneMode(HwSceneMode hwSceneMode);
|
||||
|
||||
/**
|
||||
* 修改场景类型
|
||||
*
|
||||
* @param hwSceneMode 场景类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHwSceneMode(HwSceneMode hwSceneMode);
|
||||
|
||||
/**
|
||||
* 删除场景类型
|
||||
*
|
||||
* @param sceneModeId 场景类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwSceneModeBySceneModeId(Long sceneModeId);
|
||||
|
||||
/**
|
||||
* 批量删除场景类型
|
||||
*
|
||||
* @param sceneModeIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwSceneModeBySceneModeIds(Long[] sceneModeIds);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.business.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.business.domain.HwTenant;
|
||||
|
||||
/**
|
||||
* 租户信息Mapper接口
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
public interface HwTenantMapper
|
||||
{
|
||||
/**
|
||||
* 查询租户信息
|
||||
*
|
||||
* @param tenantId 租户信息主键
|
||||
* @return 租户信息
|
||||
*/
|
||||
public HwTenant selectHwTenantByTenantId(Long tenantId);
|
||||
|
||||
/**
|
||||
* 查询租户信息列表
|
||||
*
|
||||
* @param hwTenant 租户信息
|
||||
* @return 租户信息集合
|
||||
*/
|
||||
public List<HwTenant> selectHwTenantList(HwTenant hwTenant);
|
||||
|
||||
/**
|
||||
* 新增租户信息
|
||||
*
|
||||
* @param hwTenant 租户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHwTenant(HwTenant hwTenant);
|
||||
|
||||
/**
|
||||
* 修改租户信息
|
||||
*
|
||||
* @param hwTenant 租户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHwTenant(HwTenant hwTenant);
|
||||
|
||||
/**
|
||||
* 删除租户信息
|
||||
*
|
||||
* @param tenantId 租户信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwTenantByTenantId(Long tenantId);
|
||||
|
||||
/**
|
||||
* 批量删除租户信息
|
||||
*
|
||||
* @param tenantIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwTenantByTenantIds(Long[] tenantIds);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.business.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.business.domain.HwElectronicFence;
|
||||
|
||||
/**
|
||||
* 电子围栏Service接口
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
public interface IHwElectronicFenceService
|
||||
{
|
||||
/**
|
||||
* 查询电子围栏
|
||||
*
|
||||
* @param electronicFenceId 电子围栏主键
|
||||
* @return 电子围栏
|
||||
*/
|
||||
public HwElectronicFence selectHwElectronicFenceByElectronicFenceId(Long electronicFenceId);
|
||||
|
||||
/**
|
||||
* 查询电子围栏列表
|
||||
*
|
||||
* @param hwElectronicFence 电子围栏
|
||||
* @return 电子围栏集合
|
||||
*/
|
||||
public List<HwElectronicFence> selectHwElectronicFenceList(HwElectronicFence hwElectronicFence);
|
||||
|
||||
/**
|
||||
* 新增电子围栏
|
||||
*
|
||||
* @param hwElectronicFence 电子围栏
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHwElectronicFence(HwElectronicFence hwElectronicFence);
|
||||
|
||||
/**
|
||||
* 修改电子围栏
|
||||
*
|
||||
* @param hwElectronicFence 电子围栏
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHwElectronicFence(HwElectronicFence hwElectronicFence);
|
||||
|
||||
/**
|
||||
* 批量删除电子围栏
|
||||
*
|
||||
* @param electronicFenceIds 需要删除的电子围栏主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwElectronicFenceByElectronicFenceIds(Long[] electronicFenceIds);
|
||||
|
||||
/**
|
||||
* 删除电子围栏信息
|
||||
*
|
||||
* @param electronicFenceId 电子围栏主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwElectronicFenceByElectronicFenceId(Long electronicFenceId);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.business.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.business.domain.HwFenceTarget;
|
||||
|
||||
/**
|
||||
* 电子围栏目标Service接口
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
public interface IHwFenceTargetService
|
||||
{
|
||||
/**
|
||||
* 查询电子围栏目标
|
||||
*
|
||||
* @param fenceTargetId 电子围栏目标主键
|
||||
* @return 电子围栏目标
|
||||
*/
|
||||
public HwFenceTarget selectHwFenceTargetByFenceTargetId(Long fenceTargetId);
|
||||
|
||||
/**
|
||||
* 查询电子围栏目标列表
|
||||
*
|
||||
* @param hwFenceTarget 电子围栏目标
|
||||
* @return 电子围栏目标集合
|
||||
*/
|
||||
public List<HwFenceTarget> selectHwFenceTargetList(HwFenceTarget hwFenceTarget);
|
||||
|
||||
/**
|
||||
* 新增电子围栏目标
|
||||
*
|
||||
* @param hwFenceTarget 电子围栏目标
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHwFenceTarget(HwFenceTarget hwFenceTarget);
|
||||
|
||||
/**
|
||||
* 修改电子围栏目标
|
||||
*
|
||||
* @param hwFenceTarget 电子围栏目标
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHwFenceTarget(HwFenceTarget hwFenceTarget);
|
||||
|
||||
/**
|
||||
* 批量删除电子围栏目标
|
||||
*
|
||||
* @param fenceTargetIds 需要删除的电子围栏目标主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwFenceTargetByFenceTargetIds(Long[] fenceTargetIds);
|
||||
|
||||
/**
|
||||
* 删除电子围栏目标信息
|
||||
*
|
||||
* @param fenceTargetId 电子围栏目标主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwFenceTargetByFenceTargetId(Long fenceTargetId);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.business.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.business.domain.HwMonitorUnit;
|
||||
|
||||
/**
|
||||
* 监控单元Service接口
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
public interface IHwMonitorUnitService
|
||||
{
|
||||
/**
|
||||
* 查询监控单元
|
||||
*
|
||||
* @param monitorUnitId 监控单元主键
|
||||
* @return 监控单元
|
||||
*/
|
||||
public HwMonitorUnit selectHwMonitorUnitByMonitorUnitId(Long monitorUnitId);
|
||||
|
||||
/**
|
||||
* 查询监控单元列表
|
||||
*
|
||||
* @param hwMonitorUnit 监控单元
|
||||
* @return 监控单元集合
|
||||
*/
|
||||
public List<HwMonitorUnit> selectHwMonitorUnitList(HwMonitorUnit hwMonitorUnit);
|
||||
|
||||
/**
|
||||
* 新增监控单元
|
||||
*
|
||||
* @param hwMonitorUnit 监控单元
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHwMonitorUnit(HwMonitorUnit hwMonitorUnit);
|
||||
|
||||
/**
|
||||
* 修改监控单元
|
||||
*
|
||||
* @param hwMonitorUnit 监控单元
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHwMonitorUnit(HwMonitorUnit hwMonitorUnit);
|
||||
|
||||
/**
|
||||
* 批量删除监控单元
|
||||
*
|
||||
* @param monitorUnitIds 需要删除的监控单元主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwMonitorUnitByMonitorUnitIds(Long[] monitorUnitIds);
|
||||
|
||||
/**
|
||||
* 删除监控单元信息
|
||||
*
|
||||
* @param monitorUnitId 监控单元主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwMonitorUnitByMonitorUnitId(Long monitorUnitId);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.business.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.business.domain.HwMonitorUnitType;
|
||||
|
||||
/**
|
||||
* 监控单元类型Service接口
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
public interface IHwMonitorUnitTypeService
|
||||
{
|
||||
/**
|
||||
* 查询监控单元类型
|
||||
*
|
||||
* @param monitorUnitTypeId 监控单元类型主键
|
||||
* @return 监控单元类型
|
||||
*/
|
||||
public HwMonitorUnitType selectHwMonitorUnitTypeByMonitorUnitTypeId(Long monitorUnitTypeId);
|
||||
|
||||
/**
|
||||
* 查询监控单元类型列表
|
||||
*
|
||||
* @param hwMonitorUnitType 监控单元类型
|
||||
* @return 监控单元类型集合
|
||||
*/
|
||||
public List<HwMonitorUnitType> selectHwMonitorUnitTypeList(HwMonitorUnitType hwMonitorUnitType);
|
||||
|
||||
/**
|
||||
* 新增监控单元类型
|
||||
*
|
||||
* @param hwMonitorUnitType 监控单元类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHwMonitorUnitType(HwMonitorUnitType hwMonitorUnitType);
|
||||
|
||||
/**
|
||||
* 修改监控单元类型
|
||||
*
|
||||
* @param hwMonitorUnitType 监控单元类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHwMonitorUnitType(HwMonitorUnitType hwMonitorUnitType);
|
||||
|
||||
/**
|
||||
* 批量删除监控单元类型
|
||||
*
|
||||
* @param monitorUnitTypeIds 需要删除的监控单元类型主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwMonitorUnitTypeByMonitorUnitTypeIds(Long[] monitorUnitTypeIds);
|
||||
|
||||
/**
|
||||
* 删除监控单元类型信息
|
||||
*
|
||||
* @param monitorUnitTypeId 监控单元类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwMonitorUnitTypeByMonitorUnitTypeId(Long monitorUnitTypeId);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.business.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.business.domain.HwSceneMode;
|
||||
|
||||
/**
|
||||
* 场景类型Service接口
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
public interface IHwSceneModeService
|
||||
{
|
||||
/**
|
||||
* 查询场景类型
|
||||
*
|
||||
* @param sceneModeId 场景类型主键
|
||||
* @return 场景类型
|
||||
*/
|
||||
public HwSceneMode selectHwSceneModeBySceneModeId(Long sceneModeId);
|
||||
|
||||
/**
|
||||
* 查询场景类型列表
|
||||
*
|
||||
* @param hwSceneMode 场景类型
|
||||
* @return 场景类型集合
|
||||
*/
|
||||
public List<HwSceneMode> selectHwSceneModeList(HwSceneMode hwSceneMode);
|
||||
|
||||
/**
|
||||
* 新增场景类型
|
||||
*
|
||||
* @param hwSceneMode 场景类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHwSceneMode(HwSceneMode hwSceneMode);
|
||||
|
||||
/**
|
||||
* 修改场景类型
|
||||
*
|
||||
* @param hwSceneMode 场景类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHwSceneMode(HwSceneMode hwSceneMode);
|
||||
|
||||
/**
|
||||
* 批量删除场景类型
|
||||
*
|
||||
* @param sceneModeIds 需要删除的场景类型主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwSceneModeBySceneModeIds(Long[] sceneModeIds);
|
||||
|
||||
/**
|
||||
* 删除场景类型信息
|
||||
*
|
||||
* @param sceneModeId 场景类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwSceneModeBySceneModeId(Long sceneModeId);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.business.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.business.domain.HwTenant;
|
||||
|
||||
/**
|
||||
* 租户信息Service接口
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
public interface IHwTenantService
|
||||
{
|
||||
/**
|
||||
* 查询租户信息
|
||||
*
|
||||
* @param tenantId 租户信息主键
|
||||
* @return 租户信息
|
||||
*/
|
||||
public HwTenant selectHwTenantByTenantId(Long tenantId);
|
||||
|
||||
/**
|
||||
* 查询租户信息列表
|
||||
*
|
||||
* @param hwTenant 租户信息
|
||||
* @return 租户信息集合
|
||||
*/
|
||||
public List<HwTenant> selectHwTenantList(HwTenant hwTenant);
|
||||
|
||||
/**
|
||||
* 新增租户信息
|
||||
*
|
||||
* @param hwTenant 租户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHwTenant(HwTenant hwTenant);
|
||||
|
||||
/**
|
||||
* 修改租户信息
|
||||
*
|
||||
* @param hwTenant 租户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHwTenant(HwTenant hwTenant);
|
||||
|
||||
/**
|
||||
* 批量删除租户信息
|
||||
*
|
||||
* @param tenantIds 需要删除的租户信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwTenantByTenantIds(Long[] tenantIds);
|
||||
|
||||
/**
|
||||
* 删除租户信息信息
|
||||
*
|
||||
* @param tenantId 租户信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwTenantByTenantId(Long tenantId);
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.business.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.business.mapper.HwElectronicFenceMapper;
|
||||
import com.ruoyi.business.domain.HwElectronicFence;
|
||||
import com.ruoyi.business.service.IHwElectronicFenceService;
|
||||
|
||||
/**
|
||||
* 电子围栏Service业务层处理
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
@Service
|
||||
public class HwElectronicFenceServiceImpl implements IHwElectronicFenceService
|
||||
{
|
||||
@Autowired
|
||||
private HwElectronicFenceMapper hwElectronicFenceMapper;
|
||||
|
||||
/**
|
||||
* 查询电子围栏
|
||||
*
|
||||
* @param electronicFenceId 电子围栏主键
|
||||
* @return 电子围栏
|
||||
*/
|
||||
@Override
|
||||
public HwElectronicFence selectHwElectronicFenceByElectronicFenceId(Long electronicFenceId)
|
||||
{
|
||||
return hwElectronicFenceMapper.selectHwElectronicFenceByElectronicFenceId(electronicFenceId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询电子围栏列表
|
||||
*
|
||||
* @param hwElectronicFence 电子围栏
|
||||
* @return 电子围栏
|
||||
*/
|
||||
@Override
|
||||
public List<HwElectronicFence> selectHwElectronicFenceList(HwElectronicFence hwElectronicFence)
|
||||
{
|
||||
return hwElectronicFenceMapper.selectHwElectronicFenceList(hwElectronicFence);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增电子围栏
|
||||
*
|
||||
* @param hwElectronicFence 电子围栏
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertHwElectronicFence(HwElectronicFence hwElectronicFence)
|
||||
{
|
||||
hwElectronicFence.setCreateTime(DateUtils.getNowDate());
|
||||
return hwElectronicFenceMapper.insertHwElectronicFence(hwElectronicFence);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改电子围栏
|
||||
*
|
||||
* @param hwElectronicFence 电子围栏
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateHwElectronicFence(HwElectronicFence hwElectronicFence)
|
||||
{
|
||||
hwElectronicFence.setUpdateTime(DateUtils.getNowDate());
|
||||
return hwElectronicFenceMapper.updateHwElectronicFence(hwElectronicFence);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除电子围栏
|
||||
*
|
||||
* @param electronicFenceIds 需要删除的电子围栏主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHwElectronicFenceByElectronicFenceIds(Long[] electronicFenceIds)
|
||||
{
|
||||
return hwElectronicFenceMapper.deleteHwElectronicFenceByElectronicFenceIds(electronicFenceIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除电子围栏信息
|
||||
*
|
||||
* @param electronicFenceId 电子围栏主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHwElectronicFenceByElectronicFenceId(Long electronicFenceId)
|
||||
{
|
||||
return hwElectronicFenceMapper.deleteHwElectronicFenceByElectronicFenceId(electronicFenceId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package com.ruoyi.business.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.business.mapper.HwFenceTargetMapper;
|
||||
import com.ruoyi.business.domain.HwFenceTarget;
|
||||
import com.ruoyi.business.service.IHwFenceTargetService;
|
||||
|
||||
/**
|
||||
* 电子围栏目标Service业务层处理
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
@Service
|
||||
public class HwFenceTargetServiceImpl implements IHwFenceTargetService
|
||||
{
|
||||
@Autowired
|
||||
private HwFenceTargetMapper hwFenceTargetMapper;
|
||||
|
||||
/**
|
||||
* 查询电子围栏目标
|
||||
*
|
||||
* @param fenceTargetId 电子围栏目标主键
|
||||
* @return 电子围栏目标
|
||||
*/
|
||||
@Override
|
||||
public HwFenceTarget selectHwFenceTargetByFenceTargetId(Long fenceTargetId)
|
||||
{
|
||||
return hwFenceTargetMapper.selectHwFenceTargetByFenceTargetId(fenceTargetId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询电子围栏目标列表
|
||||
*
|
||||
* @param hwFenceTarget 电子围栏目标
|
||||
* @return 电子围栏目标
|
||||
*/
|
||||
@Override
|
||||
public List<HwFenceTarget> selectHwFenceTargetList(HwFenceTarget hwFenceTarget)
|
||||
{
|
||||
return hwFenceTargetMapper.selectHwFenceTargetList(hwFenceTarget);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增电子围栏目标
|
||||
*
|
||||
* @param hwFenceTarget 电子围栏目标
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertHwFenceTarget(HwFenceTarget hwFenceTarget)
|
||||
{
|
||||
return hwFenceTargetMapper.insertHwFenceTarget(hwFenceTarget);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改电子围栏目标
|
||||
*
|
||||
* @param hwFenceTarget 电子围栏目标
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateHwFenceTarget(HwFenceTarget hwFenceTarget)
|
||||
{
|
||||
return hwFenceTargetMapper.updateHwFenceTarget(hwFenceTarget);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除电子围栏目标
|
||||
*
|
||||
* @param fenceTargetIds 需要删除的电子围栏目标主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHwFenceTargetByFenceTargetIds(Long[] fenceTargetIds)
|
||||
{
|
||||
return hwFenceTargetMapper.deleteHwFenceTargetByFenceTargetIds(fenceTargetIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除电子围栏目标信息
|
||||
*
|
||||
* @param fenceTargetId 电子围栏目标主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHwFenceTargetByFenceTargetId(Long fenceTargetId)
|
||||
{
|
||||
return hwFenceTargetMapper.deleteHwFenceTargetByFenceTargetId(fenceTargetId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.business.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.business.mapper.HwMonitorUnitMapper;
|
||||
import com.ruoyi.business.domain.HwMonitorUnit;
|
||||
import com.ruoyi.business.service.IHwMonitorUnitService;
|
||||
|
||||
/**
|
||||
* 监控单元Service业务层处理
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
@Service
|
||||
public class HwMonitorUnitServiceImpl implements IHwMonitorUnitService
|
||||
{
|
||||
@Autowired
|
||||
private HwMonitorUnitMapper hwMonitorUnitMapper;
|
||||
|
||||
/**
|
||||
* 查询监控单元
|
||||
*
|
||||
* @param monitorUnitId 监控单元主键
|
||||
* @return 监控单元
|
||||
*/
|
||||
@Override
|
||||
public HwMonitorUnit selectHwMonitorUnitByMonitorUnitId(Long monitorUnitId)
|
||||
{
|
||||
return hwMonitorUnitMapper.selectHwMonitorUnitByMonitorUnitId(monitorUnitId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询监控单元列表
|
||||
*
|
||||
* @param hwMonitorUnit 监控单元
|
||||
* @return 监控单元
|
||||
*/
|
||||
@Override
|
||||
public List<HwMonitorUnit> selectHwMonitorUnitList(HwMonitorUnit hwMonitorUnit)
|
||||
{
|
||||
return hwMonitorUnitMapper.selectHwMonitorUnitList(hwMonitorUnit);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增监控单元
|
||||
*
|
||||
* @param hwMonitorUnit 监控单元
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertHwMonitorUnit(HwMonitorUnit hwMonitorUnit)
|
||||
{
|
||||
hwMonitorUnit.setCreateTime(DateUtils.getNowDate());
|
||||
return hwMonitorUnitMapper.insertHwMonitorUnit(hwMonitorUnit);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改监控单元
|
||||
*
|
||||
* @param hwMonitorUnit 监控单元
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateHwMonitorUnit(HwMonitorUnit hwMonitorUnit)
|
||||
{
|
||||
hwMonitorUnit.setUpdateTime(DateUtils.getNowDate());
|
||||
return hwMonitorUnitMapper.updateHwMonitorUnit(hwMonitorUnit);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除监控单元
|
||||
*
|
||||
* @param monitorUnitIds 需要删除的监控单元主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHwMonitorUnitByMonitorUnitIds(Long[] monitorUnitIds)
|
||||
{
|
||||
return hwMonitorUnitMapper.deleteHwMonitorUnitByMonitorUnitIds(monitorUnitIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除监控单元信息
|
||||
*
|
||||
* @param monitorUnitId 监控单元主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHwMonitorUnitByMonitorUnitId(Long monitorUnitId)
|
||||
{
|
||||
return hwMonitorUnitMapper.deleteHwMonitorUnitByMonitorUnitId(monitorUnitId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.business.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.business.mapper.HwMonitorUnitTypeMapper;
|
||||
import com.ruoyi.business.domain.HwMonitorUnitType;
|
||||
import com.ruoyi.business.service.IHwMonitorUnitTypeService;
|
||||
|
||||
/**
|
||||
* 监控单元类型Service业务层处理
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
@Service
|
||||
public class HwMonitorUnitTypeServiceImpl implements IHwMonitorUnitTypeService
|
||||
{
|
||||
@Autowired
|
||||
private HwMonitorUnitTypeMapper hwMonitorUnitTypeMapper;
|
||||
|
||||
/**
|
||||
* 查询监控单元类型
|
||||
*
|
||||
* @param monitorUnitTypeId 监控单元类型主键
|
||||
* @return 监控单元类型
|
||||
*/
|
||||
@Override
|
||||
public HwMonitorUnitType selectHwMonitorUnitTypeByMonitorUnitTypeId(Long monitorUnitTypeId)
|
||||
{
|
||||
return hwMonitorUnitTypeMapper.selectHwMonitorUnitTypeByMonitorUnitTypeId(monitorUnitTypeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询监控单元类型列表
|
||||
*
|
||||
* @param hwMonitorUnitType 监控单元类型
|
||||
* @return 监控单元类型
|
||||
*/
|
||||
@Override
|
||||
public List<HwMonitorUnitType> selectHwMonitorUnitTypeList(HwMonitorUnitType hwMonitorUnitType)
|
||||
{
|
||||
return hwMonitorUnitTypeMapper.selectHwMonitorUnitTypeList(hwMonitorUnitType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增监控单元类型
|
||||
*
|
||||
* @param hwMonitorUnitType 监控单元类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertHwMonitorUnitType(HwMonitorUnitType hwMonitorUnitType)
|
||||
{
|
||||
hwMonitorUnitType.setCreateTime(DateUtils.getNowDate());
|
||||
return hwMonitorUnitTypeMapper.insertHwMonitorUnitType(hwMonitorUnitType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改监控单元类型
|
||||
*
|
||||
* @param hwMonitorUnitType 监控单元类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateHwMonitorUnitType(HwMonitorUnitType hwMonitorUnitType)
|
||||
{
|
||||
hwMonitorUnitType.setUpdateTime(DateUtils.getNowDate());
|
||||
return hwMonitorUnitTypeMapper.updateHwMonitorUnitType(hwMonitorUnitType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除监控单元类型
|
||||
*
|
||||
* @param monitorUnitTypeIds 需要删除的监控单元类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHwMonitorUnitTypeByMonitorUnitTypeIds(Long[] monitorUnitTypeIds)
|
||||
{
|
||||
return hwMonitorUnitTypeMapper.deleteHwMonitorUnitTypeByMonitorUnitTypeIds(monitorUnitTypeIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除监控单元类型信息
|
||||
*
|
||||
* @param monitorUnitTypeId 监控单元类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHwMonitorUnitTypeByMonitorUnitTypeId(Long monitorUnitTypeId)
|
||||
{
|
||||
return hwMonitorUnitTypeMapper.deleteHwMonitorUnitTypeByMonitorUnitTypeId(monitorUnitTypeId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.business.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.business.mapper.HwSceneModeMapper;
|
||||
import com.ruoyi.business.domain.HwSceneMode;
|
||||
import com.ruoyi.business.service.IHwSceneModeService;
|
||||
|
||||
/**
|
||||
* 场景类型Service业务层处理
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
@Service
|
||||
public class HwSceneModeServiceImpl implements IHwSceneModeService
|
||||
{
|
||||
@Autowired
|
||||
private HwSceneModeMapper hwSceneModeMapper;
|
||||
|
||||
/**
|
||||
* 查询场景类型
|
||||
*
|
||||
* @param sceneModeId 场景类型主键
|
||||
* @return 场景类型
|
||||
*/
|
||||
@Override
|
||||
public HwSceneMode selectHwSceneModeBySceneModeId(Long sceneModeId)
|
||||
{
|
||||
return hwSceneModeMapper.selectHwSceneModeBySceneModeId(sceneModeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询场景类型列表
|
||||
*
|
||||
* @param hwSceneMode 场景类型
|
||||
* @return 场景类型
|
||||
*/
|
||||
@Override
|
||||
public List<HwSceneMode> selectHwSceneModeList(HwSceneMode hwSceneMode)
|
||||
{
|
||||
return hwSceneModeMapper.selectHwSceneModeList(hwSceneMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增场景类型
|
||||
*
|
||||
* @param hwSceneMode 场景类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertHwSceneMode(HwSceneMode hwSceneMode)
|
||||
{
|
||||
hwSceneMode.setCreateTime(DateUtils.getNowDate());
|
||||
return hwSceneModeMapper.insertHwSceneMode(hwSceneMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改场景类型
|
||||
*
|
||||
* @param hwSceneMode 场景类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateHwSceneMode(HwSceneMode hwSceneMode)
|
||||
{
|
||||
hwSceneMode.setUpdateTime(DateUtils.getNowDate());
|
||||
return hwSceneModeMapper.updateHwSceneMode(hwSceneMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除场景类型
|
||||
*
|
||||
* @param sceneModeIds 需要删除的场景类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHwSceneModeBySceneModeIds(Long[] sceneModeIds)
|
||||
{
|
||||
return hwSceneModeMapper.deleteHwSceneModeBySceneModeIds(sceneModeIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除场景类型信息
|
||||
*
|
||||
* @param sceneModeId 场景类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHwSceneModeBySceneModeId(Long sceneModeId)
|
||||
{
|
||||
return hwSceneModeMapper.deleteHwSceneModeBySceneModeId(sceneModeId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.business.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.business.mapper.HwTenantMapper;
|
||||
import com.ruoyi.business.domain.HwTenant;
|
||||
import com.ruoyi.business.service.IHwTenantService;
|
||||
|
||||
/**
|
||||
* 租户信息Service业务层处理
|
||||
*
|
||||
* @author YINQ
|
||||
* @date 2023-08-31
|
||||
*/
|
||||
@Service
|
||||
public class HwTenantServiceImpl implements IHwTenantService
|
||||
{
|
||||
@Autowired
|
||||
private HwTenantMapper hwTenantMapper;
|
||||
|
||||
/**
|
||||
* 查询租户信息
|
||||
*
|
||||
* @param tenantId 租户信息主键
|
||||
* @return 租户信息
|
||||
*/
|
||||
@Override
|
||||
public HwTenant selectHwTenantByTenantId(Long tenantId)
|
||||
{
|
||||
return hwTenantMapper.selectHwTenantByTenantId(tenantId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询租户信息列表
|
||||
*
|
||||
* @param hwTenant 租户信息
|
||||
* @return 租户信息
|
||||
*/
|
||||
@Override
|
||||
public List<HwTenant> selectHwTenantList(HwTenant hwTenant)
|
||||
{
|
||||
return hwTenantMapper.selectHwTenantList(hwTenant);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增租户信息
|
||||
*
|
||||
* @param hwTenant 租户信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertHwTenant(HwTenant hwTenant)
|
||||
{
|
||||
hwTenant.setCreateTime(DateUtils.getNowDate());
|
||||
return hwTenantMapper.insertHwTenant(hwTenant);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改租户信息
|
||||
*
|
||||
* @param hwTenant 租户信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateHwTenant(HwTenant hwTenant)
|
||||
{
|
||||
hwTenant.setUpdateTime(DateUtils.getNowDate());
|
||||
return hwTenantMapper.updateHwTenant(hwTenant);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除租户信息
|
||||
*
|
||||
* @param tenantIds 需要删除的租户信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHwTenantByTenantIds(Long[] tenantIds)
|
||||
{
|
||||
return hwTenantMapper.deleteHwTenantByTenantIds(tenantIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除租户信息信息
|
||||
*
|
||||
* @param tenantId 租户信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHwTenantByTenantId(Long tenantId)
|
||||
{
|
||||
return hwTenantMapper.deleteHwTenantByTenantId(tenantId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,136 @@
|
||||
<?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.ruoyi.business.mapper.HwElectronicFenceMapper">
|
||||
|
||||
<resultMap type="HwElectronicFence" id="HwElectronicFenceResult">
|
||||
<result property="electronicFenceId" column="electronic_fence_id" />
|
||||
<result property="electronicFenceName" column="electronic_fence_name" />
|
||||
<result property="sceneId" column="scene_id" />
|
||||
<result property="fenceType" column="fence_type" />
|
||||
<result property="effectiveTimeFlag" column="effective_time_flag" />
|
||||
<result property="effectiveTime" column="effective_time" />
|
||||
<result property="triggerStatus" column="trigger_status" />
|
||||
<result property="areaShapeFlag" column="area_shape_flag" />
|
||||
<result property="polygonAreaRange" column="polygon_area_range" />
|
||||
<result property="circleAreaRange" column="circle_area_range" />
|
||||
<result property="fencePushFlag" column="fence_push_flag" />
|
||||
<result property="fencePushContent" column="fence_push_content" />
|
||||
<result property="fenceRecoverContent" column="fence_recover_content" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="fenceField" column="fence_field" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHwElectronicFenceVo">
|
||||
select electronic_fence_id, electronic_fence_name, scene_id, fence_type, effective_time_flag, effective_time, trigger_status, area_shape_flag, polygon_area_range, circle_area_range, fence_push_flag, fence_push_content, fence_recover_content, remark, create_by, create_time, update_by, update_time, fence_field from hw_electronic_fence
|
||||
</sql>
|
||||
|
||||
<select id="selectHwElectronicFenceList" parameterType="HwElectronicFence" resultMap="HwElectronicFenceResult">
|
||||
<include refid="selectHwElectronicFenceVo"/>
|
||||
<where>
|
||||
<if test="electronicFenceName != null and electronicFenceName != ''"> and electronic_fence_name like concat('%', #{electronicFenceName}, '%')</if>
|
||||
<if test="sceneId != null "> and scene_id = #{sceneId}</if>
|
||||
<if test="fenceType != null "> and fence_type = #{fenceType}</if>
|
||||
<if test="effectiveTimeFlag != null "> and effective_time_flag = #{effectiveTimeFlag}</if>
|
||||
<if test="effectiveTime != null and effectiveTime != ''"> and effective_time = #{effectiveTime}</if>
|
||||
<if test="triggerStatus != null "> and trigger_status = #{triggerStatus}</if>
|
||||
<if test="areaShapeFlag != null "> and area_shape_flag = #{areaShapeFlag}</if>
|
||||
<if test="polygonAreaRange != null and polygonAreaRange != ''"> and polygon_area_range = #{polygonAreaRange}</if>
|
||||
<if test="circleAreaRange != null and circleAreaRange != ''"> and circle_area_range = #{circleAreaRange}</if>
|
||||
<if test="fencePushFlag != null "> and fence_push_flag = #{fencePushFlag}</if>
|
||||
<if test="fencePushContent != null and fencePushContent != ''"> and fence_push_content = #{fencePushContent}</if>
|
||||
<if test="fenceRecoverContent != null and fenceRecoverContent != ''"> and fence_recover_content = #{fenceRecoverContent}</if>
|
||||
<if test="fenceField != null and fenceField != ''"> and fence_field = #{fenceField}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectHwElectronicFenceByElectronicFenceId" parameterType="Long" resultMap="HwElectronicFenceResult">
|
||||
<include refid="selectHwElectronicFenceVo"/>
|
||||
where electronic_fence_id = #{electronicFenceId}
|
||||
</select>
|
||||
|
||||
<insert id="insertHwElectronicFence" parameterType="HwElectronicFence" useGeneratedKeys="true" keyProperty="electronicFenceId">
|
||||
insert into hw_electronic_fence
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="electronicFenceName != null and electronicFenceName != ''">electronic_fence_name,</if>
|
||||
<if test="sceneId != null">scene_id,</if>
|
||||
<if test="fenceType != null">fence_type,</if>
|
||||
<if test="effectiveTimeFlag != null">effective_time_flag,</if>
|
||||
<if test="effectiveTime != null and effectiveTime != ''">effective_time,</if>
|
||||
<if test="triggerStatus != null">trigger_status,</if>
|
||||
<if test="areaShapeFlag != null">area_shape_flag,</if>
|
||||
<if test="polygonAreaRange != null">polygon_area_range,</if>
|
||||
<if test="circleAreaRange != null">circle_area_range,</if>
|
||||
<if test="fencePushFlag != null">fence_push_flag,</if>
|
||||
<if test="fencePushContent != null">fence_push_content,</if>
|
||||
<if test="fenceRecoverContent != null">fence_recover_content,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="fenceField != null">fence_field,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="electronicFenceName != null and electronicFenceName != ''">#{electronicFenceName},</if>
|
||||
<if test="sceneId != null">#{sceneId},</if>
|
||||
<if test="fenceType != null">#{fenceType},</if>
|
||||
<if test="effectiveTimeFlag != null">#{effectiveTimeFlag},</if>
|
||||
<if test="effectiveTime != null and effectiveTime != ''">#{effectiveTime},</if>
|
||||
<if test="triggerStatus != null">#{triggerStatus},</if>
|
||||
<if test="areaShapeFlag != null">#{areaShapeFlag},</if>
|
||||
<if test="polygonAreaRange != null">#{polygonAreaRange},</if>
|
||||
<if test="circleAreaRange != null">#{circleAreaRange},</if>
|
||||
<if test="fencePushFlag != null">#{fencePushFlag},</if>
|
||||
<if test="fencePushContent != null">#{fencePushContent},</if>
|
||||
<if test="fenceRecoverContent != null">#{fenceRecoverContent},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="fenceField != null">#{fenceField},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHwElectronicFence" parameterType="HwElectronicFence">
|
||||
update hw_electronic_fence
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="electronicFenceName != null and electronicFenceName != ''">electronic_fence_name = #{electronicFenceName},</if>
|
||||
<if test="sceneId != null">scene_id = #{sceneId},</if>
|
||||
<if test="fenceType != null">fence_type = #{fenceType},</if>
|
||||
<if test="effectiveTimeFlag != null">effective_time_flag = #{effectiveTimeFlag},</if>
|
||||
<if test="effectiveTime != null and effectiveTime != ''">effective_time = #{effectiveTime},</if>
|
||||
<if test="triggerStatus != null">trigger_status = #{triggerStatus},</if>
|
||||
<if test="areaShapeFlag != null">area_shape_flag = #{areaShapeFlag},</if>
|
||||
<if test="polygonAreaRange != null">polygon_area_range = #{polygonAreaRange},</if>
|
||||
<if test="circleAreaRange != null">circle_area_range = #{circleAreaRange},</if>
|
||||
<if test="fencePushFlag != null">fence_push_flag = #{fencePushFlag},</if>
|
||||
<if test="fencePushContent != null">fence_push_content = #{fencePushContent},</if>
|
||||
<if test="fenceRecoverContent != null">fence_recover_content = #{fenceRecoverContent},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="fenceField != null">fence_field = #{fenceField},</if>
|
||||
</trim>
|
||||
where electronic_fence_id = #{electronicFenceId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHwElectronicFenceByElectronicFenceId" parameterType="Long">
|
||||
delete from hw_electronic_fence where electronic_fence_id = #{electronicFenceId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHwElectronicFenceByElectronicFenceIds" parameterType="String">
|
||||
delete from hw_electronic_fence where electronic_fence_id in
|
||||
<foreach item="electronicFenceId" collection="array" open="(" separator="," close=")">
|
||||
#{electronicFenceId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,71 @@
|
||||
<?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.ruoyi.business.mapper.HwFenceTargetMapper">
|
||||
|
||||
<resultMap type="HwFenceTarget" id="HwFenceTargetResult">
|
||||
<result property="fenceTargetId" column="fence_target_id" />
|
||||
<result property="electronicFenceId" column="electronic_fence_id" />
|
||||
<result property="targetType" column="target_type" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="monitorUnitId" column="monitor_unit_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHwFenceTargetVo">
|
||||
select fence_target_id, electronic_fence_id, target_type, device_id, monitor_unit_id from hw_fence_target
|
||||
</sql>
|
||||
|
||||
<select id="selectHwFenceTargetList" parameterType="HwFenceTarget" resultMap="HwFenceTargetResult">
|
||||
<include refid="selectHwFenceTargetVo"/>
|
||||
<where>
|
||||
<if test="electronicFenceId != null "> and electronic_fence_id = #{electronicFenceId}</if>
|
||||
<if test="targetType != null and targetType != ''"> and target_type = #{targetType}</if>
|
||||
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||
<if test="monitorUnitId != null "> and monitor_unit_id = #{monitorUnitId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectHwFenceTargetByFenceTargetId" parameterType="Long" resultMap="HwFenceTargetResult">
|
||||
<include refid="selectHwFenceTargetVo"/>
|
||||
where fence_target_id = #{fenceTargetId}
|
||||
</select>
|
||||
|
||||
<insert id="insertHwFenceTarget" parameterType="HwFenceTarget" useGeneratedKeys="true" keyProperty="fenceTargetId">
|
||||
insert into hw_fence_target
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="electronicFenceId != null">electronic_fence_id,</if>
|
||||
<if test="targetType != null and targetType != ''">target_type,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="monitorUnitId != null">monitor_unit_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="electronicFenceId != null">#{electronicFenceId},</if>
|
||||
<if test="targetType != null and targetType != ''">#{targetType},</if>
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="monitorUnitId != null">#{monitorUnitId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHwFenceTarget" parameterType="HwFenceTarget">
|
||||
update hw_fence_target
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="electronicFenceId != null">electronic_fence_id = #{electronicFenceId},</if>
|
||||
<if test="targetType != null and targetType != ''">target_type = #{targetType},</if>
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
<if test="monitorUnitId != null">monitor_unit_id = #{monitorUnitId},</if>
|
||||
</trim>
|
||||
where fence_target_id = #{fenceTargetId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHwFenceTargetByFenceTargetId" parameterType="Long">
|
||||
delete from hw_fence_target where fence_target_id = #{fenceTargetId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHwFenceTargetByFenceTargetIds" parameterType="String">
|
||||
delete from hw_fence_target where fence_target_id in
|
||||
<foreach item="fenceTargetId" collection="array" open="(" separator="," close=")">
|
||||
#{fenceTargetId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,121 @@
|
||||
<?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.ruoyi.business.mapper.HwMonitorUnitMapper">
|
||||
|
||||
<resultMap type="HwMonitorUnit" id="HwMonitorUnitResult">
|
||||
<result property="monitorUnitId" column="monitor_unit_id" />
|
||||
<result property="monitorUnitName" column="monitor_unit_name" />
|
||||
<result property="sceneId" column="scene_id" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="monitorUnitTypeId" column="monitor_unit_type_id" />
|
||||
<result property="areaId" column="area_id" />
|
||||
<result property="monitorAddress" column="monitor_address" />
|
||||
<result property="monitorPic" column="monitor_pic" />
|
||||
<result property="preserveTime" column="preserve_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="monitorUnitStatus" column="monitor_unit_status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="monitorUnitField" column="monitor_unit_field" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHwMonitorUnitVo">
|
||||
select monitor_unit_id, monitor_unit_name, scene_id, parent_id, monitor_unit_type_id, area_id, monitor_address, monitor_pic, preserve_time, remark, monitor_unit_status, create_by, create_time, update_by, update_time, monitor_unit_field from hw_monitor_unit
|
||||
</sql>
|
||||
|
||||
<select id="selectHwMonitorUnitList" parameterType="HwMonitorUnit" resultMap="HwMonitorUnitResult">
|
||||
<include refid="selectHwMonitorUnitVo"/>
|
||||
<where>
|
||||
<if test="monitorUnitName != null and monitorUnitName != ''"> and monitor_unit_name like concat('%', #{monitorUnitName}, '%')</if>
|
||||
<if test="sceneId != null "> and scene_id = #{sceneId}</if>
|
||||
<if test="parentId != null "> and parent_id = #{parentId}</if>
|
||||
<if test="monitorUnitTypeId != null "> and monitor_unit_type_id = #{monitorUnitTypeId}</if>
|
||||
<if test="areaId != null "> and area_id = #{areaId}</if>
|
||||
<if test="monitorAddress != null and monitorAddress != ''"> and monitor_address = #{monitorAddress}</if>
|
||||
<if test="monitorPic != null and monitorPic != ''"> and monitor_pic = #{monitorPic}</if>
|
||||
<if test="preserveTime != null "> and preserve_time = #{preserveTime}</if>
|
||||
<if test="monitorUnitStatus != null "> and monitor_unit_status = #{monitorUnitStatus}</if>
|
||||
<if test="monitorUnitField != null and monitorUnitField != ''"> and monitor_unit_field = #{monitorUnitField}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectHwMonitorUnitByMonitorUnitId" parameterType="Long" resultMap="HwMonitorUnitResult">
|
||||
<include refid="selectHwMonitorUnitVo"/>
|
||||
where monitor_unit_id = #{monitorUnitId}
|
||||
</select>
|
||||
|
||||
<insert id="insertHwMonitorUnit" parameterType="HwMonitorUnit" useGeneratedKeys="true" keyProperty="monitorUnitId">
|
||||
insert into hw_monitor_unit
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="monitorUnitName != null and monitorUnitName != ''">monitor_unit_name,</if>
|
||||
<if test="sceneId != null">scene_id,</if>
|
||||
<if test="parentId != null">parent_id,</if>
|
||||
<if test="monitorUnitTypeId != null">monitor_unit_type_id,</if>
|
||||
<if test="areaId != null">area_id,</if>
|
||||
<if test="monitorAddress != null">monitor_address,</if>
|
||||
<if test="monitorPic != null">monitor_pic,</if>
|
||||
<if test="preserveTime != null">preserve_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="monitorUnitStatus != null">monitor_unit_status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="monitorUnitField != null">monitor_unit_field,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="monitorUnitName != null and monitorUnitName != ''">#{monitorUnitName},</if>
|
||||
<if test="sceneId != null">#{sceneId},</if>
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
<if test="monitorUnitTypeId != null">#{monitorUnitTypeId},</if>
|
||||
<if test="areaId != null">#{areaId},</if>
|
||||
<if test="monitorAddress != null">#{monitorAddress},</if>
|
||||
<if test="monitorPic != null">#{monitorPic},</if>
|
||||
<if test="preserveTime != null">#{preserveTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="monitorUnitStatus != null">#{monitorUnitStatus},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="monitorUnitField != null">#{monitorUnitField},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHwMonitorUnit" parameterType="HwMonitorUnit">
|
||||
update hw_monitor_unit
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="monitorUnitName != null and monitorUnitName != ''">monitor_unit_name = #{monitorUnitName},</if>
|
||||
<if test="sceneId != null">scene_id = #{sceneId},</if>
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
<if test="monitorUnitTypeId != null">monitor_unit_type_id = #{monitorUnitTypeId},</if>
|
||||
<if test="areaId != null">area_id = #{areaId},</if>
|
||||
<if test="monitorAddress != null">monitor_address = #{monitorAddress},</if>
|
||||
<if test="monitorPic != null">monitor_pic = #{monitorPic},</if>
|
||||
<if test="preserveTime != null">preserve_time = #{preserveTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="monitorUnitStatus != null">monitor_unit_status = #{monitorUnitStatus},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="monitorUnitField != null">monitor_unit_field = #{monitorUnitField},</if>
|
||||
</trim>
|
||||
where monitor_unit_id = #{monitorUnitId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHwMonitorUnitByMonitorUnitId" parameterType="Long">
|
||||
delete from hw_monitor_unit where monitor_unit_id = #{monitorUnitId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHwMonitorUnitByMonitorUnitIds" parameterType="String">
|
||||
delete from hw_monitor_unit where monitor_unit_id in
|
||||
<foreach item="monitorUnitId" collection="array" open="(" separator="," close=")">
|
||||
#{monitorUnitId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,111 @@
|
||||
<?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.ruoyi.business.mapper.HwMonitorUnitTypeMapper">
|
||||
|
||||
<resultMap type="HwMonitorUnitType" id="HwMonitorUnitTypeResult">
|
||||
<result property="monitorUnitTypeId" column="monitor_unit_type_id" />
|
||||
<result property="monitorUnitTypeName" column="monitor_unit_type_name" />
|
||||
<result property="vitualFlag" column="vitual_flag" />
|
||||
<result property="monitorUnitTypeStatus" column="monitor_unit_type_status" />
|
||||
<result property="languageCode" column="language_code" />
|
||||
<result property="commonFlag" column="common_flag" />
|
||||
<result property="sceneId" column="scene_id" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="unitTypeIcon" column="unit_type_icon" />
|
||||
<result property="unitTypeField" column="unit_type_field" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHwMonitorUnitTypeVo">
|
||||
select monitor_unit_type_id, monitor_unit_type_name, vitual_flag, monitor_unit_type_status, language_code, common_flag, scene_id, remark, create_by, create_time, update_by, update_time, unit_type_icon, unit_type_field from hw_monitor_unit_type
|
||||
</sql>
|
||||
|
||||
<select id="selectHwMonitorUnitTypeList" parameterType="HwMonitorUnitType" resultMap="HwMonitorUnitTypeResult">
|
||||
<include refid="selectHwMonitorUnitTypeVo"/>
|
||||
<where>
|
||||
<if test="monitorUnitTypeName != null and monitorUnitTypeName != ''"> and monitor_unit_type_name like concat('%', #{monitorUnitTypeName}, '%')</if>
|
||||
<if test="vitualFlag != null and vitualFlag != ''"> and vitual_flag = #{vitualFlag}</if>
|
||||
<if test="monitorUnitTypeStatus != null and monitorUnitTypeStatus != ''"> and monitor_unit_type_status = #{monitorUnitTypeStatus}</if>
|
||||
<if test="languageCode != null and languageCode != ''"> and language_code = #{languageCode}</if>
|
||||
<if test="commonFlag != null and commonFlag != ''"> and common_flag = #{commonFlag}</if>
|
||||
<if test="sceneId != null "> and scene_id = #{sceneId}</if>
|
||||
<if test="unitTypeIcon != null and unitTypeIcon != ''"> and unit_type_icon = #{unitTypeIcon}</if>
|
||||
<if test="unitTypeField != null and unitTypeField != ''"> and unit_type_field = #{unitTypeField}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectHwMonitorUnitTypeByMonitorUnitTypeId" parameterType="Long" resultMap="HwMonitorUnitTypeResult">
|
||||
<include refid="selectHwMonitorUnitTypeVo"/>
|
||||
where monitor_unit_type_id = #{monitorUnitTypeId}
|
||||
</select>
|
||||
|
||||
<insert id="insertHwMonitorUnitType" parameterType="HwMonitorUnitType" useGeneratedKeys="true" keyProperty="monitorUnitTypeId">
|
||||
insert into hw_monitor_unit_type
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="monitorUnitTypeName != null and monitorUnitTypeName != ''">monitor_unit_type_name,</if>
|
||||
<if test="vitualFlag != null and vitualFlag != ''">vitual_flag,</if>
|
||||
<if test="monitorUnitTypeStatus != null and monitorUnitTypeStatus != ''">monitor_unit_type_status,</if>
|
||||
<if test="languageCode != null">language_code,</if>
|
||||
<if test="commonFlag != null and commonFlag != ''">common_flag,</if>
|
||||
<if test="sceneId != null">scene_id,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="unitTypeIcon != null">unit_type_icon,</if>
|
||||
<if test="unitTypeField != null">unit_type_field,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="monitorUnitTypeName != null and monitorUnitTypeName != ''">#{monitorUnitTypeName},</if>
|
||||
<if test="vitualFlag != null and vitualFlag != ''">#{vitualFlag},</if>
|
||||
<if test="monitorUnitTypeStatus != null and monitorUnitTypeStatus != ''">#{monitorUnitTypeStatus},</if>
|
||||
<if test="languageCode != null">#{languageCode},</if>
|
||||
<if test="commonFlag != null and commonFlag != ''">#{commonFlag},</if>
|
||||
<if test="sceneId != null">#{sceneId},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="unitTypeIcon != null">#{unitTypeIcon},</if>
|
||||
<if test="unitTypeField != null">#{unitTypeField},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHwMonitorUnitType" parameterType="HwMonitorUnitType">
|
||||
update hw_monitor_unit_type
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="monitorUnitTypeName != null and monitorUnitTypeName != ''">monitor_unit_type_name = #{monitorUnitTypeName},</if>
|
||||
<if test="vitualFlag != null and vitualFlag != ''">vitual_flag = #{vitualFlag},</if>
|
||||
<if test="monitorUnitTypeStatus != null and monitorUnitTypeStatus != ''">monitor_unit_type_status = #{monitorUnitTypeStatus},</if>
|
||||
<if test="languageCode != null">language_code = #{languageCode},</if>
|
||||
<if test="commonFlag != null and commonFlag != ''">common_flag = #{commonFlag},</if>
|
||||
<if test="sceneId != null">scene_id = #{sceneId},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="unitTypeIcon != null">unit_type_icon = #{unitTypeIcon},</if>
|
||||
<if test="unitTypeField != null">unit_type_field = #{unitTypeField},</if>
|
||||
</trim>
|
||||
where monitor_unit_type_id = #{monitorUnitTypeId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHwMonitorUnitTypeByMonitorUnitTypeId" parameterType="Long">
|
||||
delete from hw_monitor_unit_type where monitor_unit_type_id = #{monitorUnitTypeId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHwMonitorUnitTypeByMonitorUnitTypeIds" parameterType="String">
|
||||
delete from hw_monitor_unit_type where monitor_unit_type_id in
|
||||
<foreach item="monitorUnitTypeId" collection="array" open="(" separator="," close=")">
|
||||
#{monitorUnitTypeId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,101 @@
|
||||
<?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.ruoyi.business.mapper.HwSceneModeMapper">
|
||||
|
||||
<resultMap type="HwSceneMode" id="HwSceneModeResult">
|
||||
<result property="sceneModeId" column="scene_mode_id" />
|
||||
<result property="sceneModeName" column="scene_mode_name" />
|
||||
<result property="customFlag" column="custom_flag" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="languageCode" column="language_code" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="sceneModeStatus" column="scene_mode_status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="sceneModeField" column="scene_mode_field" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHwSceneModeVo">
|
||||
select scene_mode_id, scene_mode_name, custom_flag, tenant_id, language_code, remark, scene_mode_status, create_by, create_time, update_by, update_time, scene_mode_field from hw_scene_mode
|
||||
</sql>
|
||||
|
||||
<select id="selectHwSceneModeList" parameterType="HwSceneMode" resultMap="HwSceneModeResult">
|
||||
<include refid="selectHwSceneModeVo"/>
|
||||
<where>
|
||||
<if test="sceneModeName != null and sceneModeName != ''"> and scene_mode_name like concat('%', #{sceneModeName}, '%')</if>
|
||||
<if test="customFlag != null "> and custom_flag = #{customFlag}</if>
|
||||
<if test="tenantId != null "> and tenant_id = #{tenantId}</if>
|
||||
<if test="languageCode != null and languageCode != ''"> and language_code = #{languageCode}</if>
|
||||
<if test="sceneModeStatus != null "> and scene_mode_status = #{sceneModeStatus}</if>
|
||||
<if test="sceneModeField != null and sceneModeField != ''"> and scene_mode_field = #{sceneModeField}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectHwSceneModeBySceneModeId" parameterType="Long" resultMap="HwSceneModeResult">
|
||||
<include refid="selectHwSceneModeVo"/>
|
||||
where scene_mode_id = #{sceneModeId}
|
||||
</select>
|
||||
|
||||
<insert id="insertHwSceneMode" parameterType="HwSceneMode" useGeneratedKeys="true" keyProperty="sceneModeId">
|
||||
insert into hw_scene_mode
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="sceneModeName != null and sceneModeName != ''">scene_mode_name,</if>
|
||||
<if test="customFlag != null">custom_flag,</if>
|
||||
<if test="tenantId != null">tenant_id,</if>
|
||||
<if test="languageCode != null and languageCode != ''">language_code,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="sceneModeStatus != null">scene_mode_status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="sceneModeField != null">scene_mode_field,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sceneModeName != null and sceneModeName != ''">#{sceneModeName},</if>
|
||||
<if test="customFlag != null">#{customFlag},</if>
|
||||
<if test="tenantId != null">#{tenantId},</if>
|
||||
<if test="languageCode != null and languageCode != ''">#{languageCode},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="sceneModeStatus != null">#{sceneModeStatus},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="sceneModeField != null">#{sceneModeField},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHwSceneMode" parameterType="HwSceneMode">
|
||||
update hw_scene_mode
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sceneModeName != null and sceneModeName != ''">scene_mode_name = #{sceneModeName},</if>
|
||||
<if test="customFlag != null">custom_flag = #{customFlag},</if>
|
||||
<if test="tenantId != null">tenant_id = #{tenantId},</if>
|
||||
<if test="languageCode != null and languageCode != ''">language_code = #{languageCode},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="sceneModeStatus != null">scene_mode_status = #{sceneModeStatus},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="sceneModeField != null">scene_mode_field = #{sceneModeField},</if>
|
||||
</trim>
|
||||
where scene_mode_id = #{sceneModeId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHwSceneModeBySceneModeId" parameterType="Long">
|
||||
delete from hw_scene_mode where scene_mode_id = #{sceneModeId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHwSceneModeBySceneModeIds" parameterType="String">
|
||||
delete from hw_scene_mode where scene_mode_id in
|
||||
<foreach item="sceneModeId" collection="array" open="(" separator="," close=")">
|
||||
#{sceneModeId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,131 @@
|
||||
<?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.ruoyi.business.mapper.HwTenantMapper">
|
||||
|
||||
<resultMap type="HwTenant" id="HwTenantResult">
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="tenantType" column="tenant_type" />
|
||||
<result property="tenantName" column="tenant_name" />
|
||||
<result property="tenantIndustry" column="tenant_industry" />
|
||||
<result property="contactName" column="contact_name" />
|
||||
<result property="contactPhone" column="contact_phone" />
|
||||
<result property="email" column="email" />
|
||||
<result property="areaId" column="area_id" />
|
||||
<result property="contactAddress" column="contact_address" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="tenantStatus" column="tenant_status" />
|
||||
<result property="isRegister" column="is_register" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="tenantGrade" column="tenant_grade" />
|
||||
<result property="tenantField" column="tenant_field" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHwTenantVo">
|
||||
select tenant_id, tenant_type, tenant_name, tenant_industry, contact_name, contact_phone, email, area_id, contact_address, remark, tenant_status, is_register, create_by, create_time, update_by, update_time, tenant_grade, tenant_field from hw_tenant
|
||||
</sql>
|
||||
|
||||
<select id="selectHwTenantList" parameterType="HwTenant" resultMap="HwTenantResult">
|
||||
<include refid="selectHwTenantVo"/>
|
||||
<where>
|
||||
<if test="tenantType != null "> and tenant_type = #{tenantType}</if>
|
||||
<if test="tenantName != null and tenantName != ''"> and tenant_name like concat('%', #{tenantName}, '%')</if>
|
||||
<if test="tenantIndustry != null "> and tenant_industry = #{tenantIndustry}</if>
|
||||
<if test="contactName != null and contactName != ''"> and contact_name like concat('%', #{contactName}, '%')</if>
|
||||
<if test="contactPhone != null and contactPhone != ''"> and contact_phone = #{contactPhone}</if>
|
||||
<if test="email != null and email != ''"> and email = #{email}</if>
|
||||
<if test="areaId != null "> and area_id = #{areaId}</if>
|
||||
<if test="contactAddress != null and contactAddress != ''"> and contact_address = #{contactAddress}</if>
|
||||
<if test="tenantStatus != null and tenantStatus != ''"> and tenant_status = #{tenantStatus}</if>
|
||||
<if test="isRegister != null and isRegister != ''"> and is_register = #{isRegister}</if>
|
||||
<if test="tenantGrade != null "> and tenant_grade = #{tenantGrade}</if>
|
||||
<if test="tenantField != null and tenantField != ''"> and tenant_field = #{tenantField}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectHwTenantByTenantId" parameterType="Long" resultMap="HwTenantResult">
|
||||
<include refid="selectHwTenantVo"/>
|
||||
where tenant_id = #{tenantId}
|
||||
</select>
|
||||
|
||||
<insert id="insertHwTenant" parameterType="HwTenant" useGeneratedKeys="true" keyProperty="tenantId">
|
||||
insert into hw_tenant
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="tenantType != null">tenant_type,</if>
|
||||
<if test="tenantName != null and tenantName != ''">tenant_name,</if>
|
||||
<if test="tenantIndustry != null">tenant_industry,</if>
|
||||
<if test="contactName != null and contactName != ''">contact_name,</if>
|
||||
<if test="contactPhone != null and contactPhone != ''">contact_phone,</if>
|
||||
<if test="email != null">email,</if>
|
||||
<if test="areaId != null">area_id,</if>
|
||||
<if test="contactAddress != null">contact_address,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="tenantStatus != null and tenantStatus != ''">tenant_status,</if>
|
||||
<if test="isRegister != null and isRegister != ''">is_register,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="tenantGrade != null">tenant_grade,</if>
|
||||
<if test="tenantField != null">tenant_field,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="tenantType != null">#{tenantType},</if>
|
||||
<if test="tenantName != null and tenantName != ''">#{tenantName},</if>
|
||||
<if test="tenantIndustry != null">#{tenantIndustry},</if>
|
||||
<if test="contactName != null and contactName != ''">#{contactName},</if>
|
||||
<if test="contactPhone != null and contactPhone != ''">#{contactPhone},</if>
|
||||
<if test="email != null">#{email},</if>
|
||||
<if test="areaId != null">#{areaId},</if>
|
||||
<if test="contactAddress != null">#{contactAddress},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="tenantStatus != null and tenantStatus != ''">#{tenantStatus},</if>
|
||||
<if test="isRegister != null and isRegister != ''">#{isRegister},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="tenantGrade != null">#{tenantGrade},</if>
|
||||
<if test="tenantField != null">#{tenantField},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHwTenant" parameterType="HwTenant">
|
||||
update hw_tenant
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="tenantType != null">tenant_type = #{tenantType},</if>
|
||||
<if test="tenantName != null and tenantName != ''">tenant_name = #{tenantName},</if>
|
||||
<if test="tenantIndustry != null">tenant_industry = #{tenantIndustry},</if>
|
||||
<if test="contactName != null and contactName != ''">contact_name = #{contactName},</if>
|
||||
<if test="contactPhone != null and contactPhone != ''">contact_phone = #{contactPhone},</if>
|
||||
<if test="email != null">email = #{email},</if>
|
||||
<if test="areaId != null">area_id = #{areaId},</if>
|
||||
<if test="contactAddress != null">contact_address = #{contactAddress},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="tenantStatus != null and tenantStatus != ''">tenant_status = #{tenantStatus},</if>
|
||||
<if test="isRegister != null and isRegister != ''">is_register = #{isRegister},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="tenantGrade != null">tenant_grade = #{tenantGrade},</if>
|
||||
<if test="tenantField != null">tenant_field = #{tenantField},</if>
|
||||
</trim>
|
||||
where tenant_id = #{tenantId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHwTenantByTenantId" parameterType="Long">
|
||||
delete from hw_tenant where tenant_id = #{tenantId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHwTenantByTenantIds" parameterType="String">
|
||||
delete from hw_tenant where tenant_id in
|
||||
<foreach item="tenantId" collection="array" open="(" separator="," close=")">
|
||||
#{tenantId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询电子围栏列表
|
||||
export function listEffectiveFence(query) {
|
||||
return request({
|
||||
url: '/business/effectiveFence/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询电子围栏详细
|
||||
export function getEffectiveFence(electronicFenceId) {
|
||||
return request({
|
||||
url: '/business/effectiveFence/' + electronicFenceId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增电子围栏
|
||||
export function addEffectiveFence(data) {
|
||||
return request({
|
||||
url: '/business/effectiveFence',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改电子围栏
|
||||
export function updateEffectiveFence(data) {
|
||||
return request({
|
||||
url: '/business/effectiveFence',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除电子围栏
|
||||
export function delEffectiveFence(electronicFenceId) {
|
||||
return request({
|
||||
url: '/business/effectiveFence/' + electronicFenceId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询电子围栏目标列表
|
||||
export function listFenceTarget(query) {
|
||||
return request({
|
||||
url: '/business/fenceTarget/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询电子围栏目标详细
|
||||
export function getFenceTarget(fenceTargetId) {
|
||||
return request({
|
||||
url: '/business/fenceTarget/' + fenceTargetId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增电子围栏目标
|
||||
export function addFenceTarget(data) {
|
||||
return request({
|
||||
url: '/business/fenceTarget',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改电子围栏目标
|
||||
export function updateFenceTarget(data) {
|
||||
return request({
|
||||
url: '/business/fenceTarget',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除电子围栏目标
|
||||
export function delFenceTarget(fenceTargetId) {
|
||||
return request({
|
||||
url: '/business/fenceTarget/' + fenceTargetId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询监控单元列表
|
||||
export function listMonitorUnit(query) {
|
||||
return request({
|
||||
url: '/business/monitorUnit/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询监控单元详细
|
||||
export function getMonitorUnit(monitorUnitId) {
|
||||
return request({
|
||||
url: '/business/monitorUnit/' + monitorUnitId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增监控单元
|
||||
export function addMonitorUnit(data) {
|
||||
return request({
|
||||
url: '/business/monitorUnit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改监控单元
|
||||
export function updateMonitorUnit(data) {
|
||||
return request({
|
||||
url: '/business/monitorUnit',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除监控单元
|
||||
export function delMonitorUnit(monitorUnitId) {
|
||||
return request({
|
||||
url: '/business/monitorUnit/' + monitorUnitId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询监控单元类型列表
|
||||
export function listMonitorUnitType(query) {
|
||||
return request({
|
||||
url: '/business/monitorUnitType/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询监控单元类型详细
|
||||
export function getMonitorUnitType(monitorUnitTypeId) {
|
||||
return request({
|
||||
url: '/business/monitorUnitType/' + monitorUnitTypeId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增监控单元类型
|
||||
export function addMonitorUnitType(data) {
|
||||
return request({
|
||||
url: '/business/monitorUnitType',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改监控单元类型
|
||||
export function updateMonitorUnitType(data) {
|
||||
return request({
|
||||
url: '/business/monitorUnitType',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除监控单元类型
|
||||
export function delMonitorUnitType(monitorUnitTypeId) {
|
||||
return request({
|
||||
url: '/business/monitorUnitType/' + monitorUnitTypeId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询场景类型列表
|
||||
export function listSceneMode(query) {
|
||||
return request({
|
||||
url: '/business/sceneMode/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询场景类型详细
|
||||
export function getSceneMode(sceneModeId) {
|
||||
return request({
|
||||
url: '/business/sceneMode/' + sceneModeId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增场景类型
|
||||
export function addSceneMode(data) {
|
||||
return request({
|
||||
url: '/business/sceneMode',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改场景类型
|
||||
export function updateSceneMode(data) {
|
||||
return request({
|
||||
url: '/business/sceneMode',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除场景类型
|
||||
export function delSceneMode(sceneModeId) {
|
||||
return request({
|
||||
url: '/business/sceneMode/' + sceneModeId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询租户信息列表
|
||||
export function listTenant(query) {
|
||||
return request({
|
||||
url: '/business/tenant/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询租户信息详细
|
||||
export function getTenant(tenantId) {
|
||||
return request({
|
||||
url: '/business/tenant/' + tenantId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增租户信息
|
||||
export function addTenant(data) {
|
||||
return request({
|
||||
url: '/business/tenant',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改租户信息
|
||||
export function updateTenant(data) {
|
||||
return request({
|
||||
url: '/business/tenant',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除租户信息
|
||||
export function delTenant(tenantId) {
|
||||
return request({
|
||||
url: '/business/tenant/' + tenantId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,381 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="监控单元名称" prop="monitorUnitName">
|
||||
<el-input
|
||||
v-model="queryParams.monitorUnitName"
|
||||
placeholder="请输入监控单元名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属场景" prop="sceneId">
|
||||
<el-input
|
||||
v-model="queryParams.sceneId"
|
||||
placeholder="请输入所属场景"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="父级监控单元ID" prop="parentId">
|
||||
<el-input
|
||||
v-model="queryParams.parentId"
|
||||
placeholder="请输入父级监控单元ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="监控单元类型ID" prop="monitorUnitTypeId">
|
||||
<el-input
|
||||
v-model="queryParams.monitorUnitTypeId"
|
||||
placeholder="请输入监控单元类型ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域ID" prop="areaId">
|
||||
<el-input
|
||||
v-model="queryParams.areaId"
|
||||
placeholder="请输入区域ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="详细地址" prop="monitorAddress">
|
||||
<el-input
|
||||
v-model="queryParams.monitorAddress"
|
||||
placeholder="请输入详细地址"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="监控单元图片地址" prop="monitorPic">
|
||||
<el-input
|
||||
v-model="queryParams.monitorPic"
|
||||
placeholder="请输入监控单元图片地址"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="保存周期" prop="preserveTime">
|
||||
<el-input
|
||||
v-model="queryParams.preserveTime"
|
||||
placeholder="请输入保存周期"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段" prop="monitorUnitField">
|
||||
<el-input
|
||||
v-model="queryParams.monitorUnitField"
|
||||
placeholder="请输入预留字段"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['business:monitorUnit:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['business:monitorUnit:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['business:monitorUnit:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['business:monitorUnit:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="monitorUnitList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="监控单元ID" align="center" prop="monitorUnitId" />
|
||||
<el-table-column label="监控单元名称" align="center" prop="monitorUnitName" />
|
||||
<el-table-column label="所属场景" align="center" prop="sceneId" />
|
||||
<el-table-column label="父级监控单元ID" align="center" prop="parentId" />
|
||||
<el-table-column label="监控单元类型ID" align="center" prop="monitorUnitTypeId" />
|
||||
<el-table-column label="区域ID" align="center" prop="areaId" />
|
||||
<el-table-column label="详细地址" align="center" prop="monitorAddress" />
|
||||
<el-table-column label="监控单元图片地址" align="center" prop="monitorPic" />
|
||||
<el-table-column label="保存周期" align="center" prop="preserveTime" />
|
||||
<el-table-column label="场景描述" align="center" prop="remark" />
|
||||
<el-table-column label="状态" align="center" prop="monitorUnitStatus" />
|
||||
<el-table-column label="预留字段" align="center" prop="monitorUnitField" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['business:monitorUnit:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['business:monitorUnit:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改监控单元对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="监控单元名称" prop="monitorUnitName">
|
||||
<el-input v-model="form.monitorUnitName" placeholder="请输入监控单元名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属场景" prop="sceneId">
|
||||
<el-input v-model="form.sceneId" placeholder="请输入所属场景" />
|
||||
</el-form-item>
|
||||
<el-form-item label="父级监控单元ID" prop="parentId">
|
||||
<el-input v-model="form.parentId" placeholder="请输入父级监控单元ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监控单元类型ID" prop="monitorUnitTypeId">
|
||||
<el-input v-model="form.monitorUnitTypeId" placeholder="请输入监控单元类型ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="区域ID" prop="areaId">
|
||||
<el-input v-model="form.areaId" placeholder="请输入区域ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="详细地址" prop="monitorAddress">
|
||||
<el-input v-model="form.monitorAddress" placeholder="请输入详细地址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监控单元图片地址" prop="monitorPic">
|
||||
<el-input v-model="form.monitorPic" placeholder="请输入监控单元图片地址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="保存周期" prop="preserveTime">
|
||||
<el-input v-model="form.preserveTime" placeholder="请输入保存周期" />
|
||||
</el-form-item>
|
||||
<el-form-item label="场景描述" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段" prop="monitorUnitField">
|
||||
<el-input v-model="form.monitorUnitField" placeholder="请输入预留字段" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listMonitorUnit, getMonitorUnit, delMonitorUnit, addMonitorUnit, updateMonitorUnit } from "@/api/business/monitorUnit";
|
||||
|
||||
export default {
|
||||
name: "MonitorUnit",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 监控单元表格数据
|
||||
monitorUnitList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
monitorUnitName: null,
|
||||
sceneId: null,
|
||||
parentId: null,
|
||||
monitorUnitTypeId: null,
|
||||
areaId: null,
|
||||
monitorAddress: null,
|
||||
monitorPic: null,
|
||||
preserveTime: null,
|
||||
monitorUnitStatus: null,
|
||||
monitorUnitField: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
monitorUnitName: [
|
||||
{ required: true, message: "监控单元名称不能为空", trigger: "blur" }
|
||||
],
|
||||
sceneId: [
|
||||
{ required: true, message: "所属场景不能为空", trigger: "blur" }
|
||||
],
|
||||
monitorUnitTypeId: [
|
||||
{ required: true, message: "监控单元类型ID不能为空", trigger: "blur" }
|
||||
],
|
||||
monitorUnitStatus: [
|
||||
{ required: true, message: "状态不能为空", trigger: "change" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询监控单元列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listMonitorUnit(this.queryParams).then(response => {
|
||||
this.monitorUnitList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
monitorUnitId: null,
|
||||
monitorUnitName: null,
|
||||
sceneId: null,
|
||||
parentId: null,
|
||||
monitorUnitTypeId: null,
|
||||
areaId: null,
|
||||
monitorAddress: null,
|
||||
monitorPic: null,
|
||||
preserveTime: null,
|
||||
remark: null,
|
||||
monitorUnitStatus: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
monitorUnitField: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.monitorUnitId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加监控单元";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const monitorUnitId = row.monitorUnitId || this.ids
|
||||
getMonitorUnit(monitorUnitId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改监控单元";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.monitorUnitId != null) {
|
||||
updateMonitorUnit(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addMonitorUnit(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const monitorUnitIds = row.monitorUnitId || this.ids;
|
||||
this.$modal.confirm('是否确认删除监控单元编号为"' + monitorUnitIds + '"的数据项?').then(function() {
|
||||
return delMonitorUnit(monitorUnitIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('business/monitorUnit/export', {
|
||||
...this.queryParams
|
||||
}, `monitorUnit_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -0,0 +1,356 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="监控单元类型名称" prop="monitorUnitTypeName">
|
||||
<el-input
|
||||
v-model="queryParams.monitorUnitTypeName"
|
||||
placeholder="请输入监控单元类型名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="虚拟标识" prop="vitualFlag">
|
||||
<el-input
|
||||
v-model="queryParams.vitualFlag"
|
||||
placeholder="请输入虚拟标识"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="语言code" prop="languageCode">
|
||||
<el-input
|
||||
v-model="queryParams.languageCode"
|
||||
placeholder="请输入语言code"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="通用标识" prop="commonFlag">
|
||||
<el-input
|
||||
v-model="queryParams.commonFlag"
|
||||
placeholder="请输入通用标识"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属场景" prop="sceneId">
|
||||
<el-input
|
||||
v-model="queryParams.sceneId"
|
||||
placeholder="请输入所属场景"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="监控单元类型图标" prop="unitTypeIcon">
|
||||
<el-input
|
||||
v-model="queryParams.unitTypeIcon"
|
||||
placeholder="请输入监控单元类型图标"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段" prop="unitTypeField">
|
||||
<el-input
|
||||
v-model="queryParams.unitTypeField"
|
||||
placeholder="请输入预留字段"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['business:monitorUnitType:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['business:monitorUnitType:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['business:monitorUnitType:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['business:monitorUnitType:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="monitorUnitTypeList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="监控单元类型ID" align="center" prop="monitorUnitTypeId" />
|
||||
<el-table-column label="监控单元类型名称" align="center" prop="monitorUnitTypeName" />
|
||||
<el-table-column label="虚拟标识" align="center" prop="vitualFlag" />
|
||||
<el-table-column label="状态" align="center" prop="monitorUnitTypeStatus" />
|
||||
<el-table-column label="语言code" align="center" prop="languageCode" />
|
||||
<el-table-column label="通用标识" align="center" prop="commonFlag" />
|
||||
<el-table-column label="所属场景" align="center" prop="sceneId" />
|
||||
<el-table-column label="类型描述" align="center" prop="remark" />
|
||||
<el-table-column label="监控单元类型图标" align="center" prop="unitTypeIcon" />
|
||||
<el-table-column label="预留字段" align="center" prop="unitTypeField" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['business:monitorUnitType:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['business:monitorUnitType:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改监控单元类型对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="监控单元类型名称" prop="monitorUnitTypeName">
|
||||
<el-input v-model="form.monitorUnitTypeName" placeholder="请输入监控单元类型名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="虚拟标识" prop="vitualFlag">
|
||||
<el-input v-model="form.vitualFlag" placeholder="请输入虚拟标识" />
|
||||
</el-form-item>
|
||||
<el-form-item label="语言code" prop="languageCode">
|
||||
<el-input v-model="form.languageCode" placeholder="请输入语言code" />
|
||||
</el-form-item>
|
||||
<el-form-item label="通用标识" prop="commonFlag">
|
||||
<el-input v-model="form.commonFlag" placeholder="请输入通用标识" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属场景" prop="sceneId">
|
||||
<el-input v-model="form.sceneId" placeholder="请输入所属场景" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型描述" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监控单元类型图标" prop="unitTypeIcon">
|
||||
<el-input v-model="form.unitTypeIcon" placeholder="请输入监控单元类型图标" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段" prop="unitTypeField">
|
||||
<el-input v-model="form.unitTypeField" placeholder="请输入预留字段" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listMonitorUnitType, getMonitorUnitType, delMonitorUnitType, addMonitorUnitType, updateMonitorUnitType } from "@/api/business/monitorUnitType";
|
||||
|
||||
export default {
|
||||
name: "MonitorUnitType",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 监控单元类型表格数据
|
||||
monitorUnitTypeList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
monitorUnitTypeName: null,
|
||||
vitualFlag: null,
|
||||
monitorUnitTypeStatus: null,
|
||||
languageCode: null,
|
||||
commonFlag: null,
|
||||
sceneId: null,
|
||||
unitTypeIcon: null,
|
||||
unitTypeField: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
monitorUnitTypeName: [
|
||||
{ required: true, message: "监控单元类型名称不能为空", trigger: "blur" }
|
||||
],
|
||||
vitualFlag: [
|
||||
{ required: true, message: "虚拟标识不能为空", trigger: "blur" }
|
||||
],
|
||||
monitorUnitTypeStatus: [
|
||||
{ required: true, message: "状态不能为空", trigger: "change" }
|
||||
],
|
||||
commonFlag: [
|
||||
{ required: true, message: "通用标识不能为空", trigger: "blur" }
|
||||
],
|
||||
sceneId: [
|
||||
{ required: true, message: "所属场景不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询监控单元类型列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listMonitorUnitType(this.queryParams).then(response => {
|
||||
this.monitorUnitTypeList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
monitorUnitTypeId: null,
|
||||
monitorUnitTypeName: null,
|
||||
vitualFlag: null,
|
||||
monitorUnitTypeStatus: null,
|
||||
languageCode: null,
|
||||
commonFlag: null,
|
||||
sceneId: null,
|
||||
remark: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
unitTypeIcon: null,
|
||||
unitTypeField: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.monitorUnitTypeId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加监控单元类型";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const monitorUnitTypeId = row.monitorUnitTypeId || this.ids
|
||||
getMonitorUnitType(monitorUnitTypeId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改监控单元类型";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.monitorUnitTypeId != null) {
|
||||
updateMonitorUnitType(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addMonitorUnitType(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const monitorUnitTypeIds = row.monitorUnitTypeId || this.ids;
|
||||
this.$modal.confirm('是否确认删除监控单元类型编号为"' + monitorUnitTypeIds + '"的数据项?').then(function() {
|
||||
return delMonitorUnitType(monitorUnitTypeIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('business/monitorUnitType/export', {
|
||||
...this.queryParams
|
||||
}, `monitorUnitType_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -0,0 +1,325 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="类型名称" prop="sceneModeName">
|
||||
<el-input
|
||||
v-model="queryParams.sceneModeName"
|
||||
placeholder="请输入类型名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="自定义标识" prop="customFlag">
|
||||
<el-input
|
||||
v-model="queryParams.customFlag"
|
||||
placeholder="请输入自定义标识"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="租户ID" prop="tenantId">
|
||||
<el-input
|
||||
v-model="queryParams.tenantId"
|
||||
placeholder="请输入租户ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="语言code" prop="languageCode">
|
||||
<el-input
|
||||
v-model="queryParams.languageCode"
|
||||
placeholder="请输入语言code"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段" prop="sceneModeField">
|
||||
<el-input
|
||||
v-model="queryParams.sceneModeField"
|
||||
placeholder="请输入预留字段"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['business:sceneMode:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['business:sceneMode:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['business:sceneMode:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['business:sceneMode:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="sceneModeList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="类型ID" align="center" prop="sceneModeId" />
|
||||
<el-table-column label="类型名称" align="center" prop="sceneModeName" />
|
||||
<el-table-column label="自定义标识" align="center" prop="customFlag" />
|
||||
<el-table-column label="租户ID" align="center" prop="tenantId" />
|
||||
<el-table-column label="语言code" align="center" prop="languageCode" />
|
||||
<el-table-column label="类型描述" align="center" prop="remark" />
|
||||
<el-table-column label="状态" align="center" prop="sceneModeStatus" />
|
||||
<el-table-column label="预留字段" align="center" prop="sceneModeField" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['business:sceneMode:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['business:sceneMode:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改场景类型对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="类型名称" prop="sceneModeName">
|
||||
<el-input v-model="form.sceneModeName" placeholder="请输入类型名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="自定义标识" prop="customFlag">
|
||||
<el-input v-model="form.customFlag" placeholder="请输入自定义标识" />
|
||||
</el-form-item>
|
||||
<el-form-item label="租户ID" prop="tenantId">
|
||||
<el-input v-model="form.tenantId" placeholder="请输入租户ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="语言code" prop="languageCode">
|
||||
<el-input v-model="form.languageCode" placeholder="请输入语言code" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型描述" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段" prop="sceneModeField">
|
||||
<el-input v-model="form.sceneModeField" placeholder="请输入预留字段" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listSceneMode, getSceneMode, delSceneMode, addSceneMode, updateSceneMode } from "@/api/business/sceneMode";
|
||||
|
||||
export default {
|
||||
name: "SceneMode",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 场景类型表格数据
|
||||
sceneModeList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sceneModeName: null,
|
||||
customFlag: null,
|
||||
tenantId: null,
|
||||
languageCode: null,
|
||||
sceneModeStatus: null,
|
||||
sceneModeField: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
sceneModeName: [
|
||||
{ required: true, message: "类型名称不能为空", trigger: "blur" }
|
||||
],
|
||||
customFlag: [
|
||||
{ required: true, message: "自定义标识不能为空", trigger: "blur" }
|
||||
],
|
||||
languageCode: [
|
||||
{ required: true, message: "语言code不能为空", trigger: "blur" }
|
||||
],
|
||||
sceneModeStatus: [
|
||||
{ required: true, message: "状态不能为空", trigger: "change" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询场景类型列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listSceneMode(this.queryParams).then(response => {
|
||||
this.sceneModeList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
sceneModeId: null,
|
||||
sceneModeName: null,
|
||||
customFlag: null,
|
||||
tenantId: null,
|
||||
languageCode: null,
|
||||
remark: null,
|
||||
sceneModeStatus: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
sceneModeField: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.sceneModeId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加场景类型";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const sceneModeId = row.sceneModeId || this.ids
|
||||
getSceneMode(sceneModeId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改场景类型";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.sceneModeId != null) {
|
||||
updateSceneMode(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addSceneMode(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const sceneModeIds = row.sceneModeId || this.ids;
|
||||
this.$modal.confirm('是否确认删除场景类型编号为"' + sceneModeIds + '"的数据项?').then(function() {
|
||||
return delSceneMode(sceneModeIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('business/sceneMode/export', {
|
||||
...this.queryParams
|
||||
}, `sceneMode_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -0,0 +1,464 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="租户类型" prop="tenantType">
|
||||
<el-select v-model="queryParams.tenantType" placeholder="请选择租户类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.hw_tenant_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="租户名称" prop="tenantName">
|
||||
<el-input
|
||||
v-model="queryParams.tenantName"
|
||||
placeholder="请输入租户名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="行业类型" prop="tenantIndustry">
|
||||
<el-select v-model="queryParams.tenantIndustry" placeholder="请选择行业类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.hw_tenant_industry"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人姓名" prop="contactName">
|
||||
<el-input
|
||||
v-model="queryParams.contactName"
|
||||
placeholder="请输入联系人姓名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人电话" prop="contactPhone">
|
||||
<el-input
|
||||
v-model="queryParams.contactPhone"
|
||||
placeholder="请输入联系人电话"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱地址" prop="email">
|
||||
<el-input
|
||||
v-model="queryParams.email"
|
||||
placeholder="请输入邮箱地址"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="区域ID" prop="areaId">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.areaId"-->
|
||||
<!-- placeholder="请输入区域ID"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="联系人地址" prop="contactAddress">
|
||||
<el-input
|
||||
v-model="queryParams.contactAddress"
|
||||
placeholder="请输入联系人地址"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="状态" prop="tenantStatus">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.tenantStatus"-->
|
||||
<!-- placeholder="请输入状态"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="是否外部注册" prop="isRegister">
|
||||
<el-select v-model="queryParams.isRegister" placeholder="请选择是否外部注册" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.hw_tenant_register_flag"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="租户等级" prop="tenantGrade">
|
||||
<el-input
|
||||
v-model="queryParams.tenantGrade"
|
||||
placeholder="请输入租户等级"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段" prop="tenantField">
|
||||
<el-input
|
||||
v-model="queryParams.tenantField"
|
||||
placeholder="请输入预留字段"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['business:tenant:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['business:tenant:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['business:tenant:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['business:tenant:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="tenantList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="租户ID" align="center" prop="tenantId" />
|
||||
<el-table-column label="租户类型" align="center" prop="tenantType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.hw_tenant_type" :value="scope.row.tenantType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="租户名称" align="center" prop="tenantName" />
|
||||
<el-table-column label="行业类型" align="center" prop="tenantIndustry">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.hw_tenant_industry" :value="scope.row.tenantIndustry"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系人姓名" align="center" prop="contactName" />
|
||||
<el-table-column label="联系人电话" align="center" prop="contactPhone" />
|
||||
<el-table-column label="邮箱地址" align="center" prop="email" />
|
||||
<el-table-column label="区域ID" align="center" prop="areaId" />
|
||||
<el-table-column label="联系人地址" align="center" prop="contactAddress" />
|
||||
<el-table-column label="描述" align="center" prop="remark" />
|
||||
<!-- <el-table-column label="状态" align="center" prop="tenantStatus" />-->
|
||||
<el-table-column label="是否外部注册" align="center" prop="isRegister">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.hw_tenant_register_flag" :value="scope.row.isRegister"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="租户等级" align="center" prop="tenantGrade" />
|
||||
<el-table-column label="预留字段" align="center" prop="tenantField" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['business:tenant:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['business:tenant:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改租户信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="租户类型" prop="tenantType">
|
||||
<el-radio-group v-model="form.tenantType">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.hw_tenant_type"
|
||||
:key="dict.value"
|
||||
:label="parseInt(dict.value)"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="租户名称" prop="tenantName">
|
||||
<el-input v-model="form.tenantName" placeholder="请输入租户名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="行业类型" prop="tenantIndustry">
|
||||
<el-select v-model="form.tenantIndustry" placeholder="请选择行业类型">
|
||||
<el-option
|
||||
v-for="dict in dict.type.hw_tenant_industry"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人姓名" prop="contactName">
|
||||
<el-input v-model="form.contactName" placeholder="请输入联系人姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人电话" prop="contactPhone">
|
||||
<el-input v-model="form.contactPhone" placeholder="请输入联系人电话" />
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱地址" prop="email">
|
||||
<el-input v-model="form.email" placeholder="请输入邮箱地址" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="区域ID" prop="areaId">-->
|
||||
<!-- <el-input v-model="form.areaId" placeholder="请输入区域ID" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="联系人地址" prop="contactAddress">
|
||||
<el-input v-model="form.contactAddress" placeholder="请输入联系人地址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="状态" prop="tenantStatus">-->
|
||||
<!-- <el-input v-model="form.tenantStatus" placeholder="请输入状态" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="是否外部注册" prop="isRegister">
|
||||
<el-radio-group v-model="form.isRegister">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.hw_tenant_register_flag"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="租户等级" prop="tenantGrade">
|
||||
<el-input v-model="form.tenantGrade" placeholder="请输入租户等级" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预留字段" prop="tenantField">
|
||||
<el-input v-model="form.tenantField" placeholder="请输入预留字段" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listTenant, getTenant, delTenant, addTenant, updateTenant } from "@/api/business/tenant";
|
||||
|
||||
export default {
|
||||
name: "Tenant",
|
||||
dicts: ['hw_tenant_industry', 'hw_tenant_register_flag', 'hw_tenant_type'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 租户信息表格数据
|
||||
tenantList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
tenantType: null,
|
||||
tenantName: null,
|
||||
tenantIndustry: null,
|
||||
contactName: null,
|
||||
contactPhone: null,
|
||||
email: null,
|
||||
areaId: null,
|
||||
contactAddress: null,
|
||||
tenantStatus: null,
|
||||
isRegister: null,
|
||||
tenantGrade: null,
|
||||
tenantField: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
tenantType: [
|
||||
{ required: true, message: "租户类型不能为空", trigger: "change" }
|
||||
],
|
||||
tenantName: [
|
||||
{ required: true, message: "租户名称不能为空", trigger: "blur" }
|
||||
],
|
||||
contactName: [
|
||||
{ required: true, message: "联系人姓名不能为空", trigger: "blur" }
|
||||
],
|
||||
contactPhone: [
|
||||
{ required: true, message: "联系人电话不能为空", trigger: "blur" }
|
||||
],
|
||||
tenantStatus: [
|
||||
{ required: true, message: "状态不能为空", trigger: "blur" }
|
||||
],
|
||||
isRegister: [
|
||||
{ required: true, message: "是否外部注册不能为空", trigger: "change" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询租户信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listTenant(this.queryParams).then(response => {
|
||||
this.tenantList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
tenantId: null,
|
||||
tenantType: null,
|
||||
tenantName: null,
|
||||
tenantIndustry: null,
|
||||
contactName: null,
|
||||
contactPhone: null,
|
||||
email: null,
|
||||
areaId: null,
|
||||
contactAddress: null,
|
||||
remark: null,
|
||||
tenantStatus: null,
|
||||
isRegister: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
tenantGrade: null,
|
||||
tenantField: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.tenantId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加租户信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const tenantId = row.tenantId || this.ids
|
||||
getTenant(tenantId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改租户信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.tenantId != null) {
|
||||
updateTenant(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addTenant(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const tenantIds = row.tenantId || this.ids;
|
||||
this.$modal.confirm('是否确认删除租户信息编号为"' + tenantIds + '"的数据项?').then(function() {
|
||||
return delTenant(tenantIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('business/tenant/export', {
|
||||
...this.queryParams
|
||||
}, `tenant_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Loading…
Reference in New Issue