diff --git a/src/main/java/com/zhgd/xmgl/modules/rt/controller/RtNewTechnologiesAndNewProcessController.java b/src/main/java/com/zhgd/xmgl/modules/rt/controller/RtNewTechnologiesAndNewProcessController.java index 6a0a02df8..0b540b890 100644 --- a/src/main/java/com/zhgd/xmgl/modules/rt/controller/RtNewTechnologiesAndNewProcessController.java +++ b/src/main/java/com/zhgd/xmgl/modules/rt/controller/RtNewTechnologiesAndNewProcessController.java @@ -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> queryPageList(@ApiIgnore @RequestParam HashMap 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> queryPageList(@ApiIgnore @RequestParam HashMap paramMap) { + return Result.success(rtNewTechnologiesAndNewProcessService.queryPageList(paramMap)); + } - /** - * 列表查询 - * - * @return - */ - @ApiOperation(value = "列表查询榕图-新技术新工艺汇编信息", notes = "列表查询榕图-新技术新工艺汇编信息", httpMethod = "GET") - @GetMapping(value = "/list") - public Result> queryList(@ApiIgnore @RequestParam HashMap paramMap) { - return Result.success(rtNewTechnologiesAndNewProcessService.queryList(paramMap)); - } + /** + * 列表查询 + * + * @return + */ + @ApiOperation(value = "列表查询榕图-新技术新工艺汇编信息", notes = "列表查询榕图-新技术新工艺汇编信息", httpMethod = "GET") + @GetMapping(value = "/list") + public Result> queryList(@ApiIgnore @RequestParam HashMap paramMap) { + return Result.success(rtNewTechnologiesAndNewProcessService.queryList(paramMap)); + } - /** - * 添加 - * - * @param rtNewTechnologiesAndNewProcess - * @return - */ - @ApiOperation(value = "添加榕图-新技术新工艺汇编信息", notes = "添加榕图-新技术新工艺汇编信息", httpMethod = "POST") - @PostMapping(value = "/add") - public Result add(@RequestBody @Validate RtNewTechnologiesAndNewProcess rtNewTechnologiesAndNewProcess) { - rtNewTechnologiesAndNewProcessService.add(rtNewTechnologiesAndNewProcess); - return Result.ok(); - } + /** + * 添加 + * + * @param rtNewTechnologiesAndNewProcess + * @return + */ + @ApiOperation(value = "添加榕图-新技术新工艺汇编信息", notes = "添加榕图-新技术新工艺汇编信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody @Validate RtNewTechnologiesAndNewProcess rtNewTechnologiesAndNewProcess) { + rtNewTechnologiesAndNewProcessService.add(rtNewTechnologiesAndNewProcess); + return Result.ok(); + } - /** - * 编辑 - * - * @param rtNewTechnologiesAndNewProcess - * @return - */ - @ApiOperation(value = "编辑榕图-新技术新工艺汇编信息", notes = "编辑榕图-新技术新工艺汇编信息", httpMethod = "POST") - @PostMapping(value = "/edit") - public Result edit(@RequestBody RtNewTechnologiesAndNewProcess rtNewTechnologiesAndNewProcess) { - rtNewTechnologiesAndNewProcessService.edit(rtNewTechnologiesAndNewProcess); - return Result.ok(); - } + /** + * 编辑 + * + * @param rtNewTechnologiesAndNewProcess + * @return + */ + @ApiOperation(value = "编辑榕图-新技术新工艺汇编信息", notes = "编辑榕图-新技术新工艺汇编信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result 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 delete(@ApiIgnore @RequestBody HashMap map) { - String id = MapUtils.getString(map, "id"); - Result result = new Result(); - 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 delete(@ApiIgnore @RequestBody HashMap map) { + String id = MapUtils.getString(map, "id"); + Result result = new Result(); + 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 queryById(@RequestParam(name = "id", required = true) String id) { + Result result = new Result(); + 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 queryById(@RequestParam(name = "id", required = true) String id) { - Result result = new Result(); - RtNewTechnologiesAndNewProcess rtNewTechnologiesAndNewProcess = rtNewTechnologiesAndNewProcessService.getById(id); - if (rtNewTechnologiesAndNewProcess == null) { - result.error500("未找到对应实体"); - } else { - result.setResult(rtNewTechnologiesAndNewProcess); - result.setSuccess(true); - } - return result; - } } diff --git a/src/main/java/com/zhgd/xmgl/modules/rt/entity/RtNewTechnologiesAndNewProcess.java b/src/main/java/com/zhgd/xmgl/modules/rt/entity/RtNewTechnologiesAndNewProcess.java index 37071d778..ba3a74c6e 100644 --- a/src/main/java/com/zhgd/xmgl/modules/rt/entity/RtNewTechnologiesAndNewProcess.java +++ b/src/main/java/com/zhgd/xmgl/modules/rt/entity/RtNewTechnologiesAndNewProcess.java @@ -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; /** * 新技术/新工艺 */