智能张拉
This commit is contained in:
parent
9e81506fe0
commit
d59e87191d
@ -70,23 +70,23 @@ public class AntiPressureFoldDev implements Serializable {
|
||||
@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 = 15)
|
||||
@ApiModelProperty(value = "所属试验室")
|
||||
private java.lang.String affiliatedLaboratory;
|
||||
/**
|
||||
* 设备图片
|
||||
*/
|
||||
@Excel(name = "设备图片", width = 15)
|
||||
@ApiModelProperty(value = "设备图片")
|
||||
private java.lang.String equipmentPicture;
|
||||
/**
|
||||
* 项目sn
|
||||
*/
|
||||
@Excel(name = "项目sn", width = 15)
|
||||
@ApiModelProperty(value = "项目sn")
|
||||
private java.lang.String projectSn;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
|
||||
@ -0,0 +1,185 @@
|
||||
package com.zhgd.xmgl.modules.smarttension.controller;
|
||||
|
||||
import com.zhgd.xmgl.modules.smarttension.entity.SmartTensionData;
|
||||
import com.zhgd.xmgl.modules.smarttension.service.ISmartTensionDataService;
|
||||
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/smartTensionData")
|
||||
@Slf4j
|
||||
@Api(tags = "智能张拉-数据相关Api")
|
||||
public class SmartTensionDataController {
|
||||
@Autowired
|
||||
private ISmartTensionDataService smartTensionDataService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @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<SmartTensionData>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(smartTensionDataService.queryPageList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "列表查询智能张拉-数据信息", notes = "列表查询智能张拉-数据信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<SmartTensionData>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(smartTensionDataService.queryList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param smartTensionData
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "添加智能张拉-数据信息", notes = "添加智能张拉-数据信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<SmartTensionData> add(@RequestBody SmartTensionData smartTensionData) {
|
||||
smartTensionData.setId(null);
|
||||
smartTensionDataService.save(smartTensionData);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param smartTensionData
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑智能张拉-数据信息", notes = "编辑智能张拉-数据信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<SmartTensionData> edit(@RequestBody SmartTensionData smartTensionData) {
|
||||
smartTensionDataService.updateById(smartTensionData);
|
||||
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<SmartTensionData> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
String id = MapUtils.getString(map, "id");
|
||||
Result<SmartTensionData> result = new Result<SmartTensionData>();
|
||||
SmartTensionData smartTensionData = smartTensionDataService.getById(id);
|
||||
if (smartTensionData == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = smartTensionDataService.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<SmartTensionData> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<SmartTensionData> result = new Result<SmartTensionData>();
|
||||
SmartTensionData smartTensionData = smartTensionDataService.getById(id);
|
||||
if (smartTensionData == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(smartTensionData);
|
||||
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<SmartTensionData> queryWrapper = null;
|
||||
try {
|
||||
String paramsStr = request.getParameter("paramsStr");
|
||||
if (oConvertUtils.isNotEmpty(paramsStr)) {
|
||||
String deString = URLDecoder.decode(paramsStr, "UTF-8");
|
||||
SmartTensionData smartTensionData = JSON.parseObject(deString, SmartTensionData.class);
|
||||
queryWrapper = QueryGenerator.initQueryWrapper(smartTensionData, request.getParameterMap());
|
||||
}
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
//Step.2 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
List<SmartTensionData> pageList = smartTensionDataService.list(queryWrapper);
|
||||
//导出文件名称
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "智能张拉-数据列表");
|
||||
mv.addObject(NormalExcelConstants.CLASS, SmartTensionData.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.smarttension.controller;
|
||||
|
||||
import com.zhgd.xmgl.modules.smarttension.service.ISmartTensionDevService;
|
||||
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.smarttension.entity.SmartTensionDev;
|
||||
|
||||
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/smartTensionDev")
|
||||
@Slf4j
|
||||
@Api(tags = "智能张拉-设备相关Api")
|
||||
public class SmartTensionDevController {
|
||||
@Autowired
|
||||
private ISmartTensionDevService smartTensionDevService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @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<SmartTensionDev>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(smartTensionDevService.queryPageList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "列表查询智能张拉-设备信息", notes = "列表查询智能张拉-设备信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<SmartTensionDev>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(smartTensionDevService.queryList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param smartTensionDev
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "添加智能张拉-设备信息", notes = "添加智能张拉-设备信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<SmartTensionDev> add(@RequestBody SmartTensionDev smartTensionDev) {
|
||||
smartTensionDev.setId(null);
|
||||
smartTensionDevService.save(smartTensionDev);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param smartTensionDev
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑智能张拉-设备信息", notes = "编辑智能张拉-设备信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<SmartTensionDev> edit(@RequestBody SmartTensionDev smartTensionDev) {
|
||||
smartTensionDevService.updateById(smartTensionDev);
|
||||
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<SmartTensionDev> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
String id = MapUtils.getString(map, "id");
|
||||
Result<SmartTensionDev> result = new Result<SmartTensionDev>();
|
||||
SmartTensionDev smartTensionDev = smartTensionDevService.getById(id);
|
||||
if (smartTensionDev == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = smartTensionDevService.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<SmartTensionDev> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<SmartTensionDev> result = new Result<SmartTensionDev>();
|
||||
SmartTensionDev smartTensionDev = smartTensionDevService.getById(id);
|
||||
if (smartTensionDev == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(smartTensionDev);
|
||||
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<SmartTensionDev> queryWrapper = null;
|
||||
try {
|
||||
String paramsStr = request.getParameter("paramsStr");
|
||||
if (oConvertUtils.isNotEmpty(paramsStr)) {
|
||||
String deString = URLDecoder.decode(paramsStr, "UTF-8");
|
||||
SmartTensionDev smartTensionDev = JSON.parseObject(deString, SmartTensionDev.class);
|
||||
queryWrapper = QueryGenerator.initQueryWrapper(smartTensionDev, request.getParameterMap());
|
||||
}
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
//Step.2 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
List<SmartTensionDev> pageList = smartTensionDevService.list(queryWrapper);
|
||||
//导出文件名称
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "智能张拉-设备列表");
|
||||
mv.addObject(NormalExcelConstants.CLASS, SmartTensionDev.class);
|
||||
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("智能张拉-设备列表数据", "导出人:Jeecg", "导出信息"));
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,286 @@
|
||||
package com.zhgd.xmgl.modules.smarttension.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("smart_tension_data")
|
||||
@ApiModel(value = "SmartTensionData实体类", description = "SmartTensionData")
|
||||
public class SmartTensionData 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 componentName;
|
||||
/**
|
||||
* 梁型
|
||||
*/
|
||||
@Excel(name = "梁型", width = 15)
|
||||
@ApiModelProperty(value = "梁型")
|
||||
private java.lang.String beamType;
|
||||
/**
|
||||
* 砼设计强度
|
||||
*/
|
||||
@Excel(name = "砼设计强度", width = 15)
|
||||
@ApiModelProperty(value = "砼设计强度")
|
||||
private java.lang.String concreteDesignStrength;
|
||||
/**
|
||||
* 设备厂家
|
||||
*/
|
||||
@Excel(name = "设备厂家", width = 15)
|
||||
@ApiModelProperty(value = "设备厂家")
|
||||
private java.lang.String equipmentManufacturer;
|
||||
/**
|
||||
* 施工部位
|
||||
*/
|
||||
@Excel(name = "施工部位", width = 15)
|
||||
@ApiModelProperty(value = "施工部位")
|
||||
private java.lang.String constructionPart;
|
||||
/**
|
||||
* 锚片厚度
|
||||
*/
|
||||
@Excel(name = "锚片厚度", width = 15)
|
||||
@ApiModelProperty(value = "锚片厚度")
|
||||
private java.lang.String anchorSheetThickness;
|
||||
/**
|
||||
* 钢束编号
|
||||
*/
|
||||
@Excel(name = "钢束编号", width = 15)
|
||||
@ApiModelProperty(value = "钢束编号")
|
||||
private java.lang.String tendonNumber;
|
||||
/**
|
||||
* 张拉时间
|
||||
*/
|
||||
@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 tensionTime;
|
||||
/**
|
||||
* 断面
|
||||
*/
|
||||
@Excel(name = "断面", width = 15)
|
||||
@ApiModelProperty(value = "断面")
|
||||
private java.lang.Integer section;
|
||||
/**
|
||||
* 张拉力误差(%)
|
||||
*/
|
||||
@Excel(name = "张拉力误差(%)", width = 15)
|
||||
@ApiModelProperty(value = "张拉力误差(%)")
|
||||
private java.lang.Double tensionError;
|
||||
/**
|
||||
* 回缩量(mm)
|
||||
*/
|
||||
@Excel(name = "回缩量(mm)", width = 15)
|
||||
@ApiModelProperty(value = "回缩量(mm)")
|
||||
private java.lang.Double retractionAmount;
|
||||
/**
|
||||
* 持荷时间(s)
|
||||
*/
|
||||
@Excel(name = "持荷时间(s)", width = 15)
|
||||
@ApiModelProperty(value = "持荷时间(s)")
|
||||
private java.lang.Double holdingTime;
|
||||
/**
|
||||
* 设计张拉力(kN)
|
||||
*/
|
||||
@Excel(name = "设计张拉力(kN)", width = 15)
|
||||
@ApiModelProperty(value = "设计张拉力(kN)")
|
||||
private java.lang.Double designTension;
|
||||
/**
|
||||
* 总伸长量(mm)
|
||||
*/
|
||||
@Excel(name = "总伸长量(mm)", width = 15)
|
||||
@ApiModelProperty(value = "总伸长量(mm)")
|
||||
private java.lang.Double totalElongation;
|
||||
/**
|
||||
* 理论伸长量(mm)
|
||||
*/
|
||||
@Excel(name = "理论伸长量(mm)", width = 15)
|
||||
@ApiModelProperty(value = "理论伸长量(mm)")
|
||||
private java.lang.Double theoreticalElongation;
|
||||
/**
|
||||
* 伸长量误差(%)
|
||||
*/
|
||||
@Excel(name = "伸长量误差(%)", width = 15)
|
||||
@ApiModelProperty(value = "伸长量误差(%)")
|
||||
private java.lang.Double elongationError;
|
||||
/**
|
||||
* 状态:1合格2不合格3未判定
|
||||
*/
|
||||
@Excel(name = "状态:1合格2不合格3未判定", width = 15)
|
||||
@ApiModelProperty(value = "状态:1合格2不合格3未判定")
|
||||
private java.lang.Integer status;
|
||||
/**
|
||||
* 张拉力初始行程(kN)
|
||||
*/
|
||||
@Excel(name = "张拉力初始行程(kN)", width = 15)
|
||||
@ApiModelProperty(value = "张拉力初始行程(kN)")
|
||||
private java.lang.Double tension0;
|
||||
/**
|
||||
* 张拉力第一行程(kN)
|
||||
*/
|
||||
@Excel(name = "张拉力第一行程(kN)", width = 15)
|
||||
@ApiModelProperty(value = "张拉力第一行程(kN)")
|
||||
private java.lang.Double tension1;
|
||||
/**
|
||||
* 张拉力第二行程(kN)
|
||||
*/
|
||||
@Excel(name = "张拉力第二行程(kN)", width = 15)
|
||||
@ApiModelProperty(value = "张拉力第二行程(kN)")
|
||||
private java.lang.Double tension2;
|
||||
/**
|
||||
* 张拉力第三行程(kN)
|
||||
*/
|
||||
@Excel(name = "张拉力第三行程(kN)", width = 15)
|
||||
@ApiModelProperty(value = "张拉力第三行程(kN)")
|
||||
private java.lang.Double tension3;
|
||||
/**
|
||||
* 张拉力第四行程(kN)
|
||||
*/
|
||||
@Excel(name = "张拉力第四行程(kN)", width = 15)
|
||||
@ApiModelProperty(value = "张拉力第四行程(kN)")
|
||||
private java.lang.Double tension4;
|
||||
/**
|
||||
* 伸长量初始行程(mm)
|
||||
*/
|
||||
@Excel(name = "伸长量初始行程(mm)", width = 15)
|
||||
@ApiModelProperty(value = "伸长量初始行程(mm)")
|
||||
private java.lang.Double elongation0;
|
||||
/**
|
||||
* 伸长量第一行程(mm)
|
||||
*/
|
||||
@Excel(name = "伸长量第一行程(mm)", width = 15)
|
||||
@ApiModelProperty(value = "伸长量第一行程(mm)")
|
||||
private java.lang.Double elongation1;
|
||||
/**
|
||||
* 伸长量第二行程(mm)
|
||||
*/
|
||||
@Excel(name = "伸长量第二行程(mm)", width = 15)
|
||||
@ApiModelProperty(value = "伸长量第二行程(mm)")
|
||||
private java.lang.Double elongation2;
|
||||
/**
|
||||
* 伸长量第三行程(mm)
|
||||
*/
|
||||
@Excel(name = "伸长量第三行程(mm)", width = 15)
|
||||
@ApiModelProperty(value = "伸长量第三行程(mm)")
|
||||
private java.lang.Double elongation3;
|
||||
/**
|
||||
* 伸长量第四行程(mm)
|
||||
*/
|
||||
@Excel(name = "伸长量第四行程(mm)", width = 15)
|
||||
@ApiModelProperty(value = "伸长量第四行程(mm)")
|
||||
private java.lang.Double elongation4;
|
||||
/**
|
||||
* 油压初始行程(Mpa)
|
||||
*/
|
||||
@Excel(name = "油压初始行程(Mpa)", width = 15)
|
||||
@ApiModelProperty(value = "油压初始行程(Mpa)")
|
||||
private java.lang.Double oilPressure0;
|
||||
/**
|
||||
* 油压第一行程(Mpa)
|
||||
*/
|
||||
@Excel(name = "油压第一行程(Mpa)", width = 15)
|
||||
@ApiModelProperty(value = "油压第一行程(Mpa)")
|
||||
private java.lang.Double oilPressure1;
|
||||
/**
|
||||
* 油压第二行程(Mpa)
|
||||
*/
|
||||
@Excel(name = "油压第二行程(Mpa)", width = 15)
|
||||
@ApiModelProperty(value = "油压第二行程(Mpa)")
|
||||
private java.lang.Double oilPressure2;
|
||||
/**
|
||||
* 油压第三行程(Mpa)
|
||||
*/
|
||||
@Excel(name = "油压第三行程(Mpa)", width = 15)
|
||||
@ApiModelProperty(value = "油压第三行程(Mpa)")
|
||||
private java.lang.Double oilPressure3;
|
||||
/**
|
||||
* 油压第四行程(Mpa)
|
||||
*/
|
||||
@Excel(name = "油压第四行程(Mpa)", width = 15)
|
||||
@ApiModelProperty(value = "油压第四行程(Mpa)")
|
||||
private java.lang.Double oilPressure4;
|
||||
/**
|
||||
* x轴的值
|
||||
*/
|
||||
@Excel(name = "x轴的值", width = 15)
|
||||
@ApiModelProperty(value = "x轴的值")
|
||||
private java.lang.String xAxis;
|
||||
/**
|
||||
* y轴断面2的值
|
||||
*/
|
||||
@Excel(name = "y轴断面2的值", width = 15)
|
||||
@ApiModelProperty(value = "y轴断面2的值")
|
||||
private java.lang.String ySection2;
|
||||
/**
|
||||
* y轴张拉力的值
|
||||
*/
|
||||
@Excel(name = "y轴张拉力的值", width = 15)
|
||||
@ApiModelProperty(value = "y轴张拉力的值")
|
||||
private java.lang.String yTension;
|
||||
/**
|
||||
* y轴伸长量的值
|
||||
*/
|
||||
@Excel(name = "y轴伸长量的值", width = 15)
|
||||
@ApiModelProperty(value = "y轴伸长量的值")
|
||||
private java.lang.String yElongation;
|
||||
/**
|
||||
* y轴油压的值
|
||||
*/
|
||||
@Excel(name = "y轴油压的值", width = 15)
|
||||
@ApiModelProperty(value = "y轴油压的值")
|
||||
private java.lang.String yOilPressure;
|
||||
/**
|
||||
* 创建时间 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,106 @@
|
||||
package com.zhgd.xmgl.modules.smarttension.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("smart_tension_dev")
|
||||
@ApiModel(value = "SmartTensionDev实体类", description = "SmartTensionDev")
|
||||
public class SmartTensionDev 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 belongBeamField;
|
||||
/**
|
||||
* 设备图片
|
||||
*/
|
||||
@Excel(name = "设备图片", width = 15)
|
||||
@ApiModelProperty(value = "设备图片")
|
||||
private java.lang.String 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;
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.zhgd.xmgl.modules.smarttension.mapper;
|
||||
|
||||
import com.zhgd.xmgl.modules.smarttension.entity.SmartTensionData;
|
||||
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 SmartTensionDataMapper extends BaseMapper<SmartTensionData> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.zhgd.xmgl.modules.smarttension.mapper;
|
||||
|
||||
import com.zhgd.xmgl.modules.smarttension.entity.SmartTensionDev;
|
||||
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 SmartTensionDevMapper extends BaseMapper<SmartTensionDev> {
|
||||
|
||||
}
|
||||
@ -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.smarttension.mapper.SmartTensionDataMapper">
|
||||
</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.smarttension.mapper.SmartTensionDevMapper">
|
||||
</mapper>
|
||||
@ -0,0 +1,21 @@
|
||||
package com.zhgd.xmgl.modules.smarttension.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.smarttension.entity.SmartTensionData;
|
||||
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 ISmartTensionDataService extends IService<SmartTensionData> {
|
||||
|
||||
IPage<SmartTensionData> queryPageList(HashMap<String, Object> paramMap);
|
||||
|
||||
List<SmartTensionData> queryList(HashMap<String, Object> paramMap);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.zhgd.xmgl.modules.smarttension.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.smarttension.entity.SmartTensionDev;
|
||||
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 ISmartTensionDevService extends IService<SmartTensionDev> {
|
||||
|
||||
IPage<SmartTensionDev> queryPageList(HashMap<String, Object> paramMap);
|
||||
|
||||
List<SmartTensionDev> queryList(HashMap<String, Object> paramMap);
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.zhgd.xmgl.modules.smarttension.service.impl;
|
||||
|
||||
import com.zhgd.xmgl.modules.smarttension.entity.SmartTensionData;
|
||||
import com.zhgd.xmgl.modules.smarttension.mapper.SmartTensionDataMapper;
|
||||
import com.zhgd.xmgl.modules.smarttension.service.ISmartTensionDataService;
|
||||
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 SmartTensionDataServiceImpl extends ServiceImpl<SmartTensionDataMapper, SmartTensionData> implements ISmartTensionDataService {
|
||||
@Override
|
||||
public IPage<SmartTensionData> queryPageList(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<SmartTensionData> queryWrapper = getQueryWrapper(paramMap);
|
||||
Page<SmartTensionData> page = PageUtil.getPage(paramMap);
|
||||
IPage<SmartTensionData> pageList = this.page(page, queryWrapper);
|
||||
pageList.setRecords(dealList(pageList.getRecords()));
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SmartTensionData> queryList(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<SmartTensionData> queryWrapper = getQueryWrapper(paramMap);
|
||||
return dealList(this.list(queryWrapper));
|
||||
}
|
||||
|
||||
private QueryWrapper<SmartTensionData> getQueryWrapper(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<SmartTensionData> queryWrapper = QueryGenerator.initPageQueryWrapper(SmartTensionData.class, paramMap);
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(SmartTensionData::getId));
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private List<SmartTensionData> dealList(List<SmartTensionData> list) {
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.zhgd.xmgl.modules.smarttension.service.impl;
|
||||
|
||||
import com.zhgd.xmgl.modules.smarttension.entity.SmartTensionDev;
|
||||
import com.zhgd.xmgl.modules.smarttension.mapper.SmartTensionDevMapper;
|
||||
import com.zhgd.xmgl.modules.smarttension.service.ISmartTensionDevService;
|
||||
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 SmartTensionDevServiceImpl extends ServiceImpl<SmartTensionDevMapper, SmartTensionDev> implements ISmartTensionDevService {
|
||||
@Override
|
||||
public IPage<SmartTensionDev> queryPageList(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<SmartTensionDev> queryWrapper = getQueryWrapper(paramMap);
|
||||
Page<SmartTensionDev> page = PageUtil.getPage(paramMap);
|
||||
IPage<SmartTensionDev> pageList = this.page(page, queryWrapper);
|
||||
pageList.setRecords(dealList(pageList.getRecords()));
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SmartTensionDev> queryList(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<SmartTensionDev> queryWrapper = getQueryWrapper(paramMap);
|
||||
return dealList(this.list(queryWrapper));
|
||||
}
|
||||
|
||||
private QueryWrapper<SmartTensionDev> getQueryWrapper(HashMap<String, Object> paramMap) {
|
||||
QueryWrapper<SmartTensionDev> queryWrapper = QueryGenerator.initPageQueryWrapper(SmartTensionDev.class, paramMap);
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(SmartTensionDev::getId));
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private List<SmartTensionDev> dealList(List<SmartTensionDev> list) {
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@ -80,7 +80,7 @@ public class UniversalTestDev implements Serializable {
|
||||
*/
|
||||
@Excel(name = "设备图片", width = 15)
|
||||
@ApiModelProperty(value = "设备图片")
|
||||
private java.lang.Object equipmentPicture;
|
||||
private java.lang.String equipmentPicture;
|
||||
/**
|
||||
* 项目sn
|
||||
*/
|
||||
|
||||
@ -113,19 +113,8 @@ public class VehiclePositionDevController {
|
||||
@ApiImplicitParam(name = "id", value = "车辆(人员)定位-设备ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<VehiclePositionDev> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
String id = MapUtils.getString(map, "id");
|
||||
Result<VehiclePositionDev> result = new Result<VehiclePositionDev>();
|
||||
VehiclePositionDev vehiclePositionDev = vehiclePositionDevService.getById(id);
|
||||
if (vehiclePositionDev == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = vehiclePositionDevService.removeById(id);
|
||||
if (ok) {
|
||||
result.success("删除成功!");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
vehiclePositionDevService.delete(map);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -25,4 +25,6 @@ public interface IVehiclePositionDevService extends IService<VehiclePositionDev>
|
||||
void add(VehiclePositionDev vehiclePositionDev);
|
||||
|
||||
void edit(VehiclePositionDev vehiclePositionDev);
|
||||
|
||||
void delete(HashMap<String, Object> map);
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ public class VehiclePositionAlarmServiceImpl extends ServiceImpl<VehiclePosition
|
||||
}
|
||||
|
||||
private QueryWrapper<VehiclePositionAlarm> getQueryWrapper(HashMap<String, Object> paramMap) {
|
||||
String alias = "vpd.";
|
||||
String alias = "vpa.";
|
||||
QueryWrapper<VehiclePositionAlarm> queryWrapper = QueryGenerator.initPageQueryWrapper(VehiclePositionAlarm.class, paramMap, alias);
|
||||
queryWrapper.orderByDesc(alias + RefUtil.fieldNameUlc(VehiclePositionAlarm::getId));
|
||||
return queryWrapper;
|
||||
|
||||
@ -9,16 +9,19 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.modules.vehicleposition.entity.VehiclePositionAlarm;
|
||||
import com.zhgd.xmgl.modules.vehicleposition.entity.VehiclePositionData;
|
||||
import com.zhgd.xmgl.modules.vehicleposition.entity.VehiclePositionDayRecord;
|
||||
import com.zhgd.xmgl.modules.vehicleposition.entity.VehiclePositionDev;
|
||||
import com.zhgd.xmgl.modules.vehicleposition.entity.vo.CountVehiclePositionDevVo;
|
||||
import com.zhgd.xmgl.modules.vehicleposition.mapper.VehiclePositionDataMapper;
|
||||
import com.zhgd.xmgl.modules.vehicleposition.mapper.VehiclePositionDevMapper;
|
||||
import com.zhgd.xmgl.modules.vehicleposition.mapper.*;
|
||||
import com.zhgd.xmgl.modules.vehicleposition.service.IVehiclePositionDevService;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@ -31,9 +34,16 @@ import java.util.List;
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class VehiclePositionDevServiceImpl extends ServiceImpl<VehiclePositionDevMapper, VehiclePositionDev> implements IVehiclePositionDevService {
|
||||
@Autowired
|
||||
VehiclePositionDataMapper vehiclePositionDataMapper;
|
||||
@Autowired
|
||||
VehiclePositionAlarmMapper vehiclePositionAlarmMapper;
|
||||
@Autowired
|
||||
VehiclePositionDayRecordMapper vehiclePositionDayRecordMapper;
|
||||
@Autowired
|
||||
VehiclePositionFenceMapper vehiclePositionFenceMapper;
|
||||
|
||||
@Override
|
||||
public IPage<VehiclePositionDev> queryPageList(HashMap<String, Object> paramMap) {
|
||||
@ -76,6 +86,16 @@ public class VehiclePositionDevServiceImpl extends ServiceImpl<VehiclePositionDe
|
||||
updateById(vehiclePositionDev);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(HashMap<String, Object> map) {
|
||||
String id = MapUtils.getString(map, "id");
|
||||
VehiclePositionDev dev = baseMapper.selectById(id);
|
||||
removeById(id);
|
||||
vehiclePositionDataMapper.delete(new LambdaQueryWrapper<VehiclePositionData>().eq(VehiclePositionData::getDevSn, dev.getDevSn()));
|
||||
vehiclePositionAlarmMapper.delete(new LambdaQueryWrapper<VehiclePositionAlarm>().eq(VehiclePositionAlarm::getDevSn, dev.getDevSn()));
|
||||
vehiclePositionDayRecordMapper.delete(new LambdaQueryWrapper<VehiclePositionDayRecord>().eq(VehiclePositionDayRecord::getDevSn, dev.getDevSn()));
|
||||
}
|
||||
|
||||
private QueryWrapper<VehiclePositionDev> getQueryWrapper(HashMap<String, Object> paramMap) {
|
||||
String alias = "vpd.";
|
||||
QueryWrapper<VehiclePositionDev> queryWrapper = QueryGenerator.initPageQueryWrapper(VehiclePositionDev.class, paramMap, alias);
|
||||
|
||||
@ -21,6 +21,7 @@ import com.zhgd.xmgl.util.RefUtil;
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class ${entityName}ServiceImpl extends ServiceImpl<${entityName}Mapper, ${entityName}> implements I${entityName}Service {
|
||||
@Override
|
||||
public IPage<${entityName}> queryPageList(HashMap<String, Object> paramMap) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user