From 45d143ace3f54a0457c8b841e6e7e2c812b5690e Mon Sep 17 00:00:00 2001 From: lcj <2331845269@qq.com> Date: Tue, 25 Nov 2025 19:37:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E8=AE=A1=E5=88=92=E8=8F=9C?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...PgsConstructionSchedulePlanController.java | 23 ++++++++++++++++--- .../PgsProgressCategoryController.java | 16 ++++++------- ...PgsProgressCategoryTemplateController.java | 21 ++++++++++++++--- .../controller/PgsProgressPlanController.java | 10 ++++---- .../PgsProgressPlanDetailController.java | 12 +++++----- 5 files changed, 57 insertions(+), 25 deletions(-) diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsConstructionSchedulePlanController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsConstructionSchedulePlanController.java index cbbc5e27..2af52a5e 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsConstructionSchedulePlanController.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsConstructionSchedulePlanController.java @@ -16,6 +16,8 @@ import org.dromara.progress.domain.PgsConstructionSchedulePlan; import org.dromara.progress.domain.dto.constructionscheduleplan.*; import org.dromara.progress.domain.vo.constructionscheduleplan.PgsConstructionSchedulePlanVo; import org.dromara.progress.service.IPgsConstructionSchedulePlanService; +import org.dromara.project.domain.vo.project.BusProjectStructureVo; +import org.dromara.project.service.IBusProjectService; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -36,6 +38,21 @@ public class PgsConstructionSchedulePlanController extends BaseController { @Resource private IPgsConstructionSchedulePlanService pgsConstructionSchedulePlanService; + @Resource + private IBusProjectService projectService; + + /** + * 获取项目结构 + * + * @param id 主键 + */ + @SaCheckPermission("progress:constructionSchedulePlan:list") + @GetMapping("/projectStructure/{id}") + public R getProjectStructure(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(projectService.getStructure(id)); + } + /** * 查询施工进度计划列表 */ @@ -60,7 +77,7 @@ public class PgsConstructionSchedulePlanController extends BaseController { /** * 根据项目id导出施工进度计划模版 */ - @SaCheckPermission("progress:constructionSchedulePlan:exportTemplate") + @SaCheckPermission("progress:constructionSchedulePlan:export") @Log(title = "施工进度计划", businessType = BusinessType.EXPORT) @PostMapping("/exportTemplate/{projectId}") public void exportExcelByProjectId(@NotNull(message = "项目id不能为空") @@ -71,7 +88,7 @@ public class PgsConstructionSchedulePlanController extends BaseController { /** * 读取施工进度计划模版 */ - @SaCheckPermission("progress:constructionSchedulePlan:readTemplate") + @SaCheckPermission("progress:constructionSchedulePlan:import") @Log(title = "施工进度计划", businessType = BusinessType.IMPORT) @PostMapping("/readTemplate") public R readExcel(@RequestParam("file") MultipartFile file, Long projectId) { @@ -121,7 +138,7 @@ public class PgsConstructionSchedulePlanController extends BaseController { * 修改施工进度计划为完成状态 * */ - @SaCheckPermission("progress:constructionSchedulePlan:editFinish") + @SaCheckPermission("progress:constructionSchedulePlan:edit") @Log(title = "施工进度计划", businessType = BusinessType.UPDATE) @RepeatSubmit() @PutMapping("/finish") diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsProgressCategoryController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsProgressCategoryController.java index bb5faea2..aa1fabb7 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsProgressCategoryController.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsProgressCategoryController.java @@ -49,7 +49,7 @@ public class PgsProgressCategoryController extends BaseController { /** * 根据进度父级查询进度类别列表 */ - @SaCheckPermission("progress:progressCategory:listByParent") + @SaCheckPermission("progress:progressCategory:list") @GetMapping("/listByParent") public R> listByParent(PgsProgressCategoryQueryByParentReq req) { List list = pgsProgressCategoryService.queryListByParent(req); @@ -59,7 +59,7 @@ public class PgsProgressCategoryController extends BaseController { /** * 根据进度父级查询进度类别列表已完成产值 */ - @SaCheckPermission("progress:progressCategory:listByParent") + @SaCheckPermission("progress:progressCategory:list") @GetMapping("/getValueByParentId") public R getValueByParentId(PgsProgressCategoryQueryByParentReq req) { return R.ok(pgsProgressCategoryService.getValueByParentId(req)); @@ -68,7 +68,7 @@ public class PgsProgressCategoryController extends BaseController { /** * 根据项目获取进度类别模版顶级目录列表 */ - @SaCheckPermission("progress:progressCategory:listTopByProjectId") + @SaCheckPermission("progress:progressCategory:list") @GetMapping("/listTopByProjectId/{projectId}") public R> listTopByProjectId(@NotNull(message = "项目id不能为空") @PathVariable Long projectId) { @@ -168,7 +168,7 @@ public class PgsProgressCategoryController extends BaseController { * * @param id 主键 */ - @SaCheckPermission("progress:progressCategory:coordinate") + @SaCheckPermission("progress:progressCategory:list") @GetMapping("/coordinate/{id}") public R getCoordinate(@NotNull(message = "主键不能为空") @PathVariable Long id) { @@ -180,7 +180,7 @@ public class PgsProgressCategoryController extends BaseController { * * @param projectId 项目主键 */ - @SaCheckPermission("progress:progressCategory:projectNumber") + @SaCheckPermission("progress:progressCategory:query") @GetMapping("/project/number/{projectId}") public R getProjectNumber(@NotNull(message = "项目主键不能为空") @PathVariable Long projectId) { @@ -192,7 +192,7 @@ public class PgsProgressCategoryController extends BaseController { * * @param id 主键 */ - @SaCheckPermission("progress:progressCategory:lastTime") + @SaCheckPermission("progress:progressCategory:add") @GetMapping("/lastTime/{id}") public R getLastTimeInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) { @@ -214,7 +214,7 @@ public class PgsProgressCategoryController extends BaseController { /** * 新增分项工程单价 */ - @SaCheckPermission("progress:progressCategory:price") + @SaCheckPermission("progress:progressCategory:edit") @Log(title = "进度类别", businessType = BusinessType.INSERT) @RepeatSubmit() @PostMapping("/price") @@ -247,7 +247,7 @@ public class PgsProgressCategoryController extends BaseController { /** * 批量新增设施进度类别 */ - @SaCheckPermission("progress:progressCategory:add") + @SaCheckPermission("progress:progressCategory:edit") @Log(title = "进度类别", businessType = BusinessType.INSERT) @RepeatSubmit() @PostMapping("/batch/facility") diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsProgressCategoryTemplateController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsProgressCategoryTemplateController.java index a5bc2c04..703fcedd 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsProgressCategoryTemplateController.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsProgressCategoryTemplateController.java @@ -19,6 +19,8 @@ import org.dromara.progress.domain.dto.progresscategorytemplate.PgsProgressCateg import org.dromara.progress.domain.dto.progresscategorytemplate.PgsProgressCategoryTemplateUpdateReq; import org.dromara.progress.domain.vo.progresscategorytemplate.PgsProgressCategoryTemplateVo; import org.dromara.progress.service.IPgsProgressCategoryTemplateService; +import org.dromara.project.domain.vo.project.BusSubProjectVo; +import org.dromara.project.service.IBusProjectService; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -38,10 +40,23 @@ public class PgsProgressCategoryTemplateController extends BaseController { @Resource private IPgsProgressCategoryTemplateService pgsProgressCategoryTemplateService; + @Resource + private IBusProjectService projectService; + + /** + * 查询项目下的子项目列表 + */ + @SaCheckPermission("progress:progressCategoryTemplate:list") + @GetMapping("/list/sub/{id}") + public R> listSubProject(@NotNull(message = "项目id不能为空") + @PathVariable Long id) { + return R.ok(projectService.querySubList(id)); + } + /** * 分页查询进度类别模版列表 */ - @SaCheckPermission("progress:progressCategoryTemplate:page") + @SaCheckPermission("progress:progressCategoryTemplate:list") @GetMapping("/page") public TableDataInfo page(PgsProgressCategoryTemplateQueryReq req, PageQuery pageQuery) { return pgsProgressCategoryTemplateService.queryPageList(req, pageQuery); @@ -60,7 +75,7 @@ public class PgsProgressCategoryTemplateController extends BaseController { /** * 根据进度父级查询进度类别模版列表 */ - @SaCheckPermission("progress:progressCategoryTemplate:listByParent") + @SaCheckPermission("progress:progressCategoryTemplate:list") @GetMapping("/listByParent") public R> listByParent(PgsProgressCategoryTemplateQueryByParentReq req) { List list = pgsProgressCategoryTemplateService.queryListByParent(req); @@ -70,7 +85,7 @@ public class PgsProgressCategoryTemplateController extends BaseController { /** * 获取系统顶级进度类别模版列表 */ - @SaCheckPermission("progress:progressCategoryTemplate:listSystemTop") + @SaCheckPermission("progress:progressCategoryTemplate:list") @GetMapping("/listSystemTop/{projectId}") public R> listSystemTop(@NotNull(message = "项目主键不能为空") @PathVariable Long projectId) { diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsProgressPlanController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsProgressPlanController.java index 994dbb45..362d92a5 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsProgressPlanController.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsProgressPlanController.java @@ -39,7 +39,7 @@ public class PgsProgressPlanController extends BaseController { /** * 查询进度计划列表 */ - @SaCheckPermission("progress:progressPlan:list") + @SaCheckPermission("progress:progressCategory:list") @GetMapping("/list") public TableDataInfo list(PgsProgressPlanQueryReq req, PageQuery pageQuery) { return pgsProgressPlanService.queryPageList(req, pageQuery); @@ -48,7 +48,7 @@ public class PgsProgressPlanController extends BaseController { /** * 导出进度计划列表 */ - @SaCheckPermission("progress:progressPlan:export") + @SaCheckPermission("progress:progressCategory:export") @Log(title = "进度计划", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(PgsProgressPlanQueryReq req, HttpServletResponse response) { @@ -61,7 +61,7 @@ public class PgsProgressPlanController extends BaseController { * * @param id 主键 */ - @SaCheckPermission("progress:progressPlan:query") + @SaCheckPermission("progress:progressCategory:query") @GetMapping("/{id}") public R getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) { @@ -71,7 +71,7 @@ public class PgsProgressPlanController extends BaseController { /** * 新增进度计划 */ - @SaCheckPermission("progress:progressPlan:add") + @SaCheckPermission("progress:progressCategory:add") @Log(title = "进度计划", businessType = BusinessType.INSERT) @RepeatSubmit() @PostMapping() @@ -84,7 +84,7 @@ public class PgsProgressPlanController extends BaseController { * * @param ids 主键 */ - @SaCheckPermission("progress:progressPlan:remove") + @SaCheckPermission("progress:progressCategory:remove") @Log(title = "进度计划", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public R remove(@NotEmpty(message = "主键不能为空") diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsProgressPlanDetailController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsProgressPlanDetailController.java index 391c1fff..6bc4b9e8 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsProgressPlanDetailController.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsProgressPlanDetailController.java @@ -33,7 +33,7 @@ public class PgsProgressPlanDetailController extends BaseController { /** * 查询进度计划详情列表 */ - @SaCheckPermission("progress:progressPlanDetail:list") + @SaCheckPermission("progress:progressCategory:list") @GetMapping("/list") public TableDataInfo list(PgsProgressPlanDetailQueryReq req, PageQuery pageQuery) { return pgsProgressPlanDetailService.queryPageList(req, pageQuery); @@ -42,7 +42,7 @@ public class PgsProgressPlanDetailController extends BaseController { /** * 新增进度计划详情(普通设施) */ - @SaCheckPermission("progress:progressPlanDetail:insertDetail") + @SaCheckPermission("progress:progressCategory:add") @RepeatSubmit() @PostMapping("/insert/detail") public R insertFinishedDetail(@Validated @RequestBody PgsProgressPlanDetailFinishedCreateReq req) { @@ -52,7 +52,7 @@ public class PgsProgressPlanDetailController extends BaseController { /** * 新增进度计划详情(百分比设施) */ - @SaCheckPermission("progress:progressPlanDetail:insertPercentage") + @SaCheckPermission("progress:progressCategory:add") @RepeatSubmit() @PostMapping("/insert/percentage") public R insertPercentageDetail(@Validated @RequestBody PgsProgressPlanDetailCreateReq req) { @@ -72,7 +72,7 @@ public class PgsProgressPlanDetailController extends BaseController { * * @param id 主键 */ - @SaCheckPermission("progress:progressPlanDetail:detailFinished") + @SaCheckPermission("progress:progressCategory:query") @GetMapping("/detail/finished/{id}") public TableDataInfo getFinishedDetail(@NotNull(message = "主键不能为空") @PathVariable Long id, @@ -85,7 +85,7 @@ public class PgsProgressPlanDetailController extends BaseController { * * @param id 主键 */ - @SaCheckPermission("progress:progressPlanDetail:detailUnFinish") + @SaCheckPermission("progress:progressCategory:query") @GetMapping("/detail/unFinish/{id}") public TableDataInfo getUnFinishDetail(@NotNull(message = "主键不能为空") @PathVariable Long id, @@ -96,7 +96,7 @@ public class PgsProgressPlanDetailController extends BaseController { /** * 删除进度计划详情 */ - @SaCheckPermission("progress:progressPlanDetail:removeDetail") + @SaCheckPermission("progress:progressCategory:remove") @RepeatSubmit() @DeleteMapping("/remove/detail") public R removeDetail(@Validated PgsProgressPlanDetailRemoveReq req) {