Ver código fonte

碳排放智能体接口新增或者调整

王苗苗 7 meses atrás
pai
commit
92878d78ff

+ 43 - 8
slibra-admin/src/main/java/com/slibra/web/controller/business/FrontController.java

@@ -2,16 +2,19 @@ package com.slibra.web.controller.business;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONWriter;
+import com.github.pagehelper.PageInfo;
 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.res.CarbonMajorSimple;
 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.HttpStatus;
 import com.slibra.common.constant.MyConstants;
 import com.slibra.common.core.controller.BaseController;
 import com.slibra.common.core.domain.AjaxResult;
@@ -27,6 +30,7 @@ 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.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.util.CollectionUtils;
@@ -34,10 +38,7 @@ import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
 import java.math.BigDecimal;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.List;
-import java.util.Objects;
+import java.util.*;
 import java.util.stream.Collectors;
 
 import static com.slibra.common.constant.MyConstants.*;
@@ -501,17 +502,51 @@ public class FrontController extends BaseController {
 
 
     /**
-     * 查询碳排放主列表
+     * 查询碳排放主列表数据-部分展示字段(分页)
      */
-    @GetMapping("/list")
-    public TableDataInfo list(TXinyiCarbonMajor tXinyiCarbonMajor)
+    @GetMapping("/bigModel/carbonSmart/pageList")
+    public TableDataInfo carbonSmartPageList(TXinyiCarbonMajor tXinyiCarbonMajor)
     {
         startPage();
         List<TXinyiCarbonMajor> list = tXinyiCarbonMajorService.selectTXinyiCarbonMajorList(tXinyiCarbonMajor);
-        return getDataTable(list);
+        List<CarbonMajorSimple> resultList = new ArrayList<>();
+        if(!CollectionUtils.isEmpty(list)) {
+            for (TXinyiCarbonMajor xinyiCarbonMajor : list) {
+                CarbonMajorSimple carbonMajorSimple = new CarbonMajorSimple();
+                BeanUtils.copyProperties(xinyiCarbonMajor, carbonMajorSimple);
+                resultList.add(carbonMajorSimple);
+            }
+        }
+        TableDataInfo rspData = new TableDataInfo();
+        rspData.setCode(HttpStatus.SUCCESS);
+        rspData.setMsg("查询成功");
+        rspData.setRows(resultList);
+        rspData.setTotal(new PageInfo(list).getTotal());
+        return rspData;
     }
 
 
+    /**
+     * 导出碳排放主列表部分字段
+     */
+    @PostMapping("/bigModel/carbonSmart/export")
+    public void carbonSmartExport(HttpServletResponse response, TXinyiCarbonMajor tXinyiCarbonMajor)
+    {
+        List<TXinyiCarbonMajor> list = tXinyiCarbonMajorService.selectTXinyiCarbonMajorList(tXinyiCarbonMajor);
+        if(CollectionUtils.isEmpty(list))
+            log.info("导出的数据为空,无法导出");
+        else{
+            List<CarbonMajorSimple> resultList = new ArrayList<>();
+            for (TXinyiCarbonMajor xinyiCarbonMajor : list) {
+                CarbonMajorSimple carbonMajorSimple = new CarbonMajorSimple();
+                BeanUtils.copyProperties(xinyiCarbonMajor, carbonMajorSimple);
+                resultList.add(carbonMajorSimple);
+            }
+            ExcelUtil<CarbonMajorSimple> util = new ExcelUtil<>(CarbonMajorSimple.class);
+            util.exportExcel(response, resultList, "碳排放主数据");
+        }
+    }
+
 
 
     /**

+ 16 - 0
slibra-system/src/main/java/com/slibra/business/domain/TXinyiCarbonMajor.java

@@ -363,4 +363,20 @@ public class TXinyiCarbonMajor extends BaseEntity
     @Excel(name = "乐观锁")
     private Long revision;
 
+    /**  填报开始时间 */
+//    @JsonFormat(pattern = "yyyy-MM-dd")
+    private String timeBegin;
+
+    /** 填报截止时间 */
+//    @JsonFormat(pattern = "yyyy-MM-dd")
+    private String timeEnd;
+
+
+    /**  核算开始时间 */
+//    @JsonFormat(pattern = "yyyy-MM-dd")
+    private String hsTimeBegin;
+
+    /** 核算截止时间 */
+//    @JsonFormat(pattern = "yyyy-MM-dd")
+    private String hsTimeEnd;
 }

