Переглянути джерело

全域土地整治、新增耕地接口

DESKTOP-2K9OVK9\siwei 5 місяців тому
батько
коміт
57227f5aad

+ 5 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/controller/qytdzz/AfterTdzzController.java

@@ -4,6 +4,7 @@ import java.util.List;
 import javax.servlet.http.HttpServletResponse;
 
 import com.onemap.apply.domain.qytdzz.TQytdzzZzxm;
+import com.onemap.apply.service.qytdzz.ITQytdzzXzgdService;
 import com.onemap.apply.service.qytdzz.ITQytdzzZzxmService;
 import com.onemap.common.core.utils.poi.ExcelUtil;
 import com.onemap.common.core.web.controller.BaseController;
@@ -37,6 +38,9 @@ public class AfterTdzzController extends BaseController
     private IAfterTdzzService afterTdzzService;
     @Autowired
     private ITQytdzzZzxmService tQytdzzZzxmService;
+    @Autowired
+    private ITQytdzzXzgdService tQytdzzXzgdService;
+
     /**
      * 查询土地整治项目信息列表
      */
@@ -49,6 +53,7 @@ public class AfterTdzzController extends BaseController
             TQytdzzZzxm tQytdzzZzxm = new TQytdzzZzxm();
             tQytdzzZzxm.setPid(t.getId());
             t.settQytdzzZzxm(tQytdzzZzxmService.selectTQytdzzZzxmList(tQytdzzZzxm));
+            t.setXzgd(tQytdzzXzgdService.statAreaByZzxm(t.getId()));
         }
         return getDataTable(list);
     }

+ 159 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/controller/qytdzz/TQytdzzXzgdController.java

@@ -0,0 +1,159 @@
+package com.onemap.apply.controller.qytdzz;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import javax.servlet.http.HttpServletResponse;
+
+import com.github.pagehelper.PageInfo;
+import com.onemap.common.core.constant.HttpStatus;
+import com.onemap.common.core.utils.poi.ExcelUtil;
+import com.onemap.common.core.web.controller.BaseController;
+import com.onemap.common.core.web.domain.AjaxResult;
+import com.onemap.common.core.web.page.TableDataInfo;
+import com.onemap.common.log.annotation.Log;
+import com.onemap.common.log.enums.BusinessType;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.onemap.apply.domain.qytdzz.TQytdzzXzgd;
+import com.onemap.apply.service.qytdzz.ITQytdzzXzgdService;
+
+/**
+ * 新增耕地Controller
+ *
+ * @author ruoyi
+ * @date 2024-11-19
+ */
+@RestController
+@RequestMapping("/qytdzz/xzgd")
+public class TQytdzzXzgdController extends BaseController {
+    @Autowired
+    private ITQytdzzXzgdService tQytdzzXzgdService;
+
+    /**
+     * 查询新增耕地列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(TQytdzzXzgd tQytdzzXzgd) {
+        if (null != tQytdzzXzgd && null != tQytdzzXzgd.getZzxmid()) {
+            List<Map> xzgdMap = tQytdzzXzgdService.selectXzgdByZzxmId(tQytdzzXzgd.getZzxmid());
+            List<Long> xzgdIds = new ArrayList<>();
+            for (Map obj : xzgdMap) {
+                Long id = Long.parseLong(String.valueOf(obj.get("id")));
+                xzgdIds.add(id);
+            }
+            tQytdzzXzgd.setIds(xzgdIds);
+            if (xzgdIds == null || xzgdIds.size() == 0) {
+                TableDataInfo rspData = new TableDataInfo();
+                rspData.setCode(HttpStatus.SUCCESS);
+                rspData.setRows(new ArrayList<Map>());
+                rspData.setMsg("查询成功");
+                rspData.setTotal(0);
+                return rspData;
+            }
+
+        }
+        startPage();
+        List<TQytdzzXzgd> list = tQytdzzXzgdService.selectTQytdzzXzgdList(tQytdzzXzgd);
+        return getDataTable(list);
+    }
+
+
+    /**
+     * 数据总览
+     *
+     * @param tQytdzzXzgd
+     * @return
+     */
+    @GetMapping("/sjzl")
+    public AjaxResult selectSjzl(TQytdzzXzgd tQytdzzXzgd) {
+        return success(tQytdzzXzgdService.selectSjzl(tQytdzzXzgd));
+    }
+
+    /**
+     * 数据总览下新增耕地
+     *
+     * @param tQytdzzXzgd
+     * @return
+     */
+    @GetMapping("/sjzl/xzgd")
+    public AjaxResult selectSjzlXzgd(TQytdzzXzgd tQytdzzXzgd) {
+        return success(tQytdzzXzgdService.selectSjzlXzgd(tQytdzzXzgd));
+    }
+
+    /**
+     * 数据总览下新增耕地来源
+     *
+     * @param tQytdzzXzgd
+     * @return
+     */
+    @GetMapping("/sjzl/xzgdly")
+    public AjaxResult selectSjzlXzgdly(TQytdzzXzgd tQytdzzXzgd) {
+        return success(tQytdzzXzgdService.selectSjzlXzgdly(tQytdzzXzgd));
+    }
+
+    /**
+     * 数据总览下新增耕地来源流向
+     *
+     * @param tQytdzzXzgd
+     * @return
+     */
+    @GetMapping("/sjzl/xzgdlylx")
+    public AjaxResult selectSjzlXzgdLylx(TQytdzzXzgd tQytdzzXzgd) {
+        return success(tQytdzzXzgdService.selectSjzlXzgdLylx(tQytdzzXzgd));
+    }
+
+
+    /**
+     * 导出新增耕地列表
+     */
+    @Log(title = "新增耕地", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TQytdzzXzgd tQytdzzXzgd) {
+        List<TQytdzzXzgd> list = tQytdzzXzgdService.selectTQytdzzXzgdList(tQytdzzXzgd);
+        ExcelUtil<TQytdzzXzgd> util = new ExcelUtil<TQytdzzXzgd>(TQytdzzXzgd.class);
+        util.exportExcel(response, list, "新增耕地数据");
+    }
+
+    /**
+     * 获取新增耕地详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(tQytdzzXzgdService.selectTQytdzzXzgdById(id));
+    }
+
+    /**
+     * 新增新增耕地
+     */
+    @Log(title = "新增耕地", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TQytdzzXzgd tQytdzzXzgd) {
+        return toAjax(tQytdzzXzgdService.insertTQytdzzXzgd(tQytdzzXzgd));
+    }
+
+    /**
+     * 修改新增耕地
+     */
+    @Log(title = "新增耕地", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TQytdzzXzgd tQytdzzXzgd) {
+        return toAjax(tQytdzzXzgdService.updateTQytdzzXzgd(tQytdzzXzgd));
+    }
+
+    /**
+     * 删除新增耕地
+     */
+    @Log(title = "新增耕地", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(tQytdzzXzgdService.deleteTQytdzzXzgdByIds(ids));
+    }
+}

