76 changed files with 4143 additions and 234 deletions
@ -0,0 +1,107 @@ |
|||
package cn.iocoder.yudao.module.hand.controller.admin; |
|||
|
|||
import cn.iocoder.yudao.module.hand.dal.AlarmRuleDO; |
|||
import cn.iocoder.yudao.module.hand.service.AlarmRuleService; |
|||
import cn.iocoder.yudao.module.hand.vo.AlarmRulePageReqVO; |
|||
import cn.iocoder.yudao.module.hand.vo.AlarmRuleRespVO; |
|||
import cn.iocoder.yudao.module.hand.vo.AlarmRuleSaveReqVO; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import jakarta.annotation.Resource; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
|
|||
import jakarta.validation.constraints.*; |
|||
import jakarta.validation.*; |
|||
import jakarta.servlet.http.*; |
|||
import java.util.*; |
|||
import java.io.IOException; |
|||
|
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
|||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
|||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
|||
|
|||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
|||
|
|||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; |
|||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; |
|||
|
|||
|
|||
|
|||
@Tag(name = "管理后台 - GAS警报规则") |
|||
@RestController |
|||
@RequestMapping("/gas/alarm-rule") |
|||
@Validated |
|||
public class AlarmRuleController { |
|||
|
|||
@Resource |
|||
private AlarmRuleService alarmRuleService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建GAS警报规则") |
|||
@PreAuthorize("@ss.hasPermission('gas:alarm-rule:create')") |
|||
public CommonResult<String> createAlarmRule(@Valid @RequestBody AlarmRuleSaveReqVO createReqVO) { |
|||
return success(alarmRuleService.createAlarmRule(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新GAS警报规则") |
|||
@PreAuthorize("@ss.hasPermission('gas:alarm-rule:update')") |
|||
public CommonResult<Boolean> updateAlarmRule(@Valid @RequestBody AlarmRuleSaveReqVO updateReqVO) { |
|||
alarmRuleService.updateAlarmRule(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除GAS警报规则") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('gas:alarm-rule:delete')") |
|||
public CommonResult<Boolean> deleteAlarmRule(@RequestParam("id") String id) { |
|||
alarmRuleService.deleteAlarmRule(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete-list") |
|||
@Parameter(name = "ids", description = "编号", required = true) |
|||
@Operation(summary = "批量删除GAS警报规则") |
|||
@PreAuthorize("@ss.hasPermission('gas:alarm-rule:delete')") |
|||
public CommonResult<Boolean> deleteAlarmRuleList(@RequestParam("ids") List<String> ids) { |
|||
alarmRuleService.deleteAlarmRuleListByIds(ids); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得GAS警报规则") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('gas:alarm-rule:query')") |
|||
public CommonResult<AlarmRuleRespVO> getAlarmRule(@RequestParam("id") String id) { |
|||
AlarmRuleDO alarmRule = alarmRuleService.getAlarmRule(id); |
|||
return success(BeanUtils.toBean(alarmRule, AlarmRuleRespVO.class)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得GAS警报规则分页") |
|||
@PreAuthorize("@ss.hasPermission('gas:alarm-rule:query')") |
|||
public CommonResult<PageResult<AlarmRuleRespVO>> getAlarmRulePage(@Valid AlarmRulePageReqVO pageReqVO) { |
|||
PageResult<AlarmRuleDO> pageResult = alarmRuleService.getAlarmRulePage(pageReqVO); |
|||
return success(BeanUtils.toBean(pageResult, AlarmRuleRespVO.class)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出GAS警报规则 Excel") |
|||
@PreAuthorize("@ss.hasPermission('gas:alarm-rule:export')") |
|||
@ApiAccessLog(operateType = EXPORT) |
|||
public void exportAlarmRuleExcel(@Valid AlarmRulePageReqVO pageReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); |
|||
List<AlarmRuleDO> list = alarmRuleService.getAlarmRulePage(pageReqVO).getList(); |
|||
// 导出 Excel
|
|||
ExcelUtils.write(response, "GAS警报规则.xls", "数据", AlarmRuleRespVO.class, |
|||
BeanUtils.toBean(list, AlarmRuleRespVO.class)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,107 @@ |
|||
package cn.iocoder.yudao.module.hand.controller.admin; |
|||
|
|||
import cn.iocoder.yudao.module.hand.dal.AlarmTypeDO; |
|||
import cn.iocoder.yudao.module.hand.service.AlarmTypeService; |
|||
import cn.iocoder.yudao.module.hand.vo.AlarmTypePageReqVO; |
|||
import cn.iocoder.yudao.module.hand.vo.AlarmTypeRespVO; |
|||
import cn.iocoder.yudao.module.hand.vo.AlarmTypeSaveReqVO; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import jakarta.annotation.Resource; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
|
|||
import jakarta.validation.constraints.*; |
|||
import jakarta.validation.*; |
|||
import jakarta.servlet.http.*; |
|||
import java.util.*; |
|||
import java.io.IOException; |
|||
|
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
|||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
|||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
|||
|
|||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
|||
|
|||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; |
|||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; |
|||
|
|||
|
|||
|
|||
@Tag(name = "管理后台 - GAS警报类型") |
|||
@RestController |
|||
@RequestMapping("/gas/alarm-type") |
|||
@Validated |
|||
public class AlarmTypeController { |
|||
|
|||
@Resource |
|||
private AlarmTypeService alarmTypeService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建GAS警报类型") |
|||
@PreAuthorize("@ss.hasPermission('gas:alarm-type:create')") |
|||
public CommonResult<String> createAlarmType(@Valid @RequestBody AlarmTypeSaveReqVO createReqVO) { |
|||
return success(alarmTypeService.createAlarmType(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新GAS警报类型") |
|||
@PreAuthorize("@ss.hasPermission('gas:alarm-type:update')") |
|||
public CommonResult<Boolean> updateAlarmType(@Valid @RequestBody AlarmTypeSaveReqVO updateReqVO) { |
|||
alarmTypeService.updateAlarmType(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除GAS警报类型") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('gas:alarm-type:delete')") |
|||
public CommonResult<Boolean> deleteAlarmType(@RequestParam("id") String id) { |
|||
alarmTypeService.deleteAlarmType(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete-list") |
|||
@Parameter(name = "ids", description = "编号", required = true) |
|||
@Operation(summary = "批量删除GAS警报类型") |
|||
@PreAuthorize("@ss.hasPermission('gas:alarm-type:delete')") |
|||
public CommonResult<Boolean> deleteAlarmTypeList(@RequestParam("ids") List<String> ids) { |
|||
alarmTypeService.deleteAlarmTypeListByIds(ids); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得GAS警报类型") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('gas:alarm-type:query')") |
|||
public CommonResult<AlarmTypeRespVO> getAlarmType(@RequestParam("id") String id) { |
|||
AlarmTypeDO alarmType = alarmTypeService.getAlarmType(id); |
|||
return success(BeanUtils.toBean(alarmType, AlarmTypeRespVO.class)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得GAS警报类型分页") |
|||
@PreAuthorize("@ss.hasPermission('gas:alarm-type:query')") |
|||
public CommonResult<PageResult<AlarmTypeRespVO>> getAlarmTypePage(@Valid AlarmTypePageReqVO pageReqVO) { |
|||
PageResult<AlarmTypeDO> pageResult = alarmTypeService.getAlarmTypePage(pageReqVO); |
|||
return success(BeanUtils.toBean(pageResult, AlarmTypeRespVO.class)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出GAS警报类型 Excel") |
|||
@PreAuthorize("@ss.hasPermission('gas:alarm-type:export')") |
|||
@ApiAccessLog(operateType = EXPORT) |
|||
public void exportAlarmTypeExcel(@Valid AlarmTypePageReqVO pageReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); |
|||
List<AlarmTypeDO> list = alarmTypeService.getAlarmTypePage(pageReqVO).getList(); |
|||
// 导出 Excel
|
|||
ExcelUtils.write(response, "GAS警报类型.xls", "数据", AlarmTypeRespVO.class, |
|||
BeanUtils.toBean(list, AlarmTypeRespVO.class)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,107 @@ |
|||
package cn.iocoder.yudao.module.hand.controller.admin; |
|||
|
|||
import cn.iocoder.yudao.module.hand.dal.FenceAlarmDO; |
|||
import cn.iocoder.yudao.module.hand.service.FenceAlarmService; |
|||
import cn.iocoder.yudao.module.hand.vo.FenceAlarmPageReqVO; |
|||
import cn.iocoder.yudao.module.hand.vo.FenceAlarmRespVO; |
|||
import cn.iocoder.yudao.module.hand.vo.FenceAlarmSaveReqVO; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import jakarta.annotation.Resource; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
|
|||
import jakarta.validation.constraints.*; |
|||
import jakarta.validation.*; |
|||
import jakarta.servlet.http.*; |
|||
import java.util.*; |
|||
import java.io.IOException; |
|||
|
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
|||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
|||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
|||
|
|||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
|||
|
|||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; |
|||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; |
|||
|
|||
|
|||
|
|||
@Tag(name = "管理后台 - GAS手持探测器围栏报警") |
|||
@RestController |
|||
@RequestMapping("/gas/fence-alarm") |
|||
@Validated |
|||
public class FenceAlarmController { |
|||
|
|||
@Resource |
|||
private FenceAlarmService fenceAlarmService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建GAS手持探测器围栏报警") |
|||
@PreAuthorize("@ss.hasPermission('gas:fence-alarm:create')") |
|||
public CommonResult<String> createFenceAlarm(@Valid @RequestBody FenceAlarmSaveReqVO createReqVO) { |
|||
return success(fenceAlarmService.createFenceAlarm(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新GAS手持探测器围栏报警") |
|||
@PreAuthorize("@ss.hasPermission('gas:fence-alarm:update')") |
|||
public CommonResult<Boolean> updateFenceAlarm(@Valid @RequestBody FenceAlarmSaveReqVO updateReqVO) { |
|||
fenceAlarmService.updateFenceAlarm(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除GAS手持探测器围栏报警") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('gas:fence-alarm:delete')") |
|||
public CommonResult<Boolean> deleteFenceAlarm(@RequestParam("id") String id) { |
|||
fenceAlarmService.deleteFenceAlarm(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete-list") |
|||
@Parameter(name = "ids", description = "编号", required = true) |
|||
@Operation(summary = "批量删除GAS手持探测器围栏报警") |
|||
@PreAuthorize("@ss.hasPermission('gas:fence-alarm:delete')") |
|||
public CommonResult<Boolean> deleteFenceAlarmList(@RequestParam("ids") List<String> ids) { |
|||
fenceAlarmService.deleteFenceAlarmListByIds(ids); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得GAS手持探测器围栏报警") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('gas:fence-alarm:query')") |
|||
public CommonResult<FenceAlarmRespVO> getFenceAlarm(@RequestParam("id") String id) { |
|||
FenceAlarmDO fenceAlarm = fenceAlarmService.getFenceAlarm(id); |
|||
return success(BeanUtils.toBean(fenceAlarm, FenceAlarmRespVO.class)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得GAS手持探测器围栏报警分页") |
|||
@PreAuthorize("@ss.hasPermission('gas:fence-alarm:query')") |
|||
public CommonResult<PageResult<FenceAlarmRespVO>> getFenceAlarmPage(@Valid FenceAlarmPageReqVO pageReqVO) { |
|||
PageResult<FenceAlarmDO> pageResult = fenceAlarmService.getFenceAlarmPage(pageReqVO); |
|||
return success(BeanUtils.toBean(pageResult, FenceAlarmRespVO.class)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出GAS手持探测器围栏报警 Excel") |
|||
@PreAuthorize("@ss.hasPermission('gas:fence-alarm:export')") |
|||
@ApiAccessLog(operateType = EXPORT) |
|||
public void exportFenceAlarmExcel(@Valid FenceAlarmPageReqVO pageReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); |
|||
List<FenceAlarmDO> list = fenceAlarmService.getFenceAlarmPage(pageReqVO).getList(); |
|||
// 导出 Excel
|
|||
ExcelUtils.write(response, "GAS手持探测器围栏报警.xls", "数据", FenceAlarmRespVO.class, |
|||
BeanUtils.toBean(list, FenceAlarmRespVO.class)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,107 @@ |
|||
package cn.iocoder.yudao.module.hand.controller.admin; |
|||
|
|||
import cn.iocoder.yudao.module.hand.dal.FenceDO; |
|||
import cn.iocoder.yudao.module.hand.service.FenceService; |
|||
import cn.iocoder.yudao.module.hand.vo.FencePageReqVO; |
|||
import cn.iocoder.yudao.module.hand.vo.FenceRespVO; |
|||
import cn.iocoder.yudao.module.hand.vo.FenceSaveReqVO; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import jakarta.annotation.Resource; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
|
|||
import jakarta.validation.constraints.*; |
|||
import jakarta.validation.*; |
|||
import jakarta.servlet.http.*; |
|||
import java.util.*; |
|||
import java.io.IOException; |
|||
|
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
|||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
|||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
|||
|
|||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
|||
|
|||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; |
|||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; |
|||
|
|||
|
|||
|
|||
@Tag(name = "管理后台 - GAS电子围栏") |
|||
@RestController |
|||
@RequestMapping("/gas/fence") |
|||
@Validated |
|||
public class FenceController { |
|||
|
|||
@Resource |
|||
private FenceService fenceService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建GAS电子围栏") |
|||
@PreAuthorize("@ss.hasPermission('gas:fence:create')") |
|||
public CommonResult<String> createFence(@Valid @RequestBody FenceSaveReqVO createReqVO) { |
|||
return success(fenceService.createFence(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新GAS电子围栏") |
|||
@PreAuthorize("@ss.hasPermission('gas:fence:update')") |
|||
public CommonResult<Boolean> updateFence(@Valid @RequestBody FenceSaveReqVO updateReqVO) { |
|||
fenceService.updateFence(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除GAS电子围栏") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('gas:fence:delete')") |
|||
public CommonResult<Boolean> deleteFence(@RequestParam("id") String id) { |
|||
fenceService.deleteFence(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete-list") |
|||
@Parameter(name = "ids", description = "编号", required = true) |
|||
@Operation(summary = "批量删除GAS电子围栏") |
|||
@PreAuthorize("@ss.hasPermission('gas:fence:delete')") |
|||
public CommonResult<Boolean> deleteFenceList(@RequestParam("ids") List<String> ids) { |
|||
fenceService.deleteFenceListByIds(ids); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得GAS电子围栏") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('gas:fence:query')") |
|||
public CommonResult<FenceRespVO> getFence(@RequestParam("id") String id) { |
|||
FenceDO fence = fenceService.getFence(id); |
|||
return success(BeanUtils.toBean(fence, FenceRespVO.class)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得GAS电子围栏分页") |
|||
@PreAuthorize("@ss.hasPermission('gas:fence:query')") |
|||
public CommonResult<PageResult<FenceRespVO>> getFencePage(@Valid FencePageReqVO pageReqVO) { |
|||
PageResult<FenceDO> pageResult = fenceService.getFencePage(pageReqVO); |
|||
return success(BeanUtils.toBean(pageResult, FenceRespVO.class)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出GAS电子围栏 Excel") |
|||
@PreAuthorize("@ss.hasPermission('gas:fence:export')") |
|||
@ApiAccessLog(operateType = EXPORT) |
|||
public void exportFenceExcel(@Valid FencePageReqVO pageReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); |
|||
List<FenceDO> list = fenceService.getFencePage(pageReqVO).getList(); |
|||
// 导出 Excel
|
|||
ExcelUtils.write(response, "GAS电子围栏.xls", "数据", FenceRespVO.class, |
|||
BeanUtils.toBean(list, FenceRespVO.class)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,107 @@ |
|||
package cn.iocoder.yudao.module.hand.controller.admin; |
|||
|
|||
import cn.iocoder.yudao.module.hand.dal.GasTypeDO; |
|||
import cn.iocoder.yudao.module.hand.service.GasTypeService; |
|||
import cn.iocoder.yudao.module.hand.vo.GasTypePageReqVO; |
|||
import cn.iocoder.yudao.module.hand.vo.GasTypeRespVO; |
|||
import cn.iocoder.yudao.module.hand.vo.GasTypeSaveReqVO; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import jakarta.annotation.Resource; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
|
|||
import jakarta.validation.constraints.*; |
|||
import jakarta.validation.*; |
|||
import jakarta.servlet.http.*; |
|||
import java.util.*; |
|||
import java.io.IOException; |
|||
|
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
|||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
|||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
|||
|
|||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
|||
|
|||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; |
|||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; |
|||
|
|||
|
|||
|
|||
@Tag(name = "管理后台 - GAS气体") |
|||
@RestController |
|||
@RequestMapping("/gas/type") |
|||
@Validated |
|||
public class GasTypeController { |
|||
|
|||
@Resource |
|||
private GasTypeService typeService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建GAS气体") |
|||
@PreAuthorize("@ss.hasPermission('gas:type:create')") |
|||
public CommonResult<String> createType(@Valid @RequestBody GasTypeSaveReqVO createReqVO) { |
|||
return success(typeService.createType(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新GAS气体") |
|||
@PreAuthorize("@ss.hasPermission('gas:type:update')") |
|||
public CommonResult<Boolean> updateType(@Valid @RequestBody GasTypeSaveReqVO updateReqVO) { |
|||
typeService.updateType(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除GAS气体") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('gas:type:delete')") |
|||
public CommonResult<Boolean> deleteType(@RequestParam("id") String id) { |
|||
typeService.deleteType(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete-list") |
|||
@Parameter(name = "ids", description = "编号", required = true) |
|||
@Operation(summary = "批量删除GAS气体") |
|||
@PreAuthorize("@ss.hasPermission('gas:type:delete')") |
|||
public CommonResult<Boolean> deleteTypeList(@RequestParam("ids") List<String> ids) { |
|||
typeService.deleteTypeListByIds(ids); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得GAS气体") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('gas:type:query')") |
|||
public CommonResult<GasTypeRespVO> getType(@RequestParam("id") String id) { |
|||
GasTypeDO type = typeService.getType(id); |
|||
return success(BeanUtils.toBean(type, GasTypeRespVO.class)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得GAS气体分页") |
|||
@PreAuthorize("@ss.hasPermission('gas:type:query')") |
|||
public CommonResult<PageResult<GasTypeRespVO>> getTypePage(@Valid GasTypePageReqVO pageReqVO) { |
|||
PageResult<GasTypeDO> pageResult = typeService.getTypePage(pageReqVO); |
|||
return success(BeanUtils.toBean(pageResult, GasTypeRespVO.class)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出GAS气体 Excel") |
|||
@PreAuthorize("@ss.hasPermission('gas:type:export')") |
|||
@ApiAccessLog(operateType = EXPORT) |
|||
public void exportTypeExcel(@Valid GasTypePageReqVO pageReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); |
|||
List<GasTypeDO> list = typeService.getTypePage(pageReqVO).getList(); |
|||
// 导出 Excel
|
|||
ExcelUtils.write(response, "GAS气体.xls", "数据", GasTypeRespVO.class, |
|||
BeanUtils.toBean(list, GasTypeRespVO.class)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,106 @@ |
|||
package cn.iocoder.yudao.module.hand.controller.admin; |
|||
|
|||
import cn.iocoder.yudao.module.hand.dal.HandAlarmDO; |
|||
import cn.iocoder.yudao.module.hand.service.HandAlarmService; |
|||
import cn.iocoder.yudao.module.hand.vo.HandAlarmPageReqVO; |
|||
import cn.iocoder.yudao.module.hand.vo.HandAlarmRespVO; |
|||
import cn.iocoder.yudao.module.hand.vo.HandAlarmSaveReqVO; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import jakarta.annotation.Resource; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
|
|||
import jakarta.validation.constraints.*; |
|||
import jakarta.validation.*; |
|||
import jakarta.servlet.http.*; |
|||
import java.util.*; |
|||
import java.io.IOException; |
|||
|
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
|||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
|||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
|||
|
|||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
|||
|
|||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; |
|||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; |
|||
|
|||
|
|||
@Tag(name = "管理后台 - GAS手持探测器警报") |
|||
@RestController |
|||
@RequestMapping("/gas/hand-alarm") |
|||
@Validated |
|||
public class HandAlarmController { |
|||
|
|||
@Resource |
|||
private HandAlarmService handAlarmService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建GAS手持探测器警报") |
|||
@PreAuthorize("@ss.hasPermission('gas:hand-alarm:create')") |
|||
public CommonResult<String> createHandAlarm(@Valid @RequestBody HandAlarmSaveReqVO createReqVO) { |
|||
return success(handAlarmService.createHandAlarm(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新GAS手持探测器警报") |
|||
@PreAuthorize("@ss.hasPermission('gas:hand-alarm:update')") |
|||
public CommonResult<Boolean> updateHandAlarm(@Valid @RequestBody HandAlarmSaveReqVO updateReqVO) { |
|||
handAlarmService.updateHandAlarm(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除GAS手持探测器警报") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('gas:hand-alarm:delete')") |
|||
public CommonResult<Boolean> deleteHandAlarm(@RequestParam("id") String id) { |
|||
handAlarmService.deleteHandAlarm(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete-list") |
|||
@Parameter(name = "ids", description = "编号", required = true) |
|||
@Operation(summary = "批量删除GAS手持探测器警报") |
|||
@PreAuthorize("@ss.hasPermission('gas:hand-alarm:delete')") |
|||
public CommonResult<Boolean> deleteHandAlarmList(@RequestParam("ids") List<String> ids) { |
|||
handAlarmService.deleteHandAlarmListByIds(ids); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得GAS手持探测器警报") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('gas:hand-alarm:query')") |
|||
public CommonResult<HandAlarmRespVO> getHandAlarm(@RequestParam("id") String id) { |
|||
HandAlarmDO handAlarm = handAlarmService.getHandAlarm(id); |
|||
return success(BeanUtils.toBean(handAlarm, HandAlarmRespVO.class)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得GAS手持探测器警报分页") |
|||
@PreAuthorize("@ss.hasPermission('gas:hand-alarm:query')") |
|||
public CommonResult<PageResult<HandAlarmRespVO>> getHandAlarmPage(@Valid HandAlarmPageReqVO pageReqVO) { |
|||
PageResult<HandAlarmDO> pageResult = handAlarmService.getHandAlarmPage(pageReqVO); |
|||
return success(BeanUtils.toBean(pageResult, HandAlarmRespVO.class)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出GAS手持探测器警报 Excel") |
|||
@PreAuthorize("@ss.hasPermission('gas:hand-alarm:export')") |
|||
@ApiAccessLog(operateType = EXPORT) |
|||
public void exportHandAlarmExcel(@Valid HandAlarmPageReqVO pageReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); |
|||
List<HandAlarmDO> list = handAlarmService.getHandAlarmPage(pageReqVO).getList(); |
|||
// 导出 Excel
|
|||
ExcelUtils.write(response, "GAS手持探测器警报.xls", "数据", HandAlarmRespVO.class, |
|||
BeanUtils.toBean(list, HandAlarmRespVO.class)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,106 @@ |
|||
package cn.iocoder.yudao.module.hand.controller.admin; |
|||
|
|||
import cn.iocoder.yudao.module.hand.dal.HandDetectorDO; |
|||
import cn.iocoder.yudao.module.hand.service.HandDetectorService; |
|||
import cn.iocoder.yudao.module.hand.vo.HandDetectorRespVO; |
|||
import cn.iocoder.yudao.module.hand.vo.HandDetectorSaveReqVO; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import jakarta.annotation.Resource; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
|
|||
import jakarta.validation.constraints.*; |
|||
import jakarta.validation.*; |
|||
import jakarta.servlet.http.*; |
|||
import java.util.*; |
|||
import java.io.IOException; |
|||
|
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
|||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
|||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
|||
|
|||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
|||
|
|||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; |
|||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; |
|||
|
|||
|
|||
|
|||
@Tag(name = "管理后台 - GAS手持探测器") |
|||
@RestController |
|||
@RequestMapping("/gas/hand-detector") |
|||
@Validated |
|||
public class HandDetectorController { |
|||
|
|||
@Resource |
|||
private HandDetectorService handDetectorService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建GAS手持探测器") |
|||
@PreAuthorize("@ss.hasPermission('gas:hand-detector:create')") |
|||
public CommonResult<String> createHandDetector(@Valid @RequestBody HandDetectorSaveReqVO createReqVO) { |
|||
return success(handDetectorService.createHandDetector(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新GAS手持探测器") |
|||
@PreAuthorize("@ss.hasPermission('gas:hand-detector:update')") |
|||
public CommonResult<Boolean> updateHandDetector(@Valid @RequestBody cn.iocoder.yudao.module.hand.vo.HandDetectorSaveReqVO updateReqVO) { |
|||
handDetectorService.updateHandDetector(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除GAS手持探测器") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('gas:hand-detector:delete')") |
|||
public CommonResult<Boolean> deleteHandDetector(@RequestParam("id") String id) { |
|||
handDetectorService.deleteHandDetector(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete-list") |
|||
@Parameter(name = "ids", description = "编号", required = true) |
|||
@Operation(summary = "批量删除GAS手持探测器") |
|||
@PreAuthorize("@ss.hasPermission('gas:hand-detector:delete')") |
|||
public CommonResult<Boolean> deleteHandDetectorList(@RequestParam("ids") List<String> ids) { |
|||
handDetectorService.deleteHandDetectorListByIds(ids); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得GAS手持探测器") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('gas:hand-detector:query')") |
|||
public CommonResult<cn.iocoder.yudao.module.hand.vo.HandDetectorRespVO> getHandDetector(@RequestParam("id") String id) { |
|||
HandDetectorDO handDetector = handDetectorService.getHandDetector(id); |
|||
return success(BeanUtils.toBean(handDetector, HandDetectorRespVO.class)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得GAS手持探测器分页") |
|||
@PreAuthorize("@ss.hasPermission('gas:hand-detector:query')") |
|||
public CommonResult<PageResult<cn.iocoder.yudao.module.hand.vo.HandDetectorRespVO>> getHandDetectorPage(@Valid cn.iocoder.yudao.module.hand.vo.HandDetectorPageReqVO pageReqVO) { |
|||
PageResult<HandDetectorDO> pageResult = handDetectorService.getHandDetectorPage(pageReqVO); |
|||
return success(BeanUtils.toBean(pageResult,HandDetectorRespVO.class)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出GAS手持探测器 Excel") |
|||
@PreAuthorize("@ss.hasPermission('gas:hand-detector:export')") |
|||
@ApiAccessLog(operateType = EXPORT) |
|||
public void exportHandDetectorExcel(@Valid cn.iocoder.yudao.module.hand.vo.HandDetectorPageReqVO pageReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); |
|||
List<HandDetectorDO> list = handDetectorService.getHandDetectorPage(pageReqVO).getList(); |
|||
// 导出 Excel
|
|||
ExcelUtils.write(response, "GAS手持探测器.xls", "数据", cn.iocoder.yudao.module.hand.vo.HandDetectorRespVO.class, |
|||
BeanUtils.toBean(list, cn.iocoder.yudao.module.hand.vo.HandDetectorRespVO.class)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,88 @@ |
|||
package cn.iocoder.yudao.module.hand.dal; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import java.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; |
|||
|
|||
/** |
|||
* GAS警报规则 DO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@TableName("gas_alarm_rule") |
|||
@KeySequence("gas_alarm_rule_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
@Builder |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class AlarmRuleDO extends BaseDO { |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
@TableId(type = IdType.INPUT) |
|||
private String id; |
|||
/** |
|||
* 气体类型ID |
|||
*/ |
|||
private String gasTypeId; |
|||
/** |
|||
* 警报类型ID |
|||
*/ |
|||
private String alarmTypeId; |
|||
/** |
|||
* 警报名称 |
|||
*/ |
|||
private String alarmName; |
|||
/** |
|||
* 警报名称颜色 |
|||
*/ |
|||
private String alarmNameColor; |
|||
/** |
|||
* 警报颜色 |
|||
*/ |
|||
private String alarmColor; |
|||
/** |
|||
* 警报方式/级别(0:正常状态;1:一级警报;2:二级警报;3:弹窗警报) |
|||
*/ |
|||
private Integer alarmLevel; |
|||
/** |
|||
* 触发值(小) |
|||
*/ |
|||
private Double min; |
|||
/** |
|||
* 触发值(大) |
|||
*/ |
|||
private Double max; |
|||
/** |
|||
* 最值方向(0:小;1:大) |
|||
*/ |
|||
private Integer direction; |
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sortOrder; |
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
/** |
|||
* 删除标志 |
|||
*/ |
|||
private Integer delFlag; |
|||
/** |
|||
* 创建者 |
|||
*/ |
|||
private String createBy; |
|||
/** |
|||
* 更新者 |
|||
*/ |
|||
private String updateBy; |
|||
|
|||
|
|||
} |
@ -0,0 +1,68 @@ |
|||
package cn.iocoder.yudao.module.hand.dal; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import java.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; |
|||
|
|||
/** |
|||
* GAS警报类型 DO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@TableName("gas_alarm_type") |
|||
@KeySequence("gas_alarm_type_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
@Builder |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class AlarmTypeDO extends BaseDO { |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
@TableId(type = IdType.INPUT) |
|||
private String id; |
|||
/** |
|||
* 名称 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 名称颜色 |
|||
*/ |
|||
private String nameColor; |
|||
/** |
|||
* 颜色 |
|||
*/ |
|||
private String color; |
|||
/** |
|||
* 警报方式/级别(0:正常状态;1:一级警报;2:二级警报;3:弹窗警报) |
|||
*/ |
|||
private Integer level; |
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sortOrder; |
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
/** |
|||
* 删除标志 |
|||
*/ |
|||
private Integer delFlag; |
|||
/** |
|||
* 创建者 |
|||
*/ |
|||
private String createBy; |
|||
/** |
|||
* 更新者 |
|||
*/ |
|||
private String updateBy; |
|||
|
|||
|
|||
} |
@ -0,0 +1,90 @@ |
|||
package cn.iocoder.yudao.module.hand.dal; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import java.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; |
|||
|
|||
/** |
|||
* GAS手持探测器围栏报警 DO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@TableName("gas_fence_alarm") |
|||
@KeySequence("gas_fence_alarm_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
@Builder |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class FenceAlarmDO extends BaseDO { |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
@TableId(type = IdType.INPUT) |
|||
private String id; |
|||
/** |
|||
* 探头ID |
|||
*/ |
|||
private String detectorId; |
|||
/** |
|||
* 围栏id |
|||
*/ |
|||
private String fenceId; |
|||
/** |
|||
* 报警类型 |
|||
*/ |
|||
private Integer type; |
|||
/** |
|||
* 在区域图X坐标值 |
|||
*/ |
|||
private Double picX; |
|||
/** |
|||
* 在区域图X坐标值 |
|||
*/ |
|||
private Double picY; |
|||
/** |
|||
* 超出围栏米数 |
|||
*/ |
|||
private Double distance; |
|||
/** |
|||
* 最远超出米数 |
|||
*/ |
|||
private Double maxDistance; |
|||
/** |
|||
* 开始时间 |
|||
*/ |
|||
private LocalDateTime tAlarmStart; |
|||
/** |
|||
* 结束时间 |
|||
*/ |
|||
private LocalDateTime tAlarmEnd; |
|||
/** |
|||
* 状态(0:待处理;1:处理中;1:已处理) |
|||
*/ |
|||
private Integer status; |
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
/** |
|||
* 删除标志 |
|||
*/ |
|||
private Integer delFlag; |
|||
/** |
|||
* 创建者 |
|||
*/ |
|||
private String createBy; |
|||
/** |
|||
* 更新者 |
|||
*/ |
|||
private String updateBy; |
|||
|
|||
|
|||
} |
@ -0,0 +1,64 @@ |
|||
package cn.iocoder.yudao.module.hand.dal; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import java.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; |
|||
|
|||
/** |
|||
* GAS电子围栏 DO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@TableName("gas_fence") |
|||
@KeySequence("gas_fence_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
@Builder |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class FenceDO extends BaseDO { |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
@TableId(type = IdType.INPUT) |
|||
private String id; |
|||
/** |
|||
* 围栏名称 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 围栏范围 |
|||
*/ |
|||
private String fenceRange; |
|||
/** |
|||
* 状态(1启用,2禁用) |
|||
*/ |
|||
private Integer status; |
|||
/** |
|||
* 围栏类型(1:超出报警,2:进入报警) |
|||
*/ |
|||
private Integer type; |
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
/** |
|||
* 删除标志 |
|||
*/ |
|||
private Integer delFlag; |
|||
/** |
|||
* 创建者 |
|||
*/ |
|||
private String createBy; |
|||
/** |
|||
* 更新者 |
|||
*/ |
|||
private String updateBy; |
|||
|
|||
|
|||
} |
@ -0,0 +1,64 @@ |
|||
package cn.iocoder.yudao.module.hand.dal; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import java.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; |
|||
|
|||
/** |
|||
* GAS气体 DO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@TableName("gas_gas_type") |
|||
@KeySequence("gas_gas_type_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
@Builder |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class GasTypeDO extends BaseDO { |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
@TableId(type = IdType.INPUT) |
|||
private String id; |
|||
/** |
|||
* 名称 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 化学式 |
|||
*/ |
|||
private String chemical; |
|||
/** |
|||
* 单位 |
|||
*/ |
|||
private String unit; |
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sortOrder; |
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
/** |
|||
* 删除标志 |
|||
*/ |
|||
private Integer delFlag; |
|||
/** |
|||
* 创建者 |
|||
*/ |
|||
private String createBy; |
|||
/** |
|||
* 更新者 |
|||
*/ |
|||
private String updateBy; |
|||
|
|||
|
|||
} |
@ -0,0 +1,94 @@ |
|||
package cn.iocoder.yudao.module.hand.dal; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import java.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; |
|||
|
|||
/** |
|||
* GAS手持探测器警报 DO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@TableName("gas_hand_alarm") |
|||
@KeySequence("gas_hand_alarm_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
@Builder |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class HandAlarmDO extends BaseDO { |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
@TableId(type = IdType.INPUT) |
|||
private String id; |
|||
/** |
|||
* 警报方式/级别(0:正常状态;1:一级警报;2:二级警报;3:弹窗警报) |
|||
*/ |
|||
private Integer alarmLevel; |
|||
/** |
|||
* 气体类型 |
|||
*/ |
|||
private String gasType; |
|||
/** |
|||
* 单位 |
|||
*/ |
|||
private String unit; |
|||
/** |
|||
* 位置描述 |
|||
*/ |
|||
private String location; |
|||
/** |
|||
* 在区域图X坐标值 |
|||
*/ |
|||
private Double picX; |
|||
/** |
|||
* 在区域图X坐标值 |
|||
*/ |
|||
private Double picY; |
|||
/** |
|||
* 首报值 |
|||
*/ |
|||
private Double vAlarmFirst; |
|||
/** |
|||
* 最值 |
|||
*/ |
|||
private Double vAlarmMaximum; |
|||
/** |
|||
* 开始时间 |
|||
*/ |
|||
private LocalDateTime tAlarmStart; |
|||
/** |
|||
* 结束时间 |
|||
*/ |
|||
private LocalDateTime tAlarmEnd; |
|||
/** |
|||
* 状态(0:待处理;1:处理中;1:已处理) |
|||
*/ |
|||
private Integer status; |
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
/** |
|||
* 删除标志 |
|||
*/ |
|||
private Integer delFlag; |
|||
/** |
|||
* 创建者 |
|||
*/ |
|||
private String createBy; |
|||
/** |
|||
* 更新者 |
|||
*/ |
|||
private String updateBy; |
|||
|
|||
|
|||
} |
@ -0,0 +1,117 @@ |
|||
package cn.iocoder.yudao.module.hand.dal; |
|||
|
|||
import lombok.*; |
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; |
|||
|
|||
/** |
|||
* GAS手持探测器 DO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@TableName("gas_hand_detector") |
|||
@KeySequence("gas_hand_detector_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
@Builder |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class HandDetectorDO extends BaseDO { |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
@TableId(type = IdType.INPUT) |
|||
private String id; |
|||
/** |
|||
* SN |
|||
*/ |
|||
private String sn; |
|||
/** |
|||
* 持有人姓名 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 围栏id |
|||
*/ |
|||
private String fenceId; |
|||
/** |
|||
* 气体类型ID |
|||
*/ |
|||
private String gasTypeId; |
|||
/** |
|||
* 气体化学式 |
|||
*/ |
|||
private String gasChemical; |
|||
/** |
|||
* 测量范围中的最小值 |
|||
*/ |
|||
private Double min; |
|||
/** |
|||
* 测量范围中的最大值 |
|||
*/ |
|||
private Double max; |
|||
/** |
|||
* 状态(0:未知;1:正常;2:故障;3:离线) |
|||
*/ |
|||
private Integer status; |
|||
/** |
|||
* 单位 |
|||
*/ |
|||
private String unit; |
|||
/** |
|||
* 设备型号 |
|||
*/ |
|||
private String model; |
|||
/** |
|||
* 生产厂家 |
|||
*/ |
|||
private String manufacturer; |
|||
/** |
|||
* 启用状态(0:备用;1:启用) |
|||
*/ |
|||
private Integer enableStatus; |
|||
/** |
|||
* 在区域图X坐标值 |
|||
*/ |
|||
private Double picX; |
|||
/** |
|||
* 在区域图Y坐标值 |
|||
*/ |
|||
private Double picY; |
|||
/** |
|||
* 经度 |
|||
*/ |
|||
private Double longitude; |
|||
/** |
|||
* 纬度 |
|||
*/ |
|||
private Double latitude; |
|||
/** |
|||
* 数值除数 |
|||
*/ |
|||
private Integer accuracy; |
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sortOrder; |
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
/** |
|||
* 删除标志 |
|||
*/ |
|||
private Integer delFlag; |
|||
/** |
|||
* 创建者 |
|||
*/ |
|||
private String createBy; |
|||
/** |
|||
* 更新者 |
|||
*/ |
|||
private String updateBy; |
|||
|
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
package cn.iocoder.yudao.module.hand.enums; |
|||
|
|||
import cn.iocoder.yudao.framework.common.exception.ErrorCode; |
|||
|
|||
|
|||
public interface ErrorCodeConstants { |
|||
|
|||
|
|||
ErrorCode HAND_DETECTOR_NOT_EXISTS = new ErrorCode(100001, "GAS手持探测器不存在"); |
|||
|
|||
ErrorCode HAND_ALARM_NOT_EXISTS = new ErrorCode(100002, "GAS手持探测器警报不存在"); |
|||
ErrorCode TYPE_NOT_EXISTS = new ErrorCode(100003, "GAS气体不存在"); |
|||
|
|||
ErrorCode FENCE_ALARM_NOT_EXISTS = new ErrorCode(100004, "GAS手持探测器围栏报警不存在"); |
|||
|
|||
ErrorCode FENCE_NOT_EXISTS = new ErrorCode(100005, "GAS电子围栏不存在"); |
|||
|
|||
ErrorCode ALARM_TYPE_NOT_EXISTS = new ErrorCode(100006, "GAS警报类型不存在"); |
|||
|
|||
ErrorCode ALARM_RULE_NOT_EXISTS = new ErrorCode(100007, "GAS警报规则不存在"); |
|||
} |
@ -1,4 +1,4 @@ |
|||
package cn.iocoder.yudao.module.lock.framework.web.config; |
|||
package cn.iocoder.yudao.module.hand.framework.web.config; |
|||
|
|||
import cn.iocoder.yudao.framework.swagger.config.YudaoSwaggerAutoConfiguration; |
|||
import org.springdoc.core.models.GroupedOpenApi; |
@ -0,0 +1,4 @@ |
|||
/** |
|||
* infra 模块的 web 配置 |
|||
*/ |
|||
package cn.iocoder.yudao.module.hand.framework.web; |
@ -0,0 +1,40 @@ |
|||
package cn.iocoder.yudao.module.hand.mapper; |
|||
|
|||
import java.util.*; |
|||
|
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; |
|||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; |
|||
import cn.iocoder.yudao.module.hand.dal.AlarmRuleDO; |
|||
import cn.iocoder.yudao.module.hand.vo.AlarmRulePageReqVO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* GAS警报规则 Mapper |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Mapper |
|||
public interface AlarmRuleMapper extends BaseMapperX<AlarmRuleDO> { |
|||
|
|||
default PageResult<AlarmRuleDO> selectPage(AlarmRulePageReqVO reqVO) { |
|||
return selectPage(reqVO, new LambdaQueryWrapperX<AlarmRuleDO>() |
|||
.eqIfPresent(AlarmRuleDO::getGasTypeId, reqVO.getGasTypeId()) |
|||
.eqIfPresent(AlarmRuleDO::getAlarmTypeId, reqVO.getAlarmTypeId()) |
|||
.likeIfPresent(AlarmRuleDO::getAlarmName, reqVO.getAlarmName()) |
|||
.eqIfPresent(AlarmRuleDO::getAlarmNameColor, reqVO.getAlarmNameColor()) |
|||
.eqIfPresent(AlarmRuleDO::getAlarmColor, reqVO.getAlarmColor()) |
|||
.eqIfPresent(AlarmRuleDO::getAlarmLevel, reqVO.getAlarmLevel()) |
|||
.eqIfPresent(AlarmRuleDO::getMin, reqVO.getMin()) |
|||
.eqIfPresent(AlarmRuleDO::getMax, reqVO.getMax()) |
|||
.eqIfPresent(AlarmRuleDO::getDirection, reqVO.getDirection()) |
|||
.eqIfPresent(AlarmRuleDO::getSortOrder, reqVO.getSortOrder()) |
|||
.eqIfPresent(AlarmRuleDO::getRemark, reqVO.getRemark()) |
|||
.eqIfPresent(AlarmRuleDO::getDelFlag, reqVO.getDelFlag()) |
|||
.eqIfPresent(AlarmRuleDO::getCreateBy, reqVO.getCreateBy()) |
|||
.betweenIfPresent(AlarmRuleDO::getCreateTime, reqVO.getCreateTime()) |
|||
.eqIfPresent(AlarmRuleDO::getUpdateBy, reqVO.getUpdateBy()) |
|||
.orderByDesc(AlarmRuleDO::getId)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,35 @@ |
|||
package cn.iocoder.yudao.module.hand.mapper; |
|||
|
|||
import java.util.*; |
|||
|
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; |
|||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; |
|||
import cn.iocoder.yudao.module.hand.dal.AlarmTypeDO; |
|||
import cn.iocoder.yudao.module.hand.vo.AlarmTypePageReqVO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* GAS警报类型 Mapper |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Mapper |
|||
public interface AlarmTypeMapper extends BaseMapperX<AlarmTypeDO> { |
|||
|
|||
default PageResult<AlarmTypeDO> selectPage(AlarmTypePageReqVO reqVO) { |
|||
return selectPage(reqVO, new LambdaQueryWrapperX<AlarmTypeDO>() |
|||
.likeIfPresent(AlarmTypeDO::getName, reqVO.getName()) |
|||
.eqIfPresent(AlarmTypeDO::getNameColor, reqVO.getNameColor()) |
|||
.eqIfPresent(AlarmTypeDO::getColor, reqVO.getColor()) |
|||
.eqIfPresent(AlarmTypeDO::getLevel, reqVO.getLevel()) |
|||
.eqIfPresent(AlarmTypeDO::getSortOrder, reqVO.getSortOrder()) |
|||
.eqIfPresent(AlarmTypeDO::getRemark, reqVO.getRemark()) |
|||
.eqIfPresent(AlarmTypeDO::getDelFlag, reqVO.getDelFlag()) |
|||
.eqIfPresent(AlarmTypeDO::getCreateBy, reqVO.getCreateBy()) |
|||
.betweenIfPresent(AlarmTypeDO::getCreateTime, reqVO.getCreateTime()) |
|||
.eqIfPresent(AlarmTypeDO::getUpdateBy, reqVO.getUpdateBy()) |
|||
.orderByDesc(AlarmTypeDO::getId)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,40 @@ |
|||
package cn.iocoder.yudao.module.hand.mapper; |
|||
|
|||
import java.util.*; |
|||
|
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; |
|||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; |
|||
import cn.iocoder.yudao.module.hand.dal.FenceAlarmDO; |
|||
import cn.iocoder.yudao.module.hand.vo.FenceAlarmPageReqVO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* GAS手持探测器围栏报警 Mapper |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Mapper |
|||
public interface FenceAlarmMapper extends BaseMapperX<FenceAlarmDO> { |
|||
|
|||
default PageResult<FenceAlarmDO> selectPage(FenceAlarmPageReqVO reqVO) { |
|||
return selectPage(reqVO, new LambdaQueryWrapperX<FenceAlarmDO>() |
|||
.eqIfPresent(FenceAlarmDO::getDetectorId, reqVO.getDetectorId()) |
|||
.eqIfPresent(FenceAlarmDO::getFenceId, reqVO.getFenceId()) |
|||
.eqIfPresent(FenceAlarmDO::getType, reqVO.getType()) |
|||
.eqIfPresent(FenceAlarmDO::getPicX, reqVO.getPicX()) |
|||
.eqIfPresent(FenceAlarmDO::getPicY, reqVO.getPicY()) |
|||
.eqIfPresent(FenceAlarmDO::getDistance, reqVO.getDistance()) |
|||
.eqIfPresent(FenceAlarmDO::getMaxDistance, reqVO.getMaxDistance()) |
|||
.eqIfPresent(FenceAlarmDO::getTAlarmStart, reqVO.getTAlarmStart()) |
|||
.eqIfPresent(FenceAlarmDO::getTAlarmEnd, reqVO.getTAlarmEnd()) |
|||
.eqIfPresent(FenceAlarmDO::getStatus, reqVO.getStatus()) |
|||
.eqIfPresent(FenceAlarmDO::getRemark, reqVO.getRemark()) |
|||
.eqIfPresent(FenceAlarmDO::getDelFlag, reqVO.getDelFlag()) |
|||
.eqIfPresent(FenceAlarmDO::getCreateBy, reqVO.getCreateBy()) |
|||
.betweenIfPresent(FenceAlarmDO::getCreateTime, reqVO.getCreateTime()) |
|||
.eqIfPresent(FenceAlarmDO::getUpdateBy, reqVO.getUpdateBy()) |
|||
.orderByDesc(FenceAlarmDO::getId)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,34 @@ |
|||
package cn.iocoder.yudao.module.hand.mapper; |
|||
|
|||
import java.util.*; |
|||
|
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; |
|||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; |
|||
import cn.iocoder.yudao.module.hand.dal.FenceDO; |
|||
import cn.iocoder.yudao.module.hand.vo.FencePageReqVO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* GAS电子围栏 Mapper |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Mapper |
|||
public interface FenceMapper extends BaseMapperX<FenceDO> { |
|||
|
|||
default PageResult<FenceDO> selectPage(FencePageReqVO reqVO) { |
|||
return selectPage(reqVO, new LambdaQueryWrapperX<FenceDO>() |
|||
.likeIfPresent(FenceDO::getName, reqVO.getName()) |
|||
.eqIfPresent(FenceDO::getFenceRange, reqVO.getFenceRange()) |
|||
.eqIfPresent(FenceDO::getStatus, reqVO.getStatus()) |
|||
.eqIfPresent(FenceDO::getType, reqVO.getType()) |
|||
.eqIfPresent(FenceDO::getRemark, reqVO.getRemark()) |
|||
.eqIfPresent(FenceDO::getDelFlag, reqVO.getDelFlag()) |
|||
.eqIfPresent(FenceDO::getCreateBy, reqVO.getCreateBy()) |
|||
.betweenIfPresent(FenceDO::getCreateTime, reqVO.getCreateTime()) |
|||
.eqIfPresent(FenceDO::getUpdateBy, reqVO.getUpdateBy()) |
|||
.orderByDesc(FenceDO::getId)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,34 @@ |
|||
package cn.iocoder.yudao.module.hand.mapper; |
|||
|
|||
import java.util.*; |
|||
|
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; |
|||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; |
|||
import cn.iocoder.yudao.module.hand.dal.GasTypeDO; |
|||
import cn.iocoder.yudao.module.hand.vo.GasTypePageReqVO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* GAS气体 Mapper |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Mapper |
|||
public interface GasTypeMapper extends BaseMapperX<GasTypeDO> { |
|||
|
|||
default PageResult<GasTypeDO> selectPage(GasTypePageReqVO reqVO) { |
|||
return selectPage(reqVO, new LambdaQueryWrapperX<GasTypeDO>() |
|||
.likeIfPresent(GasTypeDO::getName, reqVO.getName()) |
|||
.eqIfPresent(GasTypeDO::getChemical, reqVO.getChemical()) |
|||
.eqIfPresent(GasTypeDO::getUnit, reqVO.getUnit()) |
|||
.eqIfPresent(GasTypeDO::getSortOrder, reqVO.getSortOrder()) |
|||
.eqIfPresent(GasTypeDO::getRemark, reqVO.getRemark()) |
|||
.eqIfPresent(GasTypeDO::getDelFlag, reqVO.getDelFlag()) |
|||
.eqIfPresent(GasTypeDO::getCreateBy, reqVO.getCreateBy()) |
|||
.betweenIfPresent(GasTypeDO::getCreateTime, reqVO.getCreateTime()) |
|||
.eqIfPresent(GasTypeDO::getUpdateBy, reqVO.getUpdateBy()) |
|||
.orderByDesc(GasTypeDO::getId)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,41 @@ |
|||
package cn.iocoder.yudao.module.hand.mapper; |
|||
|
|||
import java.util.*; |
|||
|
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; |
|||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; |
|||
import cn.iocoder.yudao.module.hand.dal.HandAlarmDO; |
|||
import cn.iocoder.yudao.module.hand.vo.HandAlarmPageReqVO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* GAS手持探测器警报 Mapper |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Mapper |
|||
public interface HandAlarmMapper extends BaseMapperX<HandAlarmDO> { |
|||
|
|||
default PageResult<HandAlarmDO> selectPage(HandAlarmPageReqVO reqVO) { |
|||
return selectPage(reqVO, new LambdaQueryWrapperX<HandAlarmDO>() |
|||
.eqIfPresent(HandAlarmDO::getAlarmLevel, reqVO.getAlarmLevel()) |
|||
.eqIfPresent(HandAlarmDO::getGasType, reqVO.getGasType()) |
|||
.eqIfPresent(HandAlarmDO::getUnit, reqVO.getUnit()) |
|||
.eqIfPresent(HandAlarmDO::getLocation, reqVO.getLocation()) |
|||
.eqIfPresent(HandAlarmDO::getPicX, reqVO.getPicX()) |
|||
.eqIfPresent(HandAlarmDO::getPicY, reqVO.getPicY()) |
|||
.eqIfPresent(HandAlarmDO::getVAlarmFirst, reqVO.getVAlarmFirst()) |
|||
.eqIfPresent(HandAlarmDO::getVAlarmMaximum, reqVO.getVAlarmMaximum()) |
|||
.eqIfPresent(HandAlarmDO::getTAlarmStart, reqVO.getTAlarmStart()) |
|||
.eqIfPresent(HandAlarmDO::getTAlarmEnd, reqVO.getTAlarmEnd()) |
|||
.eqIfPresent(HandAlarmDO::getStatus, reqVO.getStatus()) |
|||
.eqIfPresent(HandAlarmDO::getRemark, reqVO.getRemark()) |
|||
.eqIfPresent(HandAlarmDO::getDelFlag, reqVO.getDelFlag()) |
|||
.eqIfPresent(HandAlarmDO::getCreateBy, reqVO.getCreateBy()) |
|||
.betweenIfPresent(HandAlarmDO::getCreateTime, reqVO.getCreateTime()) |
|||
.eqIfPresent(HandAlarmDO::getUpdateBy, reqVO.getUpdateBy()) |
|||
.orderByDesc(HandAlarmDO::getId)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,46 @@ |
|||
package cn.iocoder.yudao.module.hand.mapper; |
|||
|
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; |
|||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; |
|||
import cn.iocoder.yudao.module.hand.dal.HandDetectorDO; |
|||
import cn.iocoder.yudao.module.hand.vo.HandDetectorPageReqVO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* GAS手持探测器 Mapper |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Mapper |
|||
public interface HandDetectorMapper extends BaseMapperX<HandDetectorDO> { |
|||
|
|||
default PageResult<HandDetectorDO> selectPage(HandDetectorPageReqVO reqVO) { |
|||
return selectPage(reqVO, new LambdaQueryWrapperX<HandDetectorDO>() |
|||
.eqIfPresent(HandDetectorDO::getSn, reqVO.getSn()) |
|||
.likeIfPresent(HandDetectorDO::getName, reqVO.getName()) |
|||
.eqIfPresent(HandDetectorDO::getFenceId, reqVO.getFenceId()) |
|||
.eqIfPresent(HandDetectorDO::getGasTypeId, reqVO.getGasTypeId()) |
|||
.eqIfPresent(HandDetectorDO::getGasChemical, reqVO.getGasChemical()) |
|||
.eqIfPresent(HandDetectorDO::getMin, reqVO.getMin()) |
|||
.eqIfPresent(HandDetectorDO::getMax, reqVO.getMax()) |
|||
.eqIfPresent(HandDetectorDO::getStatus, reqVO.getStatus()) |
|||
.eqIfPresent(HandDetectorDO::getUnit, reqVO.getUnit()) |
|||
.eqIfPresent(HandDetectorDO::getModel, reqVO.getModel()) |
|||
.eqIfPresent(HandDetectorDO::getManufacturer, reqVO.getManufacturer()) |
|||
.eqIfPresent(HandDetectorDO::getEnableStatus, reqVO.getEnableStatus()) |
|||
.eqIfPresent(HandDetectorDO::getPicX, reqVO.getPicX()) |
|||
.eqIfPresent(HandDetectorDO::getPicY, reqVO.getPicY()) |
|||
.eqIfPresent(HandDetectorDO::getLongitude, reqVO.getLongitude()) |
|||
.eqIfPresent(HandDetectorDO::getLatitude, reqVO.getLatitude()) |
|||
.eqIfPresent(HandDetectorDO::getAccuracy, reqVO.getAccuracy()) |
|||
.eqIfPresent(HandDetectorDO::getSortOrder, reqVO.getSortOrder()) |
|||
.eqIfPresent(HandDetectorDO::getRemark, reqVO.getRemark()) |
|||
.eqIfPresent(HandDetectorDO::getDelFlag, reqVO.getDelFlag()) |
|||
.eqIfPresent(HandDetectorDO::getCreateBy, reqVO.getCreateBy()) |
|||
.betweenIfPresent(HandDetectorDO::getCreateTime, reqVO.getCreateTime()) |
|||
.eqIfPresent(HandDetectorDO::getUpdateBy, reqVO.getUpdateBy()) |
|||
.orderByDesc(HandDetectorDO::getId)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,2 @@ |
|||
|
|||
package cn.iocoder.yudao.module.lock; |
@ -0,0 +1,64 @@ |
|||
package cn.iocoder.yudao.module.hand.service; |
|||
|
|||
import java.util.*; |
|||
|
|||
import cn.iocoder.yudao.module.hand.dal.AlarmRuleDO; |
|||
import cn.iocoder.yudao.module.hand.vo.AlarmRulePageReqVO; |
|||
import cn.iocoder.yudao.module.hand.vo.AlarmRuleSaveReqVO; |
|||
import jakarta.validation.*; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
|
|||
/** |
|||
* GAS警报规则 Service 接口 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
public interface AlarmRuleService { |
|||
|
|||
/** |
|||
* 创建GAS警报规则 |
|||
* |
|||
* @param createReqVO 创建信息 |
|||
* @return 编号 |
|||
*/ |
|||
String createAlarmRule(@Valid AlarmRuleSaveReqVO createReqVO); |
|||
|
|||
/** |
|||
* 更新GAS警报规则 |
|||
* |
|||
* @param updateReqVO 更新信息 |
|||
*/ |
|||
void updateAlarmRule(@Valid AlarmRuleSaveReqVO updateReqVO); |
|||
|
|||
/** |
|||
* 删除GAS警报规则 |
|||
* |
|||
* @param id 编号 |
|||
*/ |
|||
void deleteAlarmRule(String id); |
|||
|
|||
/** |
|||
* 批量删除GAS警报规则 |
|||
* |
|||
* @param ids 编号 |
|||
*/ |
|||
void deleteAlarmRuleListByIds(List<String> ids); |
|||
|
|||
/** |
|||
* 获得GAS警报规则 |
|||
* |
|||
* @param id 编号 |
|||
* @return GAS警报规则 |
|||
*/ |
|||
AlarmRuleDO getAlarmRule(String id); |
|||
|
|||
/** |
|||
* 获得GAS警报规则分页 |
|||
* |
|||
* @param pageReqVO 分页查询 |
|||
* @return GAS警报规则分页 |
|||
*/ |
|||
PageResult<AlarmRuleDO> getAlarmRulePage(AlarmRulePageReqVO pageReqVO); |
|||
|
|||
} |
@ -0,0 +1,64 @@ |
|||
package cn.iocoder.yudao.module.hand.service; |
|||
|
|||
import java.util.*; |
|||
|
|||
import cn.iocoder.yudao.module.hand.dal.AlarmTypeDO; |
|||
import cn.iocoder.yudao.module.hand.vo.AlarmTypePageReqVO; |
|||
import cn.iocoder.yudao.module.hand.vo.AlarmTypeSaveReqVO; |
|||
import jakarta.validation.*; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
|
|||
/** |
|||
* GAS警报类型 Service 接口 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
public interface AlarmTypeService { |
|||
|
|||
/** |
|||
* 创建GAS警报类型 |
|||
* |
|||
* @param createReqVO 创建信息 |
|||
* @return 编号 |
|||
*/ |
|||
String createAlarmType(@Valid AlarmTypeSaveReqVO createReqVO); |
|||
|
|||
/** |
|||
* 更新GAS警报类型 |
|||
* |
|||
* @param updateReqVO 更新信息 |
|||
*/ |
|||
void updateAlarmType(@Valid AlarmTypeSaveReqVO updateReqVO); |
|||
|
|||
/** |
|||
* 删除GAS警报类型 |
|||
* |
|||
* @param id 编号 |
|||
*/ |
|||
void deleteAlarmType(String id); |
|||
|
|||
/** |
|||
* 批量删除GAS警报类型 |
|||
* |
|||
* @param ids 编号 |
|||
*/ |
|||
void deleteAlarmTypeListByIds(List<String> ids); |
|||
|
|||
/** |
|||
* 获得GAS警报类型 |
|||
* |
|||
* @param id 编号 |
|||
* @return GAS警报类型 |
|||
*/ |
|||
AlarmTypeDO getAlarmType(String id); |
|||
|
|||
/** |
|||
* 获得GAS警报类型分页 |
|||
* |
|||
* @param pageReqVO 分页查询 |
|||
* @return GAS警报类型分页 |
|||
*/ |
|||
PageResult<AlarmTypeDO> getAlarmTypePage(AlarmTypePageReqVO pageReqVO); |
|||
|
|||
} |
@ -0,0 +1,64 @@ |
|||
package cn.iocoder.yudao.module.hand.service; |
|||
|
|||
import java.util.*; |
|||
|
|||
import cn.iocoder.yudao.module.hand.dal.FenceAlarmDO; |
|||
import cn.iocoder.yudao.module.hand.vo.FenceAlarmPageReqVO; |
|||
import cn.iocoder.yudao.module.hand.vo.FenceAlarmSaveReqVO; |
|||
import jakarta.validation.*; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
|
|||
/** |
|||
* GAS手持探测器围栏报警 Service 接口 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
public interface FenceAlarmService { |
|||
|
|||
/** |
|||
* 创建GAS手持探测器围栏报警 |
|||
* |
|||
* @param createReqVO 创建信息 |
|||
* @return 编号 |
|||
*/ |
|||
String createFenceAlarm(@Valid FenceAlarmSaveReqVO createReqVO); |
|||
|
|||
/** |
|||
* 更新GAS手持探测器围栏报警 |
|||
* |
|||
* @param updateReqVO 更新信息 |
|||
*/ |
|||
void updateFenceAlarm(@Valid FenceAlarmSaveReqVO updateReqVO); |
|||
|
|||
/** |
|||
* 删除GAS手持探测器围栏报警 |
|||
* |
|||
* @param id 编号 |
|||
*/ |
|||
void deleteFenceAlarm(String id); |
|||
|
|||
/** |
|||
* 批量删除GAS手持探测器围栏报警 |
|||
* |
|||
* @param ids 编号 |
|||
*/ |
|||
void deleteFenceAlarmListByIds(List<String> ids); |
|||
|
|||
/** |
|||
* 获得GAS手持探测器围栏报警 |
|||
* |
|||
* @param id 编号 |
|||
* @return GAS手持探测器围栏报警 |
|||
*/ |
|||
FenceAlarmDO getFenceAlarm(String id); |
|||
|
|||
/** |
|||
* 获得GAS手持探测器围栏报警分页 |
|||
* |
|||
* @param pageReqVO 分页查询 |
|||
* @return GAS手持探测器围栏报警分页 |
|||
*/ |
|||
PageResult<FenceAlarmDO> getFenceAlarmPage(FenceAlarmPageReqVO pageReqVO); |
|||
|
|||
} |
@ -0,0 +1,64 @@ |
|||
package cn.iocoder.yudao.module.hand.service; |
|||
|
|||
import java.util.*; |
|||
|
|||
import cn.iocoder.yudao.module.hand.dal.FenceDO; |
|||
import cn.iocoder.yudao.module.hand.vo.FencePageReqVO; |
|||
import cn.iocoder.yudao.module.hand.vo.FenceSaveReqVO; |
|||
import jakarta.validation.*; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
|
|||
/** |
|||
* GAS电子围栏 Service 接口 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
public interface FenceService { |
|||
|
|||
/** |
|||
* 创建GAS电子围栏 |
|||
* |
|||
* @param createReqVO 创建信息 |
|||
* @return 编号 |
|||
*/ |
|||
String createFence(@Valid FenceSaveReqVO createReqVO); |
|||
|
|||
/** |
|||
* 更新GAS电子围栏 |
|||
* |
|||
* @param updateReqVO 更新信息 |
|||
*/ |
|||
void updateFence(@Valid FenceSaveReqVO updateReqVO); |
|||
|
|||
/** |
|||
* 删除GAS电子围栏 |
|||
* |
|||
* @param id 编号 |
|||
*/ |
|||
void deleteFence(String id); |
|||
|
|||
/** |
|||
* 批量删除GAS电子围栏 |
|||
* |
|||
* @param ids 编号 |
|||
*/ |
|||
void deleteFenceListByIds(List<String> ids); |
|||
|
|||
/** |
|||
* 获得GAS电子围栏 |
|||
* |
|||
* @param id 编号 |
|||
* @return GAS电子围栏 |
|||
*/ |
|||
FenceDO getFence(String id); |
|||
|
|||
/** |
|||
* 获得GAS电子围栏分页 |
|||
* |
|||
* @param pageReqVO 分页查询 |
|||
* @return GAS电子围栏分页 |
|||
*/ |
|||
PageResult<FenceDO> getFencePage(FencePageReqVO pageReqVO); |
|||
|
|||
} |
@ -0,0 +1,64 @@ |
|||
package cn.iocoder.yudao.module.hand.service; |
|||
|
|||
import java.util.*; |
|||
|
|||
import cn.iocoder.yudao.module.hand.dal.GasTypeDO; |
|||
import cn.iocoder.yudao.module.hand.vo.GasTypePageReqVO; |
|||
import cn.iocoder.yudao.module.hand.vo.GasTypeSaveReqVO; |
|||
import jakarta.validation.*; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
|
|||
/** |
|||
* GAS气体 Service 接口 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
public interface GasTypeService { |
|||
|
|||
/** |
|||
* 创建GAS气体 |
|||
* |
|||
* @param createReqVO 创建信息 |
|||
* @return 编号 |
|||
*/ |
|||
String createType(@Valid GasTypeSaveReqVO createReqVO); |
|||
|
|||
/** |
|||
* 更新GAS气体 |
|||
* |
|||
* @param updateReqVO 更新信息 |
|||
*/ |
|||
void updateType(@Valid GasTypeSaveReqVO updateReqVO); |
|||
|
|||
/** |
|||
* 删除GAS气体 |
|||
* |
|||
* @param id 编号 |
|||
*/ |
|||
void deleteType(String id); |
|||
|
|||
/** |
|||
* 批量删除GAS气体 |
|||
* |
|||
* @param ids 编号 |
|||
*/ |
|||
void deleteTypeListByIds(List<String> ids); |
|||
|
|||
/** |
|||
* 获得GAS气体 |
|||
* |
|||
* @param id 编号 |
|||
* @return GAS气体 |
|||
*/ |
|||
GasTypeDO getType(String id); |
|||
|
|||
/** |
|||
* 获得GAS气体分页 |
|||
* |
|||
* @param pageReqVO 分页查询 |
|||
* @return GAS气体分页 |
|||
*/ |
|||
PageResult<GasTypeDO> getTypePage(GasTypePageReqVO pageReqVO); |
|||
|
|||
} |
@ -0,0 +1,64 @@ |
|||
package cn.iocoder.yudao.module.hand.service; |
|||
|
|||
import java.util.*; |
|||
|
|||
import cn.iocoder.yudao.module.hand.dal.HandAlarmDO; |
|||
import cn.iocoder.yudao.module.hand.vo.HandAlarmPageReqVO; |
|||
import cn.iocoder.yudao.module.hand.vo.HandAlarmSaveReqVO; |
|||
import jakarta.validation.*; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
|
|||
/** |
|||
* GAS手持探测器警报 Service 接口 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
public interface HandAlarmService { |
|||
|
|||
/** |
|||
* 创建GAS手持探测器警报 |
|||
* |
|||
* @param createReqVO 创建信息 |
|||
* @return 编号 |
|||
*/ |
|||
String createHandAlarm(@Valid HandAlarmSaveReqVO createReqVO); |
|||
|
|||
/** |
|||
* 更新GAS手持探测器警报 |
|||
* |
|||
* @param updateReqVO 更新信息 |
|||
*/ |
|||
void updateHandAlarm(@Valid HandAlarmSaveReqVO updateReqVO); |
|||
|
|||
/** |
|||
* 删除GAS手持探测器警报 |
|||
* |
|||
* @param id 编号 |
|||
*/ |
|||
void deleteHandAlarm(String id); |
|||
|
|||
/** |
|||
* 批量删除GAS手持探测器警报 |
|||
* |
|||
* @param ids 编号 |
|||
*/ |
|||
void deleteHandAlarmListByIds(List<String> ids); |
|||
|
|||
/** |
|||
* 获得GAS手持探测器警报 |
|||
* |
|||
* @param id 编号 |
|||
* @return GAS手持探测器警报 |
|||
*/ |
|||
HandAlarmDO getHandAlarm(String id); |
|||
|
|||
/** |
|||
* 获得GAS手持探测器警报分页 |
|||
* |
|||
* @param pageReqVO 分页查询 |
|||
* @return GAS手持探测器警报分页 |
|||
*/ |
|||
PageResult<HandAlarmDO> getHandAlarmPage(HandAlarmPageReqVO pageReqVO); |
|||
|
|||
} |
@ -0,0 +1,64 @@ |
|||
package cn.iocoder.yudao.module.hand.service; |
|||
|
|||
import java.util.*; |
|||
|
|||
import cn.iocoder.yudao.module.hand.dal.HandDetectorDO; |
|||
import cn.iocoder.yudao.module.hand.vo.HandDetectorPageReqVO; |
|||
import cn.iocoder.yudao.module.hand.vo.HandDetectorSaveReqVO; |
|||
import jakarta.validation.*; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
|
|||
/** |
|||
* GAS手持探测器 Service 接口 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
public interface HandDetectorService { |
|||
|
|||
/** |
|||
* 创建GAS手持探测器 |
|||
* |
|||
* @param createReqVO 创建信息 |
|||
* @return 编号 |
|||
*/ |
|||
String createHandDetector(@Valid HandDetectorSaveReqVO createReqVO); |
|||
|
|||
/** |
|||
* 更新GAS手持探测器 |
|||
* |
|||
* @param updateReqVO 更新信息 |
|||
*/ |
|||
void updateHandDetector(@Valid HandDetectorSaveReqVO updateReqVO); |
|||
|
|||
/** |
|||
* 删除GAS手持探测器 |
|||
* |
|||
* @param id 编号 |
|||
*/ |
|||
void deleteHandDetector(String id); |
|||
|
|||
/** |
|||
* 批量删除GAS手持探测器 |
|||
* |
|||
* @param ids 编号 |
|||
*/ |
|||
void deleteHandDetectorListByIds(List<String> ids); |
|||
|
|||
/** |
|||
* 获得GAS手持探测器 |
|||
* |
|||
* @param id 编号 |
|||
* @return GAS手持探测器 |
|||
*/ |
|||
HandDetectorDO getHandDetector(String id); |
|||
|
|||
/** |
|||
* 获得GAS手持探测器分页 |
|||
* |
|||
* @param pageReqVO 分页查询 |
|||
* @return GAS手持探测器分页 |
|||
*/ |
|||
PageResult<HandDetectorDO> getHandDetectorPage(HandDetectorPageReqVO pageReqVO); |
|||
|
|||
} |
@ -0,0 +1,87 @@ |
|||
package cn.iocoder.yudao.module.hand.service.impl; |
|||
|
|||
import cn.hutool.core.collection.CollUtil; |
|||
import cn.iocoder.yudao.module.hand.dal.AlarmRuleDO; |
|||
import cn.iocoder.yudao.module.hand.mapper.AlarmRuleMapper; |
|||
import cn.iocoder.yudao.module.hand.service.AlarmRuleService; |
|||
import cn.iocoder.yudao.module.hand.vo.AlarmRulePageReqVO; |
|||
import cn.iocoder.yudao.module.hand.vo.AlarmRuleSaveReqVO; |
|||
import org.springframework.stereotype.Service; |
|||
import jakarta.annotation.Resource; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.*; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
|||
|
|||
|
|||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
|||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
|||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList; |
|||
import static cn.iocoder.yudao.module.hand.enums.ErrorCodeConstants.ALARM_RULE_NOT_EXISTS; |
|||
|
|||
/** |
|||
* GAS警报规则 Service 实现类 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Service |
|||
@Validated |
|||
public class AlarmRuleServiceImpl implements AlarmRuleService { |
|||
|
|||
@Resource |
|||
private AlarmRuleMapper alarmRuleMapper; |
|||
|
|||
@Override |
|||
public String createAlarmRule(AlarmRuleSaveReqVO createReqVO) { |
|||
// 插入
|
|||
AlarmRuleDO alarmRule = BeanUtils.toBean(createReqVO, AlarmRuleDO.class); |
|||
alarmRuleMapper.insert(alarmRule); |
|||
|
|||
// 返回
|
|||
return alarmRule.getId(); |
|||
} |
|||
|
|||
@Override |
|||
public void updateAlarmRule(AlarmRuleSaveReqVO updateReqVO) { |
|||
// 校验存在
|
|||
validateAlarmRuleExists(updateReqVO.getId()); |
|||
// 更新
|
|||
AlarmRuleDO updateObj = BeanUtils.toBean(updateReqVO, AlarmRuleDO.class); |
|||
alarmRuleMapper.updateById(updateObj); |
|||
} |
|||
|
|||
@Override |
|||
public void deleteAlarmRule(String id) { |
|||
// 校验存在
|
|||
validateAlarmRuleExists(id); |
|||
// 删除
|
|||
alarmRuleMapper.deleteById(id); |
|||
} |
|||
|
|||
@Override |
|||
public void deleteAlarmRuleListByIds(List<String> ids) { |
|||
// 删除
|
|||
alarmRuleMapper.deleteByIds(ids); |
|||
} |
|||
|
|||
|
|||
private void validateAlarmRuleExists(String id) { |
|||
if (alarmRuleMapper.selectById(id) == null) { |
|||
throw exception(ALARM_RULE_NOT_EXISTS); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public AlarmRuleDO getAlarmRule(String id) { |
|||
return alarmRuleMapper.selectById(id); |
|||
} |
|||
|
|||
@Override |
|||
public PageResult<AlarmRuleDO> getAlarmRulePage(AlarmRulePageReqVO pageReqVO) { |
|||
return alarmRuleMapper.selectPage(pageReqVO); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,87 @@ |
|||
package cn.iocoder.yudao.module.hand.service.impl; |
|||
|
|||
import cn.hutool.core.collection.CollUtil; |
|||
import cn.iocoder.yudao.module.hand.dal.AlarmTypeDO; |
|||
import cn.iocoder.yudao.module.hand.mapper.AlarmTypeMapper; |
|||
import cn.iocoder.yudao.module.hand.service.AlarmTypeService; |
|||
import cn.iocoder.yudao.module.hand.vo.AlarmTypePageReqVO; |
|||
import cn.iocoder.yudao.module.hand.vo.AlarmTypeSaveReqVO; |
|||
import org.springframework.stereotype.Service; |
|||
import jakarta.annotation.Resource; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.*; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
|||
|
|||
|
|||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
|||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
|||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList; |
|||
import static cn.iocoder.yudao.module.hand.enums.ErrorCodeConstants.ALARM_TYPE_NOT_EXISTS; |
|||
|
|||
/** |
|||
* GAS警报类型 Service 实现类 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Service |
|||
@Validated |
|||
public class AlarmTypeServiceImpl implements AlarmTypeService { |
|||
|
|||
@Resource |
|||
private AlarmTypeMapper alarmTypeMapper; |
|||
|
|||
@Override |
|||
public String createAlarmType(AlarmTypeSaveReqVO createReqVO) { |
|||
// 插入
|
|||
AlarmTypeDO alarmType = BeanUtils.toBean(createReqVO, AlarmTypeDO.class); |
|||
alarmTypeMapper.insert(alarmType); |
|||
|
|||
// 返回
|
|||
return alarmType.getId(); |
|||
} |
|||
|
|||
@Override |
|||
public void updateAlarmType(AlarmTypeSaveReqVO updateReqVO) { |
|||
// 校验存在
|
|||
validateAlarmTypeExists(updateReqVO.getId()); |
|||
// 更新
|
|||
AlarmTypeDO updateObj = BeanUtils.toBean(updateReqVO, AlarmTypeDO.class); |
|||
alarmTypeMapper.updateById(updateObj); |
|||
} |
|||
|
|||
@Override |
|||
public void deleteAlarmType(String id) { |
|||
// 校验存在
|
|||
validateAlarmTypeExists(id); |
|||
// 删除
|
|||
alarmTypeMapper.deleteById(id); |
|||
} |
|||
|
|||
@Override |
|||
public void deleteAlarmTypeListByIds(List<String> ids) { |
|||
// 删除
|
|||
alarmTypeMapper.deleteByIds(ids); |
|||
} |
|||
|
|||
|
|||
private void validateAlarmTypeExists(String id) { |
|||
if (alarmTypeMapper.selectById(id) == null) { |
|||
throw exception(ALARM_TYPE_NOT_EXISTS); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public AlarmTypeDO getAlarmType(String id) { |
|||
return alarmTypeMapper.selectById(id); |
|||
} |
|||
|
|||
@Override |
|||
public PageResult<AlarmTypeDO> getAlarmTypePage(AlarmTypePageReqVO pageReqVO) { |
|||
return alarmTypeMapper.selectPage(pageReqVO); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,86 @@ |
|||
package cn.iocoder.yudao.module.hand.service.impl; |
|||
|
|||
import cn.hutool.core.collection.CollUtil; |
|||
import cn.iocoder.yudao.module.hand.dal.FenceAlarmDO; |
|||
import cn.iocoder.yudao.module.hand.mapper.FenceAlarmMapper; |
|||
import cn.iocoder.yudao.module.hand.service.FenceAlarmService; |
|||
import cn.iocoder.yudao.module.hand.vo.FenceAlarmPageReqVO; |
|||
import cn.iocoder.yudao.module.hand.vo.FenceAlarmSaveReqVO; |
|||
import org.springframework.stereotype.Service; |
|||
import jakarta.annotation.Resource; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.*; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
|||
|
|||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
|||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
|||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList; |
|||
import static cn.iocoder.yudao.module.hand.enums.ErrorCodeConstants.FENCE_ALARM_NOT_EXISTS; |
|||
|
|||
/** |
|||
* GAS手持探测器围栏报警 Service 实现类 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Service |
|||
@Validated |
|||
public class FenceAlarmServiceImpl implements FenceAlarmService { |
|||
|
|||
@Resource |
|||
private FenceAlarmMapper fenceAlarmMapper; |
|||
|
|||
@Override |
|||
public String createFenceAlarm(FenceAlarmSaveReqVO createReqVO) { |
|||
// 插入
|
|||
FenceAlarmDO fenceAlarm = BeanUtils.toBean(createReqVO, FenceAlarmDO.class); |
|||
fenceAlarmMapper.insert(fenceAlarm); |
|||
|
|||
// 返回
|
|||
return fenceAlarm.getId(); |
|||
} |
|||
|
|||
@Override |
|||
public void updateFenceAlarm(FenceAlarmSaveReqVO updateReqVO) { |
|||
// 校验存在
|
|||
validateFenceAlarmExists(updateReqVO.getId()); |
|||
// 更新
|
|||
FenceAlarmDO updateObj = BeanUtils.toBean(updateReqVO, FenceAlarmDO.class); |
|||
fenceAlarmMapper.updateById(updateObj); |
|||
} |
|||
|
|||
@Override |
|||
public void deleteFenceAlarm(String id) { |
|||
// 校验存在
|
|||
validateFenceAlarmExists(id); |
|||
// 删除
|
|||
fenceAlarmMapper.deleteById(id); |
|||
} |
|||
|
|||
@Override |
|||
public void deleteFenceAlarmListByIds(List<String> ids) { |
|||
// 删除
|
|||
fenceAlarmMapper.deleteByIds(ids); |
|||
} |
|||
|
|||
|
|||
private void validateFenceAlarmExists(String id) { |
|||
if (fenceAlarmMapper.selectById(id) == null) { |
|||
throw exception(FENCE_ALARM_NOT_EXISTS); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public FenceAlarmDO getFenceAlarm(String id) { |
|||
return fenceAlarmMapper.selectById(id); |
|||
} |
|||
|
|||
@Override |
|||
public PageResult<FenceAlarmDO> getFenceAlarmPage(FenceAlarmPageReqVO pageReqVO) { |
|||
return fenceAlarmMapper.selectPage(pageReqVO); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,88 @@ |
|||
package cn.iocoder.yudao.module.hand.service.impl; |
|||
|
|||
import cn.hutool.core.collection.CollUtil; |
|||
import cn.iocoder.yudao.module.hand.dal.FenceDO; |
|||
import cn.iocoder.yudao.module.hand.mapper.FenceMapper; |
|||
import cn.iocoder.yudao.module.hand.service.FenceService; |
|||
import cn.iocoder.yudao.module.hand.vo.FencePageReqVO; |
|||
import cn.iocoder.yudao.module.hand.vo.FenceSaveReqVO; |
|||
import org.springframework.stereotype.Service; |
|||
import jakarta.annotation.Resource; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.*; |
|||
|
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
|||
|
|||
|
|||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
|||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
|||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList; |
|||
import static cn.iocoder.yudao.module.hand.enums.ErrorCodeConstants.FENCE_NOT_EXISTS; |
|||
|
|||
/** |
|||
* GAS电子围栏 Service 实现类 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Service |
|||
@Validated |
|||
public class FenceServiceImpl implements FenceService { |
|||
|
|||
@Resource |
|||
private FenceMapper fenceMapper; |
|||
|
|||
@Override |
|||
public String createFence(FenceSaveReqVO createReqVO) { |
|||
// 插入
|
|||
FenceDO fence = BeanUtils.toBean(createReqVO, FenceDO.class); |
|||
fenceMapper.insert(fence); |
|||
|
|||
// 返回
|
|||
return fence.getId(); |
|||
} |
|||
|
|||
@Override |
|||
public void updateFence(FenceSaveReqVO updateReqVO) { |
|||
// 校验存在
|
|||
validateFenceExists(updateReqVO.getId()); |
|||
// 更新
|
|||
FenceDO updateObj = BeanUtils.toBean(updateReqVO, FenceDO.class); |
|||
fenceMapper.updateById(updateObj); |
|||
} |
|||
|
|||
@Override |
|||
public void deleteFence(String id) { |
|||
// 校验存在
|
|||
validateFenceExists(id); |
|||
// 删除
|
|||
fenceMapper.deleteById(id); |
|||
} |
|||
|
|||
@Override |
|||
public void deleteFenceListByIds(List<String> ids) { |
|||
// 删除
|
|||
fenceMapper.deleteByIds(ids); |
|||
} |
|||
|
|||
|
|||
private void validateFenceExists(String id) { |
|||
if (fenceMapper.selectById(id) == null) { |
|||
throw exception(FENCE_NOT_EXISTS); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public FenceDO getFence(String id) { |
|||
return fenceMapper.selectById(id); |
|||
} |
|||
|
|||
@Override |
|||
public PageResult<FenceDO> getFencePage(FencePageReqVO pageReqVO) { |
|||
return fenceMapper.selectPage(pageReqVO); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,87 @@ |
|||
package cn.iocoder.yudao.module.hand.service.impl; |
|||
|
|||
import cn.hutool.core.collection.CollUtil; |
|||
import cn.iocoder.yudao.module.hand.dal.GasTypeDO; |
|||
import cn.iocoder.yudao.module.hand.mapper.GasTypeMapper; |
|||
import cn.iocoder.yudao.module.hand.service.GasTypeService; |
|||
import cn.iocoder.yudao.module.hand.vo.GasTypePageReqVO; |
|||
import cn.iocoder.yudao.module.hand.vo.GasTypeSaveReqVO; |
|||
import org.springframework.stereotype.Service; |
|||
import jakarta.annotation.Resource; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.*; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
|||
|
|||
|
|||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
|||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
|||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList; |
|||
import static cn.iocoder.yudao.module.hand.enums.ErrorCodeConstants.TYPE_NOT_EXISTS; |
|||
|
|||
/** |
|||
* GAS气体 Service 实现类 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Service |
|||
@Validated |
|||
public class GasTypeServiceImpl implements GasTypeService { |
|||
|
|||
@Resource |
|||
private GasTypeMapper typeMapper; |
|||
|
|||
@Override |
|||
public String createType(GasTypeSaveReqVO createReqVO) { |
|||
// 插入
|
|||
GasTypeDO type = BeanUtils.toBean(createReqVO, GasTypeDO.class); |
|||
typeMapper.insert(type); |
|||
|
|||
// 返回
|
|||
return type.getId(); |
|||
} |
|||
|
|||
@Override |
|||
public void updateType(GasTypeSaveReqVO updateReqVO) { |
|||
// 校验存在
|
|||
validateTypeExists(updateReqVO.getId()); |
|||
// 更新
|
|||
GasTypeDO updateObj = BeanUtils.toBean(updateReqVO, GasTypeDO.class); |
|||
typeMapper.updateById(updateObj); |
|||
} |
|||
|
|||
@Override |
|||
public void deleteType(String id) { |
|||
// 校验存在
|
|||
validateTypeExists(id); |
|||
// 删除
|
|||
typeMapper.deleteById(id); |
|||
} |
|||
|
|||
@Override |
|||
public void deleteTypeListByIds(List<String> ids) { |
|||
// 删除
|
|||
typeMapper.deleteByIds(ids); |
|||
} |
|||
|
|||
|
|||
private void validateTypeExists(String id) { |
|||
if (typeMapper.selectById(id) == null) { |
|||
throw exception(TYPE_NOT_EXISTS); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public GasTypeDO getType(String id) { |
|||
return typeMapper.selectById(id); |
|||
} |
|||
|
|||
@Override |
|||
public PageResult<GasTypeDO> getTypePage(GasTypePageReqVO pageReqVO) { |
|||
return typeMapper.selectPage(pageReqVO); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,87 @@ |
|||
package cn.iocoder.yudao.module.hand.service.impl; |
|||
|
|||
import cn.hutool.core.collection.CollUtil; |
|||
import cn.iocoder.yudao.module.hand.dal.HandAlarmDO; |
|||
import cn.iocoder.yudao.module.hand.mapper.HandAlarmMapper; |
|||
import cn.iocoder.yudao.module.hand.service.HandAlarmService; |
|||
import cn.iocoder.yudao.module.hand.vo.HandAlarmPageReqVO; |
|||
import cn.iocoder.yudao.module.hand.vo.HandAlarmSaveReqVO; |
|||
import org.springframework.stereotype.Service; |
|||
import jakarta.annotation.Resource; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.*; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
|||
|
|||
|
|||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
|||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
|||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList; |
|||
import static cn.iocoder.yudao.module.hand.enums.ErrorCodeConstants.HAND_ALARM_NOT_EXISTS; |
|||
|
|||
/** |
|||
* GAS手持探测器警报 Service 实现类 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Service |
|||
@Validated |
|||
public class HandAlarmServiceImpl implements HandAlarmService { |
|||
|
|||
@Resource |
|||
private HandAlarmMapper handAlarmMapper; |
|||
|
|||
@Override |
|||
public String createHandAlarm(HandAlarmSaveReqVO createReqVO) { |
|||
// 插入
|
|||
HandAlarmDO handAlarm = BeanUtils.toBean(createReqVO, HandAlarmDO.class); |
|||
handAlarmMapper.insert(handAlarm); |
|||
|
|||
// 返回
|
|||
return handAlarm.getId(); |
|||
} |
|||
|
|||
@Override |
|||
public void updateHandAlarm(HandAlarmSaveReqVO updateReqVO) { |
|||
// 校验存在
|
|||
validateHandAlarmExists(updateReqVO.getId()); |
|||
// 更新
|
|||
HandAlarmDO updateObj = BeanUtils.toBean(updateReqVO, HandAlarmDO.class); |
|||
handAlarmMapper.updateById(updateObj); |
|||
} |
|||
|
|||
@Override |
|||
public void deleteHandAlarm(String id) { |
|||
// 校验存在
|
|||
validateHandAlarmExists(id); |
|||
// 删除
|
|||
handAlarmMapper.deleteById(id); |
|||
} |
|||
|
|||
@Override |
|||
public void deleteHandAlarmListByIds(List<String> ids) { |
|||
// 删除
|
|||
handAlarmMapper.deleteByIds(ids); |
|||
} |
|||
|
|||
|
|||
private void validateHandAlarmExists(String id) { |
|||
if (handAlarmMapper.selectById(id) == null) { |
|||
throw exception(HAND_ALARM_NOT_EXISTS); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public HandAlarmDO getHandAlarm(String id) { |
|||
return handAlarmMapper.selectById(id); |
|||
} |
|||
|
|||
@Override |
|||
public PageResult<HandAlarmDO> getHandAlarmPage(HandAlarmPageReqVO pageReqVO) { |
|||
return handAlarmMapper.selectPage(pageReqVO); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,83 @@ |
|||
package cn.iocoder.yudao.module.hand.service.impl; |
|||
|
|||
import cn.iocoder.yudao.module.hand.dal.HandDetectorDO; |
|||
import cn.iocoder.yudao.module.hand.mapper.HandDetectorMapper; |
|||
import cn.iocoder.yudao.module.hand.service.HandDetectorService; |
|||
import cn.iocoder.yudao.module.hand.vo.HandDetectorPageReqVO; |
|||
import cn.iocoder.yudao.module.hand.vo.HandDetectorSaveReqVO; |
|||
import org.springframework.stereotype.Service; |
|||
import jakarta.annotation.Resource; |
|||
import org.springframework.validation.annotation.Validated; |
|||
|
|||
import java.util.*; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
|||
|
|||
|
|||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
|||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
|||
import static cn.iocoder.yudao.module.hand.enums.ErrorCodeConstants.HAND_DETECTOR_NOT_EXISTS; |
|||
|
|||
/** |
|||
* GAS手持探测器 Service 实现类 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Service |
|||
@Validated |
|||
public class HandDetectorServiceImpl implements HandDetectorService { |
|||
|
|||
@Resource |
|||
private HandDetectorMapper handDetectorMapper; |
|||
|
|||
@Override |
|||
public String createHandDetector(HandDetectorSaveReqVO createReqVO) { |
|||
// 插入
|
|||
HandDetectorDO handDetector = BeanUtils.toBean(createReqVO, HandDetectorDO.class); |
|||
handDetectorMapper.insert(handDetector); |
|||
|
|||
// 返回
|
|||
return handDetector.getId(); |
|||
} |
|||
|
|||
@Override |
|||
public void updateHandDetector(HandDetectorSaveReqVO updateReqVO) { |
|||
// 校验存在
|
|||
validateHandDetectorExists(updateReqVO.getId()); |
|||
// 更新
|
|||
HandDetectorDO updateObj = BeanUtils.toBean(updateReqVO, HandDetectorDO.class); |
|||
handDetectorMapper.updateById(updateObj); |
|||
} |
|||
|
|||
@Override |
|||
public void deleteHandDetector(String id) { |
|||
// 校验存在
|
|||
validateHandDetectorExists(id); |
|||
// 删除
|
|||
handDetectorMapper.deleteById(id); |
|||
} |
|||
|
|||
@Override |
|||
public void deleteHandDetectorListByIds(List<String> ids) { |
|||
// 删除
|
|||
handDetectorMapper.deleteByIds(ids); |
|||
} |
|||
|
|||
|
|||
private void validateHandDetectorExists(String id) { |
|||
if (handDetectorMapper.selectById(id) == null) { |
|||
throw exception(HAND_DETECTOR_NOT_EXISTS); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public HandDetectorDO getHandDetector(String id) { |
|||
return handDetectorMapper.selectById(id); |
|||
} |
|||
|
|||
@Override |
|||
public PageResult<HandDetectorDO> getHandDetectorPage(HandDetectorPageReqVO pageReqVO) { |
|||
return handDetectorMapper.selectPage(pageReqVO); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,62 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - GAS警报规则分页 Request VO") |
|||
@Data |
|||
public class AlarmRulePageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "气体类型ID", example = "2833") |
|||
private String gasTypeId; |
|||
|
|||
@Schema(description = "警报类型ID", example = "12917") |
|||
private String alarmTypeId; |
|||
|
|||
@Schema(description = "警报名称", example = "赵六") |
|||
private String alarmName; |
|||
|
|||
@Schema(description = "警报名称颜色") |
|||
private String alarmNameColor; |
|||
|
|||
@Schema(description = "警报颜色") |
|||
private String alarmColor; |
|||
|
|||
@Schema(description = "警报方式/级别(0:正常状态;1:一级警报;2:二级警报;3:弹窗警报)") |
|||
private Integer alarmLevel; |
|||
|
|||
@Schema(description = "触发值(小)") |
|||
private Double min; |
|||
|
|||
@Schema(description = "触发值(大)") |
|||
private Double max; |
|||
|
|||
@Schema(description = "最值方向(0:小;1:大)") |
|||
private Integer direction; |
|||
|
|||
@Schema(description = "排序") |
|||
private Integer sortOrder; |
|||
|
|||
@Schema(description = "备注", example = "你说的对") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -0,0 +1,79 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
import java.time.LocalDateTime; |
|||
import com.alibaba.excel.annotation.*; |
|||
|
|||
@Schema(description = "管理后台 - GAS警报规则 Response VO") |
|||
@Data |
|||
@ExcelIgnoreUnannotated |
|||
public class AlarmRuleRespVO { |
|||
|
|||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4303") |
|||
@ExcelProperty("主键ID") |
|||
private String id; |
|||
|
|||
@Schema(description = "气体类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2833") |
|||
@ExcelProperty("气体类型ID") |
|||
private String gasTypeId; |
|||
|
|||
@Schema(description = "警报类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12917") |
|||
@ExcelProperty("警报类型ID") |
|||
private String alarmTypeId; |
|||
|
|||
@Schema(description = "警报名称", example = "赵六") |
|||
@ExcelProperty("警报名称") |
|||
private String alarmName; |
|||
|
|||
@Schema(description = "警报名称颜色") |
|||
@ExcelProperty("警报名称颜色") |
|||
private String alarmNameColor; |
|||
|
|||
@Schema(description = "警报颜色") |
|||
@ExcelProperty("警报颜色") |
|||
private String alarmColor; |
|||
|
|||
@Schema(description = "警报方式/级别(0:正常状态;1:一级警报;2:二级警报;3:弹窗警报)") |
|||
@ExcelProperty("警报方式/级别(0:正常状态;1:一级警报;2:二级警报;3:弹窗警报)") |
|||
private Integer alarmLevel; |
|||
|
|||
@Schema(description = "触发值(小)") |
|||
@ExcelProperty("触发值(小)") |
|||
private Double min; |
|||
|
|||
@Schema(description = "触发值(大)") |
|||
@ExcelProperty("触发值(大)") |
|||
private Double max; |
|||
|
|||
@Schema(description = "最值方向(0:小;1:大)", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("最值方向(0:小;1:大)") |
|||
private Integer direction; |
|||
|
|||
@Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("排序") |
|||
private Integer sortOrder; |
|||
|
|||
@Schema(description = "备注", example = "你说的对") |
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("删除标志") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("创建者") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "更新者") |
|||
@ExcelProperty("更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -0,0 +1,63 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import jakarta.validation.constraints.*; |
|||
|
|||
@Schema(description = "管理后台 - GAS警报规则新增/修改 Request VO") |
|||
@Data |
|||
public class AlarmRuleSaveReqVO { |
|||
|
|||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4303") |
|||
private String id; |
|||
|
|||
@Schema(description = "气体类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2833") |
|||
@NotEmpty(message = "气体类型ID不能为空") |
|||
private String gasTypeId; |
|||
|
|||
@Schema(description = "警报类型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12917") |
|||
@NotEmpty(message = "警报类型ID不能为空") |
|||
private String alarmTypeId; |
|||
|
|||
@Schema(description = "警报名称", example = "赵六") |
|||
private String alarmName; |
|||
|
|||
@Schema(description = "警报名称颜色") |
|||
private String alarmNameColor; |
|||
|
|||
@Schema(description = "警报颜色") |
|||
private String alarmColor; |
|||
|
|||
@Schema(description = "警报方式/级别(0:正常状态;1:一级警报;2:二级警报;3:弹窗警报)") |
|||
private Integer alarmLevel; |
|||
|
|||
@Schema(description = "触发值(小)") |
|||
private Double min; |
|||
|
|||
@Schema(description = "触发值(大)") |
|||
private Double max; |
|||
|
|||
@Schema(description = "最值方向(0:小;1:大)", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "最值方向(0:小;1:大)不能为空") |
|||
private Integer direction; |
|||
|
|||
@Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "排序不能为空") |
|||
private Integer sortOrder; |
|||
|
|||
@Schema(description = "备注", example = "你说的对") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "删除标志不能为空") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "创建者不能为空") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - GAS警报类型分页 Request VO") |
|||
@Data |
|||
public class AlarmTypePageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "名称", example = "芋艿") |
|||
private String name; |
|||
|
|||
@Schema(description = "名称颜色") |
|||
private String nameColor; |
|||
|
|||
@Schema(description = "颜色") |
|||
private String color; |
|||
|
|||
@Schema(description = "警报方式/级别(0:正常状态;1:一级警报;2:二级警报;3:弹窗警报)") |
|||
private Integer level; |
|||
|
|||
@Schema(description = "排序") |
|||
private Integer sortOrder; |
|||
|
|||
@Schema(description = "备注", example = "随便") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -0,0 +1,59 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
import java.time.LocalDateTime; |
|||
import com.alibaba.excel.annotation.*; |
|||
|
|||
@Schema(description = "管理后台 - GAS警报类型 Response VO") |
|||
@Data |
|||
@ExcelIgnoreUnannotated |
|||
public class AlarmTypeRespVO { |
|||
|
|||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18440") |
|||
@ExcelProperty("主键ID") |
|||
private String id; |
|||
|
|||
@Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") |
|||
@ExcelProperty("名称") |
|||
private String name; |
|||
|
|||
@Schema(description = "名称颜色") |
|||
@ExcelProperty("名称颜色") |
|||
private String nameColor; |
|||
|
|||
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("颜色") |
|||
private String color; |
|||
|
|||
@Schema(description = "警报方式/级别(0:正常状态;1:一级警报;2:二级警报;3:弹窗警报)", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("警报方式/级别(0:正常状态;1:一级警报;2:二级警报;3:弹窗警报)") |
|||
private Integer level; |
|||
|
|||
@Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("排序") |
|||
private Integer sortOrder; |
|||
|
|||
@Schema(description = "备注", example = "随便") |
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("删除标志") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("创建者") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "更新者") |
|||
@ExcelProperty("更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -0,0 +1,48 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import jakarta.validation.constraints.*; |
|||
|
|||
@Schema(description = "管理后台 - GAS警报类型新增/修改 Request VO") |
|||
@Data |
|||
public class AlarmTypeSaveReqVO { |
|||
|
|||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18440") |
|||
private String id; |
|||
|
|||
@Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") |
|||
@NotEmpty(message = "名称不能为空") |
|||
private String name; |
|||
|
|||
@Schema(description = "名称颜色") |
|||
private String nameColor; |
|||
|
|||
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "颜色不能为空") |
|||
private String color; |
|||
|
|||
@Schema(description = "警报方式/级别(0:正常状态;1:一级警报;2:二级警报;3:弹窗警报)", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "警报方式/级别(0:正常状态;1:一级警报;2:二级警报;3:弹窗警报)不能为空") |
|||
private Integer level; |
|||
|
|||
@Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "排序不能为空") |
|||
private Integer sortOrder; |
|||
|
|||
@Schema(description = "备注", example = "随便") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "删除标志不能为空") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "创建者不能为空") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -0,0 +1,62 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - GAS手持探测器围栏报警分页 Request VO") |
|||
@Data |
|||
public class FenceAlarmPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "探头ID", example = "32133") |
|||
private String detectorId; |
|||
|
|||
@Schema(description = "围栏id", example = "31072") |
|||
private String fenceId; |
|||
|
|||
@Schema(description = "报警类型", example = "2") |
|||
private Integer type; |
|||
|
|||
@Schema(description = "在区域图X坐标值") |
|||
private Double picX; |
|||
|
|||
@Schema(description = "在区域图X坐标值") |
|||
private Double picY; |
|||
|
|||
@Schema(description = "超出围栏米数") |
|||
private Double distance; |
|||
|
|||
@Schema(description = "最远超出米数") |
|||
private Double maxDistance; |
|||
|
|||
@Schema(description = "开始时间") |
|||
private LocalDateTime tAlarmStart; |
|||
|
|||
@Schema(description = "结束时间") |
|||
private LocalDateTime tAlarmEnd; |
|||
|
|||
@Schema(description = "状态(0:待处理;1:处理中;1:已处理)", example = "1") |
|||
private Integer status; |
|||
|
|||
@Schema(description = "备注", example = "随便") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -0,0 +1,79 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
import java.time.LocalDateTime; |
|||
import com.alibaba.excel.annotation.*; |
|||
|
|||
@Schema(description = "管理后台 - GAS手持探测器围栏报警 Response VO") |
|||
@Data |
|||
@ExcelIgnoreUnannotated |
|||
public class FenceAlarmRespVO { |
|||
|
|||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12756") |
|||
@ExcelProperty("主键ID") |
|||
private String id; |
|||
|
|||
@Schema(description = "探头ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32133") |
|||
@ExcelProperty("探头ID") |
|||
private String detectorId; |
|||
|
|||
@Schema(description = "围栏id", requiredMode = Schema.RequiredMode.REQUIRED, example = "31072") |
|||
@ExcelProperty("围栏id") |
|||
private String fenceId; |
|||
|
|||
@Schema(description = "报警类型", example = "2") |
|||
@ExcelProperty("报警类型") |
|||
private Integer type; |
|||
|
|||
@Schema(description = "在区域图X坐标值") |
|||
@ExcelProperty("在区域图X坐标值") |
|||
private Double picX; |
|||
|
|||
@Schema(description = "在区域图X坐标值", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("在区域图X坐标值") |
|||
private Double picY; |
|||
|
|||
@Schema(description = "超出围栏米数") |
|||
@ExcelProperty("超出围栏米数") |
|||
private Double distance; |
|||
|
|||
@Schema(description = "最远超出米数") |
|||
@ExcelProperty("最远超出米数") |
|||
private Double maxDistance; |
|||
|
|||
@Schema(description = "开始时间") |
|||
@ExcelProperty("开始时间") |
|||
private LocalDateTime tAlarmStart; |
|||
|
|||
@Schema(description = "结束时间") |
|||
@ExcelProperty("结束时间") |
|||
private LocalDateTime tAlarmEnd; |
|||
|
|||
@Schema(description = "状态(0:待处理;1:处理中;1:已处理)", example = "1") |
|||
@ExcelProperty("状态(0:待处理;1:处理中;1:已处理)") |
|||
private Integer status; |
|||
|
|||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便") |
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("删除标志") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("创建者") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "更新者") |
|||
@ExcelProperty("更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -0,0 +1,65 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import jakarta.validation.constraints.*; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
import java.time.LocalDateTime; |
|||
|
|||
@Schema(description = "管理后台 - GAS手持探测器围栏报警新增/修改 Request VO") |
|||
@Data |
|||
public class FenceAlarmSaveReqVO { |
|||
|
|||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12756") |
|||
private String id; |
|||
|
|||
@Schema(description = "探头ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32133") |
|||
@NotEmpty(message = "探头ID不能为空") |
|||
private String detectorId; |
|||
|
|||
@Schema(description = "围栏id", requiredMode = Schema.RequiredMode.REQUIRED, example = "31072") |
|||
@NotEmpty(message = "围栏id不能为空") |
|||
private String fenceId; |
|||
|
|||
@Schema(description = "报警类型", example = "2") |
|||
private Integer type; |
|||
|
|||
@Schema(description = "在区域图X坐标值") |
|||
private Double picX; |
|||
|
|||
@Schema(description = "在区域图X坐标值", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "在区域图X坐标值不能为空") |
|||
private Double picY; |
|||
|
|||
@Schema(description = "超出围栏米数") |
|||
private Double distance; |
|||
|
|||
@Schema(description = "最远超出米数") |
|||
private Double maxDistance; |
|||
|
|||
@Schema(description = "开始时间") |
|||
private LocalDateTime tAlarmStart; |
|||
|
|||
@Schema(description = "结束时间") |
|||
private LocalDateTime tAlarmEnd; |
|||
|
|||
@Schema(description = "状态(0:待处理;1:处理中;1:已处理)", example = "1") |
|||
private Integer status; |
|||
|
|||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便") |
|||
@NotEmpty(message = "备注不能为空") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "删除标志不能为空") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "创建者不能为空") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -0,0 +1,44 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - GAS电子围栏分页 Request VO") |
|||
@Data |
|||
public class FencePageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "围栏名称", example = "王五") |
|||
private String name; |
|||
|
|||
@Schema(description = "围栏范围") |
|||
private String fenceRange; |
|||
|
|||
@Schema(description = "状态(1启用,2禁用)", example = "2") |
|||
private Integer status; |
|||
|
|||
@Schema(description = "围栏类型(1:超出报警,2:进入报警)", example = "1") |
|||
private Integer type; |
|||
|
|||
@Schema(description = "备注", example = "你说的对") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -0,0 +1,55 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
import java.time.LocalDateTime; |
|||
import com.alibaba.excel.annotation.*; |
|||
|
|||
@Schema(description = "管理后台 - GAS电子围栏 Response VO") |
|||
@Data |
|||
@ExcelIgnoreUnannotated |
|||
public class FenceRespVO { |
|||
|
|||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12448") |
|||
@ExcelProperty("主键ID") |
|||
private String id; |
|||
|
|||
@Schema(description = "围栏名称", example = "王五") |
|||
@ExcelProperty("围栏名称") |
|||
private String name; |
|||
|
|||
@Schema(description = "围栏范围") |
|||
@ExcelProperty("围栏范围") |
|||
private String fenceRange; |
|||
|
|||
@Schema(description = "状态(1启用,2禁用)", example = "2") |
|||
@ExcelProperty("状态(1启用,2禁用)") |
|||
private Integer status; |
|||
|
|||
@Schema(description = "围栏类型(1:超出报警,2:进入报警)", example = "1") |
|||
@ExcelProperty("围栏类型(1:超出报警,2:进入报警)") |
|||
private Integer type; |
|||
|
|||
@Schema(description = "备注", example = "你说的对") |
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("删除标志") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("创建者") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "更新者") |
|||
@ExcelProperty("更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -0,0 +1,41 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import jakarta.validation.constraints.*; |
|||
|
|||
@Schema(description = "管理后台 - GAS电子围栏新增/修改 Request VO") |
|||
@Data |
|||
public class FenceSaveReqVO { |
|||
|
|||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12448") |
|||
private String id; |
|||
|
|||
@Schema(description = "围栏名称", example = "王五") |
|||
private String name; |
|||
|
|||
@Schema(description = "围栏范围") |
|||
private String fenceRange; |
|||
|
|||
@Schema(description = "状态(1启用,2禁用)", example = "2") |
|||
private Integer status; |
|||
|
|||
@Schema(description = "围栏类型(1:超出报警,2:进入报警)", example = "1") |
|||
private Integer type; |
|||
|
|||
@Schema(description = "备注", example = "你说的对") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "删除标志不能为空") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "创建者不能为空") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -0,0 +1,44 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - GAS气体分页 Request VO") |
|||
@Data |
|||
public class GasTypePageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "名称", example = "李四") |
|||
private String name; |
|||
|
|||
@Schema(description = "化学式") |
|||
private String chemical; |
|||
|
|||
@Schema(description = "单位") |
|||
private String unit; |
|||
|
|||
@Schema(description = "排序") |
|||
private Integer sortOrder; |
|||
|
|||
@Schema(description = "备注", example = "你说的对") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -0,0 +1,55 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
import java.time.LocalDateTime; |
|||
import com.alibaba.excel.annotation.*; |
|||
|
|||
@Schema(description = "管理后台 - GAS气体 Response VO") |
|||
@Data |
|||
@ExcelIgnoreUnannotated |
|||
public class GasTypeRespVO { |
|||
|
|||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25168") |
|||
@ExcelProperty("主键ID") |
|||
private String id; |
|||
|
|||
@Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") |
|||
@ExcelProperty("名称") |
|||
private String name; |
|||
|
|||
@Schema(description = "化学式", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("化学式") |
|||
private String chemical; |
|||
|
|||
@Schema(description = "单位") |
|||
@ExcelProperty("单位") |
|||
private String unit; |
|||
|
|||
@Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("排序") |
|||
private Integer sortOrder; |
|||
|
|||
@Schema(description = "备注", example = "你说的对") |
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("删除标志") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("创建者") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "更新者") |
|||
@ExcelProperty("更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -0,0 +1,44 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import jakarta.validation.constraints.*; |
|||
|
|||
@Schema(description = "管理后台 - GAS气体新增/修改 Request VO") |
|||
@Data |
|||
public class GasTypeSaveReqVO { |
|||
|
|||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25168") |
|||
private String id; |
|||
|
|||
@Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") |
|||
@NotEmpty(message = "名称不能为空") |
|||
private String name; |
|||
|
|||
@Schema(description = "化学式", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "化学式不能为空") |
|||
private String chemical; |
|||
|
|||
@Schema(description = "单位") |
|||
private String unit; |
|||
|
|||
@Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "排序不能为空") |
|||
private Integer sortOrder; |
|||
|
|||
@Schema(description = "备注", example = "你说的对") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "删除标志不能为空") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "创建者不能为空") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -0,0 +1,65 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - GAS手持探测器警报分页 Request VO") |
|||
@Data |
|||
public class HandAlarmPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "警报方式/级别(0:正常状态;1:一级警报;2:二级警报;3:弹窗警报)") |
|||
private Integer alarmLevel; |
|||
|
|||
@Schema(description = "气体类型", example = "1") |
|||
private String gasType; |
|||
|
|||
@Schema(description = "单位") |
|||
private String unit; |
|||
|
|||
@Schema(description = "位置描述") |
|||
private String location; |
|||
|
|||
@Schema(description = "在区域图X坐标值") |
|||
private Double picX; |
|||
|
|||
@Schema(description = "在区域图X坐标值") |
|||
private Double picY; |
|||
|
|||
@Schema(description = "首报值") |
|||
private Double vAlarmFirst; |
|||
|
|||
@Schema(description = "最值") |
|||
private Double vAlarmMaximum; |
|||
|
|||
@Schema(description = "开始时间") |
|||
private LocalDateTime tAlarmStart; |
|||
|
|||
@Schema(description = "结束时间") |
|||
private LocalDateTime tAlarmEnd; |
|||
|
|||
@Schema(description = "状态(0:待处理;1:处理中;1:已处理)", example = "1") |
|||
private Integer status; |
|||
|
|||
@Schema(description = "备注", example = "随便") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -0,0 +1,83 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
import java.time.LocalDateTime; |
|||
import com.alibaba.excel.annotation.*; |
|||
|
|||
@Schema(description = "管理后台 - GAS手持探测器警报 Response VO") |
|||
@Data |
|||
@ExcelIgnoreUnannotated |
|||
public class HandAlarmRespVO { |
|||
|
|||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17955") |
|||
@ExcelProperty("主键ID") |
|||
private String id; |
|||
|
|||
@Schema(description = "警报方式/级别(0:正常状态;1:一级警报;2:二级警报;3:弹窗警报)", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("警报方式/级别(0:正常状态;1:一级警报;2:二级警报;3:弹窗警报)") |
|||
private Integer alarmLevel; |
|||
|
|||
@Schema(description = "气体类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
@ExcelProperty("气体类型") |
|||
private String gasType; |
|||
|
|||
@Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("单位") |
|||
private String unit; |
|||
|
|||
@Schema(description = "位置描述") |
|||
@ExcelProperty("位置描述") |
|||
private String location; |
|||
|
|||
@Schema(description = "在区域图X坐标值") |
|||
@ExcelProperty("在区域图X坐标值") |
|||
private Double picX; |
|||
|
|||
@Schema(description = "在区域图X坐标值", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("在区域图X坐标值") |
|||
private Double picY; |
|||
|
|||
@Schema(description = "首报值") |
|||
@ExcelProperty("首报值") |
|||
private Double vAlarmFirst; |
|||
|
|||
@Schema(description = "最值") |
|||
@ExcelProperty("最值") |
|||
private Double vAlarmMaximum; |
|||
|
|||
@Schema(description = "开始时间") |
|||
@ExcelProperty("开始时间") |
|||
private LocalDateTime tAlarmStart; |
|||
|
|||
@Schema(description = "结束时间") |
|||
@ExcelProperty("结束时间") |
|||
private LocalDateTime tAlarmEnd; |
|||
|
|||
@Schema(description = "状态(0:待处理;1:处理中;1:已处理)", example = "1") |
|||
@ExcelProperty("状态(0:待处理;1:处理中;1:已处理)") |
|||
private Integer status; |
|||
|
|||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便") |
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("删除标志") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("创建者") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "更新者") |
|||
@ExcelProperty("更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -0,0 +1,69 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import jakarta.validation.constraints.*; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
import java.time.LocalDateTime; |
|||
|
|||
@Schema(description = "管理后台 - GAS手持探测器警报新增/修改 Request VO") |
|||
@Data |
|||
public class HandAlarmSaveReqVO { |
|||
|
|||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17955") |
|||
private String id; |
|||
|
|||
@Schema(description = "警报方式/级别(0:正常状态;1:一级警报;2:二级警报;3:弹窗警报)", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "警报方式/级别(0:正常状态;1:一级警报;2:二级警报;3:弹窗警报)不能为空") |
|||
private Integer alarmLevel; |
|||
|
|||
@Schema(description = "气体类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
@NotEmpty(message = "气体类型不能为空") |
|||
private String gasType; |
|||
|
|||
@Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "单位不能为空") |
|||
private String unit; |
|||
|
|||
@Schema(description = "位置描述") |
|||
private String location; |
|||
|
|||
@Schema(description = "在区域图X坐标值") |
|||
private Double picX; |
|||
|
|||
@Schema(description = "在区域图X坐标值", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "在区域图X坐标值不能为空") |
|||
private Double picY; |
|||
|
|||
@Schema(description = "首报值") |
|||
private Double vAlarmFirst; |
|||
|
|||
@Schema(description = "最值") |
|||
private Double vAlarmMaximum; |
|||
|
|||
@Schema(description = "开始时间") |
|||
private LocalDateTime tAlarmStart; |
|||
|
|||
@Schema(description = "结束时间") |
|||
private LocalDateTime tAlarmEnd; |
|||
|
|||
@Schema(description = "状态(0:待处理;1:处理中;1:已处理)", example = "1") |
|||
private Integer status; |
|||
|
|||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便") |
|||
@NotEmpty(message = "备注不能为空") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "删除标志不能为空") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "创建者不能为空") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -0,0 +1,85 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import lombok.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import cn.iocoder.yudao.framework.common.pojo.PageParam; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - GAS手持探测器分页 Request VO") |
|||
@Data |
|||
public class HandDetectorPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "SN") |
|||
private String sn; |
|||
|
|||
@Schema(description = "持有人姓名", example = "赵六") |
|||
private String name; |
|||
|
|||
@Schema(description = "围栏id", example = "15853") |
|||
private String fenceId; |
|||
|
|||
@Schema(description = "气体类型ID", example = "31358") |
|||
private String gasTypeId; |
|||
|
|||
@Schema(description = "气体化学式") |
|||
private String gasChemical; |
|||
|
|||
@Schema(description = "测量范围中的最小值") |
|||
private Double min; |
|||
|
|||
@Schema(description = "测量范围中的最大值") |
|||
private Double max; |
|||
|
|||
@Schema(description = "状态(0:未知;1:正常;2:故障;3:离线)", example = "1") |
|||
private Integer status; |
|||
|
|||
@Schema(description = "单位") |
|||
private String unit; |
|||
|
|||
@Schema(description = "设备型号") |
|||
private String model; |
|||
|
|||
@Schema(description = "生产厂家") |
|||
private String manufacturer; |
|||
|
|||
@Schema(description = "启用状态(0:备用;1:启用)", example = "1") |
|||
private Integer enableStatus; |
|||
|
|||
@Schema(description = "在区域图X坐标值") |
|||
private Double picX; |
|||
|
|||
@Schema(description = "在区域图Y坐标值") |
|||
private Double picY; |
|||
|
|||
@Schema(description = "经度") |
|||
private Double longitude; |
|||
|
|||
@Schema(description = "纬度") |
|||
private Double latitude; |
|||
|
|||
@Schema(description = "数值除数") |
|||
private Integer accuracy; |
|||
|
|||
@Schema(description = "排序") |
|||
private Integer sortOrder; |
|||
|
|||
@Schema(description = "备注", example = "你猜") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -0,0 +1,110 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
import java.time.LocalDateTime; |
|||
import com.alibaba.excel.annotation.*; |
|||
|
|||
@Schema(description = "管理后台 - GAS手持探测器 Response VO") |
|||
@Data |
|||
@ExcelIgnoreUnannotated |
|||
public class HandDetectorRespVO { |
|||
|
|||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "24178") |
|||
@ExcelProperty("主键ID") |
|||
private String id; |
|||
|
|||
@Schema(description = "SN") |
|||
@ExcelProperty("SN") |
|||
private String sn; |
|||
|
|||
@Schema(description = "持有人姓名", example = "赵六") |
|||
@ExcelProperty("持有人姓名") |
|||
private String name; |
|||
|
|||
@Schema(description = "围栏id", example = "15853") |
|||
@ExcelProperty("围栏id") |
|||
private String fenceId; |
|||
|
|||
@Schema(description = "气体类型ID", example = "31358") |
|||
@ExcelProperty("气体类型ID") |
|||
private String gasTypeId; |
|||
|
|||
@Schema(description = "气体化学式") |
|||
@ExcelProperty("气体化学式") |
|||
private String gasChemical; |
|||
|
|||
@Schema(description = "测量范围中的最小值") |
|||
@ExcelProperty("测量范围中的最小值") |
|||
private Double min; |
|||
|
|||
@Schema(description = "测量范围中的最大值") |
|||
@ExcelProperty("测量范围中的最大值") |
|||
private Double max; |
|||
|
|||
@Schema(description = "状态(0:未知;1:正常;2:故障;3:离线)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
@ExcelProperty("状态(0:未知;1:正常;2:故障;3:离线)") |
|||
private Integer status; |
|||
|
|||
@Schema(description = "单位") |
|||
@ExcelProperty("单位") |
|||
private String unit; |
|||
|
|||
@Schema(description = "设备型号") |
|||
@ExcelProperty("设备型号") |
|||
private String model; |
|||
|
|||
@Schema(description = "生产厂家") |
|||
@ExcelProperty("生产厂家") |
|||
private String manufacturer; |
|||
|
|||
@Schema(description = "启用状态(0:备用;1:启用)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
@ExcelProperty("启用状态(0:备用;1:启用)") |
|||
private Integer enableStatus; |
|||
|
|||
@Schema(description = "在区域图X坐标值") |
|||
@ExcelProperty("在区域图X坐标值") |
|||
private Double picX; |
|||
|
|||
@Schema(description = "在区域图Y坐标值") |
|||
@ExcelProperty("在区域图Y坐标值") |
|||
private Double picY; |
|||
|
|||
@Schema(description = "经度") |
|||
@ExcelProperty("经度") |
|||
private Double longitude; |
|||
|
|||
@Schema(description = "纬度") |
|||
@ExcelProperty("纬度") |
|||
private Double latitude; |
|||
|
|||
@Schema(description = "数值除数") |
|||
@ExcelProperty("数值除数") |
|||
private Integer accuracy; |
|||
|
|||
@Schema(description = "排序") |
|||
@ExcelProperty("排序") |
|||
private Integer sortOrder; |
|||
|
|||
@Schema(description = "备注", example = "你猜") |
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("删除标志") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("创建者") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "更新者") |
|||
@ExcelProperty("更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -0,0 +1,84 @@ |
|||
package cn.iocoder.yudao.module.hand.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import jakarta.validation.constraints.*; |
|||
|
|||
@Schema(description = "管理后台 - GAS手持探测器新增/修改 Request VO") |
|||
@Data |
|||
public class HandDetectorSaveReqVO { |
|||
|
|||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "24178") |
|||
private String id; |
|||
|
|||
@Schema(description = "SN") |
|||
private String sn; |
|||
|
|||
@Schema(description = "持有人姓名", example = "赵六") |
|||
private String name; |
|||
|
|||
@Schema(description = "围栏id", example = "15853") |
|||
private String fenceId; |
|||
|
|||
@Schema(description = "气体类型ID", example = "31358") |
|||
private String gasTypeId; |
|||
|
|||
@Schema(description = "气体化学式") |
|||
private String gasChemical; |
|||
|
|||
@Schema(description = "测量范围中的最小值") |
|||
private Double min; |
|||
|
|||
@Schema(description = "测量范围中的最大值") |
|||
private Double max; |
|||
|
|||
@Schema(description = "状态(0:未知;1:正常;2:故障;3:离线)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
@NotNull(message = "状态(0:未知;1:正常;2:故障;3:离线)不能为空") |
|||
private Integer status; |
|||
|
|||
@Schema(description = "单位") |
|||
private String unit; |
|||
|
|||
@Schema(description = "设备型号") |
|||
private String model; |
|||
|
|||
@Schema(description = "生产厂家") |
|||
private String manufacturer; |
|||
|
|||
@Schema(description = "启用状态(0:备用;1:启用)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
@NotNull(message = "启用状态(0:备用;1:启用)不能为空") |
|||
private Integer enableStatus; |
|||
|
|||
@Schema(description = "在区域图X坐标值") |
|||
private Double picX; |
|||
|
|||
@Schema(description = "在区域图Y坐标值") |
|||
private Double picY; |
|||
|
|||
@Schema(description = "经度") |
|||
private Double longitude; |
|||
|
|||
@Schema(description = "纬度") |
|||
private Double latitude; |
|||
|
|||
@Schema(description = "数值除数") |
|||
private Integer accuracy; |
|||
|
|||
@Schema(description = "排序") |
|||
private Integer sortOrder; |
|||
|
|||
@Schema(description = "备注", example = "你猜") |
|||
private String remark; |
|||
|
|||
@Schema(description = "删除标志", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "删除标志不能为空") |
|||
private Integer delFlag; |
|||
|
|||
@Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotEmpty(message = "创建者不能为空") |
|||
private String createBy; |
|||
|
|||
@Schema(description = "更新者") |
|||
private String updateBy; |
|||
|
|||
} |
@ -1,10 +0,0 @@ |
|||
package cn.iocoder.yudao.module.lock.enums; |
|||
|
|||
import cn.iocoder.yudao.framework.common.exception.ErrorCode; |
|||
|
|||
|
|||
public interface ErrorCodeConstants { |
|||
|
|||
|
|||
|
|||
} |
@ -1,4 +0,0 @@ |
|||
/** |
|||
* infra 模块的 web 配置 |
|||
*/ |
|||
package cn.iocoder.yudao.module.lock.framework.web; |
@ -1,12 +0,0 @@ |
|||
/** |
|||
* bpm 包下,业务流程管理(Business Process Management),我们放工作流的功能,基于 Flowable 6 版本实现。 |
|||
* 例如说:流程定义、表单配置、审核中心(我的申请、我的待办、我的已办)等等 |
|||
* |
|||
* bpm 解释:https://baike.baidu.com/item/BPM/1933
|
|||
* |
|||
* 1. Controller URL:以 /bpm/ 开头,避免和其它 Module 冲突 |
|||
* 2. DataObject 表名:以 bpm_ 开头,方便在数据库中区分 |
|||
* |
|||
* 注意,由于 Bpm 模块下,容易和其它模块重名,所以类名都加载 Bpm 的前缀~ |
|||
*/ |
|||
package cn.iocoder.yudao.module.lock; |
@ -1,174 +0,0 @@ |
|||
package cn.iocoder.yudao.module.lock.util; |
|||
|
|||
import cn.iocoder.yudao.module.lock.vo.LockWordPointDataVo; |
|||
import cn.iocoder.yudao.module.lock.vo.LockWordPointVo; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.poi.extractor.ExtractorFactory; |
|||
import org.apache.poi.extractor.POITextExtractor; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import java.io.File; |
|||
import java.io.FileInputStream; |
|||
import java.io.InputStream; |
|||
import java.util.ArrayList; |
|||
import java.util.regex.Pattern; |
|||
|
|||
@Slf4j |
|||
public class WordUtils { |
|||
|
|||
|
|||
public static void main(String[] args) { |
|||
// =================================================================
|
|||
// 请将此路径修改为您本地Word文件的实际路径
|
|||
// 支持 .doc 和 .docx 格式
|
|||
// =================================================================
|
|||
var filePath = "C:\\Users\\admin\\Desktop\\1.docx"; // <-- 请确保路径正确
|
|||
|
|||
var file = new File(filePath); |
|||
|
|||
if (!file.exists() || !file.isFile()) { |
|||
// 2. 使用 log.error 记录错误
|
|||
log.error("错误:文件不存在或不是一个有效的文件路径 -> {}", filePath); |
|||
return; |
|||
} |
|||
|
|||
try { |
|||
// 1. 从 Word 文件中提取纯文本
|
|||
var rawContent = extractTextFrom(file); |
|||
|
|||
// 2. 解析提取出的文本并按结构化格式打印
|
|||
parseAndPrintStructuredContent(rawContent); |
|||
|
|||
} catch (Exception e) { |
|||
// 3. 记录异常信息和堆栈
|
|||
log.error("处理文件时发生未知异常。", e); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 整合所有解析逻辑,并结构化地打印出来。 |
|||
* |
|||
* @param rawContent 从 Word 中提取的完整纯文本 |
|||
*/ |
|||
public static LockWordPointVo parseAndPrintStructuredContent(String rawContent) { |
|||
|
|||
var energyPattern = Pattern.compile("☑ ([^、☐\\s]+)"); |
|||
var energyMatcher = energyPattern.matcher(rawContent); |
|||
var selectedEnergies = new ArrayList<String>(); |
|||
while (energyMatcher.find()) { |
|||
selectedEnergies.add(energyMatcher.group(1)); |
|||
} |
|||
|
|||
if (selectedEnergies.isEmpty()) { |
|||
log.info("未找到任何已勾选的能量项。"); |
|||
} else { |
|||
log.info("已勾选的能量: " + String.join(", ", selectedEnergies)); |
|||
} |
|||
|
|||
LockWordPointVo lockWordPointVo = new LockWordPointVo(); |
|||
// --- 2. 解析:上锁前准备 ---
|
|||
String deviceLock = extractAndPrint("设备锁数量", rawContent, "准备设备锁:([^;]+);"); |
|||
String repairBrand = extractAndPrint("停机大修牌数量", rawContent, "停机大修牌:([^;]+);"); |
|||
String sixClip = extractAndPrint("6孔锁夹数量", rawContent, "6孔锁夹:([^;]+);"); |
|||
String locking = extractAndPrint("上锁装置", rawContent, "上锁装置:([^\n\r]+)"); |
|||
lockWordPointVo.setDeviceLock(deviceLock); |
|||
lockWordPointVo.setRepairBrand(repairBrand); |
|||
lockWordPointVo.setSixClip(sixClip); |
|||
lockWordPointVo.setLocking(locking); |
|||
|
|||
// --- 3. 解析:表格数据 ---
|
|||
var dataList = new ArrayList<LockWordPointDataVo>(); |
|||
var lines = rawContent.split("\\r?\\n"); |
|||
var isParsingTable = false; |
|||
|
|||
for (var line : lines) { |
|||
var trimmedLine = line.trim(); |
|||
if (trimmedLine.isEmpty()) continue; |
|||
if (trimmedLine.startsWith("验证方法")) break; // 表格内容结束
|
|||
|
|||
if (trimmedLine.contains("隔离序号") && trimmedLine.contains("隔离点编号")) { |
|||
isParsingTable = true; |
|||
continue; // 这是标题行,跳过
|
|||
} |
|||
|
|||
if (isParsingTable) { |
|||
var parts = trimmedLine.split("\t"); |
|||
if (parts.length >= 4) { // 确保数据足够,避免数组越界
|
|||
var data = new LockWordPointDataVo(parts[0], parts[1], parts[2], parts[3]); |
|||
dataList.add(data); |
|||
} else { |
|||
log.warn("检测到格式不正确的表格行,已跳过: {}", trimmedLine); |
|||
} |
|||
} |
|||
} |
|||
|
|||
// 打印解析出的表格数据
|
|||
if (dataList.isEmpty()) { |
|||
log.warn("未找到或未能解析出表格数据。"); |
|||
} else { |
|||
lockWordPointVo.setDataVoList(dataList); |
|||
} |
|||
return lockWordPointVo; |
|||
} |
|||
|
|||
/** |
|||
* 辅助方法:根据正则表达式从文本中提取信息并打印。 |
|||
* |
|||
* @param label 信息的标签 |
|||
* @param content 原始内容 |
|||
* @param regex 正则表达式 |
|||
*/ |
|||
private static String extractAndPrint(String label, String content, String regex) { |
|||
var pattern = Pattern.compile(regex); |
|||
var matcher = pattern.matcher(content); |
|||
String value = null; |
|||
if (matcher.find()) { |
|||
value = matcher.group(1).replaceAll("[把个]|至少", "").trim(); |
|||
log.info(label + ": " + (value.isEmpty() ? "未填写" : value)); |
|||
} else { |
|||
log.error(label + ": 未找到"); |
|||
} |
|||
return value; |
|||
} |
|||
/** |
|||
* 使用 ExtractorFactory 自动识别上传的 Office 文件真实格式并提取纯文本。 |
|||
* 该方法直接处理 MultipartFile,避免了先将文件存到本地的需要。 |
|||
* |
|||
* @param multipartFile 要处理的上传文件 (e.g., .doc, .docx, .xls, .xlsx, .ppt, .pptx) |
|||
* @return 提取出的纯文本 |
|||
* @throws Exception 如果文件处理失败,例如文件为空、无法识别格式或读取错误 |
|||
*/ |
|||
public static String extractTextFromWord(MultipartFile multipartFile) throws Exception { |
|||
// 1. 校验文件是否为空,增加健壮性
|
|||
if (multipartFile == null || multipartFile.isEmpty()) { |
|||
throw new IllegalArgumentException("文件不能为空。"); |
|||
} |
|||
|
|||
// 2. 使用 try-with-resources 确保 InputStream 和 Extractor 被自动关闭
|
|||
// 直接从 MultipartFile 获取输入流,而不是从本地文件
|
|||
try (InputStream inputStream = multipartFile.getInputStream(); |
|||
POITextExtractor extractor = ExtractorFactory.createExtractor(inputStream)) { |
|||
|
|||
if (extractor == null) { |
|||
// 3. 优化了异常提示信息
|
|||
throw new IllegalArgumentException("无法识别的文件类型或文件已损坏。请确保是标准的Office格式。"); |
|||
} |
|||
// 4. 返回提取的文本
|
|||
return extractor.getText(); |
|||
} |
|||
} |
|||
|
|||
public static String extractTextFrom(File file) throws Exception { |
|||
// Java 7+ try-with-resources 自动关闭资源
|
|||
try (InputStream inputStream = new FileInputStream(file); |
|||
POITextExtractor extractor = ExtractorFactory.createExtractor(inputStream)) { |
|||
|
|||
if (extractor == null) { |
|||
throw new IllegalArgumentException("无法识别的文件类型,文件可能已损坏或非标准Office格式。"); |
|||
} |
|||
return extractor.getText(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
|
@ -0,0 +1,12 @@ |
|||
<?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="cn.iocoder.yudao.module.hand.mapper.AlarmRuleMapper"> |
|||
|
|||
<!-- |
|||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 |
|||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 |
|||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 |
|||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ |
|||
--> |
|||
|
|||
</mapper> |
@ -0,0 +1,12 @@ |
|||
<?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="cn.iocoder.yudao.module.hand.mapper.AlarmTypeMapper"> |
|||
|
|||
<!-- |
|||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 |
|||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 |
|||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 |
|||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ |
|||
--> |
|||
|
|||
</mapper> |
@ -0,0 +1,12 @@ |
|||
<?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="cn.iocoder.yudao.module.hand.mapper.FenceAlarmMapper"> |
|||
|
|||
<!-- |
|||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 |
|||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 |
|||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 |
|||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ |
|||
--> |
|||
|
|||
</mapper> |
@ -0,0 +1,12 @@ |
|||
<?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="cn.iocoder.yudao.module.hand.mapper.FenceMapper"> |
|||
|
|||
<!-- |
|||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 |
|||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 |
|||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 |
|||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ |
|||
--> |
|||
|
|||
</mapper> |
@ -0,0 +1,12 @@ |
|||
<?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="cn.iocoder.yudao.module.hand.mapper.GasTypeMapper"> |
|||
|
|||
<!-- |
|||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 |
|||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 |
|||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 |
|||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ |
|||
--> |
|||
|
|||
</mapper> |
@ -0,0 +1,12 @@ |
|||
<?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="cn.iocoder.yudao.module.hand.mapper.HandAlarmMapper"> |
|||
|
|||
<!-- |
|||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 |
|||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 |
|||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 |
|||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ |
|||
--> |
|||
|
|||
</mapper> |
@ -0,0 +1,12 @@ |
|||
<?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="cn.iocoder.yudao.module.hand.mapper.HandDetectorMapper"> |
|||
|
|||
<!-- |
|||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 |
|||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 |
|||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 |
|||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ |
|||
--> |
|||
|
|||
</mapper> |
Loading…
Reference in new issue