gushoubang преди 9 месеца
родител
ревизия
f919c9610a

+ 10 - 1
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/tdgy/TdgyServiceImp.java

@@ -23,6 +23,7 @@ import com.onemap.common.datasource.annotation.Slave;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
+import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
 
 
@@ -108,7 +109,12 @@ public class TdgyServiceImp implements TdgyService {
     @Override
     @Override
     public RequestResult getSuspectedIdleLand(String key, String xzqh, Integer limit, Integer offset) {
     public RequestResult getSuspectedIdleLand(String key, String xzqh, Integer limit, Integer offset) {
         List<Map<String, Object>> list = tdgyMapper.getSuspectedIdleLand(key, xzqh, limit, offset);
         List<Map<String, Object>> list = tdgyMapper.getSuspectedIdleLand(key, xzqh, limit, offset);
-        return RequestResult.success(list);
+        Map<String, Object> map = new HashMap<>();
+        map.put("list", list);
+        // TODO 总数,总面积
+        map.put("count", list.size());
+        map.put("area", 100);
+        return RequestResult.success(map);
     }
     }
 
 
     /**
     /**
@@ -160,4 +166,7 @@ public class TdgyServiceImp implements TdgyService {
         landIdleDisposalMapper.insert(landIdleDisposalDTO);
         landIdleDisposalMapper.insert(landIdleDisposalDTO);
         return RequestResult.success();
         return RequestResult.success();
     }
     }
+    /**
+     * 获取闲置土地
+     */
 }
 }

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

@@ -2,10 +2,10 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.onemap.apply.mapper.tdgy.TdgyMapper">
 <mapper namespace="com.onemap.apply.mapper.tdgy.TdgyMapper">
     <select id="getSuspectedIdleLand" resultType="map">
     <select id="getSuspectedIdleLand" resultType="map">
-        SELECT id, xmmc, crmj, ydkgsj
+        SELECT id, xmmc, crmj, TO_CHAR(ydkgsj, 'yyyy/MM/dd') AS ydkgsj
         from tdgy_sj
         from tdgy_sj
         WHERE (sfjg!=true or sfjg is null)
         WHERE (sfjg!=true or sfjg is null)
-        and (NOW() - sjkgsj > INTERVAL '365 days')
+        and (NOW() > ydkgsj)
         <if test="key != null and key != ''">
         <if test="key != null and key != ''">
             and (xmmc like '%'||#{key}||'%' or srf like '%'||#{key}||'%')
             and (xmmc like '%'||#{key}||'%' or srf like '%'||#{key}||'%')
         </if>
         </if>