Jelajahi Sumber

字段空值修复

chenendian 1 hari lalu
induk
melakukan
460c26a288

+ 3 - 2
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/cadastre/impl/BatchServiceImpl.java

@@ -103,7 +103,6 @@ public class BatchServiceImpl{
     }
 
 
-
     public List<YdbpData> billProjectList(String year) {
         if(StringUtils.isBlank(year)){
             throw new  ServiceException("年份不能为空");
@@ -117,11 +116,14 @@ public class BatchServiceImpl{
         if(CollectionUtils.isNotEmpty(singleBatchList)){
             singleBatchList.stream().map(s->{
                 YdbpData ydbpData = new YdbpData();
+                ydbpData.setId(s.get("id")+"");
                 ydbpData.setProjectPropertyId(s.get("project_id") == null ? "" : String.valueOf(s.get("project_id")));
                 ydbpData.setName(s.get("project_name")+"");
                 ydbpData.setBatchType(s.get("batch_type")+"");
                 ydbpData.setYdArea(s.get("yd_area") == null ? 0f : Float.parseFloat(String.valueOf(s.get("yd_area"))));
                 ydbpData.setZsArea(s.get("mj_mu") == null ? 0f : Float.parseFloat(String.valueOf(s.get("mj_mu"))));
+                ydbpData.setYdUnit(s.get("yd_unit")+"");
+                ydbpData.setYdUnit(s.get("zs_unit")+"");
                 ydbpData.setBpDate(s.get("bp_date")+"");
                 ydbpData.setPfDate(s.get("pf_date")+"");
                 ydbpData.setPfwh(s.get("pfwh")+"");
@@ -134,7 +136,6 @@ public class BatchServiceImpl{
 
 
 
-
     /**
      * 年度统计
      * @param year

+ 3 - 1
siwei-modules/siwei-apply/src/main/resources/mapper/YdbpMapper.xml

@@ -50,6 +50,7 @@
 
     <select id="getStatisticsList" resultType="map">
         SELECT
+            bp.id AS id,
             pro.ID AS project_id,
             pro.name AS project_name,
             '1' AS batch_type,
@@ -68,7 +69,8 @@
             bp.pfwh,
             bp.pf_date,
             left(bp.pf_date,4) AS nf,
-            bp.zs_unit,
+            '亩' as yd_unit,
+            '亩' as zs_unit,
             <if test="hasGeom != null and hasGeom">
                 (SELECT array_to_string(array_agg(ST_AsEWKT(gd.geom)), '|')
                 FROM t_node_land nl