From 5ebd6188ee62841d1c96aef623bb1f8f13457395 Mon Sep 17 00:00:00 2001
From: huangjiayang <5265313@qq.com>
Date: 星期四, 24 四月 2025 15:52:26 +0800
Subject: [PATCH] 【ADD】增加气体管路产能规划相关代码

---
 aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsGasPipelineCapacityPlan.java                         |  223 +++++++++++++++++
 aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsGasPipelineCapacityPlanController.java |  150 +++++++++++
 aps-modules/aps-core/src/main/resources/mapper/core/ApsGasPipelineCapacityPlanMapper.xml                       |  128 +++++++++
 aps-modules/aps-core/src/main/java/com/aps/core/service/IApsGasPipelineCapacityPlanService.java                |   62 ++++
 aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelineCapacityPlanServiceImpl.java        |   97 +++++++
 aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsGasPipelineCapacityPlanMapper.java                   |   62 ++++
 6 files changed, 722 insertions(+), 0 deletions(-)

diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsGasPipelineCapacityPlanController.java b/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsGasPipelineCapacityPlanController.java
new file mode 100644
index 0000000..ece0314
--- /dev/null
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsGasPipelineCapacityPlanController.java
@@ -0,0 +1,150 @@
+package com.aps.core.controller.basicData;
+
+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.ApsGasPipelineCapacityPlan;
+import com.aps.core.domain.ApsStandardProcess;
+import com.aps.core.service.IApsGasPipelineCapacityPlanService;
+import com.aps.core.service.IApsStandardProcessService;
+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.ArrayList;
+import java.util.List;
+
+/**
+ * 姘斾綋绠¤矾浜ц兘瑙勫垝Controller
+ * 
+ * @author hjy
+ * @date 2025-04-24
+ */
+
+@Tag(name = "姘斾綋绠¤矾浜ц兘瑙勫垝", description = "姘斾綋绠¤矾浜ц兘瑙勫垝鎺ュ彛")
+@RestController
+@RequestMapping("/gasPipelineCapacityPlan")
+public class ApsGasPipelineCapacityPlanController extends BaseController
+{
+    @Autowired
+    private IApsGasPipelineCapacityPlanService apsGasPipelineCapacityPlanService;
+
+    @Autowired
+    private IApsStandardProcessService apsStandardProcessService;
+
+    /**
+     * 鏌ヨ姘斾綋绠¤矾浜ц兘瑙勫垝鍒楄〃
+     */
+    @Operation(summary = "鏌ヨ姘斾綋绠¤矾浜ц兘瑙勫垝鍒楄〃", description = "鍒嗛〉鏌ヨ")
+//    @RequiresPermissions("gasPipelineCapacityPlan:gasPipelineCapacityPlan:list")
+    @GetMapping("/list")
+    public TableDataInfo list(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan)
+    {
+//        startPage();
+        List<ApsGasPipelineCapacityPlan> list = apsGasPipelineCapacityPlanService.selectApsGasPipelineCapacityPlanList(apsGasPipelineCapacityPlan);
+        ApsStandardProcess apsStandardProcess = new ApsStandardProcess();
+        apsStandardProcess.setMajor(apsGasPipelineCapacityPlan.getMajor());
+        List<ApsStandardProcess> processList = apsStandardProcessService.selectApsStandardProcessListAll(apsStandardProcess);
+        if(list.isEmpty()){
+            for(ApsStandardProcess apsStandardProcessTemp : processList){
+                ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlanTemp = new ApsGasPipelineCapacityPlan();
+                apsGasPipelineCapacityPlanTemp.setProcessName(apsStandardProcessTemp.getProcessName());
+                list.add(apsGasPipelineCapacityPlanTemp);
+            }
+        }else if(processList.size()>list.size()){
+            List<String> newProcess = new ArrayList<>();
+            for(ApsStandardProcess apsStandardProcessTemp : processList){
+                boolean flag = true;
+                for(ApsGasPipelineCapacityPlan temp : list){
+                    if(apsStandardProcessTemp.getMajor().equals(temp.getMajor())){
+                        flag = false;
+                        break;
+                    }
+                }
+                if(flag){
+                    newProcess.add(apsStandardProcessTemp.getProcessName());
+                }
+            }
+            for(String processName : newProcess){
+                ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlanTemp = new ApsGasPipelineCapacityPlan();
+                apsGasPipelineCapacityPlanTemp.setProcessName(processName);
+                list.add(apsGasPipelineCapacityPlanTemp);
+            }
+        }
+        return getDataTable(list);
+    }
+
+    /**
+     * 瀵煎嚭姘斾綋绠¤矾浜ц兘瑙勫垝鍒楄〃
+     */
+    @Operation(summary = "瀵煎嚭姘斾綋绠¤矾浜ц兘瑙勫垝鍒楄〃", description = "瀵煎嚭")
+    @RequiresPermissions("gasPipelineCapacityPlan:gasPipelineCapacityPlan:export")
+    @Log(title = "姘斾綋绠¤矾浜ц兘瑙勫垝", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan)
+    {
+        List<ApsGasPipelineCapacityPlan> list = apsGasPipelineCapacityPlanService.selectApsGasPipelineCapacityPlanList(apsGasPipelineCapacityPlan);
+        ExcelUtil<ApsGasPipelineCapacityPlan> util = new ExcelUtil<ApsGasPipelineCapacityPlan>(ApsGasPipelineCapacityPlan.class);
+        util.exportExcel(response, list, "姘斾綋绠¤矾浜ц兘瑙勫垝鏁版嵁");
+    }
+
+    /**
+     * 鑾峰彇姘斾綋绠¤矾浜ц兘瑙勫垝璇︾粏淇℃伅
+     */
+    @Operation(summary = "鑾峰彇姘斾綋绠¤矾浜ц兘瑙勫垝璇︾粏淇℃伅", description = "鏍规嵁id鑾峰彇")
+    @RequiresPermissions("gasPipelineCapacityPlan:gasPipelineCapacityPlan:query")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(apsGasPipelineCapacityPlanService.selectApsGasPipelineCapacityPlanById(id));
+    }
+
+    /**
+     * 鏂板姘斾綋绠¤矾浜ц兘瑙勫垝
+     */
+    @Operation(summary = "鏂板姘斾綋绠¤矾浜ц兘瑙勫垝", description = "鍗曚釜鏂板")
+    @RequiresPermissions("gasPipelineCapacityPlan:gasPipelineCapacityPlan:add")
+    @Log(title = "姘斾綋绠¤矾浜ц兘瑙勫垝", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody List<ApsGasPipelineCapacityPlan> apsGasPipelineCapacityPlan)
+    {
+        apsGasPipelineCapacityPlan.forEach(apsGasPipelineCapacityPlanTemp -> {
+            if(apsGasPipelineCapacityPlanTemp.getId()!=null){
+                apsGasPipelineCapacityPlanService.insertApsGasPipelineCapacityPlan(apsGasPipelineCapacityPlanTemp);
+            }else{
+                apsGasPipelineCapacityPlanService.updateApsGasPipelineCapacityPlan(apsGasPipelineCapacityPlanTemp);
+            }
+        });
+        return AjaxResult.success();
+    }
+
+    /**
+     * 淇敼姘斾綋绠¤矾浜ц兘瑙勫垝
+     */
+    @Operation(summary = "淇敼姘斾綋绠¤矾浜ц兘瑙勫垝", description = "鍗曚釜淇敼")
+    @RequiresPermissions("gasPipelineCapacityPlan:gasPipelineCapacityPlan:edit")
+    @Log(title = "姘斾綋绠¤矾浜ц兘瑙勫垝", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan)
+    {
+        return toAjax(apsGasPipelineCapacityPlanService.updateApsGasPipelineCapacityPlan(apsGasPipelineCapacityPlan));
+    }
+
+    /**
+     * 鍒犻櫎姘斾綋绠¤矾浜ц兘瑙勫垝
+     */
+    @Operation(summary = "鍒犻櫎姘斾綋绠¤矾浜ц兘瑙勫垝", description = "鎵归噺鍒犻櫎")
+    @RequiresPermissions("gasPipelineCapacityPlan:gasPipelineCapacityPlan:remove")
+    @Log(title = "姘斾綋绠¤矾浜ц兘瑙勫垝", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(apsGasPipelineCapacityPlanService.deleteApsGasPipelineCapacityPlanByIds(ids));
+    }
+}
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsGasPipelineCapacityPlan.java b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsGasPipelineCapacityPlan.java
new file mode 100644
index 0000000..b040e5d
--- /dev/null
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsGasPipelineCapacityPlan.java
@@ -0,0 +1,223 @@
+package com.aps.core.domain;
+
+import com.aps.common.core.annotation.Excel;
+import com.aps.common.core.web.domain.BaseEntity;
+import io.swagger.v3.oas.annotations.media.Schema;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.math.BigDecimal;
+
+/**
+ * 姘斾綋绠¤矾浜ц兘瑙勫垝瀵硅薄 aps_gas_pipeline_capacity_plan
+ * 
+ * @author hjy
+ * @date 2025-04-24
+ */
+@Schema(description = "姘斾綋绠¤矾浜ц兘瑙勫垝瀹炰綋绫�")
+public class ApsGasPipelineCapacityPlan extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 涓婚敭id */
+    @Schema(description = "涓婚敭id", type = "Long")
+    private Long id;
+
+    /** 宸ュ簭鍚嶇О */
+    @Excel(name = "宸ュ簭鍚嶇О")
+    @Schema(description = "宸ュ簭鍚嶇О", type = "Long")
+    private String processName;
+
+    /** 骞� */
+    @Excel(name = "骞�")
+    @Schema(description = "骞�", type = "String")
+    private String year;
+
+    /** 鏈� */
+    @Excel(name = "鏈�")
+    @Schema(description = "鏈�", type = "String")
+    private String month;
+
+    /** 涓撲笟 */
+    @Excel(name = "涓撲笟")
+    @Schema(description = "涓撲笟", type = "String")
+    private String major;
+
+    /** 鏃ヤ骇鍑虹被鍨� */
+    @Excel(name = "鏃ヤ骇鍑虹被鍨�")
+    @Schema(description = "鏃ヤ骇鍑虹被鍨�", type = "String")
+    private String dayProduceType;
+
+    /** 鏃ヤ骇鍑烘暟閲� */
+    @Excel(name = "鏃ヤ骇鍑烘暟閲�")
+    @Schema(description = "鏃ヤ骇鍑烘暟閲�", type = "BigDecimal")
+    private BigDecimal dayProduceNum;
+
+    /** 鏃ヤ骇鍑哄崟浣� */
+    @Excel(name = "鏃ヤ骇鍑哄崟浣�")
+    @Schema(description = "鏃ヤ骇鍑哄崟浣�", type = "String")
+    private String dayProduceUnit;
+
+    /** 浜哄憳鏁伴噺 */
+    @Excel(name = "浜哄憳鏁伴噺")
+    @Schema(description = "浜哄憳鏁伴噺", type = "BigDecimal")
+    private BigDecimal personnelNumber;
+
+    /** 鏃ヤ骇鍑烘�绘暟閲� */
+    @Excel(name = "鏃ヤ骇鍑烘�绘暟閲�")
+    @Schema(description = "鏃ヤ骇鍑烘�绘暟閲�", type = "BigDecimal")
+    private BigDecimal dayProduceAllNum;
+
+    /** 澶╂暟 */
+    @Excel(name = "澶╂暟")
+    @Schema(description = "澶╂暟", type = "BigDecimal")
+    private BigDecimal days;
+
+    /** 鏈堜骇鍑烘�绘暟閲� */
+    @Excel(name = "鏈堜骇鍑烘�绘暟閲�")
+    @Schema(description = "鏈堜骇鍑烘�绘暟閲�", type = "BigDecimal")
+    private BigDecimal monthProduceAllNum;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+
+    public void setProcessName(String processName) 
+    {
+        this.processName = processName;
+    }
+
+    public String getProcessName() 
+    {
+        return processName;
+    }
+
+    public void setYear(String year) 
+    {
+        this.year = year;
+    }
+
+    public String getYear() 
+    {
+        return year;
+    }
+
+    public void setMonth(String month) 
+    {
+        this.month = month;
+    }
+
+    public String getMonth() 
+    {
+        return month;
+    }
+
+    public void setMajor(String major) 
+    {
+        this.major = major;
+    }
+
+    public String getMajor() 
+    {
+        return major;
+    }
+
+    public void setDayProduceType(String dayProduceType) 
+    {
+        this.dayProduceType = dayProduceType;
+    }
+
+    public String getDayProduceType() 
+    {
+        return dayProduceType;
+    }
+
+    public void setDayProduceNum(BigDecimal dayProduceNum) 
+    {
+        this.dayProduceNum = dayProduceNum;
+    }
+
+    public BigDecimal getDayProduceNum() 
+    {
+        return dayProduceNum;
+    }
+
+    public void setDayProduceUnit(String dayProduceUnit) 
+    {
+        this.dayProduceUnit = dayProduceUnit;
+    }
+
+    public String getDayProduceUnit() 
+    {
+        return dayProduceUnit;
+    }
+
+    public void setPersonnelNumber(BigDecimal personnelNumber) 
+    {
+        this.personnelNumber = personnelNumber;
+    }
+
+    public BigDecimal getPersonnelNumber() 
+    {
+        return personnelNumber;
+    }
+
+    public void setDayProduceAllNum(BigDecimal dayProduceAllNum) 
+    {
+        this.dayProduceAllNum = dayProduceAllNum;
+    }
+
+    public BigDecimal getDayProduceAllNum() 
+    {
+        return dayProduceAllNum;
+    }
+
+    public void setDays(BigDecimal days) 
+    {
+        this.days = days;
+    }
+
+    public BigDecimal getDays() 
+    {
+        return days;
+    }
+
+    public void setMonthProduceAllNum(BigDecimal monthProduceAllNum) 
+    {
+        this.monthProduceAllNum = monthProduceAllNum;
+    }
+
+    public BigDecimal getMonthProduceAllNum() 
+    {
+        return monthProduceAllNum;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("processName", getProcessName())
+            .append("year", getYear())
+            .append("month", getMonth())
+            .append("major", getMajor())
+            .append("dayProduceType", getDayProduceType())
+            .append("dayProduceNum", getDayProduceNum())
+            .append("dayProduceUnit", getDayProduceUnit())
+            .append("personnelNumber", getPersonnelNumber())
+            .append("dayProduceAllNum", getDayProduceAllNum())
+            .append("days", getDays())
+            .append("monthProduceAllNum", getMonthProduceAllNum())
+            .append("remark", getRemark())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsGasPipelineCapacityPlanMapper.java b/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsGasPipelineCapacityPlanMapper.java
new file mode 100644
index 0000000..231632b
--- /dev/null
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsGasPipelineCapacityPlanMapper.java
@@ -0,0 +1,62 @@
+package com.aps.core.mapper;
+
+import com.aps.core.domain.ApsGasPipelineCapacityPlan;
+
+import java.util.List;
+
+/**
+ * 姘斾綋绠¤矾浜ц兘瑙勫垝Mapper鎺ュ彛
+ * 
+ * @author hjy
+ * @date 2025-04-24
+ */
+public interface ApsGasPipelineCapacityPlanMapper 
+{
+    /**
+     * 鏌ヨ姘斾綋绠¤矾浜ц兘瑙勫垝
+     * 
+     * @param id 姘斾綋绠¤矾浜ц兘瑙勫垝涓婚敭
+     * @return 姘斾綋绠¤矾浜ц兘瑙勫垝
+     */
+    public ApsGasPipelineCapacityPlan selectApsGasPipelineCapacityPlanById(Long id);
+
+    /**
+     * 鏌ヨ姘斾綋绠¤矾浜ц兘瑙勫垝鍒楄〃
+     * 
+     * @param apsGasPipelineCapacityPlan 姘斾綋绠¤矾浜ц兘瑙勫垝
+     * @return 姘斾綋绠¤矾浜ц兘瑙勫垝闆嗗悎
+     */
+    public List<ApsGasPipelineCapacityPlan> selectApsGasPipelineCapacityPlanList(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan);
+
+    /**
+     * 鏂板姘斾綋绠¤矾浜ц兘瑙勫垝
+     * 
+     * @param apsGasPipelineCapacityPlan 姘斾綋绠¤矾浜ц兘瑙勫垝
+     * @return 缁撴灉
+     */
+    public int insertApsGasPipelineCapacityPlan(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan);
+
+    /**
+     * 淇敼姘斾綋绠¤矾浜ц兘瑙勫垝
+     * 
+     * @param apsGasPipelineCapacityPlan 姘斾綋绠¤矾浜ц兘瑙勫垝
+     * @return 缁撴灉
+     */
+    public int updateApsGasPipelineCapacityPlan(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan);
+
+    /**
+     * 鍒犻櫎姘斾綋绠¤矾浜ц兘瑙勫垝
+     * 
+     * @param id 姘斾綋绠¤矾浜ц兘瑙勫垝涓婚敭
+     * @return 缁撴灉
+     */
+    public int deleteApsGasPipelineCapacityPlanById(Long id);
+
+    /**
+     * 鎵归噺鍒犻櫎姘斾綋绠¤矾浜ц兘瑙勫垝
+     * 
+     * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    public int deleteApsGasPipelineCapacityPlanByIds(Long[] ids);
+}
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/IApsGasPipelineCapacityPlanService.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/IApsGasPipelineCapacityPlanService.java
new file mode 100644
index 0000000..cfb8e5b
--- /dev/null
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/IApsGasPipelineCapacityPlanService.java
@@ -0,0 +1,62 @@
+package com.aps.core.service;
+
+import com.aps.core.domain.ApsGasPipelineCapacityPlan;
+
+import java.util.List;
+
+/**
+ * 姘斾綋绠¤矾浜ц兘瑙勫垝Service鎺ュ彛
+ * 
+ * @author hjy
+ * @date 2025-04-24
+ */
+public interface IApsGasPipelineCapacityPlanService 
+{
+    /**
+     * 鏌ヨ姘斾綋绠¤矾浜ц兘瑙勫垝
+     * 
+     * @param id 姘斾綋绠¤矾浜ц兘瑙勫垝涓婚敭
+     * @return 姘斾綋绠¤矾浜ц兘瑙勫垝
+     */
+    public ApsGasPipelineCapacityPlan selectApsGasPipelineCapacityPlanById(Long id);
+
+    /**
+     * 鏌ヨ姘斾綋绠¤矾浜ц兘瑙勫垝鍒楄〃
+     * 
+     * @param apsGasPipelineCapacityPlan 姘斾綋绠¤矾浜ц兘瑙勫垝
+     * @return 姘斾綋绠¤矾浜ц兘瑙勫垝闆嗗悎
+     */
+    public List<ApsGasPipelineCapacityPlan> selectApsGasPipelineCapacityPlanList(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan);
+
+    /**
+     * 鏂板姘斾綋绠¤矾浜ц兘瑙勫垝
+     * 
+     * @param apsGasPipelineCapacityPlan 姘斾綋绠¤矾浜ц兘瑙勫垝
+     * @return 缁撴灉
+     */
+    public int insertApsGasPipelineCapacityPlan(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan);
+
+    /**
+     * 淇敼姘斾綋绠¤矾浜ц兘瑙勫垝
+     * 
+     * @param apsGasPipelineCapacityPlan 姘斾綋绠¤矾浜ц兘瑙勫垝
+     * @return 缁撴灉
+     */
+    public int updateApsGasPipelineCapacityPlan(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan);
+
+    /**
+     * 鎵归噺鍒犻櫎姘斾綋绠¤矾浜ц兘瑙勫垝
+     * 
+     * @param ids 闇�瑕佸垹闄ょ殑姘斾綋绠¤矾浜ц兘瑙勫垝涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    public int deleteApsGasPipelineCapacityPlanByIds(Long[] ids);
+
+    /**
+     * 鍒犻櫎姘斾綋绠¤矾浜ц兘瑙勫垝淇℃伅
+     * 
+     * @param id 姘斾綋绠¤矾浜ц兘瑙勫垝涓婚敭
+     * @return 缁撴灉
+     */
+    public int deleteApsGasPipelineCapacityPlanById(Long id);
+}
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelineCapacityPlanServiceImpl.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelineCapacityPlanServiceImpl.java
new file mode 100644
index 0000000..d11bd09
--- /dev/null
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelineCapacityPlanServiceImpl.java
@@ -0,0 +1,97 @@
+package com.aps.core.service.impl;
+
+import com.aps.common.core.utils.DateUtils;
+import com.aps.core.domain.ApsGasPipelineCapacityPlan;
+import com.aps.core.mapper.ApsGasPipelineCapacityPlanMapper;
+import com.aps.core.service.IApsGasPipelineCapacityPlanService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 姘斾綋绠¤矾浜ц兘瑙勫垝Service涓氬姟灞傚鐞�
+ * 
+ * @author hjy
+ * @date 2025-04-24
+ */
+@Service
+public class ApsGasPipelineCapacityPlanServiceImpl implements IApsGasPipelineCapacityPlanService 
+{
+    @Autowired
+    private ApsGasPipelineCapacityPlanMapper apsGasPipelineCapacityPlanMapper;
+
+    /**
+     * 鏌ヨ姘斾綋绠¤矾浜ц兘瑙勫垝
+     * 
+     * @param id 姘斾綋绠¤矾浜ц兘瑙勫垝涓婚敭
+     * @return 姘斾綋绠¤矾浜ц兘瑙勫垝
+     */
+    @Override
+    public ApsGasPipelineCapacityPlan selectApsGasPipelineCapacityPlanById(Long id)
+    {
+        return apsGasPipelineCapacityPlanMapper.selectApsGasPipelineCapacityPlanById(id);
+    }
+
+    /**
+     * 鏌ヨ姘斾綋绠¤矾浜ц兘瑙勫垝鍒楄〃
+     * 
+     * @param apsGasPipelineCapacityPlan 姘斾綋绠¤矾浜ц兘瑙勫垝
+     * @return 姘斾綋绠¤矾浜ц兘瑙勫垝
+     */
+    @Override
+    public List<ApsGasPipelineCapacityPlan> selectApsGasPipelineCapacityPlanList(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan)
+    {
+        return apsGasPipelineCapacityPlanMapper.selectApsGasPipelineCapacityPlanList(apsGasPipelineCapacityPlan);
+    }
+
+    /**
+     * 鏂板姘斾綋绠¤矾浜ц兘瑙勫垝
+     * 
+     * @param apsGasPipelineCapacityPlan 姘斾綋绠¤矾浜ц兘瑙勫垝
+     * @return 缁撴灉
+     */
+    @Override
+    public int insertApsGasPipelineCapacityPlan(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan)
+    {
+        apsGasPipelineCapacityPlan.setCreateTime(DateUtils.getNowDate());
+        return apsGasPipelineCapacityPlanMapper.insertApsGasPipelineCapacityPlan(apsGasPipelineCapacityPlan);
+    }
+
+    /**
+     * 淇敼姘斾綋绠¤矾浜ц兘瑙勫垝
+     * 
+     * @param apsGasPipelineCapacityPlan 姘斾綋绠¤矾浜ц兘瑙勫垝
+     * @return 缁撴灉
+     */
+    @Override
+    public int updateApsGasPipelineCapacityPlan(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan)
+    {
+        apsGasPipelineCapacityPlan.setUpdateTime(DateUtils.getNowDate());
+        return apsGasPipelineCapacityPlanMapper.updateApsGasPipelineCapacityPlan(apsGasPipelineCapacityPlan);
+    }
+
+    /**
+     * 鎵归噺鍒犻櫎姘斾綋绠¤矾浜ц兘瑙勫垝
+     * 
+     * @param ids 闇�瑕佸垹闄ょ殑姘斾綋绠¤矾浜ц兘瑙勫垝涓婚敭
+     * @return 缁撴灉
+     */
+    @Override
+    public int deleteApsGasPipelineCapacityPlanByIds(Long[] ids)
+    {
+        return apsGasPipelineCapacityPlanMapper.deleteApsGasPipelineCapacityPlanByIds(ids);
+    }
+
+    /**
+     * 鍒犻櫎姘斾綋绠¤矾浜ц兘瑙勫垝淇℃伅
+     * 
+     * @param id 姘斾綋绠¤矾浜ц兘瑙勫垝涓婚敭
+     * @return 缁撴灉
+     */
+    @Override
+    public int deleteApsGasPipelineCapacityPlanById(Long id)
+    {
+        return apsGasPipelineCapacityPlanMapper.deleteApsGasPipelineCapacityPlanById(id);
+    }
+}
diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsGasPipelineCapacityPlanMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsGasPipelineCapacityPlanMapper.xml
new file mode 100644
index 0000000..284bd03
--- /dev/null
+++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsGasPipelineCapacityPlanMapper.xml
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.aps.core.mapper.ApsGasPipelineCapacityPlanMapper">
+    
+    <resultMap type="ApsGasPipelineCapacityPlan" id="ApsGasPipelineCapacityPlanResult">
+        <result property="id"    column="id"    />
+        <result property="processName"    column="process_name"    />
+        <result property="year"    column="year"    />
+        <result property="month"    column="month"    />
+        <result property="major"    column="major"    />
+        <result property="dayProduceType"    column="day_produce_type"    />
+        <result property="dayProduceNum"    column="day_produce_num"    />
+        <result property="dayProduceUnit"    column="day_produce_unit"    />
+        <result property="personnelNumber"    column="personnel_number"    />
+        <result property="dayProduceAllNum"    column="day_produce_all_num"    />
+        <result property="days"    column="days"    />
+        <result property="monthProduceAllNum"    column="month_produce_all_num"    />
+        <result property="remark"    column="remark"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectApsGasPipelineCapacityPlanVo">
+        select id, process_name, year, month, major, day_produce_type, day_produce_num, day_produce_unit, personnel_number, day_produce_all_num, days, month_produce_all_num, remark, create_by, create_time, update_by, update_time from aps_gas_pipeline_capacity_plan
+    </sql>
+
+    <select id="selectApsGasPipelineCapacityPlanList" parameterType="ApsGasPipelineCapacityPlan" resultMap="ApsGasPipelineCapacityPlanResult">
+        <include refid="selectApsGasPipelineCapacityPlanVo"/>
+        <where>  
+            <if test="processName != null  and processName != ''"> and process_name like concat('%', #{processName}, '%')</if>
+            <if test="year != null  and year != ''"> and year = #{year}</if>
+            <if test="month != null  and month != ''"> and month = #{month}</if>
+            <if test="major != null  and major != ''"> and major = #{major}</if>
+            <if test="dayProduceType != null  and dayProduceType != ''"> and day_produce_type = #{dayProduceType}</if>
+            <if test="dayProduceNum != null "> and day_produce_num = #{dayProduceNum}</if>
+            <if test="dayProduceUnit != null  and dayProduceUnit != ''"> and day_produce_unit = #{dayProduceUnit}</if>
+            <if test="personnelNumber != null "> and personnel_number = #{personnelNumber}</if>
+            <if test="dayProduceAllNum != null "> and day_produce_all_num = #{dayProduceAllNum}</if>
+            <if test="days != null "> and days = #{days}</if>
+            <if test="monthProduceAllNum != null "> and month_produce_all_num = #{monthProduceAllNum}</if>
+        </where>
+    </select>
+    
+    <select id="selectApsGasPipelineCapacityPlanById" parameterType="Long" resultMap="ApsGasPipelineCapacityPlanResult">
+        <include refid="selectApsGasPipelineCapacityPlanVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertApsGasPipelineCapacityPlan" parameterType="ApsGasPipelineCapacityPlan">
+        insert into aps_gas_pipeline_capacity_plan
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="processName != null">process_name,</if>
+            <if test="year != null">year,</if>
+            <if test="month != null">month,</if>
+            <if test="major != null">major,</if>
+            <if test="dayProduceType != null">day_produce_type,</if>
+            <if test="dayProduceNum != null">day_produce_num,</if>
+            <if test="dayProduceUnit != null">day_produce_unit,</if>
+            <if test="personnelNumber != null">personnel_number,</if>
+            <if test="dayProduceAllNum != null">day_produce_all_num,</if>
+            <if test="days != null">days,</if>
+            <if test="monthProduceAllNum != null">month_produce_all_num,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="processName != null">#{processName},</if>
+            <if test="year != null">#{year},</if>
+            <if test="month != null">#{month},</if>
+            <if test="major != null">#{major},</if>
+            <if test="dayProduceType != null">#{dayProduceType},</if>
+            <if test="dayProduceNum != null">#{dayProduceNum},</if>
+            <if test="dayProduceUnit != null">#{dayProduceUnit},</if>
+            <if test="personnelNumber != null">#{personnelNumber},</if>
+            <if test="dayProduceAllNum != null">#{dayProduceAllNum},</if>
+            <if test="days != null">#{days},</if>
+            <if test="monthProduceAllNum != null">#{monthProduceAllNum},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateApsGasPipelineCapacityPlan" parameterType="ApsGasPipelineCapacityPlan">
+        update aps_gas_pipeline_capacity_plan
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="processName != null">process_name = #{processName},</if>
+            <if test="year != null">year = #{year},</if>
+            <if test="month != null">month = #{month},</if>
+            <if test="major != null">major = #{major},</if>
+            <if test="dayProduceType != null">day_produce_type = #{dayProduceType},</if>
+            <if test="dayProduceNum != null">day_produce_num = #{dayProduceNum},</if>
+            <if test="dayProduceUnit != null">day_produce_unit = #{dayProduceUnit},</if>
+            <if test="personnelNumber != null">personnel_number = #{personnelNumber},</if>
+            <if test="dayProduceAllNum != null">day_produce_all_num = #{dayProduceAllNum},</if>
+            <if test="days != null">days = #{days},</if>
+            <if test="monthProduceAllNum != null">month_produce_all_num = #{monthProduceAllNum},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteApsGasPipelineCapacityPlanById" parameterType="Long">
+        delete from aps_gas_pipeline_capacity_plan where id = #{id}
+    </delete>
+
+    <delete id="deleteApsGasPipelineCapacityPlanByIds" parameterType="String">
+        delete from aps_gas_pipeline_capacity_plan where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>
\ No newline at end of file

--
Gitblit v1.9.3