Ver código fonte

新增部分接口 字段调整

王苗苗 7 meses atrás
pai
commit
b85af909ca

+ 71 - 0
slibra-admin/src/main/java/com/slibra/web/controller/business/FrontController.java

@@ -2,28 +2,37 @@ package com.slibra.web.controller.business;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONWriter;
+import com.slibra.business.domain.TXinyiCarbonMajor;
 import com.slibra.business.domain.TXinyiChatRecord;
 import com.slibra.business.domain.TXinyiWarningRecord;
 import com.slibra.business.mapper.*;
 import com.slibra.business.req.ChatReq;
 import com.slibra.business.req.WorkOrderReq;
 import com.slibra.business.service.IFrontService;
+import com.slibra.business.service.ITXinyiCarbonMajorService;
 import com.slibra.common.DecimalUtils;
+import com.slibra.common.annotation.Log;
 import com.slibra.common.constant.MyConstants;
 import com.slibra.common.core.controller.BaseController;
 import com.slibra.common.core.domain.AjaxResult;
+import com.slibra.common.core.domain.R;
 import com.slibra.common.core.page.TableDataInfo;
 import com.slibra.common.enums.BusinessEnum;
+import com.slibra.common.enums.BusinessType;
 import com.slibra.common.exception.ServiceException;
 import com.slibra.common.utils.DateUtils;
 import com.slibra.common.utils.SecurityUtils;
 import com.slibra.common.utils.StringUtils;
+import com.slibra.common.utils.poi.ExcelUtil;
 import com.slibra.common.utils.uuid.IdUtils;
 import lombok.extern.slf4j.Slf4j;
+import org.checkerframework.checker.units.qual.A;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletResponse;
 import java.math.BigDecimal;
 import java.util.Comparator;
 import java.util.Date;
