1
0
فهرست منبع

项目周期增加字段,地籍统计

chenendian 4 هفته پیش
والد
کامیت
193a2df0a5

+ 84 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/cadastre/ParcelAnalysisController.java

@@ -0,0 +1,84 @@
+package com.siwei.apply.controller.cadastre;
+
+import com.siwei.apply.domain.GongdiJihua;
+import com.siwei.apply.domain.LandType;
+import com.siwei.apply.domain.cadastre.LandSupplyReportDTO;
+import com.siwei.apply.domain.cadastre.ParcelStatisticsRes;
+import com.siwei.apply.domain.res.SupplyYearStatisticsRes;
+import com.siwei.apply.domain.res.TrendStatisticsRes;
+import com.siwei.apply.domain.vo.LandSupplyProjectVO;
+import com.siwei.apply.domain.vo.LandSupplyReportVO;
+import com.siwei.apply.domain.vo.YdbpDataFilterVo;
+import com.siwei.apply.domain.vo.YdbpExcelVo;
+import com.siwei.apply.service.cadastre.IParcelService;
+import com.siwei.apply.service.cadastre.ISupplyService;
+import com.siwei.apply.service.cadastre.IZymlService;
+import com.siwei.common.core.domain.R;
+import com.siwei.common.core.utils.bean.BeanUtils;
+import com.siwei.common.core.utils.poi.ExcelUtil;
+import com.siwei.common.core.web.controller.BaseController;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 业务分析宗地分析模块
+ *
+ */
+@RestController
+@RequestMapping("/cadastre/parcel")
+public class ParcelAnalysisController extends BaseController {
+
+    @Autowired
+    private IParcelService  parcelService;
+
+
+    /**
+     *
+     * 地籍分析接口
+     * 通过地籍代码获取年度统计数据
+     *
+     */
+    @GetMapping("/statistics/{djzqdm}")
+    public R<ParcelStatisticsRes> getStatistics(@PathVariable String djzqdm) {
+        try {
+            ParcelStatisticsRes res =  parcelService.statistics(djzqdm);
+            return R.ok(res);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.fail(e.getMessage());
+        }
+    }
+
+
+
+//    /**
+//     *
+//     * 趋势统计
+//     */
+//    @GetMapping("/trendStatistics/{landType}")
+//    public R<TrendStatisticsRes> getTrendStatistics(@PathVariable String landType) {
+//        try {
+//            TrendStatisticsRes res =  supplyService.trendStatistics(landType);
+//            return R.ok(res);
+//        } catch (Exception e) {
+//            return R.fail(e.getMessage());
+//        }
+//    }
+
+
+
+
+
+}

+ 67 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/domain/cadastre/ParcelStatisticsRes.java

@@ -0,0 +1,67 @@
+package com.siwei.apply.domain.cadastre;
+
+import lombok.Data;
+import java.util.List;
+
+/**
+ *
+ * 地籍分析vo对象
+ */
+@Data
+public class ParcelStatisticsRes {
+
+    private List<DetailDTO> landNumStatisticsList; // 宗地数统计
+    private List<TdytDTO> tdytStatisticsList; // 土地用途统计
+    private List<QlxzDTO> qlxzStatisticsList; // 权利性质统计
+    private List<QllxSuoyouquanDTO> qllxSuoyouquanStatisticsList; // 权利类型所有权统计
+    private List<QllxShiyongquanDTO> qllxShiyongquanStatisticsList; // 权利类型使用权统计
+
+
+    @Data
+    public static class DetailDTO {
+        private Integer zds; // 宗地数(个)
+        private Double zdmj; //宗地面积(亩)
+        private Double jzzmj; //建筑总面积(亩)
+        private String djzt; //登记状态 (0,全部,1-已登记。2-未登记)
+    }
+
+
+    @Data
+    public static class TdytDTO {
+        private String tdytmc; // 土地用途名称
+        private String tdytmj; // 土地用途面积(亩)
+    }
+
+
+    @Data
+    public static class QlxzDTO {
+        private String qlxzmc; // 权利性质名称
+        private String qlxzmj; // 权利性质面积(亩)
+        private String qlxzlx; // 权利性质类型(0-全部(其它),100-国有,200-集体)
+    }
+
+
+
+    /**
+     * 权利类型所有权
+     */
+    @Data
+    public static class QllxSuoyouquanDTO {
+        private String qllxsyqmc; // 权利类型名称
+        private String qllxsyqmj; // 权利类型面积(亩)
+        private String qllx; // 权利类型(0-全部,1-国有,2-集体,3-其他)
+    }
+
+    /**
+     * 权利类型使用权
+     */
+    @Data
+    public static class QllxShiyongquanDTO {
+        private String qllxsyqmc; // 权利类型名称
+        private String qllxsyqmj; // 权利类型面积(亩)
+        private String qllx; // 权利类型(0-全部,1-国有,2-集体,3-其他)
+    }
+
+
+
+}

+ 97 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/domain/cadastre/Zdjbxx.java

@@ -0,0 +1,97 @@
+package com.siwei.apply.domain.cadastre;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 宗地基本信息表 ZDJBXX
+ */
+@Data
+public class Zdjbxx {
+    private Integer bsm;
+    private String ysdm;
+    private String bdcdyh;
+    private String ybzddm;
+    private String zddm;
+    private String xmbh;
+    private String dzjgh;
+    private String glh;
+    private String zdtzm;
+    private String dclxtzm;
+    private String zl;
+    private BigDecimal zdmj;
+    private String mjdw;
+    private String yt;
+    private String ghytmc;
+    private String ydyhfl;
+    private String dj;
+    private BigDecimal jg;
+    private String jgdw;
+    private String qllx;
+    private String qlxz;
+    private String qlsdfs;
+    private BigDecimal rjl;
+    private BigDecimal jzmd;
+    private BigDecimal jzxg;
+    private String zdszd;
+    private String zdszn;
+    private String zdszx;
+    private String zdszb;
+    private byte[] zdt;
+    private String tfh;
+    private String djh;
+    private String dah;
+    private String dkdm;
+    private String bz;
+    private String zt;
+    private String djzt;
+    private String qlrsjsyrlxm;
+    private String gmjjhyfldm;
+    private String xmmc;
+    private BigDecimal zdmjzyy;
+    private String tdsjyt;
+    private String tdsjytmc;
+    private String blc;
+    private BigDecimal zjzjdmj;
+    private BigDecimal zjzmj;
+    private String jgrq;
+    private byte[] qslyzm;
+    private String qsdcjs;
+    private String gygyqk;
+    private String sm;
+    private String dcy;
+    private Date dcrq;
+    private String bdcchjs;
+    private String cly;
+    private Date clrq;
+    private String shyj;
+    private String shr;
+    private Date shrq;
+    private byte[] jzbsb;
+    private byte[] jzqzb;
+    private byte[] zdct;
+    private byte[] frsfzm;
+    private byte[] qslyzmcl;
+    private byte[] qsjxxys;
+    private byte[] qsjxxysft;
+    private byte[] zjwts;
+    private byte[] zjtzs;
+    private byte[] qxdjtzs;
+    private byte[] djclxzcxd;
+    private byte[] qszyyys;
+    private String dcdwjg;
+    private byte[] dcshb;
+    private byte[] djdcbg;
+    private byte[] bdcdyb;
+    private String tdzspfwh;
+    private byte[] tdzspfwj;
+    private String tdgywjh;
+    private byte[] tdgywj;
+    private String jsydghxkzh;
+    private byte[] jsydghxkz;
+    private byte[] tdhyjgwj;
+    private String geom;
+    private Integer validFlag;
+}

