Parcourir la source

行政区划筛选添加

gushoubang il y a 8 mois
Parent
commit
16f2af96b4

+ 6 - 1
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/tdgy/vo/IdleLandListVo.java

@@ -1,6 +1,7 @@
 package com.onemap.apply.domain.tdgy.vo;
 
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 @Data
 public class IdleLandListVo {
@@ -11,10 +12,14 @@ public class IdleLandListVo {
     // 搜索 土地使用权人/土地证号
     private String key;
     // 行政区划
-    // TODO 待实现
     private String xzqh;
     private String idleReason;
 
+    @DateTimeFormat(pattern = "yyyy/MM/dd")
+    String startTime;
+    @DateTimeFormat(pattern = "yyyy/MM/dd")
+    String endTime;
+
     private Integer pageSize;
     private Integer pageNum;
 

+ 14 - 2
onemap-modules/onemap-apply/src/main/resources/mapper/postgresql/tdgy/LandIdelConfirmMapper.xml

@@ -13,11 +13,17 @@
             AND (td.srf LIKE '%' || #{key} || '%' OR td.cqzh LIKE '%' || #{key} || '%')
         </if>
         <if test="xzqh != null and xzqh != ''">
-            AND td.xzqh = #{xzqh}
+            AND td.xzqh LIKE #{xzqh}|| '%'
         </if>
         <if test="idleReason != null and idleReason != ''">
             AND confirm.idle_reason = #{idleReason}
         </if>
+        <if test="startTime != null">
+            AND confirm.confirm_time &gt;= #{startTime}::timestamp
+        </if>
+        <if test="endTime != null">
+            AND confirm.confirm_time &lt;= #{endTime}::timestamp + interval '1 day'
+        </if>
         GROUP BY td.id, td.srf, td.crmj, td.cqzh
         ORDER BY td.id
         LIMIT #{limit} OFFSET #{offset}
@@ -31,11 +37,17 @@
             AND (td.srf LIKE '%' || #{key} || '%' OR td.cqzh LIKE '%' || #{key} || '%')
         </if>
         <if test="xzqh != null and xzqh != ''">
-            AND td.xzqh = #{xzqh}
+            AND td.xzqh LIKE #{xzqh}|| '%'
         </if>
         <if test="idleReason != null and idleReason != ''">
             AND confirm.idle_reason = #{idleReason}
         </if>
+        <if test="startTime != null">
+            AND confirm.confirm_time &gt;= #{startTime}::timestamp
+        </if>
+        <if test="endTime != null">
+            AND confirm.confirm_time &lt;= #{endTime}::timestamp + interval '1 day'
+        </if>
     </select>
 
     <select id="getByLandId" resultType="com.onemap.apply.domain.tdgy.dto.LandIdleConfirmDTO">

+ 4 - 4
onemap-modules/onemap-apply/src/main/resources/mapper/postgresql/tdgy/TdgyMapper.xml

@@ -14,7 +14,7 @@
             AND (ts.xmmc LIKE '%' || #{key} || '%' OR ts.srf LIKE '%' || #{key} || '%')
         </if>
         <if test="xzqh != null and xzqh != ''">
-            AND ts.xzqh = #{xzqh}
+            AND ts.xzqh LIKE #{xzqh}|| '%'
         </if>
         GROUP BY ts.id, ts.xmmc, ts.crmj, ts.ydkgsj
         LIMIT #{limit} OFFSET #{offset};
@@ -42,7 +42,7 @@
         JOIN vector.tdgy_sj AS td ON confirm.land_id = td.ID::VARCHAR
         WHERE confirm.is_idle = TRUE
         <if test="districtCode != null and districtCode != ''">
-            AND td.xzqh = #{districtCode}
+            AND td.xzqh LIKE #{districtCode}|| '%'
         </if>
         <if test="startTime != null">
             AND confirm.confirm_time &gt;= #{startTime}::timestamp
@@ -58,7 +58,7 @@
         JOIN vector.tdgy_sj AS td ON confirm.land_id = td.id::VARCHAR
         WHERE confirm.is_idle = true AND confirm.is_disposal = true
         <if test="districtCode != null and districtCode != ''">
-            AND td.xzqh = #{districtCode}
+            AND td.xzqh LIKE #{districtCode}|| '%'
         </if>
         <if test="startTime != null">
             AND confirm.confirm_time &gt;= #{startTime}::timestamp
@@ -94,7 +94,7 @@
         JOIN vector.tdgy_sj AS td ON confirm.land_id = td.id::VARCHAR
         WHERE confirm.is_idle = true
         <if test="districtCode != null and districtCode != ''">
-            AND td.xzqh = #{districtCode}
+            AND td.xzqh LIKE #{districtCode}|| '%'
         </if>
         <if test="startTime != null">
             AND confirm.confirm_time &gt;= #{startTime}::timestamp