ywf пре 1 месец
родитељ
комит
d85613d026

+ 1 - 1
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/ghss/ZbmxJcpgyjServiceImpl.java

@@ -129,7 +129,7 @@ public class ZbmxJcpgyjServiceImpl implements IZbmxJcpgyjService {
             ZbmxZbjczDTO hbfx = zbmxJcpgyjMapper.SelectHBFX(page.getXzqdm(), page.getZbbh(), jcsj);
             //监测值(目标对比)
             String timejczmbdb = "";
-            if (page.getYear() == null || page.getYear() == "") {
+            if (page.getYear() == null || page.getYear().isEmpty()) {
                 Calendar cal = Calendar.getInstance();
                 timejczmbdb = Integer.toString(cal.get(Calendar.YEAR));
             } else {

+ 1 - 1
onemap-modules/onemap-file/src/main/java/com/onemap/file/service/impl/LocalSysFileServiceImpl.java

@@ -283,7 +283,7 @@ public class LocalSysFileServiceImpl implements ISysFileService {
         String publicpath = path.substring(0, path.indexOf("."));
         String shppath = path;
         String geojsonPath = publicpath + "_" + uuid + "_" + "geojson.json";
-        String geojson = ParsingShpFileUtils().shape2Geojson2(shppath, geojsonPath);
+        String geojson = ParsingShpFileUtils.shape2Geojson2(shppath, geojsonPath);
         return geojson;
     }
 

+ 2 - 2
onemap-modules/onemap-model/src/main/java/com/onemap/sanya/controller/spatial/JZDJAnalyseController.java

@@ -337,9 +337,9 @@ public class JZDJAnalyseController extends BaseController {
                 ghdkDetailed.setId(GHDKInfo.getId());
                 ghdkDetailed.setGeometry(GHDKInfo.getGeometry());
                 ghdkDetailed.setData(GHDKInfo.getData());
-                Data kzxxgydmcData = GHDKInfo.getData().stream().filter(n -> n.getLabel() == "kzxxgydmc").findFirst().orElse(null);
+                Data kzxxgydmcData = GHDKInfo.getData().stream().filter(n -> "kzxxgydmc".equals(n.getLabel())).findFirst().orElse(null);
                 ghdkDetailed.setGhyt(kzxxgydmcData == null ? "" : kzxxgydmcData.getValue());
-                Data dkbmData = GHDKInfo.getData().stream().filter(n -> n.getLabel() == "dkbm").findFirst().orElse(null);
+                Data dkbmData = GHDKInfo.getData().stream().filter(n -> "dkbm".equals(n.getLabel())).findFirst().orElse(null);
                 ghdkDetailed.setDkbm(dkbmData == null ? "" : dkbmData.getValue());
                 ghdkDetailed.setZytdList(GHDKInfo.getZytdList());
                 ghdkDetailedDjList.add(ghdkDetailed);

+ 4 - 4
onemap-modules/onemap-model/src/main/java/com/onemap/sanya/controller/spatial/JZDJCorrectionAnalyseController.java

@@ -88,14 +88,14 @@ public class JZDJCorrectionAnalyseController extends BaseController {
             // 读取模拟数据 并赋值给导出对象
             String ProjectScopeString = jsonObj.get("ProjectScope").toString();
             Geometry geometry=null;
-            if(getCoordinateType(ProjectScopeString)=="坐标数组"){
+            if("坐标数组".equals(getCoordinateType(ProjectScopeString))){
                 //范围字符串转范围对象
                 List<Coordinate> pointArray = objectMapper.readValue(ProjectScopeString, new TypeReference<List<Coordinate>>() {
                 });
                 if (pointArray == null || pointArray.size() == 0)
                     return GhdkList;
                 geometry = SpatialOperate.createPolygon(pointArray);
-            }else if(getCoordinateType(ProjectScopeString)=="单个坐标对象"){
+            }else if("单个坐标对象".equals(getCoordinateType(ProjectScopeString))){
                 //范围字符串转范围对象
                 Coordinate coordinate = objectMapper.readValue(ProjectScopeString, new TypeReference<Coordinate>() {});
                 if (coordinate == null)
@@ -135,14 +135,14 @@ public class JZDJCorrectionAnalyseController extends BaseController {
             // 读取模拟数据 并赋值给导出对象
             String ProjectScopeString = jsonObj.get("ProjectScope").toString();
             Geometry geometry=null;
-            if(getCoordinateType(ProjectScopeString)=="坐标数组"){
+            if ("坐标数组".equals(getCoordinateType(ProjectScopeString))) {
                 //范围字符串转范围对象
                 List<Coordinate> pointArray = objectMapper.readValue(ProjectScopeString, new TypeReference<List<Coordinate>>() {
                 });
                 if (pointArray == null || pointArray.size() == 0)
                     return GhdkList;
                 geometry = SpatialOperate.createPolygon(pointArray);
-            }else if(getCoordinateType(ProjectScopeString)=="单个坐标对象"){
+            } else if ("单个坐标对象".equals(getCoordinateType(ProjectScopeString))) {
                 //范围字符串转范围对象
                 Coordinate coordinate = objectMapper.readValue(ProjectScopeString, new TypeReference<Coordinate>() {});
                 if (coordinate == null)

+ 6 - 6
onemap-modules/onemap-model/src/main/java/com/onemap/sanya/controller/spatial/ZDAnalyseController.java

@@ -132,7 +132,7 @@ public class ZDAnalyseController extends BaseController {
 
         //青苗补偿标准
         ZtQmBcbzList qmBcbzList=null;
-         if(qmValue==null||qmValue=="")
+         if (qmValue == null || qmValue.isEmpty())
          {
              List<ZtQmBcbzList> items= qmBcbzListService.selectZtQmBcbzListList(new ZtQmBcbzList());
              if(items!=null&&items.size()>0)
@@ -146,7 +146,7 @@ public class ZDAnalyseController extends BaseController {
              qmBcbzList= qmBcbzListService.selectZtQmBcbzListById(qmValue);
          //征地补偿标准
         ZtZdBcbzList zdBcbzList=null;
-        if(zdValue==null||zdValue=="") {
+        if (zdValue == null || zdValue.isEmpty()) {
             List<ZtZdBcbzList> items= ztZdBcbzListService.selectZtZdBcbzListList(new ZtZdBcbzList());
             if(items!=null&&items.size()>0) {
                 zdBcbzList=   items.get(0);
@@ -160,7 +160,7 @@ public class ZDAnalyseController extends BaseController {
         ZtCqBcbzList cqBcbzList=null;
         List<ZtCqBcbzItem> cqBcbzItemList=null;
         ZtCqBcbzItem cqBcbzItem=new ZtCqBcbzItem();
-        if(cqValue==null||cqValue=="") {
+        if (cqValue == null || cqValue.isEmpty()) {
             List<ZtCqBcbzList> items=cqBcbzListService.selectZtCqBcbzListList(new ZtCqBcbzList());
             if(items!=null&&items.size()>0) {
                 cqBcbzList=   items.get(0);
@@ -215,7 +215,7 @@ public class ZDAnalyseController extends BaseController {
          SuperMapFreature superMapFreature=   SpatialOperate.Feature2Supermap(feature1,geom);
             Integer index = -1;
             for (Integer j = 0; j < gyUData.size(); j++) {
-                if (qsdwmc.toUpperCase() == gyUData.get(j).getQsdwmc().toUpperCase()) {
+                if (qsdwmc != null && gyUData.get(j).getQsdwmc() != null && qsdwmc.equalsIgnoreCase(gyUData.get(j).getQsdwmc())) {
                     index = j;
                     break;
                 }
@@ -241,7 +241,7 @@ public class ZDAnalyseController extends BaseController {
             Integer index = -1;
             SuperMapFreature superMapFreature=   SpatialOperate.Feature2Supermap(feature1,geom);
             for (Integer j = 0; j < jtOData .size(); j++) {
-                if (qsdwmc.toUpperCase() == jtOData.get(j).getQsdwmc().toUpperCase()) {
+                if (qsdwmc != null && jtOData.get(j).getQsdwmc() != null && qsdwmc.equalsIgnoreCase(jtOData.get(j).getQsdwmc())) {
                     index = j;
                     break;
                 }
@@ -268,7 +268,7 @@ public class ZDAnalyseController extends BaseController {
             Integer index = -1;
             SuperMapFreature superMapFreature=   SpatialOperate.Feature2Supermap(feature1,geom);
             for (Integer j = 0; j < jtUData.size(); j++) {
-                if (qsdwmc.toUpperCase() == jtUData.get(j).getQsdwmc().toUpperCase()) {
+                if (qsdwmc != null && jtUData.get(j).getQsdwmc() != null && qsdwmc.equalsIgnoreCase(jtUData.get(j).getQsdwmc())) {
                     index = j;
                     break;
                 }

+ 7 - 5
onemap-modules/onemap-model/src/main/java/com/onemap/sanya/utils/SpatialOperate.java

@@ -368,9 +368,11 @@ public class SpatialOperate {
             fields[i].setAccessible(true);
             fieldNames[i] = fldName;
             String s = "null";
-            if(fldName=="SMGEOMETRY")
-                fieldValues[i]="";
-            fieldValues[i] = fields[i].get(obj) == null ? s : fields[i].get(obj).toString();
+            if ("SMGEOMETRY".equals(fldName)) {
+                fieldValues[i] = "";
+            } else {
+                fieldValues[i] = fields[i].get(obj) == null ? s : fields[i].get(obj).toString();
+            }
             if (fields[i].getName().toUpperCase().equals("SMID"))
                 smId = Integer.parseInt(fields[i].get(obj).toString());
         }
@@ -446,7 +448,7 @@ public class SpatialOperate {
                 System.out.print(cnName);
 
             }
-            if (cnName == "" || cnName == null)
+            if (cnName == null || cnName.isEmpty())
                 cnName = name;
             fldInfos.add(new FldInfo(name.toUpperCase(), cnName.toUpperCase(), typeName.toUpperCase()));
         }
@@ -475,7 +477,7 @@ public class SpatialOperate {
                 System.out.print(cnName);
 
             }
-            if (cnName == "" || cnName == null)
+            if (cnName == null || cnName.isEmpty())
                 cnName = name;
             fldInfos.add(new FldInfo(name, cnName, typeName));
         }