+ 3 - 3
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/qytdzz/AfterTdzz.java

@@ -94,7 +94,7 @@ public class AfterTdzz extends BaseEntity
 
     /** $column.columnComment */
     @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
-    private Long xzgd;
+    private Double xzgd;
 
     private List<TQytdzzZzxm> tQytdzzZzxm;
 
@@ -269,12 +269,12 @@ public class AfterTdzz extends BaseEntity
     {
         return pfbm;
     }
-    public void setXzgd(Long xzgd) 
+    public void setXzgd(Double xzgd)
     {
         this.xzgd = xzgd;
     }
 
-    public Long getXzgd() 
+    public Double getXzgd()
     {
         return xzgd;
     }

+ 437 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/qytdzz/TQytdzzXzgd.java

@@ -0,0 +1,437 @@
+package com.onemap.apply.domain.qytdzz;
+
+import com.onemap.common.core.annotation.Excel;
+import com.onemap.common.core.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.List;
+
+/**
+ * 新增耕地对象 t_qytdzz_xzgd
+ * 
+ * @author ruoyi
+ * @date 2024-11-19
+ */
+public class TQytdzzXzgd extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    private List<Long> ids;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String geom;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String tbbh;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String qsxz;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long tbmj;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String kcdlbm;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long kcxs;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long kcmj;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long tbdlmj;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String gdlx;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String gdpdjb;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String frdbs;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String czcsxm;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long sjnf;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String bz;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String bsm;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String ysdm;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String zzhdlmc;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String qsdwdm;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String qsdwmc;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String zldwdm;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String zldwmc;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String xzgdlydlbm;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String zzhdlbm;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String xzgdlydlmc;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long xzgdmj;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String xzgddb;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String xzgdlyxm;
+
+    private Long zzxmid;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setGeom(String geom) 
+    {
+        this.geom = geom;
+    }
+
+    public String getGeom() 
+    {
+        return geom;
+    }
+    public void setTbbh(String tbbh) 
+    {
+        this.tbbh = tbbh;
+    }
+
+    public String getTbbh() 
+    {
+        return tbbh;
+    }
+    public void setQsxz(String qsxz) 
+    {
+        this.qsxz = qsxz;
+    }
+
+    public String getQsxz() 
+    {
+        return qsxz;
+    }
+    public void setTbmj(Long tbmj) 
+    {
+        this.tbmj = tbmj;
+    }
+
+    public Long getTbmj() 
+    {
+        return tbmj;
+    }
+    public void setKcdlbm(String kcdlbm) 
+    {
+        this.kcdlbm = kcdlbm;
+    }
+
+    public String getKcdlbm() 
+    {
+        return kcdlbm;
+    }
+    public void setKcxs(Long kcxs) 
+    {
+        this.kcxs = kcxs;
+    }
+
+    public Long getKcxs() 
+    {
+        return kcxs;
+    }
+    public void setKcmj(Long kcmj) 
+    {
+        this.kcmj = kcmj;
+    }
+
+    public Long getKcmj() 
+    {
+        return kcmj;
+    }
+    public void setTbdlmj(Long tbdlmj) 
+    {
+        this.tbdlmj = tbdlmj;
+    }
+
+    public Long getTbdlmj() 
+    {
+        return tbdlmj;
+    }
+    public void setGdlx(String gdlx) 
+    {
+        this.gdlx = gdlx;
+    }
+
+    public String getGdlx() 
+    {
+        return gdlx;
+    }
+    public void setGdpdjb(String gdpdjb) 
+    {
+        this.gdpdjb = gdpdjb;
+    }
+
+    public String getGdpdjb() 
+    {
+        return gdpdjb;
+    }
+    public void setFrdbs(String frdbs) 
+    {
+        this.frdbs = frdbs;
+    }
+
+    public String getFrdbs() 
+    {
+        return frdbs;
+    }
+    public void setCzcsxm(String czcsxm) 
+    {
+        this.czcsxm = czcsxm;
+    }
+
+    public String getCzcsxm() 
+    {
+        return czcsxm;
+    }
+    public void setSjnf(Long sjnf) 
+    {
+        this.sjnf = sjnf;
+    }
+
+    public Long getSjnf() 
+    {
+        return sjnf;
+    }
+    public void setBz(String bz) 
+    {
+        this.bz = bz;
+    }
+
+    public String getBz() 
+    {
+        return bz;
+    }
+    public void setBsm(String bsm) 
+    {
+        this.bsm = bsm;
+    }
+
+    public String getBsm() 
+    {
+        return bsm;
+    }
+    public void setYsdm(String ysdm) 
+    {
+        this.ysdm = ysdm;
+    }
+
+    public String getYsdm() 
+    {
+        return ysdm;
+    }
+    public void setZzhdlmc(String zzhdlmc) 
+    {
+        this.zzhdlmc = zzhdlmc;
+    }
+
+    public String getZzhdlmc() 
+    {
+        return zzhdlmc;
+    }
+    public void setQsdwdm(String qsdwdm) 
+    {
+        this.qsdwdm = qsdwdm;
+    }
+
+    public String getQsdwdm() 
+    {
+        return qsdwdm;
+    }
+    public void setQsdwmc(String qsdwmc) 
+    {
+        this.qsdwmc = qsdwmc;
+    }
+
+    public String getQsdwmc() 
+    {
+        return qsdwmc;
+    }
+    public void setZldwdm(String zldwdm) 
+    {
+        this.zldwdm = zldwdm;
+    }
+
+    public String getZldwdm() 
+    {
+        return zldwdm;
+    }
+    public void setZldwmc(String zldwmc) 
+    {
+        this.zldwmc = zldwmc;
+    }
+
+    public String getZldwmc() 
+    {
+        return zldwmc;
+    }
+    public void setXzgdlydlbm(String xzgdlydlbm) 
+    {
+        this.xzgdlydlbm = xzgdlydlbm;
+    }
+
+    public String getXzgdlydlbm() 
+    {
+        return xzgdlydlbm;
+    }
+    public void setZzhdlbm(String zzhdlbm) 
+    {
+        this.zzhdlbm = zzhdlbm;
+    }
+
+    public String getZzhdlbm() 
+    {
+        return zzhdlbm;
+    }
+    public void setXzgdlydlmc(String xzgdlydlmc) 
+    {
+        this.xzgdlydlmc = xzgdlydlmc;
+    }
+
+    public String getXzgdlydlmc() 
+    {
+        return xzgdlydlmc;
+    }
+    public void setXzgdmj(Long xzgdmj) 
+    {
+        this.xzgdmj = xzgdmj;
+    }
+
+    public Long getXzgdmj() 
+    {
+        return xzgdmj;
+    }
+    public void setXzgddb(String xzgddb) 
+    {
+        this.xzgddb = xzgddb;
+    }
+
+    public String getXzgddb() 
+    {
+        return xzgddb;
+    }
+    public void setXzgdlyxm(String xzgdlyxm) 
+    {
+        this.xzgdlyxm = xzgdlyxm;
+    }
+
+    public String getXzgdlyxm() 
+    {
+        return xzgdlyxm;
+    }
+
+    public Long getZzxmid() {
+        return zzxmid;
+    }
+
+    public void setZzxmid(Long zzxmid) {
+        this.zzxmid = zzxmid;
+    }
+
+    public List<Long> getIds() {
+        return ids;
+    }
+
+    public void setIds(List<Long> ids) {
+        this.ids = ids;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("geom", getGeom())
+            .append("tbbh", getTbbh())
+            .append("qsxz", getQsxz())
+            .append("tbmj", getTbmj())
+            .append("kcdlbm", getKcdlbm())
+            .append("kcxs", getKcxs())
+            .append("kcmj", getKcmj())
+            .append("tbdlmj", getTbdlmj())
+            .append("gdlx", getGdlx())
+            .append("gdpdjb", getGdpdjb())
+            .append("frdbs", getFrdbs())
+            .append("czcsxm", getCzcsxm())
+            .append("sjnf", getSjnf())
+            .append("bz", getBz())
+            .append("bsm", getBsm())
+            .append("ysdm", getYsdm())
+            .append("zzhdlmc", getZzhdlmc())
+            .append("qsdwdm", getQsdwdm())
+            .append("qsdwmc", getQsdwmc())
+            .append("zldwdm", getZldwdm())
+            .append("zldwmc", getZldwmc())
+            .append("xzgdlydlbm", getXzgdlydlbm())
+            .append("zzhdlbm", getZzhdlbm())
+            .append("xzgdlydlmc", getXzgdlydlmc())
+            .append("xzgdmj", getXzgdmj())
+            .append("xzgddb", getXzgddb())
+            .append("xzgdlyxm", getXzgdlyxm())
+            .toString();
+    }
+}

