¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | } |
| | | |
| | | } |