@@ -58,6 +67,12 @@ public class FrontController extends BaseController {
     @Autowired
     private TXinyiIndustryMapper xinyiIndustryMapper;
 
+    @Autowired
+    private TXinyiCarbonMajorMapper xinyiCarbonMajorMapper;
+
+    @Autowired
+    private ITXinyiCarbonMajorService tXinyiCarbonMajorService;
+
 
 
     /**
@@ -459,6 +474,62 @@ public class FrontController extends BaseController {
     }
 
 
+
+    //--------------------下面是碳排放智能体相关的方法--------------------begin
+
+    /**
+     * 碳排放智能体-获取所有的填写的月份
+     * @return
+     */
+    @GetMapping("/bigModel/carbonSmart/allMonths")
+    public R<List<String>> allMonths()
+    {
+        log.info("进入了 碳排放智能体-获取所有的填写的月份 接口");
+        return R.ok(xinyiCarbonMajorMapper.allMonths());
+    }
+
+
+
+    /**
+     * 通过月份获取碳排放主详细信息
+     */
+    @GetMapping(value = "/bigModel/carbonSmart/getCarbonDetailsByMonth/{month}")
+    public R<TXinyiCarbonMajor> getCarbonDetailsByMonth(@PathVariable("month") String month)
+    {
+        return R.ok(tXinyiCarbonMajorService.getCarbonDetailsByMonth(month));
+    }
+
+
+    /**
+     * 查询碳排放主列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(TXinyiCarbonMajor tXinyiCarbonMajor)
+    {
+        startPage();
+        List<TXinyiCarbonMajor> list = tXinyiCarbonMajorService.selectTXinyiCarbonMajorList(tXinyiCarbonMajor);
+        return getDataTable(list);
+    }
+
+
+
+
+    /**
+     * 新增碳排放主
+     */
+    @Log(title = "碳排放主", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TXinyiCarbonMajor tXinyiCarbonMajor)
+    {
+        tXinyiCarbonMajor.setCreateBy(getUsername());
+        return toAjax(tXinyiCarbonMajorService.insertTXinyiCarbonMajor(tXinyiCarbonMajor));
+    }
+
+
+
+
+    //--------------------上面是碳排放智能体相关的方法--------------------end
+
     //--------------------下面是测试的方法--------------------
     /*@GetMapping("/test/data")
     public void testData(){

+ 33 - 814
slibra-system/src/main/java/com/slibra/business/domain/TXinyiCarbonMajor.java

@@ -1,6 +1,11 @@
 package com.slibra.business.domain;
 
 import java.math.BigDecimal;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.slibra.common.annotation.Excel;
@@ -8,10 +13,14 @@ import com.slibra.common.core.domain.BaseEntity;
 
 /**
  * 碳排放主对象 t_xinyi_carbon_major
- * 
+ *
  * @author slibra
  * @date 2024-08-24
  */
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
 public class TXinyiCarbonMajor extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
@@ -21,7 +30,7 @@ public class TXinyiCarbonMajor extends BaseEntity
 
     /** 所属水厂 */
     @Excel(name = "所属水厂")
-    private String owner;
+    private String addOwner;
 
     /** 省市ID */
     @Excel(name = "省市ID")
@@ -33,11 +42,11 @@ public class TXinyiCarbonMajor extends BaseEntity
 
     /** 所属年份(2024) */
     @Excel(name = "所属年份", readConverterExp = "2=024")
-    private String year;
+    private String addYear;
 
     /** 所属年月(2024-02) */
     @Excel(name = "所属年月", readConverterExp = "2=024-02")
-    private String yearMonth;
+    private String addYearMonth;
 
     /** 污水处理-化石源碳矿化产生的碳排放量-月处理水量 */
     @Excel(name = "污水处理-化石源碳矿化产生的碳排放量-月处理水量")
@@ -327,6 +336,26 @@ public class TXinyiCarbonMajor extends BaseEntity
     @Excel(name = "替碳、碳汇-污泥经过厌氧、好氧或碳化处理后,产生的替碳量-污泥产物土地利用的替碳量", readConverterExp = "t=,C=O₂-eq/月")
     private BigDecimal thWnClhCo2;
 
+    /** 污水处理碳排放量 */
+    @Excel(name = "污水处理碳排放量")
+    private BigDecimal wsclTotalCo2;
+
+    /** 能源、药剂碳排量 */
+    @Excel(name = "能源、药剂碳排量")
+    private BigDecimal nyyjTotalCo2;
+
+    /** 污泥处理碳排量 */
+    @Excel(name = "污泥处理碳排量")
+    private BigDecimal wnclTotalCo2;
+
+    /** 替碳、碳汇替碳量 */
+    @Excel(name = "替碳、碳汇替碳量")
+    private BigDecimal ttthTotalCo2;
+
+    /** 总碳排放量 */
+    @Excel(name = "总碳排放量")
+    private BigDecimal ztTotalCo2;
+
     /** 删除标志(0代表存在 2代表删除) */
     private Long delFlag;
 
@@ -334,814 +363,4 @@ public class TXinyiCarbonMajor extends BaseEntity
     @Excel(name = "乐观锁")
     private Long revision;
 
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
-
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setOwner(String owner) 
-    {
-        this.owner = owner;
-    }
-
-    public String getOwner() 
-    {
-        return owner;
-    }
-    public void setProvinceId(Long provinceId) 
-    {
-        this.provinceId = provinceId;
-    }
-
-    public Long getProvinceId() 
-    {
-        return provinceId;
-    }
-    public void setProvinceName(String provinceName) 
-    {
-        this.provinceName = provinceName;
-    }
-
-    public String getProvinceName() 
-    {
-        return provinceName;
-    }
-    public void setYear(String year) 
-    {
-        this.year = year;
-    }
-
-    public String getYear() 
-    {
-        return year;
-    }
-    public void setYearMonth(String yearMonth) 
-    {
-        this.yearMonth = yearMonth;
-    }
-
-    public String getYearMonth() 
-    {
-        return yearMonth;
-    }
-    public void setWsHsytkhClsl(BigDecimal wsHsytkhClsl) 
-    {
-        this.wsHsytkhClsl = wsHsytkhClsl;
-    }
-
-    public BigDecimal getWsHsytkhClsl() 
-    {
-        return wsHsytkhClsl;
-    }
-    public void setWsHsytkhJsCod(BigDecimal wsHsytkhJsCod) 
-    {
-        this.wsHsytkhJsCod = wsHsytkhJsCod;
-    }
-
-    public BigDecimal getWsHsytkhJsCod() 
-    {
-        return wsHsytkhJsCod;
-    }
-    public void setWsHsytkhCsCod(BigDecimal wsHsytkhCsCod) 
-    {
-        this.wsHsytkhCsCod = wsHsytkhCsCod;
-    }
-
-    public BigDecimal getWsHsytkhCsCod() 
-    {
-        return wsHsytkhCsCod;
-    }
-    public void setWsHsytkhCo2(BigDecimal wsHsytkhCo2) 
-    {
-        this.wsHsytkhCo2 = wsHsytkhCo2;
-    }
-
-    public BigDecimal getWsHsytkhCo2() 
-    {
-        return wsHsytkhCo2;
-    }
-    public void setWsSjclCh4Clsl(BigDecimal wsSjclCh4Clsl) 
-    {
-        this.wsSjclCh4Clsl = wsSjclCh4Clsl;
-    }
-
-    public BigDecimal getWsSjclCh4Clsl() 
-    {
-        return wsSjclCh4Clsl;
-    }
-    public void setWsSjclCh4JsCod(BigDecimal wsSjclCh4JsCod) 
-    {
-        this.wsSjclCh4JsCod = wsSjclCh4JsCod;
-    }
-
-    public BigDecimal getWsSjclCh4JsCod() 
-    {
-        return wsSjclCh4JsCod;
-    }
-    public void setWsSjclCh4CsCod(BigDecimal wsSjclCh4CsCod) 
-    {
-        this.wsSjclCh4CsCod = wsSjclCh4CsCod;
-    }
-
-    public BigDecimal getWsSjclCh4CsCod() 
-    {
-        return wsSjclCh4CsCod;
-    }
-    public void setWsSjclCh4Pfyz(BigDecimal wsSjclCh4Pfyz) 
-    {
-        this.wsSjclCh4Pfyz = wsSjclCh4Pfyz;
-    }
-
-    public BigDecimal getWsSjclCh4Pfyz() 
-    {
-        return wsSjclCh4Pfyz;
-    }
-    public void setWsSjclCh4Tsb(BigDecimal wsSjclCh4Tsb) 
-    {
-        this.wsSjclCh4Tsb = wsSjclCh4Tsb;
-    }
-
-    public BigDecimal getWsSjclCh4Tsb() 
-    {
-        return wsSjclCh4Tsb;
-    }
-    public void setWsSjclCh4Csc(BigDecimal wsSjclCh4Csc) 
-    {
-        this.wsSjclCh4Csc = wsSjclCh4Csc;
-    }
-
-    public BigDecimal getWsSjclCh4Csc() 
-    {
-        return wsSjclCh4Csc;
-    }
-    public void setWsSjclCh4Co2(BigDecimal wsSjclCh4Co2) 
-    {
-        this.wsSjclCh4Co2 = wsSjclCh4Co2;
-    }
-
-    public BigDecimal getWsSjclCh4Co2() 
-    {
-        return wsSjclCh4Co2;
-    }
-    public void setWsTdN2oClsl(BigDecimal wsTdN2oClsl) 
-    {
-        this.wsTdN2oClsl = wsTdN2oClsl;
-    }
-
-    public BigDecimal getWsTdN2oClsl() 
-    {
-        return wsTdN2oClsl;
-    }
-    public void setWsTdN2oJsTn(BigDecimal wsTdN2oJsTn) 
-    {
-        this.wsTdN2oJsTn = wsTdN2oJsTn;
-    }
-
-    public BigDecimal getWsTdN2oJsTn() 
-    {
-        return wsTdN2oJsTn;
-    }
-    public void setWsTdN2oCsTn(BigDecimal wsTdN2oCsTn) 
-    {
-        this.wsTdN2oCsTn = wsTdN2oCsTn;
-    }
-
-    public BigDecimal getWsTdN2oCsTn() 
-    {
-        return wsTdN2oCsTn;
-    }
-    public void setWsTdN2oPfyz(BigDecimal wsTdN2oPfyz) 
-    {
-        this.wsTdN2oPfyz = wsTdN2oPfyz;
-    }
-
-    public BigDecimal getWsTdN2oPfyz() 
-    {
-        return wsTdN2oPfyz;
-    }
-    public void setWsTdN2oCo2(BigDecimal wsTdN2oCo2) 
-    {
-        this.wsTdN2oCo2 = wsTdN2oCo2;
-    }
-
-    public BigDecimal getWsTdN2oCo2() 
-    {
-        return wsTdN2oCo2;
-    }
-    public void setNyyjDlxhZhdl(BigDecimal nyyjDlxhZhdl) 
-    {
-        this.nyyjDlxhZhdl = nyyjDlxhZhdl;
-    }
-
-    public BigDecimal getNyyjDlxhZhdl() 
-    {
-        return nyyjDlxhZhdl;
-    }
-    public void setNyyjDlxhZhdlCo2(BigDecimal nyyjDlxhZhdlCo2) 
-    {
-        this.nyyjDlxhZhdlCo2 = nyyjDlxhZhdlCo2;
-    }
-
-    public BigDecimal getNyyjDlxhZhdlCo2() 
-    {
-        return nyyjDlxhZhdlCo2;
-    }
-    public void setNyyjDlxhJsbf(BigDecimal nyyjDlxhJsbf) 
-    {
-        this.nyyjDlxhJsbf = nyyjDlxhJsbf;
-    }
-
-    public BigDecimal getNyyjDlxhJsbf() 
-    {
-        return nyyjDlxhJsbf;
-    }
-    public void setNyyjDlxhJsbfCo2(BigDecimal nyyjDlxhJsbfCo2) 
-    {
-        this.nyyjDlxhJsbfCo2 = nyyjDlxhJsbfCo2;
-    }
-
-    public BigDecimal getNyyjDlxhJsbfCo2() 
-    {
-        return nyyjDlxhJsbfCo2;
-    }
-    public void setNyyjDlxhGfjf(BigDecimal nyyjDlxhGfjf) 
-    {
-        this.nyyjDlxhGfjf = nyyjDlxhGfjf;
-    }
-
-    public BigDecimal getNyyjDlxhGfjf() 
-    {
-        return nyyjDlxhGfjf;
-    }
-    public void setNyyjDlxhGfjfCo2(BigDecimal nyyjDlxhGfjfCo2) 
-    {
-        this.nyyjDlxhGfjfCo2 = nyyjDlxhGfjfCo2;
-    }
-
-    public BigDecimal getNyyjDlxhGfjfCo2() 
-    {
-        return nyyjDlxhGfjfCo2;
-    }
-    public void setNyyjDlxhTsjf(BigDecimal nyyjDlxhTsjf) 
-    {
-        this.nyyjDlxhTsjf = nyyjDlxhTsjf;
-    }
-
-    public BigDecimal getNyyjDlxhTsjf() 
-    {
-        return nyyjDlxhTsjf;
-    }
-    public void setNyyjDlxhTsjfCo2(BigDecimal nyyjDlxhTsjfCo2) 
-    {
-        this.nyyjDlxhTsjfCo2 = nyyjDlxhTsjfCo2;
-    }
-
-    public BigDecimal getNyyjDlxhTsjfCo2() 
-    {
-        return nyyjDlxhTsjfCo2;
-    }
-    public void setNyyjDlxhXdj(BigDecimal nyyjDlxhXdj) 
-    {
-        this.nyyjDlxhXdj = nyyjDlxhXdj;
-    }
-
-    public BigDecimal getNyyjDlxhXdj() 
-    {
-        return nyyjDlxhXdj;
-    }
-    public void setNyyjDlxhXdjCo2(BigDecimal nyyjDlxhXdjCo2) 
-    {
-        this.nyyjDlxhXdjCo2 = nyyjDlxhXdjCo2;
-    }
-
-    public BigDecimal getNyyjDlxhXdjCo2() 
-    {
-        return nyyjDlxhXdjCo2;
-    }
-    public void setNyyjDlxhSdcl(BigDecimal nyyjDlxhSdcl) 
-    {
-        this.nyyjDlxhSdcl = nyyjDlxhSdcl;
-    }
-
-    public BigDecimal getNyyjDlxhSdcl() 
-    {
-        return nyyjDlxhSdcl;
-    }
-    public void setNyyjDlxhSdclCo2(BigDecimal nyyjDlxhSdclCo2) 
-    {
-        this.nyyjDlxhSdclCo2 = nyyjDlxhSdclCo2;
-    }
-
-    public BigDecimal getNyyjDlxhSdclCo2() 
-    {
-        return nyyjDlxhSdclCo2;
-    }
-    public void setNyyjDlxhWncz(BigDecimal nyyjDlxhWncz) 
-    {
-        this.nyyjDlxhWncz = nyyjDlxhWncz;
-    }
-
-    public BigDecimal getNyyjDlxhWncz() 
-    {
-        return nyyjDlxhWncz;
-    }
-    public void setNyyjDlxhWnczCo2(BigDecimal nyyjDlxhWnczCo2) 
-    {
-        this.nyyjDlxhWnczCo2 = nyyjDlxhWnczCo2;
-    }
-
-    public BigDecimal getNyyjDlxhWnczCo2() 
-    {
-        return nyyjDlxhWnczCo2;
-    }
-    public void setNyyjDlxhShq(BigDecimal nyyjDlxhShq) 
-    {
-        this.nyyjDlxhShq = nyyjDlxhShq;
-    }
-
-    public BigDecimal getNyyjDlxhShq() 
-    {
-        return nyyjDlxhShq;
-    }
-    public void setNyyjDlxhShqCo2(BigDecimal nyyjDlxhShqCo2) 
-    {
-        this.nyyjDlxhShqCo2 = nyyjDlxhShqCo2;
-    }
-
-    public BigDecimal getNyyjDlxhShqCo2() 
-    {
-        return nyyjDlxhShqCo2;
-    }
-    public void setNyyjDlxhQt(BigDecimal nyyjDlxhQt) 
-    {
-        this.nyyjDlxhQt = nyyjDlxhQt;
-    }
-
-    public BigDecimal getNyyjDlxhQt() 
-    {
-        return nyyjDlxhQt;
-    }
-    public void setNyyjDlxhQtCo2(BigDecimal nyyjDlxhQtCo2) 
-    {
-        this.nyyjDlxhQtCo2 = nyyjDlxhQtCo2;
-    }
-
-    public BigDecimal getNyyjDlxhQtCo2() 
-    {
-        return nyyjDlxhQtCo2;
-    }
-    public void setNyyjGrrlZq(BigDecimal nyyjGrrlZq) 
-    {
-        this.nyyjGrrlZq = nyyjGrrlZq;
-    }
-
-    public BigDecimal getNyyjGrrlZq() 
-    {
-        return nyyjGrrlZq;
-    }
-    public void setNyyjGrrlDyhz(BigDecimal nyyjGrrlDyhz) 
-    {
-        this.nyyjGrrlDyhz = nyyjGrrlDyhz;
-    }
-
-    public BigDecimal getNyyjGrrlDyhz() 
-    {
-        return nyyjGrrlDyhz;
-    }
-    public void setNyyjGrrlRl(BigDecimal nyyjGrrlRl) 
-    {
-        this.nyyjGrrlRl = nyyjGrrlRl;
-    }
-
-    public BigDecimal getNyyjGrrlRl() 
-    {
-        return nyyjGrrlRl;
-    }
-    public void setNyyjGrrlCo2(BigDecimal nyyjGrrlCo2) 
-    {
-        this.nyyjGrrlCo2 = nyyjGrrlCo2;
-    }
-
-    public BigDecimal getNyyjGrrlCo2() 
-    {
-        return nyyjGrrlCo2;
-    }
-    public void setWnclYyzqZqcl(BigDecimal wnclYyzqZqcl) 
-    {
-        this.wnclYyzqZqcl = wnclYyzqZqcl;
-    }
-
-    public BigDecimal getWnclYyzqZqcl() 
-    {
-        return wnclYyzqZqcl;
-    }
-    public void setWnclYyzqChZlfs(BigDecimal wnclYyzqChZlfs) 
-    {
-        this.wnclYyzqChZlfs = wnclYyzqChZlfs;
-    }
-
-    public BigDecimal getWnclYyzqChZlfs() 
-    {
-        return wnclYyzqChZlfs;
-    }
-    public void setWnclYyzqCo2(BigDecimal wnclYyzqCo2) 
-    {
-        this.wnclYyzqCo2 = wnclYyzqCo2;
-    }
-
-    public BigDecimal getWnclYyzqCo2() 
-    {
-        return wnclYyzqCo2;
-    }
-    public void setWnclDdclZycll(BigDecimal wnclDdclZycll) 
-    {
-        this.wnclDdclZycll = wnclDdclZycll;
-    }
-
-    public BigDecimal getWnclDdclZycll() 
-    {
-        return wnclDdclZycll;
-    }
-    public void setWnclDdclClqnd(BigDecimal wnclDdclClqnd) 
-    {
-        this.wnclDdclClqnd = wnclDdclClqnd;
-    }
-
-    public BigDecimal getWnclDdclClqnd() 
-    {
-        return wnclDdclClqnd;
-    }
-    public void setWnclDdclClhnd(BigDecimal wnclDdclClhnd) 
-    {
-        this.wnclDdclClhnd = wnclDdclClhnd;
-    }
-
-    public BigDecimal getWnclDdclClhnd() 
-    {
-        return wnclDdclClhnd;
-    }
-    public void setWnclDdclPfyz(BigDecimal wnclDdclPfyz) 
-    {
-        this.wnclDdclPfyz = wnclDdclPfyz;
-    }
-
-    public BigDecimal getWnclDdclPfyz() 
-    {
-        return wnclDdclPfyz;
-    }
-    public void setWnclDdclCo2(BigDecimal wnclDdclCo2) 
-    {
-        this.wnclDdclCo2 = wnclDdclCo2;
-    }
-
-    public BigDecimal getWnclDdclCo2() 
-    {
-        return wnclDdclCo2;
-    }
-    public void setWnclHyfjFjl(BigDecimal wnclHyfjFjl) 
-    {
-        this.wnclHyfjFjl = wnclHyfjFjl;
-    }
-
-    public BigDecimal getWnclHyfjFjl() 
-    {
-        return wnclHyfjFjl;
-    }
-    public void setWnclHyfjCh4Co2(BigDecimal wnclHyfjCh4Co2) 
-    {
-        this.wnclHyfjCh4Co2 = wnclHyfjCh4Co2;
-    }
-
-    public BigDecimal getWnclHyfjCh4Co2() 
-    {
-        return wnclHyfjCh4Co2;
-    }
-    public void setWnclHyfjN2oCo2(BigDecimal wnclHyfjN2oCo2) 
-    {
-        this.wnclHyfjN2oCo2 = wnclHyfjN2oCo2;
-    }
-
-    public BigDecimal getWnclHyfjN2oCo2() 
-    {
-        return wnclHyfjN2oCo2;
-    }
-    public void setWnclWnfsXhl(BigDecimal wnclWnfsXhl) 
-    {
-        this.wnclWnfsXhl = wnclWnfsXhl;
-    }
-
-    public BigDecimal getWnclWnfsXhl() 
-    {
-        return wnclWnfsXhl;
-    }
-    public void setWnclWnfsHtbl(BigDecimal wnclWnfsHtbl) 
-    {
-        this.wnclWnfsHtbl = wnclWnfsHtbl;
-    }
-
-    public BigDecimal getWnclWnfsHtbl() 
-    {
-        return wnclWnfsHtbl;
-    }
-    public void setWnclWnfsCo2(BigDecimal wnclWnfsCo2) 
-    {
-        this.wnclWnfsCo2 = wnclWnfsCo2;
-    }
-
-    public BigDecimal getWnclWnfsCo2() 
-    {
-        return wnclWnfsCo2;
-    }
-    public void setWnclBwqrsRslx(BigDecimal wnclBwqrsRslx) 
-    {
-        this.wnclBwqrsRslx = wnclBwqrsRslx;
-    }
-
-    public BigDecimal getWnclBwqrsRslx() 
-    {
-        return wnclBwqrsRslx;
-    }
-    public void setWnclBwqrsFsl(BigDecimal wnclBwqrsFsl) 
-    {
-        this.wnclBwqrsFsl = wnclBwqrsFsl;
-    }
-
-    public BigDecimal getWnclBwqrsFsl() 
-    {
-        return wnclBwqrsFsl;
-    }
-    public void setWnclBwqrsPfyz(BigDecimal wnclBwqrsPfyz) 
-    {
-        this.wnclBwqrsPfyz = wnclBwqrsPfyz;
-    }
-
-    public BigDecimal getWnclBwqrsPfyz() 
-    {
-        return wnclBwqrsPfyz;
-    }
-    public void setWnclBwqrsCh4Co2(BigDecimal wnclBwqrsCh4Co2) 
-    {
-        this.wnclBwqrsCh4Co2 = wnclBwqrsCh4Co2;
-    }
-
-    public BigDecimal getWnclBwqrsCh4Co2() 
-    {
-        return wnclBwqrsCh4Co2;
-    }
-    public void setWnclBwqrsN2oCo2(BigDecimal wnclBwqrsN2oCo2) 
-    {
-        this.wnclBwqrsN2oCo2 = wnclBwqrsN2oCo2;
-    }
-
-    public BigDecimal getWnclBwqrsN2oCo2() 
-    {
-        return wnclBwqrsN2oCo2;
-    }
-    public void setWnclWnrjByhXhl(BigDecimal wnclWnrjByhXhl) 
-    {
-        this.wnclWnrjByhXhl = wnclWnrjByhXhl;
-    }
-
-    public BigDecimal getWnclWnrjByhXhl() 
-    {
-        return wnclWnrjByhXhl;
-    }
-    public void setWnclWnrjByhHtbl(BigDecimal wnclWnrjByhHtbl) 
-    {
-        this.wnclWnrjByhHtbl = wnclWnrjByhHtbl;
-    }
-
-    public BigDecimal getWnclWnrjByhHtbl() 
-    {
-        return wnclWnrjByhHtbl;
-    }
-    public void setWnclWnrjByhCo2(BigDecimal wnclWnrjByhCo2) 
-    {
-        this.wnclWnrjByhCo2 = wnclWnrjByhCo2;
-    }
-
-    public BigDecimal getWnclWnrjByhCo2() 
-    {
-        return wnclWnrjByhCo2;
-    }
-    public void setWnclWnrjQtLx(BigDecimal wnclWnrjQtLx) 
-    {
-        this.wnclWnrjQtLx = wnclWnrjQtLx;
-    }
-
-    public BigDecimal getWnclWnrjQtLx() 
-    {
-        return wnclWnrjQtLx;
-    }
-    public void setWnclWnrjQtXhl(BigDecimal wnclWnrjQtXhl) 
-    {
-        this.wnclWnrjQtXhl = wnclWnrjQtXhl;
-    }
-
-    public BigDecimal getWnclWnrjQtXhl() 
-    {
-        return wnclWnrjQtXhl;
-    }
-    public void setWnclWnrjQtPfyz(BigDecimal wnclWnrjQtPfyz) 
-    {
-        this.wnclWnrjQtPfyz = wnclWnrjQtPfyz;
-    }
-
-    public BigDecimal getWnclWnrjQtPfyz() 
-    {
-        return wnclWnrjQtPfyz;
-    }
-    public void setWnclWnrjQtCh4Co2(BigDecimal wnclWnrjQtCh4Co2) 
-    {
-        this.wnclWnrjQtCh4Co2 = wnclWnrjQtCh4Co2;
-    }
-
-    public BigDecimal getWnclWnrjQtCh4Co2() 
-    {
-        return wnclWnrjQtCh4Co2;
-    }
-    public void setWnclWnrjQtN2oCo2(BigDecimal wnclWnrjQtN2oCo2) 
-    {
-        this.wnclWnrjQtN2oCo2 = wnclWnrjQtN2oCo2;
-    }
-
-    public BigDecimal getWnclWnrjQtN2oCo2() 
-    {
-        return wnclWnrjQtN2oCo2;
-    }
-    public void setThGfZhdl(BigDecimal thGfZhdl) 
-    {
-        this.thGfZhdl = thGfZhdl;
-    }
-
-    public BigDecimal getThGfZhdl() 
-    {
-        return thGfZhdl;
-    }
-    public void setThGfCo2(BigDecimal thGfCo2) 
-    {
-        this.thGfCo2 = thGfCo2;
-    }
-
-    public BigDecimal getThGfCo2() 
-    {
-        return thGfCo2;
-    }
-    public void setThZssScgm(BigDecimal thZssScgm) 
-    {
-        this.thZssScgm = thZssScgm;
-    }
-
-    public BigDecimal getThZssScgm() 
-    {
-        return thZssScgm;
-    }
-    public void setThZssGyl(BigDecimal thZssGyl) 
-    {
-        this.thZssGyl = thZssGyl;
-    }
-
-    public BigDecimal getThZssGyl() 
-    {
-        return thZssGyl;
-    }
-    public void setThZssCo2(BigDecimal thZssCo2) 
-    {
-        this.thZssCo2 = thZssCo2;
-    }
-
-    public BigDecimal getThZssCo2() 
-    {
-        return thZssCo2;
-    }
-    public void setThWnClhFlwnl(BigDecimal thWnClhFlwnl) 
-    {
-        this.thWnClhFlwnl = thWnClhFlwnl;
-    }
-
-    public BigDecimal getThWnClhFlwnl() 
-    {
-        return thWnClhFlwnl;
-    }
-    public void setThWnClhCo2(BigDecimal thWnClhCo2) 
-    {
-        this.thWnClhCo2 = thWnClhCo2;
-    }
-
-    public BigDecimal getThWnClhCo2() 
-    {
-        return thWnClhCo2;
-    }
-    public void setDelFlag(Long delFlag) 
-    {
-        this.delFlag = delFlag;
-    }
-
-    public Long getDelFlag() 
-    {
-        return delFlag;
-    }
-    public void setRevision(Long revision) 
-    {
-        this.revision = revision;
-    }
-
-    public Long getRevision() 
-    {
-        return revision;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("owner", getOwner())
-            .append("provinceId", getProvinceId())
-            .append("provinceName", getProvinceName())
-            .append("year", getYear())
-            .append("yearMonth", getYearMonth())
-            .append("wsHsytkhClsl", getWsHsytkhClsl())
-            .append("wsHsytkhJsCod", getWsHsytkhJsCod())
-            .append("wsHsytkhCsCod", getWsHsytkhCsCod())
-            .append("wsHsytkhCo2", getWsHsytkhCo2())
-            .append("wsSjclCh4Clsl", getWsSjclCh4Clsl())
-            .append("wsSjclCh4JsCod", getWsSjclCh4JsCod())
-            .append("wsSjclCh4CsCod", getWsSjclCh4CsCod())
-            .append("wsSjclCh4Pfyz", getWsSjclCh4Pfyz())
-            .append("wsSjclCh4Tsb", getWsSjclCh4Tsb())
-            .append("wsSjclCh4Csc", getWsSjclCh4Csc())
-            .append("wsSjclCh4Co2", getWsSjclCh4Co2())
-            .append("wsTdN2oClsl", getWsTdN2oClsl())
-            .append("wsTdN2oJsTn", getWsTdN2oJsTn())
-            .append("wsTdN2oCsTn", getWsTdN2oCsTn())
-            .append("wsTdN2oPfyz", getWsTdN2oPfyz())
-            .append("wsTdN2oCo2", getWsTdN2oCo2())
-            .append("nyyjDlxhZhdl", getNyyjDlxhZhdl())
-            .append("nyyjDlxhZhdlCo2", getNyyjDlxhZhdlCo2())
-            .append("nyyjDlxhJsbf", getNyyjDlxhJsbf())
-            .append("nyyjDlxhJsbfCo2", getNyyjDlxhJsbfCo2())
-            .append("nyyjDlxhGfjf", getNyyjDlxhGfjf())
-            .append("nyyjDlxhGfjfCo2", getNyyjDlxhGfjfCo2())
-            .append("nyyjDlxhTsjf", getNyyjDlxhTsjf())
-            .append("nyyjDlxhTsjfCo2", getNyyjDlxhTsjfCo2())
-            .append("nyyjDlxhXdj", getNyyjDlxhXdj())
-            .append("nyyjDlxhXdjCo2", getNyyjDlxhXdjCo2())
-            .append("nyyjDlxhSdcl", getNyyjDlxhSdcl())
-            .append("nyyjDlxhSdclCo2", getNyyjDlxhSdclCo2())
-            .append("nyyjDlxhWncz", getNyyjDlxhWncz())
-            .append("nyyjDlxhWnczCo2", getNyyjDlxhWnczCo2())
-            .append("nyyjDlxhShq", getNyyjDlxhShq())
-            .append("nyyjDlxhShqCo2", getNyyjDlxhShqCo2())
-            .append("nyyjDlxhQt", getNyyjDlxhQt())
-            .append("nyyjDlxhQtCo2", getNyyjDlxhQtCo2())
-            .append("nyyjGrrlZq", getNyyjGrrlZq())
-            .append("nyyjGrrlDyhz", getNyyjGrrlDyhz())
-            .append("nyyjGrrlRl", getNyyjGrrlRl())
-            .append("nyyjGrrlCo2", getNyyjGrrlCo2())
-            .append("wnclYyzqZqcl", getWnclYyzqZqcl())
-            .append("wnclYyzqChZlfs", getWnclYyzqChZlfs())
-            .append("wnclYyzqCo2", getWnclYyzqCo2())
-            .append("wnclDdclZycll", getWnclDdclZycll())
-            .append("wnclDdclClqnd", getWnclDdclClqnd())
-            .append("wnclDdclClhnd", getWnclDdclClhnd())
-            .append("wnclDdclPfyz", getWnclDdclPfyz())
-            .append("wnclDdclCo2", getWnclDdclCo2())
-            .append("wnclHyfjFjl", getWnclHyfjFjl())
-            .append("wnclHyfjCh4Co2", getWnclHyfjCh4Co2())
-            .append("wnclHyfjN2oCo2", getWnclHyfjN2oCo2())
-            .append("wnclWnfsXhl", getWnclWnfsXhl())
-            .append("wnclWnfsHtbl", getWnclWnfsHtbl())
-            .append("wnclWnfsCo2", getWnclWnfsCo2())
-            .append("wnclBwqrsRslx", getWnclBwqrsRslx())
-            .append("wnclBwqrsFsl", getWnclBwqrsFsl())
-            .append("wnclBwqrsPfyz", getWnclBwqrsPfyz())
-            .append("wnclBwqrsCh4Co2", getWnclBwqrsCh4Co2())
-            .append("wnclBwqrsN2oCo2", getWnclBwqrsN2oCo2())
-            .append("wnclWnrjByhXhl", getWnclWnrjByhXhl())
-            .append("wnclWnrjByhHtbl", getWnclWnrjByhHtbl())
-            .append("wnclWnrjByhCo2", getWnclWnrjByhCo2())
-            .append("wnclWnrjQtLx", getWnclWnrjQtLx())
-            .append("wnclWnrjQtXhl", getWnclWnrjQtXhl())
-            .append("wnclWnrjQtPfyz", getWnclWnrjQtPfyz())
-            .append("wnclWnrjQtCh4Co2", getWnclWnrjQtCh4Co2())
-            .append("wnclWnrjQtN2oCo2", getWnclWnrjQtN2oCo2())
-            .append("thGfZhdl", getThGfZhdl())
-            .append("thGfCo2", getThGfCo2())
-            .append("thZssScgm", getThZssScgm())
-            .append("thZssGyl", getThZssGyl())
-            .append("thZssCo2", getThZssCo2())
-            .append("thWnClhFlwnl", getThWnClhFlwnl())
-            .append("thWnClhCo2", getThWnClhCo2())
-            .append("delFlag", getDelFlag())
-            .append("revision", getRevision())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .toString();
-    }
 }

