Browse Source

fix bug nullpoint

lvxianyun 3 years ago
parent
commit
e0aaa4f1be

+ 1 - 1
adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/service/Impl/DefineInfoMigration.java

@@ -316,7 +316,7 @@ public class DefineInfoMigration extends MigrationAbstractServiceImpl<ObjectInfo
             excel.setCode(define.getCode());
             excel.setName(define.getName());
             excel.setType(type);
-            excel.setCreateTime(define.getCreationTime().toString());
+            excel.setCreateTime(define.getCreationTime() == null ? "" : define.getCreationTime().toString());
             excel.setUpdateTime(define.getModifiedTime() == null ? "" : define.getModifiedTime().toString());
             dataMigrationExcels.add(excel);
         }

+ 1 - 1
adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/service/Impl/DefineTypeMigration.java

@@ -285,7 +285,7 @@ public class DefineTypeMigration extends MigrationAbstractServiceImpl<ObjectType
             excel.setCode(objectTypeDefine.getCode());
             excel.setName(objectTypeDefine.getName());
             excel.setType(type);
-            excel.setCreateTime(objectTypeDefine.getCreationTime().toString());
+            excel.setCreateTime(objectTypeDefine.getCreationTime() == null ? "" : objectTypeDefine.getCreationTime().toString());
             excel.setUpdateTime(objectTypeDefine.getModifiedTime() == null ? "" : objectTypeDefine.getModifiedTime().toString());
             if(objectTypeDefine.getGroupCode().equals("0") && objectTypeDefine.getProjectId().equals("0")){
                 excel.setMark("标准字典");

+ 1 - 1
adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/service/Impl/ObjectDigitalMigration.java

@@ -429,7 +429,7 @@ public class ObjectDigitalMigration extends MigrationAbstractServiceImpl<ObjectD
             excel.setId(digital.getId());
             excel.setName(String.join(StrUtil.DASHED, digital.getLocalId() == null ? "" : digital.getLocalId(), digital.getLocalName() == null ? "" : digital.getLocalName()));
             excel.setType(type);
-            excel.setCreateTime(digital.getCreationTime().toString());
+            excel.setCreateTime(digital.getCreationTime() == null ? "" : digital.getCreationTime().toString());
             excel.setUpdateTime(digital.getModifiedTime() == null ? "" :digital.getModifiedTime().toString());
             dataMigrationExcels.add(excel);
         }

+ 1 - 1
adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/service/Impl/ObjectRelationMigration.java

@@ -472,7 +472,7 @@ public class ObjectRelationMigration extends MigrationAbstractServiceImpl<Object
             excel.setObjFrom(objectRelation.getObjFrom());
             excel.setObjTo(objectRelation.getObjTo());
             excel.setType(type);
-            excel.setCreateTime(objectRelation.getCreationTime().toString());
+            excel.setCreateTime(objectRelation.getCreationTime() == null ? "" : objectRelation.getCreationTime().toString());
             excel.setUpdateTime(objectRelation.getModifiedTime() == null ? "" :objectRelation.getModifiedTime().toString());
             dataMigrationExcels.add(excel);
         }