aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsGasPipelineCapacityPlanController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsGasPipelineCapacityPlan.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsGasPipelineCapacityPlanMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
aps-modules/aps-core/src/main/java/com/aps/core/service/IApsGasPipelineCapacityPlanService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelineCapacityPlanServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
aps-modules/aps-core/src/main/resources/mapper/core/ApsGasPipelineCapacityPlanMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | 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>