Browse Source

fix bug:接口/rel-manual-calc/query查询报空指针

lijie 3 years ago
parent
commit
4abfad2ca7

+ 2 - 1
src/main/java/com/persagy/proxy/calculation/service/impl/AdmManualRelCalServiceImpl.java

@@ -5,6 +5,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import com.persagy.dmp.common.helper.SpringHelper;
 import org.springframework.stereotype.Service;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -388,7 +389,7 @@ public class AdmManualRelCalServiceImpl implements AdmManualRelCalService {
     private void createCommonResultObj(ObjectDigital objectDigital,ObjectNode temp) {
         ObjectNode infos = objectDigital.getInfos();
         if (null==infos){
-            return;
+            infos = SpringHelper.getBean(ObjectMapper.class).createObjectNode();
         }
         temp.set("bimId",infos.get("bimId"));
         temp.set("buildingId",infos.get("buildingId"));