chenendian hace 1 día
padre
commit
f5aa2c567b

+ 12 - 11
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/cadastre/impl/StorageServiceImpl.java

@@ -739,20 +739,21 @@ public class StorageServiceImpl {
         List<Map<String, Object>> shpDataList = shpGeomResult.getData();
         log.info("远程调用geom获取,返回结果:{}", shpDataList);
 
-        int count = 1;
-        for (Map<String, Object> shpData : shpDataList){
-            String sccb = shpData.get("sccb").toString();
-            String scnf = shpData.get("scnf").toString();
-            String scfs = shpData.get("scfs").toString();
-            String ghyt = shpData.get("ghyt").toString();
-            String mj_m = shpData.get("mj_m").toString();
-            if(StringUtils.isBlank(sccb)|| StringUtils.isBlank(scfs) ||StringUtils.isBlank(scnf) || StringUtils.isBlank(ghyt) || StringUtils.isBlank(mj_m)){
-                throw new  ServiceException("关键字段不能为空(sccb,scnf,scfs,ghyt,mj_m),请检查第"+count+"条数据");
+        if("0".equals(sourceType)){ //进行校验
+            int count = 1;
+            for (Map<String, Object> shpData : shpDataList){
+                String sccb = shpData.get("sccb").toString();
+                String scnf = shpData.get("scnf").toString();
+                String scfs = shpData.get("scfs").toString();
+                String ghyt = shpData.get("ghyt").toString();
+                String mj_m = shpData.get("mj_m").toString();
+                if(StringUtils.isBlank(sccb)|| StringUtils.isBlank(scfs) ||StringUtils.isBlank(scnf) || StringUtils.isBlank(ghyt) || StringUtils.isBlank(mj_m)){
+                    throw new  ServiceException("关键字段不能为空(sccb,scnf,scfs,ghyt,mj_m),请检查第"+count+"条数据");
+                }
+                count++;
             }
-            count++;
         }
 
-
         if("0".equals(addType)){
             //这里把当前表清空,重新写入;
             gjShouchuJihuaMapper.deleteByTable("gj_shouchu_xiangmu","",sourceType);