Kaynağa Gözat

fix
患者列表

lifang 3 ay önce
ebeveyn
işleme
1fc00262e2

+ 1 - 1
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/dto/BizAppUserBindHospitalDTO.java

@@ -15,7 +15,7 @@ import javax.validation.constraints.NotBlank;
 @Data
 @ApiModel("切换医院id")
 public class BizAppUserBindHospitalDTO {
-    @ApiModelProperty(value = "邀请码",required = true)
+    @ApiModelProperty(value = "邀请码或者id",required = true)
     @NotBlank(message = "邀请码不能为空")
     private String inviteCode;
 }

+ 5 - 1
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/impl/DoctorUserServiceImpl.java

@@ -139,7 +139,11 @@ public class DoctorUserServiceImpl  implements IDoctorUserService {
     @Transactional(rollbackFor = Exception.class)
     public Boolean bindTenant(BizAppUserBindHospitalDTO source) {
         SysTenantPO tenant = tenantRepository.selectOne(new LambdaQueryWrapper<SysTenantPO>()
-                .eq(SysTenantPO::getInviteCode, source.getInviteCode())
+                .nested(r->
+                        r.eq(SysTenantPO::getInviteCode, source.getInviteCode())
+                                .or()
+                                .eq(SysTenantPO::getId, source.getInviteCode())
+                )
                 .last("limit 1"));
         if(ObjectUtil.isNull(tenant)){
             throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "邀请码不存在");

+ 2 - 1
tr-modules/tr-module-smartFollowUp/src/main/resources/mapper/smart/BizPatientMapper.xml

@@ -55,6 +55,7 @@
             biz_clinic_room_doctor_user bcrmu_sub
             ON bcr_sub.ID = bcrmu_sub.clinic_room_id
             <where>
+                 bcr_sub.deleted = 0
                 <if test="query.currentUserId != null and query.currentUserId != ''">
                     AND bcrmu_sub.user_id = #{query.currentUserId,jdbcType=VARCHAR}
                 </if>
@@ -93,7 +94,7 @@
         ON
         tmp2.patient_id = bp.id
         <where>
-            and bcr.deleted = 0 and bp.deleted = 0 and tmp2.c >0
+            tmp2.c >0
             <if test="query.queryCondition != null and query.queryCondition != ''">
                 and (
                 bp.patient_code LIKE concat('%',#{query.queryCondition,jdbcType=VARCHAR},'%')