+ 83 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/mapper/qytdzz/TQytdzzXzgdMapper.java

@@ -0,0 +1,83 @@
+package com.onemap.apply.mapper.qytdzz;
+
+import java.util.List;
+import java.util.Map;
+
+import com.onemap.apply.domain.qytdzz.TQytdzzXzgd;
+import com.onemap.common.datasource.annotation.Slave;
+
+/**
+ * 新增耕地Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2024-11-19
+ */
+@Slave
+public interface TQytdzzXzgdMapper 
+{
+    /**
+     * 查询新增耕地
+     * 
+     * @param id 新增耕地主键
+     * @return 新增耕地
+     */
+    public TQytdzzXzgd selectTQytdzzXzgdById(Long id);
+
+    /**
+     * 查询新增耕地列表
+     * 
+     * @param tQytdzzXzgd 新增耕地
+     * @return 新增耕地集合
+     */
+    public List<TQytdzzXzgd> selectTQytdzzXzgdList(TQytdzzXzgd tQytdzzXzgd);
+
+    /**
+     * 新增新增耕地
+     * 
+     * @param tQytdzzXzgd 新增耕地
+     * @return 结果
+     */
+    public int insertTQytdzzXzgd(TQytdzzXzgd tQytdzzXzgd);
+
+    /**
+     * 修改新增耕地
+     * 
+     * @param tQytdzzXzgd 新增耕地
+     * @return 结果
+     */
+    public int updateTQytdzzXzgd(TQytdzzXzgd tQytdzzXzgd);
+
+    /**
+     * 删除新增耕地
+     * 
+     * @param id 新增耕地主键
+     * @return 结果
+     */
+    public int deleteTQytdzzXzgdById(Long id);
+
+    /**
+     * 批量删除新增耕地
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTQytdzzXzgdByIds(Long[] ids);
+
+    /**
+     * 统计整治项目的新增耕地面积
+     * @param zzxmid
+     * @return
+     */
+    public Double statAreaByZzxm(Long zzxmid);
+
+    public List<Map> selectXzgdByZzxmId(Long zzxmid);
+
+    public Map selectSjzl(TQytdzzXzgd tQytdzzXzgd);
+
+    public  List<Map> selectSjzlXzgd(TQytdzzXzgd tQytdzzXzgd);
+
+    public  List<Map> selectSjzlXzgdly(TQytdzzXzgd tQytdzzXzgd);
+
+    public  List<Map> selectSjzlXzgdLylx(TQytdzzXzgd tQytdzzXzgd);
+
+}

