Explorar el Código

修改耕地显示不全问题

DESKTOP-2K9OVK9\siwei hace 5 meses
padre
commit
ff30484b81

+ 5 - 6
onemap-modules/onemap-apply/src/main/resources/mapper/postgresql/gdbh/TGdbhGdMapper.xml

@@ -27,15 +27,14 @@
     </select>
 
     <select id="ntzlfl" parameterType="String" resultType="map">
-        select t2.*, round(t2.mj*0.0015,2) mj_m, round(t2.mj*0.0001,2) mj_gq, round(t2.mj*0.000001,2) mj_qm,t2.dlmc from
-        (
-        select round((coalesce(sum(mj::numeric), 0)),2) mj ,count(*) gs ,dlmc from (
-        select "${areacolumn}" as mj ,dlmc from vector."${sjy}"
-        where bsm like concat(#{xzqhdm},'%')
+        select coalesce(round( t2.mj * 0.0015, 2 ),0) mj_m, coalesce(round( t2.mj * 0.0001, 2 ),0) mj_gq,coalesce(round( t2.mj * 0.000001, 2 ),0) mj_qm,t3.dict_label dlbm ,t3.dict_value dlmc from
+        (select round((coalesce(sum(mj::numeric), 0)),2) mj ,count(*) gs ,dlbm from (
+        select "${areacolumn}" as mj ,dlbm from vector."${sjy}"  where bsm like concat(#{xzqhdm},'%')
         <if test="dlbm!=null and dlbm!='' ">
             and dlbm like concat(#{dlbm},'%')
         </if>
-        )t1 group by dlmc)t2
+        )t1 group by dlbm)t2 RIGHT join base.national_code_dict t3  on t3.dict_type='第三次国土调查的分类标准‌' and t3.dict_label  =t2.dlbm
+        where  t3.parent_dict_label ='01' and t3.dict_type='第三次国土调查的分类标准‌' order by t3.dict_sort
     </select>
 
     <select id="qxfl" parameterType="String" resultType="map">