+ 2 - 0
slibra-system/src/main/java/com/slibra/business/mapper/TXinyiCarbonMajorMapper.java

@@ -58,4 +58,6 @@ public interface TXinyiCarbonMajorMapper
      * @return 结果
      */
     public int deleteTXinyiCarbonMajorByIds(Long[] ids);
+
+    List<String> allMonths();
 }

+ 2 - 0
slibra-system/src/main/java/com/slibra/business/service/ITXinyiCarbonMajorService.java

@@ -58,4 +58,6 @@ public interface ITXinyiCarbonMajorService
      * @return 结果
      */
     public int deleteTXinyiCarbonMajorById(Long id);
+
+    TXinyiCarbonMajor getCarbonDetailsByMonth(String month);
 }

+ 34 - 0
slibra-system/src/main/java/com/slibra/business/service/impl/TXinyiCarbonMajorServiceImpl.java

@@ -1,12 +1,17 @@
 package com.slibra.business.service.impl;
 
 import java.util.List;
+
+import com.slibra.common.exception.ServiceException;
 import com.slibra.common.utils.DateUtils;
+import com.slibra.common.utils.SecurityUtils;
+import com.slibra.common.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.slibra.business.mapper.TXinyiCarbonMajorMapper;
 import com.slibra.business.domain.TXinyiCarbonMajor;
 import com.slibra.business.service.ITXinyiCarbonMajorService;