+ 50 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/mapper/cadastre/ZdjbxxMapper.java

@@ -0,0 +1,50 @@
+package com.siwei.apply.mapper.cadastre;
+
+import com.siwei.apply.domain.cadastre.Zdjbxx;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 土地供应实际用地情况表 数据层
+ */
+@Mapper
+public interface ZdjbxxMapper {
+
+    /**
+     * 新增宗地基本信息记录
+     */
+    void add(Zdjbxx zdjbxx);
+
+    /**
+     * 根据bsm获取宗地基本信息记录
+     */
+    Zdjbxx get(@Param("bsm") Integer bsm);
+
+    /**
+     * 根据项目编号获取宗地基本信息记录列表
+     */
+    List<Zdjbxx> getListByDjzqdm (@Param("djzqdm") String djzqdm);
+
+    /**
+     * 获取宗地基本信息记录列表
+     */
+    List<Zdjbxx> getList();
+
+    /**
+     * 更新宗地基本信息记录
+     */
+    void update(Zdjbxx zdjbxx);
+
+    /**
+     * 批量删除宗地基本信息记录
+     */
+    void batchDelete(@Param("bsms") List<Integer> bsms);
+
+
+    List<Map<String,Object>> getDictByType(@Param("type") String type);
+
+
+}

+ 35 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/cadastre/IParcelService.java

@@ -0,0 +1,35 @@
+package com.siwei.apply.service.cadastre;
+
+
+import com.siwei.apply.domain.GongdiJihua;
+import com.siwei.apply.domain.LandType;
+import com.siwei.apply.domain.cadastre.LandSupplyReportDTO;
+import com.siwei.apply.domain.cadastre.ParcelStatisticsRes;
+import com.siwei.apply.domain.res.SupplyYearStatisticsRes;
+import com.siwei.apply.domain.res.TrendStatisticsRes;
+import com.siwei.apply.domain.vo.LandSupplyProjectVO;
+import com.siwei.apply.domain.vo.LandSupplyReportVO;
+
+import java.util.List;
+
+
+public interface IParcelService {
+
+    ParcelStatisticsRes statistics(String djzqdm);
+
+    Object GetList(String param);
+
+    LandSupplyReportDTO getTdgyReport(String startTime,String endTime); //  supplyService.getTdgyReport(startTime,endTime);
+
+
+    TrendStatisticsRes trendStatistics(String landType);
+
+    LandSupplyReportVO getTdgyPurposeReport(String startYear, String endYear);
+
+    List<LandSupplyProjectVO> projectList(String year, Integer supplyType);
+
+    GongdiJihua getPlanProject(String id);
+
+    List<LandType> getLandTypeList();
+
+}

+ 0 - 1
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/cadastre/ISupplyService.java

