Browse Source

Merge branch 'dev/subhos_defplan_20211009' into debug

zhoutg 3 years ago
parent
commit
8c0089d38b

+ 16 - 14
cdssman-service/src/main/java/com/diagbot/facade/HospitalInfoFacade.java

@@ -121,8 +121,6 @@ public class HospitalInfoFacade extends HospitalInfoServiceImpl {
             }
             }
         }
         }
 
 
-        // 校验子医院
-        List<TranHospitalRelation> saveRelationList = Lists.newArrayList();
         // 获取子医院
         // 获取子医院
         List<HospitalRelationVO> hospitalRelationVOList = hospitalInfoSaveVO.getHospitalRelationVOList();
         List<HospitalRelationVO> hospitalRelationVOList = hospitalInfoSaveVO.getHospitalRelationVOList();
         if (ListUtil.isNotEmpty(hospitalRelationVOList)) {
         if (ListUtil.isNotEmpty(hospitalRelationVOList)) {
@@ -150,15 +148,6 @@ public class HospitalInfoFacade extends HospitalInfoServiceImpl {
                 if (hospitalId != null && !hospitalId.equals(hospitalInfo.getId()) && !keyExist.contains(unionKey)) {
                 if (hospitalId != null && !hospitalId.equals(hospitalInfo.getId()) && !keyExist.contains(unionKey)) {
                     errorOther.add(hospitalRelationVO);
                     errorOther.add(hospitalRelationVO);
                     keyExist.add(unionKey);
                     keyExist.add(unionKey);
-                } else {
-                    TranHospitalRelation tranHospitalRelation = new TranHospitalRelation();
-                    BeanUtil.copyProperties(hospitalRelationVO, tranHospitalRelation);
-                    tranHospitalRelation.setHospitalId(hospitalInfo.getId());
-                    tranHospitalRelation.setCreator(userId);
-                    tranHospitalRelation.setModifier(userId);
-                    tranHospitalRelation.setGmtCreate(now);
-                    tranHospitalRelation.setGmtModified(now);
-                    saveRelationList.add(tranHospitalRelation);
                 }
                 }
             }
             }
 
 
@@ -170,7 +159,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 +173,20 @@ 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);
+        List<TranHospitalRelation> saveRelationList = Lists.newArrayList();
+        for (HospitalRelationVO hospitalRelationVO : hospitalRelationVOList) {
+            TranHospitalRelation tranHospitalRelation = new TranHospitalRelation();
+            BeanUtil.copyProperties(hospitalRelationVO, tranHospitalRelation);
+            tranHospitalRelation.setHospitalId(hospitalInfo.getId());
+            tranHospitalRelation.setCreator(userId);
+            tranHospitalRelation.setModifier(userId);
+            tranHospitalRelation.setGmtCreate(now);
+            tranHospitalRelation.setGmtModified(now);
+            saveRelationList.add(tranHospitalRelation);
+        }
+        if (ListUtil.isNotEmpty(saveRelationList)) {
+            tranHospitalRelationService.saveBatch(saveRelationList);
+        }
         return null;
         return null;
     }
     }
 
 
@@ -250,7 +252,7 @@ public class HospitalInfoFacade extends HospitalInfoServiceImpl {
                 .eq("is_deleted", IsDeleteEnum.N.getKey())
                 .eq("is_deleted", IsDeleteEnum.N.getKey())
                 .eq("hospital_id", id));
                 .eq("hospital_id", id));
         if (count > 0) {
         if (count > 0) {
-            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该医院存在关联医院,无法删除");
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该医院存在关联医院,无法删除");
         }
         }
         // 主表逻辑删除
         // 主表逻辑删除
         hospitalInfo.setIsDeleted(IsDeleteEnum.Y.getKey());
         hospitalInfo.setIsDeleted(IsDeleteEnum.Y.getKey());

+ 4 - 1
user-service/src/main/java/com/diagbot/web/UserController.java

@@ -108,7 +108,10 @@ public class UserController {
 
 
     @ApiOperation(value = "登录获取jwt[by:zhoutg]",
     @ApiOperation(value = "登录获取jwt[by:zhoutg]",
             notes = "username:用户名,必填<br>" +
             notes = "username:用户名,必填<br>" +
-                    "password:密码, 必填, 默认密码:dc483e80a7a0bd9ef71d8cf973673924<br> ")
+                    "password:密码, 必填<br> " +
+                    "【236】:f6af7afd01d4eb0dc5fe0a342cd6cee7<br>" +
+                    "【241】:ccd2fc33d2d423d7209035dbfff82b29<br>" +
+                    "【121、122】:27f78bb8d0adb1568d674518302f10b6<br>")
     @PostMapping("/getJwt")
     @PostMapping("/getJwt")
     @SysLogger("getJwt")
     @SysLogger("getJwt")
     public RespDTO<JwtDTO> getJwt(@RequestBody UserLoginVO userLoginVO) {
     public RespDTO<JwtDTO> getJwt(@RequestBody UserLoginVO userLoginVO) {