万能试验机

This commit is contained in:
guo 2023-11-23 10:48:54 +08:00
parent 6573514937
commit 5dab16a25e
24 changed files with 1524 additions and 0 deletions

View File

@ -0,0 +1,185 @@
package com.zhgd.xmgl.modules.universaltest.controller;
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 java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.system.query.QueryGenerator;
import com.zhgd.jeecg.common.util.oConvertUtils;
import org.apache.commons.collections.MapUtils;
import com.zhgd.xmgl.modules.universaltest.entity.UniversalTestDev;
import com.zhgd.xmgl.modules.universaltest.service.IUniversalTestDevService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
/**
* @Title: Controller
* @Description: 万能试验机-设备
* @author pds
* @date 2023-11-23
* @version V1.0
*/
@RestController
@RequestMapping("/xmgl/universalTestDev")
@Slf4j
@Api(tags = "万能试验机-设备相关Api")
public class UniversalTestDevController {
@Autowired
private IUniversalTestDevService universalTestDevService;
/**
* 分页列表查询
*
* @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<UniversalTestDev>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(universalTestDevService.queryPageList(paramMap));
}
/**
* 列表查询
*
* @return
*/
@ApiOperation(value = "列表查询万能试验机-设备信息", notes = "列表查询万能试验机-设备信息", httpMethod = "GET")
@GetMapping(value = "/list")
public Result<List<UniversalTestDev>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(universalTestDevService.queryList(paramMap));
}
/**
* 添加
*
* @param universalTestDev
* @return
*/
@ApiOperation(value = "添加万能试验机-设备信息", notes = "添加万能试验机-设备信息", httpMethod = "POST")
@PostMapping(value = "/add")
public Result<UniversalTestDev> add(@RequestBody UniversalTestDev universalTestDev) {
universalTestDev.setId(null);
universalTestDevService.save(universalTestDev);
return Result.ok();
}
/**
* 编辑
*
* @param universalTestDev
* @return
*/
@ApiOperation(value = "编辑万能试验机-设备信息", notes = "编辑万能试验机-设备信息", httpMethod = "POST")
@PostMapping(value = "/edit")
public Result<UniversalTestDev> edit(@RequestBody UniversalTestDev universalTestDev) {
universalTestDevService.updateById(universalTestDev);
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<UniversalTestDev> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
String id = MapUtils.getString(map, "id");
Result<UniversalTestDev> result = new Result<UniversalTestDev>();
UniversalTestDev universalTestDev = universalTestDevService.getById(id);
if (universalTestDev == null) {
result.error500("未找到对应实体");
} else {
boolean ok = universalTestDevService.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<UniversalTestDev> queryById(@RequestParam(name = "id", required = true) String id) {
Result<UniversalTestDev> result = new Result<UniversalTestDev>();
UniversalTestDev universalTestDev = universalTestDevService.getById(id);
if (universalTestDev == null) {
result.error500("未找到对应实体");
} else {
result.setResult(universalTestDev);
result.setSuccess(true);
}
return result;
}
/**
* 导出excel
*
* @param request
* @param response
*/
@ApiOperation(value = "导出excel万能试验机-设备信息", notes = "导出excel万能试验机-设备信息", httpMethod = "POST")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
// Step.1 组装查询条件
QueryWrapper<UniversalTestDev> queryWrapper = null;
try {
String paramsStr = request.getParameter("paramsStr");
if (oConvertUtils.isNotEmpty(paramsStr)) {
String deString = URLDecoder.decode(paramsStr, "UTF-8");
UniversalTestDev universalTestDev = JSON.parseObject(deString, UniversalTestDev.class);
queryWrapper = QueryGenerator.initQueryWrapper(universalTestDev, request.getParameterMap());
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
//Step.2 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
List<UniversalTestDev> pageList = universalTestDevService.list(queryWrapper);
//导出文件名称
mv.addObject(NormalExcelConstants.FILE_NAME, "万能试验机-设备列表");
mv.addObject(NormalExcelConstants.CLASS, UniversalTestDev.class);
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("万能试验机-设备列表数据", "导出人:Jeecg", "导出信息"));
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
return mv;
}
}

View File

@ -0,0 +1,185 @@
package com.zhgd.xmgl.modules.universaltest.controller;
import com.zhgd.xmgl.modules.universaltest.entity.UniversalTestManageBlockData;
import com.zhgd.xmgl.modules.universaltest.service.IUniversalTestManageBlockDataService;
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 java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.system.query.QueryGenerator;
import com.zhgd.jeecg.common.util.oConvertUtils;
import org.apache.commons.collections.MapUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
/**
* @Title: Controller
* @Description: 万能试验机管理-试块数值
* @author pds
* @date 2023-11-23
* @version V1.0
*/
@RestController
@RequestMapping("/xmgl/universalTestManageBlockData")
@Slf4j
@Api(tags = "万能试验机管理-试块数值相关Api")
public class UniversalTestManageBlockDataController {
@Autowired
private IUniversalTestManageBlockDataService universalTestManageBlockDataService;
/**
* 分页列表查询
*
* @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<UniversalTestManageBlockData>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(universalTestManageBlockDataService.queryPageList(paramMap));
}
/**
* 列表查询
*
* @return
*/
@ApiOperation(value = "列表查询万能试验机管理-试块数值信息", notes = "列表查询万能试验机管理-试块数值信息", httpMethod = "GET")
@GetMapping(value = "/list")
public Result<List<UniversalTestManageBlockData>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(universalTestManageBlockDataService.queryList(paramMap));
}
/**
* 添加
*
* @param universalTestManageBlockData
* @return
*/
@ApiOperation(value = "添加万能试验机管理-试块数值信息", notes = "添加万能试验机管理-试块数值信息", httpMethod = "POST")
@PostMapping(value = "/add")
public Result<UniversalTestManageBlockData> add(@RequestBody UniversalTestManageBlockData universalTestManageBlockData) {
universalTestManageBlockData.setId(null);
universalTestManageBlockDataService.save(universalTestManageBlockData);
return Result.ok();
}
/**
* 编辑
*
* @param universalTestManageBlockData
* @return
*/
@ApiOperation(value = "编辑万能试验机管理-试块数值信息", notes = "编辑万能试验机管理-试块数值信息", httpMethod = "POST")
@PostMapping(value = "/edit")
public Result<UniversalTestManageBlockData> edit(@RequestBody UniversalTestManageBlockData universalTestManageBlockData) {
universalTestManageBlockDataService.updateById(universalTestManageBlockData);
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<UniversalTestManageBlockData> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
String id = MapUtils.getString(map, "id");
Result<UniversalTestManageBlockData> result = new Result<UniversalTestManageBlockData>();
UniversalTestManageBlockData universalTestManageBlockData = universalTestManageBlockDataService.getById(id);
if (universalTestManageBlockData == null) {
result.error500("未找到对应实体");
} else {
boolean ok = universalTestManageBlockDataService.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<UniversalTestManageBlockData> queryById(@RequestParam(name = "id", required = true) String id) {
Result<UniversalTestManageBlockData> result = new Result<UniversalTestManageBlockData>();
UniversalTestManageBlockData universalTestManageBlockData = universalTestManageBlockDataService.getById(id);
if (universalTestManageBlockData == null) {
result.error500("未找到对应实体");
} else {
result.setResult(universalTestManageBlockData);
result.setSuccess(true);
}
return result;
}
/**
* 导出excel
*
* @param request
* @param response
*/
@ApiOperation(value = "导出excel万能试验机管理-试块数值信息", notes = "导出excel万能试验机管理-试块数值信息", httpMethod = "POST")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
// Step.1 组装查询条件
QueryWrapper<UniversalTestManageBlockData> queryWrapper = null;
try {
String paramsStr = request.getParameter("paramsStr");
if (oConvertUtils.isNotEmpty(paramsStr)) {
String deString = URLDecoder.decode(paramsStr, "UTF-8");
UniversalTestManageBlockData universalTestManageBlockData = JSON.parseObject(deString, UniversalTestManageBlockData.class);
queryWrapper = QueryGenerator.initQueryWrapper(universalTestManageBlockData, request.getParameterMap());
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
//Step.2 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
List<UniversalTestManageBlockData> pageList = universalTestManageBlockDataService.list(queryWrapper);
//导出文件名称
mv.addObject(NormalExcelConstants.FILE_NAME, "万能试验机管理-试块数值列表");
mv.addObject(NormalExcelConstants.CLASS, UniversalTestManageBlockData.class);
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("万能试验机管理-试块数值列表数据", "导出人:Jeecg", "导出信息"));
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
return mv;
}
}

View File

@ -0,0 +1,185 @@
package com.zhgd.xmgl.modules.universaltest.controller;
import com.zhgd.xmgl.modules.universaltest.service.IUniversalTestManageBlockNumberService;
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 java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.system.query.QueryGenerator;
import com.zhgd.jeecg.common.util.oConvertUtils;
import org.apache.commons.collections.MapUtils;
import com.zhgd.xmgl.modules.universaltest.entity.UniversalTestManageBlockNumber;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
/**
* @Title: Controller
* @Description: 万能试验机管理-试块编号
* @author pds
* @date 2023-11-23
* @version V1.0
*/
@RestController
@RequestMapping("/xmgl/universalTestManageBlockNumber")
@Slf4j
@Api(tags = "万能试验机管理-试块编号相关Api")
public class UniversalTestManageBlockNumberController {
@Autowired
private IUniversalTestManageBlockNumberService universalTestManageBlockNumberService;
/**
* 分页列表查询
*
* @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<UniversalTestManageBlockNumber>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(universalTestManageBlockNumberService.queryPageList(paramMap));
}
/**
* 列表查询
*
* @return
*/
@ApiOperation(value = "列表查询万能试验机管理-试块编号信息", notes = "列表查询万能试验机管理-试块编号信息", httpMethod = "GET")
@GetMapping(value = "/list")
public Result<List<UniversalTestManageBlockNumber>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(universalTestManageBlockNumberService.queryList(paramMap));
}
/**
* 添加
*
* @param universalTestManageBlockNumber
* @return
*/
@ApiOperation(value = "添加万能试验机管理-试块编号信息", notes = "添加万能试验机管理-试块编号信息", httpMethod = "POST")
@PostMapping(value = "/add")
public Result<UniversalTestManageBlockNumber> add(@RequestBody UniversalTestManageBlockNumber universalTestManageBlockNumber) {
universalTestManageBlockNumber.setId(null);
universalTestManageBlockNumberService.save(universalTestManageBlockNumber);
return Result.ok();
}
/**
* 编辑
*
* @param universalTestManageBlockNumber
* @return
*/
@ApiOperation(value = "编辑万能试验机管理-试块编号信息", notes = "编辑万能试验机管理-试块编号信息", httpMethod = "POST")
@PostMapping(value = "/edit")
public Result<UniversalTestManageBlockNumber> edit(@RequestBody UniversalTestManageBlockNumber universalTestManageBlockNumber) {
universalTestManageBlockNumberService.updateById(universalTestManageBlockNumber);
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<UniversalTestManageBlockNumber> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
String id = MapUtils.getString(map, "id");
Result<UniversalTestManageBlockNumber> result = new Result<UniversalTestManageBlockNumber>();
UniversalTestManageBlockNumber universalTestManageBlockNumber = universalTestManageBlockNumberService.getById(id);
if (universalTestManageBlockNumber == null) {
result.error500("未找到对应实体");
} else {
boolean ok = universalTestManageBlockNumberService.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<UniversalTestManageBlockNumber> queryById(@RequestParam(name = "id", required = true) String id) {
Result<UniversalTestManageBlockNumber> result = new Result<UniversalTestManageBlockNumber>();
UniversalTestManageBlockNumber universalTestManageBlockNumber = universalTestManageBlockNumberService.getById(id);
if (universalTestManageBlockNumber == null) {
result.error500("未找到对应实体");
} else {
result.setResult(universalTestManageBlockNumber);
result.setSuccess(true);
}
return result;
}
/**
* 导出excel
*
* @param request
* @param response
*/
@ApiOperation(value = "导出excel万能试验机管理-试块编号信息", notes = "导出excel万能试验机管理-试块编号信息", httpMethod = "POST")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
// Step.1 组装查询条件
QueryWrapper<UniversalTestManageBlockNumber> queryWrapper = null;
try {
String paramsStr = request.getParameter("paramsStr");
if (oConvertUtils.isNotEmpty(paramsStr)) {
String deString = URLDecoder.decode(paramsStr, "UTF-8");
UniversalTestManageBlockNumber universalTestManageBlockNumber = JSON.parseObject(deString, UniversalTestManageBlockNumber.class);
queryWrapper = QueryGenerator.initQueryWrapper(universalTestManageBlockNumber, request.getParameterMap());
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
//Step.2 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
List<UniversalTestManageBlockNumber> pageList = universalTestManageBlockNumberService.list(queryWrapper);
//导出文件名称
mv.addObject(NormalExcelConstants.FILE_NAME, "万能试验机管理-试块编号列表");
mv.addObject(NormalExcelConstants.CLASS, UniversalTestManageBlockNumber.class);
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("万能试验机管理-试块编号列表数据", "导出人:Jeecg", "导出信息"));
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
return mv;
}
}

View File

@ -0,0 +1,185 @@
package com.zhgd.xmgl.modules.universaltest.controller;
import com.zhgd.xmgl.modules.universaltest.service.IUniversalTestManageService;
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 java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.system.query.QueryGenerator;
import com.zhgd.jeecg.common.util.oConvertUtils;
import org.apache.commons.collections.MapUtils;
import com.zhgd.xmgl.modules.universaltest.entity.UniversalTestManage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
/**
* @Title: Controller
* @Description: 万能试验机管理
* @author pds
* @date 2023-11-23
* @version V1.0
*/
@RestController
@RequestMapping("/xmgl/universalTestManage")
@Slf4j
@Api(tags = "万能试验机管理相关Api")
public class UniversalTestManageController {
@Autowired
private IUniversalTestManageService universalTestManageService;
/**
* 分页列表查询
*
* @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<UniversalTestManage>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(universalTestManageService.queryPageList(paramMap));
}
/**
* 列表查询
*
* @return
*/
@ApiOperation(value = "列表查询万能试验机管理信息", notes = "列表查询万能试验机管理信息", httpMethod = "GET")
@GetMapping(value = "/list")
public Result<List<UniversalTestManage>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(universalTestManageService.queryList(paramMap));
}
/**
* 添加
*
* @param universalTestManage
* @return
*/
@ApiOperation(value = "添加万能试验机管理信息", notes = "添加万能试验机管理信息", httpMethod = "POST")
@PostMapping(value = "/add")
public Result<UniversalTestManage> add(@RequestBody UniversalTestManage universalTestManage) {
universalTestManage.setId(null);
universalTestManageService.save(universalTestManage);
return Result.ok();
}
/**
* 编辑
*
* @param universalTestManage
* @return
*/
@ApiOperation(value = "编辑万能试验机管理信息", notes = "编辑万能试验机管理信息", httpMethod = "POST")
@PostMapping(value = "/edit")
public Result<UniversalTestManage> edit(@RequestBody UniversalTestManage universalTestManage) {
universalTestManageService.updateById(universalTestManage);
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<UniversalTestManage> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
String id = MapUtils.getString(map, "id");
Result<UniversalTestManage> result = new Result<UniversalTestManage>();
UniversalTestManage universalTestManage = universalTestManageService.getById(id);
if (universalTestManage == null) {
result.error500("未找到对应实体");
} else {
boolean ok = universalTestManageService.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<UniversalTestManage> queryById(@RequestParam(name = "id", required = true) String id) {
Result<UniversalTestManage> result = new Result<UniversalTestManage>();
UniversalTestManage universalTestManage = universalTestManageService.getById(id);
if (universalTestManage == null) {
result.error500("未找到对应实体");
} else {
result.setResult(universalTestManage);
result.setSuccess(true);
}
return result;
}
/**
* 导出excel
*
* @param request
* @param response
*/
@ApiOperation(value = "导出excel万能试验机管理信息", notes = "导出excel万能试验机管理信息", httpMethod = "POST")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
// Step.1 组装查询条件
QueryWrapper<UniversalTestManage> queryWrapper = null;
try {
String paramsStr = request.getParameter("paramsStr");
if (oConvertUtils.isNotEmpty(paramsStr)) {
String deString = URLDecoder.decode(paramsStr, "UTF-8");
UniversalTestManage universalTestManage = JSON.parseObject(deString, UniversalTestManage.class);
queryWrapper = QueryGenerator.initQueryWrapper(universalTestManage, request.getParameterMap());
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
//Step.2 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
List<UniversalTestManage> pageList = universalTestManageService.list(queryWrapper);
//导出文件名称
mv.addObject(NormalExcelConstants.FILE_NAME, "万能试验机管理列表");
mv.addObject(NormalExcelConstants.CLASS, UniversalTestManage.class);
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("万能试验机管理列表数据", "导出人:Jeecg", "导出信息"));
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
return mv;
}
}

View File

@ -0,0 +1,106 @@
package com.zhgd.xmgl.modules.universaltest.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 2023-11-23
* @version V1.0
*/
@Data
@TableName("universal_test_dev")
@ApiModel(value = "UniversalTestDev实体类", description = "UniversalTestDev")
public class UniversalTestDev implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键id")
private java.lang.Long id;
/**
* 设备编码
*/
@Excel(name = "设备编码", width = 15)
@ApiModelProperty(value = "设备编码")
private java.lang.String devSn;
/**
* 设备名称
*/
@Excel(name = "设备名称", width = 15)
@ApiModelProperty(value = "设备名称")
private java.lang.String deviceName;
/**
* 设备型号
*/
@Excel(name = "设备型号", width = 15)
@ApiModelProperty(value = "设备型号")
private java.lang.String deviceModel;
/**
* 厂家名称
*/
@Excel(name = "厂家名称", width = 15)
@ApiModelProperty(value = "厂家名称")
private java.lang.String manufacturerName;
/**
* 进场时间
*/
@Excel(name = "进场时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "进场时间")
private java.util.Date entryTime;
/**
* 负责人
*/
@Excel(name = "负责人", width = 15)
@ApiModelProperty(value = "负责人")
private java.lang.String personInCharge;
/**
* 所属试验室
*/
@Excel(name = "所属试验室", width = 15)
@ApiModelProperty(value = "所属试验室")
private java.lang.String affiliatedLaboratory;
/**
* 设备图片
*/
@Excel(name = "设备图片", width = 15)
@ApiModelProperty(value = "设备图片")
private java.lang.Object equipmentPicture;
/**
* 项目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;
}

View File

@ -0,0 +1,132 @@
package com.zhgd.xmgl.modules.universaltest.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 2023-11-23
* @version V1.0
*/
@Data
@TableName("universal_test_manage")
@ApiModel(value = "UniversalTestManage实体类", description = "UniversalTestManage")
public class UniversalTestManage implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.Long id;
/**
* 设备编码
*/
@Excel(name = "设备编码", width = 15)
@ApiModelProperty(value = "设备编码")
private java.lang.String devSn;
/**
* 试验编号
*/
@Excel(name = "试验编号", width = 15)
@ApiModelProperty(value = "试验编号")
private java.lang.String testNumber;
/**
* 试验类型
*/
@Excel(name = "试验类型", width = 15)
@ApiModelProperty(value = "试验类型")
private java.lang.Integer testType;
/**
* 试件数量
*/
@Excel(name = "试件数量", width = 15)
@ApiModelProperty(value = "试件数量")
private java.lang.String specimenNum;
/**
* 试验时间试验开始时间
*/
@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 testTime;
/**
* 状态1合格2不合格3未判定
*/
@Excel(name = "状态1合格2不合格3未判定", width = 15)
@ApiModelProperty(value = "状态1合格2不合格3未判定")
private java.lang.Integer status;
/**
* 制件时间
*/
@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 productionTime;
/**
* 操作员
*/
@Excel(name = "操作员", width = 15)
@ApiModelProperty(value = "操作员")
private java.lang.String operator;
/**
* 钢筋牌号
*/
@Excel(name = "钢筋牌号", width = 15)
@ApiModelProperty(value = "钢筋牌号")
private java.lang.String steelBarGrade;
/**
* 公称直径(mm)
*/
@Excel(name = "公称直径(mm)", width = 15)
@ApiModelProperty(value = "公称直径(mm)")
private java.lang.Double nominalDiameter;
/**
* 强度代表值(Mpa)
*/
@Excel(name = "强度代表值(Mpa)", width = 15)
@ApiModelProperty(value = "强度代表值(Mpa)")
private java.lang.Double intensityRepresentativeValue;
/**
* 公称截面面积(mm2)
*/
@Excel(name = "公称截面面积(mm2)", width = 15)
@ApiModelProperty(value = "公称截面面积(mm2)")
private java.lang.String nominalCrossSectionalArea;
/**
* 创建时间 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;
/**
* 项目sn
*/
@Excel(name = "项目sn", width = 15)
@ApiModelProperty(value = "项目sn")
private java.lang.String projectSn;
}

View File

@ -0,0 +1,74 @@
package com.zhgd.xmgl.modules.universaltest.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 2023-11-23
* @version V1.0
*/
@Data
@TableName("universal_test_manage_block_data")
@ApiModel(value = "UniversalTestManageBlockData实体类", description = "UniversalTestManageBlockData")
public class UniversalTestManageBlockData implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.Long id;
/**
* 万能试验机管理-试块编号id
*/
@Excel(name = "万能试验机管理-试块编号id", width = 15)
@ApiModelProperty(value = "万能试验机管理-试块编号id")
private java.lang.Long universalTestManageBlockNumberId;
/**
* code
*/
@Excel(name = "code", width = 15)
@ApiModelProperty(value = "code")
private java.lang.Double code;
/**
* value
*/
@Excel(name = "value", width = 15)
@ApiModelProperty(value = "value")
private java.lang.Double value;
/**
* 创建时间 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;
/**
* 项目sn
*/
@Excel(name = "项目sn", width = 15)
@ApiModelProperty(value = "项目sn")
private java.lang.String projectSn;
}

View File

@ -0,0 +1,104 @@
package com.zhgd.xmgl.modules.universaltest.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 2023-11-23
* @version V1.0
*/
@Data
@TableName("universal_test_manage_block_number")
@ApiModel(value = "UniversalTestManageBlockNumber实体类", description = "UniversalTestManageBlockNumber")
public class UniversalTestManageBlockNumber implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.Long id;
/**
* 设备编码
*/
@Excel(name = "设备编码", width = 15)
@ApiModelProperty(value = "设备编码")
private java.lang.String devSn;
/**
* 万能试验机管理id
*/
@Excel(name = "万能试验机管理id", width = 15)
@ApiModelProperty(value = "万能试验机管理id")
private java.lang.Long universalTestManageId;
/**
* 试验编号
*/
@Excel(name = "试验编号", width = 15)
@ApiModelProperty(value = "试验编号")
private java.lang.String testNumber;
/**
* 拉断最大力值(KN)
*/
@Excel(name = "拉断最大力值(KN)", width = 15)
@ApiModelProperty(value = "拉断最大力值(KN)")
private java.lang.Double maximumBreakingForce;
/**
* 屈服点(KN)
*/
@Excel(name = "屈服点(KN)", width = 15)
@ApiModelProperty(value = "屈服点(KN)")
private java.lang.Double yieldPoint;
/**
* 屈服点强度(Mpa)
*/
@Excel(name = "屈服点强度(Mpa)", width = 15)
@ApiModelProperty(value = "屈服点强度(Mpa)")
private java.lang.Double yieldPointStrength;
/**
* 坑拉强度(Mpa)
*/
@Excel(name = "坑拉强度(Mpa)", width = 15)
@ApiModelProperty(value = "坑拉强度(Mpa)")
private java.lang.Double pitTensileStrength;
/**
* 伸长率(%)
*/
@Excel(name = "伸长率(%)", width = 15)
@ApiModelProperty(value = "伸长率(%)")
private java.lang.Double elongation;
/**
* 创建时间 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;
/**
* 项目sn
*/
@Excel(name = "项目sn", width = 15)
@ApiModelProperty(value = "项目sn")
private java.lang.String projectSn;
}

View File

@ -0,0 +1,16 @@
package com.zhgd.xmgl.modules.universaltest.mapper;
import com.zhgd.xmgl.modules.universaltest.entity.UniversalTestDev;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 万能试验机-设备
* @author pds
* @date 2023-11-23
* @version V1.0
*/
@Mapper
public interface UniversalTestDevMapper extends BaseMapper<UniversalTestDev> {
}

View File

@ -0,0 +1,16 @@
package com.zhgd.xmgl.modules.universaltest.mapper;
import com.zhgd.xmgl.modules.universaltest.entity.UniversalTestManageBlockData;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 万能试验机管理-试块数值
* @author pds
* @date 2023-11-23
* @version V1.0
*/
@Mapper
public interface UniversalTestManageBlockDataMapper extends BaseMapper<UniversalTestManageBlockData> {
}

View File

@ -0,0 +1,16 @@
package com.zhgd.xmgl.modules.universaltest.mapper;
import org.apache.ibatis.annotations.Mapper;
import com.zhgd.xmgl.modules.universaltest.entity.UniversalTestManageBlockNumber;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 万能试验机管理-试块编号
* @author pds
* @date 2023-11-23
* @version V1.0
*/
@Mapper
public interface UniversalTestManageBlockNumberMapper extends BaseMapper<UniversalTestManageBlockNumber> {
}

View File

@ -0,0 +1,16 @@
package com.zhgd.xmgl.modules.universaltest.mapper;
import com.zhgd.xmgl.modules.universaltest.entity.UniversalTestManage;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 万能试验机管理
* @author pds
* @date 2023-11-23
* @version V1.0
*/
@Mapper
public interface UniversalTestManageMapper extends BaseMapper<UniversalTestManage> {
}

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.universaltest.mapper.UniversalTestDevMapper">
</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.universaltest.mapper.UniversalTestManageBlockDataMapper">
</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.universaltest.mapper.UniversalTestManageBlockNumberMapper">
</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.universaltest.mapper.UniversalTestManageMapper">
</mapper>

View File

@ -0,0 +1,21 @@
package com.zhgd.xmgl.modules.universaltest.service;
import com.zhgd.xmgl.modules.universaltest.entity.UniversalTestDev;
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 2023-11-23
* @version V1.0
*/
public interface IUniversalTestDevService extends IService<UniversalTestDev> {
IPage<UniversalTestDev> queryPageList(HashMap<String, Object> paramMap);
List<UniversalTestDev> queryList(HashMap<String, Object> paramMap);
}

View File

@ -0,0 +1,21 @@
package com.zhgd.xmgl.modules.universaltest.service;
import com.zhgd.xmgl.modules.universaltest.entity.UniversalTestManageBlockData;
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 2023-11-23
* @version V1.0
*/
public interface IUniversalTestManageBlockDataService extends IService<UniversalTestManageBlockData> {
IPage<UniversalTestManageBlockData> queryPageList(HashMap<String, Object> paramMap);
List<UniversalTestManageBlockData> queryList(HashMap<String, Object> paramMap);
}

View File

@ -0,0 +1,21 @@
package com.zhgd.xmgl.modules.universaltest.service;
import com.zhgd.xmgl.modules.universaltest.entity.UniversalTestManageBlockNumber;
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 2023-11-23
* @version V1.0
*/
public interface IUniversalTestManageBlockNumberService extends IService<UniversalTestManageBlockNumber> {
IPage<UniversalTestManageBlockNumber> queryPageList(HashMap<String, Object> paramMap);
List<UniversalTestManageBlockNumber> queryList(HashMap<String, Object> paramMap);
}

View File

@ -0,0 +1,21 @@
package com.zhgd.xmgl.modules.universaltest.service;
import com.zhgd.xmgl.modules.universaltest.entity.UniversalTestManage;
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 2023-11-23
* @version V1.0
*/
public interface IUniversalTestManageService extends IService<UniversalTestManage> {
IPage<UniversalTestManage> queryPageList(HashMap<String, Object> paramMap);
List<UniversalTestManage> queryList(HashMap<String, Object> paramMap);
}

View File

@ -0,0 +1,51 @@
package com.zhgd.xmgl.modules.universaltest.service.impl;
import com.zhgd.xmgl.modules.universaltest.entity.UniversalTestDev;
import com.zhgd.xmgl.modules.universaltest.mapper.UniversalTestDevMapper;
import com.zhgd.xmgl.modules.universaltest.service.IUniversalTestDevService;
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;
/**
* @Description: 万能试验机-设备
* @author pds
* @date 2023-11-23
* @version V1.0
*/
@Service
public class UniversalTestDevServiceImpl extends ServiceImpl<UniversalTestDevMapper, UniversalTestDev> implements IUniversalTestDevService {
@Override
public IPage<UniversalTestDev> queryPageList(HashMap<String, Object> paramMap) {
QueryWrapper<UniversalTestDev> queryWrapper = getQueryWrapper(paramMap);
Page<UniversalTestDev> page = PageUtil.getPage(paramMap);
IPage<UniversalTestDev> pageList = this.page(page, queryWrapper);
pageList.setRecords(dealList(pageList.getRecords()));
return pageList;
}
@Override
public List<UniversalTestDev> queryList(HashMap<String, Object> paramMap) {
QueryWrapper<UniversalTestDev> queryWrapper = getQueryWrapper(paramMap);
return dealList(this.list(queryWrapper));
}
private QueryWrapper<UniversalTestDev> getQueryWrapper(HashMap<String, Object> paramMap) {
QueryWrapper<UniversalTestDev> queryWrapper = QueryGenerator.initPageQueryWrapper(UniversalTestDev.class, paramMap);
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(UniversalTestDev::getId));
return queryWrapper;
}
private List<UniversalTestDev> dealList(List<UniversalTestDev> list) {
return list;
}
}

View File

@ -0,0 +1,51 @@
package com.zhgd.xmgl.modules.universaltest.service.impl;
import com.zhgd.xmgl.modules.universaltest.entity.UniversalTestManageBlockData;
import com.zhgd.xmgl.modules.universaltest.mapper.UniversalTestManageBlockDataMapper;
import com.zhgd.xmgl.modules.universaltest.service.IUniversalTestManageBlockDataService;
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;
/**
* @Description: 万能试验机管理-试块数值
* @author pds
* @date 2023-11-23
* @version V1.0
*/
@Service
public class UniversalTestManageBlockDataServiceImpl extends ServiceImpl<UniversalTestManageBlockDataMapper, UniversalTestManageBlockData> implements IUniversalTestManageBlockDataService {
@Override
public IPage<UniversalTestManageBlockData> queryPageList(HashMap<String, Object> paramMap) {
QueryWrapper<UniversalTestManageBlockData> queryWrapper = getQueryWrapper(paramMap);
Page<UniversalTestManageBlockData> page = PageUtil.getPage(paramMap);
IPage<UniversalTestManageBlockData> pageList = this.page(page, queryWrapper);
pageList.setRecords(dealList(pageList.getRecords()));
return pageList;
}
@Override
public List<UniversalTestManageBlockData> queryList(HashMap<String, Object> paramMap) {
QueryWrapper<UniversalTestManageBlockData> queryWrapper = getQueryWrapper(paramMap);
return dealList(this.list(queryWrapper));
}
private QueryWrapper<UniversalTestManageBlockData> getQueryWrapper(HashMap<String, Object> paramMap) {
QueryWrapper<UniversalTestManageBlockData> queryWrapper = QueryGenerator.initPageQueryWrapper(UniversalTestManageBlockData.class, paramMap);
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(UniversalTestManageBlockData::getId));
return queryWrapper;
}
private List<UniversalTestManageBlockData> dealList(List<UniversalTestManageBlockData> list) {
return list;
}
}