+ 151 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/qytdzz/TQytdzzXzgdServiceImpl.java

@@ -0,0 +1,151 @@
+package com.onemap.apply.service.impl.qytdzz;
+
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.onemap.apply.mapper.qytdzz.TQytdzzXzgdMapper;
+import com.onemap.apply.domain.qytdzz.TQytdzzXzgd;
+import com.onemap.apply.service.qytdzz.ITQytdzzXzgdService;
+
+/**
+ * 新增耕地Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2024-11-19
+ */
+@Service
+public class TQytdzzXzgdServiceImpl implements ITQytdzzXzgdService {
+    @Autowired
+    private TQytdzzXzgdMapper tQytdzzXzgdMapper;
+
+    /**
+     * 查询新增耕地
+     *
+     * @param id 新增耕地主键
+     * @return 新增耕地
+     */
+    @Override
+    public TQytdzzXzgd selectTQytdzzXzgdById(Long id) {
+        return tQytdzzXzgdMapper.selectTQytdzzXzgdById(id);
+    }
+
+    /**
+     * 查询新增耕地列表
+     *
+     * @param tQytdzzXzgd 新增耕地
+     * @return 新增耕地
+     */
+    @Override
+    public List<TQytdzzXzgd> selectTQytdzzXzgdList(TQytdzzXzgd tQytdzzXzgd) {
+        return tQytdzzXzgdMapper.selectTQytdzzXzgdList(tQytdzzXzgd);
+    }
+
+    /**
+     * 新增新增耕地
+     *
+     * @param tQytdzzXzgd 新增耕地
+     * @return 结果
+     */
+    @Override
+    public int insertTQytdzzXzgd(TQytdzzXzgd tQytdzzXzgd) {
+        return tQytdzzXzgdMapper.insertTQytdzzXzgd(tQytdzzXzgd);
+    }
+
+    /**
+     * 修改新增耕地
+     *
+     * @param tQytdzzXzgd 新增耕地
+     * @return 结果
+     */
+    @Override
+    public int updateTQytdzzXzgd(TQytdzzXzgd tQytdzzXzgd) {
+        return tQytdzzXzgdMapper.updateTQytdzzXzgd(tQytdzzXzgd);
+    }
+
+    /**
+     * 批量删除新增耕地
+     *
+     * @param ids 需要删除的新增耕地主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTQytdzzXzgdByIds(Long[] ids) {
+        return tQytdzzXzgdMapper.deleteTQytdzzXzgdByIds(ids);
+    }
+
+    /**
+     * 删除新增耕地信息
+     *
+     * @param id 新增耕地主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTQytdzzXzgdById(Long id) {
+        return tQytdzzXzgdMapper.deleteTQytdzzXzgdById(id);
+    }
+
+
+    /**
+     * 统计整治项目的新增耕地面积
+     *
+     * @param zzxmid
+     * @return
+     */
+    @Override
+    public Double statAreaByZzxm(Long zzxmid) {
+        return tQytdzzXzgdMapper.statAreaByZzxm(zzxmid);
+    }
+
+    /**
+     * 统计整治项目的新增耕地面积
+     *
+     * @param zzxmid
+     * @return
+     */
+    @Override
+    public List<Map> selectXzgdByZzxmId(Long zzxmid) {
+        return tQytdzzXzgdMapper.selectXzgdByZzxmId(zzxmid);
+    }
+
+    /**
+     * 新增总览
+     *
+     * @param tQytdzzXzgd
+     * @return
+     */
+    @Override
+    public Map selectSjzl(TQytdzzXzgd tQytdzzXzgd) {
+        return tQytdzzXzgdMapper.selectSjzl(tQytdzzXzgd);
+    }
+
+    /**
+     * 数据总览下新增耕地
+     *
+     * @param tQytdzzXzgd
+     * @return
+     */
+    @Override
+    public List<Map> selectSjzlXzgd(TQytdzzXzgd tQytdzzXzgd) {
+        return tQytdzzXzgdMapper.selectSjzlXzgd(tQytdzzXzgd);
+    }
+
+    /**
+     * 数据总览下新增耕地来源
+     *
+     * @param tQytdzzXzgd
+     * @return
+     */
+    @Override
+    public  List<Map> selectSjzlXzgdly(TQytdzzXzgd tQytdzzXzgd){
+        return tQytdzzXzgdMapper.selectSjzlXzgdly(tQytdzzXzgd);
+    }
+
+    @Override
+    public  List<Map> selectSjzlXzgdLylx(TQytdzzXzgd tQytdzzXzgd){
+        return tQytdzzXzgdMapper.selectSjzlXzgdLylx(tQytdzzXzgd);
+    }
+
+
+}

