liutao 1 week ago
parent
commit
2532396e2b
1 changed files with 20 additions and 4 deletions
  1. 20 4
      CYZZ-master/cyzz/web_cyzz/src/views/land-use/PolicyCoordination.vue

+ 20 - 4
CYZZ-master/cyzz/web_cyzz/src/views/land-use/PolicyCoordination.vue

@@ -2005,6 +2005,13 @@ const resetLandPanel = () => {
 };
 //供地geoserver
 const queryGDByGeoServerFeature = (geo) => {
+
+  const currentYear = new Date().getFullYear();
+  const preYear = currentYear - form.value.formItem.cksj;
+  var start = preYear + '-01-01';
+  var end = currentYear + '-12-31';
+
+
   // 1. 构造 GML Polygon
   const rings = geo.rings[0];
   const posList = rings.map(pt => pt.join(' ')).join(' ');
@@ -2042,10 +2049,19 @@ const queryGDByGeoServerFeature = (geo) => {
                         </gml:exterior>
                     </gml:Polygon>
         </ogc:Intersects>
-                <ogc:PropertyIsLike wildCard="%" singleChar="_" escape="!">
-                <ogc:PropertyName>tdytmc</ogc:PropertyName>
-                    <ogc:Literal>${tdytLike}</ogc:Literal>
-              </ogc:PropertyIsLike>
+        <ogc:PropertyIsLike wildCard="%" singleChar="_" escape="!">
+          <ogc:PropertyName>tdytmc</ogc:PropertyName>
+          <ogc:Literal>${tdytLike}</ogc:Literal>
+        </ogc:PropertyIsLike>
+        <ogc:PropertyIsBetween>
+          <ogc:PropertyName>qdrq</ogc:PropertyName>
+          <ogc:LowerBoundary>
+            <ogc:Literal>${start}</ogc:Literal>
+          </ogc:LowerBoundary>
+          <ogc:UpperBoundary>
+            <ogc:Literal>${end}</ogc:Literal>
+          </ogc:UpperBoundary>
+        </ogc:PropertyIsBetween>
       </ogc:And>
     </ogc:Filter>
   </wfs:Query>