ci: 三个模块基础框架搭建
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.jero.boot</groupId>
|
||||
<artifactId>jero-boot</artifactId>
|
||||
<version>2.5.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>jero-boot-modules</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.jero.boot</groupId>
|
||||
<artifactId>jero-system-local-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,176 @@
|
||||
package com.jero.modules.controller.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Results;
|
||||
import com.jero.modules.entity.KhDevice;
|
||||
import com.jero.modules.service.IKhDeviceService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 设备
|
||||
* @Author: jero-boot
|
||||
* @Date: 2024-04-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="设备")
|
||||
@RestController
|
||||
@RequestMapping("/1/khDevice")
|
||||
@Slf4j
|
||||
public class KhDeviceController extends JeroController<KhDevice, IKhDeviceService> {
|
||||
@Autowired
|
||||
private IKhDeviceService khDeviceService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param khDevice
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "设备-分页列表查询")
|
||||
@ApiOperation(value="设备-分页列表查询", notes="设备-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Results<IPage<KhDevice>> queryPageList(KhDevice khDevice,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
IPage<KhDevice> pageList = khDeviceService.queryPage(khDevice, pageNo, pageSize, req);
|
||||
return Results.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param khDevice
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "设备-列表查询")
|
||||
@ApiOperation(value="设备-列表查询", notes="设备-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Results<List<KhDevice>> queryList(KhDevice khDevice, HttpServletRequest req) {
|
||||
List<KhDevice> list = khDeviceService.queryList(khDevice, req);
|
||||
return Results.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param khDevice
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "设备-添加")
|
||||
@ApiOperation(value="设备-添加", notes="设备-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Results<T> add(@Validated @RequestBody KhDevice khDevice) {
|
||||
khDeviceService.add(khDevice);
|
||||
return Results.OK("操作成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param khDevice
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "设备-编辑")
|
||||
@ApiOperation(value="设备-编辑", notes="设备-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Results<T> edit(@Validated @RequestBody KhDevice khDevice) {
|
||||
khDeviceService.editById(khDevice);
|
||||
return Results.OK("操作成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "设备-通过id删除")
|
||||
@ApiOperation(value="设备-通过id删除", notes="设备-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Results<T> delete(@RequestBody Map<String, String> map) {
|
||||
if(!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))){
|
||||
return Results.error("请选择数据!");
|
||||
}
|
||||
khDeviceService.deleteById(map.get("id"));
|
||||
return Results.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "设备-批量删除")
|
||||
@ApiOperation(value="设备-批量删除", notes="设备-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Results<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
|
||||
return Results.error("请选择数据!");
|
||||
}
|
||||
this.khDeviceService.deleteByIds(Arrays.asList(map.get("ids").split(",")));
|
||||
return Results.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "设备-通过id查询")
|
||||
@ApiOperation(value="设备-通过id查询", notes="设备-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Results<KhDevice> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KhDevice khDevice = khDeviceService.queryById(id);
|
||||
if(khDevice==null) {
|
||||
return Results.error("未找到对应数据");
|
||||
}
|
||||
return Results.OK(khDevice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param khDevice
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KhDevice khDevice) {
|
||||
return super.exportXls(request, khDevice, KhDevice.class, "设备");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Results<KhDevice> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KhDevice.class);
|
||||
}
|
||||
|
||||
}
|
||||
+176
@@ -0,0 +1,176 @@
|
||||
package com.jero.modules.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Results;
|
||||
import com.jero.modules.entity.KhSystemSetting;
|
||||
import com.jero.modules.service.IKhSystemSettingService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 系统设置
|
||||
* @Author: jero-boot
|
||||
* @Date: 2024-04-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="系统设置")
|
||||
@RestController
|
||||
@RequestMapping("/com.jero.modules/khSystemSetting")
|
||||
@Slf4j
|
||||
public class KhSystemSettingController extends JeroController<KhSystemSetting, IKhSystemSettingService> {
|
||||
@Autowired
|
||||
private IKhSystemSettingService khSystemSettingService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param khSystemSetting
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "系统设置-分页列表查询")
|
||||
@ApiOperation(value="系统设置-分页列表查询", notes="系统设置-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Results<IPage<KhSystemSetting>> queryPageList(KhSystemSetting khSystemSetting,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
IPage<KhSystemSetting> pageList = khSystemSettingService.queryPage(khSystemSetting, pageNo, pageSize, req);
|
||||
return Results.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param khSystemSetting
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "系统设置-列表查询")
|
||||
@ApiOperation(value="系统设置-列表查询", notes="系统设置-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Results<List<KhSystemSetting>> queryList(KhSystemSetting khSystemSetting, HttpServletRequest req) {
|
||||
List<KhSystemSetting> list = khSystemSettingService.queryList(khSystemSetting, req);
|
||||
return Results.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param khSystemSetting
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "系统设置-添加")
|
||||
@ApiOperation(value="系统设置-添加", notes="系统设置-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Results<T> add(@Validated @RequestBody KhSystemSetting khSystemSetting) {
|
||||
khSystemSettingService.add(khSystemSetting);
|
||||
return Results.OK("操作成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param khSystemSetting
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "系统设置-编辑")
|
||||
@ApiOperation(value="系统设置-编辑", notes="系统设置-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Results<T> edit(@Validated @RequestBody KhSystemSetting khSystemSetting) {
|
||||
khSystemSettingService.editById(khSystemSetting);
|
||||
return Results.OK("操作成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "系统设置-通过id删除")
|
||||
@ApiOperation(value="系统设置-通过id删除", notes="系统设置-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Results<T> delete(@RequestBody Map<String, String> map) {
|
||||
if(!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))){
|
||||
return Results.error("请选择数据!");
|
||||
}
|
||||
khSystemSettingService.deleteById(map.get("id"));
|
||||
return Results.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "系统设置-批量删除")
|
||||
@ApiOperation(value="系统设置-批量删除", notes="系统设置-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Results<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
|
||||
return Results.error("请选择数据!");
|
||||
}
|
||||
this.khSystemSettingService.deleteByIds(Arrays.asList(map.get("ids").split(",")));
|
||||
return Results.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "系统设置-通过id查询")
|
||||
@ApiOperation(value="系统设置-通过id查询", notes="系统设置-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Results<KhSystemSetting> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KhSystemSetting khSystemSetting = khSystemSettingService.queryById(id);
|
||||
if(khSystemSetting==null) {
|
||||
return Results.error("未找到对应数据");
|
||||
}
|
||||
return Results.OK(khSystemSetting);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param khSystemSetting
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KhSystemSetting khSystemSetting) {
|
||||
return super.exportXls(request, khSystemSetting, KhSystemSetting.class, "系统设置");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Results<KhSystemSetting> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KhSystemSetting.class);
|
||||
}
|
||||
|
||||
}
|
||||
+176
@@ -0,0 +1,176 @@
|
||||
package com.jero.modules.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Results;
|
||||
import com.jero.modules.entity.KhWellhead;
|
||||
import com.jero.modules.service.IKhWellheadService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 井口
|
||||
* @Author: jero-boot
|
||||
* @Date: 2024-04-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="井口")
|
||||
@RestController
|
||||
@RequestMapping("/1/khWellhead")
|
||||
@Slf4j
|
||||
public class KhWellheadController extends JeroController<KhWellhead, IKhWellheadService> {
|
||||
@Autowired
|
||||
private IKhWellheadService khWellheadService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param khWellhead
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "井口-分页列表查询")
|
||||
@ApiOperation(value="井口-分页列表查询", notes="井口-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Results<IPage<KhWellhead>> queryPageList(KhWellhead khWellhead,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
IPage<KhWellhead> pageList = khWellheadService.queryPage(khWellhead, pageNo, pageSize, req);
|
||||
return Results.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param khWellhead
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "井口-列表查询")
|
||||
@ApiOperation(value="井口-列表查询", notes="井口-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Results<List<KhWellhead>> queryList(KhWellhead khWellhead, HttpServletRequest req) {
|
||||
List<KhWellhead> list = khWellheadService.queryList(khWellhead, req);
|
||||
return Results.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param khWellhead
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "井口-添加")
|
||||
@ApiOperation(value="井口-添加", notes="井口-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Results<T> add(@Validated @RequestBody KhWellhead khWellhead) {
|
||||
khWellheadService.add(khWellhead);
|
||||
return Results.OK("操作成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param khWellhead
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "井口-编辑")
|
||||
@ApiOperation(value="井口-编辑", notes="井口-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Results<T> edit(@Validated @RequestBody KhWellhead khWellhead) {
|
||||
khWellheadService.editById(khWellhead);
|
||||
return Results.OK("操作成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "井口-通过id删除")
|
||||
@ApiOperation(value="井口-通过id删除", notes="井口-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Results<T> delete(@RequestBody Map<String, String> map) {
|
||||
if(!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))){
|
||||
return Results.error("请选择数据!");
|
||||
}
|
||||
khWellheadService.deleteById(map.get("id"));
|
||||
return Results.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "井口-批量删除")
|
||||
@ApiOperation(value="井口-批量删除", notes="井口-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Results<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
|
||||
return Results.error("请选择数据!");
|
||||
}
|
||||
this.khWellheadService.deleteByIds(Arrays.asList(map.get("ids").split(",")));
|
||||
return Results.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "井口-通过id查询")
|
||||
@ApiOperation(value="井口-通过id查询", notes="井口-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Results<KhWellhead> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KhWellhead khWellhead = khWellheadService.queryById(id);
|
||||
if(khWellhead==null) {
|
||||
return Results.error("未找到对应数据");
|
||||
}
|
||||
return Results.OK(khWellhead);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param khWellhead
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KhWellhead khWellhead) {
|
||||
return super.exportXls(request, khWellhead, KhWellhead.class, "井口");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Results<KhWellhead> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KhWellhead.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.jero.modules.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
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 cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 设备
|
||||
* @Author: jero-boot
|
||||
* @Date: 2024-04-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kh_device")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kh_device对象", description="设备")
|
||||
public class KhDevice implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private Date updateTime;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
/**设备名称*/
|
||||
@Excel(name = "设备名称", width = 15)
|
||||
@ApiModelProperty(value = "设备名称")
|
||||
private String deviceName;
|
||||
/**设备类型*/
|
||||
@Excel(name = "设备类型", width = 15)
|
||||
@ApiModelProperty(value = "设备类型")
|
||||
private String deviceType;
|
||||
/**所属井口*/
|
||||
@Excel(name = "所属井口", width = 15)
|
||||
@ApiModelProperty(value = "所属井口")
|
||||
private String wellheadId;
|
||||
/**设备描述*/
|
||||
@Excel(name = "设备描述", width = 15)
|
||||
@ApiModelProperty(value = "设备描述")
|
||||
private String deviceDesc;
|
||||
/**设备sn码*/
|
||||
@Excel(name = "设备sn码", width = 15)
|
||||
@ApiModelProperty(value = "设备sn码")
|
||||
private String deviceSn;
|
||||
/**设备状态(0离线 1在线 默认在线)*/
|
||||
@Excel(name = "设备状态(0离线 1在线 默认在线)", width = 15)
|
||||
@ApiModelProperty(value = "设备状态(0离线 1在线 默认在线)")
|
||||
private String deviceStatuts;
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.jero.modules.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
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 cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 系统设置
|
||||
* @Author: jero-boot
|
||||
* @Date: 2024-04-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kh_system_setting")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kh_system_setting对象", description="系统设置")
|
||||
public class KhSystemSetting implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private Date updateTime;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
/**服务器ip*/
|
||||
@Excel(name = "服务器ip", width = 15)
|
||||
@ApiModelProperty(value = "服务器ip")
|
||||
private String serverIp;
|
||||
/**服务器端口*/
|
||||
@Excel(name = "服务器端口", width = 15)
|
||||
@ApiModelProperty(value = "服务器端口")
|
||||
private String serverPort;
|
||||
/**数据采集协议*/
|
||||
@Excel(name = "数据采集协议", width = 15)
|
||||
@ApiModelProperty(value = "数据采集协议")
|
||||
private String dataAcquisitionProtocol;
|
||||
/**数据采集周期*/
|
||||
@Excel(name = "数据采集周期", width = 15)
|
||||
@ApiModelProperty(value = "数据采集周期")
|
||||
private String dataAcquisitionCycle;
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.jero.modules.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
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 cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 井口
|
||||
* @Author: jero-boot
|
||||
* @Date: 2024-04-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kh_wellhead")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kh_wellhead对象", description="井口")
|
||||
public class KhWellhead implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private Date updateTime;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
/**所属作业区*/
|
||||
@Excel(name = "所属作业区", width = 15)
|
||||
@ApiModelProperty(value = "所属作业区")
|
||||
private String operateArea;
|
||||
/**所属井场*/
|
||||
@Excel(name = "所属井场", width = 15)
|
||||
@ApiModelProperty(value = "所属井场")
|
||||
private String wellheadArea;
|
||||
/**井口类型*/
|
||||
@Excel(name = "井口类型", width = 15)
|
||||
@ApiModelProperty(value = "井口类型")
|
||||
private String wellheadType;
|
||||
/**井口名称*/
|
||||
@Excel(name = "井口名称", width = 15)
|
||||
@ApiModelProperty(value = "井口名称")
|
||||
private String wellheadName;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.entity.KhDevice;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 设备
|
||||
* @Author: jero-boot
|
||||
* @Date: 2024-04-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KhDeviceMapper extends BaseMapper<KhDevice> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.jero.modules.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.entity.KhSystemSetting;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 系统设置
|
||||
* @Author: jero-boot
|
||||
* @Date: 2024-04-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KhSystemSettingMapper extends BaseMapper<KhSystemSetting> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.entity.KhWellhead;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 井口
|
||||
* @Author: jero-boot
|
||||
* @Date: 2024-04-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KhWellheadMapper extends BaseMapper<KhWellhead> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?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.jero.modules.1.mapper.KhDeviceMapper">
|
||||
<resultMap id="KhDeviceResultMap" type="com.jero.modules.1.entity.KhDevice">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="device_name" property="deviceName" />
|
||||
<result column="device_type" property="deviceType" />
|
||||
<result column="wellhead_id" property="wellheadId" />
|
||||
<result column="device_desc" property="deviceDesc" />
|
||||
<result column="device_sn" property="deviceSn" />
|
||||
<result column="device_statuts" property="deviceStatuts" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?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.jero.modules.mapper.KhSystemSettingMapper">
|
||||
<resultMap id="KhSystemSettingResultMap" type="com.jero.modules.entity.KhSystemSetting">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="server_ip" property="serverIp" />
|
||||
<result column="server_port" property="serverPort" />
|
||||
<result column="data_acquisition_protocol" property="dataAcquisitionProtocol" />
|
||||
<result column="data_acquisition_cycle" property="dataAcquisitionCycle" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?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.jero.modules.1.mapper.KhWellheadMapper">
|
||||
<resultMap id="KhWellheadResultMap" type="com.jero.modules.1.entity.KhWellhead">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="operate_area" property="operateArea" />
|
||||
<result column="wellhead_area" property="wellheadArea" />
|
||||
<result column="wellhead_type" property="wellheadType" />
|
||||
<result column="wellhead_name" property="wellheadName" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.jero.modules.service;
|
||||
|
||||
import com.jero.modules.entity.KhDevice;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 设备
|
||||
* @Author: jero-boot
|
||||
* @Date: 2024-04-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKhDeviceService extends IService<KhDevice> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param khDevice
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
IPage<KhDevice> queryPage(KhDevice khDevice, Integer pageNo, Integer pageSize, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param khDevice
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
List<KhDevice> queryList(KhDevice khDevice, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param khDevice
|
||||
* @return
|
||||
*/
|
||||
void add(KhDevice khDevice);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param khDevice
|
||||
* @return
|
||||
*/
|
||||
void editById(KhDevice khDevice);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
KhDevice queryById(String id);
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.jero.modules.service;
|
||||
|
||||
import com.jero.modules.entity.KhSystemSetting;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 系统设置
|
||||
* @Author: jero-boot
|
||||
* @Date: 2024-04-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKhSystemSettingService extends IService<KhSystemSetting> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param khSystemSetting
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
IPage<KhSystemSetting> queryPage(KhSystemSetting khSystemSetting, Integer pageNo, Integer pageSize, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param khSystemSetting
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
List<KhSystemSetting> queryList(KhSystemSetting khSystemSetting, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param khSystemSetting
|
||||
* @return
|
||||
*/
|
||||
void add(KhSystemSetting khSystemSetting);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param khSystemSetting
|
||||
* @return
|
||||
*/
|
||||
void editById(KhSystemSetting khSystemSetting);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
KhSystemSetting queryById(String id);
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.jero.modules.service;
|
||||
|
||||
import com.jero.modules.entity.KhWellhead;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 井口
|
||||
* @Author: jero-boot
|
||||
* @Date: 2024-04-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKhWellheadService extends IService<KhWellhead> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param khWellhead
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
IPage<KhWellhead> queryPage(KhWellhead khWellhead, Integer pageNo, Integer pageSize, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param khWellhead
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
List<KhWellhead> queryList(KhWellhead khWellhead, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param khWellhead
|
||||
* @return
|
||||
*/
|
||||
void add(KhWellhead khWellhead);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param khWellhead
|
||||
* @return
|
||||
*/
|
||||
void editById(KhWellhead khWellhead);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
KhWellhead queryById(String id);
|
||||
}
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
package com.jero.modules.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.modules.entity.KhDevice;
|
||||
import com.jero.modules.mapper.KhDeviceMapper;
|
||||
import com.jero.modules.service.IKhDeviceService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 设备
|
||||
* @Author: jero-boot
|
||||
* @Date: 2024-04-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = JeroBootException.class)
|
||||
public class KhDeviceServiceImpl extends ServiceImpl<KhDeviceMapper, KhDevice> implements IKhDeviceService {
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param khDevice
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public IPage<KhDevice> queryPage(KhDevice khDevice, Integer pageNo, Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KhDevice> queryWrapper = QueryGenerator.initQueryWrapper(khDevice, req.getParameterMap());
|
||||
Page<KhDevice> page = new Page<>(pageNo, pageSize);
|
||||
return page(page, queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param khDevice
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<KhDevice> queryList(KhDevice khDevice, HttpServletRequest req) {
|
||||
return list(QueryGenerator.initQueryWrapper(khDevice, req.getParameterMap()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param khDevice
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(KhDevice khDevice) {
|
||||
Date now = new Date();
|
||||
khDevice.setCreateTime(now);
|
||||
khDevice.setUpdateTime(now);
|
||||
save(khDevice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param khDevice
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(KhDevice khDevice) {
|
||||
Date now = new Date();
|
||||
khDevice.setUpdateTime(now);
|
||||
saveOrUpdate(khDevice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public KhDevice queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
}
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
package com.jero.modules.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.modules.entity.KhSystemSetting;
|
||||
import com.jero.modules.mapper.KhSystemSettingMapper;
|
||||
import com.jero.modules.service.IKhSystemSettingService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 系统设置
|
||||
* @Author: jero-boot
|
||||
* @Date: 2024-04-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = JeroBootException.class)
|
||||
public class KhSystemSettingServiceImpl extends ServiceImpl<KhSystemSettingMapper, KhSystemSetting> implements IKhSystemSettingService {
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param khSystemSetting
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public IPage<KhSystemSetting> queryPage(KhSystemSetting khSystemSetting, Integer pageNo, Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KhSystemSetting> queryWrapper = QueryGenerator.initQueryWrapper(khSystemSetting, req.getParameterMap());
|
||||
Page<KhSystemSetting> page = new Page<>(pageNo, pageSize);
|
||||
return page(page, queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param khSystemSetting
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<KhSystemSetting> queryList(KhSystemSetting khSystemSetting, HttpServletRequest req) {
|
||||
return list(QueryGenerator.initQueryWrapper(khSystemSetting, req.getParameterMap()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param khSystemSetting
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(KhSystemSetting khSystemSetting) {
|
||||
Date now = new Date();
|
||||
khSystemSetting.setCreateTime(now);
|
||||
khSystemSetting.setUpdateTime(now);
|
||||
save(khSystemSetting);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param khSystemSetting
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(KhSystemSetting khSystemSetting) {
|
||||
Date now = new Date();
|
||||
khSystemSetting.setUpdateTime(now);
|
||||
saveOrUpdate(khSystemSetting);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public KhSystemSetting queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
}
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
package com.jero.modules.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.modules.entity.KhWellhead;
|
||||
import com.jero.modules.mapper.KhWellheadMapper;
|
||||
import com.jero.modules.service.IKhWellheadService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 井口
|
||||
* @Author: jero-boot
|
||||
* @Date: 2024-04-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = JeroBootException.class)
|
||||
public class KhWellheadServiceImpl extends ServiceImpl<KhWellheadMapper, KhWellhead> implements IKhWellheadService {
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param khWellhead
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public IPage<KhWellhead> queryPage(KhWellhead khWellhead, Integer pageNo, Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KhWellhead> queryWrapper = QueryGenerator.initQueryWrapper(khWellhead, req.getParameterMap());
|
||||
Page<KhWellhead> page = new Page<>(pageNo, pageSize);
|
||||
return page(page, queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param khWellhead
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<KhWellhead> queryList(KhWellhead khWellhead, HttpServletRequest req) {
|
||||
return list(QueryGenerator.initQueryWrapper(khWellhead, req.getParameterMap()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param khWellhead
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(KhWellhead khWellhead) {
|
||||
Date now = new Date();
|
||||
khWellhead.setCreateTime(now);
|
||||
khWellhead.setUpdateTime(now);
|
||||
save(khWellhead);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param khWellhead
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(KhWellhead khWellhead) {
|
||||
Date now = new Date();
|
||||
khWellhead.setUpdateTime(now);
|
||||
saveOrUpdate(khWellhead);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public KhWellhead queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user