chenendian před 2 dny
rodič
revize
d5867b8cc2

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

@@ -6,7 +6,6 @@ import com.siwei.apply.domain.vo.BatchTrendReportVO;
 import com.siwei.apply.mapper.*;
 import com.siwei.common.core.exception.ServiceException;
 import com.siwei.common.core.utils.StringUtils;
-import com.siwei.spatial.api.RemoteSpatialFilesDbService;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.collections4.MapUtils;
@@ -21,18 +20,6 @@ import java.util.stream.Collectors;
 @Service
 public class BatchServiceImpl{
 
-    @Autowired
-    private GongdiJihuaMapper gongdiJihuaMapper;
-
-    @Autowired
-    private TdgyMapper dgyMapper;
-
-    @Autowired
-    private LandTypeMapper landTypeMapper;
-
-    @Autowired
-    private RemoteSpatialFilesDbService remoteSpatialFilesDbService;
-
     @Autowired
     private YdbpMapper ydbpMapper;
 
@@ -42,6 +29,9 @@ public class BatchServiceImpl{
 
     public List<?> getNotSupplyList(String year) {
         List<Map<String, Object>> resList = new ArrayList<>();
+        if(StringUtils.isBlank(year)||"0".equals(year)){
+            year ="";
+        }
         List<Map<String,Object>> ydbpNotSupplyList =  ydbpMapper.queryRemainGeomListByYearOfYdbp(year);
         List<Map<String,Object>> ydbpDataNotSupplyList =  ydbpDataMapper.queryRemainGeomListByYear(year);
         if(CollectionUtils.isNotEmpty(ydbpNotSupplyList)){

+ 1 - 1
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/cadastre/impl/SupplyServiceImpl.java

@@ -134,7 +134,7 @@ public class SupplyServiceImpl implements ISupplyService {
                         String code = g.getTdyt().substring(0, 2);
                         String categoryName = codeToNameCache.computeIfAbsent(code, k -> {
                             LandType landType = landTypeMapper.selectByCode(k);
-                            return landType != null ? landType.getName() : null;
+                            return landType != null ? landType.getName() : "其它";
                         });
 
                         if (categoryName != null) {

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

@@ -54,7 +54,7 @@
                 AND ngysj &lt;= #{endDate}
             </if>
             <if test="year != null and year != ''">
-                AND  TO_CHAR(ngysj, 'YYYY') = #{year}
+                AND  nf = #{year}
             </if>
         </where>
         ORDER BY gid DESC

+ 7 - 2
siwei-modules/siwei-apply/src/main/resources/mapper/YdbpDataMapper.xml

@@ -222,15 +222,20 @@
     <select id="queryRemainGeomListByYear" resultType="java.util.Map">
         <include refid="commonYdbpDataCte"></include>
         SELECT
-        gd.id,
+        gd.id as details_id,
         LEFT(bp.pf_date, '4') AS year,
         '2' AS batch_type,
         bp.id  as  node_id,
+        bp.id  as  id,
+        '' as project_id,
         public.st_asewkt(geom) geom
         FROM t_geom_db_details gd
             INNER JOIN t_node_land nl ON gd.upload_id = nl.geom_db_id
             INNER JOIN t_ydbp_data bp ON nl.node_id = bp.id
-        WHERE bp.has_onchain = 't'  AND LEFT(bp.pf_date, '4')=#{year}
+        WHERE bp.has_onchain = 't'
+        <if test="year != null and year != ''">
+            AND LEFT(bp.pf_date, '4')=#{year}
+        </if>
           AND NOT EXISTS (
             SELECT 1 FROM hit_geom_id h WHERE h.details_id = gd.id
             )

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

@@ -162,16 +162,19 @@
     <select id="queryRemainGeomListByYearOfYdbp"   resultType="java.util.Map">
         <include refid="commonYdbpCte"></include>
         SELECT
-        gd.id,
+        gd.id as details_id,
+        '' as project_id,
         LEFT(bp.pf_date, '4') AS year,
         bp.id  as  node_id,
-        '1' AS batch_type,
+        bp.id  as  id,
         public.st_asewkt(geom) geom
         FROM t_geom_db_details gd
         INNER JOIN t_node_land nl ON gd.upload_id = nl.geom_db_id
         INNER JOIN t_ydbp  bp ON nl.node_id = bp.id
         WHERE bp.has_onchain = 't'
-        AND LEFT(bp.pf_date, '4')=#{year}
+        <if test="year != null and year != ''">
+            AND LEFT(bp.pf_date, '4')=#{year}
+        </if>
         AND NOT EXISTS (
         SELECT 1 FROM hit_geom_id h WHERE h.details_id = gd.id
         )