+ 54 - 0
slibra-system/src/main/java/com/slibra/business/res/CarbonMajorSimple.java

@@ -0,0 +1,54 @@
+package com.slibra.business.res;
+
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.slibra.common.annotation.Excel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+
+@Builder
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class CarbonMajorSimple {
+
+
+    /** 所属年月(2024-02) */
+    @Excel(name = "核算日期", readConverterExp = "2=024-02")
+    private String addYearMonth;
+
+    /** 总碳排放量 */
+    @Excel(name = "总碳排放量")
+    private BigDecimal ztTotalCo2;
+
+    /** 污水处理碳排放量 */
+    @Excel(name = "污水处理碳排放量")
+    private BigDecimal wsclTotalCo2;
+
+    /** 能源、药剂碳排量 */
+    @Excel(name = "能源、药剂碳排量")
+    private BigDecimal nyyjTotalCo2;
+
+    /** 污泥处理碳排量 */
+    @Excel(name = "污泥处理碳排量")
+    private BigDecimal wnclTotalCo2;
+
+    /** 替碳、碳汇替碳量 */
+    @Excel(name = "替碳、碳汇替碳量")
+    private BigDecimal ttthTotalCo2;
+
+    /** 创建者 */
+    @Excel(name = "录入人员")
+    private String createBy;
+
+    /** 备注,这里存放的是 填报日期 */
+    @Excel(name = "填报日期")
+    private String remark;
+
+
+
+}

+ 7 - 3
slibra-system/src/main/java/com/slibra/business/service/impl/TXinyiCarbonMajorServiceImpl.java

@@ -1,5 +1,6 @@
 package com.slibra.business.service.impl;
 
+import java.util.Date;
 import java.util.List;
 
 import com.slibra.common.exception.ServiceException;
@@ -58,7 +59,8 @@ public class TXinyiCarbonMajorServiceImpl implements ITXinyiCarbonMajorService
     @Override
     public int insertTXinyiCarbonMajor(TXinyiCarbonMajor tXinyiCarbonMajor)
     {
-        tXinyiCarbonMajor.setCreateTime(DateUtils.getNowDate());
+        Date nowDate = DateUtils.getNowDate();
+        tXinyiCarbonMajor.setCreateTime(nowDate);
         tXinyiCarbonMajor.setCreateBy(SecurityUtils.getUsername());
         String addYearMonth = tXinyiCarbonMajor.getAddYearMonth();
         if(StringUtils.isBlank(addYearMonth))
@@ -67,6 +69,8 @@ public class TXinyiCarbonMajorServiceImpl implements ITXinyiCarbonMajorService
         if(!CollectionUtils.isEmpty(tXinyiCarbonMajors))
             throw new ServiceException("对应的核算时间已经填写过了,不可以再次填写");
         tXinyiCarbonMajor.setAddYear(addYearMonth.substring(0, 4));
+        //填报日期(只要年月日)
+        tXinyiCarbonMajor.setRemark(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, nowDate));
         return tXinyiCarbonMajorMapper.insertTXinyiCarbonMajor(tXinyiCarbonMajor);
     }
 
@@ -116,11 +120,11 @@ public class TXinyiCarbonMajorServiceImpl implements ITXinyiCarbonMajorService
             throw new ServiceException("存在脏数据(重复的数据),对应年月为:" + month);
         TXinyiCarbonMajor tXinyiCarbonMajor = tXinyiCarbonMajors.get(0);
         //额外处理其他的关联表:多条数据的
-        this.addExtra(tXinyiCarbonMajors);
+        this.addExtra(tXinyiCarbonMajor);
         return tXinyiCarbonMajor;
     }
 