+ 97 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/qytdzz/ITQytdzzXzgdService.java

@@ -0,0 +1,97 @@
+package com.onemap.apply.service.qytdzz;
+
+import java.util.List;
+import java.util.Map;
+
+import com.onemap.apply.domain.qytdzz.TQytdzzXzgd;
+
+/**
+ * 新增耕地Service接口
+ * 
+ * @author ruoyi
+ * @date 2024-11-19
+ */
+public interface ITQytdzzXzgdService 
+{
+    /**
+     * 查询新增耕地
+     * 
+     * @param id 新增耕地主键
+     * @return 新增耕地
+     */
+    public TQytdzzXzgd selectTQytdzzXzgdById(Long id);
+
+    /**
+     * 查询新增耕地列表
+     * 
+     * @param tQytdzzXzgd 新增耕地
+     * @return 新增耕地集合
+     */
+    public List<TQytdzzXzgd> selectTQytdzzXzgdList(TQytdzzXzgd tQytdzzXzgd);
+
+    /**
+     * 新增新增耕地
+     * 
+     * @param tQytdzzXzgd 新增耕地
+     * @return 结果
+     */
+    public int insertTQytdzzXzgd(TQytdzzXzgd tQytdzzXzgd);
+
+    /**
+     * 修改新增耕地
+     * 
+     * @param tQytdzzXzgd 新增耕地
+     * @return 结果
+     */
+    public int updateTQytdzzXzgd(TQytdzzXzgd tQytdzzXzgd);
+
+    /**
+     * 批量删除新增耕地
+     * 
+     * @param ids 需要删除的新增耕地主键集合
+     * @return 结果
+     */
+    public int deleteTQytdzzXzgdByIds(Long[] ids);
+
+    /**
+     * 删除新增耕地信息
+     * 
+     * @param id 新增耕地主键
+     * @return 结果
+     */
+    public int deleteTQytdzzXzgdById(Long id);
+
+
+    /**
+     * 统计整治项目的新增耕地面积
+     * @param zzxmid
+     * @return
+     */
+    public Double statAreaByZzxm(Long zzxmid);
+
+    /**
+     * 统计整治项目的新增耕地面积
+     * @param zzxmid
+     * @return
+     */
+    public List<Map> selectXzgdByZzxmId(Long zzxmid);
+
+    /**
+     * 新增总览
+     * @param tQytdzzXzgd
+     * @return
+     */
+    public Map selectSjzl(TQytdzzXzgd tQytdzzXzgd);
+
+    /**
+     * 数据总览下新增耕地
+     * @param tQytdzzXzgd
+     * @return
+     */
+    public List<Map> selectSjzlXzgd(TQytdzzXzgd tQytdzzXzgd);
+
+    public  List<Map> selectSjzlXzgdly(TQytdzzXzgd tQytdzzXzgd);
+
+
+    public  List<Map> selectSjzlXzgdLylx(TQytdzzXzgd tQytdzzXzgd);
+}

+ 259 - 0
onemap-modules/onemap-apply/src/main/resources/mapper/postgresql/qytdzz/TQytdzzXzgdMapper.xml

