临边防护(无网)

This commit is contained in:
guo 2024-01-20 16:11:57 +08:00
parent 8f4433cc92
commit fbfb2b8ed6
12 changed files with 732 additions and 0 deletions

View File

@ -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<IPage<FrontierProtectionNoNetData>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(frontierProtectionNoNetDataService.queryPageList(paramMap));
}
/**
* 列表查询
*
* @return
*/
@ApiOperation(value = "列表查询临边防护(无网)-数据信息", notes = "列表查询临边防护(无网)-数据信息", httpMethod = "GET")
@GetMapping(value = "/list")
public Result<List<FrontierProtectionNoNetData>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(frontierProtectionNoNetDataService.queryList(paramMap));
}
/**
* 添加
*
* @param frontierProtectionNoNetData
* @return
*/
@ApiOperation(value = "添加临边防护(无网)-数据信息", notes = "添加临边防护(无网)-数据信息", httpMethod = "POST")
@PostMapping(value = "/add")
public Result<FrontierProtectionNoNetData> add(@RequestBody @Validate FrontierProtectionNoNetData frontierProtectionNoNetData) {
frontierProtectionNoNetDataService.add(frontierProtectionNoNetData);
return Result.ok();
}
/**
* 编辑
*
* @param frontierProtectionNoNetData
* @return
*/
@ApiOperation(value = "编辑临边防护(无网)-数据信息", notes = "编辑临边防护(无网)-数据信息", httpMethod = "POST")
@PostMapping(value = "/edit")
public Result<FrontierProtectionNoNetData> 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<FrontierProtectionNoNetData> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
String id = MapUtils.getString(map, "id");
Result<FrontierProtectionNoNetData> result = new Result<FrontierProtectionNoNetData>();
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<FrontierProtectionNoNetData> queryById(@RequestParam(name = "id", required = true) String id) {
Result<FrontierProtectionNoNetData> result = new Result<FrontierProtectionNoNetData>();
FrontierProtectionNoNetData frontierProtectionNoNetData = frontierProtectionNoNetDataService.getById(id);
if (frontierProtectionNoNetData == null) {
result.error500("未找到对应实体");
} else {
result.setResult(frontierProtectionNoNetData);
result.setSuccess(true);
}
return result;
}
}

View File

