试验检测补充
This commit is contained in:
parent
d59e87191d
commit
9592f96292
@ -150,3 +150,59 @@ public class WisdomSiteApplication extends SpringBootServletInitializer {
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
CREATE TABLE `PressureTestMachineManage` (
|
||||
`id` bigint(20) NOT NULL COMMENT 'id',
|
||||
`dev_sn` varchar(255) DEFAULT NULL COMMENT '设备编码',
|
||||
`test_number` varchar(255) DEFAULT NULL COMMENT '试验编号',
|
||||
`test_type` int(11) DEFAULT NULL COMMENT '试验类型',
|
||||
`specimen_num` varchar(255) DEFAULT NULL COMMENT '试件数量',
|
||||
`age` varchar(255) DEFAULT NULL COMMENT '龄期(天)',
|
||||
`design_strength` varchar(50) DEFAULT NULL COMMENT '设计强度',
|
||||
`intensity_representative_value` double DEFAULT NULL COMMENT '强度代表值(Mpa)',
|
||||
`test_time` datetime DEFAULT NULL COMMENT '试验时间(试验开始时间)',
|
||||
`production_time` datetime DEFAULT NULL COMMENT '制件时间',
|
||||
`status` int(11) DEFAULT NULL COMMENT '状态:1合格2不合格3未判定',
|
||||
`operator` varchar(50) DEFAULT NULL COMMENT '操作员',
|
||||
`equipment_strength` varchar(50) DEFAULT NULL COMMENT '设备强度',
|
||||
`upload_attachment` varchar(2555) DEFAULT NULL COMMENT '上传附件',
|
||||
`specimen_size` varchar(50) DEFAULT NULL COMMENT '试件尺寸',
|
||||
`specimen_age` double DEFAULT NULL COMMENT '试件龄期',
|
||||
`specimen_area` double DEFAULT NULL COMMENT '试件面积',
|
||||
`nominal_diameter` double DEFAULT NULL COMMENT '公称直径(mm)',
|
||||
`create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间 yyyy-MM-dd HH:mm:ss',
|
||||
`update_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间 yyyy-MM-dd HH:mm:ss',
|
||||
`project_sn` varchar(50) DEFAULT NULL COMMENT '项目sn',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `idx_dev_id` (`dev_sn`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='试验检测管理';
|
||||
|
||||
|
||||
CREATE TABLE `pressure_test_machine_manage_block_number` (
|
||||
`id` bigint(20) NOT NULL COMMENT 'id',
|
||||
`dev_sn` varchar(255) DEFAULT NULL COMMENT '设备编码',
|
||||
`pressure_test_machine_manage_id` bigint(20) NOT NULL COMMENT '试验检测管理id',
|
||||
`test_number` varchar(255) DEFAULT NULL COMMENT '试验编号',
|
||||
`maximum_breaking_force` double DEFAULT NULL COMMENT '拉断最大力值(KN)',
|
||||
`yield_point` double DEFAULT NULL COMMENT '屈服点(KN)',
|
||||
`yield_point_strength` double DEFAULT NULL COMMENT '屈服点强度(Mpa)',
|
||||
`pit_tensile_strength` double DEFAULT NULL COMMENT '坑拉强度(Mpa)',
|
||||
`elongation` double DEFAULT NULL COMMENT '伸长率(%)',
|
||||
`create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间 yyyy-MM-dd HH:mm:ss',
|
||||
`update_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间 yyyy-MM-dd HH:mm:ss',
|
||||
`project_sn` varchar(50) DEFAULT NULL COMMENT '项目sn',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `idx_dev_id` (`dev_sn`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='试验检测管理-试块编号';
|
||||
|
||||
CREATE TABLE `pressure_test_machine_manage_block_data` (
|
||||
`id` bigint(20) NOT NULL COMMENT 'id',
|
||||
`pressure_test_machine_manage_block_number_id` bigint(20) NOT NULL COMMENT '试验检测管理-试块编号id',
|
||||
`code` double DEFAULT NULL COMMENT 'code',
|
||||
`value` double DEFAULT NULL COMMENT 'value',
|
||||
`create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间 yyyy-MM-dd HH:mm:ss',
|
||||
`update_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间 yyyy-MM-dd HH:mm:ss',
|
||||
`project_sn` varchar(50) DEFAULT NULL COMMENT '项目sn',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='试验检测管理-试块数值';
|
||||
*/
|
||||
|
||||
@ -1,184 +0,0 @@
|
||||
package com.zhgd.xmgl.modules.pressuretest.controller;
|
||||
|
||||
import com.zhgd.xmgl.modules.pressuretest.entity.PressureTest;
|
||||
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.pressuretest.service.IPressureTestService;
|
||||
|
||||
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-09
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/xmgl/pressureTest")
|
||||
@Slf4j
|
||||
@Api(tags = "试验检测相关Api")
|
||||
public class PressureTestController {
|
||||
@Autowired
|
||||
private IPressureTestService pressureTestService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @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<PressureTest>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(pressureTestService.queryPageList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "列表查询试验检测信息", notes = "列表查询试验检测信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<PressureTest>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(pressureTestService.queryList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param pressureTest
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "添加试验检测信息", notes = "添加试验检测信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<PressureTest> add(@RequestBody PressureTest pressureTest) {
|
||||
pressureTestService.save(pressureTest);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param pressureTest
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑试验检测信息", notes = "编辑试验检测信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<PressureTest> edit(@RequestBody PressureTest pressureTest) {
|
||||
pressureTestService.updateById(pressureTest);
|
||||
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<PressureTest> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
String id = MapUtils.getString(map, "id");
|
||||
Result<PressureTest> result = new Result<PressureTest>();
|
||||
PressureTest pressureTest = pressureTestService.getById(id);
|
||||
if (pressureTest == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = pressureTestService.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<PressureTest> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<PressureTest> result = new Result<PressureTest>();
|
||||
PressureTest pressureTest = pressureTestService.getById(id);
|
||||
if (pressureTest == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(pressureTest);
|
||||
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<PressureTest> queryWrapper = null;
|
||||
try {
|
||||
String paramsStr = request.getParameter("paramsStr");
|
||||
if (oConvertUtils.isNotEmpty(paramsStr)) {
|
||||
String deString = URLDecoder.decode(paramsStr, "UTF-8");
|
||||
PressureTest pressureTest = JSON.parseObject(deString, PressureTest.class);
|
||||
queryWrapper = QueryGenerator.initQueryWrapper(pressureTest, request.getParameterMap());
|
||||
}
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
//Step.2 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
List<PressureTest> pageList = pressureTestService.list(queryWrapper);
|
||||
//导出文件名称
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "试验检测列表");
|
||||
mv.addObject(NormalExcelConstants.CLASS, PressureTest.class);
|
||||
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("试验检测列表数据", "导出人:Jeecg", "导出信息"));
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,185 @@
|
||||
package com.zhgd.xmgl.modules.pressuretest.controller;
|
||||
|
||||
import com.zhgd.xmgl.modules.pressuretest.entity.PressureTestMachineManageBlockData;
|
||||
import com.zhgd.xmgl.modules.pressuretest.service.IPressureTestMachineManageBlockDataService;
|
||||
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/pressureTestMachineManageBlockData")
|
||||
@Slf4j
|
||||
@Api(tags = "试验检测管理-试块数值相关Api")
|
||||
public class PressureTestMachineManageBlockDataController {
|
||||
@Autowired
|
||||
private IPressureTestMachineManageBlockDataService pressureTestMachineManageBlockDataService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @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<PressureTestMachineManageBlockData>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(pressureTestMachineManageBlockDataService.queryPageList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "列表查询试验检测管理-试块数值信息", notes = "列表查询试验检测管理-试块数值信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<PressureTestMachineManageBlockData>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(pressureTestMachineManageBlockDataService.queryList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param pressureTestMachineManageBlockData
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "添加试验检测管理-试块数值信息", notes = "添加试验检测管理-试块数值信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<PressureTestMachineManageBlockData> add(@RequestBody PressureTestMachineManageBlockData pressureTestMachineManageBlockData) {
|
||||
pressureTestMachineManageBlockData.setId(null);
|
||||
pressureTestMachineManageBlockDataService.save(pressureTestMachineManageBlockData);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param pressureTestMachineManageBlockData
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑试验检测管理-试块数值信息", notes = "编辑试验检测管理-试块数值信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<PressureTestMachineManageBlockData> edit(@RequestBody PressureTestMachineManageBlockData pressureTestMachineManageBlockData) {
|
||||
pressureTestMachineManageBlockDataService.updateById(pressureTestMachineManageBlockData);
|
||||
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<PressureTestMachineManageBlockData> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
String id = MapUtils.getString(map, "id");
|
||||
Result<PressureTestMachineManageBlockData> result = new Result<PressureTestMachineManageBlockData>();
|
||||
PressureTestMachineManageBlockData pressureTestMachineManageBlockData = pressureTestMachineManageBlockDataService.getById(id);
|
||||
if (pressureTestMachineManageBlockData == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = pressureTestMachineManageBlockDataService.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<PressureTestMachineManageBlockData> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<PressureTestMachineManageBlockData> result = new Result<PressureTestMachineManageBlockData>();
|
||||
PressureTestMachineManageBlockData pressureTestMachineManageBlockData = pressureTestMachineManageBlockDataService.getById(id);
|
||||
if (pressureTestMachineManageBlockData == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(pressureTestMachineManageBlockData);
|
||||
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<PressureTestMachineManageBlockData> queryWrapper = null;
|
||||
try {
|
||||
String paramsStr = request.getParameter("paramsStr");
|
||||
if (oConvertUtils.isNotEmpty(paramsStr)) {
|
||||
String deString = URLDecoder.decode(paramsStr, "UTF-8");
|
||||
PressureTestMachineManageBlockData pressureTestMachineManageBlockData = JSON.parseObject(deString, PressureTestMachineManageBlockData.class);
|
||||
queryWrapper = QueryGenerator.initQueryWrapper(pressureTestMachineManageBlockData, request.getParameterMap());
|
||||
}
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
//Step.2 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
List<PressureTestMachineManageBlockData> pageList = pressureTestMachineManageBlockDataService.list(queryWrapper);
|
||||
//导出文件名称
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "试验检测管理-试块数值列表");
|
||||
mv.addObject(NormalExcelConstants.CLASS, PressureTestMachineManageBlockData.class);
|
||||
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("试验检测管理-试块数值列表数据", "导出人:Jeecg", "导出信息"));
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,185 @@
|
||||
package com.zhgd.xmgl.modules.pressuretest.controller;
|
||||
|
||||
import com.zhgd.xmgl.modules.pressuretest.entity.PressureTestMachineManageBlockNumber;
|
||||
import com.zhgd.xmgl.modules.pressuretest.service.IPressureTestMachineManageBlockNumberService;
|
||||
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/pressureTestMachineManageBlockNumber")
|
||||
@Slf4j
|
||||
@Api(tags = "试验检测管理-试块编号相关Api")
|
||||
public class PressureTestMachineManageBlockNumberController {
|
||||
@Autowired
|
||||
private IPressureTestMachineManageBlockNumberService pressureTestMachineManageBlockNumberService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @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<PressureTestMachineManageBlockNumber>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(pressureTestMachineManageBlockNumberService.queryPageList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "列表查询试验检测管理-试块编号信息", notes = "列表查询试验检测管理-试块编号信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<PressureTestMachineManageBlockNumber>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(pressureTestMachineManageBlockNumberService.queryList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param pressureTestMachineManageBlockNumber
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "添加试验检测管理-试块编号信息", notes = "添加试验检测管理-试块编号信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<PressureTestMachineManageBlockNumber> add(@RequestBody PressureTestMachineManageBlockNumber pressureTestMachineManageBlockNumber) {
|
||||
pressureTestMachineManageBlockNumber.setId(null);
|
||||
pressureTestMachineManageBlockNumberService.save(pressureTestMachineManageBlockNumber);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param pressureTestMachineManageBlockNumber
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑试验检测管理-试块编号信息", notes = "编辑试验检测管理-试块编号信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<PressureTestMachineManageBlockNumber> edit(@RequestBody PressureTestMachineManageBlockNumber pressureTestMachineManageBlockNumber) {
|
||||
pressureTestMachineManageBlockNumberService.updateById(pressureTestMachineManageBlockNumber);
|
||||
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<PressureTestMachineManageBlockNumber> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
String id = MapUtils.getString(map, "id");
|
||||
Result<PressureTestMachineManageBlockNumber> result = new Result<PressureTestMachineManageBlockNumber>();
|
||||
PressureTestMachineManageBlockNumber pressureTestMachineManageBlockNumber = pressureTestMachineManageBlockNumberService.getById(id);
|
||||
if (pressureTestMachineManageBlockNumber == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = pressureTestMachineManageBlockNumberService.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<PressureTestMachineManageBlockNumber> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<PressureTestMachineManageBlockNumber> result = new Result<PressureTestMachineManageBlockNumber>();
|
||||
PressureTestMachineManageBlockNumber pressureTestMachineManageBlockNumber = pressureTestMachineManageBlockNumberService.getById(id);
|
||||
if (pressureTestMachineManageBlockNumber == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(pressureTestMachineManageBlockNumber);
|
||||
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<PressureTestMachineManageBlockNumber> queryWrapper = null;
|
||||
try {
|
||||
String paramsStr = request.getParameter("paramsStr");
|
||||
if (oConvertUtils.isNotEmpty(paramsStr)) {
|
||||
String deString = URLDecoder.decode(paramsStr, "UTF-8");
|
||||
PressureTestMachineManageBlockNumber pressureTestMachineManageBlockNumber = JSON.parseObject(deString, PressureTestMachineManageBlockNumber.class);
|
||||
queryWrapper = QueryGenerator.initQueryWrapper(pressureTestMachineManageBlockNumber, request.getParameterMap());
|
||||
}
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
//Step.2 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
List<PressureTestMachineManageBlockNumber> pageList = pressureTestMachineManageBlockNumberService.list(queryWrapper);
|
||||
//导出文件名称
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "试验检测管理-试块编号列表");
|
||||
mv.addObject(NormalExcelConstants.CLASS, PressureTestMachineManageBlockNumber.class);
|
||||
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("试验检测管理-试块编号列表数据", "导出人:Jeecg", "导出信息"));
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,185 @@
|
||||
package com.zhgd.xmgl.modules.pressuretest.controller;
|
||||
|
||||
import com.zhgd.xmgl.modules.pressuretest.service.IPressureTestMachineManageService;
|
||||
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.pressuretest.entity.PressureTestMachineManage;
|
||||
|
||||
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/pressureTestMachineManage")
|
||||
@Slf4j
|
||||
@Api(tags = "试验检测管理相关Api")
|
||||
public class PressureTestMachineManageController {
|
||||
@Autowired
|
||||
private IPressureTestMachineManageService pressureTestMachineManageService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @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<PressureTestMachineManage>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(pressureTestMachineManageService.queryPageList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "列表查询试验检测管理信息", notes = "列表查询试验检测管理信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<PressureTestMachineManage>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(pressureTestMachineManageService.queryList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param pressureTestMachineManage
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "添加试验检测管理信息", notes = "添加试验检测管理信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<PressureTestMachineManage> add(@RequestBody PressureTestMachineManage pressureTestMachineManage) {
|
||||
pressureTestMachineManage.setId(null);
|
||||
pressureTestMachineManageService.save(pressureTestMachineManage);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param pressureTestMachineManage
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑试验检测管理信息", notes = "编辑试验检测管理信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<PressureTestMachineManage> edit(@RequestBody PressureTestMachineManage pressureTestMachineManage) {
|
||||
pressureTestMachineManageService.updateById(pressureTestMachineManage);
|
||||
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<PressureTestMachineManage> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
String id = MapUtils.getString(map, "id");
|
||||
Result<PressureTestMachineManage> result = new Result<PressureTestMachineManage>();
|
||||
PressureTestMachineManage pressureTestMachineManage = pressureTestMachineManageService.getById(id);
|
||||
if (pressureTestMachineManage == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = pressureTestMachineManageService.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<PressureTestMachineManage> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<PressureTestMachineManage> result = new Result<PressureTestMachineManage>();
|
||||
PressureTestMachineManage pressureTestMachineManage = pressureTestMachineManageService.getById(id);
|
||||
if (pressureTestMachineManage == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(pressureTestMachineManage);
|
||||
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<PressureTestMachineManage> queryWrapper = null;
|
||||
try {
|
||||
String paramsStr = request.getParameter("paramsStr");
|
||||
if (oConvertUtils.isNotEmpty(paramsStr)) {
|
||||
String deString = URLDecoder.decode(paramsStr, "UTF-8");
|
||||
PressureTestMachineManage pressureTestMachineManage = JSON.parseObject(deString, PressureTestMachineManage.class);
|
||||
queryWrapper = QueryGenerator.initQueryWrapper(pressureTestMachineManage, request.getParameterMap());
|
||||
}
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
//Step.2 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
List<PressureTestMachineManage> pageList = pressureTestMachineManageService.list(queryWrapper);
|
||||
//导出文件名称
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "试验检测管理列表");
|
||||
mv.addObject(NormalExcelConstants.CLASS, PressureTestMachineManage.class);
|
||||
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("试验检测管理列表数据", "导出人:Jeecg", "导出信息"));
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
}
|
||||
@ -74,7 +74,7 @@ public class PressureTestMachineDev implements Serializable {
|
||||
*/
|
||||
@Excel(name = "负责人id", width = 15)
|
||||
@ApiModelProperty(value = "负责人id")
|
||||
private java.lang.Integer dutyuserid;
|
||||
private java.lang.Long dutyuserid;
|
||||
/**
|
||||
* 所属试验室
|
||||
*/
|
||||
|
||||
@ -14,15 +14,15 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @Description: 试验检测
|
||||
* @Description: 试验检测管理
|
||||
* @author: pds
|
||||
* @date: 2023-11-09
|
||||
* @date: 2023-11-23
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("pressure_test")
|
||||
@ApiModel(value = "PressureTest实体类", description = "PressureTest")
|
||||
public class PressureTest implements Serializable {
|
||||
@TableName("pressure_test_machine_manage")
|
||||
@ApiModel(value = "PressureTestMachineManage实体类", description = "PressureTestMachineManage")
|
||||
public class PressureTestMachineManage implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
@ -101,18 +101,18 @@ public class PressureTest implements Serializable {
|
||||
@Excel(name = "操作员", width = 15)
|
||||
@ApiModelProperty(value = "操作员")
|
||||
private java.lang.String operator;
|
||||
/**
|
||||
* 试块详情(试块编号、荷载力值(kN/m2)、抗折/抗压强度、力值曲线)
|
||||
*/
|
||||
@Excel(name = "试块详情(试块编号、荷载力值(kN/m2)、抗折/抗压强度、力值曲线)", width = 15)
|
||||
@ApiModelProperty(value = "试块详情(试块编号、荷载力值(kN/m2)、抗折/抗压强度、力值曲线)")
|
||||
private java.lang.String testBlockDetail;
|
||||
/**
|
||||
* 设备强度
|
||||
*/
|
||||
@Excel(name = "设备强度", width = 15)
|
||||
@ApiModelProperty(value = "设备强度")
|
||||
private java.lang.String equipmentStrength;
|
||||
/**
|
||||
* 上传附件
|
||||
*/
|
||||
@Excel(name = "上传附件", width = 15)
|
||||
@ApiModelProperty(value = "上传附件")
|
||||
private java.lang.String uploadAttachment;
|
||||
/**
|
||||
* 试件尺寸
|
||||
*/
|
||||
@ -0,0 +1,74 @@
|
||||
package com.zhgd.xmgl.modules.pressuretest.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("pressure_test_machine_manage_block_data")
|
||||
@ApiModel(value = "PressureTestMachineManageBlockData实体类", description = "PressureTestMachineManageBlockData")
|
||||
public class PressureTestMachineManageBlockData 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 pressureTestMachineManageBlockNumberId;
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.zhgd.xmgl.modules.pressuretest.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("pressure_test_machine_manage_block_number")
|
||||
@ApiModel(value = "PressureTestMachineManageBlockNumber实体类", description = "PressureTestMachineManageBlockNumber")
|
||||
public class PressureTestMachineManageBlockNumber 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 pressureTestMachineManageId;
|
||||
/**
|
||||
* 试验编号
|
||||
*/
|
||||
@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;
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.zhgd.xmgl.modules.pressuretest.mapper;
|
||||
|
||||
import com.zhgd.xmgl.modules.pressuretest.entity.PressureTestMachineManageBlockData;
|
||||
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 PressureTestMachineManageBlockDataMapper extends BaseMapper<PressureTestMachineManageBlockData> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.zhgd.xmgl.modules.pressuretest.mapper;
|
||||
|
||||
import com.zhgd.xmgl.modules.pressuretest.entity.PressureTestMachineManageBlockNumber;
|
||||
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 PressureTestMachineManageBlockNumberMapper extends BaseMapper<PressureTestMachineManageBlockNumber> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.zhgd.xmgl.modules.pressuretest.mapper;
|
||||
|
||||
import com.zhgd.xmgl.modules.pressuretest.entity.PressureTestMachineManage;
|
||||
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 PressureTestMachineManageMapper extends BaseMapper<PressureTestMachineManage> {
|
||||
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
package com.zhgd.xmgl.modules.pressuretest.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.zhgd.xmgl.modules.pressuretest.entity.PressureTest;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 试验检测
|
||||
* @author: pds
|
||||
* @date: 2023-11-09
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface PressureTestMapper extends BaseMapper<PressureTest> {
|
||||
|
||||
}
|
||||
@ -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.pressuretest.mapper.PressureTestMachineManageBlockDataMapper">
|
||||
</mapper>
|
||||
@ -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.pressuretest.mapper.PressureTestMachineManageBlockNumberMapper">
|
||||
</mapper>
|
||||
@ -1,4 +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.pressuretest.mapper.PressureTestMapper">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.pressuretest.mapper.PressureTestMachineManageMapper">
|
||||
</mapper>
|
||||
@ -0,0 +1,21 @@
|
||||
package com.zhgd.xmgl.modules.pressuretest.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.pressuretest.entity.PressureTestMachineManageBlockData;
|
||||
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 IPressureTestMachineManageBlockDataService extends IService<PressureTestMachineManageBlockData> {
|
||||
|
||||
IPage<PressureTestMachineManageBlockData> queryPageList(HashMap<String, Object> paramMap);
|
||||
|
||||
List<PressureTestMachineManageBlockData> queryList(HashMap<String, Object> paramMap);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.zhgd.xmgl.modules.pressuretest.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.pressuretest.entity.PressureTestMachineManageBlockNumber;
|
||||
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 IPressureTestMachineManageBlockNumberService extends IService<PressureTestMachineManageBlockNumber> {
|
||||
|
||||
IPage<PressureTestMachineManageBlockNumber> queryPageList(HashMap<String, Object> paramMap);
|
||||
|
||||
List<PressureTestMachineManageBlockNumber> queryList(HashMap<String, Object> paramMap);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.zhgd.xmgl.modules.pressuretest.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.pressuretest.entity.PressureTestMachineManage;
|
||||
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 IPressureTestMachineManageService extends IService<PressureTestMachineManage> {
|
||||
|
||||
IPage<PressureTestMachineManage> queryPageList(HashMap<String, Object> paramMap);
|
||||
|
||||
List<PressureTestMachineManage> queryList(HashMap<String, Object> paramMap);
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
package com.zhgd.xmgl.modules.pressuretest.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.pressuretest.entity.PressureTest;
|
||||
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-09
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface IPressureTestService extends IService<PressureTest> {
|
||||
|
||||
IPage<PressureTest> queryPageList(HashMap<String, Object> paramMap);
|
||||
|
||||
List<PressureTest> queryList(HashMap<String, Object> paramMap);
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.zhgd.xmgl.modules.pressuretest.service.impl;
|
||||
|
||||
import com.zhgd.xmgl.modules.pressuretest.entity.PressureTestMachineManageBlockData;
|
||||
import com.zhgd.xmgl.modules.pressuretest.mapper.PressureTestMachineManageBlockDataMapper;
|
||||
import com.zhgd.xmgl.modules.pressuretest.service.IPressureTestMachineManageBlockDataService;
|
||||
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
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class PressureTestMachineManageBlockDataServiceImpl extends ServiceImpl<PressureTestMachineManageBlockDataMapper, PressureTestMachineManageBlockData> implements IPressureTestMachineManageBlockDataService {
|
||||
@Override
|
||||
public IPage<PressureTestMachineManageBlockData> queryPageList(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<PressureTestMachineManageBlockData> queryWrapper = getQueryWrapper(paramMap);
|
||||
Page<PressureTestMachineManageBlockData> page = PageUtil.getPage(paramMap);
|
||||
IPage<PressureTestMachineManageBlockData> pageList = this.page(page, queryWrapper);
|
||||
pageList.setRecords(dealList(pageList.getRecords()));
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PressureTestMachineManageBlockData> queryList(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<PressureTestMachineManageBlockData> queryWrapper = getQueryWrapper(paramMap);
|
||||
return dealList(this.list(queryWrapper));
|
||||
}
|
||||
|
||||
private QueryWrapper<PressureTestMachineManageBlockData> getQueryWrapper(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<PressureTestMachineManageBlockData> queryWrapper = QueryGenerator.initPageQueryWrapper(PressureTestMachineManageBlockData.class, paramMap);
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(PressureTestMachineManageBlockData::getId));
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private List<PressureTestMachineManageBlockData> dealList(List<PressureTestMachineManageBlockData> list) {
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.zhgd.xmgl.modules.pressuretest.service.impl;
|
||||
|
||||
import com.zhgd.xmgl.modules.pressuretest.entity.PressureTestMachineManageBlockNumber;
|
||||
import com.zhgd.xmgl.modules.pressuretest.mapper.PressureTestMachineManageBlockNumberMapper;
|
||||
import com.zhgd.xmgl.modules.pressuretest.service.IPressureTestMachineManageBlockNumberService;
|
||||
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
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class PressureTestMachineManageBlockNumberServiceImpl extends ServiceImpl<PressureTestMachineManageBlockNumberMapper, PressureTestMachineManageBlockNumber> implements IPressureTestMachineManageBlockNumberService {
|
||||
@Override
|
||||
public IPage<PressureTestMachineManageBlockNumber> queryPageList(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<PressureTestMachineManageBlockNumber> queryWrapper = getQueryWrapper(paramMap);
|
||||
Page<PressureTestMachineManageBlockNumber> page = PageUtil.getPage(paramMap);
|
||||
IPage<PressureTestMachineManageBlockNumber> pageList = this.page(page, queryWrapper);
|
||||
pageList.setRecords(dealList(pageList.getRecords()));
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PressureTestMachineManageBlockNumber> queryList(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<PressureTestMachineManageBlockNumber> queryWrapper = getQueryWrapper(paramMap);
|
||||
return dealList(this.list(queryWrapper));
|
||||
}
|
||||
|
||||
private QueryWrapper<PressureTestMachineManageBlockNumber> getQueryWrapper(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<PressureTestMachineManageBlockNumber> queryWrapper = QueryGenerator.initPageQueryWrapper(PressureTestMachineManageBlockNumber.class, paramMap);
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(PressureTestMachineManageBlockNumber::getId));
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private List<PressureTestMachineManageBlockNumber> dealList(List<PressureTestMachineManageBlockNumber> list) {
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.zhgd.xmgl.modules.pressuretest.service.impl;
|
||||
|
||||
import com.zhgd.xmgl.modules.pressuretest.entity.PressureTestMachineManage;
|
||||
import com.zhgd.xmgl.modules.pressuretest.mapper.PressureTestMachineManageMapper;
|
||||
import com.zhgd.xmgl.modules.pressuretest.service.IPressureTestMachineManageService;
|
||||
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
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class PressureTestMachineManageServiceImpl extends ServiceImpl<PressureTestMachineManageMapper, PressureTestMachineManage> implements IPressureTestMachineManageService {
|
||||
@Override
|
||||
public IPage<PressureTestMachineManage> queryPageList(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<PressureTestMachineManage> queryWrapper = getQueryWrapper(paramMap);
|
||||
Page<PressureTestMachineManage> page = PageUtil.getPage(paramMap);
|
||||
IPage<PressureTestMachineManage> pageList = this.page(page, queryWrapper);
|
||||
pageList.setRecords(dealList(pageList.getRecords()));
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PressureTestMachineManage> queryList(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<PressureTestMachineManage> queryWrapper = getQueryWrapper(paramMap);
|
||||
return dealList(this.list(queryWrapper));
|
||||
}
|
||||
|
||||
private QueryWrapper<PressureTestMachineManage> getQueryWrapper(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<PressureTestMachineManage> queryWrapper = QueryGenerator.initPageQueryWrapper(PressureTestMachineManage.class, paramMap);
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(PressureTestMachineManage::getId));
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private List<PressureTestMachineManage> dealList(List<PressureTestMachineManage> list) {
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@ -1,51 +0,0 @@
|
||||
package com.zhgd.xmgl.modules.pressuretest.service.impl;
|
||||
|
||||
import com.zhgd.xmgl.modules.pressuretest.entity.PressureTest;
|
||||
import com.zhgd.xmgl.modules.pressuretest.mapper.PressureTestMapper;
|
||||
import com.zhgd.xmgl.modules.pressuretest.service.IPressureTestService;
|
||||
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-09
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class PressureTestServiceImpl extends ServiceImpl<PressureTestMapper, PressureTest> implements IPressureTestService {
|
||||
@Override
|
||||
public IPage<PressureTest> queryPageList(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<PressureTest> queryWrapper = getQueryWrapper(paramMap);
|
||||
Page<PressureTest> page = PageUtil.getPage(paramMap);
|
||||
IPage<PressureTest> pageList = this.page(page, queryWrapper);
|
||||
pageList.setRecords(dealList(pageList.getRecords()));
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PressureTest> queryList(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<PressureTest> queryWrapper = getQueryWrapper(paramMap);
|
||||
return dealList(this.list(queryWrapper));
|
||||
}
|
||||
|
||||
private QueryWrapper<PressureTest> getQueryWrapper(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<PressureTest> queryWrapper = QueryGenerator.initPageQueryWrapper(PressureTest.class, paramMap);
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(PressureTest::getId));
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private List<PressureTest> dealList(List<PressureTest> list) {
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@ -15,6 +15,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* @Description: 智能张拉-数据
|
||||
|
||||
@ -15,6 +15,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* @Description: 智能张拉-设备
|
||||
|
||||
@ -62,6 +62,7 @@ public class VehiclePositionAlarmController {
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "createTime_begin", value = "报警时间开始", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "createTime_end", value = "报警时间结束", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "devSns", value = "设备序号(多个,分割)", paramType = "query", required = false, dataType = "String"),
|
||||
})
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<VehiclePositionAlarm>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
@ -74,6 +75,11 @@ public class VehiclePositionAlarmController {
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "列表查询车辆(人员)定位-报警记录信息", notes = "列表查询车辆(人员)定位-报警记录信息", httpMethod = "GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "createTime_begin", value = "报警时间开始", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "createTime_end", value = "报警时间结束", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "devSns", value = "设备序号(多个,分割)", paramType = "query", required = false, dataType = "String"),
|
||||
})
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<VehiclePositionAlarm>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(vehiclePositionAlarmService.queryList(paramMap));
|
||||
|
||||
@ -19,6 +19,7 @@ import com.zhgd.xmgl.modules.vehicleposition.service.IVehiclePositionAlarmServic
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import com.zhgd.xmgl.util.RegionUtil;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -107,6 +108,10 @@ public class VehiclePositionAlarmServiceImpl extends ServiceImpl<VehiclePosition
|
||||
private QueryWrapper<VehiclePositionAlarm> getQueryWrapper(HashMap<String, Object> paramMap) {
|
||||
String alias = "vpa.";
|
||||
QueryWrapper<VehiclePositionAlarm> queryWrapper = QueryGenerator.initPageQueryWrapper(VehiclePositionAlarm.class, paramMap, alias);
|
||||
String devSns = MapUtils.getString(paramMap, "devSns");
|
||||
if (StrUtil.isNotBlank(devSns)) {
|
||||
queryWrapper.in(alias + RefUtil.fieldNameUlc(VehiclePositionAlarm::getDevSn), StringUtils.split(devSns, ","));
|
||||
}
|
||||
queryWrapper.orderByDesc(alias + RefUtil.fieldNameUlc(VehiclePositionAlarm::getId));
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user