@@ -0,0 +1,259 @@
+<?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.onemap.apply.mapper.qytdzz.TQytdzzXzgdMapper">
+    
+    <resultMap type="TQytdzzXzgd" id="TQytdzzXzgdResult">
+        <result property="id"    column="id"    />
+        <result property="geom"    column="geom"    />
+        <result property="tbbh"    column="tbbh"    />
+        <result property="qsxz"    column="qsxz"    />
+        <result property="tbmj"    column="tbmj"    />
+        <result property="kcdlbm"    column="kcdlbm"    />
+        <result property="kcxs"    column="kcxs"    />
+        <result property="kcmj"    column="kcmj"    />
+        <result property="tbdlmj"    column="tbdlmj"    />
+        <result property="gdlx"    column="gdlx"    />
+        <result property="gdpdjb"    column="gdpdjb"    />
+        <result property="frdbs"    column="frdbs"    />
+        <result property="czcsxm"    column="czcsxm"    />
+        <result property="sjnf"    column="sjnf"    />
+        <result property="bz"    column="bz"    />
+        <result property="bsm"    column="bsm"    />
+        <result property="ysdm"    column="ysdm"    />
+        <result property="zzhdlmc"    column="zzhdlmc"    />
+        <result property="qsdwdm"    column="qsdwdm"    />
+        <result property="qsdwmc"    column="qsdwmc"    />
+        <result property="zldwdm"    column="zldwdm"    />
+        <result property="zldwmc"    column="zldwmc"    />
+        <result property="xzgdlydlbm"    column="xzgdlydlbm"    />
+        <result property="zzhdlbm"    column="zzhdlbm"    />
+        <result property="xzgdlydlmc"    column="xzgdlydlmc"    />
+        <result property="xzgdmj"    column="xzgdmj"    />
+        <result property="xzgddb"    column="xzgddb"    />
+        <result property="xzgdlyxm"    column="xzgdlyxm"    />
+    </resultMap>
+
+    <sql id="selectTQytdzzXzgdVo">
+        select id, public.st_asewkt(public.st_force2d(geom)) geom, tbbh, qsxz, tbmj, kcdlbm, kcxs, kcmj, tbdlmj, gdlx, gdpdjb, frdbs, czcsxm, sjnf, bz, bsm, ysdm, zzhdlmc, qsdwdm, qsdwmc, zldwdm, zldwmc, xzgdlydlbm, zzhdlbm, xzgdlydlmc, xzgdmj, xzgddb, xzgdlyxm from t_qytdzz_xzgd
+    </sql>
+
+    <select id="selectTQytdzzXzgdList" parameterType="TQytdzzXzgd" resultMap="TQytdzzXzgdResult">
+        <include refid="selectTQytdzzXzgdVo"/>
+        <where>  
+            <if test="geom != null  and geom != ''"> and geom = #{geom}</if>
+            <if test="tbbh != null  and tbbh != ''"> and tbbh = #{tbbh}</if>
+            <if test="qsxz != null  and qsxz != ''"> and qsxz = #{qsxz}</if>
+            <if test="tbmj != null "> and tbmj = #{tbmj}</if>
+            <if test="kcdlbm != null  and kcdlbm != ''"> and kcdlbm = #{kcdlbm}</if>
+            <if test="kcxs != null "> and kcxs = #{kcxs}</if>
+            <if test="kcmj != null "> and kcmj = #{kcmj}</if>
+            <if test="tbdlmj != null "> and tbdlmj = #{tbdlmj}</if>
+            <if test="gdlx != null  and gdlx != ''"> and gdlx = #{gdlx}</if>
+            <if test="gdpdjb != null  and gdpdjb != ''"> and gdpdjb = #{gdpdjb}</if>
+            <if test="frdbs != null  and frdbs != ''"> and frdbs = #{frdbs}</if>
+            <if test="czcsxm != null  and czcsxm != ''"> and czcsxm = #{czcsxm}</if>
+            <if test="sjnf != null "> and sjnf = #{sjnf}</if>
+            <if test="bz != null  and bz != ''"> and bz = #{bz}</if>
+            <if test="bsm != null  and bsm != ''"> and bsm like concat( #{bsm}, '%') </if>
+            <if test="ysdm != null  and ysdm != ''"> and ysdm = #{ysdm}</if>
+            <if test="zzhdlmc != null  and zzhdlmc != ''"> and zzhdlmc = #{zzhdlmc}</if>
+            <if test="qsdwdm != null  and qsdwdm != ''"> and qsdwdm = #{qsdwdm}</if>
+            <if test="qsdwmc != null  and qsdwmc != ''"> and qsdwmc = #{qsdwmc}</if>
+            <if test="zldwdm != null  and zldwdm != ''"> and zldwdm = #{zldwdm}</if>
+            <if test="zldwmc != null  and zldwmc != ''"> and zldwmc = #{zldwmc}</if>
+            <if test="xzgdlydlbm != null  and xzgdlydlbm != ''"> and xzgdlydlbm = #{xzgdlydlbm}</if>
+            <if test="zzhdlbm != null  and zzhdlbm != ''"> and zzhdlbm = #{zzhdlbm}</if>
+            <if test="xzgdlydlmc != null  and xzgdlydlmc != ''"> and xzgdlydlmc = #{xzgdlydlmc}</if>
+            <if test="xzgdmj != null "> and xzgdmj = #{xzgdmj}</if>
+            <if test="xzgddb != null  and xzgddb != ''"> and xzgddb = #{xzgddb}</if>
+            <if test="xzgdlyxm != null  and xzgdlyxm != ''"> and xzgdlyxm = #{xzgdlyxm}</if>
+            <if test="ids != null and ids.size>0">
+                and id in (
+                <foreach collection="ids" item="param"  separator="," >
+                    #{param}
+                </foreach>
+                )
+             </if>
+        </where>
+    </select>
+    
+    <select id="selectTQytdzzXzgdById" parameterType="Long" resultMap="TQytdzzXzgdResult">
+        <include refid="selectTQytdzzXzgdVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertTQytdzzXzgd" parameterType="TQytdzzXzgd">
+        insert into t_qytdzz_xzgd
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="geom != null">geom,</if>
+            <if test="tbbh != null">tbbh,</if>
+            <if test="qsxz != null">qsxz,</if>
+            <if test="tbmj != null">tbmj,</if>
+            <if test="kcdlbm != null">kcdlbm,</if>
+            <if test="kcxs != null">kcxs,</if>
+            <if test="kcmj != null">kcmj,</if>
+            <if test="tbdlmj != null">tbdlmj,</if>
+            <if test="gdlx != null">gdlx,</if>
+            <if test="gdpdjb != null">gdpdjb,</if>
+            <if test="frdbs != null">frdbs,</if>
+            <if test="czcsxm != null">czcsxm,</if>
+            <if test="sjnf != null">sjnf,</if>
+            <if test="bz != null">bz,</if>
+            <if test="bsm != null">bsm,</if>
+            <if test="ysdm != null">ysdm,</if>
+            <if test="zzhdlmc != null">zzhdlmc,</if>
+            <if test="qsdwdm != null">qsdwdm,</if>
+            <if test="qsdwmc != null">qsdwmc,</if>
+            <if test="zldwdm != null">zldwdm,</if>
+            <if test="zldwmc != null">zldwmc,</if>
+            <if test="xzgdlydlbm != null">xzgdlydlbm,</if>
+            <if test="zzhdlbm != null">zzhdlbm,</if>
+            <if test="xzgdlydlmc != null">xzgdlydlmc,</if>
+            <if test="xzgdmj != null">xzgdmj,</if>
+            <if test="xzgddb != null">xzgddb,</if>
+            <if test="xzgdlyxm != null">xzgdlyxm,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="geom != null">#{geom},</if>
+            <if test="tbbh != null">#{tbbh},</if>
+            <if test="qsxz != null">#{qsxz},</if>
+            <if test="tbmj != null">#{tbmj},</if>
+            <if test="kcdlbm != null">#{kcdlbm},</if>
+            <if test="kcxs != null">#{kcxs},</if>
+            <if test="kcmj != null">#{kcmj},</if>
+            <if test="tbdlmj != null">#{tbdlmj},</if>
+            <if test="gdlx != null">#{gdlx},</if>
+            <if test="gdpdjb != null">#{gdpdjb},</if>
+            <if test="frdbs != null">#{frdbs},</if>
+            <if test="czcsxm != null">#{czcsxm},</if>
+            <if test="sjnf != null">#{sjnf},</if>
+            <if test="bz != null">#{bz},</if>
+            <if test="bsm != null">#{bsm},</if>
+            <if test="ysdm != null">#{ysdm},</if>
+            <if test="zzhdlmc != null">#{zzhdlmc},</if>
+            <if test="qsdwdm != null">#{qsdwdm},</if>
+            <if test="qsdwmc != null">#{qsdwmc},</if>
+            <if test="zldwdm != null">#{zldwdm},</if>
+            <if test="zldwmc != null">#{zldwmc},</if>
+            <if test="xzgdlydlbm != null">#{xzgdlydlbm},</if>
+            <if test="zzhdlbm != null">#{zzhdlbm},</if>
+            <if test="xzgdlydlmc != null">#{xzgdlydlmc},</if>
+            <if test="xzgdmj != null">#{xzgdmj},</if>
+            <if test="xzgddb != null">#{xzgddb},</if>
+            <if test="xzgdlyxm != null">#{xzgdlyxm},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTQytdzzXzgd" parameterType="TQytdzzXzgd">
+        update t_qytdzz_xzgd
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="geom != null">geom = #{geom},</if>
+            <if test="tbbh != null">tbbh = #{tbbh},</if>
+            <if test="qsxz != null">qsxz = #{qsxz},</if>
+            <if test="tbmj != null">tbmj = #{tbmj},</if>
+            <if test="kcdlbm != null">kcdlbm = #{kcdlbm},</if>
+            <if test="kcxs != null">kcxs = #{kcxs},</if>
+            <if test="kcmj != null">kcmj = #{kcmj},</if>
+            <if test="tbdlmj != null">tbdlmj = #{tbdlmj},</if>
+            <if test="gdlx != null">gdlx = #{gdlx},</if>
+            <if test="gdpdjb != null">gdpdjb = #{gdpdjb},</if>
+            <if test="frdbs != null">frdbs = #{frdbs},</if>
+            <if test="czcsxm != null">czcsxm = #{czcsxm},</if>
+            <if test="sjnf != null">sjnf = #{sjnf},</if>
+            <if test="bz != null">bz = #{bz},</if>
+            <if test="bsm != null">bsm = #{bsm},</if>
+            <if test="ysdm != null">ysdm = #{ysdm},</if>
+            <if test="zzhdlmc != null">zzhdlmc = #{zzhdlmc},</if>
+            <if test="qsdwdm != null">qsdwdm = #{qsdwdm},</if>
+            <if test="qsdwmc != null">qsdwmc = #{qsdwmc},</if>
+            <if test="zldwdm != null">zldwdm = #{zldwdm},</if>
+            <if test="zldwmc != null">zldwmc = #{zldwmc},</if>
+            <if test="xzgdlydlbm != null">xzgdlydlbm = #{xzgdlydlbm},</if>
+            <if test="zzhdlbm != null">zzhdlbm = #{zzhdlbm},</if>
+            <if test="xzgdlydlmc != null">xzgdlydlmc = #{xzgdlydlmc},</if>
+            <if test="xzgdmj != null">xzgdmj = #{xzgdmj},</if>
+            <if test="xzgddb != null">xzgddb = #{xzgddb},</if>
+            <if test="xzgdlyxm != null">xzgdlyxm = #{xzgdlyxm},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteTQytdzzXzgdById" parameterType="Long">
+        delete from t_qytdzz_xzgd where id = #{id}
+    </delete>
+
+    <delete id="deleteTQytdzzXzgdByIds" parameterType="String">
+        delete from t_qytdzz_xzgd where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <select id="statAreaByZzxm" parameterType="Long" resultType="Double">
+        select ROUND(coalesce(sum(area_number::numeric),0),2) area_number from  v_qytdzz_zzxm_xzgd  where pid = #{zzxmid}
+    </select>
+
+
+    <select id="selectXzgdByZzxmId" parameterType="Long" resultType="java.util.Map">
+        select * from v_qytdzz_zzxm_xzgd  where pid = #{zzxmid}
+    </select>
+
+    <select id="selectSjzl"  resultType="java.util.Map">
+        select t1.geom ,ROUND(coalesce(area_number::numeric,0),2) area_number,coalesce(count_number::numeric,0) count_number from (
+          SELECT  public.st_asewkt(public.st_force2d(public.st_union(geom))) geom,
+                    public.st_area( public.st_transform(public.st_union(geom),4525)) area_number,
+                  count(*) count_number FROM t_qytdzz_xzgd
+           where bsm like concat( #{bsm}, '%')
+            <if test="zzxmid != null">
+                and id in ( select id from v_qytdzz_zzxm_xzgd where pid = #{zzxmid} )
+            </if>
+         ) t1
+    </select>
+
+    <select id="selectSjzlXzgd"  resultType="java.util.Map">
+        select t1.geom ,ROUND(coalesce(area_number::numeric,0),2) area_number,coalesce(count_number::numeric,0) count_number,zzhdlbm,zzhdlmc from (
+        SELECT  public.st_asewkt(public.st_force2d(public.st_union(geom))) geom,
+        public.st_area( public.st_transform(public.st_union(geom),4525)) area_number,
+        count(*) count_number, zzhdlbm,zzhdlmc FROM t_qytdzz_xzgd
+        where bsm like concat( #{bsm}, '%')
+        <if test="zzxmid != null">
+            and id in ( select id from v_qytdzz_zzxm_xzgd where pid = #{zzxmid} )
+        </if>
+        group by zzhdlbm,zzhdlmc
+        ) t1
+    </select>
+
+
+    <select id="selectSjzlXzgdly"  resultType="java.util.Map">
+        select dlbm,dlmc,geom,ROUND(coalesce(area_number::numeric,0),2) area_number,coalesce(count_number::numeric,0) count_number  from (
+        select dlbm,dlmc,public.st_asewkt(public.st_force2d(public.st_union(geom))) geom,
+            public.st_area( public.st_transform(public.st_union(geom),4525)) area_number,
+               count(*) count_number  from (
+        select public.ST_Intersection(t1.geom,t2.geom) geom,t2.dlbm,t2.dlmc
+        from (
+        SELECT public.st_union(geom) geom FROM t_qytdzz_xzgd
+        where bsm like concat( #{bsm}, '%')
+        <if test="zzxmid != null">
+            and id in ( select id from v_qytdzz_zzxm_xzgd where pid = #{zzxmid} )
+        </if>
+        ) t1,tb_qytdzz_sd_zzq t2 where public.st_intersects ( t1.geom , t2.geom )
+        )v1 group by dlbm,dlmc )v2 where ROUND(coalesce(area_number::numeric,0),2) > 0
+    </select>
+
+
+    <select id="selectSjzlXzgdLylx"  resultType="java.util.Map">
+        select t1.geom ,ROUND(coalesce(area_number::numeric,0),2) area_number,coalesce(count_number::numeric,0) count_number,xzgdlydlbm zzqdlbm, concat('Q',xzgdlydlmc) zzqdlmc, zzhdlbm, concat('H',zzhdlmc) zzhdlmc from (
+         select xzgdlydlbm, xzgdlydlmc, zzhdlbm, zzhdlmc,public.st_asewkt(public.st_force2d(public.st_union(geom)))  geom, public.st_area(public.st_transform(public.st_union(geom),4525)) area_number, count(*) count_number
+         from vector.t_qytdzz_xzgd
+        where bsm like concat( #{bsm}, '%')
+        <if test="zzxmid != null">
+            and id in ( select id from v_qytdzz_zzxm_xzgd where pid = #{zzxmid} )
+        </if>
+         group by xzgdlydlbm, xzgdlydlmc, zzhdlbm, zzhdlmc
+         ) t1
+    </select>
+</mapper>