diff --git a/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/BuildingInformationController.java b/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/BuildingInformationController.java index 7944047..1719589 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/BuildingInformationController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/BuildingInformationController.java @@ -4,16 +4,13 @@ package com.ruoyi.gysl.controller; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.exception.ServiceException; -import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.gysl.entity.BasicInformation; import com.ruoyi.gysl.entity.BuildingInformation; import com.ruoyi.gysl.entity.request.ZwIdPageReq; import com.ruoyi.gysl.service.BasicInformationService; import com.ruoyi.gysl.service.BuildingInformationService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -21,7 +18,6 @@ import javax.annotation.Resource; import javax.validation.Valid; import java.io.Serializable; import java.util.List; -import java.util.Objects; /** * 建筑信息表(BuildingInformation)表控制层 @@ -58,6 +54,20 @@ public class BuildingInformationController extends BaseController { } + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("/{id}") + @ApiOperation(value = "通过主键查询单条数据",response = BuildingInformation.class ) + public AjaxResult selectOne(@PathVariable Serializable id) { + BuildingInformation byId = buildingInformationService.getById(id); + basicInformationService.testXmId(byId.getXmId()); + return success(byId); + } + /** * 新增数据 * diff --git a/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/MxController.java b/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/MxController.java index d725939..706eadf 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/MxController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/MxController.java @@ -23,7 +23,7 @@ import java.util.List; @Api(tags = "模型管理") @RestController @RequestMapping("/gysl/mx") -@PreAuthorize("@ss.hasAnyRoles('admin,common')") + public class MxController extends BaseController { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/ProjectLegendController.java b/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/ProjectLegendController.java index 06751eb..a76df92 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/ProjectLegendController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/ProjectLegendController.java @@ -9,7 +9,6 @@ import com.ruoyi.gysl.service.BasicInformationService; import com.ruoyi.gysl.service.ProjectLegendService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -63,6 +62,20 @@ public class ProjectLegendController extends BaseController { return success(projectLegendService.save(projectLegend)); } + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("/{id}") + @ApiOperation(value = "通过主键查询单条数据",response = ProjectLegend.class ) + public AjaxResult selectOne(@PathVariable Serializable id) { + ProjectLegend byId = projectLegendService.getById(id); + basicInformationService.testXmId(byId.getXmId()); + return success(byId); + } + /** * 修改数据 * diff --git a/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/ProjectMonthInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/ProjectMonthInfoController.java index 00dbb34..6c99393 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/ProjectMonthInfoController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/ProjectMonthInfoController.java @@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; +import java.io.Serializable; import java.util.List; /** @@ -67,6 +68,21 @@ public class ProjectMonthInfoController extends BaseController { return success(projectMonthInfoService.save(projectMonthInfo)); } + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("/{id}") + @ApiOperation(value = "通过主键查询单条数据",response = ProjectMonthInfo.class ) + public AjaxResult selectOne(@PathVariable Serializable id) { + ProjectMonthInfo byId = projectMonthInfoService.getById(id); + basicInformationService.testXmId(byId.getXmId()); + return success(byId); + } + + /** * 修改数据 * diff --git a/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/ProjectRemarkController.java b/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/ProjectRemarkController.java index abf7e26..dcbcd85 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/ProjectRemarkController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/ProjectRemarkController.java @@ -50,7 +50,19 @@ public class ProjectRemarkController extends BaseController { return success(projectRemarkService.list(projectRemark)); } - + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("/{id}") + @ApiOperation(value = "通过主键查询单条数据",response = ProjectRemark.class ) + public AjaxResult selectOne(@PathVariable Serializable id) { + ProjectRemark byId = projectRemarkService.getById(id); + basicInformationService.testXmId(byId.getXmId()); + return success(byId); + } /** * 新增数据 * diff --git a/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/XmxlController.java b/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/XmxlController.java index 62bf4db..3d2a13f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/XmxlController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/gysl/controller/XmxlController.java @@ -51,6 +51,19 @@ public class XmxlController extends BaseController { return success(xmxlService.list(zwIdPageReq)); } + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("/{id}") + @ApiOperation(value = "通过主键查询单条数据",response = Xmxl.class ) + public AjaxResult selectOne(@PathVariable Serializable id) { + Xmxl byId = xmxlService.getById(id); + basicInformationService.testXmId(byId.getXmId()); + return success(byId); + } /** * 新增数据