View File

@ -0,0 +1,51 @@
package com.zhgd.xmgl.modules.universaltest.service.impl;
import com.zhgd.xmgl.modules.universaltest.entity.UniversalTestManageBlockNumber;
import com.zhgd.xmgl.modules.universaltest.mapper.UniversalTestManageBlockNumberMapper;
import com.zhgd.xmgl.modules.universaltest.service.IUniversalTestManageBlockNumberService;
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;
/**
* @Description: 万能试验机管理-试块编号
* @author pds
* @date 2023-11-23
* @version V1.0
*/
@Service
public class UniversalTestManageBlockNumberServiceImpl extends ServiceImpl<UniversalTestManageBlockNumberMapper, UniversalTestManageBlockNumber> implements IUniversalTestManageBlockNumberService {
@Override
public IPage<UniversalTestManageBlockNumber> queryPageList(HashMap<String, Object> paramMap) {
QueryWrapper<UniversalTestManageBlockNumber> queryWrapper = getQueryWrapper(paramMap);
Page<UniversalTestManageBlockNumber> page = PageUtil.getPage(paramMap);
IPage<UniversalTestManageBlockNumber> pageList = this.page(page, queryWrapper);
pageList.setRecords(dealList(pageList.getRecords()));
return pageList;
}
@Override
public List<UniversalTestManageBlockNumber> queryList(HashMap<String, Object> paramMap) {
QueryWrapper<UniversalTestManageBlockNumber> queryWrapper = getQueryWrapper(paramMap);
return dealList(this.list(queryWrapper));
}
private QueryWrapper<UniversalTestManageBlockNumber> getQueryWrapper(HashMap<String, Object> paramMap) {
QueryWrapper<UniversalTestManageBlockNumber> queryWrapper = QueryGenerator.initPageQueryWrapper(UniversalTestManageBlockNumber.class, paramMap);
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(UniversalTestManageBlockNumber::getId));
return queryWrapper;
}
private List<UniversalTestManageBlockNumber> dealList(List<UniversalTestManageBlockNumber> list) {
return list;
}
}