-    private void addExtra(List<TXinyiCarbonMajor> tXinyiCarbonMajors) {
+    private void addExtra(TXinyiCarbonMajor tXinyiCarbonMajor) {
         //todo 额外处理其他数据
     }
 

+ 97 - 91
slibra-system/src/main/resources/mapper/business/TXinyiCarbonMajorMapper.xml

@@ -100,97 +100,6 @@
         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="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="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>
-            <if test="wsHsytkhCo2 != null "> and ws_hsytkh_co2 = #{wsHsytkhCo2}</if>
-            <if test="wsSjclCh4Clsl != null "> and ws_sjcl_ch4_clsl = #{wsSjclCh4Clsl}</if>
-            <if test="wsSjclCh4JsCod != null "> and ws_sjcl_ch4_js_cod = #{wsSjclCh4JsCod}</if>
-            <if test="wsSjclCh4CsCod != null "> and ws_sjcl_ch4_cs_cod = #{wsSjclCh4CsCod}</if>
-            <if test="wsSjclCh4Pfyz != null "> and ws_sjcl_ch4_pfyz = #{wsSjclCh4Pfyz}</if>
-            <if test="wsSjclCh4Tsb != null "> and ws_sjcl_ch4_tsb = #{wsSjclCh4Tsb}</if>
-            <if test="wsSjclCh4Csc != null "> and ws_sjcl_ch4_csc = #{wsSjclCh4Csc}</if>
-            <if test="wsSjclCh4Co2 != null "> and ws_sjcl_ch4_co2 = #{wsSjclCh4Co2}</if>
-            <if test="wsTdN2oClsl != null "> and ws_td_n2o_clsl = #{wsTdN2oClsl}</if>
-            <if test="wsTdN2oJsTn != null "> and ws_td_n2o_js_tn = #{wsTdN2oJsTn}</if>
-            <if test="wsTdN2oCsTn != null "> and ws_td_n2o_cs_tn = #{wsTdN2oCsTn}</if>
-            <if test="wsTdN2oPfyz != null "> and ws_td_n2o_pfyz = #{wsTdN2oPfyz}</if>
-            <if test="wsTdN2oCo2 != null "> and ws_td_n2o_co2 = #{wsTdN2oCo2}</if>
-            <if test="nyyjDlxhZhdl != null "> and nyyj_dlxh_zhdl = #{nyyjDlxhZhdl}</if>
-            <if test="nyyjDlxhZhdlCo2 != null "> and nyyj_dlxh_zhdl_co2 = #{nyyjDlxhZhdlCo2}</if>
-            <if test="nyyjDlxhJsbf != null "> and nyyj_dlxh_jsbf = #{nyyjDlxhJsbf}</if>
-            <if test="nyyjDlxhJsbfCo2 != null "> and nyyj_dlxh_jsbf_co2 = #{nyyjDlxhJsbfCo2}</if>
-            <if test="nyyjDlxhGfjf != null "> and nyyj_dlxh_gfjf = #{nyyjDlxhGfjf}</if>
-            <if test="nyyjDlxhGfjfCo2 != null "> and nyyj_dlxh_gfjf_co2 = #{nyyjDlxhGfjfCo2}</if>
-            <if test="nyyjDlxhTsjf != null "> and nyyj_dlxh_tsjf = #{nyyjDlxhTsjf}</if>
-            <if test="nyyjDlxhTsjfCo2 != null "> and nyyj_dlxh_tsjf_co2 = #{nyyjDlxhTsjfCo2}</if>
-            <if test="nyyjDlxhXdj != null "> and nyyj_dlxh_xdj = #{nyyjDlxhXdj}</if>
-            <if test="nyyjDlxhXdjCo2 != null "> and nyyj_dlxh_xdj_co2 = #{nyyjDlxhXdjCo2}</if>
-            <if test="nyyjDlxhSdcl != null "> and nyyj_dlxh_sdcl = #{nyyjDlxhSdcl}</if>
-            <if test="nyyjDlxhSdclCo2 != null "> and nyyj_dlxh_sdcl_co2 = #{nyyjDlxhSdclCo2}</if>
-            <if test="nyyjDlxhWncz != null "> and nyyj_dlxh_wncz = #{nyyjDlxhWncz}</if>
-            <if test="nyyjDlxhWnczCo2 != null "> and nyyj_dlxh_wncz_co2 = #{nyyjDlxhWnczCo2}</if>
-            <if test="nyyjDlxhShq != null "> and nyyj_dlxh_shq = #{nyyjDlxhShq}</if>
-            <if test="nyyjDlxhShqCo2 != null "> and nyyj_dlxh_shq_co2 = #{nyyjDlxhShqCo2}</if>
-            <if test="nyyjDlxhQt != null "> and nyyj_dlxh_qt = #{nyyjDlxhQt}</if>
-            <if test="nyyjDlxhQtCo2 != null "> and nyyj_dlxh_qt_co2 = #{nyyjDlxhQtCo2}</if>
-            <if test="nyyjGrrlZq != null "> and nyyj_grrl_zq = #{nyyjGrrlZq}</if>
-            <if test="nyyjGrrlDyhz != null "> and nyyj_grrl_dyhz = #{nyyjGrrlDyhz}</if>
-            <if test="nyyjGrrlRl != null "> and nyyj_grrl_rl = #{nyyjGrrlRl}</if>
-            <if test="nyyjGrrlCo2 != null "> and nyyj_grrl_co2 = #{nyyjGrrlCo2}</if>
-            <if test="wnclYyzqZqcl != null "> and wncl_yyzq_zqcl = #{wnclYyzqZqcl}</if>
-            <if test="wnclYyzqChZlfs != null "> and wncl_yyzq_ch_zlfs = #{wnclYyzqChZlfs}</if>
-            <if test="wnclYyzqCo2 != null "> and wncl_yyzq_co2 = #{wnclYyzqCo2}</if>
-            <if test="wnclDdclZycll != null "> and wncl_ddcl_zycll = #{wnclDdclZycll}</if>
-            <if test="wnclDdclClqnd != null "> and wncl_ddcl_clqnd = #{wnclDdclClqnd}</if>
-            <if test="wnclDdclClhnd != null "> and wncl_ddcl_clhnd = #{wnclDdclClhnd}</if>
-            <if test="wnclDdclPfyz != null "> and wncl_ddcl_pfyz = #{wnclDdclPfyz}</if>
-            <if test="wnclDdclCo2 != null "> and wncl_ddcl_co2 = #{wnclDdclCo2}</if>
-            <if test="wnclHyfjFjl != null "> and wncl_hyfj_fjl = #{wnclHyfjFjl}</if>
-            <if test="wnclHyfjCh4Co2 != null "> and wncl_hyfj_ch4_co2 = #{wnclHyfjCh4Co2}</if>
-            <if test="wnclHyfjN2oCo2 != null "> and wncl_hyfj_n2o_co2 = #{wnclHyfjN2oCo2}</if>
-            <if test="wnclWnfsXhl != null "> and wncl_wnfs_xhl = #{wnclWnfsXhl}</if>
-            <if test="wnclWnfsHtbl != null "> and wncl_wnfs_htbl = #{wnclWnfsHtbl}</if>
-            <if test="wnclWnfsCo2 != null "> and wncl_wnfs_co2 = #{wnclWnfsCo2}</if>
-            <if test="wnclBwqrsRslx != null "> and wncl_bwqrs_rslx = #{wnclBwqrsRslx}</if>
-            <if test="wnclBwqrsFsl != null "> and wncl_bwqrs_fsl = #{wnclBwqrsFsl}</if>
-            <if test="wnclBwqrsPfyz != null "> and wncl_bwqrs_pfyz = #{wnclBwqrsPfyz}</if>
-            <if test="wnclBwqrsCh4Co2 != null "> and wncl_bwqrs_ch4_co2 = #{wnclBwqrsCh4Co2}</if>
-            <if test="wnclBwqrsN2oCo2 != null "> and wncl_bwqrs_n2o_co2 = #{wnclBwqrsN2oCo2}</if>
-            <if test="wnclWnrjByhXhl != null "> and wncl_wnrj_byh_xhl = #{wnclWnrjByhXhl}</if>
-            <if test="wnclWnrjByhHtbl != null "> and wncl_wnrj_byh_htbl = #{wnclWnrjByhHtbl}</if>
-            <if test="wnclWnrjByhCo2 != null "> and wncl_wnrj_byh_co2 = #{wnclWnrjByhCo2}</if>
-            <if test="wnclWnrjQtLx != null "> and wncl_wnrj_qt_lx = #{wnclWnrjQtLx}</if>
-            <if test="wnclWnrjQtXhl != null "> and wncl_wnrj_qt_xhl = #{wnclWnrjQtXhl}</if>
-            <if test="wnclWnrjQtPfyz != null "> and wncl_wnrj_qt_pfyz = #{wnclWnrjQtPfyz}</if>
-            <if test="wnclWnrjQtCh4Co2 != null "> and wncl_wnrj_qt_ch4_co2 = #{wnclWnrjQtCh4Co2}</if>
-            <if test="wnclWnrjQtN2oCo2 != null "> and wncl_wnrj_qt_n2o_co2 = #{wnclWnrjQtN2oCo2}</if>
-            <if test="thGfZhdl != null "> and th_gf_zhdl = #{thGfZhdl}</if>
-            <if test="thGfCo2 != null "> and th_gf_co2 = #{thGfCo2}</if>
-            <if test="thZssScgm != null "> and th_zss_scgm = #{thZssScgm}</if>
-            <if test="thZssGyl != null "> and th_zss_gyl = #{thZssGyl}</if>
-            <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
@@ -497,4 +406,101 @@
         FROM
             t_xinyi_carbon_major
     </select>
+
+
+    <select id="selectTXinyiCarbonMajorList" parameterType="TXinyiCarbonMajor" resultMap="TXinyiCarbonMajorResult">
+        <include refid="selectTXinyiCarbonMajorVo"/>
+        <where>
+            1 = 1
+            <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="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>
+            <if test="wsHsytkhCo2 != null "> and ws_hsytkh_co2 = #{wsHsytkhCo2}</if>
+            <if test="wsSjclCh4Clsl != null "> and ws_sjcl_ch4_clsl = #{wsSjclCh4Clsl}</if>
+            <if test="wsSjclCh4JsCod != null "> and ws_sjcl_ch4_js_cod = #{wsSjclCh4JsCod}</if>
+            <if test="wsSjclCh4CsCod != null "> and ws_sjcl_ch4_cs_cod = #{wsSjclCh4CsCod}</if>
+            <if test="wsSjclCh4Pfyz != null "> and ws_sjcl_ch4_pfyz = #{wsSjclCh4Pfyz}</if>
+            <if test="wsSjclCh4Tsb != null "> and ws_sjcl_ch4_tsb = #{wsSjclCh4Tsb}</if>
+            <if test="wsSjclCh4Csc != null "> and ws_sjcl_ch4_csc = #{wsSjclCh4Csc}</if>
+            <if test="wsSjclCh4Co2 != null "> and ws_sjcl_ch4_co2 = #{wsSjclCh4Co2}</if>
+            <if test="wsTdN2oClsl != null "> and ws_td_n2o_clsl = #{wsTdN2oClsl}</if>
+            <if test="wsTdN2oJsTn != null "> and ws_td_n2o_js_tn = #{wsTdN2oJsTn}</if>
+            <if test="wsTdN2oCsTn != null "> and ws_td_n2o_cs_tn = #{wsTdN2oCsTn}</if>
+            <if test="wsTdN2oPfyz != null "> and ws_td_n2o_pfyz = #{wsTdN2oPfyz}</if>
+            <if test="wsTdN2oCo2 != null "> and ws_td_n2o_co2 = #{wsTdN2oCo2}</if>
+            <if test="nyyjDlxhZhdl != null "> and nyyj_dlxh_zhdl = #{nyyjDlxhZhdl}</if>
+            <if test="nyyjDlxhZhdlCo2 != null "> and nyyj_dlxh_zhdl_co2 = #{nyyjDlxhZhdlCo2}</if>
+            <if test="nyyjDlxhJsbf != null "> and nyyj_dlxh_jsbf = #{nyyjDlxhJsbf}</if>
+            <if test="nyyjDlxhJsbfCo2 != null "> and nyyj_dlxh_jsbf_co2 = #{nyyjDlxhJsbfCo2}</if>
+            <if test="nyyjDlxhGfjf != null "> and nyyj_dlxh_gfjf = #{nyyjDlxhGfjf}</if>
+            <if test="nyyjDlxhGfjfCo2 != null "> and nyyj_dlxh_gfjf_co2 = #{nyyjDlxhGfjfCo2}</if>
+            <if test="nyyjDlxhTsjf != null "> and nyyj_dlxh_tsjf = #{nyyjDlxhTsjf}</if>
+            <if test="nyyjDlxhTsjfCo2 != null "> and nyyj_dlxh_tsjf_co2 = #{nyyjDlxhTsjfCo2}</if>
+            <if test="nyyjDlxhXdj != null "> and nyyj_dlxh_xdj = #{nyyjDlxhXdj}</if>
+            <if test="nyyjDlxhXdjCo2 != null "> and nyyj_dlxh_xdj_co2 = #{nyyjDlxhXdjCo2}</if>
+            <if test="nyyjDlxhSdcl != null "> and nyyj_dlxh_sdcl = #{nyyjDlxhSdcl}</if>
+            <if test="nyyjDlxhSdclCo2 != null "> and nyyj_dlxh_sdcl_co2 = #{nyyjDlxhSdclCo2}</if>
+            <if test="nyyjDlxhWncz != null "> and nyyj_dlxh_wncz = #{nyyjDlxhWncz}</if>
+            <if test="nyyjDlxhWnczCo2 != null "> and nyyj_dlxh_wncz_co2 = #{nyyjDlxhWnczCo2}</if>
+            <if test="nyyjDlxhShq != null "> and nyyj_dlxh_shq = #{nyyjDlxhShq}</if>
+            <if test="nyyjDlxhShqCo2 != null "> and nyyj_dlxh_shq_co2 = #{nyyjDlxhShqCo2}</if>
+            <if test="nyyjDlxhQt != null "> and nyyj_dlxh_qt = #{nyyjDlxhQt}</if>
+            <if test="nyyjDlxhQtCo2 != null "> and nyyj_dlxh_qt_co2 = #{nyyjDlxhQtCo2}</if>
+            <if test="nyyjGrrlZq != null "> and nyyj_grrl_zq = #{nyyjGrrlZq}</if>
+            <if test="nyyjGrrlDyhz != null "> and nyyj_grrl_dyhz = #{nyyjGrrlDyhz}</if>
+            <if test="nyyjGrrlRl != null "> and nyyj_grrl_rl = #{nyyjGrrlRl}</if>
+            <if test="nyyjGrrlCo2 != null "> and nyyj_grrl_co2 = #{nyyjGrrlCo2}</if>
+            <if test="wnclYyzqZqcl != null "> and wncl_yyzq_zqcl = #{wnclYyzqZqcl}</if>
+            <if test="wnclYyzqChZlfs != null "> and wncl_yyzq_ch_zlfs = #{wnclYyzqChZlfs}</if>
+            <if test="wnclYyzqCo2 != null "> and wncl_yyzq_co2 = #{wnclYyzqCo2}</if>
+            <if test="wnclDdclZycll != null "> and wncl_ddcl_zycll = #{wnclDdclZycll}</if>
+            <if test="wnclDdclClqnd != null "> and wncl_ddcl_clqnd = #{wnclDdclClqnd}</if>
+            <if test="wnclDdclClhnd != null "> and wncl_ddcl_clhnd = #{wnclDdclClhnd}</if>
+            <if test="wnclDdclPfyz != null "> and wncl_ddcl_pfyz = #{wnclDdclPfyz}</if>
+            <if test="wnclDdclCo2 != null "> and wncl_ddcl_co2 = #{wnclDdclCo2}</if>
+            <if test="wnclHyfjFjl != null "> and wncl_hyfj_fjl = #{wnclHyfjFjl}</if>
+            <if test="wnclHyfjCh4Co2 != null "> and wncl_hyfj_ch4_co2 = #{wnclHyfjCh4Co2}</if>
+            <if test="wnclHyfjN2oCo2 != null "> and wncl_hyfj_n2o_co2 = #{wnclHyfjN2oCo2}</if>
+            <if test="wnclWnfsXhl != null "> and wncl_wnfs_xhl = #{wnclWnfsXhl}</if>
+            <if test="wnclWnfsHtbl != null "> and wncl_wnfs_htbl = #{wnclWnfsHtbl}</if>
+            <if test="wnclWnfsCo2 != null "> and wncl_wnfs_co2 = #{wnclWnfsCo2}</if>
+            <if test="wnclBwqrsRslx != null "> and wncl_bwqrs_rslx = #{wnclBwqrsRslx}</if>
+            <if test="wnclBwqrsFsl != null "> and wncl_bwqrs_fsl = #{wnclBwqrsFsl}</if>
+            <if test="wnclBwqrsPfyz != null "> and wncl_bwqrs_pfyz = #{wnclBwqrsPfyz}</if>
+            <if test="wnclBwqrsCh4Co2 != null "> and wncl_bwqrs_ch4_co2 = #{wnclBwqrsCh4Co2}</if>
+            <if test="wnclBwqrsN2oCo2 != null "> and wncl_bwqrs_n2o_co2 = #{wnclBwqrsN2oCo2}</if>
+            <if test="wnclWnrjByhXhl != null "> and wncl_wnrj_byh_xhl = #{wnclWnrjByhXhl}</if>
+            <if test="wnclWnrjByhHtbl != null "> and wncl_wnrj_byh_htbl = #{wnclWnrjByhHtbl}</if>
+            <if test="wnclWnrjByhCo2 != null "> and wncl_wnrj_byh_co2 = #{wnclWnrjByhCo2}</if>
+            <if test="wnclWnrjQtLx != null "> and wncl_wnrj_qt_lx = #{wnclWnrjQtLx}</if>
+            <if test="wnclWnrjQtXhl != null "> and wncl_wnrj_qt_xhl = #{wnclWnrjQtXhl}</if>
+            <if test="wnclWnrjQtPfyz != null "> and wncl_wnrj_qt_pfyz = #{wnclWnrjQtPfyz}</if>
+            <if test="wnclWnrjQtCh4Co2 != null "> and wncl_wnrj_qt_ch4_co2 = #{wnclWnrjQtCh4Co2}</if>
+            <if test="wnclWnrjQtN2oCo2 != null "> and wncl_wnrj_qt_n2o_co2 = #{wnclWnrjQtN2oCo2}</if>
+            <if test="thGfZhdl != null "> and th_gf_zhdl = #{thGfZhdl}</if>
+            <if test="thGfCo2 != null "> and th_gf_co2 = #{thGfCo2}</if>
+            <if test="thZssScgm != null "> and th_zss_scgm = #{thZssScgm}</if>
+            <if test="thZssGyl != null "> and th_zss_gyl = #{thZssGyl}</if>
+            <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>
+            <if test="timeBegin != null  and timeBegin != ''"> and remark &gt;= #{timeBegin}</if>
+            <if test="timeEnd != null  and timeEnd != ''"> and remark &lt;= #{timeEnd}</if>
+            <if test="hsTimeBegin != null  and hsTimeBegin != ''"> and add_year_month &gt;= #{hsTimeBegin}</if>
+            <if test="hsTimeEnd != null  and hsTimeEnd != ''"> and add_year_month &lt;= #{hsTimeEnd}</if>
+            <if test="createBy != null  and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
+        </where>
+        and del_flag = 0 order by id desc
+    </select>
 </mapper>