Przeglądaj źródła

新增未利用地用地类型条件

songxy 1 rok temu
rodzic
commit
9db4676f21

+ 1 - 1
BJYSYBZ_C/src/views/WlydxqView/components/FourContent.vue

@@ -353,7 +353,7 @@ export default {
       this.isAllSelected = false;
       if (this.ydlx.length > 0) {
         const pBms = this.ydlx.filter(arr => arr[0] === 'Q');
-        const pBm = pBms[0][0] || ''
+        const pBm = pBms.length > 0 ? pBms[0][0] || '' : ''
         if (pBm !== 'Q') {
           const selected = ydlxDicts.filter(item => item.value === pBm);
           if (selected && selected.length > 0) {

+ 13 - 4
BJYSYBZ_S/src/main/resources/mapper/YbzBJMapper.xml

@@ -64,11 +64,20 @@
         <if test="xzqmc != null and xzqmc !=''">
             and ssjd = #{xzqmc}
         </if>
-        <if test="lx != null and lx !=''">
+        <if test="dlbms != null and dlbms.size > 0">
             and
-            <foreach collection="lx.split(';')" separator=" or " item="id" open="(" close=")">
-                zydxzmc = #{id}
-            </foreach>
+            <choose>
+                <when test="isOther == true">
+                    <foreach collection="dlbms" separator=" and " item="id" open="(" close=")">
+                        zydxz not like concat(#{id}, '%')
+                    </foreach>
+                </when>
+                <otherwise>
+                    <foreach collection="dlbms" separator=" or " item="id" open="(" close=")">
+                        zydxz like concat(#{id}, '%')
+                    </foreach>
+                </otherwise>
+            </choose>
         </if>
         <if test="status == '是'.toString()">
             and sftb = #{status}