huangjiayang
2025-04-24 5ebd6188ee62841d1c96aef623bb1f8f13457395
【ADD】增加气体管路产能规划相关代码
已添加6个文件
722 ■■■■■ 文件已修改
aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsGasPipelineCapacityPlanController.java 150 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsGasPipelineCapacityPlan.java 223 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsGasPipelineCapacityPlanMapper.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/IApsGasPipelineCapacityPlanService.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelineCapacityPlanServiceImpl.java 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/resources/mapper/core/ApsGasPipelineCapacityPlanMapper.xml 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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));
    }
}
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();
    }
}
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);
}
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);
}
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);
    }
}
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>