+import org.springframework.util.CollectionUtils;
 
 /**
  * 碳排放主Service业务层处理
@@ -54,6 +59,14 @@ public class TXinyiCarbonMajorServiceImpl implements ITXinyiCarbonMajorService
     public int insertTXinyiCarbonMajor(TXinyiCarbonMajor tXinyiCarbonMajor)
     {
         tXinyiCarbonMajor.setCreateTime(DateUtils.getNowDate());
+        tXinyiCarbonMajor.setCreateBy(SecurityUtils.getUsername());
+        String addYearMonth = tXinyiCarbonMajor.getAddYearMonth();
+        if(StringUtils.isBlank(addYearMonth))
+            throw new ServiceException("请输入核算时间");
+        List<TXinyiCarbonMajor> tXinyiCarbonMajors = this.tXinyiCarbonMajorMapper.selectTXinyiCarbonMajorList(TXinyiCarbonMajor.builder().addYearMonth(addYearMonth).build());
+        if(!CollectionUtils.isEmpty(tXinyiCarbonMajors))
+            throw new ServiceException("对应的核算时间已经填写过了,不可以再次填写");
+        tXinyiCarbonMajor.setAddYear(addYearMonth.substring(0, 4));
         return tXinyiCarbonMajorMapper.insertTXinyiCarbonMajor(tXinyiCarbonMajor);
     }
 
@@ -93,4 +106,25 @@ public class TXinyiCarbonMajorServiceImpl implements ITXinyiCarbonMajorService
     {
         return tXinyiCarbonMajorMapper.deleteTXinyiCarbonMajorById(id);
     }
+
+    @Override
+    public TXinyiCarbonMajor getCarbonDetailsByMonth(String month) {
+        List<TXinyiCarbonMajor> tXinyiCarbonMajors = this.tXinyiCarbonMajorMapper.selectTXinyiCarbonMajorList(TXinyiCarbonMajor.builder().addYearMonth(month).build());
+        if(CollectionUtils.isEmpty(tXinyiCarbonMajors))
+            throw new ServiceException("未查询到对应的数据,请选择正确的年月");
+        if(tXinyiCarbonMajors.size() > 1)
+            throw new ServiceException("存在脏数据(重复的数据),对应年月为:" + month);
+        TXinyiCarbonMajor tXinyiCarbonMajor = tXinyiCarbonMajors.get(0);
+        //额外处理其他的关联表:多条数据的
+        this.addExtra(tXinyiCarbonMajors);
+        return tXinyiCarbonMajor;
+    }
+
+    private void addExtra(List<TXinyiCarbonMajor> tXinyiCarbonMajors) {
+        //todo 额外处理其他数据
+    }
+
+    public static void main(String[] args) {
+        System.out.println("2024-12".substring(0, 4));
+    }
 }

+ 58 - 24
slibra-system/src/main/resources/mapper/business/TXinyiCarbonMajorMapper.xml

@@ -1,16 +1,16 @@
 <?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">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.slibra.business.mapper.TXinyiCarbonMajorMapper">
-    
+
     <resultMap type="TXinyiCarbonMajor" id="TXinyiCarbonMajorResult">
         <result property="id"    column="id"    />
-        <result property="owner"    column="owner"    />
+        <result property="addOwner"    column="add_owner"    />
         <result property="provinceId"    column="province_id"    />
         <result property="provinceName"    column="province_name"    />
-        <result property="year"    column="year"    />
-        <result property="yearMonth"    column="year_month"    />
+        <result property="addYear"    column="add_year"    />
+        <result property="addYearMonth"    column="add_year_month"    />
         <result property="wsHsytkhClsl"    column="ws_hsytkh_clsl"    />
         <result property="wsHsytkhJsCod"    column="ws_hsytkh_js_cod"    />
         <result property="wsHsytkhCsCod"    column="ws_hsytkh_cs_cod"    />
@@ -83,6 +83,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="thZssCo2"    column="th_zss_co2"    />
         <result property="thWnClhFlwnl"    column="th_wn_clh_flwnl"    />
         <result property="thWnClhCo2"    column="th_wn_clh_co2"    />
+        <result property="wsclTotalCo2"    column="wscl_total_co2"    />
+        <result property="nyyjTotalCo2"    column="nyyj_total_co2"    />
+        <result property="wnclTotalCo2"    column="wncl_total_co2"    />
+        <result property="ttthTotalCo2"    column="ttth_total_co2"    />
+        <result property="ztTotalCo2"    column="zt_total_co2"    />
         <result property="delFlag"    column="del_flag"    />
         <result property="revision"    column="revision"    />
         <result property="createBy"    column="create_by"    />
@@ -92,18 +97,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTXinyiCarbonMajorVo">
-        select id, owner, province_id, province_name, year, year_month, ws_hsytkh_clsl, ws_hsytkh_js_cod, ws_hsytkh_cs_cod, ws_hsytkh_co2, ws_sjcl_ch4_clsl, ws_sjcl_ch4_js_cod, ws_sjcl_ch4_cs_cod, ws_sjcl_ch4_pfyz, ws_sjcl_ch4_tsb, ws_sjcl_ch4_csc, ws_sjcl_ch4_co2, ws_td_n2o_clsl, ws_td_n2o_js_tn, ws_td_n2o_cs_tn, ws_td_n2o_pfyz, ws_td_n2o_co2, nyyj_dlxh_zhdl, nyyj_dlxh_zhdl_co2, nyyj_dlxh_jsbf, nyyj_dlxh_jsbf_co2, nyyj_dlxh_gfjf, nyyj_dlxh_gfjf_co2, nyyj_dlxh_tsjf, nyyj_dlxh_tsjf_co2, nyyj_dlxh_xdj, nyyj_dlxh_xdj_co2, nyyj_dlxh_sdcl, nyyj_dlxh_sdcl_co2, nyyj_dlxh_wncz, nyyj_dlxh_wncz_co2, nyyj_dlxh_shq, nyyj_dlxh_shq_co2, nyyj_dlxh_qt, nyyj_dlxh_qt_co2, nyyj_grrl_zq, nyyj_grrl_dyhz, nyyj_grrl_rl, nyyj_grrl_co2, wncl_yyzq_zqcl, wncl_yyzq_ch_zlfs, wncl_yyzq_co2, wncl_ddcl_zycll, wncl_ddcl_clqnd, wncl_ddcl_clhnd, wncl_ddcl_pfyz, wncl_ddcl_co2, wncl_hyfj_fjl, wncl_hyfj_ch4_co2, wncl_hyfj_n2o_co2, wncl_wnfs_xhl, wncl_wnfs_htbl, wncl_wnfs_co2, wncl_bwqrs_rslx, wncl_bwqrs_fsl, wncl_bwqrs_pfyz, wncl_bwqrs_ch4_co2, wncl_bwqrs_n2o_co2, wncl_wnrj_byh_xhl, wncl_wnrj_byh_htbl, wncl_wnrj_byh_co2, wncl_wnrj_qt_lx, wncl_wnrj_qt_xhl, wncl_wnrj_qt_pfyz, wncl_wnrj_qt_ch4_co2, wncl_wnrj_qt_n2o_co2, th_gf_zhdl, th_gf_co2, th_zss_scgm, th_zss_gyl, th_zss_co2, th_wn_clh_flwnl, th_wn_clh_co2, del_flag, revision, create_by, create_time, update_by, update_time from t_xinyi_carbon_major
+        select id, add_owner, province_id, province_name, add_year, add_year_month, ws_hsytkh_clsl, ws_hsytkh_js_cod, ws_hsytkh_cs_cod, ws_hsytkh_co2, ws_sjcl_ch4_clsl, ws_sjcl_ch4_js_cod, ws_sjcl_ch4_cs_cod, ws_sjcl_ch4_pfyz, ws_sjcl_ch4_tsb, ws_sjcl_ch4_csc, ws_sjcl_ch4_co2, ws_td_n2o_clsl, ws_td_n2o_js_tn, ws_td_n2o_cs_tn, ws_td_n2o_pfyz, ws_td_n2o_co2, nyyj_dlxh_zhdl, nyyj_dlxh_zhdl_co2, nyyj_dlxh_jsbf, nyyj_dlxh_jsbf_co2, nyyj_dlxh_gfjf, nyyj_dlxh_gfjf_co2, nyyj_dlxh_tsjf, nyyj_dlxh_tsjf_co2, nyyj_dlxh_xdj, nyyj_dlxh_xdj_co2, nyyj_dlxh_sdcl, nyyj_dlxh_sdcl_co2, nyyj_dlxh_wncz, nyyj_dlxh_wncz_co2, nyyj_dlxh_shq, nyyj_dlxh_shq_co2, nyyj_dlxh_qt, nyyj_dlxh_qt_co2, nyyj_grrl_zq, nyyj_grrl_dyhz, nyyj_grrl_rl, nyyj_grrl_co2, wncl_yyzq_zqcl, wncl_yyzq_ch_zlfs, wncl_yyzq_co2, wncl_ddcl_zycll, wncl_ddcl_clqnd, wncl_ddcl_clhnd, wncl_ddcl_pfyz, wncl_ddcl_co2, wncl_hyfj_fjl, wncl_hyfj_ch4_co2, wncl_hyfj_n2o_co2, wncl_wnfs_xhl, wncl_wnfs_htbl, wncl_wnfs_co2, wncl_bwqrs_rslx, wncl_bwqrs_fsl, wncl_bwqrs_pfyz, wncl_bwqrs_ch4_co2, wncl_bwqrs_n2o_co2, wncl_wnrj_byh_xhl, wncl_wnrj_byh_htbl, wncl_wnrj_byh_co2, wncl_wnrj_qt_lx, wncl_wnrj_qt_xhl, wncl_wnrj_qt_pfyz, wncl_wnrj_qt_ch4_co2, wncl_wnrj_qt_n2o_co2, th_gf_zhdl, th_gf_co2, th_zss_scgm, th_zss_gyl, th_zss_co2, th_wn_clh_flwnl, th_wn_clh_co2, wscl_total_co2, nyyj_total_co2, wncl_total_co2, ttth_total_co2, zt_total_co2, del_flag, revision, create_by, create_time, update_by, update_time from t_xinyi_carbon_major
     </sql>
 
     <select id="selectTXinyiCarbonMajorList" parameterType="TXinyiCarbonMajor" resultMap="TXinyiCarbonMajorResult">
         <include refid="selectTXinyiCarbonMajorVo"/>
         <where>
             1 = 1
-            <if test="owner != null  and owner != ''"> and owner = #{owner}</if>
+            <if test="addOwner != null  and addOwner != ''"> and add_owner = #{addOwner}</if>
             <if test="provinceId != null "> and province_id = #{provinceId}</if>
             <if test="provinceName != null  and provinceName != ''"> and province_name like concat('%', #{provinceName}, '%')</if>
-            <if test="year != null  and year != ''"> and year = #{year}</if>
-            <if test="yearMonth != null  and yearMonth != ''"> and year_month = #{yearMonth}</if>
+            <if test="addYear != null  and addYear != ''"> and add_year = #{addYear}</if>
+            <if test="addYearMonth != null  and addYearMonth != ''"> and add_year_month = #{addYearMonth}</if>
             <if test="wsHsytkhClsl != null "> and ws_hsytkh_clsl = #{wsHsytkhClsl}</if>
             <if test="wsHsytkhJsCod != null "> and ws_hsytkh_js_cod = #{wsHsytkhJsCod}</if>
             <if test="wsHsytkhCsCod != null "> and ws_hsytkh_cs_cod = #{wsHsytkhCsCod}</if>
@@ -176,24 +181,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="thZssCo2 != null "> and th_zss_co2 = #{thZssCo2}</if>
             <if test="thWnClhFlwnl != null "> and th_wn_clh_flwnl = #{thWnClhFlwnl}</if>
             <if test="thWnClhCo2 != null "> and th_wn_clh_co2 = #{thWnClhCo2}</if>
+            <if test="wsclTotalCo2 != null "> and wscl_total_co2 = #{wsclTotalCo2}</if>
+            <if test="nyyjTotalCo2 != null "> and nyyj_total_co2 = #{nyyjTotalCo2}</if>
+            <if test="wnclTotalCo2 != null "> and wncl_total_co2 = #{wnclTotalCo2}</if>
+            <if test="ttthTotalCo2 != null "> and ttth_total_co2 = #{ttthTotalCo2}</if>
+            <if test="ztTotalCo2 != null "> and zt_total_co2 = #{ztTotalCo2}</if>
             <if test="revision != null "> and revision = #{revision}</if>
         </where>
         and del_flag = 0 order by id desc
     </select>
-    
+
     <select id="selectTXinyiCarbonMajorById" parameterType="Long" resultMap="TXinyiCarbonMajorResult">
         <include refid="selectTXinyiCarbonMajorVo"/>
         where id = #{id} and del_flag = 0
     </select>
-        
+
     <insert id="insertTXinyiCarbonMajor" parameterType="TXinyiCarbonMajor" useGeneratedKeys="true" keyProperty="id">
         insert into t_xinyi_carbon_major
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="owner != null">owner,</if>
+            <if test="addOwner != null">add_owner,</if>
             <if test="provinceId != null">province_id,</if>
             <if test="provinceName != null">province_name,</if>
-            <if test="year != null">year,</if>
-            <if test="yearMonth != null">year_month,</if>
+            <if test="addYear != null">add_year,</if>
+            <if test="addYearMonth != null">add_year_month,</if>
             <if test="wsHsytkhClsl != null">ws_hsytkh_clsl,</if>
             <if test="wsHsytkhJsCod != null">ws_hsytkh_js_cod,</if>
             <if test="wsHsytkhCsCod != null">ws_hsytkh_cs_cod,</if>
@@ -266,19 +276,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="thZssCo2 != null">th_zss_co2,</if>
             <if test="thWnClhFlwnl != null">th_wn_clh_flwnl,</if>
             <if test="thWnClhCo2 != null">th_wn_clh_co2,</if>
+            <if test="wsclTotalCo2 != null">wscl_total_co2,</if>
+            <if test="nyyjTotalCo2 != null">nyyj_total_co2,</if>
+            <if test="wnclTotalCo2 != null">wncl_total_co2,</if>
+            <if test="ttthTotalCo2 != null">ttth_total_co2,</if>
+            <if test="ztTotalCo2 != null">zt_total_co2,</if>
             <if test="delFlag != null">del_flag,</if>
             <if test="revision != null">revision,</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>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="owner != null">#{owner},</if>
+            <if test="addOwner != null">#{addOwner},</if>
             <if test="provinceId != null">#{provinceId},</if>
             <if test="provinceName != null">#{provinceName},</if>
-            <if test="year != null">#{year},</if>
-            <if test="yearMonth != null">#{yearMonth},</if>
+            <if test="addYear != null">#{addYear},</if>
+            <if test="addYearMonth != null">#{addYearMonth},</if>
             <if test="wsHsytkhClsl != null">#{wsHsytkhClsl},</if>
             <if test="wsHsytkhJsCod != null">#{wsHsytkhJsCod},</if>
             <if test="wsHsytkhCsCod != null">#{wsHsytkhCsCod},</if>
@@ -351,23 +366,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="thZssCo2 != null">#{thZssCo2},</if>
             <if test="thWnClhFlwnl != null">#{thWnClhFlwnl},</if>
             <if test="thWnClhCo2 != null">#{thWnClhCo2},</if>
+            <if test="wsclTotalCo2 != null">#{wsclTotalCo2},</if>
+            <if test="nyyjTotalCo2 != null">#{nyyjTotalCo2},</if>
+            <if test="wnclTotalCo2 != null">#{wnclTotalCo2},</if>
+            <if test="ttthTotalCo2 != null">#{ttthTotalCo2},</if>
+            <if test="ztTotalCo2 != null">#{ztTotalCo2},</if>
             <if test="delFlag != null">#{delFlag},</if>
             <if test="revision != null">#{revision},</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>
+        </trim>
     </insert>
 
     <update id="updateTXinyiCarbonMajor" parameterType="TXinyiCarbonMajor">
         update t_xinyi_carbon_major
         <trim prefix="SET" suffixOverrides=",">
-            <if test="owner != null">owner = #{owner},</if>
+            <if test="addOwner != null">add_owner = #{addOwner},</if>
             <if test="provinceId != null">province_id = #{provinceId},</if>
             <if test="provinceName != null">province_name = #{provinceName},</if>
-            <if test="year != null">year = #{year},</if>
-            <if test="yearMonth != null">year_month = #{yearMonth},</if>
+            <if test="addYear != null">add_year = #{addYear},</if>
+            <if test="addYearMonth != null">add_year_month = #{addYearMonth},</if>
             <if test="wsHsytkhClsl != null">ws_hsytkh_clsl = #{wsHsytkhClsl},</if>
             <if test="wsHsytkhJsCod != null">ws_hsytkh_js_cod = #{wsHsytkhJsCod},</if>
             <if test="wsHsytkhCsCod != null">ws_hsytkh_cs_cod = #{wsHsytkhCsCod},</if>
@@ -440,6 +460,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="thZssCo2 != null">th_zss_co2 = #{thZssCo2},</if>
             <if test="thWnClhFlwnl != null">th_wn_clh_flwnl = #{thWnClhFlwnl},</if>
             <if test="thWnClhCo2 != null">th_wn_clh_co2 = #{thWnClhCo2},</if>
+            <if test="wsclTotalCo2 != null">wscl_total_co2 = #{wsclTotalCo2},</if>
+            <if test="nyyjTotalCo2 != null">nyyj_total_co2 = #{nyyjTotalCo2},</if>
+            <if test="wnclTotalCo2 != null">wncl_total_co2 = #{wnclTotalCo2},</if>
+            <if test="ttthTotalCo2 != null">ttth_total_co2 = #{ttthTotalCo2},</if>
+            <if test="ztTotalCo2 != null">zt_total_co2 = #{ztTotalCo2},</if>
             <if test="delFlag != null">del_flag = #{delFlag},</if>
             <if test="revision != null">revision = #{revision},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
@@ -451,7 +476,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
     </update>
 
-    
+
 
     <delete id="deleteTXinyiCarbonMajorById" parameterType="Long">
         update t_xinyi_carbon_major set del_flag = 2,revision = revision + 1 where del_flag = 0 and id = #{id}
@@ -463,4 +488,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+
+
+    <!-- 下面是手动新增的方法 -->
+    <select id="allMonths" resultType="string">
+        SELECT
+            add_year_month
+        FROM
+            t_xinyi_carbon_major
+    </select>
 </mapper>