View File

@ -0,0 +1,51 @@
package com.zhgd.xmgl.modules.universaltest.service.impl;
import com.zhgd.xmgl.modules.universaltest.entity.UniversalTestManage;
import com.zhgd.xmgl.modules.universaltest.mapper.UniversalTestManageMapper;
import com.zhgd.xmgl.modules.universaltest.service.IUniversalTestManageService;
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;
/**
* @Description: 万能试验机管理
* @author pds
* @date 2023-11-23
* @version V1.0
*/
@Service
public class UniversalTestManageServiceImpl extends ServiceImpl<UniversalTestManageMapper, UniversalTestManage> implements IUniversalTestManageService {
@Override
public IPage<UniversalTestManage> queryPageList(HashMap<String, Object> paramMap) {
QueryWrapper<UniversalTestManage> queryWrapper = getQueryWrapper(paramMap);
Page<UniversalTestManage> page = PageUtil.getPage(paramMap);
IPage<UniversalTestManage> pageList = this.page(page, queryWrapper);
pageList.setRecords(dealList(pageList.getRecords()));
return pageList;
}
@Override
public List<UniversalTestManage> queryList(HashMap<String, Object> paramMap) {
QueryWrapper<UniversalTestManage> queryWrapper = getQueryWrapper(paramMap);
return dealList(this.list(queryWrapper));
}
private QueryWrapper<UniversalTestManage> getQueryWrapper(HashMap<String, Object> paramMap) {
QueryWrapper<UniversalTestManage> queryWrapper = QueryGenerator.initPageQueryWrapper(UniversalTestManage.class, paramMap);
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(UniversalTestManage::getId));
return queryWrapper;
}
private List<UniversalTestManage> dealList(List<UniversalTestManage> list) {
return list;
}
}