lifang 3 hónapja
szülő
commit
c0c345f5b7

+ 9 - 0
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/vo/WxDoctorClinicRoomThumbnailVO.java

@@ -53,6 +53,15 @@ public class WxDoctorClinicRoomThumbnailVO implements Serializable {
     @ApiModelProperty(value = "患者ID", position = 11)
     private String patientId;
 
+    @ApiModelProperty("身份证号")
+    private String cardNo;
+
+    @ApiModelProperty("是否为新生儿")
+    private Boolean newHuman;
+
     @ApiModelProperty("看护患者的微信用户id")
     private String wxUserId;
+
+    @ApiModelProperty("最后更新信息的人员类型")
+    private String lastModifyUserType;
 }

+ 2 - 0
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/dto/BizPatientQueryDTO.java

@@ -33,6 +33,8 @@ public class BizPatientQueryDTO implements Serializable {
     @ApiModelProperty(value = "当前登录人", position = 3)
     private String userId;
 
+    @ApiModelProperty("是否绑泵  0、未绑泵,1、绑泵")
+    private Boolean bindDevice;
 
     public void setClinicTime(List<Date> clinicTime) {
         this.clinicTime = new ArrayList<>();

+ 2 - 2
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/repository/BizPatientRepository.java

@@ -2,9 +2,9 @@ package cn.tr.module.smart.common.repository;
 
 import cn.tr.module.smart.app.controller.dto.AppDoctorPatientInfoDTO;
 import cn.tr.module.smart.app.controller.vo.WxDoctorPatientVO;
-import cn.tr.module.smart.common.dto.BizPatientDTO;
 import cn.tr.module.smart.common.dto.BizPatientQueryDTO;
 import cn.tr.module.smart.common.po.BizPatientPO;
+import cn.tr.module.smart.web.vo.WebBizPatientVO;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
@@ -24,7 +24,7 @@ public interface BizPatientRepository extends BaseMapper<BizPatientPO> {
 
     List<WxDoctorPatientVO> selectPatientList(@Param("query") AppDoctorPatientInfoDTO query);
 
-    List<BizPatientDTO> selectPatientByConditionList(@Param("query") BizPatientQueryDTO query);
+    List<WebBizPatientVO> selectPatientByConditionList(@Param("query") BizPatientQueryDTO query);
 
     BizPatientPO selectMayBeLinkedPatient(@Param("patientCode") String patientCode,@Param("tenantId") String tenantId);
 }

+ 2 - 1
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/IBizPatientService.java

@@ -8,6 +8,7 @@ import cn.tr.module.smart.common.dto.BizPatientQueryDTO;
 import cn.tr.module.smart.common.po.BizPatientPO;
 import cn.tr.module.smart.web.dto.BizPatientDetailDTO;
 import cn.tr.module.smart.common.dto.BizClinicAddOrEditDTO;
+import cn.tr.module.smart.web.vo.WebBizPatientVO;
 
 import java.util.Collection;
 import java.util.List;
@@ -26,7 +27,7 @@ public interface IBizPatientService{
      * @author   lf
      * @date      2025/06/09 15:58
      */
-    List<BizPatientDTO> selectBizPatientList(BizPatientQueryDTO query);
+    List<WebBizPatientVO> selectBizPatientList(BizPatientQueryDTO query);
 
     /**
      * 根据id查询患者信息

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

@@ -10,6 +10,7 @@ import cn.tr.module.smart.common.repository.BizClinicRoomRepository;
 import cn.tr.module.smart.web.dto.BizPatientClinicListDTO;
 import cn.tr.module.smart.web.dto.BizPatientDetailDTO;
 import cn.tr.module.smart.common.dto.BizClinicAddOrEditDTO;
+import cn.tr.module.smart.web.vo.WebBizPatientVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import cn.hutool.core.collection.CollectionUtil;
@@ -73,7 +74,7 @@ public class BizPatientServiceImpl implements IBizPatientService {
      * @date      2025/06/09 15:58
      */
     @Override
-    public List<BizPatientDTO> selectBizPatientList(BizPatientQueryDTO query){
+    public List<WebBizPatientVO> selectBizPatientList(BizPatientQueryDTO query){
         return baseRepository.selectPatientByConditionList(query);
     }
 

+ 3 - 2
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/web/controller/BizPatientController.java

@@ -1,6 +1,7 @@
 package cn.tr.module.smart.web.controller;
 
 import cn.tr.module.smart.web.dto.BizPatientDetailDTO;
+import cn.tr.module.smart.web.vo.WebBizPatientVO;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import cn.dev33.satoken.annotation.SaCheckPermission;
 
@@ -35,9 +36,9 @@ public class BizPatientController extends BaseController{
     private final IBizPatientService bizPatientService;
 
     @ApiOperationSupport(author = "lf",order = 1)
-    @ApiOperation(value="根据条件查询患者信息",notes = "权限: 无")
+    @ApiOperation(value="根据条件查询患者信息(分页)",notes = "权限: 无")
     @PostMapping("/query/page")
-    public TableDataInfo<BizPatientDTO> selectList(@RequestBody BizPatientQueryDTO query) {
+    public TableDataInfo<WebBizPatientVO> selectList(@RequestBody BizPatientQueryDTO query) {
         startPage();
         return getDataTable(bizPatientService.selectBizPatientList(query));
     }

+ 49 - 0
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/web/vo/WebBizPatientVO.java

@@ -0,0 +1,49 @@
+package cn.tr.module.smart.web.vo;
+
+import cn.tr.core.validation.Update;
+import cn.tr.plugin.mybatis.pojo.BaseDTO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 患者信息传输对象
+ *
+ * @author lf
+ * @date  2025/06/09 15:58
+ **/
+@Data
+@ApiModel("患者信息传输对象")
+@ToString
+public class WebBizPatientVO implements Serializable {
+    private static final long serialVersionUID = 1L;
+    @ApiModelProperty(value = "id", position = 1)
+    private String id;
+
+    @ApiModelProperty(value = "病人姓名", position = 2)
+    private String name;
+
+    @ApiModelProperty(value = "病人性别", position = 3)
+    private String gender;
+
+    @ApiModelProperty(value = "病人年龄", position = 4)
+    private Integer age;
+
+    @ApiModelProperty(value = "当前手术id", position = 6)
+    private String currentClinicId;
+
+    @ApiModelProperty(value = "手术名称", position = 7)
+    private String clinicName;
+
+    @ApiModelProperty(value = "手术开始时间", position = 8)
+    private Date clinicStartTime;
+
+    @ApiModelProperty(value = "住院号", position = 9)
+    private String patientCode;
+}

+ 6 - 0
tr-modules/tr-module-smartFollowUp/src/main/resources/mapper/smart/BizClinicRoomMapper.xml

@@ -81,6 +81,9 @@
         <result property="patientId" column="patient_id"/>
         <result property="doctorId" column="doctor_id"/>
         <result property="wxUserId" column="wx_user_id"/>
+        <result property="lastModifyUserType" column="last_modify_user_type"/>
+        <result property="cardNo" column="card_no"/>
+        <result property="newHuman" column="new_human"/>
     </resultMap>
 
     <select id="stdSelectWxAppletClinicList" resultMap="stdWxAppletDetailResult">
@@ -324,6 +327,9 @@
         bcr.patient_gender as patient_gender,
         bcr.patient_age as patient_age,
         bcr.image_url as patient_avatar,
+        bcr.last_modify_user_type as last_modify_user_type,
+        bp.card_no as card_no,
+        bp.new_human as new_human,
         bcrdu.user_id as doctor_id,
         bcrwu.wx_user_id as wx_user_id
         from

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

@@ -80,7 +80,7 @@
         bp.update_by,
         bcr.image_url
     </select>
-    <select id="selectPatientByConditionList" resultType="cn.tr.module.smart.common.dto.BizPatientDTO">
+    <select id="selectPatientByConditionList" resultType="cn.tr.module.smart.web.vo.WebBizPatientVO">
         SELECT
         bp.id,
         bcr.patient_name as name,
@@ -98,6 +98,7 @@
         biz_patient bp
         LEFT JOIN biz_clinic_room bcr ON bp.current_clinic_id = bcr.id
         LEFT JOIN biz_clinic_room_doctor_user bcrmu ON bcr.ID = bcrmu.clinic_room_id
+        left join  biz_infusion_clinic bic on bic.clinic_id = bp.current_clinic_id
         <where>
             and bp.deleted = 0
             and bcr.deleted = 0
@@ -114,6 +115,12 @@
             <if test="query.userId != null and query.userId != ''">
                 and bcrmu.user_id = #{query.userId,jdbcType=VARCHAR}
             </if>
+            <if test="query.bindDevice != null and query.bindDevcie == true">
+                and bp.current_clinic_id is not null and bic.device_id is not null
+            </if>
+            <if test="query.bindDevice != null and query.bindDevcie == false">
+
+            </if>
         </where>
         order by bp.create_time desc
     </select>