Browse Source

修改医院信息

zhoutg 3 years ago
parent
commit
06e8ce9cdc

+ 4 - 2
cdssman-service/src/main/java/com/diagbot/facade/HospitalInfoFacade.java

@@ -170,7 +170,7 @@ public class HospitalInfoFacade extends HospitalInfoServiceImpl {
             }
             }
         }
         }
 
 
-        //新增数据
+        // 新增数据
         if (hospitalInfo.getId() == null) {
         if (hospitalInfo.getId() == null) {
             hospitalInfo.setCreator(userId);
             hospitalInfo.setCreator(userId);
             hospitalInfo.setGmtCreate(now);
             hospitalInfo.setGmtCreate(now);
@@ -184,7 +184,9 @@ public class HospitalInfoFacade extends HospitalInfoServiceImpl {
         // 先删除子医院关联表
         // 先删除子医院关联表
         tranHospitalRelationService.remove(new QueryWrapper<TranHospitalRelation>().eq("hospital_id", hospitalInfo.getId()));
         tranHospitalRelationService.remove(new QueryWrapper<TranHospitalRelation>().eq("hospital_id", hospitalInfo.getId()));
         // 插入子医院关联表
         // 插入子医院关联表
-        tranHospitalRelationService.saveBatch(saveRelationList);
+        if (ListUtil.isNotEmpty(saveRelationList)) {
+            tranHospitalRelationService.saveBatch(saveRelationList);
+        }
         return null;
         return null;
     }
     }