@ -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<IPage<FrontierProtectionNoNetDev>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(frontierProtectionNoNetDevService.queryPageList(paramMap));
}
/**
* 列表查询
*
* @return
*/
@ApiOperation(value = "列表查询临边防护(无网)-设备信息", notes = "列表查询临边防护(无网)-设备信息", httpMethod = "GET")
@GetMapping(value = "/list")
public Result<List<FrontierProtectionNoNetDev>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(frontierProtectionNoNetDevService.queryList(paramMap));
}
/**
* 添加
*
* @param frontierProtectionNoNetDev
* @return
*/
@ApiOperation(value = "添加临边防护(无网)-设备信息", notes = "添加临边防护(无网)-设备信息", httpMethod = "POST")
@PostMapping(value = "/add")
public Result<FrontierProtectionNoNetDev> add(@RequestBody @Validate FrontierProtectionNoNetDev frontierProtectionNoNetDev) {
frontierProtectionNoNetDevService.add(frontierProtectionNoNetDev);
return Result.ok();
}
/**
* 编辑
*
* @param frontierProtectionNoNetDev
* @return
*/
@ApiOperation(value = "编辑临边防护(无网)-设备信息", notes = "编辑临边防护(无网)-设备信息", httpMethod = "POST")
@PostMapping(value = "/edit")
public Result<FrontierProtectionNoNetDev> 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<FrontierProtectionNoNetDev> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
String id = MapUtils.getString(map, "id");
Result<FrontierProtectionNoNetDev> result = new Result<FrontierProtectionNoNetDev>();
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<FrontierProtectionNoNetDev> queryById(@RequestParam(name = "id", required = true) String id) {
Result<FrontierProtectionNoNetDev> result = new Result<FrontierProtectionNoNetDev>();
FrontierProtectionNoNetDev frontierProtectionNoNetDev = frontierProtectionNoNetDevService.getById(id);
if (frontierProtectionNoNetDev == null) {
result.error500("未找到对应实体");
} else {
result.setResult(frontierProtectionNoNetDev);
result.setSuccess(true);
}
return result;
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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<FrontierProtectionNoNetData> {
}

View File

@ -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<FrontierProtectionNoNetDev> {
}

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zhgd.xmgl.modules.frontierprotectionnonet.mapper.FrontierProtectionNoNetDataMapper">
</mapper>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zhgd.xmgl.modules.frontierprotectionnonet.mapper.FrontierProtectionNoNetDevMapper">
</mapper>

View File

@ -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<FrontierProtectionNoNetData> {
IPage<FrontierProtectionNoNetData> queryPageList(HashMap<String, Object> paramMap);
List<FrontierProtectionNoNetData> queryList(HashMap<String, Object> paramMap);
void add(FrontierProtectionNoNetData frontierProtectionNoNetData);
void edit(FrontierProtectionNoNetData frontierProtectionNoNetData);
}

View File

@ -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<FrontierProtectionNoNetDev> {
IPage<FrontierProtectionNoNetDev> queryPageList(HashMap<String, Object> paramMap);
List<FrontierProtectionNoNetDev> queryList(HashMap<String, Object> paramMap);
void add(FrontierProtectionNoNetDev frontierProtectionNoNetDev);
void edit(FrontierProtectionNoNetDev frontierProtectionNoNetDev);
}

View File

@ -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<FrontierProtectionNoNetDataMapper, FrontierProtectionNoNetData> implements IFrontierProtectionNoNetDataService {
@Autowired
private FrontierProtectionNoNetDataMapper frontierProtectionNoNetDataMapper;
@Override
public IPage<FrontierProtectionNoNetData> queryPageList(HashMap<String, Object> paramMap) {
QueryWrapper<FrontierProtectionNoNetData> queryWrapper = getQueryWrapper(paramMap);
Page<FrontierProtectionNoNetData> page = PageUtil.getPage(paramMap);
IPage<FrontierProtectionNoNetData> pageList = this.page(page, queryWrapper);
pageList.setRecords(dealList(pageList.getRecords()));
return pageList;
}
@Override
public List<FrontierProtectionNoNetData> queryList(HashMap<String, Object> paramMap) {
QueryWrapper<FrontierProtectionNoNetData> queryWrapper = getQueryWrapper(paramMap);
return dealList(this.list(queryWrapper));
}
private QueryWrapper<FrontierProtectionNoNetData> getQueryWrapper(HashMap<String, Object> paramMap) {
String alias = "";
QueryWrapper<FrontierProtectionNoNetData> queryWrapper = QueryGenerator.initPageQueryWrapper(FrontierProtectionNoNetData.class, paramMap, alias);
queryWrapper.orderByDesc(alias + RefUtil.fieldNameUlc(FrontierProtectionNoNetData::getId));
return queryWrapper;
}
private List<FrontierProtectionNoNetData> dealList(List<FrontierProtectionNoNetData> list) {
return list;
}
@Override
public void add(FrontierProtectionNoNetData frontierProtectionNoNetData) {
frontierProtectionNoNetData.setId(null);
baseMapper.insert(frontierProtectionNoNetData);
}
@Override
public void edit(FrontierProtectionNoNetData frontierProtectionNoNetData) {
baseMapper.updateById(frontierProtectionNoNetData);
}
}

View File

@ -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<FrontierProtectionNoNetDevMapper, FrontierProtectionNoNetDev> implements IFrontierProtectionNoNetDevService {
@Autowired
private FrontierProtectionNoNetDevMapper frontierProtectionNoNetDevMapper;
@Override
public IPage<FrontierProtectionNoNetDev> queryPageList(HashMap<String, Object> paramMap) {
QueryWrapper<FrontierProtectionNoNetDev> queryWrapper = getQueryWrapper(paramMap);
Page<FrontierProtectionNoNetDev> page = PageUtil.getPage(paramMap);
IPage<FrontierProtectionNoNetDev> pageList = this.page(page, queryWrapper);
pageList.setRecords(dealList(pageList.getRecords()));
return pageList;
}
@Override
public List<FrontierProtectionNoNetDev> queryList(HashMap<String, Object> paramMap) {
QueryWrapper<FrontierProtectionNoNetDev> queryWrapper = getQueryWrapper(paramMap);
return dealList(this.list(queryWrapper));
}
private QueryWrapper<FrontierProtectionNoNetDev> getQueryWrapper(HashMap<String, Object> paramMap) {
String alias = "";
QueryWrapper<FrontierProtectionNoNetDev> queryWrapper = QueryGenerator.initPageQueryWrapper(FrontierProtectionNoNetDev.class, paramMap, alias);
queryWrapper.orderByDesc(alias + RefUtil.fieldNameUlc(FrontierProtectionNoNetDev::getId));
return queryWrapper;
}
private List<FrontierProtectionNoNetDev> dealList(List<FrontierProtectionNoNetDev> list) {
return list;
}
@Override
public void add(FrontierProtectionNoNetDev frontierProtectionNoNetDev) {
frontierProtectionNoNetDev.setId(null);
baseMapper.insert(frontierProtectionNoNetDev);
}
@Override
public void edit(FrontierProtectionNoNetDev frontierProtectionNoNetDev) {
baseMapper.updateById(frontierProtectionNoNetDev);
}
}