From 01bec5540f87a68ae881295f9fe06283e00f1ed2 Mon Sep 17 00:00:00 2001 From: zhanghl <253316343@qq.com> Date: 星期日, 27 四月 2025 10:31:51 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsGasPipingRouteStatController.java | 130 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 130 insertions(+), 0 deletions(-) diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsGasPipingRouteStatController.java b/aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsGasPipingRouteStatController.java new file mode 100644 index 0000000..fb6537d --- /dev/null +++ b/aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsGasPipingRouteStatController.java @@ -0,0 +1,130 @@ +package com.aps.core.controller; + +import com.aps.common.core.utils.poi.ExcelUtil; +import com.aps.common.core.web.controller.BaseController; +import com.aps.common.core.web.domain.AjaxResult; +import com.aps.common.core.web.page.TableDataInfo; +import com.aps.common.log.annotation.Log; +import com.aps.common.log.enums.BusinessType; +import com.aps.common.security.annotation.RequiresPermissions; +import com.aps.core.domain.ApsGasPipingRouteStat; +import com.aps.core.service.IApsGasPipingRouteStatService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 姘斾綋绠¤矾浜ц兘璐熻浇缁熻Controller + * + * @author hjy + * @date 2025-04-24 + */ + +@Tag(name = "姘斾綋绠¤矾浜ц兘璐熻浇缁熻", description = "姘斾綋绠¤矾浜ц兘璐熻浇缁熻鎺ュ彛") +@RestController +@RequestMapping("/apsGasPipingRouteStat") +public class ApsGasPipingRouteStatController extends BaseController +{ + @Autowired + private IApsGasPipingRouteStatService apsGasPipingRouteStatService; + + /** + * 鏌ヨ姘斾綋绠¤矾浜ц兘璐熻浇缁熻鍒楄〃 + */ + @Operation(summary = "鏌ヨ姘斾綋绠¤矾浜ц兘璐熻浇缁熻鍒楄〃", description = "鍒嗛〉鏌ヨ") + @RequiresPermissions("apsGasPipingRouteStat:apsGasPipingRouteStat:list") + @GetMapping("/list") + public TableDataInfo list(@RequestBody ApsGasPipingRouteStat apsGasPipingRouteStat) + { + startPage(); + List<ApsGasPipingRouteStat> list = apsGasPipingRouteStatService.selectApsGasPipingRouteStatList(apsGasPipingRouteStat); + return getDataTable(list); + } + + /** + * 瀵煎嚭姘斾綋绠¤矾浜ц兘璐熻浇缁熻鍒楄〃 + */ + @Operation(summary = "瀵煎嚭姘斾綋绠¤矾浜ц兘璐熻浇缁熻鍒楄〃", description = "瀵煎嚭") + @RequiresPermissions("apsGasPipingRouteStat:apsGasPipingRouteStat:export") + @Log(title = "姘斾綋绠¤矾浜ц兘璐熻浇缁熻", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ApsGasPipingRouteStat apsGasPipingRouteStat) + { + List<ApsGasPipingRouteStat> list = apsGasPipingRouteStatService.selectApsGasPipingRouteStatList(apsGasPipingRouteStat); + ExcelUtil<ApsGasPipingRouteStat> util = new ExcelUtil<ApsGasPipingRouteStat>(ApsGasPipingRouteStat.class); + util.exportExcel(response, list, "姘斾綋绠¤矾浜ц兘璐熻浇缁熻鏁版嵁"); + } + + /** + * 鑾峰彇姘斾綋绠¤矾浜ц兘璐熻浇缁熻璇︾粏淇℃伅 + */ + @Operation(summary = "鑾峰彇姘斾綋绠¤矾浜ц兘璐熻浇缁熻璇︾粏淇℃伅", description = "鏍规嵁id鑾峰彇") + @RequiresPermissions("apsGasPipingRouteStat:apsGasPipingRouteStat:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(apsGasPipingRouteStatService.selectApsGasPipingRouteStatById(id)); + } + + /** + * 鏂板姘斾綋绠¤矾浜ц兘璐熻浇缁熻 + */ + @Operation(summary = "鏂板姘斾綋绠¤矾浜ц兘璐熻浇缁熻", description = "鍗曚釜鏂板") + @RequiresPermissions("apsGasPipingRouteStat:apsGasPipingRouteStat:add") + @Log(title = "姘斾綋绠¤矾浜ц兘璐熻浇缁熻", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ApsGasPipingRouteStat apsGasPipingRouteStat) + { + return toAjax(apsGasPipingRouteStatService.insertApsGasPipingRouteStat(apsGasPipingRouteStat)); + } + + /** + * 淇敼姘斾綋绠¤矾浜ц兘璐熻浇缁熻 + */ + @Operation(summary = "淇敼姘斾綋绠¤矾浜ц兘璐熻浇缁熻", description = "鍗曚釜淇敼") + @RequiresPermissions("apsGasPipingRouteStat:apsGasPipingRouteStat:edit") + @Log(title = "姘斾綋绠¤矾浜ц兘璐熻浇缁熻", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ApsGasPipingRouteStat apsGasPipingRouteStat) + { + return toAjax(apsGasPipingRouteStatService.updateApsGasPipingRouteStat(apsGasPipingRouteStat)); + } + + /** + * 鍒犻櫎姘斾綋绠¤矾浜ц兘璐熻浇缁熻 + */ + @Operation(summary = "鍒犻櫎姘斾綋绠¤矾浜ц兘璐熻浇缁熻", description = "鎵归噺鍒犻櫎") + @RequiresPermissions("apsGasPipingRouteStat:apsGasPipingRouteStat:remove") + @Log(title = "姘斾綋绠¤矾浜ц兘璐熻浇缁熻", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(apsGasPipingRouteStatService.deleteApsGasPipingRouteStatByIds(ids)); + } + + @Operation(summary = "璁$畻姘斾綋绠¤矾浜ц兘璐熻浇缁熻", description = "璁$畻") + @PostMapping("/computeCapacity") + public void computeCapacity() + { + apsGasPipingRouteStatService.computeCapacity(); + } + + @Operation(summary = "鑾峰彇姘斾綋绠¤矾浜ц兘璐熻浇缁熻", description = "璁$畻") + @PostMapping("/getCapacityPlanData") + public AjaxResult getCapacityPlanData(@RequestBody ApsGasPipingRouteStat apsGasPipingRouteStat) + { + return AjaxResult.success(apsGasPipingRouteStatService.getCapacityPlanData(apsGasPipingRouteStat)); + } + + @Operation(summary = "瀵煎嚭姘斾綋绠¤矾浜ц兘璐熻浇缁熻Excel琛�", description = "瀵煎嚭") + @PostMapping("/exportExcel") + public void exportExcel(ApsGasPipingRouteStat apsGasPipingRouteStat, HttpServletResponse response) + { + apsGasPipingRouteStatService.exportExcel(response, apsGasPipingRouteStat); + } + +} -- Gitblit v1.9.3