bug修复

This commit is contained in:
guo 2023-12-28 18:38:20 +08:00
parent e9a08b8288
commit 7632ed3cf2
2 changed files with 107 additions and 111 deletions

View File

@ -1,27 +1,22 @@
package com.zhgd.xmgl.modules.rt.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.xmgl.modules.rt.entity.RtNewTechnologiesAndNewProcess;
import com.zhgd.xmgl.modules.rt.service.IRtNewTechnologiesAndNewProcessService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiImplicitParams;
import java.util.HashMap;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import com.zhgd.jeecg.common.api.vo.Result;
import org.apache.commons.collections.MapUtils;
import com.zhgd.xmgl.modules.rt.entity.RtNewTechnologiesAndNewProcess;
import org.simpleframework.xml.core.Validate;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.MapUtils;
import org.simpleframework.xml.core.Validate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.HashMap;
import java.util.List;
/**
@ -36,104 +31,105 @@ import org.springframework.web.bind.annotation.*;
@Slf4j
@Api(tags = "榕图-新技术新工艺汇编相关Api")
public class RtNewTechnologiesAndNewProcessController {
@Autowired
private IRtNewTechnologiesAndNewProcessService rtNewTechnologiesAndNewProcessService;
@Autowired
private IRtNewTechnologiesAndNewProcessService rtNewTechnologiesAndNewProcessService;
/**
* 分页列表查询
*
* @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<RtNewTechnologiesAndNewProcess>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(rtNewTechnologiesAndNewProcessService.queryPageList(paramMap));
}
/**
* 分页列表查询
*
* @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<RtNewTechnologiesAndNewProcess>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(rtNewTechnologiesAndNewProcessService.queryPageList(paramMap));
}
/**
* 列表查询
*
* @return
*/
@ApiOperation(value = "列表查询榕图-新技术新工艺汇编信息", notes = "列表查询榕图-新技术新工艺汇编信息", httpMethod = "GET")
@GetMapping(value = "/list")
public Result<List<RtNewTechnologiesAndNewProcess>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(rtNewTechnologiesAndNewProcessService.queryList(paramMap));
}
/**
* 列表查询
*
* @return
*/
@ApiOperation(value = "列表查询榕图-新技术新工艺汇编信息", notes = "列表查询榕图-新技术新工艺汇编信息", httpMethod = "GET")
@GetMapping(value = "/list")
public Result<List<RtNewTechnologiesAndNewProcess>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(rtNewTechnologiesAndNewProcessService.queryList(paramMap));
}
/**
* 添加
*
* @param rtNewTechnologiesAndNewProcess
* @return
*/
@ApiOperation(value = "添加榕图-新技术新工艺汇编信息", notes = "添加榕图-新技术新工艺汇编信息", httpMethod = "POST")
@PostMapping(value = "/add")
public Result<RtNewTechnologiesAndNewProcess> add(@RequestBody @Validate RtNewTechnologiesAndNewProcess rtNewTechnologiesAndNewProcess) {
rtNewTechnologiesAndNewProcessService.add(rtNewTechnologiesAndNewProcess);
return Result.ok();
}
/**
* 添加
*
* @param rtNewTechnologiesAndNewProcess
* @return
*/
@ApiOperation(value = "添加榕图-新技术新工艺汇编信息", notes = "添加榕图-新技术新工艺汇编信息", httpMethod = "POST")
@PostMapping(value = "/add")
public Result<RtNewTechnologiesAndNewProcess> add(@RequestBody @Validate RtNewTechnologiesAndNewProcess rtNewTechnologiesAndNewProcess) {
rtNewTechnologiesAndNewProcessService.add(rtNewTechnologiesAndNewProcess);
return Result.ok();
}
/**
* 编辑
*
* @param rtNewTechnologiesAndNewProcess
* @return
*/
@ApiOperation(value = "编辑榕图-新技术新工艺汇编信息", notes = "编辑榕图-新技术新工艺汇编信息", httpMethod = "POST")
@PostMapping(value = "/edit")
public Result<RtNewTechnologiesAndNewProcess> edit(@RequestBody RtNewTechnologiesAndNewProcess rtNewTechnologiesAndNewProcess) {
rtNewTechnologiesAndNewProcessService.edit(rtNewTechnologiesAndNewProcess);
return Result.ok();
}
/**
* 编辑
*
* @param rtNewTechnologiesAndNewProcess
* @return
*/
@ApiOperation(value = "编辑榕图-新技术新工艺汇编信息", notes = "编辑榕图-新技术新工艺汇编信息", httpMethod = "POST")
@PostMapping(value = "/edit")
public Result<RtNewTechnologiesAndNewProcess> edit(@RequestBody RtNewTechnologiesAndNewProcess rtNewTechnologiesAndNewProcess) {
rtNewTechnologiesAndNewProcessService.edit(rtNewTechnologiesAndNewProcess);
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<RtNewTechnologiesAndNewProcess> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
String id = MapUtils.getString(map, "id");
Result<RtNewTechnologiesAndNewProcess> result = new Result<RtNewTechnologiesAndNewProcess>();
RtNewTechnologiesAndNewProcess rtNewTechnologiesAndNewProcess = rtNewTechnologiesAndNewProcessService.getById(id);
if (rtNewTechnologiesAndNewProcess == null) {
result.error500("未找到对应实体");
} else {
boolean ok = rtNewTechnologiesAndNewProcessService.removeById(id);
if (ok) {
result.success("删除成功!");
}
}
/**
* 通过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<RtNewTechnologiesAndNewProcess> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
String id = MapUtils.getString(map, "id");
Result<RtNewTechnologiesAndNewProcess> result = new Result<RtNewTechnologiesAndNewProcess>();
RtNewTechnologiesAndNewProcess rtNewTechnologiesAndNewProcess = rtNewTechnologiesAndNewProcessService.getById(id);
if (rtNewTechnologiesAndNewProcess == null) {
result.error500("未找到对应实体");
} else {
boolean ok = rtNewTechnologiesAndNewProcessService.removeById(id);
if (ok) {
result.success("删除成功!");
}
}
return result;
}
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<RtNewTechnologiesAndNewProcess> queryById(@RequestParam(name = "id", required = true) String id) {
Result<RtNewTechnologiesAndNewProcess> result = new Result<RtNewTechnologiesAndNewProcess>();
RtNewTechnologiesAndNewProcess rtNewTechnologiesAndNewProcess = rtNewTechnologiesAndNewProcessService.getById(id);
if (rtNewTechnologiesAndNewProcess == null) {
result.error500("未找到对应实体");
} else {
result.setResult(rtNewTechnologiesAndNewProcess);
result.setSuccess(true);
}
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<RtNewTechnologiesAndNewProcess> queryById(@RequestParam(name = "id", required = true) String id) {
Result<RtNewTechnologiesAndNewProcess> result = new Result<RtNewTechnologiesAndNewProcess>();
RtNewTechnologiesAndNewProcess rtNewTechnologiesAndNewProcess = rtNewTechnologiesAndNewProcessService.getById(id);
if (rtNewTechnologiesAndNewProcess == null) {
result.error500("未找到对应实体");
} else {
result.setResult(rtNewTechnologiesAndNewProcess);
result.setSuccess(true);
}
return result;
}
}

View File

@ -32,11 +32,11 @@ public class RtNewTechnologiesAndNewProcess implements Serializable {
@ApiModelProperty(value = "id")
private java.lang.Long id;
/**
* 分类
* 分类1土建部分2电气部分
*/
@Excel(name = "分类", width = 15)
@ApiModelProperty(value = "分类")
private java.lang.String classify;
@Excel(name = "分类1土建部分2电气部分", width = 15)
@ApiModelProperty(value = "分类1土建部分2电气部分")
private java.lang.Integer classify;
/**
* 新技术/新工艺
*/