diff --git a/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/controller/FrontierProtectionNoNetDataController.java b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/controller/FrontierProtectionNoNetDataController.java new file mode 100644 index 000000000..7fae02c1c --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/controller/FrontierProtectionNoNetDataController.java @@ -0,0 +1,139 @@ +package com.zhgd.xmgl.modules.frontierprotectionnonet.controller; + +import com.zhgd.xmgl.modules.frontierprotectionnonet.entity.FrontierProtectionNoNetData; +import com.zhgd.xmgl.modules.frontierprotectionnonet.service.IFrontierProtectionNoNetDataService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiImplicitParams; + +import java.util.HashMap; + +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +import com.zhgd.jeecg.common.api.vo.Result; +import org.apache.commons.collections.MapUtils; + +import org.simpleframework.xml.core.Validate; +import com.baomidou.mybatisplus.core.metadata.IPage; +import lombok.extern.slf4j.Slf4j; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + + +/** + * @Title: Controller + * @Description: 临边防护(无网)-数据 + * @author: pds + * @date: 2024-01-20 + * @version: V1.0 + */ +@RestController +@RequestMapping("/xmgl/frontierProtectionNoNetData") +@Slf4j +@Api(tags = "临边防护(无网)-数据相关Api") +public class FrontierProtectionNoNetDataController { + @Autowired + private IFrontierProtectionNoNetDataService frontierProtectionNoNetDataService; + + /** + * 分页列表查询 + * + * @return + */ + @ApiOperation(value = "分页列表查询临边防护(无网)-数据信息", notes = "分页列表查询临边防护(无网)-数据信息", httpMethod = "GET") + @ApiImplicitParams({ + @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"), + }) + @GetMapping(value = "/page") + public Result> queryPageList(@ApiIgnore @RequestParam HashMap paramMap) { + return Result.success(frontierProtectionNoNetDataService.queryPageList(paramMap)); + } + + /** + * 列表查询 + * + * @return + */ + @ApiOperation(value = "列表查询临边防护(无网)-数据信息", notes = "列表查询临边防护(无网)-数据信息", httpMethod = "GET") + @GetMapping(value = "/list") + public Result> queryList(@ApiIgnore @RequestParam HashMap paramMap) { + return Result.success(frontierProtectionNoNetDataService.queryList(paramMap)); + } + + /** + * 添加 + * + * @param frontierProtectionNoNetData + * @return + */ + @ApiOperation(value = "添加临边防护(无网)-数据信息", notes = "添加临边防护(无网)-数据信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody @Validate FrontierProtectionNoNetData frontierProtectionNoNetData) { + frontierProtectionNoNetDataService.add(frontierProtectionNoNetData); + return Result.ok(); + } + + /** + * 编辑 + * + * @param frontierProtectionNoNetData + * @return + */ + @ApiOperation(value = "编辑临边防护(无网)-数据信息", notes = "编辑临边防护(无网)-数据信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody FrontierProtectionNoNetData frontierProtectionNoNetData) { + frontierProtectionNoNetDataService.edit(frontierProtectionNoNetData); + return Result.ok(); + } + + /** + * 通过id删除 + * + * @return + */ + @ApiOperation(value = "删除临边防护(无网)-数据信息", notes = "删除临边防护(无网)-数据信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "临边防护(无网)-数据ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}") + @PostMapping(value = "/delete") + public Result delete(@ApiIgnore @RequestBody HashMap map) { + String id = MapUtils.getString(map, "id"); + Result result = new Result(); + FrontierProtectionNoNetData frontierProtectionNoNetData = frontierProtectionNoNetDataService.getById(id); + if (frontierProtectionNoNetData == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = frontierProtectionNoNetDataService.removeById(id); + if (ok) { + result.success("删除成功!"); + } + } + + return result; + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @ApiOperation(value = "通过id查询临边防护(无网)-数据信息", notes = "通过id查询临边防护(无网)-数据信息", httpMethod = "GET") + @ApiImplicitParam(name = "id", value = "临边防护(无网)-数据ID", paramType = "query", required = true, dataType = "Integer") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name = "id", required = true) String id) { + Result result = new Result(); + FrontierProtectionNoNetData frontierProtectionNoNetData = frontierProtectionNoNetDataService.getById(id); + if (frontierProtectionNoNetData == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(frontierProtectionNoNetData); + result.setSuccess(true); + } + return result; + } + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/controller/FrontierProtectionNoNetDevController.java b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/controller/FrontierProtectionNoNetDevController.java new file mode 100644 index 000000000..87fcdfff4 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/controller/FrontierProtectionNoNetDevController.java @@ -0,0 +1,139 @@ +package com.zhgd.xmgl.modules.frontierprotectionnonet.controller; + +import com.zhgd.xmgl.modules.frontierprotectionnonet.entity.FrontierProtectionNoNetDev; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiImplicitParams; + +import java.util.HashMap; + +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +import com.zhgd.jeecg.common.api.vo.Result; +import org.apache.commons.collections.MapUtils; +import com.zhgd.xmgl.modules.frontierprotectionnonet.service.IFrontierProtectionNoNetDevService; + +import org.simpleframework.xml.core.Validate; +import com.baomidou.mybatisplus.core.metadata.IPage; +import lombok.extern.slf4j.Slf4j; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + + +/** + * @Title: Controller + * @Description: 临边防护(无网)-设备 + * @author: pds + * @date: 2024-01-20 + * @version: V1.0 + */ +@RestController +@RequestMapping("/xmgl/frontierProtectionNoNetDev") +@Slf4j +@Api(tags = "临边防护(无网)-设备相关Api") +public class FrontierProtectionNoNetDevController { + @Autowired + private IFrontierProtectionNoNetDevService frontierProtectionNoNetDevService; + + /** + * 分页列表查询 + * + * @return + */ + @ApiOperation(value = "分页列表查询临边防护(无网)-设备信息", notes = "分页列表查询临边防护(无网)-设备信息", httpMethod = "GET") + @ApiImplicitParams({ + @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"), + }) + @GetMapping(value = "/page") + public Result> queryPageList(@ApiIgnore @RequestParam HashMap paramMap) { + return Result.success(frontierProtectionNoNetDevService.queryPageList(paramMap)); + } + + /** + * 列表查询 + * + * @return + */ + @ApiOperation(value = "列表查询临边防护(无网)-设备信息", notes = "列表查询临边防护(无网)-设备信息", httpMethod = "GET") + @GetMapping(value = "/list") + public Result> queryList(@ApiIgnore @RequestParam HashMap paramMap) { + return Result.success(frontierProtectionNoNetDevService.queryList(paramMap)); + } + + /** + * 添加 + * + * @param frontierProtectionNoNetDev + * @return + */ + @ApiOperation(value = "添加临边防护(无网)-设备信息", notes = "添加临边防护(无网)-设备信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody @Validate FrontierProtectionNoNetDev frontierProtectionNoNetDev) { + frontierProtectionNoNetDevService.add(frontierProtectionNoNetDev); + return Result.ok(); + } + + /** + * 编辑 + * + * @param frontierProtectionNoNetDev + * @return + */ + @ApiOperation(value = "编辑临边防护(无网)-设备信息", notes = "编辑临边防护(无网)-设备信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody FrontierProtectionNoNetDev frontierProtectionNoNetDev) { + frontierProtectionNoNetDevService.edit(frontierProtectionNoNetDev); + return Result.ok(); + } + + /** + * 通过id删除 + * + * @return + */ + @ApiOperation(value = "删除临边防护(无网)-设备信息", notes = "删除临边防护(无网)-设备信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "临边防护(无网)-设备ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}") + @PostMapping(value = "/delete") + public Result delete(@ApiIgnore @RequestBody HashMap map) { + String id = MapUtils.getString(map, "id"); + Result result = new Result(); + FrontierProtectionNoNetDev frontierProtectionNoNetDev = frontierProtectionNoNetDevService.getById(id); + if (frontierProtectionNoNetDev == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = frontierProtectionNoNetDevService.removeById(id); + if (ok) { + result.success("删除成功!"); + } + } + + return result; + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @ApiOperation(value = "通过id查询临边防护(无网)-设备信息", notes = "通过id查询临边防护(无网)-设备信息", httpMethod = "GET") + @ApiImplicitParam(name = "id", value = "临边防护(无网)-设备ID", paramType = "query", required = true, dataType = "Integer") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name = "id", required = true) String id) { + Result result = new Result(); + FrontierProtectionNoNetDev frontierProtectionNoNetDev = frontierProtectionNoNetDevService.getById(id); + if (frontierProtectionNoNetDev == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(frontierProtectionNoNetDev); + result.setSuccess(true); + } + return result; + } + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/entity/FrontierProtectionNoNetData.java b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/entity/FrontierProtectionNoNetData.java new file mode 100644 index 000000000..469a82b40 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/entity/FrontierProtectionNoNetData.java @@ -0,0 +1,126 @@ +package com.zhgd.xmgl.modules.frontierprotectionnonet.entity; + +import java.io.Serializable; +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @Description: 临边防护(无网)-数据 + * @author: pds + * @date: 2024-01-20 + * @version: V1.0 + */ +@Data +@TableName("frontier_protection_no_net_data") +@ApiModel(value = "FrontierProtectionNoNetData实体类", description = "FrontierProtectionNoNetData") +public class FrontierProtectionNoNetData implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键id") + private java.lang.Long id; + /** + * 设备sn + */ + @Excel(name = "设备sn", width = 15) + @ApiModelProperty(value = "设备sn") + private java.lang.String devSn; + /** + * 监测对象 + */ + @Excel(name = "监测对象", width = 15) + @ApiModelProperty(value = "监测对象") + private java.lang.String monitorObject; + /** + * 告警时间 + */ + @Excel(name = "告警时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "告警时间") + private java.util.Date alarmTime; + /** + * 0状态;1报警;2其他 + */ + @Excel(name = "0状态;1报警;2其他", width = 15) + @ApiModelProperty(value = "0状态;1报警;2其他") + private java.lang.Integer deviceStatus; + /** + * 处置结果1已处置2误报忽略 + */ + @Excel(name = "处置结果1已处置2误报忽略", width = 15) + @ApiModelProperty(value = "处置结果1已处置2误报忽略") + private java.lang.Integer handleResult; + /** + * 状态内容:布防、撤防、SOS、盗警、交流电故障等 + */ + @Excel(name = "状态内容:布防、撤防、SOS、盗警、交流电故障等", width = 15) + @ApiModelProperty(value = "状态内容:布防、撤防、SOS、盗警、交流电故障等") + private java.lang.String detailStatus; + /** + * 描述 + */ + @Excel(name = "描述", width = 15) + @ApiModelProperty(value = "描述") + private java.lang.String description; + /** + * 图片 + */ + @Excel(name = "图片", width = 15) + @ApiModelProperty(value = "图片") + private java.lang.Object image; + /** + * 项目sn + */ + @Excel(name = "项目sn", width = 15) + @ApiModelProperty(value = "项目sn") + private java.lang.String projectSn; + /** + * 创建时间 + */ + @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建时间") + private java.util.Date createTime; + /** + * 更新时间 + */ + @Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新时间") + private java.util.Date updateTime; + /** + * 是否处置过1处置过0未处置 + */ + @Excel(name = "是否处置过1处置过0未处置", width = 15) + @ApiModelProperty(value = "是否处置过1处置过0未处置") + private java.lang.Integer handleDone; + /** + * 操作人id + */ + @Excel(name = "操作人id", width = 15) + @ApiModelProperty(value = "操作人id") + private java.lang.Integer operateId; + /** + * 操作时间 + */ + @Excel(name = "操作时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "操作时间") + private java.util.Date operateTime; +} diff --git a/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/entity/FrontierProtectionNoNetDev.java b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/entity/FrontierProtectionNoNetDev.java new file mode 100644 index 000000000..d99a32ab8 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/entity/FrontierProtectionNoNetDev.java @@ -0,0 +1,100 @@ +package com.zhgd.xmgl.modules.frontierprotectionnonet.entity; + +import java.io.Serializable; +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @Description: 临边防护(无网)-设备 + * @author: pds + * @date: 2024-01-20 + * @version: V1.0 + */ +@Data +@TableName("frontier_protection_no_net_dev") +@ApiModel(value = "FrontierProtectionNoNetDev实体类", description = "FrontierProtectionNoNetDev") +public class FrontierProtectionNoNetDev implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键id") + private java.lang.Long id; + /** + * 设备sn + */ + @Excel(name = "设备sn", width = 15) + @ApiModelProperty(value = "设备sn") + private java.lang.String devSn; + /** + * 设备名称 + */ + @Excel(name = "设备名称", width = 15) + @ApiModelProperty(value = "设备名称") + private java.lang.String devName; + /** + * 设备位置 + */ + @Excel(name = "设备位置", width = 15) + @ApiModelProperty(value = "设备位置") + private java.lang.String location; + /** + * 项目sn + */ + @Excel(name = "项目sn", width = 15) + @ApiModelProperty(value = "项目sn") + private java.lang.String projectSn; + /** + * 责任班组id + */ + @Excel(name = "责任班组id", width = 15) + @ApiModelProperty(value = "责任班组id") + private java.lang.Integer dutyTeamInfoId; + /** + * 图片 + */ + @Excel(name = "图片", width = 15) + @ApiModelProperty(value = "图片") + private java.lang.Object image; + /** + * 创建时间 yyyy-MM-dd HH:mm:ss + */ + @Excel(name = "创建时间 yyyy-MM-dd HH:mm:ss", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建时间 yyyy-MM-dd HH:mm:ss") + private java.util.Date createDate; + /** + * 更新时间 yyyy-MM-dd HH:mm:ss + */ + @Excel(name = "更新时间 yyyy-MM-dd HH:mm:ss", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新时间 yyyy-MM-dd HH:mm:ss") + private java.util.Date updateDate; + /** + * 备注 + */ + @Excel(name = "备注", width = 15) + @ApiModelProperty(value = "备注") + private java.lang.String remark; + /** + * 上传时间 + */ + @Excel(name = "上传时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "上传时间") + private java.util.Date uploadDate; +} diff --git a/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/mapper/FrontierProtectionNoNetDataMapper.java b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/mapper/FrontierProtectionNoNetDataMapper.java new file mode 100644 index 000000000..d44a38aec --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/mapper/FrontierProtectionNoNetDataMapper.java @@ -0,0 +1,16 @@ +package com.zhgd.xmgl.modules.frontierprotectionnonet.mapper; + +import com.zhgd.xmgl.modules.frontierprotectionnonet.entity.FrontierProtectionNoNetData; +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 临边防护(无网)-数据 + * @author: pds + * @date: 2024-01-20 + * @version: V1.0 + */ +@Mapper +public interface FrontierProtectionNoNetDataMapper extends BaseMapper { + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/mapper/FrontierProtectionNoNetDevMapper.java b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/mapper/FrontierProtectionNoNetDevMapper.java new file mode 100644 index 000000000..c82d27ec6 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/mapper/FrontierProtectionNoNetDevMapper.java @@ -0,0 +1,16 @@ +package com.zhgd.xmgl.modules.frontierprotectionnonet.mapper; + +import org.apache.ibatis.annotations.Mapper; +import com.zhgd.xmgl.modules.frontierprotectionnonet.entity.FrontierProtectionNoNetDev; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 临边防护(无网)-设备 + * @author: pds + * @date: 2024-01-20 + * @version: V1.0 + */ +@Mapper +public interface FrontierProtectionNoNetDevMapper extends BaseMapper { + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/mapper/xml/FrontierProtectionNoNetDataMapper.xml b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/mapper/xml/FrontierProtectionNoNetDataMapper.xml new file mode 100644 index 000000000..985e3c6aa --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/mapper/xml/FrontierProtectionNoNetDataMapper.xml @@ -0,0 +1,4 @@ + + + + diff --git a/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/mapper/xml/FrontierProtectionNoNetDevMapper.xml b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/mapper/xml/FrontierProtectionNoNetDevMapper.xml new file mode 100644 index 000000000..482490057 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/mapper/xml/FrontierProtectionNoNetDevMapper.xml @@ -0,0 +1,4 @@ + + + + diff --git a/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/service/IFrontierProtectionNoNetDataService.java b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/service/IFrontierProtectionNoNetDataService.java new file mode 100644 index 000000000..859fc15e2 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/service/IFrontierProtectionNoNetDataService.java @@ -0,0 +1,25 @@ +package com.zhgd.xmgl.modules.frontierprotectionnonet.service; + +import com.zhgd.xmgl.modules.frontierprotectionnonet.entity.FrontierProtectionNoNetData; +import com.baomidou.mybatisplus.extension.service.IService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.HashMap; +import java.util.List; + +/** + * @Description: 临边防护(无网)-数据 + * @author: pds + * @date: 2024-01-20 + * @version: V1.0 + */ +public interface IFrontierProtectionNoNetDataService extends IService { + + IPage queryPageList(HashMap paramMap); + + List queryList(HashMap paramMap); + + void add(FrontierProtectionNoNetData frontierProtectionNoNetData); + + void edit(FrontierProtectionNoNetData frontierProtectionNoNetData); +} diff --git a/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/service/IFrontierProtectionNoNetDevService.java b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/service/IFrontierProtectionNoNetDevService.java new file mode 100644 index 000000000..bd34d5406 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/service/IFrontierProtectionNoNetDevService.java @@ -0,0 +1,25 @@ +package com.zhgd.xmgl.modules.frontierprotectionnonet.service; + +import com.zhgd.xmgl.modules.frontierprotectionnonet.entity.FrontierProtectionNoNetDev; +import com.baomidou.mybatisplus.extension.service.IService; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import java.util.HashMap; +import java.util.List; + +/** + * @Description: 临边防护(无网)-设备 + * @author: pds + * @date: 2024-01-20 + * @version: V1.0 + */ +public interface IFrontierProtectionNoNetDevService extends IService { + + IPage queryPageList(HashMap paramMap); + + List queryList(HashMap paramMap); + + void add(FrontierProtectionNoNetDev frontierProtectionNoNetDev); + + void edit(FrontierProtectionNoNetDev frontierProtectionNoNetDev); +} diff --git a/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/service/impl/FrontierProtectionNoNetDataServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/service/impl/FrontierProtectionNoNetDataServiceImpl.java new file mode 100644 index 000000000..6a4373b35 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/service/impl/FrontierProtectionNoNetDataServiceImpl.java @@ -0,0 +1,69 @@ +package com.zhgd.xmgl.modules.frontierprotectionnonet.service.impl; + +import com.zhgd.xmgl.modules.frontierprotectionnonet.entity.FrontierProtectionNoNetData; +import com.zhgd.xmgl.modules.frontierprotectionnonet.mapper.FrontierProtectionNoNetDataMapper; +import com.zhgd.xmgl.modules.frontierprotectionnonet.service.IFrontierProtectionNoNetDataService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.xmgl.util.PageUtil; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import java.util.HashMap; +import java.util.List; + +import com.zhgd.xmgl.util.RefUtil; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * @Description: 临边防护(无网)-数据 + * @author: pds + * @date: 2024-01-20 + * @version: V1.0 + */ +@Service +@Transactional(rollbackFor = Exception.class) +public class FrontierProtectionNoNetDataServiceImpl extends ServiceImpl implements IFrontierProtectionNoNetDataService { + @Autowired + private FrontierProtectionNoNetDataMapper frontierProtectionNoNetDataMapper; + + @Override + public IPage queryPageList(HashMap paramMap) { + QueryWrapper queryWrapper = getQueryWrapper(paramMap); + Page page = PageUtil.getPage(paramMap); + IPage pageList = this.page(page, queryWrapper); + pageList.setRecords(dealList(pageList.getRecords())); + return pageList; + } + + @Override + public List queryList(HashMap paramMap) { + QueryWrapper queryWrapper = getQueryWrapper(paramMap); + return dealList(this.list(queryWrapper)); + } + + private QueryWrapper getQueryWrapper(HashMap paramMap) { + String alias = ""; + QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(FrontierProtectionNoNetData.class, paramMap, alias); + queryWrapper.orderByDesc(alias + RefUtil.fieldNameUlc(FrontierProtectionNoNetData::getId)); + return queryWrapper; + } + + private List dealList(List list) { + return list; + } + + @Override + public void add(FrontierProtectionNoNetData frontierProtectionNoNetData) { + frontierProtectionNoNetData.setId(null); + baseMapper.insert(frontierProtectionNoNetData); + } + + @Override + public void edit(FrontierProtectionNoNetData frontierProtectionNoNetData) { + baseMapper.updateById(frontierProtectionNoNetData); + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/service/impl/FrontierProtectionNoNetDevServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/service/impl/FrontierProtectionNoNetDevServiceImpl.java new file mode 100644 index 000000000..32bcde0a7 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/frontierprotectionnonet/service/impl/FrontierProtectionNoNetDevServiceImpl.java @@ -0,0 +1,69 @@ +package com.zhgd.xmgl.modules.frontierprotectionnonet.service.impl; + +import com.zhgd.xmgl.modules.frontierprotectionnonet.entity.FrontierProtectionNoNetDev; +import com.zhgd.xmgl.modules.frontierprotectionnonet.mapper.FrontierProtectionNoNetDevMapper; +import com.zhgd.xmgl.modules.frontierprotectionnonet.service.IFrontierProtectionNoNetDevService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.xmgl.util.PageUtil; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import java.util.HashMap; +import java.util.List; + +import com.zhgd.xmgl.util.RefUtil; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * @Description: 临边防护(无网)-设备 + * @author: pds + * @date: 2024-01-20 + * @version: V1.0 + */ +@Service +@Transactional(rollbackFor = Exception.class) +public class FrontierProtectionNoNetDevServiceImpl extends ServiceImpl implements IFrontierProtectionNoNetDevService { + @Autowired + private FrontierProtectionNoNetDevMapper frontierProtectionNoNetDevMapper; + + @Override + public IPage queryPageList(HashMap paramMap) { + QueryWrapper queryWrapper = getQueryWrapper(paramMap); + Page page = PageUtil.getPage(paramMap); + IPage pageList = this.page(page, queryWrapper); + pageList.setRecords(dealList(pageList.getRecords())); + return pageList; + } + + @Override + public List queryList(HashMap paramMap) { + QueryWrapper queryWrapper = getQueryWrapper(paramMap); + return dealList(this.list(queryWrapper)); + } + + private QueryWrapper getQueryWrapper(HashMap paramMap) { + String alias = ""; + QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(FrontierProtectionNoNetDev.class, paramMap, alias); + queryWrapper.orderByDesc(alias + RefUtil.fieldNameUlc(FrontierProtectionNoNetDev::getId)); + return queryWrapper; + } + + private List dealList(List list) { + return list; + } + + @Override + public void add(FrontierProtectionNoNetDev frontierProtectionNoNetDev) { + frontierProtectionNoNetDev.setId(null); + baseMapper.insert(frontierProtectionNoNetDev); + } + + @Override + public void edit(FrontierProtectionNoNetDev frontierProtectionNoNetDev) { + baseMapper.updateById(frontierProtectionNoNetDev); + } +}