@@ -16,7 +16,6 @@ public interface ISupplyService {
     Object GetList(String param);
 
     LandSupplyReportDTO getTdgyReport(String startTime,String endTime); //  supplyService.getTdgyReport(startTime,endTime);
-    //LandSupplyReportDTO getTdgyReport222(String startTime,String endTime); //  supplyService.getTdgyReport(startTime,endTime);
 
 
     SupplyYearStatisticsRes yearStatistics(String year);

+ 715 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/cadastre/impl/ParcelServiceImpl.java

@@ -0,0 +1,715 @@
+package com.siwei.apply.service.cadastre.impl;
+
+import com.siwei.apply.domain.GongdiJihua;
+import com.siwei.apply.domain.LandType;
+import com.siwei.apply.domain.cadastre.LandSupplyReportDTO;
+import com.siwei.apply.domain.cadastre.ParcelStatisticsRes;
+import com.siwei.apply.domain.cadastre.Zdjbxx;
+import com.siwei.apply.domain.res.*;
+import com.siwei.apply.domain.vo.GongdiJihuaFilterVo;
+import com.siwei.apply.domain.vo.LandSupplyProjectVO;
+import com.siwei.apply.domain.vo.LandSupplyReportVO;
+import com.siwei.apply.enums.LandUseTypeEnum;
+import com.siwei.apply.mapper.GongdiJihuaMapper;
+import com.siwei.apply.mapper.LandTypeMapper;
+import com.siwei.apply.mapper.TdgyMapper;
+import com.siwei.apply.mapper.cadastre.ZdjbxxMapper;
+import com.siwei.apply.service.cadastre.IParcelService;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.MapUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.*;
+import java.util.stream.Collectors;
+
+@Service
+public class ParcelServiceImpl implements IParcelService {
+
+    @Autowired
+    private ZdjbxxMapper zdjbxxMapper;
+
+    @Autowired
+    private GongdiJihuaMapper gongdiJihuaMapper;
+
+    @Autowired
+    private TdgyMapper dgyMapper;
+
+    @Autowired
+    private LandTypeMapper landTypeMapper;
+
+
+    @Override
+    public Object GetList(String param) {
+        return null;
+    }
+
+
+    /**
+     * 地籍统计
+     * @param djzqdm
+     * @return
+     */
+    @Override
+    public ParcelStatisticsRes statistics(String djzqdm) {
+        ParcelStatisticsRes res = new ParcelStatisticsRes();
+        List<Zdjbxx> zdjbxxList = zdjbxxMapper.getListByDjzqdm(djzqdm);
+
+        List<ParcelStatisticsRes.DetailDTO> detailList = new ArrayList<>();
+        List<ParcelStatisticsRes.TdytDTO> tdytStatisticsList = new ArrayList<>();
+        List<ParcelStatisticsRes.QlxzDTO> qlxzStatisticsList = new ArrayList<>(); // 权利性质统计
+        List<ParcelStatisticsRes.QllxSuoyouquanDTO> qllxSuoyouquanStatisticsList= new ArrayList<>(); // 权利类型所有权统计
+        List<ParcelStatisticsRes.QllxShiyongquanDTO> qllxShiyongquanStatisticsList= new ArrayList<>(); // 权利类型使用权统计
+
+
+
+
+        if (CollectionUtils.isNotEmpty(zdjbxxList)) {
+            List<Zdjbxx> registeredList = new ArrayList<>();
+            List<Zdjbxx> unregisteredList = new ArrayList<>();
+
+            for (Zdjbxx zdjbxx : zdjbxxList) {
+                String djzt = zdjbxx.getDjzt();
+                if ("1".equals(djzt)) {
+                    registeredList.add(zdjbxx);
+                } else if ("2".equals(djzt) || "3".equals(djzt)) {
+                    unregisteredList.add(zdjbxx);
+                }
+            }
+
+            detailList.add(buildDetailDTO(registeredList, "0"));
+            detailList.add(buildDetailDTO(unregisteredList, "2"));
+            detailList.add(buildDetailDTO(zdjbxxList, "1"));
+            res.setLandNumStatisticsList(detailList);
+
+            //todo 第二部分,主要填充tdytStatisticsList这个对象,统计查询出来的地籍数据的土地用途统计、
+            // 获取所有一级分类
+            List<LandType> landTypeList = landTypeMapper.selectFirstLevel();
+            Map<String,List<Zdjbxx>> groupedByYtMap = new LinkedHashMap<>();
+            landTypeList.forEach(item -> {
+                String value = item.getCode();
+                String name = item.getName();
+                List<Zdjbxx> filterList = zdjbxxList.stream().filter(zd-> StringUtils.isNotBlank(zd.getYt())).filter(zd -> value.equals(zd.getYt().substring(0,2))).collect(Collectors.toList());
+                if(CollectionUtils.isNotEmpty(filterList)){
+                    groupedByYtMap.put(name, filterList);
+                }
+            });
+
+            //这里遍历map,然后进行统计数据;
+            if(MapUtils.isNotEmpty(groupedByYtMap)){
+                for(Map.Entry<String, List<Zdjbxx>> entry : groupedByYtMap.entrySet()){
+                    ParcelStatisticsRes.TdytDTO tdytDTO = new ParcelStatisticsRes.TdytDTO();
+                    tdytDTO.setTdytmc(entry.getKey());
+                    double totalArea = 0.0;
+                    for(Zdjbxx zd : entry.getValue()) {
+                        totalArea += convertAreaToMu(zd.getZdmj(), zd.getMjdw());
+                    }
+                    tdytDTO.setTdytmj(String.format("%.2f", totalArea));
+                    tdytStatisticsList.add(tdytDTO);
+                }
+            }
+            res.setTdytStatisticsList(tdytStatisticsList);
+            //todo 第三部分,权利性质统计和权利类型统计,这里需要根据查询出来的地籍数据中的权利性质和权利类型进行统计,统计出每种权利性质和权利类型的面积占比,然后填充到qlxzStatisticsList、qllxSuoyouquanStatisticsList、qllxShiyongquanStatisticsList这三个对象中
+            Map<String,List<Zdjbxx>> qlxzGroupedByYtMap = new LinkedHashMap<>();
+            zdjbxxMapper.getDictByType("A7").forEach(item -> {
+                String name = item.get("name").toString();
+                String value = item.get("value").toString();
+                List<Zdjbxx> filterList = zdjbxxList.stream().filter(zd-> StringUtils.isNotBlank(zd.getYt())).filter(zd -> value.equals(zd.getYt().substring(0,2))).collect(Collectors.toList());
+                if(CollectionUtils.isNotEmpty(filterList)){
+                    qlxzGroupedByYtMap.put(name, filterList);
+                }
+            });
+
+            //这里遍历map,然后进行统计数据;
+            if(MapUtils.isNotEmpty(qlxzGroupedByYtMap)){
+                for(Map.Entry<String, List<Zdjbxx>> entry : qlxzGroupedByYtMap.entrySet()){
+                    ParcelStatisticsRes.QlxzDTO qlxzDTO = new ParcelStatisticsRes.QlxzDTO();
+                    qlxzDTO.setQlxzmc(entry.getKey());
+                    double totalArea = 0.0;
+                    for(Zdjbxx zd : entry.getValue()) {
+                        totalArea += convertAreaToMu(zd.getZdmj(), zd.getMjdw());
+                    }
+                    if(entry.getKey().contains("国有土地")){
+                        qlxzDTO.setQlxzlx("100");
+                    }else if(entry.getKey().contains("集体土地")){
+                        qlxzDTO.setQlxzlx("200");
+                    }else {
+                        qlxzDTO.setQlxzlx("0");
+                    }
+                    qlxzDTO.setQlxzmj(String.format("%.2f", totalArea));
+                    qlxzStatisticsList.add(qlxzDTO);
+                }
+            }
+            res.setQlxzStatisticsList(qlxzStatisticsList);
+
+
+            //todo 第四部分:
+            qllxSuoyouquanStatisticsList.add(null);
+
+
+
+
+
+        }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        return res;
+    }
+
+
+
+
+
+
+
+
+
+
+
+    private ParcelStatisticsRes.DetailDTO buildDetailDTO(List<Zdjbxx> zdjbxxList, String djzt) {
+        ParcelStatisticsRes.DetailDTO detail = new ParcelStatisticsRes.DetailDTO();
+        detail.setDjzt(djzt);
+
+        int zds = zdjbxxList.size();
+        double totalZdmj = 0.0;
+        double totalZjzmj = 0.0;
+
+        for (Zdjbxx zdjbxx : zdjbxxList) {
+            double zdmj = convertAreaToMu(zdjbxx.getZdmj(), zdjbxx.getMjdw());
+            totalZdmj += zdmj;
+
+            double zjzmj = convertAreaToMu(zdjbxx.getZjzmj(), zdjbxx.getMjdw());
+            totalZjzmj += zjzmj;
+        }
+
+        detail.setZds(zds);
+        detail.setZdmj(totalZdmj);
+        detail.setJzzmj(totalZjzmj);
+
+        return detail;
+    }
+
+    private double convertAreaToMu(BigDecimal area, String mjdw) {
+        if (area == null) {
+            return 0.0;
+        }
+        double areaValue = area.doubleValue();
+        if (mjdw == null) {
+            return areaValue;
+        }
+        switch (mjdw) {
+            case "1":
+                return areaValue / 666.6666667;
+            case "2":
+                return areaValue;
+            case "3":
+                return areaValue * 15;
+            case "4":
+                return areaValue * 1500;
+            default:
+                return areaValue;
+        }
+    }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    /**
+     *
+     * @param landType
+     * @return
+     */
+    @Override
+    public TrendStatisticsRes trendStatistics(String landType) {
+
+        List<TdgyStatisticsRes> completeList = dgyMapper.getListByYear(null, landType, null, null);
+
+        TrendStatisticsRes res = new TrendStatisticsRes();
+        List<Map<String, Object>> areaTrendStatisticsList = new ArrayList<>();
+        List<Map<String, Object>> supplyModeStatisticsList = new ArrayList<>();
+
+        if (CollectionUtils.isNotEmpty(completeList)) {
+            Map<Integer, Double> areaByYear = new LinkedHashMap<>();
+            Map<Integer, Map<String, Double>> modeAreaByYear = new LinkedHashMap<>();
+
+            for (TdgyStatisticsRes item : completeList) {
+                if (item.getGysj() != null) {
+                    int year = item.getGysj().getYear() + 1900;
+                    double area = item.getMjMu() != null ? item.getMjMu().doubleValue() : 0.0;
+                    String gyfs = item.getGyfs();
+
+                    areaByYear.merge(year, area, Double::sum);
+
+                    Map<String, Double> yearModeMap = modeAreaByYear.computeIfAbsent(year, k -> new HashMap<>());
+                    if ("划拨".equals(gyfs)) {
+                        yearModeMap.merge("allocate", area, Double::sum);
+                    } else if ("出让".equals(gyfs)) {
+                        yearModeMap.merge("transfer", area, Double::sum);
+                    } else {
+                        yearModeMap.merge("other", area, Double::sum);
+                    }
+                }
+            }
+
+            areaByYear.forEach((year, area) -> {
+                Map<String, Object> map = new LinkedHashMap<>();
+                map.put("year", year);
+                map.put("area", area);
+                areaTrendStatisticsList.add(map);
+            });
+
+            modeAreaByYear.forEach((year, modeAreas) -> {
+                Map<String, Object> map = new LinkedHashMap<>();
+                map.put("year", year);
+                map.put("transferArea", modeAreas.getOrDefault("transfer", 0.0));
+                map.put("allocateArea", modeAreas.getOrDefault("allocate", 0.0));
+                map.put("otherArea", modeAreas.getOrDefault("other", 0.0));
+                supplyModeStatisticsList.add(map);
+            });
+        }
+        res.setAreaTrendStatisticsList(areaTrendStatisticsList);
+        res.setSupplyModeStatisticsList(supplyModeStatisticsList);
+        return res;
+    }
+
+
+    @Override
+    public LandSupplyReportDTO getTdgyReport(String startTime, String endTime) {
+        LandSupplyReportDTO report = new LandSupplyReportDTO();
+        report.setTitle("土地供应进度分析报表");
+        report.setStatTimeRange(startTime + " 至 " + endTime);
+
+        // 获取时间范围内的完成数据
+        List<TdgyStatisticsRes> completeList = dgyMapper.getListByYear(null, null, startTime, endTime);
+
+        // 获取时间范围内的计划数据
+        Map<String, Object> planSummary = gongdiJihuaMapper.getPlanSummaryByTimeRange(startTime, endTime);
+        List<Map<String, Object>> planStatsByLandType = gongdiJihuaMapper.getPlanStatsByLandType(startTime, endTime);
+
+        // 获取所有一级分类
+        List<LandType> landTypeList = landTypeMapper.selectFirstLevel();
+        Map<String, String> codeToFirstName = landTypeList.stream()
+                .collect(Collectors.toMap(LandType::getCode, LandType::getName, (v1, v2) -> v1));
+
+        // 按一级分类名称汇总统计数据的 Map
+        Map<String, LandSupplyReportDTO.DetailDTO> detailMap = new HashMap<>();
+
+        // 1. 统计计划数据并按一级分类归类
+        for (Map<String, Object> landTypeStat : planStatsByLandType) {
+            String category = (String) landTypeStat.get("category");
+            String parentName = "其他";
+            
+            // 通过枚举查找对应的一级分类名称
+            for (LandUseTypeEnum type : LandUseTypeEnum.values()) {
+                if (type.getName().equals(category)) {
+                    parentName = type.getParentName();
+                    break;
+                }
+            }
+
+            LandSupplyReportDTO.DetailDTO detail = detailMap.computeIfAbsent(parentName, k -> {
+                LandSupplyReportDTO.DetailDTO d = new LandSupplyReportDTO.DetailDTO();
+                d.setCategory(k);
+                d.setPlan(new LandSupplyReportDTO.PlanDTO());
+                d.getPlan().setArea(0.0);
+                d.getPlan().setCount(0);
+                d.getPlan().setTransfer(0);
+                d.getPlan().setAllocation(0);
+                d.getPlan().setOther(0);
+                d.setCompleted(new LandSupplyReportDTO.CompletedDTO());
+                d.getCompleted().setArea(0.0);
+                d.getCompleted().setCount(0);
+                d.getCompleted().setTransfer(0);
+                d.getCompleted().setAllocation(0);
+                d.getCompleted().setOther(0);
+                return d;
+            });
+
+            LandSupplyReportDTO.PlanDTO plan = detail.getPlan();
+            plan.setArea(plan.getArea() + toDouble(landTypeStat.get("planmu")));
+            plan.setCount(plan.getCount() + toInteger(landTypeStat.get("plancount")));
+            plan.setTransfer(plan.getTransfer() + toInteger(landTypeStat.get("plantransfer")));
+            plan.setAllocation(plan.getAllocation() + toInteger(landTypeStat.get("planallocation")));
+            plan.setOther(plan.getOther() + toInteger(landTypeStat.get("planother")));
+        }
+
+        // 2. 统计完成数据并按一级分类归类
+        if (CollectionUtils.isNotEmpty(completeList)) {
+            for (TdgyStatisticsRes item : completeList) {
+                String tdyt = item.getTdyt();
+                String parentName = "其他";
+                if (tdyt != null && tdyt.length() >= 2) {
+                    String firstLevelCode = tdyt.substring(0, 2);
+                    parentName = codeToFirstName.getOrDefault(firstLevelCode, "其他");
+                }
+
+                LandSupplyReportDTO.DetailDTO detail = detailMap.computeIfAbsent(parentName, k -> {
+                    LandSupplyReportDTO.DetailDTO d = new LandSupplyReportDTO.DetailDTO();
+                    d.setCategory(k);
+                    d.setPlan(new LandSupplyReportDTO.PlanDTO());
+                    d.getPlan().setArea(0.0);
+                    d.getPlan().setCount(0);
+                    d.getPlan().setTransfer(0);
+                    d.getPlan().setAllocation(0);
+                    d.getPlan().setOther(0);
+                    d.setCompleted(new LandSupplyReportDTO.CompletedDTO());
+                    d.getCompleted().setArea(0.0);
+                    d.getCompleted().setCount(0);
+                    d.getCompleted().setTransfer(0);
+                    d.getCompleted().setAllocation(0);
+                    d.getCompleted().setOther(0);
+                    return d;
+                });
+
+                LandSupplyReportDTO.CompletedDTO completed = detail.getCompleted();
+                double area = item.getMjMu() != null ? item.getMjMu().doubleValue() : 0.0;
+                completed.setArea(completed.getArea() + area);
+                completed.setCount(completed.getCount() + 1);
+                
+                String gyfs = item.getGyfs();
+                if ("出让".equals(gyfs)) {
+                    int transfer = completed.getTransfer()+1;
+                    completed.setTransfer(transfer);
+                } else if ("划拨".equals(gyfs)) {
+                    int allocation = completed.getAllocation()+1;
+                    completed.setAllocation(allocation);
+                } else {
+                    int other = completed.getOther()+1;
+                    completed.setOther(other);
+                }
+            }
+        }
+
+
+        // 3. 构建 Summary
+        LandSupplyReportDTO.SummaryDTO summary = new LandSupplyReportDTO.SummaryDTO();
+        LandSupplyReportDTO.TotalDTO total = buildTotalDTO(planSummary);
+        
+        // 重新计算 Total 的 Completed 部分,因为之前 buildTotalDTO 填充的是 0
+        if (CollectionUtils.isNotEmpty(completeList)) {
+            double totalArea = completeList.stream().filter(g -> g.getMjMu() != null).mapToDouble(g -> g.getMjMu().doubleValue()).sum();
+            long totalTransfer = completeList.stream().filter(g -> "出让".equals(g.getGyfs())).count();
+            long totalAllocation = completeList.stream().filter(g -> "划拨".equals(g.getGyfs()) ).count();
+            long totalOther =  completeList.size() - totalTransfer - totalAllocation;
+            total.setCompleted(buildCompletedDTO(totalArea, completeList.size(), (int) totalTransfer,  (int) totalAllocation,  (int) totalOther));
+            double planArea = total.getPlan().getArea();
+            if (planArea > 0) {
+                total.setSupplyRate(String.format("%.2f%%", (totalArea / planArea) * 100));
+            } else {
+                total.setSupplyRate("0%");
+            }
+        }
+        
+        summary.setTotal(total);
+        report.setSummary(summary);
+
+        // 4. 构建 Details 列表并计算供应率
+        List<LandSupplyReportDTO.DetailDTO> details = new ArrayList<>(detailMap.values());
+        for (LandSupplyReportDTO.DetailDTO detail : details) {
+            double planArea = detail.getPlan().getArea();
+            double completedArea = detail.getCompleted().getArea();
+            if (planArea > 0) {
+                detail.setSupplyRate(String.format("%.2f%%", (completedArea / planArea) * 100));
+            } else {
+                detail.setSupplyRate("0%");
+            }
+        }
+        
+        // 按计划面积排序
+        details.sort((d1, d2) -> d2.getPlan().getArea().compareTo(d1.getPlan().getArea()));
+        report.setDetails(details);
+
+        return report;
+    }
+
+
+
+    @Override
+    public LandSupplyReportVO getTdgyPurposeReport(String startYear, String endYear){
+        //List<TdgyStatisticsRes> completeList = dgyMapper.getListByYear(null, null, startYear, endYear);
+        //todo 这里需要修改
+        SupplyYearStatisticsRes res = new SupplyYearStatisticsRes();
+        GongdiJihuaFilterVo filterVo = new GongdiJihuaFilterVo();
+        filterVo.setPageSize(100000);
+        List<GongdiJihua> completeList = gongdiJihuaMapper.getList(filterVo);
+
+        if (CollectionUtils.isEmpty(completeList)) {
+            return new LandSupplyReportVO();
+        }
+
+        LandSupplyReportVO report = new LandSupplyReportVO();
+        
+        // 1. 获取一级分类映射
+        List<LandType> landTypeList = landTypeMapper.selectFirstLevel();
+        Map<String, String> codeToFirstName = landTypeList.stream()
+                .collect(Collectors.toMap(LandType::getCode, LandType::getName, (v1, v2) -> v1));
+
+        // 2. 统计年份并排序
+        Set<Integer> yearSet = new TreeSet<>();
+        for (GongdiJihua item : completeList) {
+            if (item.getGysj() != null) {
+                yearSet.add(item.getGysj().getYear() + 1900);
+            }
+        }
+        report.setYears(new ArrayList<>(yearSet));
+
+        // 3. 按一级分类、供应方式、年份进行汇总统计
+        // Map<一级分类名称, Map<供应方式, Map<年份, 面积汇总>>>
+        Map<String, Map<String, Map<String, Double>>> stats = new HashMap<>();
+
+        for (GongdiJihua item : completeList) {
+            if (item.getGysj() == null || item.getTdyt() == null || item.getTdyt().length() < 2) continue;
+            String firstLevelCode  = LandUseTypeEnum.getCodeByName(item.getTdyt());
+            //todo 这里需要修改
+            //String firstLevelCode = item.getTdyt().substring(0, 2);
+            String parentName = codeToFirstName.getOrDefault(firstLevelCode, "其他");
+            String year = String.valueOf(item.getGysj().getYear() + 1900);
+            String gyfs = "划拨".equals(item.getGyfs()) ? "划拨" : ("出让".equals(item.getGyfs()) ? "出让" : "其他");
+            double area = item.getMjMu() != null ? item.getMjMu().doubleValue() : 0.0;
+
+            stats.computeIfAbsent(parentName, k -> new HashMap<>())
+                 .computeIfAbsent(gyfs, k -> new HashMap<>())
+                 .merge(year, area, Double::sum);
+        }
+
+        // 4. 构建返回对象数据
+        List<LandSupplyReportVO.LandTypeData> dataList = new ArrayList<>();
+        
+        for (LandType lt : landTypeList) {
+            String parentName = lt.getName();
+            Map<String, Map<String, Double>> modeMap = stats.get(parentName);
+            if (modeMap == null) continue;
+
+            LandSupplyReportVO.LandTypeData landTypeData = new LandSupplyReportVO.LandTypeData();
+            landTypeData.setLandType(parentName);
+
+            // 划拨数据
+            landTypeData.setAllocation(buildCategoryData(modeMap.get("划拨"), report.getYears()));
+            // 出让数据
+            landTypeData.setTransfer(buildCategoryData(modeMap.get("出让"), report.getYears()));
+            
+            // 总计数据
+            LandSupplyReportVO.CategoryData totalData = new LandSupplyReportVO.CategoryData();
+            Map<String, Double> totalYearData = new LinkedHashMap<>();
+            double grandTotal = 0.0;
+            for (Integer y : report.getYears()) {
+                String yearStr = String.valueOf(y);
+                double areaSum = 0.0;
+                if (modeMap.get("划拨") != null) areaSum += modeMap.get("划拨").getOrDefault(yearStr, 0.0);
+                if (modeMap.get("出让") != null) areaSum += modeMap.get("出让").getOrDefault(yearStr, 0.0);
+                if (modeMap.get("其他") != null) areaSum += modeMap.get("其他").getOrDefault(yearStr, 0.0);
+                
+                totalYearData.put(yearStr, areaSum);
+                grandTotal += areaSum;
+            }
+            totalData.setTotal(grandTotal);
+            totalData.setYearData(totalYearData);
+            landTypeData.setTotal(totalData);
+
+            dataList.add(landTypeData);
+        }
+        report.setData(dataList);
+
+        return report;
+    }
+
+    private LandSupplyReportVO.CategoryData buildCategoryData(Map<String, Double> yearCounts, List<Integer> years) {
+        LandSupplyReportVO.CategoryData data = new LandSupplyReportVO.CategoryData();
+        Map<String, Double> yearData = new LinkedHashMap<>();
+        double total = 0.0;
+        for (Integer y : years) {
+            String yearStr = String.valueOf(y);
+            double areaSum = yearCounts != null ? yearCounts.getOrDefault(yearStr, 0.0) : 0.0;
+            yearData.put(yearStr, areaSum);
+            total += areaSum;
+        }
+        data.setTotal(total);
+        data.setYearData(yearData);
+        return data;
+    }
+
+
+    /**
+     * supplyType (1-计划,2-完成)
+     * @param year
+     * @param supplyType
+     * @return
+     */
+    @Override
+    public List<LandSupplyProjectVO>  projectList(String year, Integer supplyType) {
+        List<LandSupplyProjectVO> resList = new ArrayList<>();
+        if(supplyType== 1){
+            GongdiJihuaFilterVo filterVo = new GongdiJihuaFilterVo();
+            filterVo.setYear(year);
+            filterVo.setPageSize(100000);
+            List<GongdiJihua> planList = gongdiJihuaMapper.getList(filterVo);
+            resList = planList.stream().map(item -> {
+                LandSupplyProjectVO vo = new LandSupplyProjectVO();
+                vo.setProjectPropertyId(String.valueOf(item.getGid()));
+                vo.setProjectName(item.getXmmc());
+                vo.setCompanyName("暂无");
+                vo.setSupplyMethod(item.getGyfs());
+                vo.setSupplyType(supplyType.toString());
+                vo.setGeom(item.getGeom());
+                return vo;
+            }).collect(Collectors.toList());
+        }else if(supplyType == 2){
+             List<TdgyStatisticsRes> completeList = dgyMapper.getListByYear(year, null, null, null);
+             resList = completeList.stream().map(item -> {
+                 LandSupplyProjectVO vo = new LandSupplyProjectVO();
+                 vo.setProjectPropertyId(item.getProjectId());
+                 vo.setProjectName(item.getXmmc());
+                 vo.setCompanyName(item.getCompany());
+                 vo.setSupplyMethod(item.getGyfs());
+                 vo.setSupplyType(supplyType.toString());
+                 vo.setNodeId(item.getNodeId());
+                 vo.setGeom(item.getGeom());
+                 return vo;
+             }).collect(Collectors.toList());
+        } else if(supplyType == 0){
+
+            GongdiJihuaFilterVo filterVo = new GongdiJihuaFilterVo();
+            filterVo.setYear(year);
+            filterVo.setPageSize(100000);
+
+            List<GongdiJihua> planList = gongdiJihuaMapper.getList(filterVo);
+            List<LandSupplyProjectVO> resList1 = planList.stream().map(item -> {
+                LandSupplyProjectVO vo = new LandSupplyProjectVO();
+                vo.setProjectPropertyId(String.valueOf(item.getGid()));
+                vo.setProjectName(item.getXmmc());
+                vo.setCompanyName("暂无");
+                vo.setSupplyMethod(item.getGyfs());
+                vo.setSupplyType(supplyType.toString());
+                vo.setGeom(item.getGeom());
+                return vo;
+            }).collect(Collectors.toList());
+
+
+            List<TdgyStatisticsRes> completeList = dgyMapper.getListByYear(year, null, null, null);
+            List<LandSupplyProjectVO> resList2 = completeList.stream().map(item -> {
+                LandSupplyProjectVO vo = new LandSupplyProjectVO();
+                vo.setProjectPropertyId(item.getProjectId());
+                vo.setProjectName(item.getXmmc());
+                vo.setCompanyName(item.getCompany());
+                vo.setSupplyMethod(item.getGyfs());
+                vo.setSupplyType(supplyType.toString());
+                vo.setNodeId(item.getNodeId());
+                vo.setGeom(item.getGeom());
+                return vo;
+            }).collect(Collectors.toList());
+            if(CollectionUtils.isNotEmpty(resList1)) {
+                resList.addAll(resList1);
+            }
+            if(CollectionUtils.isNotEmpty(resList2)) {
+                resList.addAll(resList2);
+            }
+        }
+        return resList;
+    }
+
+    @Override
+    public GongdiJihua getPlanProject(String id) {
+        return null;
+    }
+
+
+    @Override
+    public List<LandType> getLandTypeList() {
+        // 获取所有一级分类
+        List<LandType> landTypeList = landTypeMapper.selectFirstLevel();
+        return landTypeList;
+    }
+
+
+
+    private LandSupplyReportDTO.TotalDTO buildTotalDTO(Map<String, Object> summary) {
+        LandSupplyReportDTO.TotalDTO total = new LandSupplyReportDTO.TotalDTO();
+        total.setSupplyRate("0%");
+
+        LandSupplyReportDTO.PlanDTO plan = new LandSupplyReportDTO.PlanDTO();
+        plan.setArea(toDouble(summary.get("planmu")));
+        plan.setCount(toInteger(summary.get("plancount")));
+        plan.setTransfer(toInteger(summary.get("plantransfer")));
+        plan.setAllocation(toInteger(summary.get("planallocation")));
+        plan.setOther(toInteger(summary.get("planother")));
+        total.setPlan(plan);
+
+        LandSupplyReportDTO.CompletedDTO completed = new LandSupplyReportDTO.CompletedDTO();
+        completed.setArea(0.0);
+        completed.setCount(0);
+        completed.setTransfer(0);
+        completed.setAllocation(0);
+        completed.setOther(0);
+        total.setCompleted(completed);
+
+        return total;
+    }
+
+
+
+    private LandSupplyReportDTO.CompletedDTO buildCompletedDTO(Double area, Integer count, Integer transfer, Integer allocation, Integer other) {
+        LandSupplyReportDTO.CompletedDTO completed = new LandSupplyReportDTO.CompletedDTO();
+        completed.setArea(area);
+        completed.setCount(count);
+        completed.setTransfer(transfer);
+        completed.setAllocation(allocation);
+        completed.setOther(other);
+        return completed;
+    }
+
+    private String convertCategory(String category) {
+        if (category == null || category.equals("未知")) {
+            return "其他";
+        }
+        return category;
+    }
+
+    private Double toDouble(Object value) {
+        if (value == null) {
+            return 0.0;
+        }
+        if (value instanceof Number) {
+            return ((Number) value).doubleValue();
+        }
+        return 0.0;
+    }
+
+    private Integer toInteger(Object value) {
+        if (value == null) {
+            return 0;
+        }
+        if (value instanceof Number) {
+            return ((Number) value).intValue();
+        }
+        return 0;
+    }
+}

+ 0 - 5
siwei-modules/siwei-apply/src/main/resources/mapper/LandTypeMapper.xml

@@ -26,9 +26,4 @@
 
 
 
-
-
-
-
-
 </mapper>

+ 221 - 0
siwei-modules/siwei-apply/src/main/resources/mapper/cadastre/ZdjbxxMapper.xml

@@ -0,0 +1,221 @@
+<?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.siwei.apply.mapper.cadastre.ZdjbxxMapper">
+
+    <resultMap id="BaseResultMap" type="com.siwei.apply.domain.cadastre.Zdjbxx">
+        <id column="bsm" property="bsm"/>
+        <result column="ysdm" property="ysdm"/>
+        <result column="bdcdyh" property="bdcdyh"/>
+        <result column="ybzddm" property="ybzddm"/>
+        <result column="zddm" property="zddm"/>
+        <result column="xmbh" property="xmbh"/>
+        <result column="dzjgh" property="dzjgh"/>
+        <result column="glh" property="glh"/>
+        <result column="zdtzm" property="zdtzm"/>
+        <result column="dclxtzm" property="dclxtzm"/>
+        <result column="zl" property="zl"/>
+        <result column="zdmj" property="zdmj"/>
+        <result column="mjdw" property="mjdw"/>
+        <result column="yt" property="yt"/>
+        <result column="ghytmc" property="ghytmc"/>
+        <result column="ydyhfl" property="ydyhfl"/>
+        <result column="dj" property="dj"/>
+        <result column="jg" property="jg"/>
+        <result column="jgdw" property="jgdw"/>
+        <result column="qllx" property="qllx"/>
+        <result column="qlxz" property="qlxz"/>
+        <result column="qlsdfs" property="qlsdfs"/>
+        <result column="rjl" property="rjl"/>
+        <result column="jzmd" property="jzmd"/>
+        <result column="jzxg" property="jzxg"/>
+        <result column="zdszd" property="zdszd"/>
+        <result column="zdszn" property="zdszn"/>
+        <result column="zdszx" property="zdszx"/>
+        <result column="zdszb" property="zdszb"/>
+        <result column="tfh" property="tfh"/>
+        <result column="djh" property="djh"/>
+        <result column="dah" property="dah"/>
+        <result column="dkdm" property="dkdm"/>
+        <result column="bz" property="bz"/>
+        <result column="zt" property="zt"/>
+        <result column="djzt" property="djzt"/>
+        <result column="qlrsjsyrlxm" property="qlrsjsyrlxm"/>
+        <result column="gmjjhyfldm" property="gmjjhyfldm"/>
+        <result column="xmmc" property="xmmc"/>
+        <result column="zdmjzyy" property="zdmjzyy"/>
+        <result column="tdsjyt" property="tdsjyt"/>
+        <result column="tdsjytmc" property="tdsjytmc"/>
+        <result column="blc" property="blc"/>
+        <result column="zjzjdmj" property="zjzjdmj"/>
+        <result column="zjzmj" property="zjzmj"/>
+        <result column="jgrq" property="jgrq"/>
+        <result column="qsdcjs" property="qsdcjs"/>
+        <result column="gygyqk" property="gygyqk"/>
+        <result column="sm" property="sm"/>
+        <result column="dcy" property="dcy"/>
+        <result column="dcrq" property="dcrq"/>
+        <result column="bdcchjs" property="bdcchjs"/>
+        <result column="cly" property="cly"/>
+        <result column="clrq" property="clrq"/>
+        <result column="shyj" property="shyj"/>
+        <result column="shr" property="shr"/>
+        <result column="shrq" property="shrq"/>
+        <result column="dcdwjg" property="dcdwjg"/>
+        <result column="tdzspfwh" property="tdzspfwh"/>
+        <result column="tdgywjh" property="tdgywjh"/>
+        <result column="jsydghxkzh" property="jsydghxkzh"/>
+        <result column="geom" property="geom"/>
+        <result column="valid_flag" property="validFlag"/>
+    </resultMap>
+
+    <insert id="add" parameterType="com.siwei.apply.domain.cadastre.Zdjbxx">
+        INSERT INTO vector.zdjbxx (
+            bsm, ysdm, bdcdyh, ybzddm, zddm, xmbh, dzjgh, glh, zdtzm, dclxtzm,
+            zl, zdmj, mjdw, yt, ghytmc, ydyhfl, dj, jg, jgdw, qllx, qlxz, qlsdfs,
+            rjl, jzmd, jzxg, zdszd, zdszn, zdszx, zdszb, tfh, djh, dah, dkdm, bz,
+            zt, djzt, qlrsjsyrlxm, gmjjhyfldm, xmmc, zdmjzyy, tdsjyt, tdsjytmc,
+            blc, zjzjdmj, zjzmj, jgrq, qsdcjs, gygyqk, sm, dcy, dcrq, bdcchjs,
+            cly, clrq, shyj, shr, shrq, dcdwjg, tdzspfwh, tdgywjh, jsydghxkzh,
+            geom, valid_flag
+        ) VALUES (
+            #{bsm}, #{ysdm}, #{bdcdyh}, #{ybzddm}, #{zddm}, #{xmbh}, #{dzjgh}, #{glh},
+            #{zdtzm}, #{dclxtzm}, #{zl}, #{zdmj}, #{mjdw}, #{yt}, #{ghytmc}, #{ydyhfl},
+            #{dj}, #{jg}, #{jgdw}, #{qllx}, #{qlxz}, #{qlsdfs}, #{rjl}, #{jzmd},
+            #{jzxg}, #{zdszd}, #{zdszn}, #{zdszx}, #{zdszb}, #{tfh}, #{djh}, #{dah},
+            #{dkdm}, #{bz}, #{zt}, #{djzt}, #{qlrsjsyrlxm}, #{gmjjhyfldm}, #{xmmc},
+            #{zdmjzyy}, #{tdsjyt}, #{tdsjytmc}, #{blc}, #{zjzjdmj}, #{zjzmj},
+            #{jgrq}, #{qsdcjs}, #{gygyqk}, #{sm}, #{dcy}, #{dcrq}, #{bdcchjs},
+            #{cly}, #{clrq}, #{shyj}, #{shr}, #{shrq}, #{dcdwjg}, #{tdzspfwh},
+            #{tdgywjh}, #{jsydghxkzh}, #{geom}, #{validFlag}
+        )
+    </insert>
+
+    <select id="get" resultMap="BaseResultMap">
+        SELECT *
+        FROM vector.zdjbxx
+        WHERE bsm = #{bsm}
+    </select>
+
+    <select id="getListByDjzqdm" resultMap="BaseResultMap">
+        SELECT *
+        FROM vector.zdjbxx
+        <where>
+            <if test="djzqdm != null and djzqdm != ''">
+                and  LEFT(zddm, 12) = #{djzqdm}
+            </if>
+        </where>
+    </select>
+
+
+
+    <select id="getList" resultMap="BaseResultMap">
+        SELECT *
+        FROM vector.zdjbxx
+    </select>
+
+    <update id="update" parameterType="com.siwei.apply.domain.cadastre.Zdjbxx">
+        UPDATE vector.zdjbxx
+        <set>
+            <if test="ysdm != null">ysdm = #{ysdm},</if>
+            <if test="bdcdyh != null">bdcdyh = #{bdcdyh},</if>
+            <if test="ybzddm != null">ybzddm = #{ybzddm},</if>
+            <if test="zddm != null">zddm = #{zddm},</if>
+            <if test="xmbh != null">xmbh = #{xmbh},</if>
+            <if test="dzjgh != null">dzjgh = #{dzjgh},</if>
+            <if test="glh != null">glh = #{glh},</if>
+            <if test="zdtzm != null">zdtzm = #{zdtzm},</if>
+            <if test="dclxtzm != null">dclxtzm = #{dclxtzm},</if>
+            <if test="zl != null">zl = #{zl},</if>
+            <if test="zdmj != null">zdmj = #{zdmj},</if>
+            <if test="mjdw != null">mjdw = #{mjdw},</if>
+            <if test="yt != null">yt = #{yt},</if>
+            <if test="ghytmc != null">ghytmc = #{ghytmc},</if>
+            <if test="ydyhfl != null">ydyhfl = #{ydyhfl},</if>
+            <if test="dj != null">dj = #{dj},</if>
+            <if test="jg != null">jg = #{jg},</if>
+            <if test="jgdw != null">jgdw = #{jgdw},</if>
+            <if test="qllx != null">qllx = #{qllx},</if>
+            <if test="qlxz != null">qlxz = #{qlxz},</if>
+            <if test="qlsdfs != null">qlsdfs = #{qlsdfs},</if>
+            <if test="rjl != null">rjl = #{rjl},</if>
+            <if test="jzmd != null">jzmd = #{jzmd},</if>
+            <if test="jzxg != null">jzxg = #{jzxg},</if>
+            <if test="zdszd != null">zdszd = #{zdszd},</if>
+            <if test="zdszn != null">zdszn = #{zdszn},</if>
+            <if test="zdszx != null">zdszx = #{zdszx},</if>
+            <if test="zdszb != null">zdszb = #{zdszb},</if>
+            <if test="tfh != null">tfh = #{tfh},</if>
+            <if test="djh != null">djh = #{djh},</if>
+            <if test="dah != null">dah = #{dah},</if>
+            <if test="dkdm != null">dkdm = #{dkdm},</if>
+            <if test="bz != null">bz = #{bz},</if>
+            <if test="zt != null">zt = #{zt},</if>
+            <if test="djzt != null">djzt = #{djzt},</if>
+            <if test="qlrsjsyrlxm != null">qlrsjsyrlxm = #{qlrsjsyrlxm},</if>
+            <if test="gmjjhyfldm != null">gmjjhyfldm = #{gmjjhyfldm},</if>
+            <if test="xmmc != null">xmmc = #{xmmc},</if>
+            <if test="zdmjzyy != null">zdmjzyy = #{zdmjzyy},</if>
+            <if test="tdsjyt != null">tdsjyt = #{tdsjyt},</if>
+            <if test="tdsjytmc != null">tdsjytmc = #{tdsjytmc},</if>
+            <if test="blc != null">blc = #{blc},</if>
+            <if test="zjzjdmj != null">zjzjdmj = #{zjzjdmj},</if>
+            <if test="zjzmj != null">zjzmj = #{zjzmj},</if>
+            <if test="jgrq != null">jgrq = #{jgrq},</if>
+            <if test="qsdcjs != null">qsdcjs = #{qsdcjs},</if>
+            <if test="gygyqk != null">gygyqk = #{gygyqk},</if>
+            <if test="sm != null">sm = #{sm},</if>
+            <if test="dcy != null">dcy = #{dcy},</if>
+            <if test="dcrq != null">dcrq = #{dcrq},</if>
+            <if test="bdcchjs != null">bdcchjs = #{bdcchjs},</if>
+            <if test="cly != null">cly = #{cly},</if>
+            <if test="clrq != null">clrq = #{clrq},</if>
+            <if test="shyj != null">shyj = #{shyj},</if>
+            <if test="shr != null">shr = #{shr},</if>
+            <if test="shrq != null">shrq = #{shrq},</if>
+            <if test="dcdwjg != null">dcdwjg = #{dcdwjg},</if>
+            <if test="tdzspfwh != null">tdzspfwh = #{tdzspfwh},</if>
+            <if test="tdgywjh != null">tdgywjh = #{tdgywjh},</if>
+            <if test="jsydghxkzh != null">jsydghxkzh = #{jsydghxkzh},</if>
+            <if test="geom != null">geom = #{geom},</if>
+            <if test="validFlag != null">valid_flag = #{validFlag},</if>
+        </set>
+        WHERE bsm = #{bsm}
+    </update>
+
+    <delete id="batchDelete">
+        DELETE FROM vector.zdjbxx
+        WHERE bsm IN
+        <foreach collection="bsms" item="bsm" open="(" separator="," close=")">
+            #{bsm}
+        </foreach>
+    </delete>
+
+    <select id="getDictByTypeAndTop" resultType="Map">
+        SELECT * FROM "vector"."public_dict"
+        <where>
+            length(value) = 1
+            <if test="type != null and type != ''">
+                AND type =#{type}
+            </if>
+        </where>
+    </select>
+
+
+    <select id="getDictByType" resultType="Map">
+        SELECT * FROM "vector"."public_dict"
+        <where>
+            <if test="type != null and type != ''">
+                AND type =#{type}
+            </if>
+        </where>
+    </select>
+
+
+
+
+
+
+
+</mapper>